@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ============================================================
   CryptoLedger — InnoWave graphite + copper brand (#996633)
   ============================================================ */
:root {
  --bg: #f4f5f7;
  --bg-soft: #eef0f2;
  --bg-2: #e4e7ea;
  --surface: #ffffff;
  --surface-2: #f7f8f9;
  --cta: #996633;          /* prominent buttons = copper brand (matches the product) */
  --cta-fg: #ffffff;
  --sidebar-bg: #ffffff;
  --sidebar-fg: #1d2128;
  --sidebar-fg-muted: #515767;
  --sidebar-hover: #f1f3f5;
  --bg-deep: #241a12;      /* dark bands/cards = warm espresso (on-brand), not cold black */
  --ink: #14161b;
  --ink-2: #434956;
  --muted: #767d8a;
  --line: #e5e7eb;
  --line-2: #d4d8df;
  --brand: #996633;
  --brand-deep: #7a4e25;
  --brand-bright: #d59a5c;
  --brand-tint: #f3ece2;
  --ok: #2f8f5b;
  --loss: #b4451f;
  --shadow-sm: 0 1px 2px rgba(20,22,27,.05);
  --shadow: 0 16px 34px -22px rgba(20,22,27,.24);
  --shadow-lg: 0 30px 60px -32px rgba(20,22,27,.32);
  --r: 14px;
  --max: 1180px;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-family: var(--font-body);

  /* Map Bootstrap's tokens onto ours so Identity/Bootstrap markup follows the theme (incl. dark mode). */
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink-2);
  --bs-heading-color: var(--ink);
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-link-color: var(--brand-deep);
  --bs-link-hover-color: var(--brand);
}

/* ── Dark mode ───────────────────────────────────────────── */
[data-theme="dark"] {
  color-scheme: dark;   /* render native controls (select, inputs, scrollbars) in dark so they stay legible */
  --bg: #0b1220;
  --bg-soft: #0f1a2e;
  --bg-2: #18253c;
  --bg-deep: #070d18;
  --ink: #e9eef7;
  --ink-2: #aebccf;
  --muted: #7e8da6;
  --line: #223247;
  --line-2: #324663;
  --surface: #0f1a2e;
  --surface-2: #18253c;
  --cta: #3b82f6;           /* blue primary buttons in dark mode */
  --cta-fg: #ffffff;
  --sidebar-bg: #0c1626;
  --sidebar-fg: #e9eef7;
  --sidebar-fg-muted: #aebccf;
  --sidebar-hover: #18253c;
  --brand: #5b9bf7;         /* blue accent in dark mode */
  --brand-deep: #84b4ff;
  --brand-bright: #84b4ff;
  --brand-tint: #15243d;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow: 0 16px 34px -22px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 60px -32px rgba(0,0,0,.8);
}
[data-theme="dark"] .btn--ghost:hover { border-color: var(--ink); }
[data-theme="dark"] .hero { background: linear-gradient(180deg, var(--bg-soft), var(--bg) 78%); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* Kill any horizontal bleed on mobile (an element wider than the viewport is what makes the page look
   margin-less and lets it scroll sideways). Belt-and-braces: hide the overflow AND cap width. */
html, body { overflow-x: hidden; max-width: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink-2); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg, table { max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--brand); color: #fff; }
h1,h2,h3,h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0; }
/* Blazor's FocusOnNavigate focuses the page <h1 tabindex="-1"> after each nav — don't render a mouse-style outline on it. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
/* App pages render in the sidebar shell (.app__body). Use the width beside the sidebar and align left
   instead of centering a narrow 1180px column — otherwise big screens show a large left/right gap next to
   the sidebar. Applies to every app page uniformly; marketing/legal pages (.site__body) stay centered. */
