/* ==========================================================================
   Finovera app — shared styles for the customer dashboard and admin console
   ========================================================================== */
:root {
  --bg: #f0f1ec;
  --card: #ffffff;
  --card-2: #f5f5f2;
  --ink: #121212;
  --ink-2: #57574f;
  --ink-3: #6f6f67;
  --line: rgba(18, 18, 18, 0.08);
  --line-strong: rgba(18, 18, 18, 0.16);

  --lime: #c6f53b;
  --lime-2: #e3fca8;
  --lime-3: #b6ea1f;
  --lime-ink: #112900;
  --forest: #0e7a3c;
  --forest-2: #0b6531;
  --forest-ink: #06361a;

  /* chart categorical order — validated with dataviz/validate_palette.js (light).
     s1/s2 sit in the CVD warn band, so charts always pair them with gaps + legend + table. */
  --s1: #0e9f4f;
  --s2: #f5642a;
  --s3: #2b7ff0;
  --s4: #b0338e;
  --track: #e3e3de;

  /* status — fixed, always shown with icon + label */
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --pos-text: #1d6b1d;
  --neg-text: #b42525;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-card: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --pill: 999px;
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, 0.05), 0 16px 40px rgba(0, 0, 0, 0.07);

  --motion-100: 100ms;
  --motion-150: 150ms;
  --motion-200: 200ms;
  --motion-300: 300ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 1rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--lime-ink); }
.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; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.meta { font-size: 0.75rem; color: var(--ink-3); line-height: 1.4; }
.small { font-size: 0.875rem; }
.pos { color: var(--pos-text); }
.neg { color: var(--neg-text); }

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--pill);
  font-size: 0.875rem; font-weight: 500; white-space: nowrap;
  transition: background-color var(--motion-150) ease, border-color var(--motion-150) ease, color var(--motion-150) ease, transform var(--motion-100) var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--forest); color: #fff; }
