/* Veyz Control. Same palette as veyz.world and the XP Farm: void, graphite,
   silver, ice. Montserrat only. Department colours only mean departments. */
:root {
  --void: #07090c;
  --charcoal: #0d1116;
  --graphite: #2a2a2a;
  --ink: #f5f5f5;
  --silver: #a7aeb7;
  --grey: #6b6f76;
  --bluegrey: #2e3a44;
  --ice: #bfdfff;
  --ice-glow: rgba(191, 223, 255, 0.45);
  --ice-soft: rgba(191, 223, 255, 0.08);
  --line: rgba(167, 174, 183, 0.14);
  --line-strong: rgba(167, 174, 183, 0.32);
  --panel: linear-gradient(180deg, rgba(18, 24, 32, 0.86) 0%, rgba(10, 13, 18, 0.9) 60%, rgba(8, 10, 14, 0.94) 100%);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(191, 223, 255, 0.02);
  --drop: 0 14px 34px rgba(0, 0, 0, 0.38), 0 2px 6px rgba(0, 0, 0, 0.3);
  --alert: #d55181;
  --ok: #bfdfff;
  --font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --cut: 12px;
  --rail: 236px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--void);
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--ice); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(191, 223, 255, 0.25); }

/* Backdrop: deep radial light, a faint HUD grid and grain. */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(56, 92, 140, 0.22), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(46, 58, 68, 0.35), transparent 60%),
    linear-gradient(rgba(167, 174, 183, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(167, 174, 183, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--void);
}
.backdrop::after {
  content: ''; position: absolute; inset: 0; opacity: 0.5;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px);
}

/* ───── Boot / auth ───── */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 18px; text-align: center; }
.boot span { font-weight: 800; letter-spacing: 0.5em; font-size: 12px; color: var(--silver); }
.boot i { display: block; height: 2px; width: 160px; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--ice), transparent); animation: scan 1.4s var(--ease) infinite; }
@keyframes scan { 0% { transform: scaleX(0.1); opacity: 0.2; } 50% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(0.1); opacity: 0.2; } }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate .panel { width: min(420px, 100%); padding: 34px 30px 30px; }
.gate h1 { margin: 6px 0 4px; font-size: 30px; font-weight: 300; letter-spacing: -0.01em; }
.gate p { color: var(--silver); margin: 0 0 22px; font-size: 13px; }
.gate form { display: grid; gap: 12px; }

/* ───── Shell ───── */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 22px 14px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 13, 18, 0.9), rgba(7, 9, 12, 0.92));
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; }
.brand img { width: 30px; height: 30px; }
.brand b { display: block; font-weight: 800; font-size: 11px; letter-spacing: 0.42em; }
.brand small { display: block; font-size: 9px; letter-spacing: 0.3em; color: var(--grey); font-weight: 600; margin-top: 2px; }
.nav { display: grid; gap: 2px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  color: var(--silver); font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  border: 1px solid transparent; text-decoration: none; transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav a svg { width: 16px; height: 16px; flex: none; opacity: 0.75; }
.nav a:hover { color: var(--ink); background: rgba(191, 223, 255, 0.04); }
.nav a.on { color: var(--ice); background: var(--ice-soft); border-color: rgba(191, 223, 255, 0.16); }
.nav a.on::before { content: ''; position: absolute; left: -15px; top: 8px; bottom: 8px; width: 2px; background: var(--ice); box-shadow: 0 0 12px var(--ice-glow); }
.nav a em { margin-left: auto; font-style: normal; font-size: 10px; letter-spacing: 0.05em; min-width: 20px; height: 18px; padding: 0 6px; display: grid; place-items: center; background: var(--alert); color: #fff; font-weight: 700; }
.nav a em.soft { background: var(--bluegrey); color: var(--ice); }
.rail-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 10px; color: var(--grey); letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }

.main { min-width: 0; padding: 0 clamp(16px, 2.6vw, 36px) 60px; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px;
  padding: 16px 0; margin-bottom: 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 9, 12, 0.96), rgba(7, 9, 12, 0.82)); backdrop-filter: blur(8px);
}
.topbar h2 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.42em; text-transform: uppercase; }
.topbar .lvl { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
.topbar .lvl b { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; color: var(--ice); white-space: nowrap; }
.topbar .lvl .bar { width: clamp(80px, 16vw, 220px); }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); background: rgba(10, 13, 18, 0.7); cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silver); white-space: nowrap; }
.chip-btn:hover { border-color: var(--ice); color: var(--ice); }
.chip-btn.on { color: var(--ice); border-color: rgba(191, 223, 255, 0.5); background: var(--ice-soft); }
.chip-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ───── Panels ───── */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }

.panel {
  position: relative; padding: 20px 20px 18px; min-width: 0;
  background: var(--panel); box-shadow: var(--edge), var(--drop);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
.panel::before, .panel::after { content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none; }
.panel::before { left: -1px; top: -1px; border-left: 1px solid var(--ice); border-top: 1px solid var(--ice); opacity: 0.7; }
.panel::after { right: -1px; bottom: -1px; border-right: 1px solid var(--ice); border-bottom: 1px solid var(--ice); opacity: 0.7; }
.panel > header { display: flex; align-items: baseline; gap: 12px; margin: -2px 0 16px; }
.panel > header h3 { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.34em; text-transform: uppercase; color: var(--silver); }
.panel > header .aside { margin-left: auto; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey); font-weight: 600; }
.panel > header .aside a { color: var(--ice); }
.kicker { font-size: 9px; font-weight: 700; letter-spacing: 0.38em; text-transform: uppercase; color: var(--grey); }
.muted { color: var(--grey); }
.silver { color: var(--silver); }
.small { font-size: 12px; }
.tiny { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }

/* Level module */
.level { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-items: end; }
.level .n { font-size: clamp(64px, 7vw, 96px); font-weight: 200; line-height: 0.85; letter-spacing: -0.04em; color: var(--ink); text-shadow: 0 0 40px rgba(191, 223, 255, 0.18); }
.level .who h4 { margin: 0; font-size: 22px; font-weight: 300; }
.level .who p { margin: 2px 0 0; color: var(--silver); font-size: 13px; }
.level .track { grid-column: 1 / -1; margin-top: 16px; }
.bar { position: relative; height: 6px; background: rgba(167, 174, 183, 0.1); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(191, 223, 255, 0.5), var(--ice)); box-shadow: 0 0 14px var(--ice-glow); transition: width 0.8s var(--ease); }
.bar i::after { content: ''; position: absolute; right: 0; top: -3px; bottom: -3px; width: 2px; background: #fff; box-shadow: 0 0 10px #fff; }
.track-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--silver); }
.track-meta b { color: var(--ink); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 18px; background: var(--line); border: 1px solid var(--line); }
.stats > div { background: rgba(8, 10, 14, 0.92); padding: 12px 14px; }
.stats b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.stats b.ice { color: var(--ice); }

/* Systems ring */
.autopilot { display: grid; grid-template-columns: 128px 1fr; gap: 20px; align-items: center; }
.ring { position: relative; width: 128px; height: 128px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .c b { font-size: 30px; font-weight: 300; line-height: 1; }
.ring .c span { font-size: 8px; letter-spacing: 0.3em; color: var(--silver); font-weight: 700; margin-top: 6px; }
.leds { display: grid; gap: 7px; }
.led { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--silver); min-width: 0; }
.led span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.led i, .st-dot { width: 7px; height: 7px; flex: none; background: var(--grey); transform: rotate(45deg); }
.led.ok i, .st-dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ice-glow); }
.led.running i, .st-dot.running { background: var(--ice); animation: pulse 0.9s ease-in-out infinite; }
.led.error i, .st-dot.error { background: var(--alert); box-shadow: 0 0 8px rgba(213, 81, 129, 0.6); }
.led.waiting i, .st-dot.waiting { background: transparent; border: 1px solid var(--grey); }
@keyframes pulse { 50% { opacity: 0.25; } }

