/* ═══════════════════════════════════════════════════════════
   admin-ui.css v1 — 외대.서버.한국 관리자 계기판
   "Mission Control" — Dark Navy · Gold Vein · Real Indicators
   ═══════════════════════════════════════════════════════════ */

/* MINSEONG_EXTERNAL_ADMIN_CSS_V1 */
/* ── CSS Variables ── */
:root {
  --admin-bg: #05101e;
  --admin-surface: rgba(255,255,255,.045);
  --admin-surface-2: rgba(255,255,255,.075);
  --admin-border: rgba(255,255,255,.09);
  --admin-border-gold: rgba(141,113,80,.38);
  --admin-border-hover: rgba(141,113,80,.55);
  --admin-navy: #002d56;
  --admin-gold: #8d7150;
  --admin-gold-lt: #c9a87a;
  --admin-green: #146e7a;
  --admin-ink: #e8edf4;
  --admin-muted: rgba(232,237,244,.48);
  --admin-panel: rgba(8,20,40,.78);
  --admin-panel-hi: rgba(12,28,55,.88);

  --status-on: #22c55e;
  --status-on-glow: rgba(34,197,94,.32);
  --status-warn: #f59e0b;
  --status-warn-glow: rgba(245,158,11,.32);
  --status-off: #ef4444;
  --status-off-glow: rgba(239,68,68,.32);
  --status-resolved: #10b981;
  --status-resolved-glow: rgba(16,185,129,.24);
  --status-info: #38bdf8;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-full: 9999px;

  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);

  --font-ui: "Noto Sans KR", "Pretendard Variable", "Apple SD Gothic Neo", system-ui, sans-serif;
  --font-display: "Noto Sans KR", "HUFS", "Pretendard Variable", sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
}

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

/* ── Body ── */
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-weight: 600;
  background: var(--admin-bg);
  color: var(--admin-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 30;
  background: linear-gradient(90deg, var(--admin-navy), var(--admin-gold), var(--admin-navy));
}

/* ══ AUTH SCREEN ══ */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(2,8,20,.38) 0%, rgba(2,8,20,.94) 72%),
    linear-gradient(90deg, rgba(0,45,86,.42), rgba(141,113,80,.18)),
    url("assets/img/hero-index-bg.webp") center / cover no-repeat fixed,
    var(--admin-bg);
  overflow: hidden;
}

.auth-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(255,237,207,.11) 0%, transparent 24%),
    radial-gradient(circle at 78% 72%, rgba(141,113,80,.14) 0%, transparent 28%);
  pointer-events: none;
}

/* Animated grid overlay */
.auth-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  opacity: .5;
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 2.25rem 2rem;
  border-radius: var(--r-xl);
  border: 1px solid rgba(141,113,80,.28);
  border-top: 3px solid var(--admin-gold);
  background: rgba(6,16,34,.88);
  backdrop-filter: saturate(1.4) blur(24px);
  -webkit-backdrop-filter: saturate(1.4) blur(24px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 32px 80px rgba(0,0,0,.42),
    0 0 60px rgba(141,113,80,.08);
  animation: authPanelIn .55s var(--ease-out) both;
}

@keyframes authPanelIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-panel-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.75rem;
}

.auth-panel-brand-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -.04em;
}

.auth-panel-brand-badge {
  font-family: var(--font-display);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--admin-gold-lt);
  background: rgba(141,113,80,.15);
  border: 1px solid rgba(141,113,80,.3);
  padding: .25rem .65rem;
  border-radius: var(--r-full);
}

.auth-panel h1 {
  margin: 0 0 .5rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.04em;
  line-height: 1.15;
}

.auth-panel p {
  margin: 0 0 1.5rem;
  color: var(--admin-muted);
  font-size: .84rem;
  line-height: 1.65;
}

