/* ─────────────────────────────────────────────────────
   rejectd — Application CSS
   Clean, minimal admin theme.
   ───────────────────────────────────────────────────── */

:root {
  --bg:          #0f1117;
  --bg-card:     #1a1d27;
  --bg-sidebar:  #13151f;
  --border:      #2a2d3a;
  --text:        #e2e4ed;
  --text-muted:  #7a7f99;
  --text-dim:    #555870;
  --accent:      #5b8aff;
  --accent-hover:#7aa0ff;
  --green:       #3fb950;
  --red:         #e05252;
  --yellow:      #d4a017;
  --orange:      #e08a2d;
  --sidebar-w:   220px;
  --header-h:    56px;
  --radius:      6px;
  --shadow:      0 2px 8px rgba(0,0,0,0.4);
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:   "SF Mono", "Fira Code", "Consolas", monospace;
}

html[data-theme="light"] {
  --bg:          #f0f2f7;
  --bg-card:     #ffffff;
  --bg-sidebar:  #1e2235;
  --border:      #dde0ea;
  --text:        #1a1d27;
  --text-muted:  #606580;
  --text-dim:    #9ca3b0;
  --accent:      #4f76f6;
  --accent-hover:#3a62e8;
  --green:       #2da44e;
  --red:         #cf4a4a;
  --yellow:      #b98a00;
  --orange:      #c47320;
  --shadow:      0 2px 8px rgba(0,0,0,0.10);
}

/* Sidebar always uses dark palette regardless of theme */
.sidebar {
  --text:       #e2e4ed;
  --text-muted: #7a7f99;
  --text-dim:   #555870;
  --border:     #2a2d3a;
  --accent:     #5b8aff;
  color: var(--text);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  font-size: 18px;
  color: var(--accent);
}

.sidebar-brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

.sidebar-nav {
  padding: 8px 0;
  flex: 1;
}

.nav-section {
  padding: 16px 16px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover, .nav-item.active {
  background: rgba(91,138,255,0.1);
  color: var(--text);
}

.nav-item.active {
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

.nav-item.small { font-size: 12px; }

.nav-icon { width: 16px; text-align: center; font-size: 15px; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.locale-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
}

.locale-active {
  color: var(--accent) !important;
  font-weight: 600;
}

/* ─── Main content ────────────────────────────────── */

.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 24px;
}

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

.page-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

.mobile-nav-overlay {
  display: none;
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

/* ─── Cards ───────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.card--highlight {
  border-color: var(--accent);
}

.card-header {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 16px;
}

/* ─── Metrics grid ────────────────────────────────── */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metrics-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.metric-card--good { border-left: 3px solid var(--green); }
.metric-card--bad  { border-left: 3px solid var(--red); }
.metric-card--warn { border-left: 3px solid var(--yellow); }

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Charts ──────────────────────────────────────── */

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.chart-card--wide {
  grid-column: 1 / -1;
}

/* Compact full-width chart variant (used on Compliance page). */
.chart-body--compact {
  height: 300px;
}

.chart-body--compact canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-body--dashboard {
  height: 260px;
}

.chart-body--dashboard canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ─── Tables ──────────────────────────────────────── */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table th a {
  color: inherit;
  text-decoration: none;
}

.table th a:hover {
  color: var(--text);
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table-hover tr:hover td { background: rgba(91,138,255,0.04); }

.table tr.row-pass td { background: rgba(63,185,80,0.04); }
.table tr.row-fail td { background: rgba(224,82,82,0.04); }
.table tr.row-flagged td { background: rgba(208,96,0,0.08); }

.table td.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
}

/* ─── Badges ──────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
}

.badge--pass     { background: rgba(63,185,80,0.18);  color: #3fb950; }
.badge--fail     { background: rgba(224,82,82,0.18);  color: #e05252; }
.badge--none     { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.badge--quarantine { background: rgba(212,160,23,0.18); color: #d4a017; }
.badge--reject   { background: rgba(224,82,82,0.18);  color: #e05252; }
.badge--warn     { background: rgba(212,160,23,0.18); color: #d4a017; }
.badge--info     { background: rgba(91,138,255,0.15); color: var(--accent); }
.badge--running  { background: rgba(91,138,255,0.2);  color: var(--accent); }
.badge--inactive { background: rgba(255,255,255,0.05); color: var(--text-dim); }
.badge--role-admin   { background: rgba(91,138,255,0.2); color: var(--accent); }
.badge--role-analyst { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* ─── Buttons ─────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: default; }

.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary{ background: rgba(255,255,255,0.1); color: var(--text); }
.btn-secondary:hover { background: rgba(255,255,255,0.15); }
.btn-ghost    { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(91,138,255,0.1); }
.btn-danger   { background: rgba(224,82,82,0.15); color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: rgba(224,82,82,0.25); }
.btn-warn     { background: rgba(212,160,23,0.15); color: var(--yellow); border: 1px solid var(--yellow); }
.btn-warn:hover { background: rgba(212,160,23,0.25); }
.btn-link     { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 12px; padding: 4px 8px; }
.btn-link:hover { color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ─── Forms ───────────────────────────────────────── */

.form-group {
  margin-bottom: 16px;
}

.form-group--grow { flex: 1; min-width: 120px; }
.form-group--fixed { width: 100px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input, .form-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent);
}

.form-input--inline {
  width: 160px;
  display: inline-block;
}

.form-select--inline {
  width: 90px;
  display: inline-block;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.form-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
}

/* ─── Filter bar ──────────────────────────────────── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.filter-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ─── Compliance bar ──────────────────────────────── */

.compliance-bar {
  display: inline-block;
  width: 80px;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 6px;
}

.compliance-bar--wide { width: 120px; }

.compliance-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.3s;
}