/* Needs you */
.moves { display: grid; gap: 8px; }
.move { display: grid; grid-template-columns: 4px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px 12px 0; background: rgba(191, 223, 255, 0.025); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.move:hover { border-color: var(--line-strong); background: rgba(191, 223, 255, 0.05); }
.move > i { align-self: stretch; background: var(--ice); }
.move.alert > i { background: var(--alert); }
.move.setup > i { background: var(--grey); }
.move b { display: block; font-weight: 600; font-size: 13px; }
.move span { display: block; color: var(--silver); font-size: 12px; }
.move em { font-style: normal; font-size: 9px; letter-spacing: 0.3em; color: var(--ice); font-weight: 700; }
.calm { display: grid; place-items: center; text-align: center; padding: 26px 10px; color: var(--silver); font-size: 13px; }
.calm b { display: block; font-size: 10px; letter-spacing: 0.36em; color: var(--ice); margin-bottom: 6px; }

.jobs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.job { padding: 12px 14px; border: 1px dashed var(--line-strong); }
.job b { display: block; font-size: 10px; letter-spacing: 0.3em; font-weight: 700; color: var(--ice); }
.job span { font-size: 12px; color: var(--silver); }

/* Charts */
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--grey); font: 600 9px var(--font); letter-spacing: 0.12em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silver); font-weight: 600; }
.legend i { width: 9px; height: 9px; }
.dept-rows { display: grid; gap: 10px; }
.dept-row { display: grid; grid-template-columns: 96px 1fr 64px; gap: 12px; align-items: center; font-size: 11px; }
.dept-row span { color: var(--silver); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; font-size: 10px; }
.dept-row .bar i { box-shadow: none; }
.dept-row .bar i::after { display: none; }
.dept-row b { text-align: right; font-weight: 600; }