.google-btn {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  border-radius: var(--r-md);
  color: #fff;
  background: linear-gradient(135deg, rgba(0,45,86,.9), rgba(0,30,60,.95));
  border: 1px solid rgba(141,113,80,.35);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .92rem;
  cursor: pointer;
  transition: all .22s var(--ease);
  letter-spacing: -.01em;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

.google-btn:hover {
  background: linear-gradient(135deg, rgba(0,55,100,.9), rgba(141,113,80,.25));
  border-color: rgba(141,113,80,.6);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.32);
}

.google-btn:active { transform: scale(.97); }

.google-mark {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--admin-navy);
  font-weight: 900;
  font-family: Arial, sans-serif;
  font-size: .8rem;
  flex-shrink: 0;
}

.danger-btn {
  background: linear-gradient(135deg, rgba(185,28,28,.8), rgba(153,27,27,.9));
  border-color: rgba(239,68,68,.35);
}

.danger-btn:hover {
  background: linear-gradient(135deg, rgba(185,28,28,.95), rgba(153,27,27,.95));
  border-color: rgba(239,68,68,.6);
}

.inline-msg {
  display: none;
  margin-top: 10px;
  padding: .6rem .85rem;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-weight: 700;
}

.inline-msg.good {
  display: block;
  color: #86efac;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.22);
}

.inline-msg.bad {
  display: block;
  color: #fca5a5;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.22);
}

/* ══ DASHBOARD ══ */
.dashboard {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 14%, rgba(0,45,86,.22) 0%, transparent 38%),
    radial-gradient(circle at 82% 86%, rgba(141,113,80,.1) 0%, transparent 32%),
    var(--admin-bg);
  /* display intentionally left to admin.html auth gate */
  flex-direction: column;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 48px;
}

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-top: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 8px 20px;
  border: 1px solid rgba(141,113,80,.28);
  border-radius: var(--r-lg);
  background: rgba(8,20,40,.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0,0,0,.24);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.brand:hover {
  border-color: rgba(141,113,80,.5);
  box-shadow: 0 16px 40px rgba(0,0,0,.32), 0 0 0 1px rgba(141,113,80,.18);
  transform: translateY(-1px);
}

.userbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--admin-muted);
  font-size: .82rem;
  font-weight: 700;
}

.ghost-btn, .plain-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-sm);
  padding: 6px 14px;
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s var(--ease);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--admin-ink);
  background: rgba(255,255,255,.06);
  text-decoration: none;
}

.ghost-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }

.plain-btn {
  background: var(--admin-navy);
  border-color: rgba(0,45,86,.6);
}

.plain-btn:hover { background: rgba(0,55,100,.9); }

.danger-btn.ghost-btn,
.danger-btn.plain-btn {
  background: rgba(185,28,28,.2);
  border-color: rgba(239,68,68,.3);
  color: #fca5a5;
}

.danger-btn.ghost-btn:hover,
.danger-btn.plain-btn:hover {
  background: rgba(185,28,28,.35);
  border-color: rgba(239,68,68,.5);
}

/* ── Page Header ── */
.page-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--admin-border-gold);
  border-left: 5px solid var(--admin-gold);
  border-radius: var(--r-lg);
  background: var(--admin-panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 42px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.04) inset;
}

.page-head h1 {
  margin: 0 0 6px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.6rem,3vw,2.4rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1.1;
}

.lead {
  margin: 0;
  color: var(--admin-muted);
  font-size: .82rem;
  line-height: 1.65;
}

/* ── Status Strip ── */
.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat {
  min-height: 80px;
  padding: 1rem 1.1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-md);
  background: var(--admin-panel);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  transition: border-color .2s, transform .2s;
}

.stat:hover { border-color: var(--admin-border-gold); transform: translateY(-2px); }

.stat .k {
  color: var(--admin-muted);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  display: block;
  margin-bottom: 6px;
}

.stat .v {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
  font-family: var(--font-display);
  overflow-wrap: anywhere;
}

/* ══ STATUS LED INDICATORS ══ */
.status-led-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.status-led-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  transition: all .22s var(--ease);
}

