/* ═══════════════════════════════════════════════════════════════
   FlightRadar24 API Playground — Aviation Operations Terminal
   Design: Aeronautical chart precision × dispatch center density
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@400;500;600;700&family=Barlow:ital,wght@0,400;0,500;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ── */
:root {
  /* Palette — OKLCH perceptual precision */
  --bg:           oklch(97.5% 0.010 85);    /* aeronautical chart parchment */
  --bg-alt:       oklch(95.5% 0.014 85);    /* slightly deeper parchment */
  --surface:      oklch(99.5% 0.004 85);    /* panel white */
  --surface-raised: oklch(100% 0 0);

  /* Sidebar — deep aviation navy */
  --nav:          oklch(19% 0.045 258);
  --nav-mid:      oklch(24% 0.040 258);
  --nav-hover:    oklch(28% 0.038 258);
  --nav-text:     oklch(87% 0.014 85);
  --nav-muted:    oklch(58% 0.022 258);
  --nav-border:   oklch(28% 0.032 258);

  /* Typography */
  --ink:          oklch(16% 0.032 258);
  --ink-muted:    oklch(46% 0.018 258);
  --ink-faint:    oklch(66% 0.014 85);

  /* Semantic — aviation color codes */
  --clear:        oklch(56% 0.175 145);     /* VFR operational green */
  --clear-bg:     oklch(95% 0.040 145);
  --caution:      oklch(72% 0.185 68);      /* MVFR amber */
  --caution-bg:   oklch(97% 0.040 85);
  --alert:        oklch(52% 0.225 22);      /* IFR red */
  --alert-bg:     oklch(97% 0.030 20);
  --info:         oklch(48% 0.140 258);     /* blue info */
  --info-bg:      oklch(96% 0.025 258);

  /* Active accent — amber */
  --active:       oklch(72% 0.185 68);
  --active-dim:   oklch(38% 0.100 68);

  /* Borders */
  --border:       oklch(88% 0.018 85);
  --border-strong: oklch(78% 0.025 85);
  --border-nav:   oklch(28% 0.032 258);

  /* Radius */
  --r-sm:   3px;
  --r-md:   5px;
  --r-lg:   8px;

  /* Spacing */
  --sidebar-w: 240px;

  /* Typography */
  --font-ui:   'Barlow Semi Condensed', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

/* ── Dark Mode Tokens ── */
[data-theme="dark"] {
  --bg:             oklch(14% 0.020 258);
  --bg-alt:         oklch(18% 0.022 258);
  --surface:        oklch(21% 0.024 258);
  --surface-raised: oklch(24% 0.026 258);

  --ink:            oklch(91% 0.008 85);
  --ink-muted:      oklch(62% 0.015 258);
  --ink-faint:      oklch(42% 0.015 85);

  --border:         oklch(28% 0.022 258);
  --border-strong:  oklch(36% 0.025 258);

  --clear-bg:       oklch(20% 0.055 145);
  --caution-bg:     oklch(19% 0.048 80);
  --alert-bg:       oklch(18% 0.052 22);
  --info-bg:        oklch(19% 0.038 258);
}

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

/* ── Base ── */
html { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.2s, color 0.2s;
}

/* ══════════════════════════════════════
   LAYOUT — Two-column operations deck
   ══════════════════════════════════════ */

#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100dvh;
}

/* ── Sidebar ── */
.sidebar {
  background: var(--nav);
  border-right: 1px solid var(--nav-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--nav-mid) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--nav-mid); border-radius: 2px; }

/* ── Workspace ── */
.workspace {
  background: var(--bg);
  overflow-y: auto;
  min-width: 0;
}

/* ══════════════════════════════════════
   SIDEBAR HEADER
   ══════════════════════════════════════ */

.sidebar-header {
  padding: 16px 14px 12px;
  border-bottom: 1px solid var(--nav-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--active);
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nav-text);
  line-height: 1.2;
}

.brand-sub {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nav-muted);
  display: block;
  margin-top: 1px;
}

/* Tab switcher in sidebar */
.sidebar-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--nav-mid);
  border-radius: var(--r-sm);
  padding: 3px;
}

.sidebar-tab {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--nav-muted);
  background: none;
  border: none;
  border-radius: 2px;
  padding: 5px 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.sidebar-tab svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.sidebar-tab:hover {
  color: var(--nav-text);
}

.sidebar-tab.active {
  background: var(--nav);
  color: var(--active);
}

/* Lang switcher */
.lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.lang-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nav-muted);
}

.lang-btns {
  display: flex;
  gap: 2px;
}