/* Feed */
.feed { display: grid; max-height: 460px; overflow: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: var(--bluegrey) transparent; }
.feed .row { display: grid; grid-template-columns: 3px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.feed .row:last-child { border-bottom: 0; }
.feed .row > i { align-self: stretch; }
.feed .row b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .row span { display: block; font-size: 10px; color: var(--grey); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.feed .row em { font-style: normal; font-weight: 700; font-size: 12px; color: var(--ice); white-space: nowrap; }
.feed .row.fresh { animation: fresh 1.6s var(--ease); }
@keyframes fresh { from { background: rgba(191, 223, 255, 0.12); } to { background: transparent; } }

/* Tables / lists */
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { text-align: left; font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--grey); font-weight: 700; padding: 0 10px 10px 0; border-bottom: 1px solid var(--line-strong); }
.table td { padding: 11px 10px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.wrap-x { overflow-x: auto; }
.tag { display: inline-block; padding: 2px 7px; font-size: 9px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--silver); white-space: nowrap; }
.tag.ice { color: var(--ice); border-color: rgba(191, 223, 255, 0.4); }
.tag.alert { color: var(--alert); border-color: rgba(213, 81, 129, 0.5); }
.tag.solid { background: var(--ice); color: var(--void); border-color: var(--ice); }

/* Systems */
.systems { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.sys { display: grid; gap: 12px; align-content: start; }
.sys .top { display: flex; align-items: center; gap: 12px; }
.sys .top h4 { margin: 0; font-size: 15px; font-weight: 600; }
.sys .top .st-dot { margin-left: 2px; }
.sys .what { margin: 0; color: var(--silver); font-size: 13px; }
.sys .you { font-size: 12px; padding: 8px 10px; border-left: 2px solid var(--ice); background: var(--ice-soft); }
.sys .you b { font-size: 9px; letter-spacing: 0.3em; color: var(--ice); margin-right: 6px; }
.sys .meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.sys .meta div { background: rgba(8, 10, 14, 0.92); padding: 8px 10px; font-size: 12px; }
.sys .meta .kicker { display: block; margin-bottom: 2px; }
.sys .note { font-size: 12px; color: var(--silver); }
.sys .note.err { color: var(--alert); }
.sys .acts { display: flex; gap: 8px; align-items: center; }
.runs { display: flex; gap: 3px; margin-left: auto; }
.runs i { width: 6px; height: 14px; background: var(--ice); opacity: 0.75; }
.runs i.bad { background: var(--alert); opacity: 1; }

/* Switch */
.switch { position: relative; width: 38px; height: 20px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border: 1px solid var(--line-strong); background: rgba(8, 10, 14, 0.9); transition: 0.2s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 12px; height: 12px; background: var(--grey); transition: 0.25s var(--ease); }
.switch input:checked + span { border-color: rgba(191, 223, 255, 0.6); background: var(--ice-soft); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--ice); box-shadow: 0 0 10px var(--ice-glow); }
.switch input:focus-visible + span { outline: 1px solid var(--ice); outline-offset: 2px; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid var(--line-strong); background: rgba(10, 13, 18, 0.8); color: var(--ink); cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; transition: 0.2s; white-space: nowrap; }
.btn:hover { border-color: var(--ice); color: var(--ice); }
.btn.primary { background: var(--ice); color: var(--void); border-color: var(--ice); }
.btn.primary:hover { box-shadow: 0 0 22px var(--ice-glow); color: var(--void); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--silver); padding: 0 10px; }
.btn.ghost:hover { color: var(--ice); }
.btn.danger:hover { border-color: var(--alert); color: var(--alert); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 9px; }
.btn:disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--silver); font-weight: 700; }
.field > small { color: var(--grey); font-size: 11px; }
.input, textarea.input, select.input { width: 100%; height: 40px; padding: 0 12px; background: rgba(5, 7, 10, 0.85); border: 1px solid var(--line-strong); color: var(--ink); outline: none; transition: 0.2s; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input:focus { border-color: var(--ice); box-shadow: 0 0 0 3px rgba(191, 223, 255, 0.08); }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.err-line { color: var(--alert); font-size: 12px; min-height: 18px; }

/* Connections */
.conns { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.conn { display: grid; gap: 14px; align-content: start; }
.conn .top { display: flex; align-items: center; gap: 12px; }
.conn .top h4 { margin: 0; font-size: 16px; font-weight: 600; }
.conn .top .tag { margin-left: auto; }
.conn p { margin: 0; color: var(--silver); font-size: 13px; }
.conn ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--silver); font-size: 12px; }
.conn ol li::marker { color: var(--ice); font-weight: 700; }
.conn details { border-top: 1px solid var(--line); padding-top: 12px; }
.conn summary { cursor: pointer; font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 700; color: var(--ice); list-style: none; }
.conn summary::-webkit-details-marker { display: none; }
.conn summary::before { content: '+ '; }
.conn details[open] summary::before { content: '– '; }
.conn details > div { display: grid; gap: 12px; margin-top: 12px; }
.copy { display: flex; gap: 6px; align-items: center; }
.copy code { flex: 1; min-width: 0; padding: 8px 10px; background: rgba(5, 7, 10, 0.85); border: 1px solid var(--line); font: 500 11px/1.4 var(--font); color: var(--ice); overflow-x: auto; white-space: nowrap; }