.status-led-card:hover { border-color: var(--admin-border-gold); transform: translateY(-1px); }

.status-led-card[data-status="active"],
.status-led-card[data-status="online"],
.status-led-card[data-status="good"] { border-color: rgba(34,197,94,.22); }

.status-led-card[data-status="warn"],
.status-led-card[data-status="warning"],
.status-led-card[data-status="degraded"] { border-color: rgba(245,158,11,.22); }

.status-led-card[data-status="error"],
.status-led-card[data-status="offline"],
.status-led-card[data-status="inactive"] { border-color: rgba(239,68,68,.22); }

.status-led-card[data-status="resolved"] { border-color: rgba(16,185,129,.22); }

/* LED Orb */
.led-orb {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.led-orb-core,
.led-orb-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.led-orb-core {
  transform: scale(.7);
}

.led-orb-pulse {
  opacity: .5;
}

/* Active = green */
[data-status="active"] .led-orb-core,
[data-status="online"] .led-orb-core,
[data-status="good"] .led-orb-core { background: var(--status-on); box-shadow: 0 0 14px var(--status-on-glow); }

[data-status="active"] .led-orb-pulse,
[data-status="online"] .led-orb-pulse,
[data-status="good"] .led-orb-pulse { background: rgba(34,197,94,.38); animation: led-pulse 2s ease-in-out infinite; }

/* Warn = amber */
[data-status="warn"] .led-orb-core,
[data-status="warning"] .led-orb-core,
[data-status="degraded"] .led-orb-core { background: var(--status-warn); box-shadow: 0 0 12px var(--status-warn-glow); }

[data-status="warn"] .led-orb-pulse,
[data-status="warning"] .led-orb-pulse { background: rgba(245,158,11,.35); animation: led-pulse 1.2s ease-in-out infinite; }

/* Error = red */
[data-status="error"] .led-orb-core,
[data-status="offline"] .led-orb-core,
[data-status="inactive"] .led-orb-core { background: var(--status-off); box-shadow: 0 0 12px var(--status-off-glow); }

/* Resolved = teal */
[data-status="resolved"] .led-orb-core { background: var(--status-resolved); box-shadow: 0 0 12px var(--status-resolved-glow); }

/* Info = blue */
[data-status="info"] .led-orb-core,
[data-status="unknown"] .led-orb-core { background: var(--status-info); box-shadow: 0 0 10px rgba(56,189,248,.24); }

@keyframes led-pulse {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(2.2); opacity: 0; }
}

.led-info { flex: 1; min-width: 0; }

.led-name {
  font-size: .8rem;
  font-weight: 800;
  color: var(--admin-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-display);
}

.led-status {
  font-size: .68rem;
  font-weight: 700;
  color: var(--admin-muted);
  margin-top: 1px;
}

[data-status="active"] .led-status,
[data-status="online"] .led-status,
[data-status="good"] .led-status { color: #86efac; }

[data-status="warn"] .led-status,
[data-status="warning"] .led-status { color: #fde68a; }

[data-status="error"] .led-status,
[data-status="offline"] .led-status { color: #fca5a5; }

[data-status="resolved"] .led-status { color: #6ee7b7; }

.led-reason {
  font-size: .64rem;
  color: rgba(253,230,138,.72);
  margin-top: 2px;
  line-height: 1.45;
}

/* ══ LAYOUT ══ */
.ops-band {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: .9rem 1.25rem;
  border: 1px solid rgba(141,113,80,.2);
  border-radius: var(--r-md);
  background: rgba(141,113,80,.07);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.ops-band strong {
  color: var(--admin-gold-lt);
  font-size: .85rem;
  font-weight: 900;
  font-family: var(--font-display);
}

.ops-band span {
  color: var(--admin-muted);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.5;
}

.layout {
  display: grid;
  grid-template-columns: 228px minmax(0,1fr);
  gap: 14px;
  align-items: start;
}

/* ── Sidebar ── */
.side {
  position: sticky;
  top: 16px;
  padding: 8px;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-lg);
  background: var(--admin-panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0,0,0,.2);
}

.tab-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--admin-muted);
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: all .18s var(--ease);
}

.tab-btn span:last-child {
  color: rgba(255,255,255,.22);
  font-size: .68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tab-btn:hover {
  background: rgba(255,255,255,.05);
  border-color: var(--admin-border);
  color: var(--admin-ink);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0,45,86,.8), rgba(141,113,80,.15));
  border-color: rgba(141,113,80,.35);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

.tab-btn.active span:last-child { color: rgba(201,168,122,.72); }

/* ── Panels ── */
.panel { display: none; }
.panel.active { display: block; }

/* ── Cards ── */
.card {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-top: 2px solid rgba(141,113,80,.45);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
  min-width: 0;
}

.card h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.card h2::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--admin-gold), rgba(141,113,80,.4));
  flex-shrink: 0;
}

