/* Zetazeon Account — design system (UI refresh, 2026-12-05)
   Deep navy sidebar, light canvas, rich-blue primary, white cards with
   subtle borders. Presentation only: every class name used by the views
   is kept. No external fonts or inline styles (CSP self-only).
   Contrast checked for the combinations below (WCAG AA). */

:root {
  /* Surfaces */
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-input: #7d8ba1;          /* 3.45:1 on white (non-text UI) */

  /* Text */
  --text: #14213a;                  /* 14.9:1 on --bg */
  --text-muted: #526176;            /* 5.9:1 on --bg, 6.3:1 on white */
  --text-subtle: #64748b;           /* 4.76:1 on white — placeholders only */

  /* Brand */
  --primary: #2448c7;               /* white text 7.4:1 */
  --primary-hover: #1d3ba8;
  --primary-soft: #eef2ff;
  --primary-soft-border: #c7d2fe;
  --primary-ink: #1d3ba8;           /* on --primary-soft 8.4:1 */

  /* Sidebar */
  /* 50% navy (#111c35 at 50% over the canvas) with dark text for AA */
  --nav-navy: #111c35;
  --nav-bg: #838a98;
  --nav-fg: #0b1530;                /* 5.2:1 on --nav-bg */
  --nav-fg-muted: #111c35;          /* 4.9:1 */
  --nav-hover: rgba(255, 255, 255, 0.22);
  --nav-active: #111c35;
  --nav-active-fg: #ffffff;         /* 17:1 */
  --nav-accent: #9db4ff;
  --nav-focus: #111c35;

  /* Status */
  --ok: #166534;  --ok-soft: #ecfdf3;  --ok-border: #bbf7d0;
  --warn: #92400e; --warn-soft: #fffbeb; --warn-badge: #fef3c7; --warn-border: #fcd34d;
  --danger: #b91c1c; --danger-soft: #fef2f2; --danger-border: #fecaca;

  /* Accent tones (icons/dots only, not text backgrounds) */
  --tone-violet: #6d4ae0;
  --tone-sky: #0e7ab8;
  --tone-amber: #b45309;
  --tone-mint: #15803d;
  /* Legacy names kept for any view still referencing them */
  --lavender: #f3f0ff;
  --sky: #eef6fd;
  --peach: #fff6ed;
  --mint: #effbf4;

  /* Shape & spacing (4 / 8 / 12 / 16 / 24 / 32) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-pop: 0 12px 32px rgba(15, 23, 42, 0.14);
  --focus: 0 0 0 3px rgba(36, 72, 199, 0.4);
  --sidebar-w: 268px;
  --control-h: 40px;

  /* Inter / Noto Sans Bengali are used when installed; otherwise the
     platform UI font (Segoe UI / Nirmala UI on Windows). */
  font-family: "Inter", "Inter Variable", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto,
    "Noto Sans Bengali", "Nirmala UI", "Vrinda", "Noto Sans", sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
:lang(bn), .bn { font-family: "Noto Sans Bengali", "Nirmala UI", "Vrinda", "Inter", "Segoe UI", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: hidden; }
body { background: var(--bg); font-size: 15px; }
h1, h2, h3 { line-height: 1.25; margin: 0; color: var(--text); }
h1 { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 1.1875rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 var(--s2); }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
code { font-size: 0.9em; background: var(--surface-alt); border: 1px solid var(--border); padding: 0.1em 0.35em; border-radius: 6px; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--surface); color: var(--primary); padding: 8px 12px; border-radius: 8px; z-index: 100; font-weight: 600; box-shadow: var(--shadow-pop); }
.skip-link:focus { left: 8px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.icon { flex-shrink: 0; }
[hidden] { display: none !important; }
.num, .metric__value, .detail__amount, .sub-card__amount, .cats__amt, .dash-list__side, .inv-row__side, .table td.num { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
/* Desktop: navy column runs the full page height behind the sticky sidebar */
@media (min-width: 901px) {
  .shell { background: linear-gradient(to right, var(--nav-bg) var(--sidebar-w), transparent var(--sidebar-w)); }
}
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--nav-bg); color: var(--nav-fg);
  display: flex; flex-direction: column; padding: var(--s5) var(--s3) var(--s4); position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar__brand { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s2) var(--s5); }
