/* Home Reno Finance — design tokens & components
   "Site ledger v2 / soft edition" — blueprint navy + brass on warm paper,
   on a rounded geometry. Radius carries rank: 20 hero · 16 card · 12 panel ·
   10 input · 8 chip · 999 pill. Nothing is square except the ledger rules. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Noto+Sans+Malayalam:wght@400;500;600;700&display=swap");

:root {
  /* Surfaces */
  --paper: #faf9f6;
  --paper-deep: #f1eee7;   /* canvas behind floating sheets */
  --surface: #ffffff;
  --surface-sunk: #f4f2eb; /* tab tracks, disabled fields */
  --hairline: #e3e0d6;
  --hairline-soft: #f2f0e9; /* ledger rules — lighter than card borders */
  --hairline-strong: #cfcabb;
  --track: #edeae2;

  /* Text */
  --ink: #1c2333;
  --ink-soft: #3a4256;
  --concrete: #5a5f68;      /* darkened from #6b6f76 for bright sunlight */
  --concrete-light: #9a9da3; /* placeholders only — never carries meaning */

  /* Brand */
  --blueprint: #2b5f8c;
  --blueprint-dark: #1f4666;
  --blueprint-light: #e8f0f6;
  --brass: #a87b3f;
  --brass-light: #f3ead9;

  /* Semantic — the *-ink steps let text sit on a tint at full contrast */
  --green: #2f6b4f;
  --green-light: #e7f2ec;
  --green-ink: #255740;
  --rust: #a6432e;
  --rust-light: #f7e9e5;
  --rust-ink: #8a3626;
  --amber: #b8801f;
  --amber-light: #faf0dc;
  --amber-ink: #7a5410;

  /* Chart categorical — fixed order, so a category keeps its colour
     across every chart. Labor is always brass, Materials always blueprint. */
  --c1: #2b5f8c;
  --c2: #a87b3f;
  --c3: #2f6b4f;
  --c4: #a6432e;
  --c5: #b8801f;
  --c6: #6e9bbf;
  --c7: #c9a470;
  --c8: #9a9da3;

  /* Type */
  --font-display: "Space Grotesk", "Noto Sans Malayalam", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans Malayalam", system-ui, sans-serif;
  /* Malayalam sits after Plex Mono so Latin digits still get the mono face —
     fallback is per-glyph, and Plex Mono has no Malayalam coverage. */
  --font-ledger: "IBM Plex Mono", "Noto Sans Malayalam", ui-monospace, monospace;
  --font-ml: "Noto Sans Malayalam", system-ui, sans-serif;
  --lh-ml-bump: 1.35;

  /* Radii */
  --r-hero: 20px;
  --r-card: 16px;
  --r-panel: 12px;
  --r-input: 10px;
  --r-chip: 8px;
  --r-pill: 999px;
  --radius: var(--r-card);      /* legacy aliases */
  --radius-sm: var(--r-input);

  /* Elevation */
  --sh-card: 0 1px 2px rgba(28, 35, 51, 0.04);
  --sh-raise: 0 2px 6px rgba(43, 95, 140, 0.22);
  --sh-menu: 0 8px 24px rgba(28, 35, 51, 0.12);
  --sh-modal: 0 12px 32px rgba(28, 35, 51, 0.16);
  --sh-sheet: 0 -4px 14px rgba(28, 35, 51, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
:lang(ml), [lang="ml"] { font-family: var(--font-ml); }
:lang(ml) .nav-link, :lang(ml) .bottom-nav-item, :lang(ml) .stat-label,
:lang(ml) .card-title, :lang(ml) .btn { line-height: var(--lh-ml-bump); }
h1, h2, h3, .font-display { font-family: var(--font-display); letter-spacing: -0.01em; margin: 0; }
.font-ledger, .tabular { font-family: var(--font-ledger); font-variant-numeric: tabular-nums; }
a { color: inherit; }
button { font: inherit; }

/* Mono eyebrow label — "HEADLINE", "CHARTS", "42 TRANSACTIONS" */
.eyebrow {
  font-family: var(--font-ledger);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--concrete);
}
.eyebrow-meta {
  font-family: var(--font-ledger);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--concrete-light);
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }

