/* ==========================================================================
   11 Wit — Design System (v3)
   Flat, professional, SHADOW-FREE. Depth comes from layered surfaces, crisp
   borders and gradient accents — never any kind of cast or drop shadow.
   Brand: IBM Plex Mono (display/labels/numbers) + Work Sans (body), on a deep
   indigo-black canvas with neon-green/cyan accents and green/red money semantics.
   ========================================================================== */

:root {
  --bg: #000000;
  --bg-2: #000000;
  --surface: #000000;
  --surface-2: #111111;
  --surface-3: #1a1a1a;

  --border: rgba(255, 255, 255, 0.12);
  --border-2: rgba(255, 255, 255, 0.20);
  --border-3: rgba(255, 255, 255, 0.32);

  --text: #ffffff;
  --dim: rgba(255, 255, 255, 0.64);
  --faint: rgba(255, 255, 255, 0.42);

  --accent: #39FF14;        /* neon green — primary brand accent */
  --accent-2: #39FF14;
  --indigo: #39FF14;
  --cyan: #39FF14;
  --cyan-2: #39FF14;
  --green: #39FF14;        /* gains */
  --green-2: #39FF14;
  --red: #ffffff;          /* losses: white, no red */
  --red-2: #ffffff;
  --orange: #ffffff;       /* warnings: white */

  --grad: #39FF14;
  --grad-text: #39FF14;
  --grad-soft: rgba(57, 255, 20, 0.12);

  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
  --sans: 'Work Sans', system-ui, -apple-system, sans-serif;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --maxw: 1200px;
  --nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* faint global texture: an ultra-subtle grid (background, not a shadow) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: transparent;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5 { font-family: var(--mono); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
::selection { background: rgba(57, 255, 20, 0.4); color: #fff; }

/* ---- helpers ----------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--dim); }
.center { text-align: center; }
.pos { color: var(--green-2); }
.neg { color: var(--red-2); }
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-block;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent-2);
  padding: 0.4rem 0.9rem; border: 1px solid var(--border-2);
  border-radius: var(--r-pill); background: var(--surface);
}

/* ---- buttons (no shadows; gradient/border/bg only) --------------------- */
.btn {
  --pad: 0.7rem 1.3rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: var(--pad);
  font-family: var(--mono); font-size: 0.85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-radius: var(--r-pill); border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, filter 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; }
.btn-primary:hover { filter: brightness(1.08); background: var(--grad); }
.btn-outline { background: transparent; }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); }
.btn-danger { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: var(--red-2); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-lg { padding: 0.95rem 1.8rem; font-size: 0.92rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.75rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- brand wordmark ---------------------------------------------------- */
.brand { display: inline-flex; align-items: baseline; gap: 0.34rem; }
.brand-mark {
  font-family: var(--mono); font-weight: 700; font-size: 1.3rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub {
  font-family: var(--mono); font-weight: 600; color: var(--text);
  font-size: 1.3rem; letter-spacing: 0.14em; text-transform: uppercase;
}

/* ---- top navigation (shared public + app) ------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: var(--nav-h); max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-link {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim);
  padding: 0.5rem 0.85rem; border-radius: var(--r-pill);
  border: 1px solid transparent; transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.nav-link:hover { color: var(--text); background: var(--surface); border-color: var(--border); }
.nav-link.active { color: var(--text); background: var(--surface-2); border-color: var(--border-2); }
.nav-link.logout { color: var(--red-2); }
.nav-link.logout:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.nav-cta { display: flex; align-items: center; gap: 0.6rem; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 0.4rem;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- flash toasts ------------------------------------------------------ */
.flashes {
  position: fixed; top: calc(var(--nav-h) + 14px); right: 18px; z-index: 200;
  display: flex; flex-direction: column; gap: 0.6rem; max-width: 360px;
}
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1.1rem; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--border-2); border-left: 3px solid var(--accent);
  font-size: 0.9rem; animation: slidein 0.3s ease both;
}
.flash-success { border-left-color: var(--green); }
.flash-error { border-left-color: var(--red); }
.flash-warning { border-left-color: var(--orange); }
.flash-close { background: none; border: none; color: var(--dim); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.flash-close:hover { color: var(--text); }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ====================== PUBLIC / MARKETING ============================== */
.hero { position: relative; padding: clamp(4rem, 11vh, 8rem) 0 clamp(3rem, 7vh, 5.5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: transparent;
}
.hero-inner { max-width: 860px; margin: 0 auto; text-align: center; padding: 0 24px; }
.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.8rem); line-height: 1.02; letter-spacing: -0.03em;
  text-transform: uppercase; margin: 1.4rem 0 1.3rem;
  background: #ffffff;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--dim); max-width: 620px; margin: 0 auto 2.2rem; }
.hero-cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 1.4rem; font-family: var(--mono); font-size: 0.78rem; color: var(--faint); }

.section { padding: clamp(3.5rem, 9vh, 6.5rem) 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.02em; margin: 0.9rem 0 0.8rem; }
.section-sub { color: var(--dim); font-size: 1.05rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: var(--surface); padding: 1.8rem 1.4rem; text-align: center; }
.stat-value { font-family: var(--mono); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--dim); font-size: 0.85rem; margin-top: 0.4rem; }

.grid { display: grid; gap: 1.4rem; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* cards */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.8rem; overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-2); background: var(--surface-2); transform: translateY(-3px); }
.card-accent::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); }

