:root {
  --bg: #030504;
  --panel: #09140d;
  --panel-raised: #0c1811;
  --panel-deep: #071009;
  --line: #173222;
  --line-strong: #245235;
  --text: #e8ffeb;
  --muted: #89af93;
  --green: #69ff90;
  --danger: #ff7d7d;
  --warning: #ffd56a;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background:
  radial-gradient(circle at top left, rgba(33, 73, 45, 0.16), transparent 28%),
  radial-gradient(circle at top right, rgba(105, 255, 144, 0.06), transparent 24%),
  linear-gradient(180deg, #030504 0%, #050906 100%);
  color: var(--text); font-family: Consolas, "Courier New", monospace; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
body { width: 100%; overflow-x: hidden; }
.shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; width: 100%; max-width: 100vw; }
.auth-locked .shell { display: block; }
.auth-locked .sidebar,
.auth-locked .topbar,
.auth-locked .panel-content { display: none !important; }
.auth-locked .main { min-height: 100vh; padding: 0; display: grid; place-items: center; }
.sidebar { border-right: 1px solid var(--line); background:
  linear-gradient(180deg, rgba(6, 12, 8, 0.98), rgba(4, 10, 7, 0.98));
  padding: 28px 20px; display: flex; flex-direction: column; gap: 24px; min-width: 0; position: relative; }
.sidebar::after { content: ""; position: absolute; inset: 16px 12px 16px auto; width: 1px; background: linear-gradient(180deg, transparent, rgba(105,255,144,.2), transparent); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--green); font-weight: 700; background:
  radial-gradient(circle at top, rgba(105,255,144,.15), transparent 55%),
  #08140b; box-shadow: inset 0 0 0 1px rgba(105,255,144,.04); }
.eyebrow { color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.brand-title { font-size: 22px; font-weight: 700; }
.nav { display: grid; gap: 8px; }
.nav-link { width: 100%; text-align: left; background: transparent; color: var(--muted); border: 1px solid transparent; padding: 12px 14px; border-radius: 14px; font-weight: 700; letter-spacing: .01em; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); border-color: var(--line); background: linear-gradient(180deg, #0a140d, #08100a); transform: translateX(2px); box-shadow: inset 0 0 0 1px rgba(105,255,144,.03); }
.sidebar-foot { margin-top: auto; border: 1px solid var(--line); border-radius: 18px; padding: 16px; background:
  linear-gradient(180deg, rgba(8, 17, 11, 0.98), rgba(6, 13, 9, 0.98)); }
.mini-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-top: 10px; }
.mini-label:first-child { margin-top: 0; }
.mini-value { font-size: 13px; color: var(--text); margin-top: 2px; }
.main { padding: 28px; min-width: 0; width: 100%; background:
  radial-gradient(circle at top center, rgba(105,255,144,.04), transparent 26%),
  linear-gradient(180deg, rgba(4, 8, 6, 0.25), transparent 32%); }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, rgba(10,18,13,.92), rgba(6,12,8,.92)); box-shadow: inset 0 0 0 1px rgba(105,255,144,.03); }