/* Money — ₹ always one step smaller and lighter than its digits, sign leads */
.money-sym { font-size: 0.66em; font-weight: 400; opacity: 0.72; margin-right: 1px; }
.money-sign { font-weight: 500; margin-right: 1px; }

/* Layout shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  display: none;
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--hairline);
  background: var(--surface);
  padding: 18px 10px 18px;
}
@media (min-width: 640px) { .sidebar { display: flex; flex-direction: column; } }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 16px; }
.sidebar-logo {
  width: 32px; height: 32px; border-radius: var(--r-input); background: var(--blueprint);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 17px; flex-shrink: 0;
}
.sidebar-wordmark { font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.sidebar-sub {
  font-family: var(--font-ledger); font-size: 9.5px; font-weight: 400;
  letter-spacing: 0.08em; color: var(--concrete); margin-top: 4px;
}
.sidebar-foot { margin-top: auto; padding: 14px 6px 0; }
.sidebar-foot-card {
  background: var(--brass-light); border-radius: 14px; padding: 12px 13px;
  font-family: var(--font-ledger); font-size: 10.5px; line-height: 1.5; color: var(--amber-ink);
}

.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-panel);
  font-size: 13px; font-weight: 400; color: var(--ink-soft); text-decoration: none; margin-bottom: 2px;
}
.nav-link:hover { background: var(--paper); }
.nav-link.active { background: var(--blueprint-light); color: var(--blueprint-dark); font-weight: 600; }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-tag {
  margin-left: auto; font-family: var(--font-ledger); font-size: 8.5px; font-weight: 600;
  padding: 4px 7px; border-radius: var(--r-pill); background: var(--surface-sunk); color: var(--concrete);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(250, 249, 246, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
@media (min-width: 640px) { .topbar-row { padding: 15px 30px; } }
.topbar-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.topbar-meta {
  font-family: var(--font-ledger); font-size: 11px; color: var(--concrete);
  white-space: nowrap; display: none;
}
@media (min-width: 640px) { .topbar-meta { display: block; } }
.topbar-offline {
  background: var(--amber-light); color: var(--amber-ink); display: flex; align-items: center;
  justify-content: center; gap: 9px; font-size: 11.5px; font-weight: 500; padding: 10px 16px;
}
.topbar-offline svg { width: 14px; height: 14px; flex-shrink: 0; }
.content { flex: 1; padding: 16px; padding-bottom: 104px; }
@media (min-width: 640px) { .content { padding: 22px 30px 40px; } }

/* Language segmented toggle */
.seg { display: flex; background: var(--surface-sunk); border-radius: var(--r-pill); padding: 2px; }
.seg-item {
  padding: 5px 10px; border: none; background: none; cursor: pointer; border-radius: var(--r-pill);
  font-family: var(--font-ledger); font-size: 10px; font-weight: 600; color: var(--concrete);
}
.seg-item.active { background: var(--blueprint); color: #fff; }

.avatar-btn {
  width: 30px; height: 30px; border-radius: var(--r-pill); border: none; cursor: pointer;
  background: var(--blueprint); color: #fff; font-family: var(--font-display);
  font-weight: 600; font-size: 13px; flex-shrink: 0;
}

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  border-top: 1px solid var(--hairline); background: #fffdf9;
  box-shadow: 0 -3px 12px rgba(28, 35, 51, 0.05);
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
}
@media (min-width: 640px) { .bottom-nav { display: none; } }
.bottom-nav-item {
  display: grid; place-items: center; gap: 5px; padding: 7px 0; border-radius: 14px;
  font-size: 9.5px; font-weight: 500; color: var(--concrete); background: none; border: none;
  text-decoration: none; cursor: pointer;
}
.bottom-nav-item.active { background: var(--blueprint-light); color: var(--blueprint); font-weight: 600; }
.bottom-nav-item svg { width: 19px; height: 19px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 11px 16px; border-radius: var(--r-panel);
  font-size: 12.5px; font-weight: 600; border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:disabled { opacity: .45; pointer-events: none; }
.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--blueprint); color: #fff; box-shadow: var(--sh-raise); }
.btn-primary:hover { background: var(--blueprint-dark); }
.btn-outline { background: var(--surface); border-color: var(--hairline-strong); color: var(--ink); font-weight: 500; }
.btn-outline:hover { border-color: var(--blueprint); color: var(--blueprint); }
.btn-ghost { background: none; color: var(--blueprint); font-weight: 500; }
.btn-ghost:hover { background: var(--blueprint-light); color: var(--blueprint-dark); }
.btn-danger { background: var(--rust); color: #fff; }
.btn-danger:hover { background: var(--rust-ink); }
.btn-sm { min-height: 34px; padding: 8px 12px; font-size: 11px; border-radius: var(--r-input); }
.btn-icon {
  width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: var(--r-pill);
  background: none; color: var(--concrete); border: 1px solid transparent;
}
.btn-icon:hover { background: var(--paper); border-color: var(--hairline); color: var(--blueprint); }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; border-radius: var(--r-input); border: 1px solid var(--hairline-strong);
  background: var(--surface); padding: 0 13px; font-size: 12.5px; color: var(--ink); font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 10px 13px; resize: vertical; }
