:root {
  --ink: #07111f;
  --ink-2: #0c1a30;
  --panel: rgba(12, 28, 52, .78);
  --panel-solid: #10233f;
  --line: rgba(140, 176, 230, .18);
  --blue: #3c8dff;
  --blue-2: #8cbcff;
  --gold: #e2b657;
  --gold-2: #f6dc9a;
  --red: #e24b57;
  --text: #eaf1ff;
  --dim: #9aafcc;
  --muted: #6e84a6;
  --ok: #3dcc9a;
  --shadow: 0 24px 60px rgba(2, 8, 20, .45);
  --font: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --display: "Syne", "Outfit", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sidebar: 268px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(226, 182, 87, .35); color: white; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #24385c; border-radius: 99px; }

.aurora, .ember { position: fixed; inset: -20%; z-index: -1; pointer-events: none; }
.aurora {
  background:
    radial-gradient(circle at 12% 20%, rgba(60, 141, 255, .28), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(226, 182, 87, .16), transparent 26%),
    radial-gradient(circle at 70% 90%, rgba(60, 141, 255, .12), transparent 30%);
  animation: drift 22s ease-in-out infinite alternate;
}
.ember {
  background: radial-gradient(circle at 96% 88%, rgba(226, 75, 87, .18), transparent 18%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-2%, 2%, 0) scale(1.06); } }