.feature-icon {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--r);
  background: var(--grad-soft); border: 1px solid var(--border-2); color: var(--accent-2);
  margin-bottom: 1.3rem;
}
.feature h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.feature p { color: var(--dim); font-size: 0.95rem; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.8rem; }
.step-num {
  font-family: var(--mono); font-size: 0.85rem; font-weight: 700; color: var(--accent-2);
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); background: var(--surface-2); margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step p { color: var(--dim); font-size: 0.95rem; }

/* pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2rem 1.8rem;
  transition: border-color 0.2s, transform 0.2s;
}
.plan:hover { border-color: var(--border-2); transform: translateY(-3px); }
.plan.featured { border-color: rgba(57, 255, 20, 0.55); background: rgba(57, 255, 20, 0.06); }
.plan-badge {
  position: absolute; top: -0.8rem; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.35rem 0.9rem; border-radius: var(--r-pill); background: var(--grad); color: #fff; white-space: nowrap;
}
.plan-name { font-family: var(--mono); font-size: 1.4rem; text-transform: uppercase; margin-bottom: 0.5rem; }
.plan-blurb { color: var(--dim); font-size: 0.9rem; min-height: 2.6em; margin-bottom: 1.3rem; }
.plan-price { display: flex; align-items: baseline; gap: 0.3rem; margin-bottom: 1.4rem; }
.plan-amount { font-family: var(--mono); font-size: 2.4rem; font-weight: 700; }
.plan-period { color: var(--dim); }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.8rem; flex: 1; }
.plan-features li { color: var(--dim); padding-left: 1.6rem; position: relative; font-size: 0.92rem; }
.plan-features li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); }

/* cta band */
.cta-band { padding: clamp(3.5rem, 9vh, 6rem) 0; }
.cta-inner {
  max-width: 820px; margin: 0 auto; text-align: center; padding: clamp(2.5rem, 6vw, 4rem);
  background: var(--grad-soft); border: 1px solid var(--border-2); border-radius: var(--r-lg);
}
.cta-title { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -0.02em; margin-bottom: 1rem; }
.cta-sub { color: var(--dim); font-size: 1.1rem; margin-bottom: 2rem; }