.input::placeholder { color: var(--concrete-light); }
.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border: 1.5px solid var(--blueprint); box-shadow: 0 0 0 3px rgba(43, 95, 140, 0.12);
}
.input:disabled { background: var(--surface-sunk); border-color: var(--hairline); color: var(--concrete-light); }
.input.has-error { border: 1.5px solid var(--rust); background: #fefaf9; }
.field-error { color: var(--rust); font-size: 11px; margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-card); box-shadow: var(--sh-card);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--hairline-soft); padding: 13px 16px;
}
.card-title { font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.card-sub { font-family: var(--font-ledger); font-size: 10px; letter-spacing: 0.06em; color: var(--concrete-light); text-transform: uppercase; }
.card-body { padding: 16px; }
.card-body.tight { padding: 12px 14px; }

/* Hero slab — the one saturated field on a screen */
.hero-card {
  background: var(--blueprint); color: #fff; border-radius: var(--r-hero);
  padding: 17px 18px 19px; box-shadow: 0 3px 10px rgba(43, 95, 140, 0.22);
}
.hero-label {
  font-family: var(--font-ledger); font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: #b9d2e6;
}
.hero-value {
  margin-top: 10px; font-family: var(--font-ledger); font-variant-numeric: tabular-nums;
  font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -0.02em;
}
@media (min-width: 640px) { .hero-value { font-size: 44px; } }
.hero-chip {
  margin-top: 11px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px;
  border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.14);
  font-size: 11px; color: #dceaf4;
}

/* Stat cards */
.stat-card {
  border: 1px solid var(--hairline); border-radius: var(--r-card); background: var(--surface);
  padding: 13px 14px 14px; box-shadow: var(--sh-card);
}
.stat-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.stat-dot { width: 8px; height: 8px; border-radius: var(--r-pill); flex-shrink: 0; }
.stat-label {
  font-family: var(--font-ledger); font-size: 10px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--concrete);
}
.stat-value {
  font-family: var(--font-ledger); font-variant-numeric: tabular-nums;
  font-size: 24px; font-weight: 600; line-height: 1;
}
@media (min-width: 640px) { .stat-value { font-size: 26px; } }
.stat-sub { font-size: 11px; color: var(--concrete); margin-top: 6px; }
.stat-icon { width: 28px; height: 28px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; }
.stat-green .stat-value { color: var(--green); }
.stat-rust .stat-value { color: var(--rust); }
.stat-brass .stat-value { color: var(--brass); }
.stat-amber .stat-value { color: var(--amber); }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 12px; } .grid-3-lg { grid-template-columns: repeat(3,1fr); } }

