/* Salary CRM — dark sidebar, lime accent, warm neutral canvas. */
:root {
  --bg: #f3f3ef;
  --panel: #ffffff;
  --panel-2: #f8f8f5;
  --ink: #121214;
  --ink-2: #3a3a40;
  --muted: #74737c;
  --line: #e6e5df;
  --line-2: #efeee9;
  --side: #0c0c0e;
  --side-ink: #9d9da6;
  --side-hover: #1a1a1e;
  --lime: #c8f031;
  --lime-soft: #f2fbd4;
  --lime-ink: #4d6b00;
  --indigo: #6366f1;
  --green: #15803d;
  --green-soft: #e3f6e8;
  --red: #dc2626;
  --red-soft: #fde8e8;
  --amber: #c2410c;
  --amber-soft: #fff1e3;
  --blue: #1d4ed8;
  --blue-soft: #e4ecfd;
  --violet: #7c3aed;
  --violet-soft: #efe8fd;
  --teal: #0f766e;
  --teal-soft: #ddf3f0;
  --radius: 16px;
  --radius-sm: 12px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", Inter, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f0f11; --panel: #17171a; --panel-2: #1c1c20; --ink: #f1f1ee; --ink-2: #c9c9c4; --muted: #8e8e97;
  --line: #2a2a2f; --line-2: #222227; --side: #08080a; --side-hover: #18181c;
  --lime-soft: #26300c; --lime-ink: #c8f031;
  --green: #4ade80; --green-soft: #12301d; --red: #f87171; --red-soft: #3a1717; --amber: #fb923c; --amber-soft: #3a2410;
  --blue: #7aa2ff; --blue-soft: #18233f; --violet: #b49cff; --violet-soft: #271d40; --teal: #4fd1c5; --teal-soft: #0f2d2a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.015em; }
h1 { font-size: 26px; font-weight: 600; }
h2 { font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.neg { color: var(--red); }
.pos { color: var(--green); }
svg.i { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; z-index: 40; }
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 22px 24px; }
.brand .wordmark { display: block; color: #fff; font: 700 28px/1 var(--display); letter-spacing: -.02em; }
.logo { width: 38px; height: 38px; border-radius: 10px; background: var(--lime); color: #111; display: grid; place-items: center; font: 800 20px var(--display); }
.brand b { display: block; color: #fff; font: 700 16px var(--display); letter-spacing: .01em; }
.brand span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7d7d86; }
.nav-group { padding: 0 12px 10px; }
.nav-group > div { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #6b6b74; padding: 10px 10px 8px; }
.nav-group a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--side-ink); font-weight: 500; margin-bottom: 2px; }
.nav-group a:hover { background: var(--side-hover); color: #e9e9ec; }
.nav-group a.active { background: #1c1c21; color: #fff; }
.nav-group a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--lime); }
.nav-group a.active svg { color: var(--lime); }
.count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 20px; background: var(--lime); color: #111; font-size: 11px; font-weight: 700; text-align: center; }
.count.red { background: #ef4444; color: #fff; }
.side-foot { margin: auto 14px 14px; padding: 12px 14px; border-radius: 12px; background: #141417; border: 1px solid #1f1f24; font-size: 12px; }
.side-foot .row1 { display: flex; align-items: center; gap: 7px; color: #e6e6ea; font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: none; }
.dot.off { background: #f59e0b; }
.side-foot .row2 { color: #7d7d86; margin-top: 3px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crumbs { min-width: 0; }
.crumbs small { display: block; font-size: 12px; color: var(--muted); }
.crumbs b { display: block; font: 600 15px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .spacer { flex: 1; }
.search { position: relative; width: min(380px, 40vw); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 40px; padding: 0 64px 0 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; }
.search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime-soft); }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--panel-2); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--ink); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); cursor: pointer; position: relative; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--font); color: #fff; background: linear-gradient(135deg, #0ea5e9, #6366f1); flex: none; }
.user-chip b { display: block; font-size: 13px; line-height: 1.1; }
.user-chip small { display: block; font-size: 11.5px; color: var(--muted); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.12); padding: 6px; z-index: 60; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--panel-2); }
.menu-btn { display: none; }

