*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: #f5f5f5;
  color: #1a1a1a;
  min-height: 100vh;
}

header {
  background: #1a1a2e;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-title { font-size: 16px; font-weight: 600; letter-spacing: 0.3px; }

.header-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #fff;
}

header select {
  background: #2a2a4a;
  color: #fff;
  border: 1px solid #4a4a6a;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
}

.info-panel {
  background: #f0f4ff;
  border-bottom: 1px solid #c7d2f5;
  font-size: 13px;
  color: #2a2a4a;
}

.info-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  cursor: pointer;
  user-select: none;
}

.info-panel-header:hover { background: #e6ecff; }

.info-panel-title {
  font-weight: 600;
  font-size: 13px;
}

.info-toggle-icon {
  font-size: 24px;
  color: #6366f1;
  transition: transform 0.2s;
}

.info-panel-body {
  padding: 0 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.55;
}

.info-panel-body.collapsed { display: none; }

.info-accounts {
  font-size: 12.5px;
  color: #444;
}

.info-accounts code, .info-panel-body code {
  background: #e0e7ff;
  border-radius: 3px;
  padding: 1px 5px;
  font-family: monospace;
  font-size: 12px;
}

.info-notes {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #444;
}

.user-bar {
  background: #e8f4e8;
  border-bottom: 1px solid #c8e0c8;
  padding: 6px 20px;
  font-size: 13px;
  color: #2a6e2a;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.user-bar.unauthenticated { background: #f0f0f0; border-color: #ddd; color: #777; }

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2a6e2a; flex-shrink: 0;
}

.dot.grey { background: #999; }

main {
  max-width: 820px;
  margin: 24px auto;
  padding: 0 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
}

.controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex: 1;
  min-width: 180px;
}

.controls select {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 14px;
  background: #fff;
  color: #1a1a1a;
  cursor: pointer;
  width: 100%;
}

.method-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.method-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.method-GET    { background: #dbeafe; color: #1d4ed8; }
.method-POST   { background: #dcfce7; color: #15803d; }
.method-PATCH  { background: #fef9c3; color: #854d0e; }
.method-PUT    { background: #fef3c7; color: #92400e; }
.method-DELETE { background: #fee2e2; color: #b91c1c; }

.url-text {
  font-family: monospace;
  font-size: 13px;
  color: #444;
  word-break: break-all;
}

.description {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 10px;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.field-key {
  font-family: monospace;
  font-size: 13px;
  color: #444;
  min-width: 120px;
  flex-shrink: 0;
}

.field-input {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 10px;
  font-family: monospace;
  font-size: 13px;
  flex: 1;
  min-width: 0;
}

.field-input:focus { outline: none; border-color: #6366f1; }

textarea.body-input {
  width: 100%;
  min-height: 140px;
  font-family: monospace;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  resize: vertical;
  line-height: 1.5;
}

textarea.body-input:focus { outline: none; border-color: #6366f1; }

.send-row {
  display: flex;
  justify-content: flex-end;
}

#send-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

#send-btn:hover { background: #4f46e5; }
#send-btn:disabled { background: #a5b4fc; cursor: not-allowed; }

.response-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.status-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.status-2xx { background: #dcfce7; color: #15803d; }
.status-3xx { background: #fef9c3; color: #854d0e; }
.status-4xx, .status-5xx { background: #fee2e2; color: #b91c1c; }

.response-body {
  font-family: monospace;
  font-size: 13px;
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.5;
}

.hidden { display: none !important; }