.mark {
  width: 42px; height: 42px; border-radius: 13px; position: relative; flex: none;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; color: white;
  background: linear-gradient(160deg, #2f6fd4, #12315f);
  box-shadow: 0 10px 24px rgba(60, 141, 255, .35), inset 0 0 0 1px rgba(226, 182, 87, .55);
}
.mark i {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); top: 6px; right: 6px; box-shadow: 0 0 10px var(--red);
}
.word, .auth-brand strong { font-family: var(--display); letter-spacing: .08em; font-weight: 800; }
.word span, .auth-brand span span {
  background: linear-gradient(120deg, var(--gold), #fff 45%, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.auth-body { min-height: 100vh; }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.auth-hero {
  position: relative; overflow: hidden; min-height: 100vh;
  padding: 48px 56px 36px; display: flex; flex-direction: column; justify-content: space-between;
}
.hero-map { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-map .track {
  fill: none; stroke: rgba(140, 188, 255, .45); stroke-width: 2;
  stroke-dasharray: 10 14; animation: flow 18s linear infinite;
}
.hero-map .t2 { stroke: rgba(226, 182, 87, .4); animation-duration: 24s; animation-direction: reverse; }
.hero-map .t3 { stroke: rgba(226, 75, 87, .35); animation-duration: 20s; }
.hero-map circle { fill: #e2b657; filter: drop-shadow(0 0 6px #e2b657); }
@keyframes flow { to { stroke-dashoffset: -480; } }
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1; justify-content: space-between; min-height: 0; }
@font-face {
  font-family: "RailX Mark";
  src: url("/assets/Montserrat-ExtraBoldItalic.ttf") format("truetype");
  font-weight: 800;
  font-style: italic;
  font-display: block;
}
.wordmark {
  display: inline-block;
  font-family: "RailX Mark", sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 42px;
  line-height: .85;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, .55), 0 0 18px rgba(170, 205, 255, .35);
}
.wordmark b {
  font-weight: 800;
  color: #5eb0ff;
  margin-left: -0.04em;
  text-shadow: 0 0 8px rgba(94, 176, 255, 1), 0 0 20px rgba(60, 141, 255, .9), 0 0 36px rgba(60, 141, 255, .45);
}
.wordmark-hero { font-size: 96px; }
.auth-hero .brand { display: flex; align-items: center; margin-bottom: 22px; }
.auth-hero .word { font-size: 28px; display: flex; flex-direction: column; line-height: 1; }
.hero-kicker { letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-size: 12px; margin: 0 0 10px; }
.auth-hero h1 { font-family: var(--display); font-size: clamp(42px, 4.6vw, 72px); line-height: .92; margin: 0; max-width: 680px; text-shadow: 0 0 24px rgba(60, 141, 255, .25); }
.hero-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0; }
.hero-board article {
  padding: 16px 16px 14px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(28, 64, 120, .82), rgba(10, 24, 48, .62));
  border: 1px solid rgba(158, 196, 255, .4);
  box-shadow: 0 12px 28px rgba(2, 8, 20, .28), 0 0 18px rgba(60, 141, 255, .22), inset 0 1px 0 rgba(255,255,255,.14);
}
.hero-board strong { display: block; font-family: var(--display); font-size: 26px; margin-bottom: 6px; color: #fff; }
.hero-board span { color: #c5d7f2; font-size: 13px; line-height: 1.45; }
.metro { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 0; padding: 18px 0 0; }
.metro li {
  position: relative; padding-top: 18px; color: #d5e4ff; font-size: 13px; font-weight: 650; letter-spacing: .04em;
}
.metro li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px;
  background: linear-gradient(90deg, #3c8dff, #e2b657);
  box-shadow: 0 0 10px rgba(60, 141, 255, .7);
}
.metro li::after {
  content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px; border-radius: 50%;
  background: #8cbcff; box-shadow: 0 0 12px #3c8dff;
}
.metro li.hot::after { background: #e24b57; box-shadow: 0 0 12px #e24b57; }
.auth-panel { display: grid; place-items: center; padding: 32px; position: relative; }
.auth-panel::before {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(60, 141, 255, .32), rgba(226, 182, 87, .08) 42%, transparent 68%);
}
.auth-card {
  width: min(440px, 100%);
  padding: 32px 30px;
  border-radius: 28px;
  background: linear-gradient(180deg, #1a3d6e 0%, #122848 100%);
  border: 1px solid rgba(226, 182, 87, .42);
  box-shadow: 0 24px 60px rgba(2, 8, 20, .45), 0 0 42px rgba(60, 141, 255, .28), 0 0 0 1px rgba(60, 141, 255, .25);
  position: relative;
  z-index: 1;
  overflow: hidden;
  animation: lift .7s ease both;
}
.auth-card::before { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), var(--blue), var(--red), transparent); }
.auth-brand { display: none; }
.auth-card h2 { font-family: var(--display); font-size: 32px; margin: 0 0 6px; }
.lead { color: var(--dim); margin: 0 0 18px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field span, .kv dt, .card-head span, .muted, .top-title p { color: var(--muted); }
label span, .field > span { font-size: 13px; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 14px;
  background: #071423; border: 1px solid rgba(166, 196, 236, .28); outline: none;
  transition: border .2s, box-shadow .2s, transform .2s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(226, 182, 87, .15); }
.auth-row, .form-actions, .inline-forms, .page-actions, .auth-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.auth-row { justify-content: space-between; margin: 4px 0 16px; font-size: 13px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--dim); white-space: nowrap; }
.check input[type="checkbox"] { width: 16px; min-height: 16px; height: 16px; accent-color: #e2b657; flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(16, 36, 66, .8); cursor: pointer; font-weight: 650; transition: transform .18s, border .18s, background .18s;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(226, 182, 87, .45); }
.btn-primary { background: linear-gradient(135deg, #2f74e6, #1d4fa8); border-color: transparent; color: white; box-shadow: 0 10px 24px rgba(47, 116, 230, .35); position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-120%); }
.btn-primary:hover::after { animation: sheen .7s ease; }
@keyframes sheen { to { transform: translateX(120%); } }
.btn-ghost { background: transparent; }
.btn-danger { color: #ffd0d4; border-color: rgba(226, 75, 87, .45); background: rgba(226, 75, 87, .12); }
.btn-ok { color: #04291c; background: #3dcc9a; border-color: transparent; }
.btn-solid-red { color: white; background: #e24b57; border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.is-loading { opacity: .7; pointer-events: none; }
.ico { width: 18px; height: 18px; }
.auth-actions { justify-content: space-between; margin-top: 14px; }
.auth-foot, .preview-note { color: var(--muted); font-size: 12px; text-align: center; }
.preview-note code, .mono, code, .keylink code { font-family: var(--mono); }
.preview-note code { color: var(--gold-2); }
.ticket {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px 12px 12px 16px; border-radius: 16px; margin: 8px 0 14px;
  background:
    radial-gradient(circle at left center, transparent 8px, rgba(8, 18, 34, .9) 9px);
  border: 1px dashed rgba(226, 182, 87, .55);
}
.ticket span, .ticket-lg span { display: block; color: var(--gold); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.ticket code, .ticket-lg code { font-size: 18px; letter-spacing: .08em; }
.ticket-lg { padding: 16px; }
.demo-notes { margin: 0 0 16px; padding-left: 18px; color: var(--dim); }
.code { background: #07111f; border-radius: 14px; padding: 14px; overflow: auto; border: 1px solid var(--line); color: var(--gold-2); }

.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); position: sticky; top: 0; height: 100vh; padding: 18px 12px;
  display: flex; flex-direction: column;
  background: #0b1830;
  border-right: 1px solid rgba(140, 176, 230, .12);
}
.sidebar::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3px; z-index: 4; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, #8cbcff 18%, #e2b657 42%, #e24b57 62%, #3c8dff 82%, transparent 100%);
  background-size: 100% 220%;
  animation: railglow 4.2s linear infinite;
  box-shadow: 0 0 12px #8cbcff, 0 0 26px rgba(126, 182, 255, .85), 0 0 8px rgba(226, 182, 87, .55);
}
@keyframes railglow { from { background-position: 0 -40%; } to { background-position: 0 180%; } }
.sidebar .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 2px 4px 16px; }
.logo-plate {
  display: inline-flex; padding: 12px 16px 14px; border-radius: 18px; position: relative;
  background: linear-gradient(165deg, rgba(32, 70, 124, .72), rgba(10, 24, 48, .35));
  border: 1px solid rgba(158, 196, 255, .35);
  box-shadow: 0 12px 28px rgba(2, 8, 20, .35), 0 0 24px rgba(60, 141, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.logo-plate::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 7px; height: 2px; border-radius: 99px;
  background: linear-gradient(90deg, transparent, #3c8dff, #e2b657, #e24b57, transparent);
  background-size: 200% 100%; animation: sweep 6s linear infinite;
}
.logo-plate .wordmark { font-size: 40px; }
.sidebar .brand > small { letter-spacing: .22em; text-transform: uppercase; font-size: 10px; color: var(--muted); padding-left: 4px; }
.sidebar .word { display: flex; flex-direction: column; font-size: 20px; line-height: 1; }
.sidebar .word small, .who small, .person small { display: block; letter-spacing: .16em; font-size: 10px; color: var(--muted); font-family: var(--font); font-weight: 500; }
.nav { overflow: auto; padding: 2px 8px 8px 4px; }
.nav-label { margin: 16px 10px 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.nav-item, .side-logout button {
  position: relative; overflow: hidden;
  width: 100%; display: flex; align-items: center; gap: 10px;
  margin: 6px 0; padding: 8px 12px 8px 8px; border-radius: 16px;
  color: #f4f8ff; background: linear-gradient(180deg, #1c3d72, #10264a);
  border: 1px solid rgba(158, 196, 255, .45);
  box-shadow: 0 6px 0 #07111f, 0 0 16px rgba(60, 141, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .18);
  cursor: pointer; text-align: left; font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.nav-item .ico, .side-logout .ico {
  width: 32px; height: 32px; padding: 7px; flex: none; border-radius: 11px;
  background: radial-gradient(circle at 30% 30%, #2d6ed4, #0b1d3b);
  color: #eaf3ff;
  box-shadow: inset 0 0 0 1px rgba(180, 214, 255, .7), 0 0 14px rgba(80, 160, 255, .85);
}
.nav-item em {
  margin-left: auto; font-style: normal; font-weight: 800;
  background: linear-gradient(180deg, #ffe7a8, #e2b657); color: #1a1404; border-radius: 99px; padding: 2px 8px; font-size: 12px;
  box-shadow: 0 0 14px rgba(226, 182, 87, 1);
}
.nav-item:hover {
  transform: translateY(-1px);
  border-color: #b9d4ff;
  box-shadow: 0 8px 0 #07111f, 0 0 22px rgba(80, 160, 255, .75), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.nav-item:hover .ico { box-shadow: inset 0 0 0 1px white, 0 0 16px #8cbcff; }
.nav-item.active {
  color: white;
  background: linear-gradient(180deg, #3d86f5, #1a4eaa);
  border-color: #f6dc9a;
  box-shadow: 0 7px 0 #0a2248, 0 0 28px rgba(80, 160, 255, 1), 0 0 18px rgba(226, 182, 87, .8), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.nav-item.active::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .4), transparent 62%);
  transform: translateX(-130%);
  animation: sheen 2.2s ease infinite;
}
.nav-item.active .ico {
  color: #1a1404; background: radial-gradient(circle at 30% 30%, #fff6d4, #e2b657);
  box-shadow: 0 0 16px rgba(246, 220, 154, 1), inset 0 0 0 1px #fff;
}
.side-logout { margin-top: auto; width: 100%; }
.side-logout button:hover {
  border-color: #ff8b94;
  box-shadow: 0 8px 0 #07111f, 0 0 20px rgba(226, 75, 87, .7), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.side-logout button:hover .ico { color: #ffd0d4; background: radial-gradient(circle at 30% 30%, #e24b57, #3a1016); box-shadow: 0 0 14px rgba(226, 75, 87, .9); }
.main { flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px;
  padding: 14px 22px; backdrop-filter: blur(16px);
  background: rgba(7, 17, 31, .72); border-bottom: 1px solid var(--line);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), var(--blue), var(--red), transparent); background-size: 200% 100%; animation: sweep 8s linear infinite; }
@keyframes sweep { from { background-position: 0 0; } to { background-position: 200% 0; } }
.top-title { min-width: 140px; }
.top-title p { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.top-title h1 { margin: 0; font-size: 18px; font-family: var(--display); }
.search { margin-left: auto; position: relative; width: min(360px, 34vw); }
.search input { padding-left: 40px; border-radius: 999px; }
.search .ico { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.token-pill, .who, .icon-btn {
  display: flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(16, 35, 63, .75); padding: 6px 12px;
}
.token-pill strong { color: var(--gold-2); font-family: var(--display); }
.token-pill span, .who small { letter-spacing: 0; text-transform: none; }
.icon-btn { width: 42px; height: 42px; padding: 0; justify-content: center; position: relative; }
.dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--red); top: 8px; right: 8px; box-shadow: 0 0 0 3px #10233f; }
.avatar, .stop { display: grid; place-items: center; border-radius: 50%; font-weight: 700; }
.avatar { width: 34px; height: 34px; font-size: 12px; }
.who b, .person b { display: block; font-size: 13px; }
.hamburger { display: none; }
.content { padding: 26px 26px 80px; max-width: 1240px; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
.page-head h2 { margin: 0; font-family: var(--display); font-size: 34px; letter-spacing: -.03em; }
.page-head p { margin: 4px 0 0; color: var(--dim); }
.kicker { letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-size: 11px; margin: 0 0 8px; }
.stats, .split, .stack { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.split { grid-template-columns: 1.4fr .8fr; margin-bottom: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 16px 40px rgba(2, 8, 20, .25); overflow: hidden;
}
.card-pad { padding: 18px; }
.card-head, .thread-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-head h3, .stack-form h3, .danger-zone h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card-head a { color: var(--gold-2); font-size: 13px; }
.stat { padding: 18px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.tone-blue::after { background: linear-gradient(90deg, var(--blue), transparent); }
.tone-gold::after { background: linear-gradient(90deg, var(--gold), transparent); }
.tone-red::after { background: linear-gradient(90deg, var(--red), transparent); }
.stat span, .stat em { color: var(--dim); font-style: normal; font-size: 13px; }
.stat strong, .balance strong, .donut b { display: block; font-family: var(--display); font-size: 40px; letter-spacing: -.04em; margin: 8px 0; }
.chart { width: 100%; height: auto; }
.chart .area { fill: url(#fillA); }
.chart .line { fill: none; stroke: var(--blue-2); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 1.4s ease forwards; }
.chart circle { fill: var(--blue); stroke: #07111f; stroke-width: 2; }
.chart circle.peak { fill: var(--gold); }
.chart text { fill: var(--muted); font-size: 11px; text-anchor: middle; font-family: var(--font); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.list a, .list > div, .thread-link { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.list a:hover, .thread-link:hover, .thread-link.active { background: rgba(60, 141, 255, .08); }
.thread-link { flex-wrap: wrap; }
.thread-link small, .empty { color: var(--muted); }
.empty { padding: 22px; text-align: center; }
.mix { padding: 8px 16px 16px; }
.mix-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.mix-row i, .legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 650; border: 1px solid transparent; }
.badge-ok { color: #8ef0cb; background: rgba(61, 204, 154, .12); }
.badge-gold { color: var(--gold-2); background: rgba(226, 182, 87, .12); }
.badge-blue { color: var(--blue-2); background: rgba(60, 141, 255, .14); }
.badge-red { color: #ffb4ba; background: rgba(226, 75, 87, .14); }
.badge-muted { color: var(--dim); background: rgba(255,255,255,.04); }
.role-1 { background: linear-gradient(135deg, #e2b657, #8a6a22); color: #1a1406; }
.role-2 { background: linear-gradient(135deg, #8cbcff, #2457a8); }
.role-3 { background: linear-gradient(135deg, #3c8dff, #163e86); }
.role-4 { background: linear-gradient(135deg, #3dcc9a, #146b52); }
.role-5 { background: linear-gradient(135deg, #e24b57, #8d2430); }
.role-6 { background: linear-gradient(135deg, #8ea0bb, #44526b); }
.role-pill { border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px; border-radius: 14px; background: rgba(8,18,34,.45); border: 1px solid var(--line); }
.tabs a { padding: 7px 10px; border-radius: 10px; color: var(--dim); font-size: 13px; }
.tabs a.active { background: rgba(60,141,255,.2); color: white; box-shadow: inset 0 -2px 0 var(--gold); }
.grow { flex: 1; }
.table-wrap { overflow: auto; }
.table-fit table { min-width: 0; }
.table-fit th, .table-fit td { white-space: normal; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
tbody tr { transition: background .18s, transform .18s; }
tbody tr:hover { background: rgba(60, 141, 255, .08); }
.keylink code { color: var(--gold-2); }
.person { display: flex; gap: 10px; align-items: center; }
.num, .pos { color: var(--gold-2); font-variant-numeric: tabular-nums; }
.neg { color: #ffb4ba; }
.pager { display: flex; gap: 6px; justify-content: flex-end; margin-top: 12px; }
.pager a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); }
.pager .current { background: var(--blue); border-color: transparent; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.span-2 { grid-column: 1 / -1; }
.opt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.opt { border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; cursor: pointer; background: rgba(5,12,24,.35); }
.opt input { display: none; }
.opt.selected { border-color: var(--gold); background: rgba(226, 182, 87, .1); box-shadow: 0 0 0 3px rgba(60, 141, 255, .15); }
.opt b, .opt small { display: block; }
.opt small { color: var(--gold-2); }
.compact { grid-template-columns: repeat(2, 1fr); margin-bottom: 12px; }
.cost-box { border: 1px solid rgba(226,182,87,.35); border-radius: 16px; padding: 12px; }
.cost-box strong { font-family: var(--display); font-size: 32px; color: var(--gold-2); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 16px 0 0; }
.kv-wide { grid-template-columns: 140px 1fr; margin-top: 8px; }
.kv dt { margin: 0; }
.kv dd { margin: 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.life-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.life-actions form { margin: 0; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions form { margin: 0; }
.icon-btn.tiny { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn.danger { color: #ffb4ba; border-color: rgba(226, 75, 87, .55); }
.clip { display: inline-block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.head-badge { display: inline-flex; }
.stack { align-content: start; }
.stack-form, .danger-zone { display: flex; flex-direction: column; gap: 8px; }
.inline-pass { display: flex; gap: 8px; }
.inline-pass input { min-width: 160px; }
.who.lg { width: fit-content; margin-bottom: 10px; }
.mt { margin-top: 16px; }
.metro .station { position: relative; margin-left: 12px; }
.station-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; }
.station-row span { flex: 1; }
.station-row small { display: block; color: var(--muted); font-size: 12px; }
.stop { width: 16px; height: 16px; box-shadow: 0 0 0 5px rgba(226, 182, 87, .12); }
.branch { margin-left: 18px; padding-left: 16px; border-left: 2px solid rgba(60, 141, 255, .45); }
.halted .stop { box-shadow: 0 0 0 5px rgba(226, 75, 87, .18); }
.inbox { display: grid; grid-template-columns: 320px 1fr; gap: 16px; min-height: 520px; }
.thread { display: flex; flex-direction: column; gap: 10px; padding: 16px; max-height: 460px; overflow: auto; }
.bubble { max-width: 78%; padding: 10px 12px; border-radius: 16px; background: rgba(8, 20, 38, .7); border: 1px solid var(--line); }
.bubble header { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.bubble p { margin: 6px 0 0; white-space: pre-wrap; }
.bubble.me { margin-left: auto; background: linear-gradient(180deg, rgba(47,116,230,.28), rgba(16,36,66,.8)); border-color: rgba(140,188,255,.35); }
.bubble.them { border-left: 2px solid var(--gold); }
.reply { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.reply textarea { min-height: 64px; }
.thread-empty { padding: 40px 20px; color: var(--dim); }
.balance strong { color: var(--gold-2); }
.donut-card { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; }
.donut { width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; }
.donut div { width: 108px; height: 108px; border-radius: 50%; background: #0d1b32; display: grid; place-items: center; text-align: center; }
.donut span { color: var(--muted); font-size: 12px; }
.legend { list-style: none; margin: 0; padding: 0; text-transform: capitalize; }
.legend li { display: flex; gap: 8px; align-items: center; padding: 4px 0; color: var(--dim); }
.legend b { margin-left: auto; color: white; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 28px; gap: 8px; align-items: center; margin: 8px 0; font-size: 13px; }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--gold)); transform-origin: left; animation: grow .8s ease; }
@keyframes grow { from { transform: scaleX(0); } }
.alert { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; border: 1px solid transparent; animation: lift .4s ease; }
.alert-success { background: rgba(61, 204, 154, .12); color: #b9ffe4; }
.alert-error { background: rgba(226, 75, 87, .12); color: #ffd0d4; border-color: rgba(226,75,87,.3); }
.alert-info { background: rgba(60, 141, 255, .12); }
.alert.leave { opacity: 0; transition: opacity .4s; }
.issued-list { display: grid; gap: 8px; }
.bottom-nav { display: none; }
.overlay { position: fixed; inset: 0; background: rgba(2, 6, 14, .62); z-index: 20; }
.modal-back { position: fixed; inset: 0; background: rgba(2,6,14,.62); display: grid; place-items: center; z-index: 30; padding: 20px; }
.modal { width: min(420px, 100%); background: #10233f; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); animation: pop .22s ease; }
.modal h3 { margin: 0 0 8px; font-family: var(--display); }
.modal p { color: var(--dim); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
@keyframes lift { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.rise > * { animation: lift .55s ease both; }
.rise > *:nth-child(2) { animation-delay: .05s; }
.rise > *:nth-child(3) { animation-delay: .1s; }
.rise > *:nth-child(4) { animation-delay: .15s; }
.rise > *:nth-child(5) { animation-delay: .2s; }

.section-label { margin: 8px 0 12px; font-size: 15px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.role-card, .status-row a.stat { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.role-card strong { font-family: var(--display); font-size: 32px; }
.role-card em { font-style: normal; color: var(--muted); font-size: 13px; }
.role-card .ok { color: var(--ok); font-weight: 650; }
.role-card .bad { color: #ffb4ba; font-weight: 650; }
.role-card:hover { border-color: rgba(226, 182, 87, .45); }
.notify { position: relative; }
.notify summary { list-style: none; }
.notify summary::-webkit-details-marker { display: none; }
.notify-pop { position: absolute; right: 0; top: 48px; width: 280px; padding: 10px; border-radius: 14px; background: #10284a; border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 8; }
.notify-pop p { margin: 0; padding: 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.notify-pop span { color: var(--muted); font-size: 12px; }
.role-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hint { color: var(--muted); font-size: 12px; }
.mb { margin-bottom: 12px; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.success-shot { margin: 0; }
.shot-frame {
  position: relative; overflow: hidden; border-radius: 22px; padding: 16px 16px 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(226, 75, 87, .22), transparent 32%),
    linear-gradient(165deg, #1a3d6e 0%, #10233f 58%, #0c1b33 100%);
  border: 1px solid rgba(226, 182, 87, .42);
  box-shadow: 0 16px 36px rgba(2, 8, 20, .35);
  animation: lift .45s ease both;
}
.shot-frame::before, .shot-frame::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); top: 58px;
}
.shot-frame::before { left: -9px; }
.shot-frame::after { right: -9px; }
.shot-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.shot-top span { font-family: var(--display); letter-spacing: .16em; font-size: 12px; color: var(--gold); }
.shot-top em {
  font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #b9ffe4;
  padding: 4px 8px; border-radius: 999px; background: rgba(61, 204, 154, .14); border: 1px solid rgba(61, 204, 154, .35);
}
.shot-pnr { margin: 12px 0 8px; }
.shot-pnr small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.shot-pnr strong { font-family: var(--mono); font-size: 22px; color: var(--gold-2); letter-spacing: .04em; }
.shot-route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin: 8px 0 12px; }
.shot-route b { display: block; font-family: var(--display); font-size: 26px; line-height: 1; }
.shot-route small { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.shot-route > div:last-child { text-align: right; }
.shot-line { width: 84px; text-align: center; }
.shot-line i { display: block; height: 2px; margin-bottom: 4px; background: linear-gradient(90deg, transparent, var(--gold), var(--blue-2), var(--red), transparent); position: relative; }
.shot-line i::after { content: ""; position: absolute; top: -3px; width: 22px; height: 8px; border-radius: 8px; background: var(--gold); animation: train 2.8s linear infinite; }
.shot-line span { font-family: var(--mono); font-size: 12px; color: var(--blue-2); }
.shot-meta { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px dashed rgba(226, 182, 87, .35); display: grid; gap: 6px; }
.shot-meta li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.shot-meta span { color: var(--muted); }
.shot-frame footer { margin-top: 10px; color: var(--dim); font-size: 12px; }
.shot-cell { min-width: 280px; vertical-align: top; }
.shot-cell .shot-frame { box-shadow: none; }
.img-cell { width: 204px; vertical-align: middle; }
.shot-thumb { width: 176px; }
.shot-thumb .shot-frame { padding: 10px 10px 9px; border-radius: 14px; box-shadow: none; }
.shot-thumb .shot-frame::before, .shot-thumb .shot-frame::after { width: 11px; height: 11px; top: 40px; }
.shot-thumb .shot-top span { font-size: 9px; letter-spacing: .14em; }
.shot-thumb .shot-top em { font-size: 8px; padding: 2px 6px; }
.shot-thumb .shot-pnr { margin: 7px 0 5px; }
.shot-thumb .shot-pnr small { font-size: 8px; }
.shot-thumb .shot-pnr strong { font-size: 13px; }
.shot-thumb .shot-route { gap: 4px; margin: 6px 0 7px; }
.shot-thumb .shot-route b { font-size: 14px; }
.shot-thumb .shot-route small { font-size: 8px; }
.shot-thumb .shot-line { width: 38px; }
.shot-thumb .shot-line i::after { width: 12px; height: 6px; top: -2px; }
.shot-thumb .shot-line span { font-size: 9px; }
.shot-thumb .shot-meta { padding-top: 6px; gap: 2px; }
.shot-thumb .shot-meta li { font-size: 10px; }
.board-page { padding: 28px; }
.board-banner { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 8px; }
.board-banner p { margin: 0; letter-spacing: .18em; color: var(--gold); font-size: 12px; }
.board-banner h1 { margin: 0; font-family: var(--display); }
.board-actions { display: flex; gap: 10px; margin-top: 18px; }
.board-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.board-block + .board-block { margin-top: 42px; padding-top: 34px; border-top: 1px dashed rgba(226, 182, 87, .3); }
.board-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 2px; }
.board-block-head span { font-family: var(--display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.board-block-head em { font-style: normal; font-size: 12px; color: var(--muted); }
.print { padding: 28px; background: #07111f; }
.print table { width: 100%; border-collapse: collapse; }
.print td, .print th { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
@media (max-width: 980px) {
  .role-grid { grid-template-columns: 1fr 1fr; }
  .auth-split, .stats, .split, .inbox, .donut-card, .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { padding: 16px; }
  .auth-card { width: 100%; padding: 22px 16px; }
  .auth-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
  .auth-brand .wordmark { font-size: 48px; }
  .auth-brand small { color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: 10px; }
  .opt-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { position: fixed; z-index: 25; transform: translateX(-105%); transition: transform .28s ease; }
  .sidebar.open { transform: none; }
  .hamburger { display: inline-flex; }
  .main { margin-left: 0; }
  .search { display: none; }
  .who span:last-child, .top-title p { display: none; }
  .content { padding: 18px 14px 110px; }
  .bottom-nav {
    display: flex; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 15;
    justify-content: space-around; padding: 8px; border-radius: 18px;
    background: rgba(10, 22, 42, .92); border: 1px solid var(--line); backdrop-filter: blur(12px);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 8px; }
  .bottom-nav a.active { color: var(--gold-2); }
}
.gate {
  min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 520px at 50% 28%, rgba(36, 78, 160, .28), transparent 62%),
    radial-gradient(640px 420px at 8% 88%, rgba(226, 75, 87, .08), transparent 58%),
    radial-gradient(560px 360px at 92% 8%, rgba(226, 182, 87, .07), transparent 55%),
    #050814;
}
.gate-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 16%, #fff, transparent),
    radial-gradient(1px 1px at 18% 42%, rgba(255,255,255,.75), transparent),
    radial-gradient(1.6px 1.6px at 27% 12%, #d7e7ff, transparent),
    radial-gradient(1px 1px at 36% 72%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.2px 1.2px at 44% 28%, #fff, transparent),
    radial-gradient(1px 1px at 53% 84%, rgba(226,182,87,.85), transparent),
    radial-gradient(1.5px 1.5px at 63% 18%, #fff, transparent),
    radial-gradient(1px 1px at 71% 46%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.3px 1.3px at 79% 74%, #d7e7ff, transparent),
    radial-gradient(1px 1px at 88% 22%, rgba(255,255,255,.8), transparent),
    radial-gradient(1.2px 1.2px at 94% 58%, rgba(226,75,87,.7), transparent),
    radial-gradient(1px 1px at 14% 88%, rgba(255,255,255,.65), transparent),
    radial-gradient(1.4px 1.4px at 32% 54%, #fff, transparent),
    radial-gradient(1px 1px at 58% 6%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 76% 92%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.2px 1.2px at 4% 36%, #fff, transparent),
    radial-gradient(1px 1px at 48% 62%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.5px 1.5px at 22% 24%, rgba(226,182,87,.75), transparent);
  background-repeat: no-repeat;
}
.sparks { position: absolute; inset: 0; pointer-events: none; }
.sparks i {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #9ec4ff; box-shadow: 0 0 12px #3c8dff;
  animation: floaty 6.5s ease-in-out infinite;
}
.sparks i:nth-child(1) { left: 14%; top: 22%; }
.sparks i:nth-child(2) { left: 82%; top: 16%; background: #e2b657; box-shadow: 0 0 12px #e2b657; animation-delay: -1.4s; }
.sparks i:nth-child(3) { left: 8%; top: 70%; animation-delay: -2.6s; }
.sparks i:nth-child(4) { left: 88%; top: 68%; background: #e24b57; box-shadow: 0 0 12px #e24b57; animation-delay: -3.2s; }
.sparks i:nth-child(5) { left: 48%; top: 10%; animation-delay: -4s; }
.sparks i:nth-child(6) { left: 62%; top: 86%; background: #e2b657; box-shadow: 0 0 12px #e2b657; animation-delay: -2s; }
@keyframes floaty { 50% { transform: translateY(-18px); opacity: .35; } }
.gate-wrap { position: relative; z-index: 1; width: min(440px, calc(100vw - 32px)); text-align: center; padding: 12px 0 40px; }
.brand-lockup { display: flex; flex-direction: column; align-items: center; margin-bottom: 8px; }
.logo-fuse {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
}
.train-watermark {
  width: 132px; height: auto; display: block; flex: none;
  filter: drop-shadow(0 0 14px rgba(60, 141, 255, .5));
}
.wordmark-gate {
  font-size: clamp(48px, 11vw, 64px);
  line-height: .8;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 10px rgba(255, 255, 255, .45), 0 0 22px rgba(60, 141, 255, .35);
}
.gate-kicker { margin: 2px 0 18px; letter-spacing: .32em; text-transform: uppercase; color: #9eb4d4; font-size: 12px; }
.gate-card {
  text-align: left; padding: 22px 22px 18px; border-radius: 22px;
  background: rgba(10, 18, 36, .78);
  border: 1px solid rgba(150, 186, 240, .32);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45), 0 0 36px rgba(60, 141, 255, .18);
  backdrop-filter: blur(10px);
}
.gate-card h2 { margin: 0 0 14px; font-family: var(--display); font-size: 28px; }
.gate-card .field > span:first-child { letter-spacing: .16em; text-transform: uppercase; font-size: 11px; color: #9eb4d4; }
.gate-input { position: relative; display: block; }
.gate-input .ico { position: absolute; left: 14px; top: 14px; color: #8cbcff; pointer-events: none; }
.gate-input input, .gate-input select { padding-left: 42px; background: #070d18; border-color: rgba(150, 186, 240, .28); }
.gate-input select {
  appearance: none; cursor: pointer; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, #8cbcff 50%), linear-gradient(135deg, #8cbcff 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.gate-input select:required:invalid { color: #9eb4d4; }
.reveal {
  position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border: 0; border-radius: 10px;
  background: transparent; color: #9eb4d4; cursor: pointer; display: grid; place-items: center;
}
.gate-check { margin: 2px 0 16px; }
.btn-gate {
  width: 100%; min-height: 52px; border: 0; border-radius: 14px; color: #07111f; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(90deg, #3c8dff, #e2b657);
  box-shadow: 0 0 24px rgba(226, 182, 87, .4), 0 12px 28px rgba(60, 141, 255, .35);
}
.btn-gate:hover { transform: translateY(-1px); border-color: transparent; }
.gate-actions { display: grid; gap: 10px; margin-top: 12px; }
.btn-setup, .btn-demo { width: 100%; min-height: 44px; font: inherit; }
.btn-setup { border-color: rgba(140, 188, 255, .55); box-shadow: 0 0 16px rgba(60, 141, 255, .25); }
.btn-demo { border-color: rgba(226, 182, 87, .6); color: #f6dc9a; box-shadow: 0 0 16px rgba(226, 182, 87, .22); }
.demo-slip {
  margin-top: 2px; padding: 14px; border-radius: 16px; text-align: left;
  background: rgba(10, 18, 36, .78);
  border: 1px solid rgba(226, 182, 87, .5);
  box-shadow: 0 0 18px rgba(226, 182, 87, .16);
}
.demo-slip span { display: block; letter-spacing: .16em; text-transform: uppercase; font-size: 11px; color: #f6dc9a; }
.demo-slip code { display: block; margin: 8px 0 10px; font-size: 16px; letter-spacing: .06em; color: #fff; word-break: break-all; }
.demo-slip .btn { width: 100%; }
.demo-slip p { margin: 8px 0 0; color: #9eb4d4; font-size: 12px; }
.demo-hint { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.demo-hint a, .demo-hint b { color: #9fd0ff; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