.content { padding: 26px 28px 60px; width: 100%; max-width: 1440px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: border-color .15s, box-shadow .15s, background .15s; }
.btn:hover { border-color: var(--ink); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--lime-soft); border-color: var(--ink); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: #111; }
.btn.lime:hover { box-shadow: 0 0 0 3px var(--lime-soft); border-color: #a9cf1c; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.link { color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { color: var(--ink); }

/* ---------- Cards & stats ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 16px; }
.stat { position: relative; overflow: hidden; }
.stat .lbl { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.stat .lbl svg { width: 16px; height: 16px; }
.stat .val { font: 600 30px/1.1 var(--display); letter-spacing: -.02em; margin: 14px 0 10px; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; position: relative; z-index: 1; }
.stat .hint b { color: var(--ink); font-weight: 600; }
.stat .spark { position: absolute; right: 14px; bottom: 14px; width: 96px; height: 38px; }
.stat.hero { background: #121214; border-color: #121214; color: #fff; }
.stat.hero::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(168deg, rgba(255,255,255,.045) 0 12px, transparent 12px 26px); }
.stat.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 240px; height: 200px; background: radial-gradient(closest-side, rgba(200,240,49,.22), transparent); }
.stat.hero .lbl, .stat.hero .hint { color: #b9b9c0; position: relative; z-index: 1; }
.stat.hero .val { color: #fff; position: relative; z-index: 1; }
.stat.hero .hint b { color: #fff; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 20px; font-weight: 700; font-size: 12px; background: var(--green-soft); color: var(--green); }
.delta.down { background: var(--red-soft); color: var(--red); }
.stat.hero .delta { background: rgba(200,240,49,.16); color: var(--lime); }
.stat.hero .delta.down { background: rgba(248,113,113,.18); color: #fca5a5; }

/* ---------- Chart ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { font: 11.5px var(--font); fill: var(--muted); }
.chart .grid-line { stroke: var(--line-2); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.chart-tip { position: fixed; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 10px; border-radius: 10px; font-size: 12px; z-index: 90; white-space: nowrap; }

/* ---------- Attention list ---------- */
.att { list-style: none; margin: 0; padding: 0; }
.att li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.att li:last-child { border-bottom: 0; }
.att .tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.att .txt { flex: 1; font-weight: 500; font-size: 13.5px; }
.tile.red { background: var(--red-soft); color: var(--red); }
.tile.amber { background: var(--amber-soft); color: var(--amber); }
.tile.blue { background: var(--blue-soft); color: var(--blue); }
.tile.violet { background: var(--violet-soft); color: var(--violet); }
.tile.teal { background: var(--teal-soft); color: var(--teal); }
.tile.lime { background: var(--lime-soft); color: var(--lime-ink); }
.all-good { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--lime-soft); color: var(--lime-ink); font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
td .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--panel-2); }
tfoot td { font-weight: 700; border-top: 1px solid var(--line); background: var(--panel-2); }
.card:not(.flush) .table-wrap { margin: 0 -20px -20px; }
.card:not(.flush) .table-wrap table th:first-child, .card:not(.flush) .table-wrap table td:first-child { padding-left: 20px; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty svg { width: 28px; height: 28px; margin-bottom: 8px; color: var(--line); stroke-width: 1.5; }

/* ---------- Pills & badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-complete, .b-finalized, .b-ok, .b-connected { background: var(--green-soft); color: var(--green); border-color: transparent; }
.b-refunded, .b-err { background: var(--red-soft); color: var(--red); border-color: transparent; }
.b-cancelled { background: var(--panel-2); color: var(--muted); }
.b-partially_refunded, .b-draft, .b-warn { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.b-processing, .b-info { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.b-admin { background: var(--ink); color: var(--lime); border-color: transparent; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tag i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px; border-bottom: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); font-weight: 500; font-size: 13px; cursor: pointer; color: var(--ink); }
.chip span { color: var(--muted); font-size: 12px; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.on span { color: var(--lime); font-weight: 700; }
.toolbar { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.toolbar .grow { flex: 1; min-width: 200px; position: relative; }
.toolbar .grow svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .grow input { padding-left: 38px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.seg a, .seg button { padding: 6px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 13px; border: 0; background: none; cursor: pointer; }
.seg .on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Forms ---------- */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink-2); }
input, select, textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; }
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime-soft); }
input:disabled, select:disabled { background: var(--panel-2); color: var(--muted); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: #121214; padding: 0; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.form { display: grid; gap: 14px; }
.form.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
.help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.month { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.month input { border: 0; height: 32px; width: 182px; box-shadow: none !important; font-weight: 600; }
.month a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); }
.month a:hover { background: var(--panel-2); color: var(--ink); }