.app__body .wrap.page-pad { max-width: 1560px; margin-left: 0; }
.display { font-size: clamp(2rem, 4.4vw, 3.05rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink); }
.h1, .h2, .h3, .h4 { color: var(--ink); }
.h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }
.h3 { font-size: 1.12rem; font-weight: 600; font-family: var(--font-head); }
.muted { color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--brand); }
.grad-text { color: var(--ink); background-image: linear-gradient(var(--brand), var(--brand)); background-size: 100% 0.12em; background-position: 0 92%; background-repeat: no-repeat; padding-bottom: 0.04em; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.72rem 1.3rem; font-size: 0.94rem; font-weight: 600; font-family: var(--font-body); border-radius: 9px; border: 1px solid transparent; transition: background-color .18s, border-color .18s, color .18s; text-decoration: none; }
.btn--sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.btn--primary { background: var(--cta); color: var(--cta-fg); }
.btn--primary:hover { opacity: .9; }
.btn--dark { background: var(--cta); color: var(--cta-fg); }
.btn--dark:hover { opacity: .9; }
.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--white { background: #ffffff; color: #14161b; }
.btn--white:hover { background: #f1f2f4; }
.btn--brand { background: var(--brand-bright); color: #1a130c; }
.btn--brand:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .55; cursor: default; }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }

/* ── Topbar ──────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 0.5rem; height: 64px; position: relative; }
.nav-toggle { display: none; }
.nav-burger { display: none; }
.topbar__collapse { display: flex; flex: 1; align-items: center; gap: 0.5rem; }
.topbar__collapse .topbar__auth { margin-left: auto; }
.brand { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.brand__mark { align-self: center; width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); position: relative; }
.brand__mark::after { content: ""; position: absolute; inset: 5px; border-radius: 3px; border: 2px solid rgba(255,255,255,.85); border-right-color: transparent; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.02em; }
.brand__by { font-size: 0.78rem; color: var(--muted); }
.topnav { display: flex; gap: 0.25rem; margin-left: 1rem; }
.topnav__link { padding: 0.45rem 0.8rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); transition: background-color .15s, color .15s; }
.topnav__link:hover { background: var(--bg-soft); color: var(--ink); }
.topnav__link.active { background: var(--brand-tint); color: var(--brand-deep); }
.topbar__spacer { margin-left: auto; }
.topbar__auth { display: flex; align-items: center; gap: 0.5rem; }
.topbar__user { font-size: 0.85rem; color: var(--muted); }
.logout-btn { background: none; border: 0; cursor: pointer; font: inherit; color: var(--ink-2); }

/* Sticky footer for the marketing / auth (logged-out) layout */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site__body { flex: 1; }

/* ── App shell: collapsible sidebar + top navbar (authed) ──── */
.app { display: flex; align-items: flex-start; min-height: 100vh; }
.side-toggle { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.sidebar { position: sticky; top: 0; height: 100vh; width: 236px; flex: none; display: flex; flex-direction: column; background: var(--sidebar-bg); color: var(--sidebar-fg); border-right: 1px solid var(--line); transition: width .2s ease, transform .22s ease; overflow: hidden; z-index: 50; }
.sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; height: 64px; padding: 0 .8rem 0 1.1rem; border-bottom: 1px solid var(--line); }
.sidebar__brand { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.sidebar__brand .brand__name { color: var(--sidebar-fg); font-size: 1.1rem; }
.sidebar__collapse { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--sidebar-hover); border: 1px solid var(--line); color: var(--ink-2); cursor: pointer; flex: none; }
.sidebar__collapse:hover { background: var(--bg-2); color: var(--ink); }
.sidebar__collapse svg { width: 20px; height: 20px; transition: transform .2s; stroke-width: 2.5; }
.sidebar__nav { flex: 1; padding: .8rem .6rem; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; }
.sidebar__foot { padding: .6rem .6rem 1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.snav-form { display: block; }
.snav { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .62rem .7rem; border-radius: 9px; color: var(--sidebar-fg-muted); font-size: .92rem; font-weight: 500; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; transition: background-color .14s, color .14s; }
.snav:hover { background: var(--sidebar-hover); color: var(--sidebar-fg); }
.snav.active { background: var(--sidebar-hover); color: var(--sidebar-fg); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.snav__icon { flex: none; display: inline-flex; }
.snav__icon svg { width: 19px; height: 19px; }
.snav__label { white-space: nowrap; overflow: hidden; }

/* collapsed (desktop, icon-only) */
#side-collapse:checked ~ .sidebar { width: 70px; }
#side-collapse:checked ~ .sidebar .snav__label,
#side-collapse:checked ~ .sidebar .sidebar__label { display: none; }
#side-collapse:checked ~ .sidebar .snav { justify-content: center; padding-left: 0; padding-right: 0; }
#side-collapse:checked ~ .sidebar .sidebar__top { justify-content: center; padding: 0; }
#side-collapse:checked ~ .sidebar .sidebar__collapse svg { transform: rotate(180deg); }

.app__main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.apptop { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .8rem; height: 64px; padding: 0 1.4rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.apptop__burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.apptop__burger span { display: block; width: 18px; height: 2px; margin: 0 auto; background: var(--ink); border-radius: 2px; }
.apptop__brand { display: none; }
.apptop__spacer { margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; flex: none; transition: border-color .15s, color .15s, background-color .15s; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
/* show sun in dark mode, moon in light mode */
.icon-btn .ico-sun { display: none; }
[data-theme="dark"] .icon-btn .ico-sun { display: inline; }
[data-theme="dark"] .icon-btn .ico-moon { display: none; }
.apptop__user { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 500; color: var(--ink-2); max-width: 280px; overflow: hidden; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.apptop__user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apptop__user svg { width: 16px; height: 16px; flex: none; color: var(--brand-deep); }
.apptop__user:hover { border-color: var(--brand); color: var(--ink); }
.app__body { flex: 1; padding: 1.4rem 1.6rem 0; }
@media (max-width: 620px) { .app__body { padding: .8rem .4rem 0; } .apptop { padding: 0 .8rem; gap: .5rem; } .apptop__user { max-width: 150px; } }
.app__foot { display: flex; align-items: center; gap: 1rem 1.4rem; flex-wrap: wrap; padding: 1.1rem 1.5rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.app__foot a { color: var(--muted); }
.app__foot a:hover { color: var(--brand-deep); }
.app__foot-note { margin-left: auto; }

@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); width: 236px; box-shadow: var(--shadow-lg); }
  #side-open:checked ~ .sidebar { transform: translateX(0); width: 236px; }
  #side-open:checked ~ .sidebar .snav__label, #side-open:checked ~ .sidebar .sidebar__label { display: inline !important; }
  #side-open:checked ~ .sidebar .snav { justify-content: flex-start !important; padding: .62rem .7rem !important; }
  .sidebar__collapse { display: none; }
  .apptop__burger { display: flex; }
  .apptop__brand { display: inline-flex; }
  #side-open:checked ~ .app__main::before { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 45; }
  .app__foot-note { margin-left: 0; }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--bg-soft), var(--surface) 78%); border-bottom: 1px solid var(--line); }
.hero__rings { position: absolute; pointer-events: none; z-index: 0; top: 50%; right: -10%; width: 680px; aspect-ratio: 1; transform: translateY(-50%);
  background: repeating-radial-gradient(circle at center, rgba(153,102,51,.18) 0 1.6px, transparent 1.6px 38px);
  -webkit-mask-image: radial-gradient(circle at center, #000 8%, transparent 68%); mask-image: radial-gradient(circle at center, #000 8%, transparent 68%); }
.hero__inner { position: relative; z-index: 1; padding: 3.4rem 0 2.6rem; max-width: 56ch; }
.hero__lead { margin-top: 1rem; font-size: 1.12rem; color: var(--ink-2); max-width: 54ch; }
.hero__cta { display: flex; gap: 0.7rem; margin-top: 1.6rem; flex-wrap: wrap; }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding: 4.4rem 0 3.8rem; min-height: 74vh; }
.hero__col { max-width: 56ch; }
.hero__trust { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.6rem; font-size: .84rem; color: var(--muted); }
.hero__visual { position: relative; }
.hero__card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 1.9rem 2rem; animation: cl-fade-up .7s cubic-bezier(.22,.61,.36,1) both; animation-delay: .12s; }
.hero__card::before { content: ""; position: absolute; inset: -1px; border-radius: 18px; padding: 1px; background: linear-gradient(150deg, var(--brand), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: .5; }
.hero__card-top { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); }
.hero__card-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.hero__card-figure { margin-top: 1rem; }
.hero__card-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.hero__card-n { display: block; font-family: var(--font-head); font-weight: 700; font-size: 2.9rem; letter-spacing: -.02em; color: var(--ink); }
.hero__card-bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin: 1rem 0; }
.hero__card-bar span { display: block; height: 100%; width: 62%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-bright)); }
.hero__card-rows { display: flex; flex-direction: column; gap: .55rem; }
.hero__card-rows div { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; color: var(--ink-2); }
.hero__card-rows b { color: var(--ink); font-variant-numeric: tabular-nums; }
.hero__card-rows b.ok { color: var(--ok); }
.hero__card-foot { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.hero__card-foot span { font-size: .72rem; font-weight: 600; color: var(--brand-deep); background: var(--brand-tint); border: 1px solid #e7d3b6; padding: .2rem .6rem; border-radius: 999px; }
@media (max-width: 920px) { .hero__grid { grid-template-columns: 1fr; gap: 1.5rem; } .hero__visual { display: none; } }

/* Disclaimer */
.disclaimer { display: flex; gap: 0.7rem; align-items: flex-start; margin-top: 1.4rem; padding: 0.8rem 1rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: 0.86rem; color: var(--ink-2); max-width: 72ch; }
.disclaimer b { color: var(--ink); }
.disclaimer__dot { flex: none; margin-top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ── Generic page + cards ────────────────────────────────── */
.page-pad { padding: 2.4rem 0 4rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 1.2rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s, border-color .16s; }
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.cat__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-deep); }
.cat__title { margin-top: 1.1rem; font-size: 1.22rem; }
.cat__desc { margin-top: 0.5rem; color: var(--ink-2); font-size: 0.95rem; flex: 1; }
.cat__go { margin-top: 1.2rem; font-weight: 600; color: var(--brand-deep); font-size: 0.92rem; display: inline-flex; align-items: center; gap: 0.4rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1rem; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; }
.step__n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand-tint); color: var(--brand-deep); font-family: var(--font-head); font-weight: 700; }
.step__t { margin-top: 0.7rem; font-weight: 600; color: var(--ink); }
.step__d { margin-top: 0.3rem; font-size: 0.85rem; color: var(--muted); }

