:root {
  color-scheme: dark;
  --void: #030706;
  --void-2: #050c09;
  --surface: #08120e;
  --surface-2: #0c1914;
  --surface-3: #10231c;
  --line: #193d30;
  --line-hot: #2a6b51;
  --text: #e9f8ed;
  --muted: #789887;
  --acid: #22f28a;
  --cyan: #1bd8d1;
  --amber: #ffb51b;
  --danger: #ff5470;
  --acid-dark: #0b3a25;
  --amber-dark: #3a2a08;
  --danger-dark: #35131b;
  --display: "Bahnschrift Condensed", "Arial Narrow", Impact, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "Fira Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(115deg, transparent 0 68%, rgb(34 242 138 / 2%) 68% 69%, transparent 69%),
    linear-gradient(rgb(34 242 138 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(34 242 138 / 3%) 1px, transparent 1px),
    var(--void);
  background-size: auto, 48px 48px, 48px 48px, auto;
  font: 14px/1.45 var(--mono);
}

body::after {
  content: "";
  position: fixed;
  z-index: 9999;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background: repeating-linear-gradient(0deg, transparent 0 4px, #000 4px 5px);
}

::selection { color: #00170b; background: var(--acid); }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; }
form { margin: 0; }
code { font-family: var(--mono); }

.lucide-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  overflow: visible;
  vertical-align: -.14em;
}

.section-code .lucide-icon { width: 14px; height: 14px; }

.shell-nav {
  position: fixed;
  z-index: 100;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 226px;
  padding: 22px 18px 18px;
  border-right: 1px solid var(--line);
  background: rgb(3 8 6 / 96%);
  box-shadow: 10px 0 40px rgb(0 0 0 / 48%);
}

.shell-nav::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 116px;
  width: 3px;
  height: 88px;
  background: linear-gradient(var(--acid), var(--cyan));
  box-shadow: 0 0 20px var(--acid);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 64px;
  overflow: hidden;
  border: 1px solid var(--line-hot);
  background: #06120d;
  clip-path: polygon(4% 23%, 23% 0, 39% 19%, 61% 19%, 77% 0, 96% 23%, 100% 100%, 0 100%);
}

.brand-mark img { width: 68px; height: 68px; object-fit: contain; transform: translateY(4px); }
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { color: var(--acid); font: 34px/.9 var(--display); letter-spacing: .04em; }
.brand-copy small { margin-top: 8px; color: var(--muted); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }

.primary-nav { display: grid; gap: 2px; margin-top: 58px; }
.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 68px;
  padding: 10px 8px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-top: 1px solid var(--line-hot);
  border-right: 1px solid var(--line-hot);
  opacity: 0;
}

.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); border-color: var(--line); background: linear-gradient(90deg, var(--surface-3), transparent); }
.nav-link.active::before { content: ""; position: absolute; left: -18px; width: 5px; height: 34px; background: var(--amber); box-shadow: 0 0 15px rgb(255 181 27 / 45%); }
.nav-link.active::after { opacity: 1; }
.nav-index { display: grid; place-items: center; color: var(--amber); font: 18px/1 var(--display); }
.nav-index .lucide-icon { width: 21px; height: 21px; }
.nav-link b { display: block; font: 20px/1 var(--display); text-transform: uppercase; }
.nav-link small { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }

.shell-foot { display: grid; gap: 12px; margin-top: auto; }
.node-signal { display: grid; grid-template-columns: 10px 1fr; gap: 1px 8px; margin: 0; padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.node-signal i { grid-row: 1/3; align-self: center; width: 8px; height: 8px; background: var(--acid); box-shadow: 0 0 14px var(--acid); transform: rotate(45deg); }
.node-signal span { color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.node-signal b { color: var(--acid); font-size: 10px; }
.nav-logout { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px; border: 1px solid #3e1f27; background: transparent; color: #b98490; text-align: left; cursor: pointer; }
.nav-logout .lucide-icon { width: 17px; height: 17px; color: var(--danger); }
.nav-logout span { display: inline-block; margin-right: 7px; color: var(--danger); font-size: 17px; }
.nav-logout:hover { color: var(--danger); border-color: var(--danger); }

.shell-main {
  position: relative;
  width: calc(100% - 226px);
  min-height: 100vh;
  margin-left: 226px;
  padding: 42px clamp(24px, 4vw, 66px) 80px;
  overflow: hidden;
}

.shell-main::before {
  content: "CICIG";
  position: fixed;
  z-index: -1;
  right: -25px;
  bottom: -45px;
  color: rgb(34 242 138 / 2.5%);
  font: 240px/.8 var(--display);
  letter-spacing: -.04em;
}

.page-coordinate { position: absolute; top: 15px; right: 22px; color: #315e4a; font-size: 8px; letter-spacing: .15em; }
.section-code { margin-bottom: 8px; color: var(--muted); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.section-code span { color: var(--amber); }
.title-block h1, .system-head h1, .dossier-head h1 {
  margin-bottom: 7px;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: .82;
  letter-spacing: -.035em;
}
.title-block h1 em, .system-head h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1px var(--acid); }
.title-block > p:last-child, .system-head .title-block > p:last-child { margin: 0; color: var(--muted); }

button, .primary-action, .secondary-action, .danger-action {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .055em;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 20px;
  color: #151000;
  background: var(--amber);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: transform .15s ease, box-shadow .15s ease;
}
.primary-action span { font-size: 20px; line-height: 0; }
.primary-action:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--cyan); }
.primary-action:disabled { opacity: .5; cursor: wait; transform: none; box-shadow: none; }
.secondary-action { min-height: 40px; padding: 10px 14px; border: 1px solid var(--line-hot); background: var(--surface); color: var(--acid); }
.secondary-action:hover { border-color: var(--acid); background: var(--acid-dark); }
.danger-action { min-height: 40px; padding: 10px 14px; border: 1px solid #693041; background: var(--danger-dark); color: var(--danger); }
.danger-action:hover { border-color: var(--danger); }
.secondary-action, .danger-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.primary-action .lucide-icon, .secondary-action .lucide-icon, .danger-action .lucide-icon { width: 16px; height: 16px; }
.wide { width: 100%; }

input, select {
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: var(--void-2);
  color: var(--text);
  padding: 10px 12px;
}
input:focus, select:focus { border-color: var(--acid); box-shadow: inset 3px 0 var(--acid); }
input::placeholder { color: #486457; }
label { display: grid; gap: 7px; color: var(--muted); }
label > span { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

.notice { margin: 0 0 18px; padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid var(--cyan); background: var(--surface); }
.notice.success { border-left-color: var(--acid); color: var(--acid); }
.notice.error { border-left-color: var(--danger); color: #ff92a4; }

/* Access vault */
.vault-head {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto auto;
  align-items: end;
  gap: 34px;
  max-width: 1500px;
  margin: 14px auto 28px;
}
.readout-grid { display: grid; grid-template-columns: repeat(3, 92px); border: 1px solid var(--line); background: var(--surface); }
.readout-grid article { position: relative; display: grid; min-height: 88px; padding: 12px; border-right: 1px solid var(--line); }
.readout-grid article:last-child { border: 0; }
.readout-grid small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.readout-grid strong { align-self: end; color: var(--acid); font: 34px/.8 var(--display); }
.readout-grid i { position: absolute; right: 7px; bottom: 7px; color: #355d4b; font-size: 7px; font-style: normal; }

.filter-console { max-width: 1500px; margin: 0 auto 18px; border: 1px solid var(--line); background: rgb(5 12 9 / 88%); box-shadow: 7px 7px 0 #020403; }
.search-line { display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto auto; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.search-field { position: relative; display: block; }
.search-field > span { position: absolute; left: 13px; top: 10px; color: var(--acid); font-size: 20px; }
.search-field > span .lucide-icon { width: 17px; height: 17px; }
.search-field input { width: 100%; padding-left: 42px; }
.search-button { display: inline-flex; align-items: center; gap: 7px; padding: 0 18px; background: var(--acid); color: #00180b; }
.search-button .lucide-icon { width: 14px; height: 14px; }
.search-button:hover { background: var(--cyan); }
.reset { align-self: center; display: inline-flex; align-items: center; gap: 5px; padding: 9px; color: var(--muted); font-size: 10px; text-decoration: none; text-transform: uppercase; }
.reset .lucide-icon { width: 13px; height: 13px; }
.reset:hover { color: var(--text); }
.filter-line { display: flex; align-items: center; gap: 5px; min-height: 38px; padding: 5px 10px; border-bottom: 1px solid #102a20; }
.filter-line:last-child { border: 0; }
.filter-label { flex: 0 0 74px; color: var(--amber); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.filter-token { padding: 5px 8px; border: 1px solid transparent; color: var(--muted); font-size: 10px; text-decoration: none; }
.filter-token b { margin-left: 4px; color: #476758; }
.filter-token:hover { color: var(--text); border-color: var(--line); }
.filter-token.selected { border-color: var(--acid); background: var(--acid-dark); color: var(--acid); }
.filter-token.selected b { color: var(--acid); }

.tunnel-stack { display: grid; gap: 18px; max-width: 1500px; margin: auto; }
.tunnel-ledger { position: relative; border: 1px solid var(--line); border-left: 4px solid var(--cyan); background: rgb(6 14 10 / 93%); box-shadow: 8px 8px 0 #020403; }
.tunnel-ledger.awg { border-left-color: var(--amber); }
.tunnel-ledger::after { content: ""; position: absolute; top: -1px; right: -1px; width: 20px; height: 20px; background: linear-gradient(225deg, var(--void) 48%, var(--line) 50%, var(--line) 53%, transparent 55%); }
.protocol-head { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 26px; min-height: 78px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--surface-3), transparent 70%); }
.protocol-identity { display: flex; align-items: center; gap: 13px; }
.protocol-mark { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--cyan); color: var(--cyan); font: 17px/1 var(--display); transform: skew(-5deg); }
.tunnel-ledger.awg .protocol-mark, .protocol-mark.awg { border-color: var(--amber); color: var(--amber); }
.protocol-identity p { margin: 0 0 3px; color: var(--muted); font-size: 7px; letter-spacing: .12em; }
.protocol-identity h2 { margin: 0; font-size: 24px; line-height: 1; letter-spacing: .02em; }
.protocol-head > code { color: var(--acid); font-size: 11px; }
.protocol-count { min-width: 76px; color: var(--muted); font-size: 9px; text-align: right; text-transform: uppercase; }
.protocol-count b { display: block; color: var(--text); font: 26px/1 var(--display); }
.ledger-labels { display: grid; grid-template-columns: minmax(260px, 1fr) 170px 150px 218px; gap: 18px; padding: 7px 18px; border-bottom: 1px solid #10291f; color: #4f7161; font-size: 7px; letter-spacing: .12em; text-transform: uppercase; }
.client-list { display: grid; }
.client-row { display: grid; grid-template-columns: minmax(260px, 1fr) 170px 150px 218px; align-items: center; gap: 18px; min-height: 58px; padding: 8px 18px; border-bottom: 1px solid #10291f; transition: background .12s ease; }
.client-row:last-child { border: 0; }
.client-row:hover { background: linear-gradient(90deg, rgb(34 242 138 / 8%), transparent); }
.client-main { display: flex; align-items: center; min-width: 0; gap: 12px; text-decoration: none; }
.signal { flex: 0 0 auto; display: inline-block; width: 9px; height: 9px; border: 1px solid #9d3a4c; background: var(--danger); transform: rotate(45deg); }
.signal.online { border-color: var(--acid); background: var(--acid); box-shadow: 0 0 13px rgb(34 242 138 / 70%); }
.signal.recent { border-color: var(--amber); background: var(--amber); }
.client-copy { min-width: 0; }
.client-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.client-copy small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.client-copy i, .dossier-head i { margin: 0 5px; color: var(--line-hot); font-style: normal; }
.traffic { display: flex; gap: 14px; color: var(--text); font-size: 10px; }
.traffic span { display: grid; }
.traffic small { color: var(--muted); font-size: 7px; }
.client-state { display: grid; justify-items: start; gap: 3px; }
.client-state > small { color: var(--muted); font-size: 8px; }
.state-tag { display: inline-block; padding: 3px 6px; border: 1px solid var(--line-hot); color: var(--muted); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.state-tag::before { content: "[ "; }
.state-tag::after { content: " ]"; }
.state-tag.active { border-color: #1d6543; color: var(--acid); }
.state-tag.expiring { border-color: #70520f; color: var(--amber); }
.state-tag.expired, .state-tag.disabled { border-color: #63293a; color: var(--danger); }
.state-tag.large { padding: 7px 10px; font-size: 10px; }
.client-actions { display: flex; justify-content: flex-end; gap: 5px; }
.client-actions form { display: flex; }
.row-command { display: grid; place-items: center; min-width: 43px; height: 32px; padding: 0 7px; border: 1px solid var(--line); background: var(--void-2); color: var(--muted); font-size: 8px; text-decoration: none; cursor: pointer; }
.row-command .lucide-icon { width: 15px; height: 15px; }
.row-command:hover { border-color: var(--cyan); color: var(--cyan); background: #07302e; }
.row-command.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-dark); }
.empty-state { display: grid; justify-items: center; padding: 30px; color: var(--muted); text-align: center; }
.empty-state > span { color: var(--line-hot); font: 40px/1 var(--display); }
.empty-state p { margin: 5px 0 2px; color: var(--text); text-transform: uppercase; }
.empty-state small { font-size: 9px; }

/* Key generator */
dialog { color: var(--text); }
.keygen-dialog { width: min(490px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid var(--acid); border-radius: 0; background: var(--void-2); box-shadow: -18px 18px 0 rgb(0 0 0 / 45%), 0 0 70px rgb(34 242 138 / 15%); }
.keygen-dialog::backdrop { background: rgb(0 5 3 / 80%); backdrop-filter: blur(4px); }
.keygen-dialog form { display: grid; gap: 16px; padding: 24px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 34px; }
.dialog-close { width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; color: var(--danger); font-size: 24px; cursor: pointer; }
.dialog-close .lucide-icon { width: 18px; height: 18px; }
.dialog-close:hover { border-color: var(--danger); }
.form-hint { margin: 0; padding: 10px; border-left: 2px solid var(--cyan); background: #071614; color: var(--muted); font-size: 9px; }

/* Client dossier */
.back-link { display: inline-flex; align-items: center; gap: 9px; margin: 5px 0 25px; color: var(--muted); font-size: 10px; text-decoration: none; text-transform: uppercase; }
.back-link .lucide-icon { width: 16px; height: 16px; color: var(--acid); }
.back-link:hover { color: var(--text); }
.dossier-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; max-width: 1320px; margin: 0 auto 24px; }
.dossier-head h1 { max-width: 1000px; overflow-wrap: anywhere; font-size: clamp(38px, 5vw, 68px); }
.dossier-head > div > p:last-child { margin: 0; color: var(--muted); }
.dossier-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 22px; max-width: 1320px; margin: auto; }
.dossier-sheet { border: 1px solid var(--line); background: rgb(6 14 10 / 94%); box-shadow: 8px 8px 0 #020403; }
.dossier-note { display: grid; grid-template-columns: 60px 1fr; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--amber-dark); }
.dossier-note span { color: var(--amber); font-size: 8px; letter-spacing: .12em; }
.dossier-note p { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; padding: 8px 20px 18px; }
.facts > div { min-width: 0; margin: 0; padding: 16px 10px; border-bottom: 1px solid #123025; }
.facts > div:nth-child(odd) { border-right: 1px solid #123025; }
.facts .full { grid-column: 1/-1; border-right: 0!important; }
.facts dt { margin-bottom: 6px; color: var(--muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.facts dd { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; font-size: 13px; }
.facts code { overflow-wrap: anywhere; color: var(--cyan); font-size: 10px; }
.control-bay { border-top: 1px solid var(--line); }
.control-bay > section { display: grid; grid-template-columns: 32px minmax(190px, 1fr) auto; align-items: center; gap: 14px; min-height: 83px; padding: 13px 20px; border-bottom: 1px solid #123025; }
.control-bay > section:last-child { border: 0; }
.control-index { color: var(--line-hot); font: 26px/1 var(--display); }
.control-bay h2 { margin: 0 0 2px; font-size: 18px; }
.control-bay p { margin: 0; color: var(--muted); font-size: 9px; }
.inline-form { display: flex; align-items: center; gap: 7px; }
.inline-form select { min-height: 40px; }
.inline-form button:not(.secondary-action):not(.danger-action) { min-height: 40px; padding: 10px 14px; background: var(--acid); color: #00180b; }
.network-zone { background: linear-gradient(90deg, transparent, rgb(22 217 207 / 4%)); }
.network-policy-form { display: grid; grid-template-columns: minmax(205px, 1fr) 150px auto; align-items: end; gap: 9px; }
.policy-switch { min-height: 42px; }
.speed-limit-field { display: grid; grid-template-columns: 1fr auto; align-items: center; min-width: 150px; }
.speed-limit-field > span { grid-column: 1/-1; margin-bottom: 4px; color: var(--muted); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.speed-limit-field input { width: 92px; min-height: 38px; }
.speed-limit-field b { padding: 0 8px; color: var(--muted); font-size: 8px; }
.network-policy-form .secondary-action { min-height: 40px; white-space: nowrap; }
.policy-disclaimer, .policy-sync { grid-column: 2/4; margin: -4px 0 0; color: var(--muted); font-size: 7px; line-height: 1.5; }
.policy-sync { display: flex; align-items: center; gap: 7px; margin-top: 0; color: var(--dim); }
.policy-sync i { width: 6px; height: 6px; background: var(--amber); box-shadow: 0 0 8px var(--amber); transform: rotate(45deg); }
.policy-sync.success { color: var(--acid); }
.policy-sync.success i { background: var(--acid); box-shadow: 0 0 8px var(--acid); }
.policy-sync.failed { color: var(--danger); }
.policy-sync.failed i { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.danger-zone { background: linear-gradient(90deg, transparent, rgb(255 84 112 / 4%)); }
.qr-sheet { position: relative; border: 1px solid var(--amber); background: #f5f2e8; color: #06100b; box-shadow: 9px 9px 0 var(--amber-dark); }
.qr-sheet::before, .qr-sheet::after { content: ""; position: absolute; left: 22px; right: 22px; height: 1px; background: repeating-linear-gradient(90deg, #0b1711 0 7px, transparent 7px 12px); }
.qr-sheet::before { top: 73px; }
.qr-sheet::after { bottom: 54px; }
.qr-ticket-head { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 12px 18px; border-bottom: 1px solid #b1ae9e; }
.qr-ticket-head > span { display: grid; place-items: center; width: 39px; height: 39px; background: #06100b; color: var(--acid); font: 13px/1 var(--display); }
.qr-ticket-head div { display: grid; }
.qr-ticket-head b { font-size: 10px; letter-spacing: .06em; }
.qr-ticket-head small { color: #5f675f; font-size: 8px; }
.qr-frame { margin: 23px; border: 7px solid #06100b; }
.qr-frame img { display: block; width: 100%; aspect-ratio: 1; }
.qr-sheet > p { margin: 0 22px 19px; font-size: 9px; text-transform: uppercase; }
.qr-sheet > code { display: block; padding: 13px 22px; border-top: 1px solid #b1ae9e; color: #24352c; font-size: 9px; }

/* System */
.system-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; max-width: 1400px; margin: 14px auto 28px; }
.system-stamp { display: grid; grid-template-columns: auto auto; min-width: 170px; padding: 13px; border: 1px solid var(--line); background: var(--surface); }
.system-stamp span { grid-column: 1/-1; color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.system-stamp strong { color: var(--acid); font: 43px/1 var(--display); }
.system-stamp small { align-self: end; padding-bottom: 4px; color: var(--muted); font-size: 7px; text-transform: uppercase; }
.node-console, .patch-console { max-width: 1400px; margin: auto; border: 1px solid var(--line); background: rgb(6 14 10 / 94%); box-shadow: 8px 8px 0 #020403; }
.node-console > header { display: grid; grid-template-columns: 1fr auto auto; gap: 22px; padding: 9px 15px; border-bottom: 1px solid var(--line); background: var(--surface-3); color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.node-console > header > span { color: var(--amber); }
.node-console > header code { color: var(--cyan); }
.node-row { display: grid; grid-template-columns: 48px minmax(200px, 1fr) 170px 160px 74px; align-items: center; gap: 18px; min-height: 86px; padding: 13px 16px; border-bottom: 1px solid #123025; }
.node-row:last-child { border: 0; }
.node-name { display: grid; }
.node-name small, .node-health small, .node-restarts small { color: var(--muted); font-size: 7px; letter-spacing: .09em; }
.node-name strong { font: 21px/1 var(--display); text-transform: uppercase; }
.node-name code { margin-top: 5px; color: var(--acid); font-size: 9px; }
.node-health { display: flex; align-items: center; gap: 11px; }
.node-health div, .node-restarts { display: grid; }
.node-health strong { font-size: 10px; text-transform: uppercase; }
.node-restarts strong { font: 24px/1 var(--display); }
.node-image { grid-column: 2/-1; overflow: hidden; margin-top: -9px; color: #426453; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.patch-console { display: grid; grid-template-columns: minmax(300px, 1fr) 320px 230px; align-items: center; gap: 30px; margin-top: 24px; padding: 24px; border-left: 4px solid var(--amber); }
.patch-copy h2 { margin: 0 0 5px; font-size: 32px; }
.patch-copy > p:not(.section-code) { max-width: 650px; margin: 0; color: var(--muted); }
.update-result { display: grid; grid-template-columns: 35px 1fr; gap: 10px; margin-top: 13px; padding: 9px; border: 1px solid var(--line); background: var(--void-2); }
.update-result > span { color: var(--acid); font-size: 8px; }
.update-result p { display: grid; margin: 0; font-size: 9px; }
.update-result small { color: var(--muted); }
.patch-settings { display: grid; gap: 12px; padding: 0 24px; border-right: 1px solid var(--line); border-left: 1px solid var(--line); }
.switch-line { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.switch-line input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 42px; height: 21px; border: 1px solid var(--line-hot); background: var(--void); }
.switch-ui::after { content: ""; position: absolute; top: 4px; left: 4px; width: 11px; height: 11px; background: var(--muted); transition: transform .15s ease, background .15s ease; }
.switch-line input:checked + .switch-ui { border-color: var(--acid); background: var(--acid-dark); }
.switch-line input:checked + .switch-ui::after { background: var(--acid); transform: translateX(21px); box-shadow: 0 0 10px var(--acid); }
.switch-line b, .switch-line small { display: block; }
.switch-line b { color: var(--text); font-size: 10px; }
.switch-line small { color: var(--muted); font-size: 7px; }
.patch-now { display: grid; gap: 8px; }
.patch-now small { color: var(--muted); font-size: 7px; }

.icon-spin { animation: icon-spin .8s linear infinite; }
@keyframes icon-spin { to { transform: rotate(360deg); } }

/* Access gate */
.login-page { display: grid; place-items: center; overflow-x: hidden; }
.gate-layout { display: grid; grid-template-columns: minmax(480px, 1.15fr) minmax(390px, .85fr); width: min(1180px, calc(100% - 48px)); min-height: min(720px, calc(100dvh - 48px)); border: 1px solid var(--line); background: var(--void-2); box-shadow: 18px 18px 0 #010302; }
.gate-brand { position: relative; display: grid; grid-template-rows: auto 1fr auto auto; place-items: center; overflow: hidden; padding: 22px 32px; border-right: 1px solid var(--line); background: radial-gradient(circle at 50% 45%, #0c3827 0, #06100c 44%, #030706 72%); }
.gate-brand::before, .gate-brand::after { content: ""; position: absolute; width: 320px; height: 1px; background: var(--line-hot); transform: rotate(35deg); }
.gate-brand::before { left: -160px; top: 120px; }
.gate-brand::after { right: -160px; bottom: 120px; }
.gate-coordinate { justify-self: start; margin: 0; color: #3c6c55; font-size: 8px; letter-spacing: .14em; }
.gate-cat { position: relative; display: grid; place-items: center; width: min(430px, 78%); aspect-ratio: 1; margin: 10px 0 -30px; }
.gate-cat::before { content: ""; position: absolute; inset: 11%; border: 1px solid var(--line-hot); transform: rotate(45deg); box-shadow: 0 0 70px rgb(34 242 138 / 12%); }
.gate-cat img { position: relative; z-index: 2; width: 100%; filter: drop-shadow(0 18px 35px #000) drop-shadow(0 0 16px rgb(34 242 138 / 28%)); }
.cat-ear { position: absolute; z-index: 1; top: 3%; width: 28%; height: 27%; border: 1px solid var(--amber); background: var(--amber-dark); transform: rotate(45deg); }
.cat-ear.left { left: 12%; }
.cat-ear.right { right: 12%; }
.gate-wordmark { position: relative; z-index: 3; width: 100%; text-align: center; }
.gate-wordmark > span { color: var(--amber); font-size: 8px; letter-spacing: .35em; }
.gate-wordmark h1 { margin: 2px 0 -3px; color: var(--text); font-size: clamp(70px, 8vw, 116px); line-height: .8; letter-spacing: -.03em; }
.gate-wordmark p { margin: 13px 0 0; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.gate-wordmark i { margin: 0 9px; color: var(--acid); font-style: normal; }
.gate-status { align-self: end; display: flex; justify-content: space-between; width: 100%; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 7px; letter-spacing: .12em; }
.gate-status span:first-child { color: var(--acid); }
.gate-status i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: var(--acid); box-shadow: 0 0 10px var(--acid); transform: rotate(45deg); }
.gate-console { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 5vw, 74px); background: linear-gradient(135deg, var(--surface) 0 50%, #07100d 50%); }
.gate-console-head { display: flex; justify-content: space-between; margin-bottom: auto; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 7px; letter-spacing: .12em; }
.gate-console-head span { color: var(--amber); }
.gate-intro { margin: 70px 0 26px; }
.gate-intro h2 { margin: 0 0 8px; font-size: clamp(38px, 4vw, 58px); line-height: .9; }
.gate-intro > p:last-child { color: var(--muted); }
.login-form { display: grid; gap: 18px; }
.login-form input { width: 100%; min-height: 52px; font-size: 18px; letter-spacing: .08em; }
.gate-footnote { margin: auto 0 0; padding-top: 20px; color: var(--muted); font-size: 8px; }
.gate-footnote span { color: var(--cyan); }

@media (max-width: 1160px) {
  .vault-head { grid-template-columns: 1fr auto; }
  .vault-head .primary-action { grid-column: 1/-1; justify-self: end; }
  .ledger-labels, .client-row { grid-template-columns: minmax(220px, 1fr) 130px 130px 196px; gap: 12px; }
  .patch-console { grid-template-columns: 1fr 300px; }
  .patch-now { grid-column: 1/-1; justify-self: end; width: 230px; }
  .gate-layout { grid-template-columns: 1fr 420px; }
}

@media (max-width: 900px) {
  .shell-nav { width: 184px; padding-inline: 13px; }
  .shell-main { width: calc(100% - 184px); margin-left: 184px; padding-inline: 22px; }
  .brand-mark { width: 48px; height: 54px; }
  .brand-mark img { width: 58px; height: 58px; }
  .brand-copy strong { font-size: 28px; }
  .brand-copy small { display: none; }
  .ledger-labels { display: none; }
  .client-row { grid-template-columns: minmax(220px, 1fr) 150px auto; }
  .client-state { display: none; }
  .protocol-head { grid-template-columns: 1fr auto; }
  .protocol-head > code { grid-column: 1; grid-row: 2; }
  .protocol-count { grid-row: 1/3; grid-column: 2; }
  .dossier-grid { grid-template-columns: 1fr; }
  .qr-sheet { grid-row: 1; width: min(350px, 100%); justify-self: center; }
  .node-row { grid-template-columns: 48px 1fr 150px 70px; }
  .node-health:nth-of-type(2) { display: none; }
  .node-image { grid-column: 2/-1; }
  .gate-layout { grid-template-columns: 1fr 390px; }
  .gate-brand { padding-inline: 18px; }
  .gate-wordmark h1 { font-size: 70px; }
}

@media (max-width: 720px) {
  body { padding-bottom: 66px; background-size: auto, 32px 32px, 32px 32px, auto; }
  .shell-nav { position: sticky; inset: 0 0 auto; flex-direction: row; align-items: center; width: 100%; height: 58px; padding: 5px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .shell-nav::after { top: auto; right: auto; bottom: -1px; left: 12px; width: 72px; height: 2px; }
  .brand { gap: 7px; }
  .brand-mark { width: 39px; height: 44px; }
  .brand-mark img { width: 48px; height: 48px; }
  .brand-copy strong { font-size: 24px; }
  .primary-nav { position: fixed; z-index: 120; inset: auto 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgb(3 8 6 / 98%); }
  .nav-link { grid-template-columns: auto auto; justify-content: center; gap: 8px; min-height: 58px; padding: 6px; }
  .nav-link.active::before { left: 25%; top: -1px; width: 50%; height: 2px; }
  .nav-link b { font-size: 17px; }
  .nav-link small { display: none; }
  .nav-index { font-size: 12px; }
  .shell-foot { margin-left: auto; }
  .node-signal { display: none; }
  .nav-logout { width: 42px; height: 40px; padding: 0; font-size: 0; text-align: center; }
  .nav-logout { justify-content: center; gap: 0; }
  .nav-logout .lucide-icon { margin: 0; width: 20px; height: 20px; }
  .shell-main { width: 100%; min-height: calc(100vh - 58px); margin: 0; padding: 24px 12px 30px; }
  .shell-main::before { font-size: 130px; }
  .page-coordinate { display: none; }
  .vault-head { grid-template-columns: 1fr auto; align-items: start; gap: 16px; margin-top: 0; }
  .title-block h1, .system-head h1 { font-size: 44px; }
  .title-block > p:last-child, .system-head .title-block > p:last-child { font-size: 9px; }
  .readout-grid { grid-column: 1/-1; grid-row: 2; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .readout-grid article { min-height: 66px; }
  .readout-grid strong { font-size: 27px; }
  .vault-head .primary-action { grid-column: 2; grid-row: 1; min-height: 42px; padding: 9px 12px; font-size: 9px; }
  .search-line { grid-template-columns: 1fr auto; }
  .search-field { grid-column: 1/-1; }
  .search-line select { min-width: 0; }
  .reset { grid-column: 1/-1; padding: 3px; text-align: center; }
  .filter-line { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .filter-line::-webkit-scrollbar { display: none; }
  .filter-label { position: sticky; z-index: 2; left: -10px; flex-basis: auto; padding: 6px 10px; background: var(--void-2); }
  .filter-token { flex: 0 0 auto; white-space: nowrap; }
  .protocol-head { gap: 10px; padding: 10px 12px; }
  .protocol-mark { width: 38px; height: 38px; font-size: 14px; }
  .protocol-identity h2 { font-size: 19px; }
  .protocol-head > code { overflow: hidden; font-size: 8px; text-overflow: ellipsis; }
  .protocol-count { min-width: 55px; }
  .protocol-count b { font-size: 22px; }
  .client-row { grid-template-columns: 1fr auto; gap: 7px 10px; padding: 10px 12px; }
  .client-main { grid-column: 1; }
  .traffic { grid-column: 1; font-size: 9px; }
  .client-actions { grid-column: 2; grid-row: 1/3; align-self: center; display: grid; grid-template-columns: repeat(2, 42px); }
  .row-command { height: 33px; }
  .keygen-dialog { width: 100%; max-width: none; max-height: calc(100dvh - 18px); margin: 0; inset: auto 0 0; border-right: 0; border-bottom: 0; border-left: 0; }
  .keygen-dialog form { padding: 18px 14px max(18px, env(safe-area-inset-bottom)); }
  .dossier-head { align-items: start; margin-bottom: 16px; }
  .dossier-head h1 { font-size: 38px; }
  .dossier-head > div > p:last-child { font-size: 9px; }
  .state-tag.large { flex: 0 0 auto; font-size: 8px; }
  .facts { grid-template-columns: 1fr; padding: 6px 12px 12px; }
  .facts > div, .facts > div:nth-child(odd) { border-right: 0; }
  .facts .full { grid-column: auto; }
  .control-bay > section { grid-template-columns: 28px 1fr; padding: 14px; }
  .control-bay > section > :last-child { grid-column: 2; justify-self: start; }
  .inline-form { flex-wrap: wrap; }
  .network-policy-form, .policy-disclaimer, .policy-sync { grid-column: 2; width: 100%; }
  .network-policy-form { grid-template-columns: minmax(190px, 1fr) 150px auto; }
  .system-head { align-items: start; }
  .system-stamp { min-width: 115px; }
  .system-stamp strong { font-size: 32px; }
  .node-console > header { grid-template-columns: 1fr auto; }
  .node-console > header b { display: none; }
  .node-row { grid-template-columns: 40px 1fr auto; gap: 10px; padding: 12px; }
  .node-health { grid-column: 2; }
  .node-restarts { grid-column: 3; grid-row: 1/3; }
  .node-image { grid-column: 2/-1; }
  .patch-console { grid-template-columns: 1fr; gap: 20px; padding: 18px 14px; }
  .patch-settings { padding: 17px 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .patch-now { grid-column: auto; justify-self: stretch; width: auto; }
  .gate-layout { grid-template-columns: 1fr; width: calc(100% - 20px); min-height: auto; margin: 10px 0 30px; }
  .gate-brand { min-height: 330px; padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .gate-cat { width: min(230px, 70%); margin: -5px 0 -30px; }
  .gate-wordmark h1 { font-size: 62px; }
  .gate-wordmark p { margin-top: 8px; }
  .gate-status { padding-top: 10px; }
  .gate-console { min-height: 390px; padding: 28px 20px; }
  .gate-intro { margin: 45px 0 22px; }
  .gate-intro h2 { font-size: 42px; }
}

@media (max-width: 430px) {
  .title-block h1, .system-head h1 { font-size: 38px; }
  .vault-head .primary-action { width: 46px; padding: 0; font-size: 0; }
  .vault-head .primary-action .lucide-icon { width: 22px; height: 22px; }
  .protocol-head > code { max-width: 220px; }
  .client-copy strong { font-size: 11px; }
  .client-actions { grid-template-columns: repeat(2, 38px); }
  .row-command { min-width: 38px; }
  .dossier-head { display: grid; }
  .state-tag.large { justify-self: start; }
  .system-stamp { display: none; }
  .qr-sheet { width: 100%; }
  .network-policy-form { grid-template-columns: 1fr; align-items: stretch; }
  .network-policy-form .secondary-action { width: 100%; }
  .speed-limit-field { justify-content: start; }
  .gate-status span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; transition: none!important; animation: none!important; }
}