/* Quick actions — one card, four columns */
.quick-actions {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card);
  display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; box-shadow: var(--sh-card);
}
.quick-action {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 12px 6px 13px 10px; background: none; border: none; cursor: pointer;
  font-size: 10px; font-weight: 500; color: var(--ink-soft); text-align: left; line-height: 1.25;
}
.quick-action:hover { background: var(--paper); }
.quick-action-icon { width: 34px; height: 34px; border-radius: var(--r-pill); display: grid; place-items: center; }
.quick-action-icon svg { width: 17px; height: 17px; }
@media (min-width: 640px) {
  .quick-action { flex-direction: row; align-items: center; gap: 10px; padding: 14px 16px; font-size: 12px; }
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; border-radius: var(--r-pill); padding: 5px 11px;
  font-size: 10.5px; font-weight: 600;
}
.badge-green { background: var(--green-light); color: var(--green-ink); }
.badge-rust { background: var(--rust-light); color: var(--rust-ink); }
.badge-amber { background: var(--amber-light); color: var(--amber-ink); }
.badge-blueprint { background: var(--blueprint-light); color: var(--blueprint-dark); }
.badge-neutral { background: var(--surface-sunk); color: var(--ink-soft); }

/* Tone-colored icon circles used across list rows */
.icon-circle {
  width: 36px; height: 36px; border-radius: var(--r-pill); display: grid; place-items: center; flex-shrink: 0;
}
.icon-circle svg { width: 17px; height: 17px; }
.icon-circle-sm { width: 26px; height: 26px; }
.icon-circle-sm svg { width: 13px; height: 13px; }
.tone-green { background: var(--green-light); color: var(--green); }
.tone-rust { background: var(--rust-light); color: var(--rust); }
.tone-blueprint { background: var(--blueprint-light); color: var(--blueprint-dark); }
.tone-amber { background: var(--amber-light); color: var(--amber); }
.tone-brass { background: var(--brass-light); color: var(--brass); }
.tone-neutral { background: var(--surface-sunk); color: var(--concrete); }