/* ── Stat tiles ──────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.stat__l { font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat__v { margin-top: 0.35rem; font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__v.is-gain { color: var(--ok); }
.stat__v.is-loss { color: var(--loss); }
.stat__s { font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }
/* Clickable stat card → navigates to the relevant page. */
a.stat { text-decoration: none; color: inherit; display: block; position: relative; }
a.stat::after { content: "→"; position: absolute; top: .9rem; right: 1rem; color: var(--muted); opacity: 0; transition: opacity .15s, transform .15s; }
a.stat:hover::after { opacity: .65; transform: translateX(2px); }

/* ── Forms ───────────────────────────────────────────────── */
.field { display: block; margin-top: 1.1rem; }
.field--first { margin-top: 0; }
.field > span { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-bottom: 0.45rem; }
.num, .sel { width: 100%; font: inherit; font-size: 0.95rem; color: var(--ink); padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.num:focus, .sel:focus, input:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(153,102,51,.18); }

/* Signup password-rules checklist */
.pw-rules { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .25rem; }
.pw-rules li { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .45rem; transition: color .15s; }
.pw-rules li::before { content: "○"; font-size: .9rem; color: var(--line-2); }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: "✓"; color: var(--ok); }

/* Quill rich-text editor — themed via CSS vars so it matches light/dark */
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--line); }
.ql-toolbar.ql-snow { border-radius: 9px 9px 0 0; background: var(--surface); }
.ql-container.ql-snow { border-radius: 0 0 9px 9px; background: var(--surface); }
.ql-editor { min-height: 320px; color: var(--ink); font-size: .92rem; }
.ql-editor.ql-blank::before { color: var(--muted); }
[data-theme="dark"] .ql-snow .ql-stroke { stroke: var(--ink); }
[data-theme="dark"] .ql-snow .ql-fill { fill: var(--ink); }
[data-theme="dark"] .ql-snow .ql-picker { color: var(--ink); }
[data-theme="dark"] .ql-snow .ql-picker-options { background: var(--surface); border-color: var(--line); }
.row-form { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.toggle { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.toggle button { border: 0; background: none; cursor: pointer; font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--muted); padding: 0.45rem 0.95rem; border-radius: 8px; }
.toggle button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.toggle button:disabled { cursor: default; opacity: .6; }
.toggle--sm button { font-size: 0.78rem; padding: 0.3rem 0.6rem; }
.hint { display: block; margin-top: 0.4rem; font-size: 0.78rem; color: var(--muted); }

/* Aligned credential grid (label / key / secret) — inputs line up regardless of hint length */
.key-grid { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 0.4rem 1rem; align-items: start; }
.key-grid .field { margin: 0; display: flex; flex-direction: column; }
.key-grid .field > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.1em; }
.key-grid .field .hint { min-height: 2.5em; }
@media (max-width: 760px) { .key-grid { grid-template-columns: 1fr; } }

/* ── Tables ──────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.tbl th { text-align: left; padding: 0.7rem 0.8rem; background: var(--bg-soft); color: var(--ink-2); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #fafbfb; }
.tbl .num-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gain { color: var(--ok); font-weight: 600; }
.loss { color: var(--loss); font-weight: 600; }

/* Monetary gain/loss value: green ▲ for a gain, red ▼ for a loss. The arrow carries the sign, so pass the
   absolute amount. Used for real gains/losses (disposals, unrealised P/L) — not the status tiles. */
