/* =========================================================================
   JS-SEZ Multi-Agent Judging Panel — 3D interface styles
   Navy/gold dark theme. Glass cards over a full-viewport Three.js canvas.
   "Why": layout is overlay-based so the 3D scene stays full-bleed while the
   panels float above it; on small screens we collapse the overlay to a
   normal vertical stack under the canvas (see media query at the bottom).
   ========================================================================= */

:root {
  --navy:        #0a1428;   /* scene background / page base */
  --navy-2:      #0f1d3a;   /* card base */
  --navy-3:      #16264a;   /* lighter panel / hover */
  --gold:        #FFC107;   /* primary accent (chair, brand) */
  --gold-dim:    #c79516;
  --ink:         #e8eefc;   /* primary text */
  --ink-dim:     #9fb0d4;   /* secondary text */
  --ink-faint:   #6b7ca3;   /* tertiary / labels */
  --line:        rgba(255, 193, 7, 0.18);
  --line-soft:   rgba(159, 176, 212, 0.14);
  --glass:       rgba(13, 24, 48, 0.72);
  --glass-2:     rgba(18, 32, 62, 0.85);
  --good:        #7bd88f;   /* low severity / positive */
  --warn:        #ffcf5c;   /* med severity */
  --bad:         #ff6b6b;   /* high severity / challenger */
  --shadow:      0 10px 40px rgba(0, 0, 0, 0.45);
  --radius:      14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--navy);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;            /* scene owns the viewport; panels scroll internally */
}

button, select { font-family: inherit; }

/* ---- The 3D canvas: full viewport, sits behind the overlay panels ---- */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  cursor: grab;
  background:
    radial-gradient(820px 620px at 50% 44%, rgba(40, 70, 138, 0.45) 0%, rgba(16, 32, 70, 0) 62%),
    radial-gradient(1500px 1050px at 50% 40%, #122551 0%, #0a1428 54%, #050b1a 100%);
}
#scene.dragging { cursor: grabbing; }
#scene.nowebgl { display: none; }

/* When WebGL is missing, show a quiet banner where the canvas would be. */
#webgl-fallback {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-dim);
  background:
    radial-gradient(1200px 800px at 50% 35%, #102046 0%, #0a1428 60%, #070f20 100%);
}
#webgl-fallback.show { display: flex; }
#webgl-fallback div { max-width: 420px; padding: 20px; }
#webgl-fallback h2 { color: var(--gold); margin: 0 0 8px; }

/* =========================================================================
   Overlay shell — three floating columns above the canvas.
   ========================================================================= */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;        /* let drags fall through to the canvas... */
  display: grid;
  grid-template-columns: 340px 1fr 380px;
  grid-template-rows: 1fr auto;
  gap: 16px;
  padding: 16px 16px 46px;     /* reserve space so the fixed footer never covers content */
}
/* ...but every actual control re-enables pointer events. */
#overlay .panel,
#overlay button,
#overlay select,
#overlay a { pointer-events: auto; }

.panel {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.panel-body { padding: 12px 14px; }
.scrollable { overflow-y: auto; }

/* Slim, themed scrollbars. */
.scrollable::-webkit-scrollbar { width: 8px; }
.scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 193, 7, 0.25);
  border-radius: 8px;
}
.scrollable::-webkit-scrollbar-track { background: transparent; }

/* ---- Left column: brand + controls ---- */
#col-left {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;            /* short windows: scroll the column instead of clipping it */
  overscroll-behavior: contain;
  padding-right: 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.brand .logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: radial-gradient(circle at 35% 30%, #ffe082, var(--gold) 55%, var(--gold-dim));
  box-shadow: 0 0 18px rgba(255, 193, 7, 0.55);
  flex: 0 0 auto;
}
.brand .title { font-weight: 800; font-size: 15px; letter-spacing: 0.01em; }
.brand .subtitle { color: var(--ink-dim); font-size: 11px; }

