/* РЕЙС cabinet — bold dark design system.
   Deep graphite shell, glowing amber accent, cyan data accent.
   Type: Fira Sans (UI) + Fira Code (numbers/.num). */

:root {
  --amber: #f5a623;
  --amber-2: #ffb838;
  --amber-ink: #0e1116;
  --cyan: #38d6c4;
  --violet: #8b8bff;

  --bg: #0d1015;
  --surface: #161b24;
  --surface-2: #1a212c;
  --surface-3: #222b39;
  --border: #262f3e;
  --border-2: #34405380;

  --ink: #eef2f8;
  --ink-2: #aeb8c7;
  --ink-3: #6d7889;

  --ok: #34d399; --ok-bg: #0f2a23;
  --warn: #fbbf24; --warn-bg: #2e2410;
  --danger: #fb7185; --danger-bg: #2e1620;
  --info: #60a5fa; --info-bg: #122036;
  --muted: #9aa6b6; --muted-bg: #1f2733;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.35);
  --glow: 0 0 0 1px rgba(245,166,35,.35), 0 8px 30px rgba(245,166,35,.18);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 540px at 78% -8%, rgba(245,166,35,.10), transparent 60%),
    radial-gradient(900px 500px at 8% 4%, rgba(56,214,196,.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
.num { font-family: "Fira Code", ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }

/* ---------------------------------------------------------------- layout */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: linear-gradient(180deg, #0b0e13 0%, #0d1118 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 22px 22px 18px; font-weight: 700; font-size: 21px; letter-spacing: .5px; color: #fff;
}
.brand .dot { width: 11px; height: 11px; border-radius: 3px; background: var(--amber);
  box-shadow: 0 0 16px var(--amber), 0 0 4px var(--amber); }

.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-section { margin-top: 18px; }
.nav-section > .label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px; color: #58626f; padding: 6px 12px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 2px 0; border-radius: var(--radius-sm);
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  transition: background .16s ease, color .16s ease;
}
.nav-item:hover { background: var(--surface-2); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(245,166,35,.16), rgba(245,166,35,.04));
  color: var(--amber-2);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--amber); box-shadow: 0 0 12px var(--amber);
}
.nav-item.active .ic { color: var(--amber-2); }
.nav-item .ic { width: 18px; height: 18px; color: #707b8b; flex-shrink: 0; }

.sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--amber-2), var(--amber)); color: var(--amber-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 14px rgba(245,166,35,.3);
}
.sidebar-foot .who { line-height: 1.25; min-width: 0; }
.sidebar-foot .who b { color: #fff; font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who span { color: var(--ink-3); font-size: 12px; }
.sidebar-foot a.logout { margin-left: auto; color: #707b8b; display: grid; place-items: center; padding: 7px; border-radius: 9px; transition: .16s; }
.sidebar-foot a.logout:hover { color: var(--amber); background: var(--surface-2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 30px;
  background: rgba(13,16,21,.7); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.3px; }
.topbar .sub { color: var(--ink-3); font-size: 13px; }
.topbar .spacer { flex: 1; }
.company-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  padding: 8px 13px; border-radius: 999px; font-size: 13px; color: var(--ink-2); font-weight: 500;
}
.company-chip .ic { width: 15px; height: 15px; color: var(--amber); }

/* notification bell + feed */
.topbell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--ink-2); flex: none; }
.topbell:hover { background: var(--surface-3); color: #fff; }
.topbell .ic { width: 17px; height: 17px; }
.topbell-badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #2a0b12; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.notif-row { display: flex; align-items: center; gap: 13px; padding: 15px 18px; border-bottom: 1px solid var(--border); color: var(--ink); }
.notif-row:last-child { border-bottom: 0; }
.notif-row:hover { background: var(--surface-2); }
.notif-title { flex: 1; font-weight: 500; }
.company-chip select { color: var(--ink); cursor: pointer; }
/* Native <select> dropdowns render <option>s with system colors, which are
   unreadable (dark-on-dark) in this dark theme. Force readable colors on every
   option across the app (company switcher + all forms). */
select option,
select optgroup {
  background: var(--surface-2);
  color: var(--ink);
}

.topsearch { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 999px; padding: 7px 14px; }
.topsearch .ic { width: 15px; height: 15px; color: var(--ink-3); }
.topsearch input { background: transparent; border: 0; outline: none; color: var(--ink); font: inherit; font-size: 13px; width: 180px; }
.topsearch input::placeholder { color: var(--ink-3); }
.topsearch:focus-within { border-color: var(--amber); }
@media (max-width: 900px) { .topsearch { display: none; } }

.content { padding: 26px 30px 48px; max-width: 1340px; width: 100%; }

/* ---------------------------------------------------------------- cards */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: rise .4s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card-pad { padding: 20px 22px; }
.card h2 { margin: 0 0 16px; font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h2 { margin: 0; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.col-span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } .col-span-2 { grid-column: auto; } }

/* ---------------------------------------------------------------- KPI */
.kpi { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; overflow: hidden; }
.kpi::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--amber), transparent); opacity: .7;
}
.kpi .top { display: flex; align-items: center; justify-content: space-between; }
.kpi .chip {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(245,166,35,.12); color: var(--amber); border: 1px solid rgba(245,166,35,.2);
}
.kpi .chip .ic { width: 20px; height: 20px; }
.kpi .chip.ok { background: rgba(52,211,153,.12); color: var(--ok); border-color: rgba(52,211,153,.22); }
.kpi .chip.warn { background: rgba(251,191,36,.12); color: var(--warn); border-color: rgba(251,191,36,.22); }
.kpi .chip.danger { background: rgba(251,113,133,.12); color: var(--danger); border-color: rgba(251,113,133,.22); }
.kpi .chip.info { background: rgba(96,165,250,.12); color: var(--info); border-color: rgba(96,165,250,.22); }
.kpi .value { font-size: 34px; font-weight: 600; line-height: 1; color: #fff; text-shadow: 0 0 24px rgba(245,166,35,.18); }
.kpi .label { color: var(--ink-3); font-size: 13px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl thead th {
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .7px;
  text-transform: uppercase; color: var(--ink-3);
  padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.tbl tbody td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--ink); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { transition: background .12s ease; }
table.tbl.rows tbody tr:hover { background: var(--surface-3); }
table.tbl td.r, table.tbl th.r { text-align: right; }
.row-danger { background: rgba(251,113,133,.08) !important; box-shadow: inset 3px 0 0 var(--danger); }

.linkish { color: var(--amber-2); font-weight: 600; }
.linkish:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge--ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(52,211,153,.25); }
.badge--warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(251,191,36,.25); }
.badge--danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(251,113,133,.25); }
.badge--info { background: var(--info-bg); color: var(--info); border-color: rgba(96,165,250,.25); }
.badge--muted { background: var(--muted-bg); color: var(--muted); border-color: var(--border-2); }
.badge.flat::before { display: none; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(135deg, var(--amber-2), var(--amber)); color: var(--amber-ink); box-shadow: 0 6px 18px rgba(245,166,35,.28); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(245,166,35,.42); }
.btn-dark { background: var(--surface-3); color: #fff; border-color: var(--border-2); }
.btn-dark:hover { background: #2a3344; }
.btn-ghost { background: var(--surface-2); border-color: var(--border-2); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: #fff; }
.btn-ok { background: var(--ok); color: #052017; }
.btn-ok:hover { filter: brightness(1.08); }
.btn-danger { background: var(--danger); color: #2a0b12; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input {
  font: inherit; width: 100%; padding: 10px 13px;
  border: 1px solid var(--border-2); border-radius: 10px;
  background: #0f141b; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,166,35,.2);
}
.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- misc */
.stat-line { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line .k { color: var(--ink-2); }
.stat-line b { color: #fff; }
.muted { color: var(--ink-3); }
.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty .ic { width: 36px; height: 36px; color: var(--border-2); margin-bottom: 10px; }
.page-actions { display: flex; gap: 10px; align-items: center; }
.flag-chip { display:inline-flex; align-items:center; gap:5px; background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(251,113,133,.25); border-radius: 7px; padding: 2px 8px; font-size: 12px; font-weight: 600; margin: 0 4px 4px 0; }
.ic { display: inline-block; vertical-align: middle; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* toasts */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; flex-direction: column; gap: 10px; transition: opacity .4s ease; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 380px;
  padding: 12px 15px; border-radius: 12px; font-size: 14px; font-weight: 500; color: #fff;
  background: var(--surface-3); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg, 0 8px 30px rgba(0,0,0,.45)); animation: rise .3s ease both;
}
.toast .ic { width: 18px; height: 18px; flex-shrink: 0; }
.toast--ok { border-left: 3px solid var(--ok); } .toast--ok .ic { color: var(--ok); }
.toast--warn { border-left: 3px solid var(--warn); } .toast--warn .ic { color: var(--warn); }
.toast--danger { border-left: 3px solid var(--danger); } .toast--danger .ic { color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
  background:
    radial-gradient(900px 500px at 75% 10%, rgba(245,166,35,.12), transparent 60%),
    var(--bg); }
.auth .pane {
  background: linear-gradient(160deg, #11151c 0%, #0b0e13 100%);
  border-right: 1px solid var(--border);
  padding: 60px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth .pane::before { content:""; position:absolute; width:340px; height:340px; border-radius:50%; right:-90px; top:-90px;
  background: radial-gradient(circle, rgba(245,166,35,.22), transparent 70%); }
.auth .pane .logo { display: flex; align-items: center; gap: 13px; font-size: 28px; font-weight: 700; color: #fff; }
.auth .pane .logo .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--amber); box-shadow: 0 0 20px var(--amber); }
.auth .pane h2 { font-size: 32px; font-weight: 600; line-height: 1.18; max-width: 15ch; color: #fff; }
.auth .pane ul { list-style: none; padding: 0; margin: 0; color: var(--ink-2); font-size: 14.5px; }
.auth .pane ul li { display: flex; align-items: center; gap: 11px; padding: 7px 0; }
.auth .pane ul li .ic { color: var(--amber); width: 18px; height: 18px; }
.auth .form-side { display: grid; place-items: center; padding: 40px; }
.auth form { width: 330px; }
.auth h3 { margin: 0 0 4px; font-size: 23px; color: #fff; }
.auth .hint { color: var(--ink-3); font-size: 13px; margin: 0 0 24px; }
.auth .err { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(251,113,133,.3); border-radius: 10px; padding: 10px 13px; font-size: 13px; margin-bottom: 14px; }
.auth form .field { margin-bottom: 15px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .pane { display: none; } }

/* ================================================================ profile hero */
.hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 18px; }
.hero .avatar.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 21px; }
.hero .avatar.plate { width: auto; min-width: 60px; padding: 0 16px; border-radius: 14px; background: linear-gradient(135deg, var(--cyan), #23b3a4); color: #052422; letter-spacing: .5px; font-size: 16px; white-space: nowrap; box-shadow: 0 4px 14px rgba(56,214,196,.3); }
.hero .id { flex: 1; min-width: 200px; }
.hero .id .name { font-weight: 700; font-size: 20px; color: #fff; letter-spacing: -.3px; line-height: 1.2; }
.hero .id .meta { color: var(--ink-3); font-size: 13.5px; margin-top: 3px; }
.hero .tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero .hero-side { text-align: right; color: var(--ink-3); font-size: 12px; line-height: 1.5; }
.hero .hero-side b { color: var(--ink); display: block; }

/* quick-facts strip */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 1px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 18px; }
.facts .fact { background: var(--surface-2); padding: 13px 15px; }
.facts .fact .k { color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; }
.facts .fact .v { color: #fff; font-weight: 600; font-size: 15px; margin-top: 4px; display: flex; align-items: center; gap: 7px; }
.facts .fact .v .ic { width: 15px; height: 15px; color: var(--amber); }
.facts .fact .v.pos { color: var(--ok); } .facts .fact .v.neg { color: var(--danger); }

/* section header with a "see all" link */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.section-head h2 { margin: 0; }
.see-all { color: var(--amber-2); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.see-all:hover { color: var(--amber); }

/* -------------------------------------------------------------- scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface-3); border-radius: 999px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-2); background-clip: padding-box; }
.nav::-webkit-scrollbar, .sidebar::-webkit-scrollbar { width: 7px; }

/* checkboxes / radios use the brand accent, not the default system blue */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--amber); width: 15px; height: 15px; cursor: pointer;
}

/* -------------------------------------------------------- filter toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; max-width: 380px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 8px 13px;
}
.toolbar .search .ic { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.toolbar .search input { background: transparent; border: 0; outline: none; color: var(--ink); font: inherit; font-size: 13.5px; width: 100%; }
.toolbar .search input::placeholder { color: var(--ink-3); }
.toolbar select.input { width: auto; min-width: 150px; padding: 9px 12px; }
.toolbar .spacer { flex: 1; }
.toolbar .reset { color: var(--ink-3); font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.toolbar .reset:hover { color: var(--ink); }
.see-all:hover { text-decoration: underline; }
.see-all .ic { width: 14px; height: 14px; }

/* pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.pager .info { color: var(--ink-3); font-size: 13px; }
.pager .controls { display: flex; gap: 8px; align-items: center; }
.pager .page-num { color: var(--ink-2); font-size: 13px; padding: 0 6px; white-space: nowrap; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* clickable table rows + inline user cell */
tr[data-href] { cursor: pointer; }
.avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user b { color: #fff; }

/* ================================================================ mobile */
.mobile-topbar { display: none; }
.scrim { display: none; }

/* list tables collapse to stacked cards on narrow screens */
@media (max-width: 680px) {
  .tbl--cards thead { display: none; }
  .tbl--cards, .tbl--cards tbody, .tbl--cards tr, .tbl--cards td { display: block; width: 100%; }
  .tbl--cards tbody tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .tbl--cards.rows tbody tr:hover { background: var(--surface-2); }
  .tbl--cards td { border: 0 !important; padding: 5px 0 !important; text-align: left !important;
    display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .tbl--cards td::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; font-weight: 600; flex-shrink: 0; }
  .tbl--cards td:not([data-label]) { justify-content: flex-end; padding-top: 9px !important; }
  .tbl--cards td:only-child { display: block; }
  .tbl--cards td.r { text-align: right; }
  .tbl--cards td.r a.btn { width: 100%; justify-content: center; }
}

@media (max-width: 900px) {
  .mobile-topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 15px; position: sticky; top: 0; z-index: 40;
    background: rgba(13,16,21,.92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }
  .mobile-topbar .brand { padding: 0; font-size: 18px; }
  .mobile-topbar .m-spacer { flex: 1; }
  .hamburger {
    display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--ink);
  }
  .hamburger:hover { background: var(--surface-3); }
  .hamburger .ic { width: 20px; height: 20px; }

  .sidebar {
    position: fixed; left: 0; top: 0; height: 100dvh; z-index: 80;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: 0 0 44px rgba(0,0,0,.6);
  }
  body.nav-open .sidebar { transform: none; }
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .topbar { padding: 12px 15px; gap: 10px; }
  .topbar h1 { font-size: 18px; }
  .content { padding: 16px 14px 40px; }
  .kpi { padding: 16px; gap: 9px; }
  .kpi .value { font-size: 26px; }
  .kpi .chip { width: 36px; height: 36px; border-radius: 10px; }
  .kpi .chip .ic { width: 17px; height: 17px; }
  .card-pad { padding: 16px; }
  .hero { padding: 16px; gap: 14px; }
  .hero .id .name { font-size: 18px; }
  .hero .hero-side { text-align: left; width: 100%; }
  table.tbl { font-size: 13px; }
  table.tbl thead th { padding: 9px 10px; }
  table.tbl tbody td { padding: 11px 10px; }
  .toasts { left: 14px; right: 14px; bottom: 14px; }
  .toast { min-width: 0; max-width: none; }
}