/* Content */
.drop { display: grid; place-items: center; gap: 8px; padding: 34px 16px; border: 1px dashed rgba(191, 223, 255, 0.4); background: var(--ice-soft); text-align: center; cursor: pointer; transition: 0.2s; }
.drop:hover, .drop.over { background: rgba(191, 223, 255, 0.12); border-color: var(--ice); box-shadow: inset 0 0 40px rgba(191, 223, 255, 0.08); }
.drop b { font-size: 12px; letter-spacing: 0.34em; font-weight: 800; color: var(--ice); }
.drop span { font-size: 12px; color: var(--silver); }
.drop input { display: none; }
.upbar { height: 3px; background: rgba(167, 174, 183, 0.12); margin-top: 10px; display: none; }
.upbar.on { display: block; }
.upbar i { display: block; height: 100%; width: 0; background: var(--ice); box-shadow: 0 0 10px var(--ice-glow); }
.queue { display: grid; gap: 12px; }
.clip { display: grid; grid-template-columns: 74px 1fr; gap: 16px; padding: 14px; border: 1px solid var(--line); background: rgba(8, 10, 14, 0.6); }
.clip .when { text-align: center; border-right: 1px solid var(--line); padding-right: 14px; }
.clip .when b { display: block; font-size: 22px; font-weight: 300; line-height: 1.1; }
.clip .when span { font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--silver); font-weight: 700; }
.clip h5 { margin: 0 0 4px; font-size: 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.clip .cap { font-size: 12px; color: var(--silver); white-space: pre-wrap; margin: 0 0 10px; }
.clip .cap em { color: var(--ice); font-style: normal; }
.clip.due { border-color: rgba(191, 223, 255, 0.5); box-shadow: inset 0 0 30px rgba(191, 223, 255, 0.05); }

/* Toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 11px 16px 11px 0; min-width: 240px; max-width: min(380px, calc(100vw - 36px)); background: rgba(8, 11, 15, 0.96); border: 1px solid var(--line-strong); box-shadow: var(--drop); animation: toast-in 0.4s var(--ease); }
.toast > i { width: 3px; align-self: stretch; }
.toast b { font-size: 18px; font-weight: 600; color: var(--ice); white-space: nowrap; }
.toast span { font-size: 11px; color: var(--silver); line-height: 1.35; }
.toast span strong { display: block; color: var(--ink); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; }
.toast.out { animation: toast-out 0.35s var(--ease) forwards; }
.toast.level { border-color: var(--ice); box-shadow: 0 0 40px rgba(191, 223, 255, 0.25), var(--drop); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { display: inline-flex; align-items: center; gap: 8px; }
.quick button i { width: 7px; height: 7px; }

.sites { display: grid; gap: 10px; }
.site { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.site b { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site svg { grid-column: 1 / -1; width: 100%; height: 22px; }

.empty { color: var(--grey); font-size: 13px; padding: 18px 0; text-align: center; }
.mask { filter: blur(5px); user-select: none; }
.hide-sm { }

@media (max-width: 1180px) {
  .s3, .s4 { grid-column: span 6; }
  .s5, .s6, .s7, .s8 { grid-column: span 12; }
}
@media (max-width: 860px) {
  :root { --rail: 0px; }
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; z-index: 20; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); }
  .brand, .rail-foot { display: none; }
  .nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; overflow-x: auto; }
  .nav a { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 8px; letter-spacing: 0.12em; justify-content: center; }
  .nav a.on::before { left: 8px; right: 8px; top: -7px; bottom: auto; width: auto; height: 2px; }
  .nav a em { position: absolute; top: 2px; right: 6px; margin: 0; height: 15px; min-width: 15px; font-size: 9px; padding: 0 4px; }
  .main { padding-bottom: 96px; }
  .grid > * { grid-column: span 12 !important; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar .lvl .bar { display: none; }
  .hide-sm { display: none !important; }
  .autopilot { grid-template-columns: 96px 1fr; }
  .ring { width: 96px; height: 96px; }
  .systems, .conns { grid-template-columns: 1fr; }
  .jobs { grid-template-columns: 1fr; }
  .dept-row { grid-template-columns: 84px 1fr 56px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