#controls { flex: 0 0 auto; }
.field { margin-bottom: 10px; }
.field label {
  display: block;
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.field select {
  width: 100%;
  padding: 8px 10px;
  background: var(--navy-3);
  color: var(--ink);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 13px;
  appearance: none;
  cursor: pointer;
}
.field select:focus { outline: 2px solid var(--gold-dim); border-color: var(--gold-dim); }
.field-hint { text-transform: none; letter-spacing: 0; color: var(--ink-faint); opacity: 0.8; font-weight: 400; }
.field textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--navy-3);
  color: var(--ink);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 12.5px;
  font-family: inherit;
  resize: vertical;
  min-height: 44px;
}
.field textarea:focus { outline: 2px solid var(--gold-dim); border-color: var(--gold-dim); }
.field textarea::placeholder { color: var(--ink-faint); opacity: 0.7; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--navy-3);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: #1c3160; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  width: 100%;
  margin-top: 6px;
  background: linear-gradient(180deg, #ffd24d, var(--gold) 60%, var(--gold-dim));
  color: #2a1d00;
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(255, 193, 7, 0.35);
  font-weight: 800;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.btn-ghost { background: transparent; }
.btn-ghost.active { background: var(--gold); color: #2a1d00; border-color: transparent; }

/* Legend (zone colours) lives under the controls. */
#legend .panel-body { padding-top: 8px; }
.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.12s ease;
}
.legend-item:hover { background: var(--navy-3); }
.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 8px currentColor;
}
.legend-item .lz { font-weight: 700; }
.legend-item .ln { color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Right column: deliberation log ---- */
#col-right {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
#log-panel { display: flex; flex-direction: column; width: 100%; min-height: 0; flex: 1.1 1 0; }
#log {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 12px;
}
.log-empty { color: var(--ink-faint); font-style: italic; padding: 8px 4px; }

.log-entry {
  display: flex;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-soft);
  animation: slidein 0.3s ease both;
}
@keyframes slidein {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}
.log-entry .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  margin-top: 4px;
  flex: 0 0 auto;
  box-shadow: 0 0 8px currentColor;
}
.log-entry .body { flex: 1 1 auto; min-width: 0; }
.log-entry .who { font-weight: 700; font-size: 12px; }
.log-entry .who .pick { color: var(--ink-dim); font-weight: 600; }
.log-entry .what { color: var(--ink-dim); font-size: 12.5px; margin-top: 2px; }
.log-entry.is-challenger { border-color: rgba(255, 107, 107, 0.35); }
.log-entry.is-chair { border-color: var(--line); background: rgba(255, 193, 7, 0.06); }

/* Severity chips for challenger issues. */
.chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.chip.low  { background: rgba(123, 216, 143, 0.18); color: var(--good); }
.chip.med  { background: rgba(255, 207, 92, 0.18);  color: var(--warn); }
.chip.high { background: rgba(255, 107, 107, 0.18); color: var(--bad); }

/* The chair's recommendation block, rendered inline in the log + result. */
.rec-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-top: 6px;
  background: linear-gradient(180deg, rgba(255,193,7,0.10), rgba(255,193,7,0.02));
}
.rec-card .rec-zone {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 15px;
}
.rec-card .rec-zone .badge {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: #0a1428;
  box-shadow: 0 0 12px currentColor;
}
.rec-card .rec-line { color: var(--ink); margin-top: 6px; font-size: 13px; }
.rec-card .rec-risk { color: var(--ink-dim); margin-top: 6px; font-size: 12.5px; }
.rec-card .rec-risk b { color: var(--bad); }
.stars { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-dim); }
.stars .pip { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.stars .pip.on { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* ---- Bottom-centre: result area (ranking, matrix, disagreements) ---- */
#col-mid {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  min-height: 0;
}
#result-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 0;
}
#result { padding: 12px 14px; flex: 1 1 auto; min-height: 0; }
.result-empty { color: var(--ink-faint); font-style: italic; padding: 18px; text-align: center; }

.result-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.result-cols.compare { grid-template-columns: 1fr; }  /* stacked: verdict above the static matrix */

.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--gold); font-weight: 700; margin: 0 0 8px;
}
.section-sub { font-size: 10.5px; color: var(--ink-faint); margin-top: -4px; margin-bottom: 8px; }