.lang-btn {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--nav-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-btn:hover { color: var(--nav-text); }
.lang-btn.active {
  color: var(--active);
  border-color: var(--active-dim);
}

.theme-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  color: var(--nav-muted);
  transition: all 0.15s;
  flex-shrink: 0;
  padding: 0;
  margin-left: 2px;
}

.theme-btn:hover {
  color: var(--nav-text);
  border-color: var(--nav-border);
}

.theme-btn svg {
  width: 11px;
  height: 11px;
}

/* ══════════════════════════════════════
   MODULE NAVIGATION
   ══════════════════════════════════════ */

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

.module-category {
  padding: 8px 14px 4px;
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nav-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.module-category::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--nav-border);
  margin-left: 2px;
}

.module-item {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 0 14px;
  height: 32px;
  cursor: pointer;
  gap: 8px;
  text-align: left;
  transition: background 0.1s;
  position: relative;
}

.module-item:hover {
  background: var(--nav-hover);
}

.module-item.active {
  background: var(--nav-mid);
}

.module-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--active);
  border-radius: 0 1px 1px 0;
}

.module-item.disabled {
  opacity: 0.38;
  cursor: default;
}

.module-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--nav-muted);
  flex-shrink: 0;
  transition: background 0.1s, border-color 0.1s;
}

.module-item.active .module-item-dot {
  background: var(--active);
  border-color: var(--active);
}

.module-item-name {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--nav-muted);
  transition: color 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.module-item:hover .module-item-name,
.module-item.active .module-item-name {
  color: var(--nav-text);
}

.module-item.active .module-item-name {
  color: var(--active);
  font-weight: 600;
}

.method-badge {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--nav-muted);
  border: 1px solid var(--nav-border);
  border-radius: 2px;
  padding: 0 3px;
  line-height: 14px;
  flex-shrink: 0;
}

.module-item.active .method-badge {
  color: var(--active);
  border-color: var(--active-dim);
}

.module-item.disabled .method-badge {
  text-decoration: line-through;
}

/* ══════════════════════════════════════
   CONFIG BAR (in sidebar bottom)
   ══════════════════════════════════════ */

.sidebar-config {
  border-top: 1px solid var(--nav-border);
  margin-top: auto;
}

.config-toggle-btn {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 11px 14px;
  cursor: pointer;
  gap: 8px;
  transition: background 0.1s;
}

.config-toggle-btn:hover {
  background: var(--nav-hover);
}

.config-toggle-btn svg {
  width: 13px;
  height: 13px;
  color: var(--nav-muted);
  flex-shrink: 0;
}

.config-toggle-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nav-muted);
  flex: 1;
}

.config-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nav-border);
  flex-shrink: 0;
  transition: background 0.2s;
}

.config-status-dot.ok {
  background: var(--clear);
  box-shadow: 0 0 4px oklch(56% 0.175 145 / 0.4);
}

.config-panel {
  padding: 0 14px 12px;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.config-panel.open {
  display: flex;
}

.config-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nav-muted);
  margin-bottom: 4px;
  display: block;
}

.config-input {
  width: 100%;
  background: var(--nav-mid);
  border: 1px solid var(--nav-border);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--nav-text);
  outline: none;
  transition: border-color 0.15s;
}

.config-input::placeholder {
  color: var(--nav-muted);
  opacity: 0.7;
}

.config-input:focus {
  border-color: var(--active-dim);
}

.config-url-display {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--nav-muted);
  word-break: break-all;
  line-height: 1.4;
  padding: 4px 0;
}

.config-advanced-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 10.5px;
  color: var(--nav-muted);
  margin-top: 4px;
  user-select: none;
}

.config-advanced-toggle input[type="checkbox"] {
  width: 11px;
  height: 11px;
  accent-color: var(--active);
}

.config-help-text {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--nav-muted);
  font-style: italic;
  line-height: 1.4;
  margin-top: 4px;
}

.config-saved-msg {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 0;
}

.config-saved-msg.ok {
  color: var(--clear);
}

.config-saved-msg.warn {
  color: var(--caution);
}

/* Keyboard shortcut hint */
.kbd-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  background: var(--nav-border);
  border-radius: 2px;
  padding: 1px 4px;
  color: var(--nav-muted);
  white-space: nowrap;
}

/* ══════════════════════════════════════
   WORKSPACE — Onboarding Banner
   ══════════════════════════════════════ */

#onboarding-banner:empty { display: none; }