.topbar h1 { margin: 6px 0 0; font-size: clamp(28px, 4vw, 46px); line-height: 1; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.operator-badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, #0b1710, #08110b); color: var(--green); padding: 12px 14px; border-radius: 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; box-shadow: inset 0 0 0 1px rgba(105,255,144,.04); overflow-wrap: anywhere; }
.operator-badge strong { color: var(--text); font-size: 13px; letter-spacing: 0; text-transform: none; }
.ghost-button { border: 1px solid var(--line); background: linear-gradient(180deg, #09120c, #071009); color: var(--text); padding: 12px 16px; border-radius: 14px; transition: border-color .18s ease, transform .18s ease; }
.ghost-button:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.ghost-button.danger { color: var(--danger); }
.token-gate { display: grid; place-items: center; min-height: calc(100vh - 140px); width: 100%; }
.auth-locked .token-gate { min-height: 100vh; padding: 28px; }
.gate-card { width: min(520px, calc(100vw - 32px)); background:
  linear-gradient(180deg, rgba(9, 20, 13, 0.98), rgba(6, 13, 9, 0.98)); border: 1px solid var(--line-strong); border-radius: 28px; padding: 28px; box-shadow: inset 0 0 0 1px rgba(105,255,144,.04), 0 24px 80px rgba(0,0,0,.42); }
.gate-kicker { color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; margin-bottom: 10px; }
.gate-card h2 { margin: 0 0 18px; font-size: 36px; }
.gate-card p { color: var(--muted); margin: 0 0 18px; }
.gate-actions { display: grid; gap: 12px; margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gate-actions.compact .ghost-button { width: 100%; }
.gate-action { width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: #071109; color: var(--text); padding: 16px 18px; display: grid; gap: 6px; }
.gate-action strong { font-size: 20px; }
.gate-action span:last-child { color: var(--muted); font-size: 13px; line-height: 1.45; }
.gate-action-kicker { color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.gate-action.primary { border-color: var(--line-strong); background: #09150d; }
.gate-action.danger { border-color: #4e2f2f; }
.gate-action:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.78); display: grid; place-items: center; padding: 24px; z-index: 30; }
.gate-modal-shell { width: min(520px, 100%); background: linear-gradient(180deg, #071109, #050d08); border: 1px solid var(--line-strong); border-radius: 24px; padding: 24px; box-shadow: 0 18px 60px rgba(0,0,0,.45); }
.gate-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.gate-modal-head h3 { margin: 0; font-size: 28px; }
.modal-close { width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: #08120b; color: var(--text); font-size: 24px; line-height: 1; }
.token-form { display: grid; gap: 12px; }
.token-form input, .stack-form input, .stack-form select, .stack-form textarea, .config-grid input, .config-grid select, .config-grid textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #050c08; color: var(--text); padding: 13px 14px; outline: none; }
.token-form input:focus, .stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus, .config-grid input:focus, .config-grid select:focus, .config-grid textarea:focus { border-color: var(--line-strong); }
.token-form button, .stack-form button, .config-grid button { border: 1px solid var(--line-strong); border-radius: 14px; background: var(--green); color: #031108; padding: 13px 16px; font-weight: 700; }
.hidden { display: none !important; }
.error-text { color: var(--danger); margin-top: 12px; }
.panel-content { display: grid; gap: 18px; min-width: 0; width: 100%; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card, .panel-card { background: linear-gradient(180deg, var(--panel-raised), var(--panel)); border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: inset 0 0 0 1px rgba(105,255,144,.03), 0 14px 38px rgba(0,0,0,.18); }
.metric-label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.metric-value { margin-top: 8px; font-size: 34px; font-weight: 700; }
.metric-meta { margin-top: 8px; color: var(--muted); font-size: 12px; }
.view { display: none; }
.view.active { display: block; }
.overview-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; min-width: 0; }
.overview-hero { grid-column: 1 / -1; padding: 24px 24px 22px; background:
  radial-gradient(circle at top right, rgba(105,255,144,.08), transparent 22%),
  linear-gradient(180deg, rgba(11, 23, 14, 0.98), rgba(7, 16, 10, 0.98)); position: relative; overflow: hidden; }
.overview-hero::after { content: ""; position: absolute; inset: auto -60px -90px auto; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(105,255,144,.08), transparent 70%); pointer-events: none; }
.overview-hero-copy { max-width: 780px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.overview-highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.overview-highlight { padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, #06100a, #07110b); }
.overview-highlight-label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.overview-highlight-value { margin-top: 8px; font-size: 20px; font-weight: 700; color: var(--text); }
.overview-highlight-meta { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.overview-card { grid-column: span 4; min-height: 290px; }
.section-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; min-width: 0; align-items: start; }
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.span-12 { grid-column: span 12; }
.access-layout { display: grid; gap: 18px; min-width: 0; }
.access-operators-card { min-width: 0; }
.access-side-grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); gap: 18px; min-width: 0; }
.access-form-card { min-width: 0; align-self: start; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(27,52,36,.72); }
.section-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.section-head h2 { margin: 4px 0 0; font-size: 24px; }
.inline-summary { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.summary-chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: #08120c; color: var(--text); }
.table-shell { overflow: auto; border: 1px solid var(--line); border-radius: 18px; min-width: 0; width: 100%; background: var(--panel-deep); box-shadow: inset 0 0 0 1px rgba(105,255,144,.025); }
.wide-table-shell { overflow-x: auto; overflow-y: visible; }
.compact-table-shell { max-height: 360px; }
table.panel-table { width: 100%; border-collapse: collapse; }
.panel-table th, .panel-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.panel-table th { color: var(--green); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.panel-table tr:last-child td { border-bottom: 0; }
.panel-table th:last-child, .panel-table td:last-child { width: 1%; white-space: nowrap; }
.panel-table td .actions { min-width: 240px; }
.table-subline { color: var(--muted); font-size: 12px; margin-top: 4px; }
.identity-list { display: flex; flex-wrap: wrap; gap: 8px; }
.identity-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #07110a; color: var(--text); font-size: 12px; }
.identity-tag button { border: 0; background: transparent; color: var(--danger); padding: 0; font-size: 12px; line-height: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--green); font-size: 12px; white-space: nowrap; }
.pill.warn { color: var(--warning); border-color: #5c4d20; }
.pill.off { color: var(--muted); border-color: var(--line); }
.stack-form { display: grid; gap: 12px; }
.toggle { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.config-grid .full { grid-column: 1 / -1; }
.status-stack { display: grid; gap: 10px; }
.status-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, #06100a, #07110b); }
.status-key { color: var(--muted); }
.status-value { color: var(--text); text-align: right; }
.release-list { display: grid; gap: 12px; }
.release-item { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: linear-gradient(180deg, #06100a, #07110b); }
.release-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.release-top strong { font-size: 18px; }
.release-item p { margin: 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.action-stack { display: grid; gap: 8px; min-width: 260px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-button { border: 1px solid var(--line); background: linear-gradient(180deg, #0b1510, #09120d); color: var(--text); padding: 8px 10px; border-radius: 12px; font-size: 12px; white-space: nowrap; }
.mini-button.warn { color: var(--warning); }
.mini-button.danger { color: var(--danger); }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-strong); background: #08140b; color: var(--text); }
@media (max-width: 1280px) { .access-side-grid { grid-template-columns: 1fr; } }
@media (max-width: 1080px) { .shell { grid-template-columns: 1fr; } .sidebar { border-right: 0; border-bottom: 1px solid var(--line); } .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .overview-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); } .overview-card { grid-column: span 6; min-height: auto; } .span-8, .span-4 { grid-column: span 12; } .config-grid { grid-template-columns: 1fr; } }
@media (max-width: 840px) { .topbar { flex-direction: column; padding: 16px; } .top-actions { width: 100%; justify-content: flex-start; } .panel-table th:last-child, .panel-table td:last-child { width: auto; white-space: normal; } .panel-table td .actions { min-width: 0; } }
@media (max-width: 720px) { .main { padding: 18px; } .metrics { grid-template-columns: 1fr; } .overview-highlights { grid-template-columns: 1fr; } .overview-card { grid-column: span 12; } .gate-actions { grid-template-columns: 1fr; } .topbar h1 { font-size: 34px; } }