/* ---- footer ------------------------------------------------------------ */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: 4rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 4rem 24px 2rem; }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2.5rem; margin-bottom: 3rem; }
.footer-brand { max-width: 300px; }
.footer-tagline { color: var(--dim); font-size: 0.9rem; margin: 1rem 0 1.4rem; }
.footer-social { display: flex; gap: 0.6rem; }
.social-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--dim); transition: 0.2s; }
.social-btn:hover { color: var(--text); border-color: var(--border-3); background: var(--surface-2); transform: translateY(-2px); }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { color: var(--dim); font-size: 0.9rem; transition: color 0.18s; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom { padding-top: 2rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; }
.footer-bottom p { color: var(--faint); font-family: var(--mono); font-size: 0.78rem; }

/* ---- legal / info doc pages -------------------------------------------- */
.doc-wrap { max-width: 820px; margin: 0 auto; padding: clamp(3rem, 7vh, 5rem) 24px; }
.doc-head { margin-bottom: 2.5rem; padding-bottom: 1.8rem; border-bottom: 1px solid var(--border); }
.doc-title { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; margin-top: 0.9rem; }
.doc-tagline { color: var(--dim); margin-top: 0.6rem; }
.doc h2 { font-size: 1.4rem; margin: 2.2rem 0 0.8rem; }
.doc h3 { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; color: var(--text); }
.doc p { color: var(--dim); margin-bottom: 1rem; }
.doc ul, .doc ol { color: var(--dim); margin: 0.8rem 0 1.3rem; padding-left: 0; list-style: none; }
.doc ol { counter-reset: li; }
.doc li { position: relative; padding-left: 1.6rem; margin-bottom: 0.55rem; }
.doc ul li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); }
.doc ol li { counter-increment: li; }
.doc ol li::before { content: counter(li); position: absolute; left: 0; top: 0; font-family: var(--mono); font-size: 0.78rem; color: var(--accent-2); }
.doc a { color: var(--accent-2); border-bottom: 1px solid rgba(57, 255, 20, 0.45); }
.doc a:hover { color: #ffffff; }
.doc strong { color: var(--text); }
.doc code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-3); border: 1px solid var(--border-2); padding: 0.1rem 0.4rem; border-radius: 6px; color: #ffffff; }
.doc em { color: var(--text); font-style: italic; }