.card h3 {
  margin: 0 0 .65rem;
  color: var(--admin-ink);
  font-size: .84rem;
  font-weight: 900;
  font-family: var(--font-display);
}

.card.full { grid-column: 1 / -1; }
.card.wide { grid-column: span 6; }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 14px;
}

/* ── Data Rows ── */
.rows { display: grid; gap: 6px; }

.row {
  display: grid;
  grid-template-columns: minmax(110px, .55fr) minmax(0,1fr);
  gap: 10px;
  align-items: start;
  font-size: .8rem;
  line-height: 1.5;
  padding: .3rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

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

.key {
  color: var(--admin-muted);
  font-weight: 800;
  font-size: .74rem;
}

.value {
  color: var(--admin-ink);
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

code {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  padding: 1px 7px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: #93c5fd;
}

.note {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--admin-border);
  color: var(--admin-muted);
  font-size: .74rem;
  line-height: 1.6;
}

/* ══ BADGE ══ */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge.good {
  color: #86efac;
  background: rgba(34,197,94,.1);
  border-color: rgba(34,197,94,.22);
}

.badge.warn {
  color: #fde68a;
  background: rgba(245,158,11,.1);
  border-color: rgba(245,158,11,.22);
}

.badge.bad {
  color: #fca5a5;
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.22);
}

.badge.blue {
  color: #93c5fd;
  background: rgba(56,189,248,.08);
  border-color: rgba(56,189,248,.2);
}

.badge.resolved {
  color: #6ee7b7;
  background: rgba(16,185,129,.1);
  border-color: rgba(16,185,129,.25);
}

/* ══ LIST / ITEMS ══ */
.list {
  display: grid;
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(141,113,80,.3) transparent;
}

.item {
  padding: .85rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-md);
  background: var(--admin-surface);
  min-width: 0;
  transition: border-color .18s;
}

.item:hover { border-color: var(--admin-border-gold); }

.item-title {
  margin: 0 0 3px;
  color: var(--admin-ink);
  font-size: .82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  flex-wrap: wrap;
}

.item-meta {
  margin: 0;
  color: var(--admin-muted);
  font-size: .72rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.item-date {
  font-size: .64rem;
  color: rgba(201,168,122,.65);
  font-family: var(--font-mono);
  font-weight: 600;
  margin-top: 3px;
}

/* Resolved item styling */
.item.is-resolved {
  border-color: rgba(16,185,129,.22);
  background: rgba(16,185,129,.04);
}

.item.is-error {
  border-color: rgba(239,68,68,.2);
  background: rgba(239,68,68,.04);
}

.item.is-warn {
  border-color: rgba(245,158,11,.2);
  background: rgba(245,158,11,.04);
}

/* ══ REPORTS PANEL ══ */
.split {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(280px,.7fr);
  gap: 14px;
  align-items: start;
}

.report-body {
  display: grid;
  gap: 10px;
}

.report-body ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--admin-ink);
  font-size: .8rem;
  line-height: 1.72;
}