.val-gain, .val-loss { display: inline-flex; align-items: center; gap: .25em; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.val-gain { color: var(--ok); }
.val-loss { color: var(--loss); }
.val-gain::before { content: "▲"; font-size: .68em; line-height: 1; }
.val-loss::before { content: "▼"; font-size: .68em; line-height: 1; }

/* Source badge (exchange / wallet / CSV avatar) */
.src { display: inline-flex; align-items: center; gap: .5rem; }
.src__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px; padding: 0 .35rem; border-radius: 6px; font-size: .62rem; font-weight: 800; letter-spacing: .02em; color: #fff; flex: none; }
.src__badge--exchange { background: var(--brand); }
.src__badge--wallet { background: #5a6b8c; }
.src__badge--csv { background: #767d8a; }
.src__badge--manual { background: #b08948; }
.src__name { font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.flag { display: flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--ink-2); cursor: pointer; }
.flag input { accent-color: var(--brand); }

/* Report history cards — uniform width, left-aligned, equal height per row */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 360px)); gap: 1.2rem; align-items: stretch; }
.report-card { display: flex; flex-direction: column; gap: 1rem; }
.report-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.report-card__n { font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; color: var(--ink); letter-spacing: -.02em; margin-top: .3rem; }
.report-card__foot { display: flex; gap: .5rem; margin-top: auto; flex-wrap: wrap; }

/* Supported-exchanges strip (home page) — quiet white app-icon tiles, names on hover */
.ex-strip { padding-top: 1.2rem; padding-bottom: 1.9rem; }
.ex-strip__label { margin-top: .5rem; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; max-width: 60ch; }
.ex-icons { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.ex-ico { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 11px; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s; }
.ex-ico:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ex-ico img { width: 24px; height: 24px; border-radius: 4px; display: block; }

/* Exchange picker (add-a-connection) + connection avatar */
.ex-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem; margin-top: .6rem; max-height: 236px; overflow-y: auto; padding-right: .2rem; }
.ex-pick { display: flex; align-items: center; gap: .55rem; padding: .5rem .65rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink); text-align: left; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.ex-pick:hover { border-color: var(--line-2); }
.ex-pick.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-tint); }
.ex-pick img { width: 26px; height: 26px; border-radius: 6px; background: #fff; padding: 2px; box-sizing: border-box; flex: none; display: block; }
.ex-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-avatar { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.ex-avatar img { width: 26px; height: 26px; border-radius: 5px; display: block; }

.linklike { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--brand-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.feedback textarea.num { width: 100%; resize: vertical; font-family: inherit; }

/* Help / feedback pop-over (top-bar icon → animated bottom-right dialog) */
.help-backdrop { position: fixed; inset: 0; z-index: 1199; background: transparent; }
.help-pop {
  position: fixed; right: 20px; bottom: 20px; width: 380px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  z-index: 1200; overflow: hidden;
  opacity: 0; transform: translateY(18px) scale(.97); transform-origin: bottom right; pointer-events: none;
  transition: opacity .2s ease, transform .24s cubic-bezier(.22,.61,.36,1);
}
.help-pop.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.help-pop__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; background: var(--brand-tint); border-bottom: 1px solid var(--line); }
.help-pop__title { font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.help-pop__sub { font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.help-pop__close { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--muted); padding: .2rem; border-radius: 6px; }
.help-pop__close:hover { color: var(--ink); background: rgba(0,0,0,.06); }
.help-pop__body { padding: 1.1rem 1.2rem 1.2rem; }
@media (max-width: 620px) { .help-pop { right: 12px; left: 12px; bottom: 12px; width: auto; } }

/* Testimonials (home page) */
.quotes { margin-top: 1.4rem; }
.quote { display: flex; flex-direction: column; gap: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; box-shadow: var(--shadow-sm); margin: 0; }
.quote__stars { color: #e0a145; letter-spacing: 2px; font-size: .9rem; }
.quote__text { margin: 0; font-size: .98rem; line-height: 1.6; color: var(--ink); }
.quote__by { display: flex; flex-direction: column; gap: .1rem; font-size: .85rem; }
.quote__by b { color: var(--ink); }
.quote__by span { color: var(--muted); }

/* Interactive dashboard */
.dash-empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 2.2rem; box-shadow: var(--shadow-sm); margin-top: 1.4rem; }
.dash-empty__actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.dash-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); margin-top: 1.4rem; }
.dash-panel__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.dash-controls { display: flex; gap: .9rem; flex-wrap: wrap; }
.dash-ctl { display: flex; flex-direction: column; gap: .3rem; }
.dash-ctl span { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.dash-ctl .sel { min-width: 150px; }
.dash-busy { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(240px, .8fr) 1.2fr; gap: 1.8rem; margin-top: 1.4rem; align-items: stretch; }
.dash-net__l { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.dash-net__v { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3rem); letter-spacing: -.02em; line-height: 1.05; margin-top: .3rem; }
.dash-net__v.is-gain { color: var(--ok); }
.dash-net__v.is-loss { color: var(--loss); }
.dash-net__s { color: var(--ink-2); font-size: .86rem; margin-top: .35rem; }
.dash-breakdown { margin: 1.1rem 0 0; display: flex; flex-direction: column; gap: 0; }
.dash-breakdown > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.dash-breakdown dt { color: var(--ink-2); font-size: .88rem; margin: 0; }
.dash-breakdown dd { margin: 0; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-chartwrap { display: flex; flex-direction: column; }
.dash-chartwrap__l { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: .6rem; }
.dash-chart { width: 100%; height: 170px; display: block; }
.dash-chart__base { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dash-bar { transition: opacity .15s; }
.dash-bar:hover { opacity: .78; }
.dash-bar.gain { fill: var(--ok); }
.dash-bar.loss { fill: var(--loss); }
.dash-chart__labels { display: flex; justify-content: space-between; margin-top: .35rem; padding: 0 2px; }
.dash-chart__labels span { flex: 1; text-align: center; font-size: .66rem; color: var(--muted); }
.dash-chart__empty { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 150px; color: var(--muted); font-size: .9rem; border: 1px dashed var(--line-2); border-radius: 10px; }
@media (max-width: 760px) { .dash-grid { grid-template-columns: 1fr; gap: 1.4rem; } }

/* Pills / badges */
.pill { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 600; padding: 0.18rem 0.55rem; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill--buy { background: var(--brand-tint); color: var(--brand-deep); border-color: #e7d3b6; }
.pill--sell { background: #fdeee8; color: var(--loss); border-color: #f3d4c7; }
.pill--income { background: #eef7f1; color: var(--ok); border-color: #cfe9da; }
.pill--missing { background: #fff7ed; color: #b4651f; border-color: #f3dcc2; }
.pill--warn { background: #fff7ed; color: #b4651f; border-color: #f3dcc2; }

/* ── Dropzone / import ───────────────────────────────────── */
.drop { border: 2px dashed var(--line-2); border-radius: 14px; padding: 2rem 1.5rem; text-align: center; background: var(--bg-soft); transition: border-color .15s, background-color .15s; }
.drop:hover { border-color: var(--brand); background: var(--brand-tint); }
.drop input[type=file] { display: block; margin: 1rem auto 0; }
.exchanges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.exchanges .pill { font-size: 0.78rem; padding: 0.3rem 0.7rem; }

/* Notices */
.notice { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: 10px; font-size: 0.88rem; border: 1px solid var(--line); margin-bottom: 1rem; }
.notice--ok { background: #eef7f1; border-color: #cfe9da; color: #1f6b43; }
.notice--warn { background: #fff7ed; border-color: #f3dcc2; color: #7a4e25; }
.notice--err { background: #fdeee8; border-color: #f3d4c7; color: var(--loss); }
.notice--info { background: var(--brand-tint); border-color: #e7d3b6; color: var(--brand-deep); }

/* Dark-mode tints for status pills + notices (light hex above is for light theme only). */
[data-theme="dark"] .pill--sell    { background: rgba(180,69,31,.18);  color: #f3a488; border-color: rgba(180,69,31,.4); }
[data-theme="dark"] .pill--income  { background: rgba(47,143,91,.18);  color: #6ee7a8; border-color: rgba(47,143,91,.42); }
[data-theme="dark"] .pill--missing,
[data-theme="dark"] .pill--warn    { background: rgba(213,154,92,.16); color: #f0c08a; border-color: rgba(213,154,92,.4); }
[data-theme="dark"] .notice--ok    { background: rgba(47,143,91,.14);  border-color: rgba(47,143,91,.34); color: #7ff0b0; }
[data-theme="dark"] .notice--warn  { background: rgba(213,154,92,.14); border-color: rgba(213,154,92,.34); color: #f0c08a; }
[data-theme="dark"] .notice--err   { background: rgba(180,69,31,.16);  border-color: rgba(180,69,31,.4);  color: #f3a488; }

/* Accountant clients portal */
.clients-layout { display: grid; grid-template-columns: 320px 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 860px) { .clients-layout { grid-template-columns: 1fr; } }
.client-row { display: flex; align-items: center; gap: 0.7rem; width: 100%; text-align: left; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; margin-bottom: 0.5rem; transition: border-color .15s, box-shadow .15s; font-family: inherit; }
.client-row:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06)); }
.client-row.is-on { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.client-row__avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-deep); font-weight: 700; font-size: 0.82rem; flex: none; }
.client-row__body { display: flex; flex-direction: column; min-width: 0; }
.client-row__name { font-weight: 600; color: var(--ink); }
.client-row__meta { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-row__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); margin-left: auto; }
.client-row__dot.is-live { background: var(--ok); }
.clients-toolbar, .list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; flex-wrap: wrap; }

/* "Working as client" banner — shown across the whole app while an accountant is in a client's workspace. */
.ws-banner { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.2rem; padding: .6rem .9rem; border-radius: 10px; background: var(--brand-tint); border: 1px solid var(--brand); flex-wrap: wrap; }
.ws-banner__badge { font-size: .66rem; font-weight: 800; letter-spacing: .05em; background: var(--brand); color: #fff; padding: .2rem .5rem; border-radius: 6px; }
.ws-banner__txt { font-size: .9rem; color: var(--ink); }
.ws-banner__exit { margin-left: auto; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); }
.ws-banner__exit:hover { border-color: var(--brand); }

/* Inline link-style button (for actions inside a sentence) */
.linklike { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--brand-deep); font-weight: 600; cursor: pointer; text-decoration: underline; }
.linklike:hover { opacity: .8; }

/* Segmented tab control */
.seg { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.seg__btn { appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: .9rem; padding: .45rem 1rem; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; transition: background-color .15s, color .15s; }
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-on { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.seg__count { font-size: .72rem; font-weight: 700; padding: .05rem .42rem; border-radius: 20px; background: rgba(0,0,0,.10); }
.seg__btn.is-on .seg__count { background: rgba(255,255,255,.28); }

/* Disclosure (collapsible data-source section) */
.disclose { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: .8rem; overflow: hidden; }
.disclose > summary { list-style: none; cursor: pointer; padding: .95rem 1.1rem; display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--ink); }
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary::after { content: "⌄"; margin-left: auto; color: var(--muted); transition: transform .18s; font-size: 1.15rem; line-height: 1; }
.disclose[open] > summary::after { transform: rotate(180deg); }
.disclose > summary:hover { background: var(--brand-tint); }
.disclose__n { font-size: .78rem; font-weight: 600; color: var(--muted); }
.disclose__body { padding: 0 1.1rem 1.1rem; }

/* ── Pricing plans ───────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; max-width: 1060px; margin: 0 auto; align-items: stretch; }
@media (max-width: 880px) { .plans { grid-template-columns: 1fr; max-width: 460px; } }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.7rem 1.5rem 1.5rem; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.plan--feat { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.plan--feat:hover { box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg); }
.plan__ribbon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; padding: 0.3rem 0.75rem; border-radius: 999px; white-space: nowrap; box-shadow: var(--shadow-sm); }
.plan__name { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-deep); }
.plan__price { display: flex; align-items: baseline; gap: 0.35rem; margin: 0.55rem 0 0.15rem; }
.plan__amount { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.plan__per { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.plan__tag { font-size: 0.88rem; color: var(--ink-2); margin-top: 0.15rem; }
.plan__feats { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; margin: 1.1rem 0 1.3rem; padding: 1.1rem 0 0; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-2); flex: 1; }
.plan__feats li { display: flex; gap: 0.55rem; align-items: flex-start; line-height: 1.45; }
.plan__feats li::before { content: "✓"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-size: 0.68rem; font-weight: 800; margin-top: 1px; }
.plan__feats li.is-off { color: var(--muted); }
.plan__feats li.is-off::before { content: "–"; background: var(--bg-2); color: var(--muted); }
.plan__cta { margin-top: auto; }
.plan__cta .btn { width: 100%; justify-content: center; }
.plan__current { display: block; text-align: center; padding: 0.72rem 1rem; font-size: 0.9rem; font-weight: 600; color: var(--muted); }

/* ── Admin panel — same design language as the customer app (light sidebar, copper accent, dark-mode aware) ── */
.adm { display: flex; align-items: flex-start; min-height: 100vh; background: var(--bg); }
.adm__side { width: 236px; flex: none; display: flex; flex-direction: column; gap: 0.15rem; padding: 1rem 0.8rem; background: var(--sidebar-bg); color: var(--sidebar-fg); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; }
.adm__brand { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; padding: 0.4rem 0.5rem 1rem; }
.adm__brand .brand__mark { flex: none; }
.adm__badge { font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; background: var(--brand); color: #fff; padding: 0.14rem 0.4rem; border-radius: 5px; }
.adm__nav { display: flex; flex-direction: column; gap: 0.15rem; }
.admnav { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.7rem; border-radius: 9px; color: var(--sidebar-fg-muted); font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: background-color .15s, color .15s; }
.admnav svg { width: 18px; height: 18px; flex: none; }
.admnav:hover { background: var(--sidebar-hover); color: var(--sidebar-fg); }
.admnav.active { background: var(--sidebar-hover); color: var(--sidebar-fg); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.adm__foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.15rem; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.adm__main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.adm__top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.8rem; height: 60px; padding: 0 1.5rem; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.adm__top-title { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.adm__body { padding: 1.6rem 1.8rem 3rem; width: 100%; max-width: 1200px; }
.adm__head { margin-bottom: 0.4rem; }
.adm__h { font-family: var(--font-head); font-weight: 800; font-size: 1.55rem; letter-spacing: -0.025em; color: var(--ink); }
/* Modern metric card with a trend delta */
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .2s, border-color .18s; }
.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.metric__l { font-size: 0.76rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.metric__v { margin-top: 0.35rem; font-family: var(--font-head); font-weight: 800; font-size: 1.75rem; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric__row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.metric__s { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }
.delta { display: inline-flex; align-items: center; gap: 0.15rem; font-size: 0.78rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 999px; }
.delta--up { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.delta--down { color: var(--loss); background: color-mix(in srgb, var(--loss) 14%, transparent); }
.delta--flat { color: var(--muted); background: var(--bg-soft); }
/* Trend chart */
.trend { width: 100%; display: block; }
.trend svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend__axis { fill: var(--muted); font-size: 11px; }
@media (max-width: 760px) {
  .adm { flex-direction: column; }
  .adm__side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .adm__nav { flex-direction: row; }
  .adm__foot { margin: 0; border: 0; padding: 0; flex-direction: row; }
  .adm__body { padding: 1rem; }
}

/* Source/data label */
.source { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.7rem 0.95rem; border-radius: 10px; font-size: 0.85rem; margin-bottom: 1rem; border: 1px solid #e7d3b6; background: var(--brand-tint); color: var(--brand-deep); }

/* Loading */
.loading { display: flex; align-items: center; gap: 0.7rem; padding: 2rem 0; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Wallet rows */
.wallet { display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 0.7rem; }
.wallet__chain { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 42px; padding: 0 0.6rem; border-radius: 10px; background: var(--brand-tint); color: var(--brand-deep); font-weight: 700; font-family: var(--font-head); font-size: 0.78rem; }
.wallet__addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; color: var(--ink); word-break: break-all; }
.wallet__meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }
.wallet__actions { display: flex; gap: 0.4rem; }

/* myTax label block */
.mytax { display: grid; grid-template-columns: 1fr auto; gap: 0; }
.mytax dt { color: var(--ink-2); font-size: 0.9rem; padding: 0.5rem 0; border-bottom: 1px dashed var(--line); margin: 0; }
.mytax dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); padding: 0.5rem 0; border-bottom: 1px dashed var(--line); }
.mytax .is-head dt, .mytax .is-head dd { font-family: var(--font-head); font-weight: 700; color: var(--brand-deep); border-bottom: 2px solid var(--brand); font-size: 1.02rem; }

/* Hero figure card (net gain) */
.figure-hero { background: var(--bg-deep); color: #fff; border-radius: var(--r); padding: 1.5rem 1.7rem; position: relative; overflow: hidden; }
.figure-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 130% at 85% -20%, rgba(213,154,92,.32), transparent 55%); }
.figure-hero__l { position: relative; color: rgba(255,255,255,.72); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.figure-hero__n { position: relative; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--brand-bright); letter-spacing: -0.02em; margin-top: 0.2rem; }
.figure-hero__s { position: relative; color: rgba(255,255,255,.7); font-size: 0.9rem; margin-top: 0.3rem; }

/* ── Footer ──────────────────────────────────────────────── */
.band { position: relative; overflow: hidden; background: var(--bg-deep); color: rgba(255,255,255,.74); }
.band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 130% at 50% -10%, rgba(213,154,92,.22), transparent 55%); }
.site-foot { margin-top: 2.5rem; padding: 2.4rem 0 1.4rem; }
.site-foot__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-foot__inner strong { color: #fff; }
.site-foot__fine { position: relative; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); font-size: 0.8rem; color: rgba(255,255,255,.5); }
.site-foot__bottom { position: relative; margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; font-size: 0.82rem; color: rgba(255,255,255,.5); }
.site-foot__links { display: flex; gap: 1.3rem; }
.site-foot__links a { color: rgba(255,255,255,.72); }
.site-foot__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-foot__note { color: rgba(255,255,255,.42); }
@media (max-width: 620px) { .site-foot__bottom { flex-direction: column; align-items: flex-start; gap: .55rem; } }

/* Lead capture band */
.lead { margin-top: 2rem; border-radius: var(--r); padding: 1.6rem 1.7rem; }
.lead__copy { position: relative; }
.lead__copy p { color: rgba(255,255,255,.74); }
.lead__form { position: relative; display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.6rem; margin-top: 1.1rem; }
.lead__form .num:nth-child(3) { grid-column: 1 / -1; }
.lead__msg { position: relative; margin-top: 1rem; font-size: 0.9rem; }
.lead__msg.ok { color: #8fd0a8; }
.lead__msg.err { color: #f0a58a; }

:where(a, button, input, select, label):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 920px) {
  .cards, .stats, .steps { grid-template-columns: 1fr 1fr; }
  .cards--2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cards, .stats, .steps, .cards--2 { grid-template-columns: 1fr; }
  .lead__form { grid-template-columns: 1fr; }
  .brand__by { display: none; }
  .wallet { grid-template-columns: auto 1fr; }
  .wallet__actions { grid-column: 1 / -1; }

  /* Mobile hamburger nav */
  .nav-burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; margin-left: auto; width: 42px; height: 42px; cursor: pointer; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
  .nav-burger span { display: block; height: 2px; width: 20px; margin: 0 auto; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .topbar__collapse { display: none; position: absolute; top: 64px; left: 0; right: 0; z-index: 50; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 0.5rem 1.5rem 1rem; }
  .nav-toggle:checked ~ .topbar__collapse { display: flex; }
  .topbar__collapse .topnav { flex-direction: column; margin-left: 0; gap: 0; }
  .topbar__collapse .topnav__link { padding: 0.8rem 0.4rem; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 0.98rem; }
  .topbar__collapse .topbar__auth { margin-left: 0; margin-top: 0.9rem; flex-wrap: wrap; gap: 0.6rem; }
  .topbar__collapse .topbar__auth a.btn { flex: 1; justify-content: center; }
}
@media (max-width: 620px) {
  .gspecials { grid-template-columns: 1fr; }
  /* Home / marketing: tighter vertical rhythm and full-width CTAs so nothing feels cramped or clipped. */
  /* Drop the desktop min-height (it vertically-centres the single column and leaves a big empty gap up top
     now that the hero visual card is hidden) and top-align the content. */
  .hero__grid { min-height: 0; align-items: start; padding: 1.6rem 0 1.8rem; gap: 1.2rem; }
  .display { font-size: clamp(1.85rem, 7.5vw, 2.4rem); line-height: 1.1; }
  .hero__lead { font-size: 1.02rem; margin-top: .8rem; }
  .hero__trust { gap: .4rem .5rem; margin-top: 1.2rem; }
  .page-pad { padding: 1.6rem 0 2.4rem; }
  .ex-strip { padding-top: .8rem; padding-bottom: 1.4rem; }
  .hero__cta { gap: .6rem; margin-top: 1.3rem; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
  .lead { padding: 1.3rem 1.2rem; }
  .section-head { margin-bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } html { scroll-behavior: auto; } }

/* Blazor error UI */
#blazor-error-ui { background: var(--surface); border-top: 1px solid var(--line-2); box-shadow: 0 -1px 6px rgba(0,0,0,.1); display: none; left: 0; padding: 0.7rem 1.2rem; position: fixed; bottom: 0; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: 0.6rem; }

/* Validation (Identity pages) */
.validation-message, .text-danger { color: var(--loss); font-size: 0.85rem; }

/* ── Auth (login / register) — split: visual left, form right ─ */
.auth { display: grid; grid-template-columns: 1.04fr .96fr; align-items: stretch; min-height: calc(100vh - 64px); background: var(--bg); }
.auth__main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth__card { position: relative; width: 100%; max-width: 420px; background: var(--surface); padding: 2.2rem 2rem; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.auth__rings { display: none; }

/* Left visual panel */
.auth__aside { position: relative; overflow: hidden; color: #fff; display: flex; background: linear-gradient(155deg, #3a2613 0%, #1d1812 45%, #14161b 100%); }
.auth__aside-glow { position: absolute; inset: 0; background:
    radial-gradient(60% 50% at 18% 12%, rgba(213,154,92,.30), transparent 60%),
    radial-gradient(50% 45% at 90% 90%, rgba(153,102,51,.34), transparent 60%),
    repeating-radial-gradient(circle at 82% 8%, rgba(255,255,255,.05) 0 1.2px, transparent 1.2px 30px); }
.auth__aside-inner { position: relative; margin: auto; width: 100%; max-width: 440px; padding: 3rem 3.2rem; display: flex; flex-direction: column; gap: 2.1rem; }
.auth__logo { display: inline-flex; align-items: baseline; gap: .5rem; }
.auth__logo .brand__mark { align-self: center; }
.auth__logo-name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: #fff; }
.auth__logo-by { font-size: .76rem; color: rgba(255,255,255,.6); }
.auth__aside-h { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.7rem, 2.4vw, 2.3rem); line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.auth__aside-p { margin-top: .9rem; color: rgba(255,255,255,.74); font-size: 1rem; line-height: 1.6; max-width: 38ch; }
.auth__aside-list { list-style: none; margin: 1.3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.auth__aside-list li { position: relative; padding-left: 1.7rem; color: rgba(255,255,255,.82); font-size: .92rem; }
.auth__aside-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-bright); font-weight: 700; }
.auth__mock { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); border-radius: 14px; padding: 1.2rem 1.3rem; box-shadow: 0 24px 50px -28px rgba(0,0,0,.7); animation: cl-fade-up .7s cubic-bezier(.22,.61,.36,1) both; animation-delay: .15s; }
.auth__mock-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.6); }
.auth__mock-n { font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: var(--brand-bright); letter-spacing: -.02em; margin-top: .2rem; }
.auth__mock-bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; margin: .9rem 0; }
.auth__mock-bar span { display: block; height: 100%; width: 62%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-bright)); }
.auth__mock-row { display: flex; justify-content: space-between; align-items: center; font-size: .86rem; color: rgba(255,255,255,.78); padding: .3rem 0; }
.auth__mock-row b.up { color: #8fd0a8; } .auth__mock-row b.down { color: var(--brand-bright); }
@media (max-width: 880px) { .auth { grid-template-columns: 1fr; } .auth__aside { display: none; } }
.auth__head { text-align: center; margin-bottom: 1.5rem; }
.auth__head .eyebrow { justify-content: center; }
.auth__head h1 { margin-top: .7rem; font-size: 1.7rem; color: var(--ink); }
.auth__head p { margin-top: .5rem; color: var(--muted); font-size: .92rem; }
.auth .field:first-of-type { margin-top: 0; }
.auth .field > span { font-weight: 600; }
.auth__btn { width: 100%; justify-content: center; margin-top: 1.3rem; }
.auth__row { display: flex; align-items: center; justify-content: space-between; margin-top: .9rem; font-size: .86rem; }
.auth__check { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-2); cursor: pointer; }
.auth__or { display: flex; align-items: center; gap: .8rem; margin: 1.4rem 0; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__alt { text-align: center; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.auth__alt a { color: var(--brand-deep); font-weight: 600; }
.auth__links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; justify-content: center; margin-top: 1rem; font-size: .84rem; }
.auth__links a { color: var(--muted); }
.auth__links a:hover { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; }
.auth__fine { text-align: center; font-size: .76rem; color: var(--muted); margin-top: 1.2rem; line-height: 1.5; }
.auth__fine a { color: var(--brand-deep); }

/* Social sign-in buttons */
.social { display: flex; flex-direction: column; gap: .6rem; }
.social__btn { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; padding: .7rem 1rem; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-weight: 600; font-size: .92rem; color: var(--ink); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; text-decoration: none; }
.social__btn:hover:not(:disabled) { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.social__btn:disabled { opacity: .65; cursor: default; }
.social__btn svg { width: 18px; height: 18px; flex: none; }
.social__soon { font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: .12rem .45rem; border-radius: 999px; margin-left: .2rem; }
.social__note { font-size: .78rem; color: var(--muted); text-align: center; margin-top: .3rem; }

/* ============================================================
   Motion & polish — minimalist, InnoWave green (#996633)
   ============================================================ */
@keyframes cl-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes cl-fade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes cl-pop     { 0% { opacity: 0; transform: scale(.94); } 100% { opacity: 1; transform: scale(1); } }
@keyframes cl-rise    { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Content eases in on each page load / navigation (these blocks re-mount per page). */
.hero__inner, .section-head, .card, .cat, .stat, .step, .figure-hero, .tbl-wrap,
.notice, .wallet, .auth__card, .drop, .lead, .mytax {
  animation: cl-fade-up .5s cubic-bezier(.22,.61,.36,1) both;
}
/* Stagger items inside grids for a smooth cascade. */
.cards > :nth-child(2), .stats > :nth-child(2), .steps > :nth-child(2), .cats > :nth-child(2) { animation-delay: .06s; }
.cards > :nth-child(3), .stats > :nth-child(3), .steps > :nth-child(3), .cats > :nth-child(3) { animation-delay: .12s; }
.cards > :nth-child(4), .stats > :nth-child(4), .steps > :nth-child(4), .cats > :nth-child(4) { animation-delay: .18s; }
.figure-hero__n { animation: cl-pop .55s cubic-bezier(.22,.61,.36,1) both; }
.hero .display, .auth__head h1 { animation: cl-rise .6s cubic-bezier(.22,.61,.36,1) both; }
.hero__lead, .hero__cta { animation: cl-fade-up .6s cubic-bezier(.22,.61,.36,1) both; animation-delay: .1s; }

/* Interactive micro-motion. */
.btn { transition: background-color .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary:hover { box-shadow: 0 10px 22px -10px rgba(20,22,27,.35); }
.card { transition: border-color .18s, box-shadow .22s, transform .22s; }
.cat, .stat, .wallet, .social__btn { transition: border-color .16s, box-shadow .2s, transform .18s, background-color .16s; }
.stat:hover, .wallet:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.num, .sel { transition: border-color .15s, box-shadow .15s, background-color .15s; }
.tbl tbody tr { transition: background-color .12s ease; }
.brand__mark { transition: transform .28s cubic-bezier(.34,1.56,.64,1); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }

/* Animated nav underline (desktop). */
.topnav__link { position: relative; }
.topnav__link::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .22rem; height: 2px; border-radius: 2px; background: var(--brand); transform: scaleX(0); transform-origin: center; transition: transform .22s ease; }
.topnav__link:hover::after, .topnav__link.active::after { transform: scaleX(1); }
@media (max-width: 760px) { .topbar__collapse .topnav__link::after { display: none; } }

/* Loading spinner already animates; soften pill + focus transitions. */
.pill { transition: background-color .15s, border-color .15s, color .15s; }