/* ====================== AUTH ============================================ */
.auth { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 2.5rem 1.5rem; }
.auth-card {
  width: 100%; max-width: 1020px; display: grid; grid-template-columns: 1.05fr 1fr;
  border: 1px solid var(--border-2); border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
}
.auth-aside { position: relative; padding: 3.5rem; display: flex; align-items: center; overflow: hidden; background: var(--grad-soft); border-right: 1px solid var(--border); }
.auth-aside::before { content: ""; position: absolute; inset: 0; background: transparent; }
.auth-aside-content { position: relative; }
.auth-aside h2 { font-size: 2.4rem; line-height: 1.05; text-transform: uppercase; letter-spacing: -0.02em; color: #ffffff; }
.auth-aside p { color: var(--dim); margin-top: 1rem; }
.auth-aside ul { list-style: none; margin-top: 1.6rem; display: flex; flex-direction: column; gap: 0.7rem; }
.auth-aside li { position: relative; padding-left: 1.6rem; color: var(--dim); font-size: 0.92rem; }
.auth-aside li::before { content: "✓"; position: absolute; left: 0; color: var(--green-2); font-family: var(--mono); }
.auth-main { padding: 3.2rem; display: flex; flex-direction: column; justify-content: center; }
.auth-head { margin-bottom: 2rem; }
.auth-title { font-size: 1.9rem; }
.auth-sub { color: var(--dim); margin-top: 0.5rem; }
.auth-foot { margin-top: 1.6rem; text-align: center; color: var(--dim); font-size: 0.92rem; }
.auth-foot a { color: var(--text); font-weight: 700; border-bottom: 1px solid rgba(57, 255, 20, 0.6); }

/* ---- forms ------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-family: var(--mono); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--dim); }
.field input, .field select, .field textarea {
  background: var(--surface-3); border: 1px solid var(--border-2); border-radius: var(--r-sm);
  color: var(--text); padding: 0.85rem 1rem; font-size: 1rem; font-family: var(--sans); width: 100%;
  transition: border-color 0.18s, background 0.18s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-2); background: var(--surface-2); }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }

/* ====================== APP ============================================= */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 2.2rem 24px 4rem; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.page-title .gradient-text { color: #39FF14; }
.page-sub { color: var(--dim); margin-top: 0.4rem; }
.page-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

/* metric cards */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 1.8rem; }
.metric { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem; overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.metric:hover { border-color: var(--border-2); transform: translateY(-2px); }
.metric::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--border-2); }
.metric.income::before { background: var(--green); }
.metric.expense::before { background: var(--red); }
.metric.net::before { background: var(--grad); }
.metric.rate::before { background: var(--accent); }
.metric-label { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin-bottom: 0.5rem; }
.metric-value { font-family: var(--mono); font-size: 1.85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric-trend { font-size: 0.8rem; color: var(--dim); margin-top: 0.35rem; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 1.4rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.6rem; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.03em; }
.panel-link { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.04em; }
.panel-link:hover { color: #ffffff; }
.panel-body { padding: 1.6rem; }
.grid-dash { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.4rem; }

/* transaction list */
.txn-list { display: flex; flex-direction: column; gap: 0.6rem; }
.txn { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.95rem 1.1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); transition: border-color 0.18s, transform 0.18s; }
.txn:hover { border-color: var(--border-2); transform: translateX(2px); }
.txn-main { min-width: 0; }
.txn-desc { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-meta { display: flex; gap: 0.7rem; align-items: center; color: var(--dim); font-size: 0.82rem; margin-top: 0.2rem; }
.txn-cat { font-family: var(--mono); font-size: 0.7rem; padding: 0.15rem 0.6rem; border: 1px solid var(--border-2); border-radius: var(--r-pill); }
.txn-amount { font-family: var(--mono); font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.txn-amount.income { color: var(--green-2); }
.txn-amount.expense { color: var(--red-2); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table thead { background: var(--surface-2); }
.table th { text-align: left; padding: 1rem; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); border-bottom: 1px solid var(--border); }
.table td { padding: 0.95rem 1rem; border-bottom: 1px solid var(--border); }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.text-right { text-align: right; }

/* badges & bars */
.badge { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; padding: 0.18rem 0.6rem; border-radius: var(--r-pill); border: 1px solid; }
.badge-income { color: var(--green-2); border-color: rgba(57, 255, 20, 0.5); background: rgba(57, 255, 20, 0.12); }
.badge-expense { color: var(--red-2); border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.12); }
.bar-track { height: 10px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.bar-fill { height: 100%; border-radius: var(--r-pill); transition: width 0.7s cubic-bezier(.2,.8,.2,1); }
.bar-fill.income { background: var(--green); }
.bar-fill.expense { background: var(--red); }
.bar-fill.brand { background: var(--grad); }

/* category rows */
.cat-row { display: grid; grid-template-columns: 1.4fr 2fr auto; gap: 1.2rem; align-items: center; padding: 1rem 1.1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 0.6rem; }
.cat-name { font-weight: 600; display: flex; align-items: center; gap: 0.6rem; }
.cat-amount { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* charts */
.chart-box { position: relative; height: 320px; }
.chart-box.tall { height: 380px; }

/* forecast */
.fc-list { display: flex; flex-direction: column; gap: 0.7rem; }
.fc { display: grid; grid-template-columns: 110px 1fr 130px; gap: 1.2rem; align-items: center; padding: 1.05rem 1.2rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); }
.fc-month { font-family: var(--mono); font-weight: 700; }
.fc-net { font-family: var(--mono); font-size: 1.2rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.fc-band { color: var(--dim); font-size: 0.8rem; margin-top: 0.25rem; }
.fc-conf { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: 0.72rem; color: var(--dim); }
.fc-conf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); }

/* dropzone (upload) */
.dropzone { border: 1.5px dashed var(--border-3); border-radius: var(--r-lg); background: var(--surface); padding: 3.5rem 2rem; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent-2); background: var(--surface-2); }
.dropzone .dz-icon { color: var(--accent-2); margin: 0 auto 1rem; }
.dropzone h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.dropzone p { color: var(--dim); }
.file-chip { display: inline-flex; align-items: center; gap: 0.7rem; margin-top: 1.2rem; padding: 0.6rem 1rem; background: var(--surface-3); border: 1px solid var(--border-2); border-radius: var(--r-pill); font-family: var(--mono); font-size: 0.85rem; }

/* parse report */
.report { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 1.4rem; }
.report-stat { background: var(--surface); padding: 1.4rem; text-align: center; }
.report-stat .v { font-family: var(--mono); font-size: 1.8rem; font-weight: 700; }
.report-stat .l { color: var(--dim); font-size: 0.8rem; margin-top: 0.3rem; }

/* empty states */
.empty { text-align: center; padding: 4rem 2rem; }
.empty-icon { color: var(--faint); margin: 0 auto 1.2rem; }
.empty h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.empty p { color: var(--dim); margin-bottom: 1.6rem; }

/* account / danger zone */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.danger { border-color: rgba(255, 255, 255, 0.3); }
.danger .panel-head { border-bottom-color: rgba(255, 255, 255, 0.2); }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--dim); font-size: 0.9rem; }
.kv .v { font-family: var(--mono); font-weight: 600; }

/* pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1.4rem; margin-top: 2rem; }
.page-info { color: var(--dim); font-family: var(--mono); font-size: 0.85rem; }

/* search bar */
.toolbar { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.4rem; }
.search { flex: 1; min-width: 200px; }
.search input { width: 100%; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-pill); padding: 0.7rem 1.1rem; color: var(--text); font-family: var(--sans); }
.search input:focus { outline: none; border-color: var(--accent-2); }

/* error page */
.error-page { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 2rem; text-align: center; }
.error-code { font-family: var(--mono); font-size: clamp(4rem, 14vw, 8rem); font-weight: 700; line-height: 1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page p { color: var(--dim); font-size: 1.1rem; margin: 1rem 0 2rem; max-width: 460px; }

/* entrance animation (opt-in) */
.reveal > * { animation: rise 0.55s cubic-bezier(.2,.8,.2,1) both; }
.reveal > *:nth-child(2) { animation-delay: .06s; }
.reveal > *:nth-child(3) { animation-delay: .12s; }
.reveal > *:nth-child(4) { animation-delay: .18s; }
.reveal > *:nth-child(5) { animation-delay: .24s; }
.reveal > *:nth-child(6) { animation-delay: .30s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ====================== RESPONSIVE ====================================== */
@media (max-width: 980px) {
  .cols-3, .cols-2, .pricing, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .grid-dash, .account-grid, .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .report { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .nav-links, .nav-cta {
    position: absolute; top: calc(var(--nav-h) + 8px); left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 0.4rem; padding: 1rem;
    background: rgba(0, 0, 0, 0.96); border: 1px solid var(--border-2); border-radius: var(--r);
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: max-height 0.3s, opacity 0.25s;
  }
  .nav.open .nav-links { max-height: 480px; opacity: 1; pointer-events: auto; }
  .nav.open .nav-cta { max-height: 200px; opacity: 1; pointer-events: auto; top: auto; position: static; margin-top: 0.4rem; border: none; background: none; padding: 0; }
  .nav.open .nav-cta .btn { width: 100%; }
  .nav-link { width: 100%; }
}
@media (max-width: 560px) {
  .stats, .metrics { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .cat-row, .fc { grid-template-columns: 1fr; gap: 0.6rem; }
  .hero-cta, .page-actions { width: 100%; }
  .hero-cta .btn, .page-actions .btn { flex: 1; }
  .auth-main { padding: 2.2rem; }
}

/* accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   v3.1 — subscription, trial, dashboard health, admin console
   (uses the same tokens; flat, shadow-free, brand-consistent)
   ========================================================================== */

/* ---- subscription banner (under nav) ---------------------------------- */
.sub-banner { border-bottom: 1px solid var(--border); }
.sub-banner.trial   { background: rgba(57, 255, 20, 0.10); }
.sub-banner.expired { background: rgba(255, 255, 255, 0.06); }
.sub-banner-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.7rem 24px;
  display: flex; align-items: center; gap: 0.8rem; font-size: 0.9rem;
}
.sub-banner-inner .btn { margin-left: auto; }
.sub-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex: none; }
.sub-banner.expired .sub-dot { background: var(--orange); }
.nav-link.admin-link { color: var(--cyan-2); }

/* ---- dashboard: delta chips ------------------------------------------- */
.delta { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; padding: 0.1rem 0.4rem; border-radius: var(--r-sm); }
.delta.up   { color: var(--green-2); background: rgba(57, 255, 20,0.13); }
.delta.down { color: var(--red-2);   background: rgba(255, 255, 255,0.13); }

/* ---- dashboard: health panel + gauge ---------------------------------- */
.health { display: flex; flex-direction: column; }
.health-row { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.health-row:last-child { border-bottom: none; }
.health-k { color: var(--dim); font-size: 0.9rem; }
.health-v { font-family: var(--mono); font-weight: 600; }
.gauge { margin-top: 1.2rem; }
.gauge-track { height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.gauge-fill { height: 100%; border-radius: var(--r-pill); background: var(--grad); }
.gauge-cap { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.8rem; color: var(--dim); }

/* ---- category bars (dashboard / admin) -------------------------------- */
.cat-bars { display: flex; flex-direction: column; gap: 1rem; }
.cat-bar-top { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 0.4rem; }
.cat-track { height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.cat-fill { height: 100%; border-radius: var(--r-pill); background: var(--grad); }

/* ---- tier + status chips ---------------------------------------------- */
.tier-badge, .status-chip {
  display: inline-flex; align-items: center; font-family: var(--mono);
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.28rem 0.7rem; border-radius: var(--r-pill); border: 1px solid var(--border-2); white-space: nowrap;
}
.tier-starter      { color: var(--dim); }
.tier-professional { color: #fff; background: var(--grad); border-color: transparent; }
.tier-enterprise   { color: var(--cyan-2); border-color: rgba(57, 255, 20,0.4); }
.status-active   { color: var(--green-2); border-color: rgba(57, 255, 20,0.4); }
.status-trialing { color: var(--accent-2); border-color: rgba(57, 255, 20,0.4); }
.status-past_due { color: var(--orange); border-color: rgba(255, 255, 255,0.45); }
.status-canceled { color: var(--faint); }
.mini-badge { font-family: var(--mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; color: var(--cyan-2); border: 1px solid rgba(57, 255, 20,0.4); border-radius: var(--r-sm); padding: 0.05rem 0.35rem; vertical-align: middle; }

/* ---- billing page ------------------------------------------------------ */
.plan-status { display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: space-between; align-items: center; padding: 1.6rem 1.8rem; }
.ps-row { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.ps-label { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.ps-note { color: var(--dim); font-size: 0.92rem; max-width: 60ch; }
.ps-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.ps-actions form { margin: 0; }
.usage-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.4rem 0; }
.usage-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1.1rem 1.3rem; }
.usage-k { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--dim); margin-bottom: 0.4rem; }
.usage-v { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; }
.section-h { font-family: var(--mono); font-size: 1.1rem; margin: 2rem 0 1.1rem; }
.fineprint { font-size: 0.8rem; margin-top: 1.2rem; }

/* ---- usage pill + upsell / lock states -------------------------------- */
.usage-pill { font-family: var(--mono); font-size: 0.78rem; color: var(--dim); border: 1px solid var(--border-2); border-radius: var(--r-pill); padding: 0.45rem 0.95rem; background: var(--surface); }
.empty.upsell { padding: 3rem 2rem; }
.lock-badge { display: inline-block; font-family: var(--mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: #fff; background: var(--grad); border-radius: var(--r-pill); padding: 0.3rem 0.85rem; margin-bottom: 1rem; }
.center-actions { justify-content: center; }

/* ---- admin console ----------------------------------------------------- */
.adm-list { display: flex; flex-direction: column; }
.adm-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.adm-row:last-child { border-bottom: none; }
.adm-email { font-weight: 600; font-size: 0.92rem; word-break: break-all; }
.status-legend { display: flex; flex-direction: column; gap: 0.9rem; }
.status-legend-row { display: flex; justify-content: space-between; align-items: center; }
.adm-table { min-width: 880px; }
.adm-table td { vertical-align: top; }
.adm-edit { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0; }
.sel-sm, .search-input {
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text);
  font-family: var(--sans); font-size: 0.8rem; padding: 0.4rem 0.6rem; border-radius: var(--r-sm);
}
.sel-sm:focus, .search-input:focus { outline: none; border-color: var(--accent-2); }
.search-input { border-radius: var(--r-pill); padding: 0.55rem 1rem; min-width: 240px; }
.pager-info { color: var(--dim); font-size: 0.8rem; }

@media (max-width: 720px) {
  .usage-row { grid-template-columns: 1fr; }
  .plan-status { flex-direction: column; align-items: flex-start; }
}

/* ---- consent (sign-up) ------------------------------------------------- */
.consent { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.88rem; color: var(--dim); line-height: 1.5; cursor: pointer; }
.consent input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--border-3); border-radius: 6px; background: var(--surface-2); cursor: pointer; position: relative; transition: 0.15s; }
.consent input[type="checkbox"]:hover { border-color: var(--accent-2); }
.consent input[type="checkbox"]:checked { background: var(--grad); border-color: transparent; }
.consent input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.consent input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.consent a { color: var(--accent-2); }
.consent-note { font-size: 0.78rem; color: var(--faint); margin-top: 0.4rem; line-height: 1.5; }
.consent-note a { color: var(--dim); text-decoration: underline; }

/* ---- cookie banner ----------------------------------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--surface); border-top: 1px solid var(--border-2); transform: translateY(110%); transition: transform 0.3s ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-inner { max-width: var(--maxw); margin: 0 auto; padding: 1rem 24px; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.cookie-inner p { color: var(--dim); font-size: 0.86rem; margin: 0; flex: 1; min-width: 240px; }
.cookie-inner a { color: var(--accent-2); }
.cookie-actions { display: flex; gap: 0.6rem; }

/* ---- doc page polish --------------------------------------------------- */
.doc-updated { font-family: var(--mono); font-size: 0.78rem; color: var(--faint); margin-top: 0.6rem; }
.doc-foot { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }

/* ---- MFA screens ------------------------------------------------------- */
.auth-narrow { max-width: 520px; margin: 0 auto; }
.auth-card.single { grid-template-columns: 1fr; }
.mfa-steps { list-style: none; color: var(--dim); margin: 0 0 0.8rem; font-size: 0.92rem; }
.mfa-qr { display: grid; place-items: center; background: #fff; border-radius: var(--r); padding: 1rem; width: max-content; margin: 0 auto 1.2rem; }
.mfa-qr svg { width: 188px; height: 188px; display: block; }
.mfa-secret-label { font-size: 0.82rem; color: var(--dim); margin-bottom: 0.4rem; }
.mfa-secret { display: block; font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0.12em; color: var(--cyan-2); background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 0.7rem 0.9rem; word-break: break-all; text-align: center; }
.mfa-code-input { font-family: var(--mono); font-size: 1.5rem !important; letter-spacing: 0.4em; text-align: center; }

/* ---- inline transaction edit (CRUD) ----------------------------------- */
.row-editing { background: var(--surface-2); }
.row-edit-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.row-edit-form input, .row-edit-form select {
  background: var(--surface); border: 1px solid var(--border-2); color: var(--text);
  font-family: var(--sans); font-size: 0.85rem; padding: 0.45rem 0.6rem; border-radius: var(--r-sm);
}
.row-edit-form input:focus, .row-edit-form select:focus { outline: none; border-color: var(--accent); }
.row-edit-form input[name="description"] { flex: 1; min-width: 160px; }
.row-actions { display: flex; gap: 0.35rem; justify-content: flex-end; align-items: center; }

/* ==========================================================================
   v3.3 — Unified authenticated app shell (sidebar + topbar)
   Used by BOTH the customer and admin areas. Same structure & brand;
   the admin section in the sidebar only appears for admins. Flex-based,
   responsive, neon-green accents.
   ========================================================================== */
.app { background: var(--bg); }
.app-layout { display: flex; min-height: 100vh; align-items: stretch; }

/* --- sidebar --- */
.sidebar {
  width: 258px; flex: 0 0 258px;
  background: #000000;
  border-right: 1px solid var(--border-2);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 50;
}
.sidebar-head { padding: 1.4rem 1.35rem 0.6rem; }
.brand-word { font-family: var(--mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.3em; color: var(--text); }
.side-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.12rem; }
.side-label { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--faint); padding: 1.05rem 0.65rem 0.45rem; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.7rem; border-radius: var(--r-sm);
  color: var(--dim); font-size: 0.9rem; font-weight: 500; transition: 0.15s;
}
.side-ico { display: inline-flex; }
.side-ico svg { width: 18px; height: 18px; color: var(--faint); transition: 0.15s; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link:hover .side-ico svg { color: var(--accent); }
.side-link.active { background: var(--surface-2); color: #fff; }
.side-link.active .side-ico svg { color: var(--accent); }
.side-link.active::before {
  content: ""; position: absolute; left: -0.8rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent);
}
.sidebar-foot { padding: 0.85rem 1rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 0.55rem; }
.side-user { display: flex; align-items: center; gap: 0.6rem; min-width: 0; flex: 1; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--grad); color: #000000; font-weight: 700; font-family: var(--mono); font-size: 0.92rem; }
.avatar.sm { width: 26px; height: 26px; font-size: 0.72rem; }
.su-meta { display: flex; flex-direction: column; min-width: 0; }
.su-email { font-size: 0.8rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-plan { font-size: 0.66rem; color: var(--dim); font-family: var(--mono); }
.side-signout { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: var(--r-sm); color: var(--dim); border: 1px solid var(--border-2); }
.side-signout:hover { color: var(--red-2); border-color: rgba(255, 255, 255, 0.4); }

/* --- main + topbar --- */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 0.7rem;
  height: 62px; padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-2);
}
.topbar-burger { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 4px; }
.topbar-brand { display: none; }
.topbar-spacer { flex: 1; }
.trial-pill { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 600; color: var(--accent); background: var(--grad-soft); border: 1px solid rgba(57, 255, 20, 0.35); border-radius: var(--r-pill); padding: 0.4rem 0.85rem; }
.trial-pill.expired { color: var(--orange); border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.10); }
.trial-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.acct-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.28rem 0.7rem 0.28rem 0.34rem; border-radius: var(--r-pill); border: 1px solid var(--border-2); }
.acct-chip:hover { border-color: var(--accent); }
.acct-email { font-size: 0.82rem; color: var(--dim); }
.content { flex: 1; width: 100%; max-width: 1280px; padding: clamp(1.4rem, 3vw, 2.4rem); }

.sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 45; }

/* premium polish: lift on metric hover, crisp accents */
.metric:hover { border-color: rgba(57, 255, 20, 0.45); transform: translateY(-2px); }
.panel:hover { border-color: var(--border-3); }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform 0.25s ease; box-shadow: 24px 0 60px rgba(0,0,0,0.4); }
  .sidebar.open { transform: translateX(0); }
  .topbar-burger { display: inline-flex; }
  .topbar-brand { display: inline-flex; }
  .sidebar-scrim.show { display: block; }
  .acct-email { display: none; }
}