.report-body ul li { margin-bottom: 3px; }

.report-item-btn {
  width: 100%;
  text-align: left;
  padding: .88rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-md);
  background: var(--admin-surface);
  color: var(--admin-ink);
  cursor: pointer;
  transition: all .18s var(--ease);
  border-left: 3px solid var(--admin-gold);
  font-family: var(--font-ui);
}

.report-item-btn:hover { border-color: rgba(141,113,80,.5); background: var(--admin-surface-2); }
.report-item-btn.active {
  border-color: rgba(141,113,80,.6);
  background: rgba(141,113,80,.08);
  border-left-color: var(--admin-gold-lt);
}

.report-item-title {
  font-size: .82rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
  font-family: var(--font-display);
}

.report-item-meta {
  font-size: .7rem;
  color: var(--admin-muted);
}

/* ══ TERMINAL ══ */
.terminal-card {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
  background: #050d1a;
  border-color: rgba(8,13,20,.8);
  border-top-color: #38bdf8;
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: .9rem 1.25rem;
  background: #080d14;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.terminal-head h2 { margin: 0; color: #e5edf6; font-size: .88rem; }
.terminal-head h2::before { display: none; }

.terminal-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.terminal-btn {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 7px;
  color: #dbeafe;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s;
}

.terminal-btn:hover { background: rgba(255,255,255,.12); }
.terminal-btn:disabled { opacity: .4; cursor: not-allowed; }

.terminal-status {
  padding: 6px 1.25rem;
  background: #0a1526;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: #94a3b8;
  font-size: .72rem;
  font-weight: 700;
}

.terminal-status.err { color: #fca5a5; }

.semantic-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 1.25rem;
  background: #080d14;
  border-bottom: 1px solid rgba(148,163,184,.14);
  font-size: .68rem;
}

.semantic-legend .terminal-line {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  margin: 0;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 6px;
  background: rgba(15,23,42,.88);
  font-weight: 800;
}

.terminal-log {
  height: min(52vh, 480px);
  min-height: 280px;
  padding: 1rem 1.25rem;
  overflow-y: auto;
  color: #d1fae5;
  background: #050d1a;
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: rgba(56,189,248,.2) transparent;
}

.terminal-line { margin: 0 0 1px; }
.terminal-line.out { color: #cbd5e1; }
.terminal-line.err { color: #fca5a5; }
.terminal-line.cmd { color: #93c5fd; }
.terminal-line.sys { color: #67e8f9; }
.terminal-line.join { color: #86efac; }
.terminal-line.leave { color: #86efac; opacity: .7; }
.terminal-line.rcon { color: #93c5fd; }
.terminal-line.warn { color: #fde68a; }
.terminal-line.error { color: #fca5a5; }
.terminal-line.scanner { color: #d8b4fe; }
.terminal-line.notice { color: #67e8f9; }

.rcon-guard {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: .9rem 1.25rem;
  background: rgba(181,71,8,.06);
  border-top: 1px solid rgba(181,71,8,.2);
}

.rcon-guard p {
  margin: 0;
  color: rgba(253,186,116,.82);
  font-size: .78rem;
  line-height: 1.6;
  font-weight: 700;
}

.rcon-guard h2 {
  margin: 0 0 4px;
  font-size: .88rem;
  color: rgba(253,186,116,.9);
}

.rcon-guard h2::before { display: none; }

.rcon-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--admin-ink);
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
}

.rcon-switch input { width: 18px; min-height: 18px; cursor: pointer; }

.terminal-input {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  padding: .9rem 1.25rem;
  background: #08121e;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #dbeafe;
  font-family: var(--font-mono);
}

.web-command-console {
  padding: 1rem 1.25rem;
  background: #08121e;
  border-top: 1px solid rgba(255,255,255,.06);
}

.web-command-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.web-command-console-head strong {
  color: var(--admin-ink);
  font-size: .82rem;
  font-weight: 900;
}

.web-command-input-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 160px auto auto auto;
  gap: 8px;
  align-items: stretch;
}

.web-command-input-row input,
.terminal-input input {
  min-height: 38px;
  padding: 7px 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-sm);
  color: #e5edf6;
  font-family: var(--font-mono);
  font-size: .8rem;
  outline: none;
}

.web-command-input-row input:focus,
.terminal-input input:focus {
  border-color: rgba(141,113,80,.5);
  box-shadow: 0 0 0 3px rgba(141,113,80,.1);
}

.web-command-input-row input::placeholder { color: rgba(148,163,184,.5); }

.web-command-input-row button { min-height: 38px; }

.web-command-input-row .plain-btn {
  background: #2563eb;
  border-color: rgba(37,99,235,.6);
}

/* ══ FORMS ══ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}

.field { display: grid; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }

label {
  color: var(--admin-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

input[type="text"],
input[type="url"],
input[type="date"],
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  color: var(--admin-ink);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--admin-border);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  font-size: .84rem;
  outline: none;
  transition: border-color .18s;
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(141,113,80,.6);
  box-shadow: 0 0 0 3px rgba(141,113,80,.1);
}

input::placeholder, textarea::placeholder { color: rgba(148,163,184,.45); }

textarea { min-height: 110px; resize: vertical; }

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ══ SERVICE TABLE ══ */
#service-table-wrap { width: 100%; overflow-x: auto; }

.service-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}

.service-table th,
.service-table td {
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--admin-border);
  text-align: left;
  vertical-align: top;
}

.service-table th {
  color: var(--admin-muted);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(255,255,255,.02);
}

.service-table tr:hover td { background: rgba(255,255,255,.02); }

/* Service status indicator in table */
.service-status-cell {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.service-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.service-led.is-on { background: var(--status-on); box-shadow: 0 0 8px var(--status-on-glow); animation: led-pulse 2.5s ease-in-out infinite; }
.service-led.is-warn { background: var(--status-warn); box-shadow: 0 0 8px var(--status-warn-glow); animation: led-pulse 1s ease-in-out infinite; }
.service-led.is-off { background: var(--status-off); box-shadow: 0 0 8px var(--status-off-glow); }
.service-led.is-info { background: var(--status-info); }

/* ══ MEDIA / GALLERY ══ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}

.media-slot {
  position: relative;
  min-height: 140px;
  overflow: hidden;
  border: 1px dashed rgba(141,113,80,.3);
  border-radius: var(--r-md);
  background: var(--admin-surface);
  transition: border-color .18s;
}

.media-slot:hover { border-color: rgba(141,113,80,.55); }

.media-slot img { width: 100%; height: 140px; display: block; object-fit: cover; }

.media-empty {
  height: 140px;
  display: grid;
  place-items: center;
  color: var(--admin-muted);
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  padding: 12px;
}

.media-actions {
  position: absolute;
  inset: auto 6px 6px 6px;
  display: flex;
  gap: 5px;
  justify-content: center;
}

/* ══ SECURITY TAB (Redesigned) ══ */
#panel-security .panel-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
}

.security-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.security-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
  padding: 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-md);
  background: var(--admin-surface);
  transition: border-color .18s, transform .18s;
}

.security-stat:hover { border-color: var(--admin-border-gold); transform: translateY(-2px); }

.security-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: .3rem;
}

.security-stat-label {
  font-size: .64rem;
  font-weight: 800;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.security-stat-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: .95rem;
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1.2;
}

/* Auth boundary cards */
.auth-boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}

.auth-boundary-card {
  padding: .9rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-md);
  background: var(--admin-surface);
  transition: border-color .18s;
}

.auth-boundary-card:hover { border-color: var(--admin-border-gold); }

.auth-boundary-title {
  font-size: .72rem;
  font-weight: 800;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .55rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.auth-boundary-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .88rem;
  color: var(--admin-ink);
  word-break: break-all;
}

/* Receipt / ops audit */
.receipt-grid {
  display: grid;
  gap: 8px;
}

.receipt-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: .65rem;
  align-items: flex-start;
  padding: .85rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-md);
  background: var(--admin-surface);
}