/* Ranking rows with proportional bars. */
.rank-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  cursor: pointer;
  border-radius: 8px;
}
.rank-row:hover { background: var(--navy-3); }
.rank-row .rz {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 12px; color: #0a1428;
}
.rank-bar-wrap { min-width: 0; }
.rank-bar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.rank-bar-top .rname { font-weight: 600; }
.rank-bar-top .rscore { color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.rank-bar-track {
  height: 7px; border-radius: 5px; margin-top: 3px;
  background: rgba(255,255,255,0.07); overflow: hidden;
}
.rank-bar-fill { height: 100%; border-radius: 5px; transition: width 0.6s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 8px currentColor; }
.rank-why { font-size: 11.5px; color: var(--ink-dim); margin-top: 2px; }

/* Disagreements list. */
.disagree li { font-size: 12.5px; color: var(--ink-dim); margin-bottom: 4px; }

/* Static comparison matrix. */
.matrix-wrap { overflow-x: auto; }
table.matrix { border-collapse: collapse; width: 100%; font-size: 11.5px; }
table.matrix th, table.matrix td {
  border: 1px solid var(--line-soft);
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
}
table.matrix th { color: var(--ink-faint); font-weight: 600; font-size: 10.5px; }
table.matrix td.cell { font-weight: 700; color: #0a1428; }
table.matrix th.rowhdr, table.matrix td.rowhdr { text-align: left; color: var(--ink); }

/* =========================================================================
   Footer bar — backend, source, disclaimer.
   ========================================================================= */
#footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 7px 14px;
  font-size: 11px;
  color: var(--ink-dim);
  background: linear-gradient(180deg, rgba(10,20,40,0), rgba(7,15,32,0.92));
}
#footer .backend {
  pointer-events: auto;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}
#footer .disclaimer { font-style: italic; }
#footer .src { color: var(--ink-faint); }

/* =========================================================================
   Modal (drill-down for a judge or zone).
   ========================================================================= */
#modal-backdrop {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(4, 8, 18, 0.65);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#modal-backdrop.show { display: flex; }
#modal {
  width: min(760px, 100%);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
#modal .panel-head { border-bottom: 1px solid var(--line); }
#modal-body { padding: 14px 16px; overflow-y: auto; }
.modal-close {
  background: transparent; border: none; color: var(--ink-dim);
  font-size: 20px; cursor: pointer; line-height: 1; padding: 2px 6px;
}
.modal-close:hover { color: var(--ink); }

.dz-block { margin-bottom: 14px; border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; }
.dz-block:last-child { border-bottom: none; }
.dz-head { display: flex; align-items: center; gap: 8px; }
.dz-head .dz-badge {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 12px; color: #0a1428;
}
.dz-head .dz-score {
  margin-left: auto;
  font-weight: 800; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.dz-head .dz-name { font-weight: 700; }
.dz-reason { color: var(--ink); font-size: 13px; margin: 6px 0 4px; }
.dz-evi { list-style: none; padding: 0; margin: 0; }
.dz-evi li {
  font-size: 12px; color: var(--ink-dim);
  padding: 3px 0 3px 16px; position: relative;
}
.dz-evi li::before { content: "“"; position: absolute; left: 2px; color: var(--gold-dim); font-weight: 800; }
.dz-meta { font-size: 12.5px; color: var(--ink-dim); margin: 4px 0; }
.dz-meta b { color: var(--ink); }

/* =========================================================================
   Glossary tooltip.
   ========================================================================= */
.gloss {
  border-bottom: 1px dotted var(--gold-dim);
  cursor: help;
  color: var(--gold);
  font-weight: 600;
}
#tooltip {
  position: fixed;
  z-index: 50;
  max-width: 280px;
  padding: 9px 11px;
  background: #08152e;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--ink);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
#tooltip.show { opacity: 1; transform: translateY(0); }
#tooltip b { color: var(--gold); }

/* Toast for non-blocking errors. */
#toast {
  position: fixed;
  left: 50%; bottom: 56px;
  transform: translateX(-50%) translateY(20px);
  z-index: 40;
  background: var(--bad);
  color: #2a0000;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Small "running" badge in the run button. */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(42,29,0,0.3);
  border-top-color: #2a1d00;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================================
   Responsive: on narrow screens, stop overlaying. Stack the canvas on top
   and the UI underneath in normal document flow (Milestone 7 requirement).
   ========================================================================= */
@media (max-width: 1024px) {
  html, body { overflow: auto; height: auto; }
  #scene { position: relative; height: 44vh; min-height: 280px; }
  #webgl-fallback { position: relative; height: 40vh; }
  #overlay {
    position: static;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-rows: none;
    height: auto;
    padding: 12px;
  }
  /* stacked + page-scrolls: columns flow naturally, no internal scroll/clipping */
  #col-left, #col-right, #col-mid { display: block; overflow: visible; padding-right: 0; }
  #result-panel { max-height: none; }
  #log { max-height: 320px; }
  .result-cols.compare { grid-template-columns: 1fr; }
  .legend-grid { grid-template-columns: 1fr; }
  /* footer flows at the end of the page instead of covering content */
  #footer { position: static; background: rgba(7, 15, 32, 0.92); margin-top: 4px; }
}

