/* ============================================================
   Design system - "Lendpay"
   Atualizado em 24/09/2026 a partir do logo real (lendpay.com.br/assets/img/logo.png)
   e do design system gerado no Google Stitch (docs/identidade-visual/).
   O verde primario abaixo (#3d6020) foi extraido por amostragem direta de
   pixel do logo oficial - a versao anterior (#348e38) era uma aproximacao
   que nao batia com a marca real. Toda a rampa de verdes deriva
   matematicamente desse tom (mesmo H/S, variando so a luminosidade), pra
   ficar tudo na mesma familia de cor do logo. Indigo (#150e3d) e as cores
   de status (sucesso/alerta/erro) sao independentes do logo e ficam como
   estavam. Pale, cool-gray canvas com white cards - o hero card em
   gradiente verde-escuro->indigo continua sendo a assinatura visual.
   Mobile-first: toda superficie aqui deve funcionar tanto no telefone
   quanto no eventual app nativo.
   ============================================================ */
/* Inter/Space Grotesk auto-hospedadas em /fonts (so os subsets latin e
   latin-ext, que cobrem os acentos do portugues) - a CSP de producao
   (docker/nginx.conf, endurecida apos o DAST) restringe style-src a 'self',
   entao um @import de fonts.googleapis.com e bloqueado silenciosamente. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/V8mDoQDjQSkFtoMM3T6r8E7mPb94C-s0.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/V8mDoQDjQSkFtoMM3T6r8E7mPbF4Cw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/V8mDoQDjQSkFtoMM3T6r8E7mPb94C-s0.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/V8mDoQDjQSkFtoMM3T6r8E7mPbF4Cw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/V8mDoQDjQSkFtoMM3T6r8E7mPb94C-s0.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/V8mDoQDjQSkFtoMM3T6r8E7mPbF4Cw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f7f9fb;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-hover: #eef3e9;
  --surface-solid: #ffffff;
  --border: rgba(45, 70, 25, 0.1);
  --border-strong: rgba(45, 70, 25, 0.22);

  --text: #0f2419;
  --text-muted: #5b6470;
  --text-faint: #8a93a0;

  --violet: #150e3d;
  --violet-soft: #4a3f82;
  --gold: #3d6020;
  --gold-soft: #63a22f;
  --gold-deep: #253a13;
  --gold-ink: #ffffff;

  --success: #1f8e52;
  --warning: #b45309;
  --danger: #d9363e;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --radius-pill: 999px;

  /* Tiers de sombra (docs/identidade-visual) - difusao suave, nunca sombra dura. */
  --shadow-tier1: 0 4px 20px -2px rgba(15, 36, 25, 0.06), 0 2px 6px -1px rgba(15, 36, 25, 0.03);
  --shadow-tier2: 0 16px 36px -4px rgba(15, 36, 25, 0.12), 0 6px 12px -2px rgba(15, 36, 25, 0.05);
  --shadow-ambient: 0 24px 60px rgba(15, 36, 25, 0.16);
  --shadow-glow-violet: 0 8px 24px rgba(21, 14, 61, 0.22);
  --shadow-glow-gold: 0 10px 24px rgba(61, 96, 32, 0.3);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.6) inset, var(--shadow-tier1);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Bottom-nav height reserved as a scroll-padding safe area on mobile. */
  --bottom-nav-h: 68px;
}