.receipt-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.receipt-title {
  font-size: .8rem;
  font-weight: 800;
  color: var(--admin-ink);
  font-family: var(--font-display);
  margin-bottom: 2px;
}

.receipt-meta {
  font-size: .7rem;
  color: var(--admin-muted);
  line-height: 1.5;
}

/* ══ TOAST ══ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translate(-50%, 16px);
  min-width: 200px;
  max-width: min(500px, calc(100% - 32px));
  padding: .65rem 1.25rem;
  border-radius: var(--r-full);
  color: #fff;
  background: rgba(0,30,62,.96);
  border: 1px solid rgba(141,113,80,.35);
  box-shadow: 0 18px 48px rgba(0,0,0,.32);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  font-size: .8rem;
  font-weight: 800;
  font-family: var(--font-display);
  transition: opacity .22s, transform .22s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ══ QUICK LINKS ══ */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
}

.quick-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: .65rem .9rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-md);
  color: var(--admin-ink);
  background: var(--admin-surface);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 800;
  transition: all .18s;
}

.quick-link:hover {
  border-color: var(--admin-border-gold);
  background: var(--admin-surface-2);
  transform: translateY(-2px);
}

.quick-link small {
  color: var(--admin-muted);
  font-size: .64rem;
  font-weight: 700;
}