/* ─── Login page ──────────────────────────────────── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
}

.login-box {
  width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  font-size: 40px;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0 0;
}

/* ─── Alerts ──────────────────────────────────────── */

.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-success { background: rgba(63,185,80,0.12);  color: #3fb950; border: 1px solid rgba(63,185,80,0.3); }
.alert-error   { background: rgba(224,82,82,0.12);  color: #e05252; border: 1px solid rgba(224,82,82,0.3); }
.alert-warn    { background: rgba(212,160,23,0.12); color: #d4a017; border: 1px solid rgba(212,160,23,0.3); }
.alert-info    { background: rgba(91,138,255,0.12); color: #7aa0ff; border: 1px solid rgba(91,138,255,0.3); }

/* ─── Toast ───────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 13px;
  z-index: 9999;
  transition: opacity 0.3s;
}

.toast.hidden { display: none; }

/* ─── Misc helpers ────────────────────────────────── */

.small    { font-size: 12px; }
.mono     { font-family: var(--font-mono); font-size: 12px; }
.muted    { color: var(--text-muted); }
.nowrap   { white-space: nowrap; }
.hidden   { display: none !important; }
.float-right { float: right; }
.text-error  { color: var(--red); }

.results-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ─── Pagination ──────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.page-info, .pagination-info {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Definition list ─────────────────────────────── */

.definition-list {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.definition-list dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding-top: 2px;
  overflow-wrap: anywhere;
}

.definition-list dd {
  margin: 0;
  font-size: 13px;
}

/* ─── Detail grid ─────────────────────────────────── */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* ─── Breadcrumb ──────────────────────────────────── */

.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--accent); text-decoration: none; }

/* ─── Alignment tag ───────────────────────────────── */

.align-tag {
  font-size: 10px;
  background: rgba(91,138,255,0.15);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ─── Guidance steps ──────────────────────────────── */

.guidance-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.guidance-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.step-content { font-size: 13px; line-height: 1.6; }

.note { font-size: 12px; color: var(--text-muted); }

/* ─── Readiness indicators ────────────────────────── */

.readiness { font-size: 11px; font-weight: 600; }
.readiness--ready { color: var(--green); }
.readiness--warn  { color: var(--yellow); }
.readiness--bad   { color: var(--red); }

/* ─── Container helpers ───────────────────────────── */

.container-narrow { max-width: 620px; }

/* ─── Token display ───────────────────────────────── */

.token-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 12px 0;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ─── Error page ──────────────────────────────────── */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.error-code {
  font-size: 72px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.error-message {
  font-size: 18px;
  color: var(--text-muted);
  margin: 12px 0 24px;
}

/* ─── Responsive ──────────────────────────────────── */

@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .metrics-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .sidebar {
    width: min(84vw, 320px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 1100;
  }
  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }
  .content { margin-left: 0; }
  .nav-item { padding: 10px 14px; justify-content: flex-start; }
  .nav-item.active { border-left: 2px solid var(--accent); border-bottom: none; }
  .mobile-menu-btn { display: inline-flex; }
  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    z-index: 1090;
    transition: opacity 0.2s ease;
  }
  body.mobile-nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* Give content more room and reduce cramped mobile cards. */
  .content { padding: 16px 12px; }
  .card-header, .card-body { padding: 12px; }

  /* Stack definition lists cleanly on narrow screens. */
  .definition-list { grid-template-columns: 1fr; gap: 4px 0; }
  .definition-list dt { padding-top: 0; }
  .definition-list dd { margin-bottom: 8px; }

  /* Keep wide tables usable with horizontal scroll. */
  .card > .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .card > .table th,
  .card > .table td {
    white-space: nowrap;
  }

  /* Prevent iOS Safari auto-zoom on input focus (<16px triggers zoom). */
  input,
  select,
  textarea,
  .form-input,
  .form-select,
  .api-token-input,
  .api-param-input {
    font-size: 16px;
  }
}

/* ── DNS check result ─────────────────────────────── */
.dns-result {
  margin-top: 6px;
  font-size: 0.82rem;
}
.dns-label {
  color: var(--text-muted);
  font-family: var(--mono);
}
.dns-record {
  display: block;
  margin-top: 4px;
  padding: 4px 8px;
  background: var(--surface2);
  border-radius: 4px;
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--text-dim);
}

/* ── Role badges ──────────────────────────────────── */
.badge--role-org_admin { background: rgba(130,201,30,0.18); color: #82c91e; }

/* ── Misc utilities ───────────────────────────────── */
.text-muted { color: var(--text-muted); }

/* ── SQL Console ──────────────────────────────────── */
.sql-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sql-editor  { font-family: var(--font-mono); font-size: 13px; resize: vertical; width: 100%; }
.sql-result-table td { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Theme toggle ─────────────────────────────────── */
.theme-toggle {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 2px;
  margin: 8px 12px 4px;
}
.theme-toggle button {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.theme-toggle button.active {
  background: var(--accent);
  color: #fff;
}
.theme-toggle button:not(.active):hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

/* ─── API Browser ─────────────────────────────────── */

.api-browser { display: flex; flex-direction: column; gap: 16px; }

.api-token-bar { padding: 12px 16px; }
.api-token-bar-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.api-token-label { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.api-token-input {
  flex: 1; min-width: 260px; max-width: 420px;
  background: var(--input-bg); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px; padding: 6px 10px; font-size: 13px;
}
.api-token-hint { font-size: 12px; color: var(--text-muted); }
.api-token-hint a { color: var(--accent); }

.api-browser-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .api-browser-layout { grid-template-columns: 1fr; } }

.api-endpoint-list {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; position: sticky; top: 16px; max-height: calc(100vh - 200px); overflow-y: auto;
}
.api-endpoint-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  cursor: pointer; border-bottom: 1px solid var(--border); font-size: 12px;
  transition: background 0.1s;
}
.api-endpoint-item:last-child { border-bottom: none; }
.api-endpoint-item:hover { background: rgba(91,138,255,0.06); }
.api-endpoint-item.selected { background: rgba(91,138,255,0.12); }
.api-endpoint-path { font-family: monospace; color: var(--text); flex: 1; font-size: 11px; word-break: break-all; }

.api-method-badge {
  display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px;
  font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; font-family: monospace;
}
.api-method-badge.api-method-lg { padding: 4px 10px; font-size: 13px; }
.api-method-get    { background: rgba(63,185,80,0.15);  color: #3fb950; }
.api-method-post   { background: rgba(91,138,255,0.15); color: #5b8aff; }
.api-method-put    { background: rgba(210,153,34,0.18); color: #d99922; }
.api-method-delete { background: rgba(224,82,82,0.15);  color: #e05252; }

.api-detail-pane {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 20px; min-height: 300px;
}
.api-detail-empty { text-align: center; padding: 48px 0; color: var(--text-muted); }
.api-detail-empty p { margin-top: 12px; font-size: 14px; }

.api-detail-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.api-detail-path { font-family: monospace; font-size: 16px; color: var(--text); font-weight: 600; }
.api-detail-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.api-params { margin-bottom: 16px; }
.api-params-heading { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 12px 0 6px; }
.api-param-row { display: grid; grid-template-columns: 1fr 220px; gap: 8px; align-items: center; margin-bottom: 6px; }
@media (max-width: 700px) { .api-param-row { grid-template-columns: 1fr; } }
.api-param-meta { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.api-param-name { font-family: monospace; font-size: 12px; font-weight: 600; color: var(--text); }
.api-param-type { font-size: 11px; color: var(--text-muted); }
.api-param-required { font-size: 10px; color: #e05252; font-weight: 600; }
.api-param-desc { font-size: 11px; color: var(--text-muted); }
.api-param-input {
  width: 100%; background: var(--input-bg); border: 1px solid var(--border);
  color: var(--text); border-radius: 5px; padding: 5px 8px; font-size: 12px; font-family: monospace;
}
.api-param-input:focus { outline: none; border-color: var(--accent); }

.api-try-btn { margin-top: 4px; }

.api-request-preview {
  margin-top: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 12px 14px; font-family: monospace; font-size: 12px; color: var(--text-muted);
  white-space: pre-wrap; word-break: break-all;
}

.api-response {
  margin-top: 12px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.api-response-meta {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  background: var(--bg); border-bottom: 1px solid var(--border); font-size: 12px;
}
.api-response-status { font-weight: 700; font-family: monospace; }
.api-response-time { color: var(--text-muted); }
.api-status-ok  { color: #3fb950; }
.api-status-err { color: #e05252; }
.api-response-loading { color: var(--text-muted); padding: 12px 14px; display: block; font-size: 12px; }
.api-response-body {
  margin: 0; padding: 12px 14px; font-family: monospace; font-size: 12px;
  color: var(--text); background: var(--surface); white-space: pre-wrap; word-break: break-all;
  max-height: 480px; overflow-y: auto;
}

.hidden { display: none !important; }