/* ---------- Modo escuro (personalização) ----------
   "system" (padrão, sem JS): segue prefers-color-scheme automaticamente.
   Preferência explícita do cliente (perfil.html) sobrescreve via
   [data-theme] no <html>, aplicado por auth.js antes da primeira pintura
   relevante - :not([data-theme="light"]) evita que o modo automático
   "vaze" por cima de uma escolha explícita de tema claro. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1210;
    --bg-soft: #121a17;
    --surface: #151f1b;
    --surface-hover: #1c2823;
    --surface-solid: #151f1b;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #edf2ef;
    --text-muted: #9ba6a2;
    --text-faint: #707c78;
  }
}

:root[data-theme="dark"] {
  --bg: #0c1210;
  --bg-soft: #121a17;
  --surface: #151f1b;
  --surface-hover: #1c2823;
  --surface-solid: #151f1b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #edf2ef;
  --text-muted: #9ba6a2;
  --text-faint: #707c78;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(55% 45% at 12% -8%, rgba(21, 14, 61, 0.05), transparent 60%),
    radial-gradient(40% 35% at 100% 0%, rgba(61, 96, 32, 0.06), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

h1,
h2,
h3,
.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
}

p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

a {
  color: var(--violet-soft);
  text-decoration: none;
}

::selection {
  background: rgba(61, 96, 32, 0.22);
  color: var(--text);
}

/* ---------- Brand mark ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--gold) 0%, var(--gold) 45%, var(--violet) 130%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-gold);
  flex-shrink: 0;
}

.brand .mark svg {
  width: 18px;
  height: 18px;
  color: var(--gold-ink);
}

.brand .sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  margin-top: 1px;
}

/* ---------- Layout shells ---------- */
.shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 26px 18px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  padding: 14px 12px 4px;
}

.nav-section-label:first-child {
  padding-top: 2px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.sidebar nav a svg {
  width: 17px;
  height: 17px;
  opacity: 0.85;
}

.sidebar nav a:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.sidebar nav a.active {
  background: linear-gradient(90deg, rgba(61, 96, 32, 0.14), rgba(61, 96, 32, 0.02));
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--gold);
}

.sidebar nav a.active svg {
  color: var(--gold-deep);
  opacity: 1;
}

.sidebar .spacer {
  flex: 1;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
}

.user-chip .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #ffffff;
  flex-shrink: 0;
}

.user-chip .info {
  min-width: 0;
  flex: 1;
}

.user-chip .info .email {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip button {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 0;
  text-align: left;
  min-height: auto;
}

.user-chip button:hover {
  color: var(--danger);
}

.main {
  flex: 1;
  min-width: 0;
  padding: clamp(20px, 4vw, 44px);
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  max-width: 1080px;
  width: 100%;
}

.topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.topline .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: block;
}

.topline h1 {
  font-size: clamp(1.5rem, 3.4vw, 1.95rem);
}

.topline p {
  margin-top: 6px;
  font-size: 0.95rem;
}

/* ---------- Mobile top bar (shown < 860px instead of the sidebar) ---------- */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.mobile-topbar .avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--violet));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ---------- Mobile bottom navigation (native-app style) ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}

.bottom-nav .row-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-faint);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  min-width: 56px;
  transition: color 0.15s var(--ease);
}

.bottom-nav a svg {
  width: 21px;
  height: 21px;
}

.bottom-nav a.active {
  color: var(--gold-deep);
}

/* ---------- Item central em destaque no menu inferior (ex.: Pix) ---------- */
.bottom-nav a.featured {
  color: var(--text-muted);
  padding-top: 0;
}

.bottom-nav a.featured .featured-icon {
  width: 46px;
  height: 46px;
  margin-top: -22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--gold), var(--gold-deep));
  color: #fff;
  box-shadow: var(--shadow-glow-gold), 0 0 0 4px var(--bg);
}

.bottom-nav a.featured .featured-icon svg {
  width: 22px;
  height: 22px;
}

.bottom-nav a.featured.active {
  color: var(--gold-deep);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 26px);
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card.interactive {
  cursor: pointer;
}

.card.interactive:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-ambient);
}

.card.interactive:active {
  transform: translateY(0);
}

.card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.card h2 .muted {
  color: var(--text-faint);
  font-weight: 500;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

/* ---------- Premium balance card (bank-card styled) ----------
   Deliberately dark, even though the rest of the theme is light - this
   is the one signature "screen" moment, and it matches the dark green
   app screen shown in Lendpay's own product mockup (lendpay.com.br).
   All text inside re-points the shared --text/--border tokens to their
   light-on-dark equivalents, so every child element (h2, p, .amount,
   .helper, buttons) just works without extra classes. */
.hero-balance {
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.74);
  --text-faint: rgba(255, 255, 255, 0.52);
  --border: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(255, 255, 255, 0.26);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-hover: rgba(255, 255, 255, 0.14);
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, rgba(61, 96, 32, 0.35), transparent 55%),
    linear-gradient(155deg, #1b2c0d, #253a13 55%, #150e3d);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-ambient);
}