/* Lists — ruled ledger paper inside a rounded sheet */
.ledger-sheet {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card);
  overflow: hidden; box-shadow: var(--sh-card);
}
.list-row { display: flex; align-items: center; gap: 11px; padding: 0 13px; min-height: 52px; }
.list-row + .list-row { border-top: 1px solid var(--hairline-soft); }
.list-row.deleted { opacity: .5; }
.list-row-main { flex: 1; min-width: 0; }
.list-row-title { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.list-row-meta { margin-top: 3px; font-size: 10.5px; line-height: 1.2; color: var(--concrete); }
.list-row-amount {
  font-family: var(--font-ledger); font-variant-numeric: tabular-nums;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
@media (min-width: 640px) { .list-row-amount { font-size: 15px; } }
.amount-green { color: var(--green); }
.amount-rust { color: var(--rust); }
.amount-blueprint { color: var(--blueprint); }

/* Summary rows — accounts, loans, bills stacked in one sheet */
.summary-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
}
.summary-row + .summary-row { border-top: 1px solid var(--hairline-soft); }
.summary-row.accent { background: #fdfcfa; }
.summary-name { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.summary-sub { font-size: 10.5px; line-height: 1.2; color: var(--concrete); margin-top: 3px; }
.summary-amount { font-family: var(--font-ledger); font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 500; }

/* Progress bar */
.progress { height: 10px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.progress-thin { height: 6px; }
.progress-bar { height: 100%; border-radius: var(--r-pill); transition: width .2s; }
.progress-bar.over {
  background: repeating-linear-gradient(45deg, var(--rust) 0 6px, var(--rust-ink) 6px 12px);
}

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  border: 1.5px dashed var(--hairline-strong); border-radius: 14px; padding: 22px 18px;
}
.empty-title { font-family: var(--font-display); font-weight: 600; font-size: 13px; }
.empty-body { font-size: 11.5px; line-height: 1.5; color: var(--concrete); max-width: 320px; margin: 0; }
.blueprint-mark { color: #9bb6cc; }

/* Skeleton */
.skeleton { background: var(--track); border-radius: var(--r-pill); animation: pulse 1.4s ease-in-out infinite; }
.skeleton-soft { background: var(--hairline-soft); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* Toast */
.toast-stack {
  position: fixed; left: 0; right: 0; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none;
}
@media (min-width: 640px) { .toast-stack { bottom: 24px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; max-width: 380px;
  border-radius: 14px; padding: 12px 14px; font-size: 12px; font-weight: 500; color: #fff;
  box-shadow: var(--sh-menu);
}
.toast svg { width: 17px; height: 17px; flex-shrink: 0; margin-left: auto; }
.toast-success { background: var(--green); }
.toast-error { background: var(--rust); }
.toast-info { background: var(--ink); }

/* Dialog — bottom sheet on mobile, centered modal on desktop */
.dialog-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(28, 35, 51, 0.4);
}
@media (min-width: 640px) { .dialog-overlay { align-items: center; padding: 24px; } }
.dialog {
  position: relative; z-index: 10; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: 18px 18px 0 0; padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--sh-sheet);
}
@media (min-width: 640px) {
  .dialog { border-radius: var(--r-card); padding: 18px 20px 20px; box-shadow: var(--sh-modal); }
}
.dialog.sm { max-width: 400px; }
.dialog.lg { max-width: 640px; }
.dialog-grabber {
  width: 34px; height: 4px; border-radius: var(--r-pill); background: #dcd8cd; margin: 0 auto 12px;
}
@media (min-width: 640px) { .dialog-grabber { display: none; } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; }

/* Pills / segmented filters */
.pill-row { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0; border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--surface);
  color: var(--ink-soft); font-size: 11.5px; font-weight: 500; padding: 7px 13px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.pill:hover { background: var(--surface-sunk); }
.pill.active { border-color: var(--blueprint); background: var(--blueprint); color: #fff; }
@media (min-width: 640px) { .pill { font-size: 12px; padding: 8px 14px; } }

/* Tabs (settings) */
.tab-row { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 4px; }

/* Dropdown menu */
.menu {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: var(--sh-menu); overflow: hidden; padding: 0;
}
.menu-item {
  display: block; width: 100%; text-align: left; padding: 11px 13px; background: none; border: none;
  cursor: pointer; font-size: 12px; font-weight: 500; color: var(--ink);
}
.menu-item + .menu-item { border-top: 1px solid var(--hairline-soft); }
.menu-item:hover { background: var(--surface-sunk); }

/* Search field with leading icon */
.search-wrap { position: relative; flex: 1; min-width: 180px; }
.search-wrap svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--concrete-light); pointer-events: none;
}
.search-wrap .input { padding-left: 36px; border-radius: var(--r-panel); }

/* Chart canvas containers */
.chart-box { position: relative; height: 240px; }
.chart-head { margin-bottom: 12px; }

/* Center screen (login/access-denied/loading) */
.center-screen {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; background: var(--paper-deep); text-align: center;
}
.center-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-hero); padding: 32px 28px; box-shadow: var(--sh-card);
}

/* Utility */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 22px; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12.5px; }
.text-concrete { color: var(--concrete); }
.text-ink { color: var(--ink); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.divider { height: 1px; background: var(--hairline-soft); border: none; margin: 12px 0; }