.btn--primary:hover { background: var(--forest-2); }
.btn--outline { box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--card); }
.btn--outline:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.btn--lime { background: var(--lime); color: var(--lime-ink); }
.btn--lime:hover { background: var(--lime-3); }
.btn--danger { background: var(--critical); color: #fff; }
.btn--danger:hover { background: #b93232; }
.btn--ghost { color: var(--ink-2); }
.btn--ghost:hover { background: var(--card-2); color: var(--ink); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.icon-btn {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color var(--motion-150) ease, box-shadow var(--motion-150) ease;
}
.icon-btn:hover { box-shadow: inset 0 0 0 1px var(--line-strong); background: #fafaf8; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn--soft { background: var(--card-2); box-shadow: none; }
.icon-btn--sm { width: 36px; height: 36px; }
.icon-btn--sm svg { width: 16px; height: 16px; }
.icon-btn--hit { position: relative; }
.icon-btn--hit::before { content: ""; position: absolute; inset: -4px; }

.seg {
  display: inline-flex; gap: 2px; padding: 4px;
  background: var(--card-2); border-radius: var(--pill);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button, .seg a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 16px; border-radius: var(--pill);
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: background-color var(--motion-200) ease, color var(--motion-200) ease, box-shadow var(--motion-200) ease;
}
.seg [aria-pressed="true"], .seg [aria-current="page"], .seg [aria-selected="true"] {
  background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.seg--lime [aria-current="page"] { background: var(--lime); color: var(--lime-ink); box-shadow: none; }
.seg button:hover, .seg a:hover { color: var(--ink); }
.seg--hit button, .seg--hit a { min-height: 44px; }

.input {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: 1rem; line-height: 1.4;
  transition: border-color var(--motion-150) ease, box-shadow var(--motion-150) ease;
  -webkit-appearance: none; appearance: none;
}
.input:hover { border-color: rgba(18, 18, 18, 0.3); }
.input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(14, 122, 60, 0.18); }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='m1 1.5 5 5 5-5' stroke='%23121212' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: 0.875rem; font-weight: 500; }
.field__error { display: none; font-size: 0.875rem; color: var(--neg-text); }
.field.has-error .input { border-color: var(--critical); }
.field.has-error .field__error { display: block; }
.search {
  position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 40px; min-height: 44px; border-radius: var(--pill); background: var(--card); }

.toggle { position: relative; display: inline-grid; place-items: center; width: 52px; height: 44px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.toggle span { position: relative; width: 44px; height: 26px; border-radius: var(--pill); background: var(--line-strong); transition: background-color var(--motion-200) ease; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: transform var(--motion-200) var(--ease-out); }
.toggle input:checked + span { background: var(--forest); }
.toggle input:checked + span::after { transform: translateX(18px); }
.toggle input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 2px; }

/* avatars (initials — no photos of real people) */
.avatar {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card-2); color: var(--ink);
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em;
}
.avatar--lg { width: 48px; height: 48px; }
.avatar--sm { width: 36px; height: 36px; font-size: 0.75rem; }
.avatar--lime { background: var(--lime); color: var(--lime-ink); }
.avatar--forest { background: var(--forest); color: #fff; }

/* status (icon + label, never colour alone) */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status--good i { background: var(--good); }
.status--warning i { background: var(--warning); }
.status--serious i { background: var(--serious); }
.status--critical i { background: var(--critical); }
.status--neutral i { background: var(--ink-3); }
.status svg { width: 14px; height: 14px; flex: none; }

/* ------------------------------------------------------------------- cards */
.card {
  background: var(--card); border-radius: var(--r-card);
  padding: 24px; min-width: 0;
  display: flex; flex-direction: column; gap: 20px;
}
.card--lime { background: var(--lime); color: var(--lime-ink); }
.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 44px; }
.card__head > * { min-width: 0; }
.card__title { display: flex; align-items: center; gap: 12px; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; }
.card__title .icon-btn { pointer-events: none; }
.card__title-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.card__title-icon svg { width: 18px; height: 18px; }

.big-num { min-width: 0; overflow-wrap: anywhere; font-size: clamp(2rem, 0.9rem + 5vw, 4rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.mid-num { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.625rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 600; }
.delta--up { color: var(--pos-text); }
.delta--down { color: var(--neg-text); }

/* entrance: cards rise in once, staggered (disabled under reduced motion) */
.rise { animation: rise 600ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ------------------------------------------------------------------ lists */
.tx-list { display: grid; }
.tx { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.tx:first-child { border-top: 0; }
.tx__name { font-size: 0.9375rem; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx__sub { font-size: 0.75rem; color: var(--ink-3); }
.tx__amt { font-size: 0.9375rem; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.tx--pending {
  grid-template-columns: 44px 1fr auto; padding: 12px; margin-bottom: 4px;
  border: 1px solid rgba(235, 104, 52, 0.35); border-radius: var(--r-md); background: #fffaf7;
}
.tx--pending + .tx { border-top: 0; }
.tx--pending .tx__sub { color: #a84416; }
.tx__actions { display: flex; gap: 4px; }
.tx-enter { animation: tx-enter 400ms var(--ease-out); }
@keyframes tx-enter { from { opacity: 0; transform: translateY(-8px); } }

/* ------------------------------------------------------------------ table */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 640px; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table thead th { font-weight: 500; color: var(--ink-2); background: var(--card-2); font-size: 0.8125rem; position: sticky; top: 0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--motion-150) ease; }
.table tbody tr:hover { background: #fafaf7; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .row-link { cursor: pointer; }
.cell-person { display: flex; align-items: center; gap: 12px; }
.cell-person .avatar { width: 36px; height: 36px; font-size: 0.75rem; }
.cell-person strong { display: block; font-weight: 500; }
.cell-person span { display: block; font-size: 0.75rem; color: var(--ink-3); }
.table-empty { padding: 48px 16px; text-align: center; color: var(--ink-2); }
.table-empty strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 4px; }

/* ------------------------------------------------------------------ charts */
.chart { position: relative; width: 100%; }
.chart svg { overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .bar { transition: opacity var(--motion-150) ease; }
.chart .dim .bar:not(.is-hover) { opacity: 0.45; }
.chart .seg-arc { transition: opacity var(--motion-150) ease; cursor: pointer; }
.chart .dim .seg-arc:not(.is-hover) { opacity: 0.4; }
.chart .crosshair { stroke: var(--ink-3); stroke-width: 1; }
.chart:focus-visible { outline: 2px solid var(--forest); outline-offset: 4px; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  min-width: 120px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font-size: 0.75rem; line-height: 1.4;
  box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--motion-150) ease, transform var(--motion-150) var(--ease-out);
}
.chart-tip.is-on { opacity: 1; transform: none; }
.chart-tip .tip-title { color: rgba(255,255,255,.66); margin-bottom: 4px; }
.chart-tip .tip-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 8px; }
.chart-tip .tip-row b { font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tip .key { width: 12px; height: 2px; border-radius: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.8125rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.chart-table { margin-top: 8px; }
.chart-table summary { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.8125rem; color: var(--ink-2); cursor: pointer; }
.chart-table summary:hover { color: var(--ink); }
.chart-table table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.chart-table th, .chart-table td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
.chart-table td:not(:first-child), .chart-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- dialog & drawer */
dialog.modal {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: var(--r-card); background: var(--card); color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  opacity: 0; transform: translateY(8px) scale(0.99);
  transition: opacity var(--motion-200) var(--ease-out), transform var(--motion-200) var(--ease-out), overlay var(--motion-200) allow-discrete, display var(--motion-200) allow-discrete;
}
dialog.modal[open] { opacity: 1; transform: none; }
@starting-style { dialog.modal[open] { opacity: 0; transform: translateY(8px) scale(0.99); } }
dialog.modal::backdrop { background: rgba(18, 18, 18, 0); transition: background-color var(--motion-200) ease, overlay var(--motion-200) allow-discrete, display var(--motion-200) allow-discrete; }
dialog.modal[open]::backdrop { background: rgba(18, 18, 18, 0.36); }
@starting-style { dialog.modal[open]::backdrop { background: rgba(18, 18, 18, 0); } }
.modal__inner { display: grid; gap: 20px; padding: 24px; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal__head h2 { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.015em; }
.modal__foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.quote-box { display: grid; gap: 8px; padding: 16px; border-radius: var(--r-md); background: var(--card-2); font-size: 0.875rem; }
.quote-box div { display: flex; justify-content: space-between; gap: 12px; }
.quote-box dt { color: var(--ink-2); }
.quote-box dd { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.quote-box .total { padding-top: 8px; border-top: 1px solid var(--line); font-size: 1rem; }
.success { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 16px 0 8px; }
.success__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); animation: pop 400ms var(--ease-out); }
.success__icon svg { width: 28px; height: 28px; }
@keyframes pop { from { transform: scale(0.8); opacity: 0; } }

.drawer {
  position: fixed; inset: 0 0 0 auto; z-index: 60; width: min(440px, 100vw);
  background: var(--card); box-shadow: -16px 0 48px rgba(0, 0, 0, 0.12);
  display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform var(--motion-200) var(--ease-in), visibility 0s linear var(--motion-200);
}
.drawer.is-open { transform: none; visibility: visible; transition: transform var(--motion-300) var(--ease-out); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px; display: grid; gap: 20px; align-content: start; }
.drawer__foot { padding: 16px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(18, 18, 18, 0.28); opacity: 0; visibility: hidden; transition: opacity var(--motion-200) ease, visibility 0s linear var(--motion-200); }
.scrim.is-open { opacity: 1; visibility: visible; transition: opacity var(--motion-200) ease; }
.kv { display: grid; gap: 12px; font-size: 0.875rem; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--ink-2); }
.kv dd { font-weight: 500; text-align: right; }

/* popover */
.popover {
  position: absolute; z-index: 40; right: 0; top: calc(100% + 8px);
  width: min(360px, calc(100vw - 32px));
  background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow-pop); border: 1px solid var(--line);
  padding: 8px;
  opacity: 0; transform: translateY(-4px); visibility: hidden;
  transition: opacity var(--motion-150) var(--ease-in), transform var(--motion-150) var(--ease-in), visibility 0s linear var(--motion-150);
}
.popover.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity var(--motion-200) var(--ease-out), transform var(--motion-200) var(--ease-out); }
.popover h2 { font-size: 0.875rem; font-weight: 600; padding: 8px 8px 4px; }
.note { display: grid; grid-template-columns: 8px 1fr; gap: 12px; padding: 10px 8px; border-radius: var(--r-sm); font-size: 0.875rem; }
.note:hover { background: var(--card-2); }
.note i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--forest); }
.note.is-read i { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.note small { display: block; font-size: 0.75rem; color: var(--ink-3); }

/* toast */
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 80; display: grid; gap: 8px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md);
  background: var(--ink); color: #fff; font-size: 0.875rem; box-shadow: var(--shadow-pop);
  animation: toast-in var(--motion-300) var(--ease-out);
}
.toast.is-leaving { animation: toast-out var(--motion-150) var(--ease-in) forwards; }
.toast svg { width: 16px; height: 16px; color: var(--lime); flex: none; }
.toast button { color: var(--lime); font-weight: 500; min-height: 32px; padding: 0 4px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.empty { display: grid; justify-items: center; align-content: center; gap: 6px; padding: 32px 16px; text-align: center; color: var(--ink-2); font-size: 0.875rem; line-height: 1.5; text-wrap: pretty; }
.empty strong { color: var(--ink); font-weight: 500; font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
}

/* --------------------------------------------------------- loading state */
.skeleton {
  height: 44px; border-radius: var(--r-sm); margin-bottom: 8px;
  background: linear-gradient(90deg, var(--card-2) 0%, #e9ebe4 50%, var(--card-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.is-loading .big-num, .is-loading .mid-num { color: transparent; background: var(--card-2); border-radius: 8px; }
.card--lime.is-loading .mid-num { background: var(--lime-2); }

/* ------------------------------------------------------------ auth page */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth__card { width: min(440px, 100%); display: grid; gap: 24px; padding: 32px 24px; }
@media (min-width: 480px) { .auth__card { padding: 40px; } }
.auth__brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.auth__brand .mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--forest); color: var(--lime); }
.auth__brand svg { width: 20px; height: 18px; }
.auth h1 { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.auth form { display: grid; gap: 16px; }
.auth .row2 { display: grid; gap: 16px; }
@media (min-width: 480px) { .auth .row2 { grid-template-columns: 1fr 1fr; } }
.auth__foot { font-size: 0.875rem; color: var(--ink-2); text-align: center; }
.auth__foot a, .link { color: var(--forest); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.notice { padding: 12px 14px; border-radius: var(--r-sm); font-size: 0.875rem; background: var(--lime-2); color: var(--lime-ink); }
.notice--error { background: #fdecec; color: var(--neg-text); }

/* --------------------------------------------------------- account menu */
.menu { display: grid; gap: 2px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: var(--r-sm); font-size: 0.875rem; text-align: left; width: 100%; }
.menu a:hover, .menu button:hover { background: var(--card-2); }
.menu__who { padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu__who strong { display: block; font-weight: 500; }
.menu__who span { font-size: 0.75rem; color: var(--ink-3); word-break: break-all; }

/* ----------------------------------------------------- verify banner */
.banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 14px 20px; border-radius: var(--r-md); background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
}
.banner p { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; }
.banner p svg { width: 18px; height: 18px; color: var(--forest); flex: none; }

/* ----------------------------------------------------------- list rows */
.rows { display: grid; }
.rows > li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; }
.rows strong { display: block; font-weight: 500; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .sub { display: block; font-size: 0.75rem; color: var(--ink-3); }
.checks { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.checks legend { font-size: 0.875rem; font-weight: 500; margin-bottom: 8px; padding: 0; }
.checks label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 0.9375rem; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--forest); }
.checks label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--forest); background: #f4fbef; }

/* ------------------------------------------------------------- brand */
.fv-mark { display: block; flex: none; }
.brand__word { font-family: "Lato", var(--font); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.fv-mark .fv-dot { transform-box: fill-box; transform-origin: center; animation: dot-in 700ms var(--ease-out) 150ms both; }
@keyframes dot-in { from { opacity: 0; transform: translate(-60%, 60%) scale(0.4); } }

/* Empty states always span the full width of their list, centred on one column.
   (List rows use an avatar / text / action grid that would otherwise squeeze them.) */
.rows > li.empty, .tx-list > li.empty, .cat-legend > li.empty, ul > li.empty, ol > li.empty {
  display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr);
  justify-items: center; align-content: center; gap: 6px;
  padding: 32px 16px; border-top: 0; text-align: center;
}
.empty > * { max-width: 36ch; }
.empty .btn { max-width: none; margin-top: 8px; }

/* Interaction polish (Web Interface Guidelines) */
html { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea, summary, label { touch-action: manipulation; }
dialog.modal, .drawer__body, .popover { overscroll-behavior: contain; }
select.input { background-color: var(--card); color: var(--ink); }
.big-num, .mid-num, .tile strong, .tx__amt, .kpi__value { font-variant-numeric: tabular-nums; }
h1, h2, h3, .card__title { text-wrap: balance; }

/* Wide tables scroll sideways on phones: keep their empty message inside the visible area */
.table-wrap { container-type: inline-size; }
.table td:has(> .table-empty) { padding: 0; }
.table-empty { position: sticky; left: 0; width: 100cqw; box-sizing: border-box; }