.hero-balance::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 90% at 100% 100%, rgba(99, 162, 47, 0.28), transparent 60%);
  pointer-events: none;
}

.hero-balance .amount {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 4px 0 2px;
  position: relative;
  color: var(--text);
}

.hero-balance h2,
.hero-balance p,
.hero-balance .amount {
  position: relative;
}

/* ---------- Balance header row + visibility toggle (home hero card) ---------- */
.balance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.balance-toggle {
  background: var(--surface);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  min-height: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.balance-toggle svg {
  width: 16px;
  height: 16px;
}

.balance-toggle:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.account-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 12px 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  min-height: auto;
}

.copy-chip svg {
  width: 13px;
  height: 13px;
}

.copy-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

/* ---------- Quick actions - linha com scroll horizontal (home) ---------- */
.quick-actions-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 12px;
}

.quick-actions-head h2 {
  font-size: 0.95rem;
}

.quick-actions-head .hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.quick-actions {
  display: flex;
  gap: 12px;
  margin: 0 0 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.quick-actions::-webkit-scrollbar {
  display: none;
}

.qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 14px 8px 4px;
  flex: 0 0 auto;
  width: 84px;
  scroll-snap-align: start;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  transition: transform 0.15s var(--ease-spring);
}

.qa-btn:hover {
  transform: translateY(-2px);
}

.qa-btn:active {
  transform: translateY(0) scale(0.97);
}

.qa-btn .qa-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(61, 96, 32, 0.16), rgba(99, 162, 47, 0.08));
  border: 1px solid var(--border);
  color: var(--gold-deep);
  flex-shrink: 0;
  box-shadow: var(--shadow-tier1);
  transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}

.qa-btn:hover .qa-icon {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow-gold);
}

.qa-btn .qa-icon svg {
  width: 24px;
  height: 24px;
}

/* ---------- Barra de progresso (metas/cofrinhos, orçamento) ----------
   ACHADO nesta revisao: metas.html ja gerava estas classes via JS desde
   antes, mas elas nunca existiram aqui - a barra de progresso das metas e
   do orcamento estava sem estilo nenhum (invisivel). */
.category-bar-track {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transition: width 0.4s var(--ease);
}

/* ---------- Recent-activity list (home) ---------- */
.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-row:first-child {
  padding-top: 0;
}

.activity-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-icon svg {
  width: 17px;
  height: 17px;
}

.activity-icon.credit {
  color: var(--success);
  background: rgba(31, 142, 82, 0.12);
}

.activity-icon.debit {
  color: var(--text-muted);
  background: var(--bg);
}