/* ══ SKIP LINK ══ */
.skip-link {
  position: absolute;
  left: -999px; top: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--admin-navy);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-weight: 700;
}

.skip-link:focus { left: 12px; }

/* ══ RESPONSIVE ══ */
@media (max-width: 1100px) {
  .layout, .split { grid-template-columns: 1fr; }
  .side { position: static; }
  .status-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .quick-links { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card, .card.wide { grid-column: span 6; }
  #panel-security .panel-grid { grid-template-columns: 1fr; }
  .security-overview { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .auth-boundary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 1480px); padding-top: 18px; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .userbar { width: 100%; justify-content: flex-start; }
  .status-strip, .form-grid, .media-grid, .quick-links, .security-overview { grid-template-columns: 1fr; }
  .card, .card.wide { grid-column: 1 / -1; }
  .row { grid-template-columns: 1fr; gap: 2px; }
  .terminal-input, .web-command-input-row { grid-template-columns: 1fr; }
  .status-led-grid { grid-template-columns: 1fr; }
  .auth-boundary-grid { grid-template-columns: 1fr; }
}

/* ══ ANIMATIONS ══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp .35s var(--ease-out) both; }

/* Loading state */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  color: var(--admin-muted);
  font-size: .82rem;
  gap: .5rem;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--admin-border);
  border-top-color: var(--admin-gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

/* muted helper */
.muted { color: var(--admin-muted); }

/* Material Symbols */
.msym {
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;
  font-style: normal; line-height: 1;
  display: inline-block; vertical-align: middle;
}
.msym-xs { font-size: .75rem; }
.msym-sm { font-size: .9rem; }
.msym-md { font-size: 1.1rem; }
.msym-lg { font-size: 1.3rem; }

/* Web command rows in dark context */
.web-command-console .rows { margin-top: 8px; }
.web-command-console .row {
  background: rgba(255,255,255,.02);
  border-radius: 6px;
  padding: .28rem .5rem;
  border-bottom: none;
}
.web-command-console .key { color: #93c5fd; }
.web-command-console .value { color: #e5edf6; }
.web-command-console code { color: #f0f9ff; background: rgba(15,23,42,.88); }

/* Page heads */
#updated-at { font-size: .72rem; color: var(--admin-muted); text-align: right; }

/* Phase 6/7 cards use body background */
.card#admin-revamp-cockpit .status-strip { margin-top: 0; }

/* Cockpit stats in overview */
#admin-revamp-cockpit-rows .stat .v { font-size: .88rem; }