.sidebar .sidebar__close { display: none; margin-left: auto; background: rgba(255, 255, 255, 0.25); border-color: rgba(17, 28, 53, 0.3); color: var(--nav-fg); }
.sidebar .sidebar__close:hover { background: var(--nav-hover); }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff;
  display: inline-grid; place-items: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.brand-name { display: block; font-weight: 700; font-size: 1.0625rem; color: var(--nav-navy); letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: 0.8125rem; color: var(--nav-fg-muted); font-weight: 500; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.nav-link {
  position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 42px; padding: 0 var(--s3);
  border-radius: var(--radius-sm); color: var(--nav-fg); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
}
.nav-link .icon { width: 18px; height: 18px; opacity: 0.9; }
.nav-link:hover { background: var(--nav-hover); color: var(--nav-navy); }
.nav-link.is-active { background: var(--nav-active); color: var(--nav-active-fg); font-weight: 600; }
.nav-link.is-active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 3px 3px 0; background: var(--nav-navy); }
.nav-link.is-active .icon { opacity: 1; color: var(--nav-accent); }
.sidebar :focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--nav-focus); }
.workspace-card {
  margin-top: auto; display: flex; gap: var(--s3); align-items: center; padding: var(--s3);
  border: 1px solid rgba(17, 28, 53, 0.18); border-radius: 12px; background: rgba(255, 255, 255, 0.22);
}
.workspace-card > span:last-child { min-width: 0; }
.workspace-card__avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--nav-navy); color: #ffffff; display: grid; place-items: center; font-weight: 700; font-size: 0.8125rem; flex-shrink: 0; }
.workspace-card__name { display: block; font-weight: 600; font-size: 0.875rem; color: var(--nav-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card__meta { display: block; font-size: 0.8125rem; color: var(--nav-fg-muted); }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: var(--s3); min-height: 68px; padding: var(--s3) var(--s6);
  background: rgba(245, 247, 251, 0.92); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(6px)) { .topbar { backdrop-filter: blur(6px); } }
.topbar .topbar__menu { display: none; }
.crumbs { min-width: 0; }
.crumbs ol { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; font-size: 0.875rem; color: var(--text-muted); white-space: nowrap; }
.crumbs li { overflow: hidden; text-overflow: ellipsis; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--text); font-weight: 500; }
.search {
  margin-left: auto; display: flex; align-items: center; gap: var(--s2); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 var(--s3); height: var(--control-h);
  width: min(380px, 38vw); color: var(--text-muted); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search:hover { border-color: var(--border-input); }
.topbar .search input { border: 0; background: transparent; padding: 0; min-height: 0; height: 100%; width: 100%; font: inherit; font-size: 0.9375rem; color: var(--text); min-width: 0; border-radius: 0; }
.topbar .search input::placeholder { color: var(--text-subtle); }
.topbar .search input:focus { outline: none; box-shadow: none; }
.search:focus-within { border-color: var(--primary); box-shadow: var(--focus); }
.icon-btn {
  display: inline-grid; place-items: center; width: var(--control-h); height: var(--control-h); border-radius: var(--radius-sm); flex-shrink: 0;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-alt); border-color: var(--border-input); color: var(--text); }