.onboarding-strip {
  background: oklch(72% 0.185 68 / 0.10);
  border-bottom: 1px solid oklch(72% 0.185 68 / 0.30);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.onboarding-strip-text {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  flex: 1;
  min-width: 200px;
}

.onboarding-strip-text strong {
  font-weight: 700;
}

.onboarding-strip-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ══════════════════════════════════════
   WORKSPACE — Endpoint Header
   ══════════════════════════════════════ */

.endpoint-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}

.endpoint-method-path {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.endpoint-method {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--surface);
  background: var(--clear);
  border-radius: var(--r-sm);
  padding: 2px 7px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  word-break: break-all;
}

.endpoint-description {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.endpoint-unavail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--caution);
  background: var(--caution-bg);
  border: 1px solid oklch(72% 0.185 68 / 0.25);
  border-radius: var(--r-sm);
  padding: 3px 8px;
  margin-top: 6px;
}

.endpoint-unavail svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   WORKSPACE — Parameters
   ══════════════════════════════════════ */

.params-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.params-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.param-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  align-items: start;
}

.param-key-col {
  padding-top: 8px;
}

.param-key {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  display: block;
}

.param-req-badge {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--alert);
  display: block;
  margin-top: 2px;
}

.param-opt-badge {
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-top: 2px;
}

.param-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.4;
}

.param-input::placeholder {
  color: var(--ink-faint);
  font-size: 12px;
}

.param-input:focus {
  border-color: var(--info);
  box-shadow: 0 0 0 3px oklch(48% 0.140 258 / 0.10);
}

.no-params-msg {
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.no-params-msg::before {
  content: '✓';
  font-weight: 700;
  color: var(--clear);
}

/* ══════════════════════════════════════
   WORKSPACE — Action Bar + Status Line
   ══════════════════════════════════════ */

.action-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-execute {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--active);
  border: none;
  border-radius: var(--r-md);
  padding: 8px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.btn-execute svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.btn-execute:hover {
  background: oklch(76% 0.185 68);
  transform: translateY(-1px);
}

.btn-execute:active {
  transform: translateY(0);
}

.btn-execute:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-execute.loading {
  background: var(--border-strong);
  color: var(--ink-muted);
}

.status-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--r-sm);
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.chip svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.chip-status-ok {
  background: var(--clear-bg);
  color: var(--clear);
  border: 1px solid oklch(56% 0.175 145 / 0.25);
}

.chip-status-err {
  background: var(--alert-bg);
  color: var(--alert);
  border: 1px solid oklch(52% 0.225 22 / 0.25);
}

.chip-status-warn {
  background: var(--caution-bg);
  color: oklch(58% 0.160 68);
  border: 1px solid oklch(72% 0.185 68 / 0.25);
}

.chip-http {
  font-family: var(--font-mono);
  font-size: 11px;
}

.chip-timing {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.chip-cache {
  color: var(--info);
  background: var(--info-bg);
  border: 1px solid oklch(48% 0.140 258 / 0.20);
}

.chip-preview {
  color: oklch(58% 0.140 258);
  background: oklch(96% 0.020 258);
  border: 1px solid oklch(48% 0.140 258 / 0.20);
  font-style: italic;
}

[data-theme="dark"] .chip-preview {
  color: oklch(72% 0.130 258);
  background: oklch(22% 0.025 258);
}

.chip-meta {
  color: var(--ink-faint);
  background: transparent;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* History row */
.history-row {
  margin-top: 8px;
  position: relative;
}

.history-toggle {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}

.history-toggle:hover {
  color: var(--ink-muted);
}

.history-toggle svg {
  width: 11px;
  height: 11px;
}

.history-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 4px 16px oklch(0% 0 0 / 0.08);
  min-width: 320px;
  max-width: 440px;
  z-index: 50;
  display: none;
  overflow: hidden;
}

.history-dropdown.open {
  display: block;
}

.history-header {
  padding: 8px 12px 6px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--border);
}

.history-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 7px 12px;
  background: none;
  border: none;
  cursor: pointer;
  gap: 8px;
  text-align: left;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item:hover {
  background: var(--bg-alt);
}

.history-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

.history-desc {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.history-empty {
  padding: 14px 12px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink-faint);
  font-style: italic;
}

/* ══════════════════════════════════════
   WORKSPACE — Hint / Error Banner
   ══════════════════════════════════════ */