.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-info .title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-info .sub {
  font-size: 0.76rem;
  color: var(--text-faint);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-value {
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
button,
.btn {
  font-family: var(--font-body);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s var(--ease), filter 0.15s var(--ease),
    background 0.15s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-appearance: none;
}

button.primary,
.btn.primary {
  background: var(--gold);
  color: var(--gold-ink);
  box-shadow: var(--shadow-glow-gold);
}

button.primary:hover,
.btn.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

button.primary:active,
.btn.primary:active {
  transform: translateY(0) scale(0.98);
}

button.accent {
  background: linear-gradient(135deg, var(--violet), var(--violet-soft));
  color: white;
  box-shadow: var(--shadow-glow-violet);
}

button.accent:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

button.secondary:hover {
  background: var(--surface-hover);
}

button.ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  min-height: auto;
}

button.ghost:hover {
  color: var(--text);
}

button.danger {
  background: rgba(217, 54, 62, 0.1);
  color: #b3272e;
  border: 1px solid rgba(217, 54, 62, 0.3);
}

button.danger:hover {
  background: rgba(217, 54, 62, 0.18);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

button.block {
  width: 100%;
  justify-content: center;
}

button.sm {
  padding: 8px 14px;
  min-height: 36px;
  font-size: 0.82rem;
}

/* ---------- Forms ---------- */
label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 14px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

label:first-child {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  min-height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.94rem;
  font-family: var(--font-body);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(61, 96, 32, 0.16);
}

input::placeholder {
  color: var(--text-faint);
}

.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
  min-width: 160px;
}

.helper {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill.ok {
  background: rgba(31, 142, 82, 0.12);
  color: var(--success);
}

.pill.warn {
  background: rgba(180, 83, 9, 0.12);
  color: var(--warning);
}

.pill.err {
  background: rgba(217, 54, 62, 0.12);
  color: var(--danger);
}

.pill.muted {
  background: var(--bg);
  color: var(--text-faint);
}

.pill.info {
  background: rgba(21, 14, 61, 0.1);
  color: var(--violet-soft);
}

.pill.sm-pill {
  font-size: 0.62rem;
  padding: 2px 8px;
}

.pill.sm-pill::before {
  display: none;
}

/* ---------- Avatar circular com inicial (linhas de tabela, listas) ---------- */
.row-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--violet));
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* ---------- Tables (responsive: scroll horizontally, never overflow the page) ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 0 calc(-1 * clamp(18px, 3vw, 26px));
  padding: 0 clamp(18px, 3vw, 26px);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody tr {
  transition: background 0.15s var(--ease);
}

tbody tr:hover {
  background: var(--bg);
}

td.amount-credit {
  color: var(--success);
  font-weight: 600;
}

td.amount-debit {
  color: var(--text);
  font-weight: 600;
}

.empty-state {
  color: var(--text-faint);
  text-align: center;
  padding: 46px 20px;
  font-size: 0.9rem;
}

/* ---------- Auth pages (centered card over gradient blobs) ---------- */
.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
}

.auth-shell::before {
  width: 480px;
  height: 480px;
  background: rgba(21, 14, 61, 0.14);
  top: -140px;
  left: -120px;
}

.auth-shell::after {
  width: 420px;
  height: 420px;
  background: rgba(61, 96, 32, 0.14);
  bottom: -160px;
  right: -100px;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 5vw, 36px) clamp(22px, 5vw, 32px);
  box-shadow: var(--shadow-tier2);
  backdrop-filter: blur(24px);
  animation: card-in 0.4s var(--ease);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card .brand {
  justify-content: center;
  margin-bottom: 22px;
}

.auth-card h1 {
  font-size: 1.35rem;
  text-align: center;
  margin-bottom: 6px;
}

.auth-card p.lead {
  text-align: center;
  font-size: 0.86rem;
  margin-bottom: 24px;
}

.auth-card .switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}

/* ---------- Auth shell: fundo em gradiente + selo + card de boas-vindas ---------- */
.auth-shell.auth-shell-tinted {
  background: radial-gradient(120% 100% at 50% 0%, rgba(99, 162, 47, 0.16), transparent 60%),
    linear-gradient(180deg, #eef6ea 0%, var(--bg) 55%);
}

.auth-badge-pill {
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: rgba(61, 96, 32, 0.1);
  color: var(--gold-deep);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-badge-pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 6px;
}

.auth-welcome-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 20px 0;
}

.auth-welcome-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(61, 96, 32, 0.14);
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-welcome-card .icon svg {
  width: 20px;
  height: 20px;
}

.auth-welcome-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.auth-welcome-card p {
  font-size: 0.8rem;
  line-height: 1.4;
}