/* ===================================================================
   Auth: login page, brand userbar, settings modal, admin page
   =================================================================== */
.auth-page {
  display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px;
  background:
    radial-gradient(820px 620px at 50% 38%, rgba(40, 70, 138, 0.35), rgba(16, 32, 70, 0) 62%),
    var(--navy);
}
.auth-card {
  width: min(380px, 100%);
  background: var(--glass-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 28px 26px; text-align: center;
}
.auth-logo {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 12px;
  background: radial-gradient(circle at 35% 30%, #ffe082, var(--gold) 55%, var(--gold-dim));
  box-shadow: 0 0 22px rgba(255, 193, 7, 0.55);
}
.auth-card h1 { font-size: 18px; margin: 0 0 4px; }
.auth-sub { color: var(--ink-dim); font-size: 13px; margin: 0 0 18px; }
.auth-field {
  display: block; text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-faint); margin-bottom: 12px;
}
.auth-field input, .settings-body input {
  width: 100%; margin-top: 5px; padding: 9px 11px; background: var(--navy-3); color: var(--ink);
  border: 1px solid var(--line-soft); border-radius: 8px; font-size: 13px; font-family: inherit;
  text-transform: none; letter-spacing: 0;
}
.auth-field input:focus, .settings-body input:focus { outline: 2px solid var(--gold-dim); border-color: var(--gold-dim); }
.auth-card .btn-primary { width: 100%; margin-top: 6px; }
.auth-err { color: #ff8a8a; font-size: 12.5px; margin-top: 10px; min-height: 16px; }
.auth-foot { color: var(--ink-faint); font-size: 11px; margin: 16px 0 0; line-height: 1.5; }

/* brand panel becomes a column so the userbar sits beneath the title */
.brand { flex-direction: column; align-items: stretch; gap: 10px; }
.brand-row { display: flex; align-items: center; gap: 12px; }
.userbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-top: 1px solid var(--line-soft); padding-top: 8px; font-size: 11.5px; flex-wrap: wrap;
}
.user-chip { color: var(--ink-dim); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.userbar-actions { display: flex; gap: 10px; align-items: center; }
.linkbtn {
  background: none; border: none; color: var(--gold); cursor: pointer; font: inherit;
  font-size: 11.5px; padding: 2px 0; text-decoration: none;
}
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: #ff8a8a; }

#settings-backdrop {
  position: fixed; inset: 0; z-index: 11; background: rgba(4, 8, 18, 0.65); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
#settings-backdrop.show { display: flex; }
#settings-modal {
  width: min(440px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--glass-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
#settings-modal .panel-head { border-bottom: 1px solid var(--line); }
.settings-body { padding: 16px; overflow-y: auto; }
.settings-note { color: var(--ink-dim); font-size: 12px; line-height: 1.5; margin: 0 0 14px; }
.settings-body .btn { width: 100%; margin-top: 4px; }
.set-status { font-size: 11.5px; color: var(--ink-dim); margin: -6px 0 12px; }
.ok { color: #7bd88f; }
.warn { color: var(--gold); }
.set-msg { font-size: 12px; color: var(--ink-dim); min-height: 16px; margin-top: 8px; }
.set-advanced { margin: 4px 0 12px; }
.set-advanced summary { cursor: pointer; color: var(--ink-faint); font-size: 11.5px; margin-bottom: 8px; }
.set-divider { border: none; border-top: 1px solid var(--line-soft); margin: 18px 0 14px; }

.admin-page { min-height: 100vh; background: var(--navy); padding: 24px; color: var(--ink); }
.admin-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-head h1 { font-size: 18px; margin: 0; }
.admin-nav { display: flex; gap: 16px; }
.admin-panel .panel-body { padding: 14px; }
.admin-form { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-form input, .admin-form select {
  padding: 8px 10px; background: var(--navy-3); color: var(--ink);
  border: 1px solid var(--line-soft); border-radius: 8px; font: inherit; font-size: 13px;
}
.admin-form input { flex: 1 1 140px; }
.admin-msg { color: var(--ink-dim); font-size: 12px; margin-top: 8px; min-height: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.admin-table th { color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.row-actions { display: flex; gap: 12px; flex-wrap: wrap; }
