:root {
  --brand-blue: #2f6bff;
  --brand-violet: #795cff;
  --brand-gradient: linear-gradient(135deg, var(--brand-blue), var(--brand-violet));
  --navy: #101f35;
  --navy-2: #162a45;
  --ink: #102843;
  --ink-soft: #65768a;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --line: #e2e8f0;
  --line-strong: #d4deea;
  --blue-pale: #eaf1ff;
  --green: #138a68;
  --green-pale: #e7f7f1;
  --amber: #b9780b;
  --amber-pale: #fff4dc;
  --red: #c54b55;
  --red-pale: #fff0f1;
  --purple: #7155d9;
  --purple-pale: #f0edff;
  --shadow: 0 12px 32px rgba(27, 55, 88, .07);
  --radius: 18px;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 14px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(47, 107, 255, .24); outline-offset: 2px; }
a { color: inherit; }

.admin-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column; height: 100vh; overflow-y: auto; padding: 26px 18px 18px; background: var(--navy); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; width: max-content; margin: 0 10px 28px; color: #fff; font-size: 25px; font-weight: 800; letter-spacing: -1.3px; text-decoration: none; }
.brand small { margin: 4px 0 0 2px; padding: 4px 6px; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; color: #aebbd0; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.brand-mark-wrap { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.brand-mark-wrap img { width: 24px; height: 24px; }
.brand-dot { color: #91a6ff; }
.owner-card { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.055); }
.owner-card > div { min-width: 0; flex: 1; }
.owner-card strong, .owner-card span:not(.avatar, .online-dot) { display: block; }
.owner-card strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.owner-card span:not(.avatar, .online-dot) { margin-top: 3px; color: #9dacbf; font-size: 10px; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; background: var(--blue-pale); color: #315dc2; font-size: 10px; font-weight: 800; }
.owner-avatar { background: linear-gradient(135deg, #d8e4ff, #ded6ff); color: #5547a6; }
.avatar.large { width: 46px; height: 46px; border-radius: 14px; font-size: 12px; }
.online-dot { width: 8px; height: 8px; border: 2px solid rgba(255,255,255,.22); border-radius: 50%; background: #37c791; box-shadow: 0 0 0 3px rgba(55,199,145,.12); }
.nav-list { display: grid; gap: 5px; }
.nav-label { margin: 0 12px 6px; color: #73849c; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-label-secondary { margin-top: 20px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: #aab7c9; text-align: left; font-size: 13px; font-weight: 700; transition: background .15s, color .15s, transform .15s; }
.nav-link:hover { background: rgba(255,255,255,.065); color: #fff; }
.nav-link.is-active { background: linear-gradient(90deg, rgba(70,118,255,.27), rgba(119,92,255,.15)); color: #fff; box-shadow: inset 3px 0 #6e8fff; }
.nav-icon { display: grid; place-items: center; width: 19px; height: 19px; color: currentColor; font-size: 18px; font-weight: 500; }
.nav-count { display: grid; place-items: center; min-width: 22px; height: 20px; margin-left: auto; padding: 0 6px; border-radius: 10px; background: rgba(255,255,255,.1); color: #b9c7da; font-size: 10px; }
.nav-count.attention { background: rgba(255,185,75,.15); color: #ffcd7a; }
.sidebar-footer { display: grid; gap: 7px; margin-top: auto; padding-top: 22px; }
.portal-link { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 11px; color: #afbdd0; text-decoration: none; }
.portal-link:hover { background: rgba(255,255,255,.055); color: #fff; }
.portal-link > span:first-child { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: rgba(255,255,255,.08); color: #8ba6ff; }
.portal-link strong, .portal-link small { display: block; }
.portal-link strong { font-size: 11px; }
.portal-link small { margin-top: 2px; color: #74869e; font-size: 9px; }
.system-state { display: flex; align-items: center; gap: 7px; margin: 12px 10px 0; color: #8293a9; }
.system-state span { width: 7px; height: 7px; border-radius: 50%; background: #37c791; }
.system-state small { font-size: 9px; }
.sidebar-backdrop { display: none; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 76px; padding: 0 clamp(24px, 4vw, 58px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: blur(16px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; }
.topbar-left { gap: 13px; }
.topbar-actions { gap: 10px; }
.breadcrumb span, .breadcrumb strong { display: block; }
.breadcrumb span { margin-bottom: 2px; color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.breadcrumb strong { font-size: 14px; }
.today-label { margin-right: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.icon-button, .mobile-menu, .close-button { display: grid; place-items: center; border: 0; background: transparent; }
.icon-button { position: relative; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 18px; }
.icon-button:hover { border-color: #b9c8df; background: var(--surface-soft); }
.notification > span { position: absolute; top: -5px; right: -4px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--surface); border-radius: 10px; background: var(--red); color: #fff; font-size: 8px; font-weight: 800; }
.top-profile { display: flex; align-items: center; gap: 8px; margin-left: 5px; padding-left: 13px; border-left: 1px solid var(--line); }
.top-profile strong, .top-profile small { display: block; }
.top-profile strong { font-size: 11px; }
.top-profile small { margin-top: 1px; color: var(--ink-soft); font-size: 9px; }
.mobile-menu { display: none; width: 36px; height: 36px; border-radius: 10px; font-size: 19px; }

.view { display: none; max-width: 1510px; margin: 0 auto; padding: 42px clamp(24px, 4vw, 58px) 70px; }
.view.is-visible { display: block; animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: .45; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading h1 { margin: 0; font-size: clamp(29px, 3vw, 38px); line-height: 1.1; letter-spacing: -1.6px; }
.page-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; }
.hero-heading h1 { font-size: clamp(31px, 3.4vw, 43px); }
.eyebrow, .card-kicker { display: block; color: var(--brand-blue); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { margin: 0 0 8px; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 0; border-radius: 11px; font-size: 12px; font-weight: 800; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand-gradient); color: #fff; box-shadow: 0 9px 21px rgba(57,91,222,.2); }
.button-primary:hover { box-shadow: 0 11px 25px rgba(57,91,222,.28); }
.button-secondary { border: 1px solid #cddcf5; background: var(--surface); color: #315bc4; }
.button-secondary:hover { background: var(--blue-pale); }
.button-ghost { background: #eff3f8; color: var(--ink-soft); }
.button-danger { background: var(--red); color: #fff; }
.button-select { min-height: 42px; padding: 0 35px 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 12px; font-weight: 700; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--brand-blue); font-size: 11px; font-weight: 800; }
.text-button:hover { color: #1d4cc7; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 17px; }
.metric-card { position: relative; min-height: 158px; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 17px rgba(30,60,94,.025); }
.metric-card::before { position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--metric-color, var(--brand-blue)); content: ""; }
.metric-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.metric-label { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.metric-symbol { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--metric-pale, var(--blue-pale)); color: var(--metric-color, var(--brand-blue)); font-size: 16px; font-weight: 800; }
.metric-value { display: block; margin: 17px 0 7px; font-size: 29px; line-height: 1; letter-spacing: -1.2px; }
.metric-note { color: #8694a5; font-size: 10px; }
.metric-note b { color: var(--metric-color, var(--green)); }
.metric-card.green { --metric-color: var(--green); --metric-pale: var(--green-pale); }
.metric-card.amber { --metric-color: var(--amber); --metric-pale: var(--amber-pale); }
.metric-card.purple { --metric-color: var(--purple); --metric-pale: var(--purple-pale); }
.metric-card.red { --metric-color: var(--red); --metric-pale: var(--red-pale); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 18px rgba(30,60,94,.025); }
.overview-grid, .report-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .75fr); gap: 17px; margin-top: 17px; }
.lower-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.revenue-card, .attention-card, .table-card, .report-revenue, .status-card { padding: 23px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.card-heading h2 { margin: 5px 0 0; font-size: 16px; letter-spacing: -.45px; }
.card-heading p { margin: 5px 0 0; color: var(--ink-soft); font-size: 10px; }
.compact-select { padding: 7px 28px 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.chart-summary { display: flex; align-items: center; gap: 10px; margin: 24px 0 5px; }
.chart-summary strong { font-size: 30px; letter-spacing: -1.3px; }
.chart-summary span { padding: 4px 7px; border-radius: 7px; background: var(--green-pale); color: var(--green); font-size: 9px; font-weight: 800; }
.bar-chart { display: flex; align-items: end; gap: 11px; height: 165px; margin-top: 6px; padding-top: 15px; border-bottom: 1px solid var(--line); }
.bar-column { display: flex; flex: 1; align-items: stretch; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.bar-value { margin-bottom: 7px; color: var(--ink-soft); font-family: "DM Mono", monospace; font-size: 8px; }
.bar-fill { min-height: 4px; border-radius: 6px 6px 1px 1px; background: linear-gradient(180deg, #7596ff, #4768dc); box-shadow: 0 -4px 12px rgba(71,104,220,.08); transition: height .25s ease; }
.bar-label { margin: 8px 0 -21px; color: var(--ink-soft); font-size: 9px; font-weight: 700; }
.soft-badge { padding: 5px 8px; border-radius: 8px; background: var(--amber-pale); color: var(--amber); font-size: 9px; font-weight: 800; white-space: nowrap; }
.action-list { display: grid; margin-top: 15px; }
.action-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.action-item:first-child { border-top: 0; }
.action-symbol { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--amber-pale); color: var(--amber); font-size: 14px; font-weight: 800; }
.action-symbol.red { background: var(--red-pale); color: var(--red); }
.action-symbol.blue { background: var(--blue-pale); color: var(--brand-blue); }
.action-item strong, .action-item small { display: block; }
.action-item strong { font-size: 11px; }
.action-item small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.tiny-action { padding: 6px 8px; border: 0; border-radius: 8px; background: var(--surface-soft); color: var(--brand-blue); font-size: 9px; font-weight: 800; }
.garage-ranking, .recent-invoices { display: grid; margin-top: 14px; }
.ranking-row { display: grid; grid-template-columns: 33px minmax(130px, 1fr) 120px 46px; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.ranking-row:first-child, .recent-invoice:first-child { border-top: 0; }
.rank-number { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-soft); color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.ranking-main strong, .ranking-main small, .recent-invoice strong, .recent-invoice small { display: block; }
.ranking-main strong, .recent-invoice strong { font-size: 11px; }
.ranking-main small, .recent-invoice small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.rank-track { height: 6px; overflow: hidden; border-radius: 7px; background: #ecf0f5; }
.rank-track span { display: block; height: 100%; border-radius: inherit; background: var(--brand-gradient); }
.rank-total { font-family: "DM Mono", monospace; font-size: 10px; font-weight: 600; text-align: right; }
.recent-invoice { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.row-reset { width: 100%; border-right: 0; border-bottom: 0; border-left: 0; background: transparent; color: inherit; text-align: left; }
.row-reset:hover { background: var(--surface-soft); }
.recent-invoice .amount { font-family: "DM Mono", monospace; font-size: 10px; font-weight: 600; }

.section-stats, .report-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 17px; }
.section-stat, .report-stat { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.section-stat span, .section-stat strong, .report-stat span, .report-stat strong { display: block; }
.section-stat span, .report-stat span { color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.section-stat strong, .report-stat strong { margin-top: 8px; font-size: 22px; letter-spacing: -.7px; }
.data-card { overflow: hidden; }
.filterbar { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search-field { display: flex; align-items: center; gap: 8px; width: min(430px, 100%); height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: #8a98a9; }
.search-field:focus-within { border-color: #9ab4f3; box-shadow: 0 0 0 3px rgba(47,107,255,.08); }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 11px; }
.filterbar > select { height: 40px; padding: 0 31px 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.result-count { margin-left: auto; color: var(--ink-soft); font-size: 10px; }
.filter-chips { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.filter-chip { min-height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.filter-chip:hover { background: var(--surface-soft); }
.filter-chip.is-active { border-color: #cadafb; background: var(--blue-pale); color: #315bc4; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 17px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #fafbfd; color: #7a899b; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
td { color: #425873; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcff; }
.align-right { text-align: right; }
.entity-cell { display: flex; align-items: center; gap: 10px; min-width: 215px; }
.entity-cell strong, .entity-cell small, .table-main strong, .table-main small { display: block; }
.entity-cell strong, .table-main strong { color: var(--ink); font-size: 11px; }
.entity-cell small, .table-main small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.garage-logo { display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px; border-radius: 11px; background: linear-gradient(135deg,#e5eeff,#eeeaff); color: #4357a0; font-size: 9px; font-weight: 800; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 5px 8px; border-radius: 7px; font-size: 8px; font-weight: 800; }
.status-pill::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-pill.success, .status-pill.paid { background: var(--green-pale); color: var(--green); }
.status-pill.warning, .status-pill.overdue { background: var(--amber-pale); color: var(--amber); }
.status-pill.draft, .status-pill.neutral { background: #eef2f6; color: #6f7e90; }
.status-pill.sent, .status-pill.info { background: var(--blue-pale); color: #3f62b6; }
.status-pill.suspended { background: var(--red-pale); color: var(--red); }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-button { min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.row-button:hover { border-color: #b9cae2; color: var(--brand-blue); }
.row-button.icon-only { width: 31px; padding: 0; font-size: 14px; }
.row-menu { position: relative; }
.row-menu-content { position: absolute; z-index: 5; top: 35px; right: 0; display: none; min-width: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.row-menu.is-open .row-menu-content { display: grid; }
.row-menu-content button { padding: 8px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); text-align: left; font-size: 9px; font-weight: 700; }
.row-menu-content button:hover { background: var(--surface-soft); }
.row-menu-content button.danger { color: var(--red); }
.invoice-number, .plate { color: var(--ink); font-family: "DM Mono", monospace; font-weight: 600; }
.amount-cell { color: var(--ink); font-family: "DM Mono", monospace; font-weight: 600; text-align: right; }
.garage-table .entity-cell { min-width: 185px; }
.garage-table .table-main small { display: block; max-width: 175px; overflow: hidden; text-overflow: ellipsis; }
.registration-callout { display: flex; align-items: center; gap: 13px; margin-bottom: 17px; padding: 16px 18px; border: 1px solid #d5e0fb; border-radius: 15px; background: linear-gradient(110deg,#edf3ff,#f8faff); }
.callout-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; background: var(--brand-gradient); color: #fff; font-weight: 800; }
.registration-callout > div { min-width: 0; flex: 1; }
.registration-callout strong { font-size: 12px; }
.registration-callout p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }

.report-summary { margin-top: 4px; }
.report-stat { position: relative; overflow: hidden; }
.report-stat::after { position: absolute; right: -16px; bottom: -22px; width: 68px; height: 68px; border-radius: 50%; background: var(--blue-pale); content: ""; opacity: .7; }
.report-revenue, .status-card { min-height: 365px; }
.line-chart { display: flex; align-items: flex-end; gap: 12px; height: 250px; margin-top: 24px; padding: 0 5px 26px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 56px, var(--line) 57px); }
.line-column { position: relative; display: flex; flex: 1; align-items: center; flex-direction: column; justify-content: flex-end; height: 100%; }
.line-column .bar-fill { width: min(38px,70%); background: var(--brand-gradient); }
.line-column .bar-label { position: absolute; bottom: -24px; margin: 0; }
.donut-layout { display: flex; align-items: center; justify-content: center; gap: 35px; min-height: 265px; }
.donut { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 158px; height: 158px; border-radius: 50%; background: conic-gradient(var(--green) 0 70%, var(--brand-blue) 70% 85%, var(--amber) 85% 95%, #cfd8e3 95% 100%); }
.donut::before { position: absolute; width: 108px; height: 108px; border-radius: 50%; background: var(--surface); content: ""; }
.donut > span { position: relative; z-index: 1; text-align: center; }
.donut strong, .donut small { display: block; }
.donut strong { font-size: 25px; letter-spacing: -1px; }
.donut small { margin-top: 2px; color: var(--ink-soft); font-size: 9px; }
.donut-legend { display: grid; gap: 12px; min-width: 115px; }
.legend-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 9px; }
.legend-row span:first-child { width: 8px; height: 8px; border-radius: 50%; }
.legend-row strong { color: var(--ink); font-family: "DM Mono", monospace; font-size: 9px; }
.top-report-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.top-report-row:first-child, .health-row:first-child { border-top: 0; }
.top-report-row > div:first-child { display: flex; align-items: center; gap: 10px; }
.top-report-row strong, .top-report-row small { display: block; }
.top-report-row strong { font-size: 11px; }
.top-report-row small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.top-report-row > strong { font-family: "DM Mono", monospace; font-size: 10px; }
.health-list { display: grid; margin-top: 14px; }
.health-row { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.health-symbol { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--green-pale); color: var(--green); font-weight: 800; }
.health-symbol.warning { background: var(--amber-pale); color: var(--amber); }
.health-row strong, .health-row small { display: block; }
.health-row strong { font-size: 11px; }
.health-row small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.health-value { color: var(--ink); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 600; }

.settings-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px,.65fr); gap: 17px; }
.settings-main, .settings-aside { display: grid; align-content: start; gap: 17px; }
.settings-card { padding: 23px; }
.settings-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--blue-pale); color: var(--brand-blue); font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 22px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1/-1; }
.field > span { color: #4f637b; font-size: 10px; font-weight: 800; }
.field input, .field select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); outline: 0; font-size: 11px; }
.field input:focus, .field select:focus { border-color: #8eabef; box-shadow: 0 0 0 3px rgba(47,107,255,.08); }
.input-prefix, .input-suffix { position: relative; }
.input-prefix input { padding-left: 32px; }
.input-prefix > span { position: absolute; top: 12px; left: 12px; color: var(--ink-soft); font-size: 11px; }
.input-suffix input { padding-right: 50px; }
.input-suffix > span { position: absolute; top: 12px; right: 12px; color: var(--ink-soft); font-size: 10px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 21px; padding-top: 17px; border-top: 1px solid var(--line); }
.form-footer > span { color: var(--ink-soft); font-size: 9px; }
.integration-list { display: grid; margin-top: 17px; }
.integration-row { display: flex; align-items: center; gap: 11px; padding: 14px 0; border-top: 1px solid var(--line); }
.integration-row:first-child { border-top: 0; }
.integration-row > div { min-width: 0; flex: 1; }
.integration-row strong, .integration-row small { display: block; }
.integration-row strong { font-size: 11px; }
.integration-row small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.integration-icon { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-size: 10px; font-weight: 800; }
.integration-icon.rdw { background: #1d4c91; }
.integration-icon.sepa { background: var(--brand-gradient); }
.integration-icon.mail { background: #2c9b78; }
.access-profile { display: flex; align-items: center; gap: 11px; margin: 19px 0 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.access-profile strong, .access-profile small { display: block; }
.access-profile strong { font-size: 12px; }
.access-profile small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.access-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; color: var(--ink-soft); font-size: 9px; }
.access-row strong { color: var(--ink); }
.audit-card { max-height: 470px; overflow: hidden; }
.audit-list { display: grid; max-height: 335px; margin-top: 13px; overflow-y: auto; }
.audit-item { position: relative; padding: 11px 0 11px 18px; border-top: 1px solid var(--line); }
.audit-item::before { position: absolute; top: 16px; left: 1px; width: 7px; height: 7px; border: 2px solid var(--surface); border-radius: 50%; background: var(--brand-blue); box-shadow: 0 0 0 1px #bdd0ff; content: ""; }
.audit-item:first-child { border-top: 0; }
.audit-item strong, .audit-item small { display: block; }
.audit-item strong { font-size: 10px; line-height: 1.4; }
.audit-item small { margin-top: 3px; color: var(--ink-soft); font-size: 8px; }
.empty-row { padding: 32px 18px; color: var(--ink-soft); text-align: center; }

.modal { width: min(650px, calc(100vw - 30px)); max-height: calc(100vh - 30px); padding: 0; overflow: auto; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 80px rgba(12,31,56,.28); }
.modal::backdrop { background: rgba(8,22,40,.52); backdrop-filter: blur(3px); }
.modal-card { padding: 26px; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-heading h2 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.7px; }
.modal-heading p { margin: 6px 0 0; color: var(--ink-soft); font-size: 10px; }
.close-button { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; color: var(--ink-soft); font-size: 24px; }
.close-button:hover { background: var(--surface-soft); color: var(--ink); }
.modal-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 17px; padding: 12px; border-radius: 10px; background: var(--blue-pale); color: #536a9f; }
.modal-note > span { display: grid; place-items: center; flex: 0 0 auto; width: 17px; height: 17px; border-radius: 50%; background: #cadaff; color: #315bc4; font-size: 9px; font-weight: 800; }
.modal-note p { margin: 0; font-size: 9px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.invoice-calculation { display: grid; gap: 9px; margin-top: 18px; padding: 15px; border-radius: 12px; background: var(--surface-soft); }
.invoice-calculation > div { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 10px; }
.invoice-calculation strong { color: var(--ink); font-family: "DM Mono", monospace; }
.invoice-calculation .invoice-total { margin-top: 3px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 800; }
.invoice-calculation .invoice-total strong { font-size: 15px; }
.invoice-modal { width: min(800px, calc(100vw - 30px)); }
.invoice-document { padding: 0; }
.invoice-sheet { min-height: 720px; padding: 42px; background: var(--surface); }
.invoice-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.invoice-brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; letter-spacing: -1px; }
.invoice-brand img { width: 31px; height: 31px; }
.invoice-title { text-align: right; }
.invoice-title h2 { margin: 0; font-size: 26px; letter-spacing: -1px; }
.invoice-title p { margin: 5px 0 0; color: var(--ink-soft); font-family: "DM Mono", monospace; font-size: 10px; }
.invoice-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; margin: 30px 0; }
.invoice-party span, .invoice-party strong, .invoice-party small { display: block; }
.invoice-party > span { margin-bottom: 8px; color: var(--brand-blue); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.invoice-party strong { font-size: 12px; }
.invoice-party small { margin-top: 4px; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.invoice-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 0 0 25px; padding: 15px; border-radius: 11px; background: var(--surface-soft); }
.invoice-meta span, .invoice-meta strong { display: block; }
.invoice-meta span { color: var(--ink-soft); font-size: 8px; }
.invoice-meta strong { margin-top: 4px; font-size: 10px; }
.invoice-lines { width: 100%; }
.invoice-lines th, .invoice-lines td { padding: 12px 10px; }
.invoice-totals { display: grid; gap: 8px; width: min(300px,100%); margin: 22px 0 0 auto; }
.invoice-totals > div { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 10px; }
.invoice-totals strong { color: var(--ink); font-family: "DM Mono", monospace; }
.invoice-totals .grand-total { margin-top: 3px; padding-top: 11px; border-top: 1px solid var(--line-strong); color: var(--ink); font-size: 13px; font-weight: 800; }
.invoice-footnote { margin: 42px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.invoice-dialog-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.confirm-modal { width: min(430px, calc(100vw - 30px)); text-align: center; }
.confirm-modal h2 { margin: 14px 0 7px; font-size: 20px; }
.confirm-modal p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.confirm-modal .modal-actions { justify-content: center; }
.danger-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto; border-radius: 14px; background: var(--red-pale); color: var(--red); font-size: 21px; font-weight: 800; }
.toast-region { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: grid; gap: 9px; width: min(370px, calc(100vw - 40px)); }
.toast { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 13px; border: 1px solid #c9e9dc; border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--green-pale); color: var(--green); font-weight: 800; }
.toast strong, .toast small { display: block; }
.toast strong { font-size: 11px; }
.toast small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

body[data-theme="dark"] {
  --ink: #edf3fa;
  --ink-soft: #9caec2;
  --canvas: #0c1622;
  --surface: #142435;
  --surface-soft: #182a3d;
  --line: #293b4e;
  --line-strong: #344a61;
  --blue-pale: #1b3862;
  --green-pale: #123c33;
  --amber-pale: #463418;
  --red-pale: #44252c;
  --purple-pale: #30285c;
  --shadow: 0 14px 34px rgba(0,0,0,.25);
}
body[data-theme="dark"] .topbar { background: rgba(15,27,40,.88); }
body[data-theme="dark"] th { background: #102031; }
body[data-theme="dark"] td { color: #b8c7d7; }
body[data-theme="dark"] tbody tr:hover td { background: #172a3e; }
body[data-theme="dark"] .rank-track { background: #23374b; }
body[data-theme="dark"] .registration-callout { border-color: #2b4d78; background: linear-gradient(110deg,#15325a,#162c46); }
body[data-theme="dark"] .modal-note { color: #b8cafa; }
body[data-theme="dark"] .status-pill.draft, body[data-theme="dark"] .status-pill.neutral { background: #25384b; color: #b2c1d0; }
body[data-theme="dark"] .row-button { background: var(--surface-soft); }
body[data-theme="dark"] .metric-card, body[data-theme="dark"] .card, body[data-theme="dark"] .section-stat, body[data-theme="dark"] .report-stat { box-shadow: none; }
body[data-theme="dark"] input::placeholder { color: #6e849b; }

@media (max-width: 1120px) {
  .admin-shell { grid-template-columns: 235px minmax(0,1fr); }
  .metric-grid, .section-stats, .report-summary { grid-template-columns: repeat(2,1fr); }
  .overview-grid, .report-grid { grid-template-columns: 1fr; }
  .lower-grid { grid-template-columns: 1fr 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1250px) {
  .garage-table th:nth-child(3), .garage-table td:nth-child(3), .invoice-table th:nth-child(5), .invoice-table td:nth-child(5) { display: none; }
  .garage-table th, .garage-table td, .invoice-table th, .invoice-table td { padding-right: 12px; padding-left: 12px; }
}

@media (max-width: 790px) {
  .admin-shell { display: block; }
  .sidebar { position: fixed; width: 270px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 55px rgba(0,0,0,.25); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 19; inset: 0; display: block; visibility: hidden; border: 0; background: rgba(7,19,34,.45); opacity: 0; transition: opacity .2s; }
  .sidebar.is-open + .sidebar-backdrop { visibility: visible; opacity: 1; }
  .mobile-menu { display: grid; background: var(--surface-soft); }
  .topbar { height: 66px; padding: 0 17px; }
  .today-label, .top-profile > span:last-child { display: none; }
  .top-profile { margin-left: 0; padding-left: 9px; }
  .view { padding: 29px 17px 50px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; flex-wrap: wrap; }
  .heading-actions .button { flex: 1; }
  .lower-grid { grid-template-columns: 1fr; }
  .invoice-filterbar { align-items: flex-start; flex-direction: column; }
  .filter-chips { width: 100%; margin-left: 0; overflow-x: auto; }
  .registration-callout { align-items: flex-start; flex-wrap: wrap; }
  .registration-callout .text-button { width: 100%; text-align: left; }
}

@media (max-width: 560px) {
  .metric-grid, .section-stats, .report-summary, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .page-heading h1, .hero-heading h1 { font-size: 30px; }
  .heading-actions { align-items: stretch; flex-direction: column; }
  .button-select { width: 100%; }
  .filterbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .filterbar > select { width: 100%; }
  .result-count { margin-left: 0; }
  .ranking-row { grid-template-columns: 31px 1fr auto; }
  .rank-track { display: none; }
  .bar-chart { gap: 6px; }
  .bar-value { display: none; }
  .donut-layout { flex-direction: column; gap: 20px; padding: 25px 0; }
  .invoice-parties { grid-template-columns: 1fr; gap: 22px; }
  .invoice-sheet { padding: 25px 20px; }
  .invoice-sheet-head { flex-direction: column; }
  .invoice-title { text-align: left; }
  .invoice-meta { grid-template-columns: 1fr; }
  .modal-card { padding: 21px; }
  .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
  .form-footer { align-items: stretch; flex-direction: column; }
}

@media print {
  body * { visibility: hidden !important; }
  #invoiceDocument, #invoiceDocument * { visibility: visible !important; }
  #invoiceViewDialog { position: absolute; inset: 0; display: block; width: 100%; max-height: none; overflow: visible; box-shadow: none; }
  #invoiceDocument { position: absolute; inset: 0; }
  .invoice-dialog-actions { display: none !important; }
  .invoice-sheet { min-height: 0; color: #102843; background: #fff; }
}

/* Blaxy 2026 productstijl */
:root {
  --brand-blue: #4b5cff;
  --brand-violet: #8f61ff;
  --brand-coral: #ff6a43;
  --brand-aqua: #78ddd0;
  --brand-gradient: linear-gradient(120deg, #ff6a43 0%, #9a5cff 52%, #4b5cff 100%);
  --ink: #111114;
  --ink-soft: #66676d;
  --canvas: #f1f1ed;
  --surface: #ffffff;
  --surface-soft: #f5f5f1;
  --line: #d9dad5;
  --line-strong: #c9cac4;
  --blue-pale: #e9ebff;
  --green: #087f73;
  --green-pale: #dff5f1;
  --amber: #a85316;
  --amber-pale: #ffe9dc;
  --red: #d34d5e;
  --red-pale: #ffe8ec;
  --purple: var(--brand-violet);
  --purple-pale: #eee8ff;
  --shadow: 0 22px 54px rgba(17, 17, 20, .08);
  --radius: 26px;
  color-scheme: light;
}

body {
  overflow-x: hidden;
  background: radial-gradient(circle at 84% -10%, rgba(143, 97, 255, .14), transparent 28rem), var(--canvas);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(75, 92, 255, .24); }

.admin-shell { grid-template-columns: 252px minmax(0, 1fr); }
.sidebar {
  padding: 22px 14px 16px;
  border: 0;
  background: #0d0d10;
  box-shadow: 20px 0 54px rgba(0, 0, 0, .08);
}
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 3px 6px 24px 10px; }
.brand-row .brand { min-width: 0; margin: 0; font-size: 29px; letter-spacing: -1.8px; }
.brand-mark-wrap { width: 36px; height: 36px; border-radius: 13px; box-shadow: 0 10px 24px rgba(75, 92, 255, .24); }
.brand-mark-wrap img { width: 26px; height: 26px; }
.brand-dot { color: #a989ff; }
.brand small { border-color: rgba(255,255,255,.13); color: #8e8e98; }
.sidebar-collapse {
  display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; padding: 0;
  border: 1px solid rgba(255,255,255,.13); border-radius: 50%; color: #d7d7dd;
  background: rgba(255,255,255,.07); font-size: 22px; line-height: 1;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}
.sidebar-collapse:hover { color: #111114; background: #fff; transform: scale(1.05); }
.owner-card { border-color: rgba(255,255,255,.1); border-radius: 17px; background: rgba(255,255,255,.055); }
.owner-avatar { background: linear-gradient(140deg, #4b5cff, #9a5cff); color: #fff; }
.nav-link { min-height: 46px; border-radius: 14px; color: #9d9da6; font-weight: 650; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav-link.is-active { color: #111114; background: linear-gradient(110deg,#fff 0%,#fff 72%,#ded8ff 100%); box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.nav-link.is-active .nav-count { color: #fff; background: #111114; }
.nav-count { background: #4b5cff; color: #fff; }
.nav-count.attention { background: #ff6a43; color: #fff; }
.portal-link { border-radius: 14px; }

.topbar {
  height: 82px; padding: 0 clamp(24px,3.5vw,56px); border: 0;
  background: rgba(241,241,237,.84); backdrop-filter: blur(22px) saturate(140%);
}
.breadcrumb { display: flex; align-items: center; gap: 9px; }
.breadcrumb span { margin: 0; font-size: 12px; }
.breadcrumb span::after { margin-left: 9px; color: #a4a5a0; content: "/"; }
.breadcrumb strong { font-size: 13px; }
.today-label { font-size: 11px; }
.icon-button, .theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px;
  border: 1px solid rgba(17,17,20,.1); border-radius: 999px;
  background: rgba(255,255,255,.72); color: var(--ink); box-shadow: 0 7px 20px rgba(17,17,20,.035);
}
.icon-button { width: 40px; height: 40px; }
.theme-toggle { padding: 0 14px; font-size: 11px; font-weight: 800; }
.theme-toggle #themeIcon { color: var(--brand-blue); font-size: 16px; }
.icon-button:hover, .theme-toggle:hover { border-color: rgba(75,92,255,.32); background: #fff; }

.view { max-width: 1540px; padding: 30px clamp(24px,3.5vw,56px) 72px; }
.view.is-visible { animation: admin-view-enter 360ms cubic-bezier(.22,1,.36,1); }
@keyframes admin-view-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.page-heading { padding: 14px 0 24px; border-bottom: 1px solid rgba(17,17,20,.13); }
.page-heading h1 { font-size: clamp(34px,4vw,54px); letter-spacing: -2.8px; }
.eyebrow, .card-kicker { color: var(--brand-coral); }
.hero-heading {
  position: relative; isolation: isolate; min-height: 220px; overflow: hidden; align-items: center;
  padding: 34px 38px; border: 0; border-radius: 32px; color: #fff;
  background: radial-gradient(circle at 78% 10%,rgba(143,97,255,.78),transparent 23%), radial-gradient(circle at 93% 88%,rgba(75,92,255,.76),transparent 27%), #0d0d10;
  box-shadow: 0 30px 70px rgba(17,17,20,.14);
}
.hero-heading::after {
  position: absolute; z-index: -1; top: 50%; right: 9%; width: 230px; height: 230px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 50%;
  box-shadow: 0 0 0 27px rgba(255,255,255,.035),0 0 0 58px rgba(255,255,255,.025);
  content: ""; transform: translateY(-50%);
}
.hero-heading h1 { color: #fff; font-size: clamp(36px,4.2vw,58px); line-height: .98; letter-spacing: -3.5px; }
.hero-heading p:not(.eyebrow) { color: rgba(255,255,255,.66); font-size: 15px; }
.hero-heading .eyebrow { color: #ff9a7d; }
.hero-heading .button-secondary { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.12); color: #fff; }

.card, .metric-card, .section-stat, .report-stat { border-color: rgba(17,17,20,.08); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card { min-height: 174px; border: 0; }
.metric-card:nth-child(1) { color: #fff; background: #4b5cff; }
.metric-card:nth-child(2) { color: #083d39; background: #78ddd0; }
.metric-card:nth-child(3) { color: #5c2b19; background: #ffb094; }
.metric-card:nth-child(4) { color: #fff; background: radial-gradient(circle at 100% 0%,rgba(143,97,255,.55),transparent 46%),#17171b; }
.metric-card .metric-label, .metric-card .metric-note { color: inherit; opacity: .72; }
.metric-card .metric-symbol { color: inherit; background: rgba(255,255,255,.18); }
.metric-card:nth-child(2) .metric-symbol, .metric-card:nth-child(3) .metric-symbol { background: rgba(255,255,255,.35); }
.metric-card::before { display: none; }
.button { border-radius: 999px; }
.button-primary { background: #4b5cff; box-shadow: 0 12px 25px rgba(75,92,255,.23); }
.button-primary:hover { background: #3545da; }
.button-secondary { border-color: rgba(17,17,20,.11); }
.search-field, .filterbar > select, .compact-select, .button-select { border-radius: 999px; }
.data-card { border-radius: 26px; }
.registration-callout { border: 0; border-radius: 22px; background: linear-gradient(115deg,#3949d5,#7046ce 64%,#151518); color: #fff; }
.registration-callout p, .registration-callout .text-button { color: rgba(255,255,255,.72); }
.modal { border-radius: 27px; box-shadow: 0 35px 100px rgba(0,0,0,.28); }
.modal::backdrop { background: rgba(9,9,11,.66); backdrop-filter: blur(10px); }

body[data-theme="dark"] {
  --ink: #f5f5f2; --ink-soft: #a0a0a7; --canvas: #0a0a0c; --surface: #16161a;
  --surface-soft: #202026; --line: #2b2b31; --line-strong: #3b3b42;
  --blue-pale: #292850; --green-pale: #163a37; --amber-pale: #4b2d20; --purple-pale: #31284e;
  color-scheme: dark;
  background: radial-gradient(circle at 82% -8%,rgba(75,92,255,.16),transparent 30rem),var(--canvas);
}
body[data-theme="dark"] .sidebar { background: #000; }
body[data-theme="dark"] .topbar { background: rgba(10,10,12,.84); }
body[data-theme="dark"] .icon-button, body[data-theme="dark"] .theme-toggle { border-color: rgba(255,255,255,.11); background: rgba(22,22,26,.72); }
body[data-theme="dark"] .icon-button:hover, body[data-theme="dark"] .theme-toggle:hover { background: #202026; }
body[data-theme="dark"] .page-heading { border-color: rgba(255,255,255,.14); }
body[data-theme="dark"] .metric-card:nth-child(1) { background: #4b5cff; }
body[data-theme="dark"] .metric-card:nth-child(2) { color: #dffaf6; background: #14534d; }
body[data-theme="dark"] .metric-card:nth-child(3) { color: #ffe8de; background: #71371f; }
body[data-theme="dark"] .metric-card:nth-child(4) { background: radial-gradient(circle at 95% 0%,rgba(143,97,255,.46),transparent 42%),#18181d; }
body[data-theme="dark"] th { background: #111114; }
body[data-theme="dark"] tbody tr:hover td { background: #1b1b21; }
body[data-theme="dark"] .registration-callout { background: linear-gradient(115deg,#3949d5,#7046ce 64%,#151518); }

@media (min-width: 791px) {
  .admin-shell, .sidebar, .brand-row, .owner-card, .nav-link, .portal-link {
    transition: grid-template-columns 260ms cubic-bezier(.22,1,.36,1), padding 260ms ease, gap 180ms ease;
  }
  .admin-shell.is-sidebar-collapsed { grid-template-columns: 88px minmax(0,1fr); }
  .admin-shell.is-sidebar-collapsed .sidebar { padding-right: 12px; padding-left: 12px; overflow: visible; }
  .admin-shell.is-sidebar-collapsed .brand-row { flex-direction: column; gap: 11px; margin-right: 0; margin-bottom: 22px; margin-left: 0; }
  .admin-shell.is-sidebar-collapsed .brand-word,
  .admin-shell.is-sidebar-collapsed .brand small,
  .admin-shell.is-sidebar-collapsed .owner-card > div,
  .admin-shell.is-sidebar-collapsed .owner-card .online-dot,
  .admin-shell.is-sidebar-collapsed .nav-label,
  .admin-shell.is-sidebar-collapsed .nav-text,
  .admin-shell.is-sidebar-collapsed .portal-link > span:last-child,
  .admin-shell.is-sidebar-collapsed .system-state small { display: none; }
  .admin-shell.is-sidebar-collapsed .brand,
  .admin-shell.is-sidebar-collapsed .owner-card,
  .admin-shell.is-sidebar-collapsed .nav-link,
  .admin-shell.is-sidebar-collapsed .portal-link,
  .admin-shell.is-sidebar-collapsed .system-state { justify-content: center; }
  .admin-shell.is-sidebar-collapsed .owner-card { padding: 10px; }
  .admin-shell.is-sidebar-collapsed .nav-link { position: relative; gap: 0; padding-right: 10px; padding-left: 10px; }
  .admin-shell.is-sidebar-collapsed .nav-count { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid #0d0d10; font-size: 8px; }
  .admin-shell.is-sidebar-collapsed .nav-link.is-active .nav-count { border-color: #fff; }
  .admin-shell.is-sidebar-collapsed .portal-link { padding: 10px; }
  .admin-shell.is-sidebar-collapsed .nav-link::after {
    position: absolute; z-index: 50; top: 50%; left: calc(100% + 13px); width: max-content; max-width: 210px;
    padding: 8px 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
    color: #fff; background: #17171b; box-shadow: 0 13px 30px rgba(0,0,0,.24);
    content: attr(data-label); font-size: 11px; font-weight: 700; opacity: 0; pointer-events: none;
    transform: translate(-5px,-50%); transition: opacity 150ms ease, transform 150ms ease;
  }
  .admin-shell.is-sidebar-collapsed .nav-link:hover::after,
  .admin-shell.is-sidebar-collapsed .nav-link:focus-visible::after { opacity: 1; transform: translate(0,-50%); }
}

@media (max-width: 790px) {
  .sidebar-collapse { display: none; }
  .brand-row { margin-right: 10px; }
  .sidebar { visibility: hidden; transition: transform 220ms ease, visibility 0s linear 220ms; }
  .sidebar.is-open { visibility: visible; transition-delay: 0s; }
  .hero-heading { min-height: 0; padding: 27px 24px; }
  .hero-heading::after { right: -80px; opacity: .7; }
  .hero-heading .heading-actions { align-items: stretch; }
}

@media (max-width: 560px) {
  #themeLabel, .today-label { display: none; }
  .theme-toggle { width: 40px; padding: 0; }
  .breadcrumb { display: block; }
  .breadcrumb span::after { display: none; }
  .page-heading h1 { font-size: 36px; }
  .hero-heading h1 { font-size: 39px; letter-spacing: -2.3px; }
}