/* ---------- Notices ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; background: var(--lime-soft); color: var(--ink); margin-bottom: 16px; font-size: 13.5px; }
.notice svg { margin-top: 1px; color: var(--lime-ink); }
.notice.warn { background: var(--amber-soft); } .notice.warn svg { color: var(--amber); }
.notice.bad { background: var(--red-soft); } .notice.bad svg { color: var(--red); }
.notice.info { background: var(--blue-soft); } .notice.info svg { color: var(--blue); }
.notice a { text-decoration: underline; font-weight: 600; }

/* ---------- Key/value grid (detail) ---------- */
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kv-grid > div { padding: 12px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.kv-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
.kv-grid > div.full { grid-column: 1 / -1; border-right: 0; }
.kv-grid > div:nth-last-child(-n+2):not(.full), .kv-grid > div:last-child { border-bottom: 0; }
.kv-grid small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.kv-grid b { font-weight: 500; overflow-wrap: anywhere; }
.section-title { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }

/* Progress stepper */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.steps div { font-size: 12px; color: var(--muted); }
.steps div::before { content: ""; display: block; height: 5px; border-radius: 4px; background: var(--line-2); margin-bottom: 7px; }
.steps div.done { color: var(--ink); font-weight: 500; }
.steps div.done::before { background: var(--lime); }
.steps div.bad { color: var(--red); font-weight: 600; }
.steps div.bad::before { background: var(--red); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 17px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.t-bonus::before { background: var(--lime); box-shadow: 0 0 0 1px #9fc21a; }
.timeline li.t-clawback::before, .timeline li.t-bad::before { background: var(--red); }
.timeline li.t-note::before { background: var(--indigo); }
.timeline .when { font-size: 12px; color: var(--muted); }

/* Money lines */
.pay-lines { display: grid; gap: 10px; }
.pay-lines .l { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pay-lines .l span:first-child { color: var(--ink-2); }
.pay-lines .total { margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line); font: 600 20px var(--display); }
.pay-lines .total span:first-child { color: var(--ink); }

/* Bars */
.bar { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 6px; }
.store-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 9px 0; }
.store-row .bar { grid-column: 1 / -1; }
.store-row:first-child .bar i { background: var(--lime); }

/* ---------- Drawer & modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10,10,12,.42); z-index: 70; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--panel); z-index: 71; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.15); animation: slide .2s ease-out; }
.drawer-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head .eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.drawer-head h2 { font: 600 22px var(--display); margin: 4px 0 8px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(10,10,12,.45); animation: fade .15s; }
.modal { width: min(540px, 100%); max-height: 92vh; overflow-y: auto; background: var(--panel); border-radius: 18px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal h2 { font-size: 19px; margin-bottom: 18px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--ink); }

/* Toast */
#toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100% - 40px)); padding: 12px 16px; border-radius: 12px; background: #121214; color: #fff; font-weight: 500; box-shadow: 0 16px 40px rgba(0,0,0,.25); opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
#toast.show { opacity: 1; transform: none; }
#toast .ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--lime); color: #111; flex: none; }
#toast.bad .ic { background: #ef4444; color: #fff; }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; background: #161618; color: #fff; padding: 44px; display: flex; flex-direction: column; }
.auth-art::before { content: ""; position: absolute; inset: -20%; background: repeating-linear-gradient(168deg, rgba(0,0,0,.55) 0 26px, transparent 26px 54px); transform: skewY(-4deg); }
.auth-art::after { content: ""; position: absolute; right: -10%; bottom: -15%; width: 70%; height: 60%; background: radial-gradient(closest-side, rgba(200,240,49,.28), transparent); }
.auth-art > * { position: relative; z-index: 1; }
.auth-art .brand { padding: 0; }
.auth-art h1 { font: 600 clamp(34px, 4.2vw, 54px)/1.06 var(--display); letter-spacing: -.03em; margin-top: auto; max-width: 620px; }
.auth-art h1 em { font-style: normal; color: var(--lime); }
.auth-art p { color: #c4c4ca; font-size: 16px; max-width: 470px; margin: 18px 0 0; }
.auth-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: auto; padding-top: 40px; }
.auth-feats div { padding: 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); backdrop-filter: blur(4px); }
.auth-feats b { display: block; font: 600 16px var(--display); }
.auth-feats span { font-size: 12.5px; color: #a9a9b0; }
.auth-form { display: grid; place-items: center; padding: 32px 24px; background: var(--bg); }
.auth-form > div { width: min(410px, 100%); }
.auth-form h2 { font-size: 28px; }
.auth-form .sub { color: var(--muted); margin: 8px 0 26px; }
.auth-form .btn { width: 100%; height: 46px; }
.auth-form .notice { margin: 18px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .menu-btn { display: grid; }
  .top { padding: 10px 16px; }
  .top .crumbs, .user-chip .who { display: none; }
  .top .spacer { display: none; }
  .search { flex: 1; width: auto; }
  .search kbd { display: none; }
  .content { padding: 18px 16px 60px; }
  .g3, .g2, .form.cols { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 300px; padding: 28px; }
  .auth-feats { display: none; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .kv-grid > div:nth-child(odd) { border-right: 0; }
  .kv-grid > div:nth-last-child(2):not(.full) { border-bottom: 1px solid var(--line); }
  h1 { font-size: 22px; }
}

/* ---------- Live orders ---------- */
.live-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
tr.mine-row td { background: color-mix(in srgb, var(--lime-soft) 55%, transparent); }
tr.mine-row td:first-child { box-shadow: inset 3px 0 0 var(--lime); }
.claim-bar { background: var(--panel-2); align-items: center; }