.hint-strip {
  margin: 14px 20px 0;
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.hint-strip.error {
  background: var(--alert-bg);
  border: 1px solid oklch(52% 0.225 22 / 0.25);
}

.hint-strip.preview {
  background: var(--info-bg);
  border: 1px solid oklch(48% 0.140 258 / 0.20);
}

.hint-strip-icon {
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1.4;
}

.hint-strip-body {
  flex: 1;
}

.hint-strip-title {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.hint-strip.error .hint-strip-title { color: var(--alert); }
.hint-strip.preview .hint-strip-title { color: var(--info); }

.hint-strip-text {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* ══════════════════════════════════════
   WORKSPACE — Response Area
   ══════════════════════════════════════ */

.response-section {
  padding: 0 20px 24px;
}

.response-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 8px;
  gap: 8px;
}

.response-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.response-toolbar-right {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-sm {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.12s;
  white-space: nowrap;
}

.btn-sm svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.btn-sm:hover {
  background: var(--bg-alt);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-sm.active {
  background: var(--clear-bg);
  border-color: oklch(56% 0.175 145 / 0.3);
  color: var(--clear);
}

.line-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
}

.json-viewer {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.json-pre {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink);
  padding: 16px 18px;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}

.json-textarea {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  width: 100%;
  height: 420px;
  padding: 16px 18px;
  white-space: pre;
  tab-size: 2;
}

/* JSON Syntax Highlighting */
.json-pre .jk { color: oklch(38% 0.14 258); font-weight: 500; }  /* key */
.json-pre .js { color: oklch(44% 0.18 145); }                     /* string */
.json-pre .jn { color: oklch(50% 0.16 22); }                      /* number */
.json-pre .jb { color: oklch(52% 0.14 300); }                     /* bool */
.json-pre .jz { color: var(--ink-faint); }                        /* null */

[data-theme="dark"] .json-pre .jk { color: oklch(72% 0.14 258); }
[data-theme="dark"] .json-pre .js { color: oklch(68% 0.18 145); }
[data-theme="dark"] .json-pre .jn { color: oklch(72% 0.16 22); }
[data-theme="dark"] .json-pre .jb { color: oklch(70% 0.14 300); }

.expand-btn {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--info);
  background: var(--info-bg);
  border: 1px solid oklch(48% 0.140 258 / 0.20);
  border-radius: var(--r-sm);
  padding: 3px 10px;
  cursor: pointer;
  transition: background 0.12s;
}

.expand-btn:hover {
  background: oklch(94% 0.030 258);
}

[data-theme="dark"] .expand-btn:hover {
  background: oklch(24% 0.030 258);
}

/* Summary data grid (above JSON) */
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px 0;
}

.summary-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px 10px;
}

.summary-key {
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.summary-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

/* Alert strip above JSON */
.alerts-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 20px 0;
}

/* ══════════════════════════════════════
   SERVICE MONITOR
   ══════════════════════════════════════ */

.monitor-workspace {
  padding: 20px;
}

.monitor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.monitor-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.monitor-title {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.monitor-last-refresh {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}

.btn-refresh {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 7px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s;
}

.btn-refresh svg {
  width: 12px;
  height: 12px;
}

.btn-refresh:hover {
  background: var(--bg-alt);
  border-color: var(--border-strong);
}

.btn-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.monitor-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.monitor-card-head {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 7px;
}

.monitor-card-head svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.monitor-card-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.monitor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}

.monitor-row:last-child {
  border-bottom: none;
}

.monitor-label {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.monitor-value {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.monitor-empty {
  padding: 40px 20px;
  text-align: center;
}

.monitor-empty-msg {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-faint);
}

.monitor-empty-msg.error {
  color: var(--alert);
}

/* Status chips in monitor */
.schip {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  padding: 2px 7px;
  display: inline-block;
}

.schip-ok { background: var(--clear-bg); color: var(--clear); }
.schip-warn { background: var(--caution-bg); color: oklch(58% 0.160 68); }
.schip-err { background: var(--alert-bg); color: var(--alert); }
.schip-info { background: var(--info-bg); color: var(--info); }

/* ══════════════════════════════════════
   ANIMATE
   ══════════════════════════════════════ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spin {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

/* ══════════════════════════════════════
   BUTTONS (generic)
   ══════════════════════════════════════ */

.btn-ghost {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.12s;
}

.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

.btn-link {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--info);
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.12s;
}

.btn-link:hover {
  color: oklch(40% 0.140 258);
}

[data-theme="dark"] .btn-link:hover {
  color: oklch(72% 0.130 258);
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 640px) {
  :root {
    --sidebar-w: 200px;
  }
}

@media (max-width: 500px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: 260px;
  }

  .workspace {
    border-top: 2px solid var(--border-strong);
  }
}

/* ══════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