.auth-cta-card {
  margin-top: 26px;
  text-align: center;
  background: linear-gradient(180deg, rgba(61, 96, 32, 0.08), rgba(61, 96, 32, 0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px clamp(18px, 5vw, 26px);
}

.auth-cta-card .icon-badge {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-cta-card .icon-badge svg {
  width: 22px;
  height: 22px;
}

.auth-cta-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.auth-cta-card p {
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.auth-trust-footer {
  max-width: 400px;
  margin: 18px auto 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.auth-trust-footer strong {
  color: var(--text-muted);
}

.auth-trust-footer .links {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.auth-trust-footer .links a {
  color: var(--text-faint);
  font-weight: 600;
}

/* ---------- Toggle switch (preferências, "lembrar-me") ---------- */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  min-height: 0;
}

.toggle-switch .slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.toggle-switch .slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.toggle-switch input:checked + .slider {
  background: var(--gold);
}

.toggle-switch input:checked + .slider::before {
  transform: translateX(18px);
}

.qr-frame {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0;
}

.qr-frame img {
  width: 190px;
  height: 190px;
  display: block;
}

.otp-input {
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  font-family: var(--font-display);
}

/* ---------- OTP em 6 caixas separadas (MFA) ---------- */
.otp-cells {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.otp-cells input {
  width: 46px;
  height: 56px;
  padding: 0;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  font-family: var(--font-display);
}

/* ---------- Login corporativo: painel duplo (marca + formulario) ---------- */
.auth-shell-split {
  align-items: center;
}

.auth-split-card {
  display: flex;
  width: 100%;
  max-width: 880px;
  min-height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-tier2);
  position: relative;
  z-index: 1;
  background: var(--surface-solid);
}

.auth-split-info {
  flex: 0 0 40%;
  padding: clamp(28px, 4vw, 40px);
  background: radial-gradient(120% 140% at 0% 0%, rgba(61, 96, 32, 0.35), transparent 55%),
    linear-gradient(155deg, #1b2c0d, #253a13 55%, #150e3d);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.auth-split-info .eyebrow {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  display: block;
}

.auth-split-info h1 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.auth-split-info p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  margin-bottom: 22px;
}

.auth-split-facts {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-split-facts .fact {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.auth-split-facts .fact svg {
  width: 16px;
  height: 16px;
  color: var(--gold-soft);
  flex-shrink: 0;
}

.auth-split-form {
  flex: 1;
  padding: clamp(28px, 4vw, 40px);
  overflow-y: auto;
}

@media (max-width: 760px) {
  .auth-split-card {
    flex-direction: column;
    min-height: 0;
  }
  .auth-split-info {
    flex: none;
  }
}

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  max-width: calc(100vw - 32px);
}

.toast {
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  max-width: 340px;
  box-shadow: var(--shadow-tier2);
  font-size: 0.88rem;
  animation: toast-in 0.25s var(--ease);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast.err {
  border-color: rgba(217, 54, 62, 0.5);
}

.toast.ok {
  border-color: rgba(31, 142, 82, 0.5);
}

/* ---------- Modal (used for forced password change, confirmations) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 15, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 5vw, 30px);
  box-shadow: var(--shadow-tier2);
  animation: card-in 0.3s var(--ease);
}

/* ---------- Misc ---------- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
  border: none;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-tier1);
  display: block;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}

a.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-tier2);
  border-color: var(--border-strong);
  border-left-color: var(--gold);
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text);
  font-feature-settings: "tnum" on, "zero" on;
}

.stat-card .label {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Recent-activity feed (Visão geral) ---------- */
.activity-feed {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-when {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.activity-what {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, var(--surface-hover) 37%, var(--bg) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  width: fit-content;
  margin-bottom: 22px;
  overflow-x: auto;
  max-width: 100%;
}

.tabs a,
.tabs button {
  padding: 8px 16px;
  min-height: auto;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  white-space: nowrap;
}

.tabs a.active,
.tabs button.active {
  background: var(--gold);
  color: var(--gold-ink);
}

/* ---------- Responsive breakpoints ---------- */
@media (max-width: 860px) {
  .sidebar {
    display: none;
  }
  .mobile-topbar {
    display: flex;
  }
  .bottom-nav {
    display: block;
  }
  .main {
    padding: 18px 16px calc(var(--bottom-nav-h) + 24px + env(safe-area-inset-bottom, 0px));
    max-width: 100%;
  }
  .card {
    padding: 18px;
  }
  .row > * {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