/* ---- workspace context + profile dropdown (strict B/W/green) ---------- */
.ws-context { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--faint); padding: 0.3rem 0.6rem; border: 1px solid var(--border); border-radius: var(--r-pill); }
.ws-context.admin { color: #000; background: var(--accent); border-color: var(--accent); font-weight: 700; }
@media (max-width: 640px) { .ws-context { display: none; } }

.acct-menu { position: relative; }
.acct-chip { cursor: pointer; background: none; }
.acct-caret { color: var(--faint); transition: transform 0.15s; }
.acct-menu.open .acct-caret { transform: rotate(180deg); }
.acct-menu.open .acct-chip { border-color: var(--accent); }
.acct-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); width: 248px;
  background: #000; border: 1px solid var(--border-2); border-radius: var(--r);
  padding: 0.5rem; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s; z-index: 60;
}
.acct-menu.open .acct-dropdown { opacity: 1; visibility: visible; transform: translateY(0); box-shadow: 0 0 0 1px rgba(57,255,20,0.18); }
.acct-dd-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem 0.7rem; border-bottom: 1px solid var(--border); margin-bottom: 0.4rem; }
.acct-dd-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.6rem; border-radius: var(--r-sm); color: var(--dim); font-size: 0.88rem; }
.acct-dd-item svg { color: var(--faint); flex: none; }
.acct-dd-item:hover { background: var(--surface-2); color: #fff; }
.acct-dd-item:hover svg { color: var(--accent); }
.acct-dd-item.danger:hover { color: #fff; background: rgba(255,255,255,0.06); }
.acct-dd-sep { height: 1px; background: var(--border); margin: 0.4rem 0; }

/* ---- admin user detail ------------------------------------------------- */
.kv { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: none; }
.kv-k { color: var(--dim); font-size: 0.88rem; }
.kv-v { font-size: 0.9rem; }
.action-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.adm-link { color: #fff; border-bottom: 1px solid transparent; }
.adm-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- insights cards ---------------------------------------------------- */
.insight-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.insight-card { position: relative; background: #000; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.4rem 1.5rem 1.5rem; overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.insight-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.insight-card.tone-warn::before { background: rgba(255, 255, 255, 0.55); }
.insight-card.tone-bad::before  { background: #ffffff; }
.insight-card:hover { border-color: rgba(57, 255, 20, 0.45); transform: translateY(-2px); }
.insight-title { font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--faint); }
.insight-value { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; margin: 0.45rem 0 0.55rem; color: #ffffff; }
.insight-card.tone-good .insight-value { color: var(--accent); }
.insight-detail { color: var(--dim); font-size: 0.9rem; line-height: 1.5; }