.menu { position: relative; min-width: 0; }
.profile-btn {
  display: flex; align-items: center; gap: var(--s2); height: var(--control-h); max-width: 240px; padding: 0 var(--s3) 0 4px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font: inherit; color: var(--text);
}
.profile-btn:hover { background: var(--surface-alt); border-color: var(--border-input); }
.avatar { width: 30px; height: 30px; border-radius: 7px; background: var(--primary-soft); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; font-size: 0.8125rem; flex-shrink: 0; }
.profile-btn__name { font-weight: 500; font-size: 0.9375rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__panel {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; max-width: min(320px, calc(100vw - 32px)); background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 20;
}
.menu__header { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu__header strong, .menu__header span { display: block; overflow-wrap: anywhere; }
.menu__header span { font-size: 0.8125rem; color: var(--text-muted); }
.menu__panel a, .menu__signout {
  display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--text);
  text-decoration: none; background: none; border: 0; font: inherit; font-size: 0.9375rem; cursor: pointer;
}
.menu__panel a:hover, .menu__panel a:focus-visible, .menu__signout:hover, .menu__signout:focus-visible { background: var(--surface-alt); }
.menu__signout { color: var(--danger); }
.content { padding: var(--s5) var(--s6) 48px; display: grid; gap: var(--s5); align-content: start; width: 100%; max-width: 1600px; }
.content:focus { outline: none; }

/* ---------- Page elements ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
.page-head h1 { overflow-wrap: anywhere; }
.page-head p { margin: 6px 0 0; font-size: 0.9375rem; }
.period { display: flex; align-items: center; gap: var(--s2); }
.period label { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }
.period select { min-width: 200px; }
select, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="month"], input[type="number"], input[type="search"], input[type="url"], input[type="tel"], input:not([type]), textarea {
  font: inherit; font-size: 0.9375rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-input);
  border-radius: var(--radius-sm); padding: 0 12px; min-height: var(--control-h); width: 100%; min-width: 0; max-width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { padding: 10px 12px; line-height: 1.5; }
select { width: auto; padding-right: 32px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23526176' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
select[multiple] { background-image: none; padding: 6px 8px; }
input::placeholder, textarea::placeholder { color: var(--text-subtle); }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #5f6e86; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-alt); color: var(--text-muted); border-color: var(--border-strong); cursor: not-allowed; }
input[type="file"] { font: inherit; font-size: 0.875rem; color: var(--text-muted); max-width: 100%; min-width: 0; width: 100%; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; font-size: 0.875rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-input);
  border-radius: 8px; padding: 7px 12px; margin-right: 10px; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--surface-alt); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow); min-width: 0; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s4); }
.card__head > div { min-width: 0; }
.card__head p { margin: 4px 0 0; }
.card__head .btn { flex-shrink: 0; }
.card.empty { text-align: center; padding: 48px var(--s5); display: grid; justify-items: center; gap: var(--s3); }
.card.empty p { max-width: 520px; margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }

.banner { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: 12px; border: 1px solid; font-size: 0.9375rem; }
.banner > div { flex: 1; min-width: 0; }
.banner > .icon { width: 20px; height: 20px; }
.banner span { color: inherit; }
.banner--warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }
.banner--warn strong { color: #7c2d12; }
.banner--warn .btn { background: var(--surface); border-color: #d97706; color: var(--warn); }
.banner--warn .btn:hover { background: var(--warn-badge); color: #7c2d12; }
.banner--ok { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok); }
.alert { display: flex; align-items: flex-start; gap: var(--s2); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 0.9375rem; border: 1px solid transparent; }
.alert > .icon { margin-top: 2px; }
.alert--success { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.alert--error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }

/* Quick actions: first link is the primary action (see .qa--primary) */
.quick-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.qa {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 18px;
  background: var(--surface); border: 1px solid var(--border-input); border-radius: 10px;
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.9375rem; box-shadow: var(--shadow);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.qa .icon { color: var(--primary); }
.qa:hover { background: var(--surface-alt); border-color: var(--primary); color: var(--text); }
.qa--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.qa--primary .icon { color: #fff; }
.qa--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }

/* KPI cards: white surface; tone shown by a small icon chip or dot */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.metric {
  position: relative; display: grid; gap: 6px; align-content: start; padding: 20px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: var(--text); --tone: var(--primary); --tone-bg: var(--primary-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.metric:hover { border-color: var(--primary-soft-border); box-shadow: var(--shadow-md); color: var(--text); }
.metric__label { display: flex; align-items: center; gap: var(--s2); font-size: 0.8125rem; color: var(--text-muted); font-weight: 500; }
.metric--has-icon .metric__label { padding-right: 40px; min-height: 36px; }
.metric__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); flex-shrink: 0; }
.metric--has-icon .metric__label::before { display: none; }
.metric__icon { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--tone-bg); color: var(--tone); }
.metric__value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; margin-top: 2px; }
.metric__sub { font-size: 0.8125rem; color: var(--text-muted); }
.metric--lavender { --tone: var(--tone-violet); --tone-bg: #f3f0ff; }
.metric--sky { --tone: var(--tone-sky); --tone-bg: #e8f4fc; }
.metric--peach { --tone: var(--tone-amber); --tone-bg: #fff4e6; }
.metric--mint { --tone: var(--tone-mint); --tone-bg: #e9f9ef; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.badge--ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.badge--muted { background: #f1f5f9; color: #475569; border-color: var(--border); }
.badge--info { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--primary-soft-border); }
.badge--warn { background: var(--warn-badge); color: var(--warn); border-color: var(--warn-border); }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { text-align: left; font-size: 0.8125rem; color: var(--text-muted); font-weight: 600; padding: 10px 16px; background: var(--surface-alt); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th.num, .table td.num { text-align: right; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.table td .badge + .badge { margin-left: 4px; }

/* ---------- Forms & buttons ---------- */
.field { display: grid; gap: 6px; margin-bottom: var(--s4); min-width: 0; }
.field label, .label { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.field > .small.muted, .field > p.muted { margin: 0; }
.req { color: var(--danger); }
.field__error { margin: 0; color: var(--danger); font-size: 0.875rem; font-weight: 500; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.input-group { display: flex; }
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group__btn {
  border: 1px solid var(--border-input); border-left: 0; background: var(--surface-alt); padding: 0 14px; font: inherit;
  font-size: 0.875rem; font-weight: 600; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; color: var(--text);
}
.input-group__btn:hover { background: #eef2f7; }
/* Default button = secondary: white, clear border */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--control-h); padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-input); background: var(--surface); color: var(--text); font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--surface-alt); border-color: var(--primary); color: var(--primary-ink); }
.btn--danger { background: var(--surface); border-color: #f19a9a; color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-muted); box-shadow: none; }
.btn--ghost:hover { background: #eef2f7; border-color: transparent; color: var(--text); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 0.875rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.btn:disabled:not([aria-disabled="true"]) { cursor: not-allowed; }

/* ---------- Auth & error pages ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.auth__wrap { width: 100%; padding: var(--s5) var(--s4); display: grid; place-items: center; }
.auth__card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--nav-navy); border-radius: 16px; padding: var(--s6) 28px; box-shadow: var(--shadow-md); display: grid; gap: var(--s4); }
.auth__card > p { margin: 0; }
.auth__brand { text-align: center; display: grid; justify-items: center; gap: 6px; }
.auth__brand .logo-mark { width: 44px; height: 44px; font-size: 1.25rem; }
.auth__brand h1 { font-size: 1.625rem; margin-top: 6px; }
.auth__brand p { margin: 0; color: var(--text-muted); }
.auth__foot { margin: 0; text-align: center; font-size: 0.8125rem; color: var(--text-muted); }

/* ---------- Responsive ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 39; }
@media (max-width: 1280px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .topbar, .content { padding-left: var(--s5); padding-right: var(--s5); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); visibility: hidden; transition: transform 0.2s ease, visibility 0s linear 0.2s; box-shadow: 0 0 40px rgba(15, 23, 42, 0.35); }
  .sidebar.is-open { transform: none; visibility: visible; transition: transform 0.2s ease; }
  .sidebar .sidebar__close, .topbar .topbar__menu { display: inline-grid; }
  .crumbs { display: none; }
  .search { width: auto; flex: 1; min-width: 0; }
  .profile-btn { padding-right: 4px; }
  .profile-btn__name, .profile-btn > .icon { display: none; }
  .topbar, .content { padding-left: var(--s4); padding-right: var(--s4); }
  .topbar { gap: var(--s2); }
  h1 { font-size: 1.625rem; }
}
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr; }
  .quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qa { justify-content: center; padding: 0 10px; text-align: center; }
  .banner { flex-wrap: wrap; align-items: flex-start; }
  .banner > div { flex: 1 1 calc(100% - 40px); }
  .banner .btn { margin-left: 32px; }
  .trend__label { font-size: 22px; }
  .period, .period select { width: 100%; }
  .period select { min-width: 0; }
  .card { padding: var(--s4); }
  .metric__value { font-size: 1.5rem; }
}
@media (max-width: 380px) {
  .quick-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Module layout: actions, filters, split list/detail ---------- */
.page-actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.page-actions form { margin: 0; }
.metrics-note { margin: calc(var(--s3) * -1) 0 0; }
.metric__link { font-size: 0.875rem; font-weight: 600; color: var(--primary); }
.filters { display: grid; gap: var(--s3); padding: var(--s4) 20px; }
.filters__row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; }
.filters__actions { display: flex; gap: var(--s2); margin-left: auto; }
.field--inline { margin: 0; gap: 4px; min-width: 140px; }
.field--inline label { font-size: 0.8125rem; color: var(--text-muted); font-weight: 600; }
.field--inline input, .field--inline select { min-height: 38px; width: 100%; }
.grow { flex: 1 1 240px; }
.check { display: inline-flex; gap: var(--s2); align-items: center; font-size: 0.9375rem; cursor: pointer; padding: 6px 0; min-height: 38px; }
.check input, input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: var(--s1); }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.chip:hover { border-color: var(--primary); color: var(--primary-ink); }
.chip.is-active { background: var(--nav-navy); border-color: var(--nav-navy); color: #fff; font-weight: 600; }
.split { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); align-items: start; }
.split--with-panel { grid-template-columns: minmax(0, 1fr) 340px; }
.split--with-panel .table th, .split--with-panel .table td { padding-left: 10px; padding-right: 10px; }
.split--with-panel .table td { font-size: 0.875rem; }
.card--flush { padding: 0; overflow: hidden; }
.card__head--pad { padding: 20px var(--s5) 0; }
.card--flush > .card__head--pad { margin-bottom: var(--s3); }
.selection-bar { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; padding: 10px var(--s4); background: var(--primary-soft); border-bottom: 1px solid var(--primary-soft-border); }
.selection-bar span { margin-right: auto; font-size: 0.9375rem; color: var(--primary-ink); }
.col-check { width: 44px; }
.col-check input { width: 16px; height: 16px; accent-color: var(--primary); }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
.table--rows tbody tr[data-row-href] { cursor: pointer; }
.table--rows tbody tr:hover { background: var(--surface-alt); }
.table--rows tbody tr.is-selected { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.table--rows tbody tr.is-archived td { color: var(--text-muted); }
.table--rows tbody tr.is-voided td { color: var(--text-muted); text-decoration: line-through; }
.table--rows tbody tr.is-voided td .badge { text-decoration: none; }
.row-link { color: var(--text); font-weight: 600; text-decoration: none; }
.row-link:hover { color: var(--primary); text-decoration: underline; }
.row-link + .badge { margin-left: 6px; }
.sort { color: inherit; text-decoration: none; }
.sort.is-active, .sort:hover { color: var(--primary-ink); }
.empty-row { text-align: center; padding: 40px 16px !important; color: var(--text-muted); }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s4); border-top: 1px solid var(--border); background: var(--surface); }
.pager { display: flex; align-items: center; gap: var(--s2); }
.detail { position: sticky; top: 84px; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); max-height: calc(100vh - 104px); overflow-y: auto; }
.detail__head { display: flex; justify-content: space-between; gap: var(--s3); align-items: flex-start; }
.detail__head > div { min-width: 0; }
.detail__head h2 { overflow-wrap: anywhere; }
.detail__head p { margin: 2px 0 0; }
.detail__amount { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.detail__h { font-size: 0.875rem; font-weight: 600; color: var(--text-muted); margin: var(--s2) 0 0; padding-top: var(--s3); border-top: 1px solid var(--border); }
.detail__actions { display: flex; flex-wrap: wrap; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--border); }
.detail__actions form { margin: 0; }
.detail textarea { margin-bottom: var(--s2); }
.dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 0.9375rem; }
.dl dt { color: var(--text-muted); }
.detail .dl { grid-template-columns: 92px minmax(0, 1fr); font-size: 0.875rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }
.receipt { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); margin: 0; font-size: 0.9375rem; }
.receipt > span { min-width: 0; overflow-wrap: anywhere; }
.upload { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); padding: var(--s3); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-alt); }
.upload .btn { justify-self: start; }
.upload p { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { display: grid; gap: 2px; padding-left: var(--s3); border-left: 2px solid var(--border-strong); font-size: 0.875rem; }
.alert--info { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--primary-soft-border); }
.form { display: grid; gap: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s5); }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--border); }
.error-summary { margin: 6px 0 0; padding-left: 18px; }
.error-summary a { color: inherit; }
.list { padding-left: 18px; display: grid; gap: 4px; }
textarea { resize: vertical; }
@media (max-width: 1400px) {
  .split--with-panel { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; max-height: none; order: -1; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .filters__actions { margin-left: 0; width: 100%; }
  .filters__actions .btn { flex: 1; }
  .field--inline { flex: 1 1 140px; min-width: 0; }
  .page-actions { width: 100%; }
  .page-actions > .btn, .page-actions > form { flex: 1 1 auto; }
  .page-actions > form .btn { width: 100%; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .table-foot { justify-content: center; }
}

/* ---------- Subscriptions ---------- */
.tabbar { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s3); flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tabs { display: flex; gap: var(--s1); flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.9375rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--primary-ink); border-bottom-color: var(--primary); }
.tab__count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: #eef2f7; color: var(--text-muted); font-size: 0.75rem; text-align: center; }
.tab.is-active .tab__count { background: var(--primary-soft); color: var(--primary-ink); }
.tabbar__tools { display: flex; gap: var(--s2); align-items: center; padding-bottom: var(--s2); flex-wrap: wrap; }
.tabbar__tools input { width: 200px; min-height: 36px; }
.tabbar__tools select { min-height: 36px; }
.tab-help { margin: calc(var(--s3) * -1) 0 0; }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.sub-card { display: grid; gap: 10px; align-content: start; }
.sub-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft-border); }
.sub-card__head { display: flex; justify-content: space-between; gap: var(--s2); align-items: flex-start; }
.sub-card__head > div { min-width: 0; }
.sub-card__head h3 { font-size: 1rem; overflow-wrap: anywhere; }
.sub-card__head p { margin: 2px 0 0; }
.sub-card__amount { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.sub-card .btn { justify-self: start; }
.dl--compact { grid-template-columns: 104px minmax(0, 1fr); font-size: 0.875rem; gap: 4px 10px; }
.note { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-border); padding: 8px 10px; border-radius: var(--radius-sm); margin: 0; font-size: 0.875rem; }
.inline-form { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; }
.reminder-form fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: var(--s3); flex-wrap: wrap; }
fieldset.field { border: 0; padding: 0; margin: 0 0 var(--s4); }
legend { font-weight: 600; font-size: 0.875rem; padding: 0; margin-bottom: 6px; }
.timeline li.is-voided span:first-child { text-decoration: line-through; color: var(--text-muted); }
details summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 0.875rem; margin: 6px 0; }
details form { display: grid; gap: 6px; margin-top: 6px; }
.event-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3); }
.event { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); text-decoration: none; color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.event:hover { border-color: var(--primary); color: var(--text); }
.event--renewal { border-left: 4px solid var(--primary); }
.event--expiry { border-left: 4px solid #94a3b8; }
.event--cancellation_deadline { border-left: 4px solid #d97706; }
.event__date { font-size: 0.8125rem; color: var(--text-muted); }
.cal-title { padding: 0 6px; }
.calendar { display: grid; }
.calendar__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar__dow { padding: 8px; font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.calendar__cell { min-height: 100px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: grid; gap: 4px; align-content: start; min-width: 0; }
.calendar__cell:nth-child(7n) { border-right: 0; }
.calendar__cell.is-empty { background: var(--surface-alt); }
.calendar__cell.is-today { background: var(--primary-soft); }
.calendar__cell.is-today .calendar__day { color: var(--primary-ink); }
.calendar__day { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); }
.cal-event { display: grid; font-size: 0.75rem; padding: 3px 6px; border-radius: 6px; text-decoration: none; color: var(--primary-ink); background: var(--primary-soft); border-left: 3px solid var(--primary); overflow: hidden; overflow-wrap: anywhere; }
.cal-event:hover { color: var(--primary-hover); background: #e0e7ff; }
.cal-event--expiry { background: #f1f5f9; color: #475569; border-left-color: #94a3b8; }
.cal-event--cancellation_deadline { background: var(--warn-badge); color: var(--warn); border-left-color: #d97706; }
.cal-event__amt { font-weight: 600; }
@media (max-width: 700px) {
  .calendar__row--head { display: none; }
  .calendar__row { grid-template-columns: 1fr; }
  .calendar__cell { min-height: 0; border-right: 0; }
  .calendar__cell:not(.has-events) { display: none; }
  .tabbar__tools { width: 100%; }
  .tabbar__tools input { width: 100%; flex: 1 1 160px; }
}
/* Form fields keep their natural height next to taller neighbours */
.form-grid { align-items: start; }
.field { align-content: start; }
.form-grid select, .form select { width: 100%; }

/* ---------- Invoices, notifications, reports, print ---------- */
.bell { position: relative; }
.bell__count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.split--invoices { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
.inv-list { list-style: none; margin: 0; padding: 0; max-height: 75vh; overflow-y: auto; }
.inv-row { display: flex; justify-content: space-between; gap: 10px; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.inv-row:hover { background: var(--surface-alt); color: var(--text); }
.inv-row.is-selected { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.inv-row__main, .inv-row__side { display: grid; gap: 2px; min-width: 0; }
.inv-row__main strong, .inv-row__main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-row__side { justify-items: end; text-align: right; }
.inv-preview { display: grid; gap: var(--s4); align-content: start; min-width: 0; }
.inv-actions { display: grid; gap: var(--s3); }
.inv-actions__status { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.inv-actions__buttons { display: flex; gap: var(--s2); flex-wrap: wrap; }
.inv-actions__buttons form { margin: 0; }
.invoice-doc { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s6); display: grid; gap: 20px; overflow: hidden; box-shadow: var(--shadow); }
.invoice-doc p { margin: 0; }
.invoice-doc__stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-25deg); font-size: 5rem; font-weight: 800; color: rgba(82, 97, 118, 0.12); pointer-events: none; }
.is-void .invoice-doc__stamp { color: rgba(185, 28, 28, 0.15); }
.invoice-doc__head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.invoice-doc__issuer { font-size: 1.25rem; font-weight: 700; color: var(--nav-navy); }
.invoice-doc__title { font-size: 1.25rem; font-weight: 700; text-align: right; text-transform: uppercase; letter-spacing: 0.04em; color: var(--primary); }
.invoice-doc__meta .dl { margin-top: 6px; }
.invoice-doc__totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; margin: 0 0 0 auto; min-width: min(260px, 100%); }
.invoice-doc__totals dt { color: var(--text-muted); }
.invoice-doc__totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.invoice-doc__total { font-weight: 700; font-size: 1.125rem; color: var(--text) !important; border-top: 1px solid var(--border); padding-top: 6px; }
.line-items input { min-height: 36px; padding: 0 9px; }
.col-qty { width: 90px; }
.col-rate { width: 140px; }
.col-amt { width: 140px; }
.icon-btn--sm { width: 32px; height: 32px; font-size: 0.8125rem; }
.invoice-editor { display: grid; gap: var(--s5); }
.totals-card { display: grid; gap: var(--s2); }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08); z-index: 5; margin-top: 0; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; }
.notif-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.notif-list li:last-child { border-bottom: 0; }
.notif-list a { display: grid; gap: 2px; text-decoration: none; color: var(--text); min-width: 0; }
.notif-list a:hover strong { color: var(--primary); }
.notif-list li.is-read { opacity: 0.7; }
.notif-list form { margin: 0; flex-shrink: 0; }
.list-rows { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: 6px; }
.list-rows input { max-width: 280px; min-height: 36px; }
.add-row input { max-width: 280px; min-height: 36px; }
.bar-col { width: 200px; }
progress.bar, progress.cats__bar {
  appearance: none; -webkit-appearance: none; width: 120px; height: 8px; border: 0; border-radius: 999px; overflow: hidden;
  background: #e8edf5; vertical-align: middle; margin-right: 6px; color: var(--primary); --bar: var(--primary);
}
progress.bar::-webkit-progress-bar { background: #e8edf5; border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--bar); border-radius: 999px; }
progress.bar::-moz-progress-bar { background: var(--bar); border-radius: 999px; }
.print-page { background: #fff; }
.print-page main { max-width: 820px; margin: 20px auto; padding: 0 var(--s4); }
.print-bar { display: flex; gap: var(--s2); justify-content: center; padding: var(--s3); }
@media (max-width: 1000px) {
  .split--invoices { grid-template-columns: minmax(0, 1fr); }
  .inv-list { max-height: 320px; }
}
@media (max-width: 640px) {
  .invoice-doc { padding: 18px; }
  .invoice-doc__title { text-align: left; }
  .bar-col { display: none; }
  .notif-list li { flex-wrap: wrap; }
}
@media print {
  .no-print, .sidebar, .topbar, .drawer-backdrop, .skip-link, .print-bar, .alert { display: none !important; }
  body, .print-page { background: #fff; }
  .content { padding: 0; max-width: none; }
  .card, .invoice-doc { border: 0; box-shadow: none; padding: 0; }
  .metric { border: 1px solid #ddd; box-shadow: none; }
  .report-section, .invoice-doc__items tr { break-inside: avoid; }
  thead { display: table-header-group; }
  a { color: inherit; text-decoration: none; }
}

/* ---- Dashboard widgets ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dash-row { margin-top: 0; }
.dash-empty { padding: var(--s4) 20px; margin: 0; color: var(--text-muted); font-size: 0.9375rem; background: var(--surface-alt); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.card--flush .dash-empty { margin: 0 var(--s5) var(--s5); }
.trend { margin: 0 0 var(--s4); }
.trend:last-child { margin-bottom: 0; }
.trend__cap { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); flex-wrap: wrap; }
.trend__svg { width: 100%; height: auto; max-height: 220px; display: block; overflow: visible; }
.trend__axis { stroke: var(--border-strong); stroke-width: 1; }
.trend__hit { fill: transparent; }
.trend__bar { fill: #93a8ec; }
.trend__bar--now { fill: var(--primary); }
.trend a:hover .trend__bar, .trend a:focus .trend__bar { fill: var(--primary-hover); }
.trend a:hover .trend__hit { fill: var(--surface-alt); }
.trend a:focus { outline: none; }
.trend a:focus .trend__hit { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 2; }
.trend__label { font-size: 13px; fill: var(--text-muted); font-family: inherit; }
.cats + .cats { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--border); }
.cats__total { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); }
.cats__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.cats__row { display: grid; grid-template-columns: 10px minmax(0, 1fr) minmax(80px, 140px) auto 44px; align-items: center; gap: var(--s3); font-size: 0.9375rem; }
.cats__row > a, .cats__row > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cats__row > a { color: var(--text); font-weight: 500; text-decoration: none; }
.cats__row > a:hover { color: var(--primary); text-decoration: underline; }
.cats__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--border-strong); }
progress.cats__bar { width: 100%; margin: 0; }
.cats__amt { text-align: right; font-weight: 600; }
.cats__pct { text-align: right; }
.cats__dot--c1 { background: #2448c7; } .cats__bar--c1 { --bar: #2448c7; accent-color: #2448c7; }
.cats__dot--c2 { background: #6d4ae0; } .cats__bar--c2 { --bar: #6d4ae0; accent-color: #6d4ae0; }
.cats__dot--c3 { background: #0e7ab8; } .cats__bar--c3 { --bar: #0e7ab8; accent-color: #0e7ab8; }
.cats__dot--c4 { background: #c2620c; } .cats__bar--c4 { --bar: #c2620c; accent-color: #c2620c; }
.cats__dot--c5 { background: #15803d; } .cats__bar--c5 { --bar: #15803d; accent-color: #15803d; }
.cats__dot--other { background: #8391a7; } .cats__bar--other { --bar: #8391a7; accent-color: #8391a7; }
.dash-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.dash-list li + li { border-top: 1px solid var(--border); }
.dash-list__row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 14px var(--s5); color: inherit; text-decoration: none; }
.dash-list__row:hover, .dash-list__row:focus-visible { background: var(--surface-alt); color: inherit; }
.dash-list__row:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); border-radius: 0; }
.dash-list__main { display: grid; gap: 2px; min-width: 0; }
.dash-list__main strong, .dash-list__main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-list__side { display: grid; justify-items: end; gap: 4px; white-space: nowrap; }
.dash-row .card__head--pad + .table-wrap { border-top: 1px solid var(--border); }
@media (max-width: 640px) {
  .cats__row { grid-template-columns: 10px minmax(0, 1fr) auto 40px; }
  progress.cats__bar { display: none; }
  .dash-list__row { padding: 12px var(--s4); }
  .card__head--pad { padding: var(--s4) var(--s4) 0; }
  .card--flush .dash-empty { margin: 0 var(--s4) var(--s4); }
}
