/* =====================================================================
   Nexo Aurora — camada visual premium
   Carregada depois de styles.css. Define a linguagem final do produto:
   vidro, cápsulas, números grandes, profundidade e movimento curto.
   Tokens ficam no topo; os dois temas redefinem apenas os tokens.
   ===================================================================== */

:root {
  --solid:#0F0D17; --on-solid:#FFFFFF;           /* inverso: aba/menu ativo */
  --hairline:rgba(24,18,52,.075);
  --hairline-strong:rgba(24,18,52,.14);
  --surface:rgba(255,255,255,.80);
  --surface-hover:rgba(255,255,255,.96);
  --surface-sunk:rgba(24,18,52,.045);
  --field-bg:rgba(255,255,255,.92);
  --dock-bg:rgba(255,255,255,.66);
  --hero-a:#8656FF; --hero-b:#5B2CE6; --hero-c:#3A1AA6;
  --bg:#F4F3F9;
  --bg-glow-a:rgba(118,76,255,.20); --bg-glow-b:rgba(70,140,255,.14); --bg-glow-c:rgba(255,150,200,.10);
  --r-card:28px; --r-inner:20px; --r-pill:999px;
  --shadow-soft:0 1px 2px rgba(26,18,60,.04),0 14px 32px -18px rgba(26,18,60,.20);
  --shadow-float:0 2px 6px rgba(26,18,60,.05),0 30px 60px -28px rgba(26,18,60,.34);
  --shadow-hero:0 2px 6px rgba(40,16,120,.18),0 40px 80px -30px rgba(70,30,190,.62);
  --ring-good:#2DBE7F; --ring-mid:#F5A524; --ring-low:#F0566A;
}
:root[data-theme="dark"] {
  --solid:#F4F2FA; --on-solid:#0B0A12;
  --hairline:rgba(255,255,255,.085);
  --hairline-strong:rgba(255,255,255,.16);
  --surface:rgba(255,255,255,.045);
  --surface-hover:rgba(255,255,255,.075);
  --surface-sunk:rgba(255,255,255,.05);
  --field-bg:rgba(255,255,255,.06);
  --dock-bg:rgba(24,21,36,.72);
  --hero-a:#7F54FF; --hero-b:#4E24D6; --hero-c:#2A1285;
  --bg:#07060C;
  --bg-glow-a:rgba(120,80,255,.26); --bg-glow-b:rgba(60,130,255,.15); --bg-glow-c:rgba(255,120,190,.07);
  --shadow-soft:0 1px 2px rgba(0,0,0,.5),0 14px 32px -18px rgba(0,0,0,.7);
  --shadow-float:0 2px 6px rgba(0,0,0,.5),0 30px 60px -28px rgba(0,0,0,.85);
  --shadow-hero:0 2px 6px rgba(0,0,0,.4),0 40px 80px -30px rgba(90,50,240,.55);
  --ring-good:#3DDC97; --ring-mid:#FFB94D; --ring-low:#FF6B81;
}

/* ---------- Fundo ---------- */
body:before {
  background:
    radial-gradient(1100px 620px at 8% -10%,var(--bg-glow-a),transparent 62%),
    radial-gradient(900px 560px at 96% 2%,var(--bg-glow-b),transparent 60%),
    radial-gradient(800px 520px at 60% 108%,var(--bg-glow-c),transparent 62%);
}

/* ---------- Correções de contraste do tema escuro ---------- */
.auth-story { background:linear-gradient(160deg,#1B1038 0%,#2C1672 46%,#4B27B8 100%); color:#fff; position:relative; overflow:hidden; isolation:isolate; }
.auth-story:before { content:''; position:absolute; z-index:-1; inset:-20% -30% auto auto; width:640px; height:640px; border-radius:50%; background:radial-gradient(circle,rgba(160,120,255,.55),transparent 64%); filter:blur(8px); }
.auth-story:after { content:''; position:absolute; z-index:-1; left:-120px; bottom:-160px; width:520px; height:520px; border-radius:50%; background:radial-gradient(circle,rgba(70,140,255,.36),transparent 66%); }
.auth-story h1 { color:#fff; font-weight:700; letter-spacing:-.045em; }
.auth-story .eyebrow { color:#CDBBFF; }
.auth-story p,.auth-note { color:rgba(255,255,255,.78); }
.auth-story>small { color:rgba(255,255,255,.55); }
.auth-story .brand { color:#fff; }
.auth-side { background:transparent; }
.auth-side form { border:1px solid var(--hairline); border-radius:32px; background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:var(--shadow-float); padding:38px; }
.auth-side .field input { background:var(--field-bg); color:var(--ink); border-color:var(--hairline-strong); }
.auth-side .field input::placeholder,.field input::placeholder,.field textarea::placeholder { color:var(--tertiary); opacity:1; }
.auth-side form>.button { min-height:54px; }
.loan-tab.active,.mobile-nav-more.active { background:var(--solid); color:var(--on-solid); }
.calendar-cell.selected { background:var(--solid); color:var(--on-solid); }

@media (min-width:651px) {
/* ---------- Casca: barra lateral flutuante ---------- */
.sidebar {
  inset:14px auto 14px 14px; width:246px; padding:20px 12px 14px;
  border:1px solid var(--hairline); border-radius:30px;
  background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  box-shadow:var(--shadow-soft);
}
.app { margin-left:274px; }
.brand { padding:0 10px 6px; }
.workspace { margin:14px 2px 6px; padding:11px 12px; border:1px solid var(--hairline); border-radius:var(--r-inner); background:var(--surface-sunk); box-shadow:none; }
.nav-label { margin:20px 12px 7px; font-size:11px; letter-spacing:.14em; color:var(--tertiary); }
.nav-item { min-height:46px; padding:0 14px; border-radius:16px; color:var(--secondary); font-weight:600; transition:background-color .2s var(--ease-standard),color .2s var(--ease-standard),transform .2s var(--ease-standard); }
.nav-item:hover { background:var(--surface-sunk); color:var(--ink); transform:none; }
.nav-item.active,.nav-item.active:hover { background:var(--solid); color:var(--on-solid); box-shadow:0 8px 20px -10px rgba(15,13,23,.55); }
.nav-item.active .icon { background:transparent; color:inherit; }
.nav-item .icon { width:19px; height:19px; stroke-width:1.7; }
.profile { border:1px solid var(--hairline); border-radius:var(--r-inner); background:var(--surface-sunk); }

/* ---------- Casca: barra superior ---------- */
header { height:80px; padding:0 40px; border:0; background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:none; }
.breadcrumb { font-size:13px; color:var(--tertiary); }
.breadcrumb strong { color:var(--ink); font-weight:600; }
.header-right { padding:5px; gap:6px; border:1px solid var(--hairline); border-radius:var(--r-pill); background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:var(--shadow-soft); }
.header-right .button { min-height:40px; padding:0 16px; border-color:transparent; background:var(--surface-sunk); box-shadow:none; }
.header-right .icon-button { width:40px; height:40px; border-color:transparent; background:transparent; color:var(--secondary); }
.header-right .icon-button:hover { background:var(--surface-sunk); color:var(--ink); }
.header-right .avatar.small { box-shadow:0 0 0 2px var(--hairline-strong); }
.theme-toggle { border:0; background:var(--surface-sunk); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }

/* ---------- Cabeçalho de página ---------- */
main { padding:6px 40px 40px; max-width:1560px; }
.page-heading { margin-bottom:28px; }
.page-heading h1 { font:700 clamp(34px,3.1vw,46px)/1.04 var(--font-display); letter-spacing:-.035em; }
.page-heading .eyebrow { margin-bottom:10px; font-size:11px; letter-spacing:.16em; color:var(--brand); }
.page-heading .subtitle { margin-top:10px; font-size:16px; color:var(--secondary); }

}

/* ---------- Superfícies ---------- */
.panel,.metric,.loan-kpi,.detail-grid {
  border:1px solid var(--hairline); border-radius:var(--r-card);
  background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur);
  box-shadow:var(--shadow-soft);
}
.panel { border-color:var(--hairline); }
.panel-head { padding:26px 28px 0; }
.panel h2 { font:650 20px/1.25 var(--font-display); letter-spacing:-.02em; }

/* ---------- Botões ---------- */
.button { min-height:46px; padding:0 20px; border:1px solid var(--hairline-strong); border-radius:var(--r-pill); background:var(--surface); color:var(--ink); font-weight:600; box-shadow:none; backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); }
.button:hover { background:var(--surface-hover); border-color:var(--hairline-strong); transform:translateY(-1px); }
.button.primary { border-color:transparent; color:#fff; background:linear-gradient(135deg,var(--hero-a),var(--hero-b)); box-shadow:0 12px 28px -12px rgba(94,46,235,.75),inset 0 1px 0 rgba(255,255,255,.28); }
.button.primary:hover { background:linear-gradient(135deg,#9468FF,#6A3BF2); box-shadow:0 16px 34px -12px rgba(94,46,235,.85),inset 0 1px 0 rgba(255,255,255,.3); }
.button:active { transform:translateY(0) scale(.985); }
.button.danger { color:#fff; }
.text-button { color:var(--brand); font-weight:650; }

/* ---------- Campos ---------- */
.field input,.field select,.field textarea,.search,.period { min-height:50px; padding:0 16px; border:1px solid var(--hairline-strong); border-radius:16px; background:var(--field-bg); color:var(--ink); }
.field textarea { padding:14px 16px; }
.field input:focus,.field select:focus,.field textarea:focus,.search:focus { outline:0; border-color:var(--brand); box-shadow:0 0 0 4px var(--focus); }

/* ---------- Selo ---------- */
.badge { border-radius:var(--r-pill); font-weight:650; letter-spacing:.01em; }

/* ---------- Tabelas ---------- */
table { border-collapse:separate; border-spacing:0; }
th { font-size:11px; letter-spacing:.12em; color:var(--tertiary); background:transparent; border-bottom:1px solid var(--hairline); }
td { border-bottom:1px solid var(--hairline); }
tbody tr { transition:background-color .18s var(--ease-standard); }
tbody tr:hover { background:var(--surface-sunk); }
tbody tr:last-child td { border-bottom:0; }

/* ---------- Diálogos ---------- */
dialog#modal { border:1px solid var(--hairline-strong); border-radius:32px; background:var(--paper); color:var(--ink); box-shadow:var(--shadow-float); }
dialog#modal::backdrop { background:rgba(8,6,16,.55); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }

/* ---------- Abas e segmentos ---------- */
.loan-tabs { padding:4px; border:1px solid var(--hairline); border-radius:var(--r-pill); background:var(--surface-sunk); }
.loan-tab { border-radius:var(--r-pill); color:var(--secondary); font-weight:650; transition:background-color .2s var(--ease-standard),color .2s var(--ease-standard); }
.loan-tool { border-radius:var(--r-pill); border-color:var(--hairline-strong); background:var(--surface); }

/* =====================================================================
   Visão geral
   ===================================================================== */
.overview-alert { margin:0 0 22px; padding:12px 14px 12px 12px; border-radius:var(--r-pill); gap:14px; }
.overview-alert-mark { width:42px; height:42px; border-radius:50%; }
.overview-alert>a { min-height:42px; padding:0 18px; border-radius:var(--r-pill); }

.overview-hero { grid-template-columns:minmax(0,1.75fr) minmax(300px,.8fr); gap:20px; margin:0 0 20px; align-items:stretch; }

/* Cartão principal: gradiente de marca com vidro e anéis */
.overview-hero .overview-balance {
  min-height:372px; padding:38px 42px 34px; border:1px solid rgba(255,255,255,.22); border-radius:36px;
  background:
    radial-gradient(560px 340px at 88% -6%,rgba(255,255,255,.34),transparent 62%),
    radial-gradient(460px 320px at -4% 112%,rgba(60,170,255,.42),transparent 64%),
    linear-gradient(142deg,var(--hero-a) 0%,var(--hero-b) 52%,var(--hero-c) 100%);
  box-shadow:var(--shadow-hero),inset 0 1px 0 rgba(255,255,255,.34),inset 0 -1px 0 rgba(0,0,0,.12);
  justify-content:space-between; gap:0;
}
.overview-hero .overview-balance:before { background:radial-gradient(380px 380px at 78% 18%,rgba(255,255,255,.14),transparent 70%); animation:hero-drift 18s ease-in-out infinite alternate; }
.overview-hero .overview-balance:after { top:-150px; right:-110px; width:380px; height:380px; border-color:rgba(255,255,255,.20); box-shadow:0 0 0 30px rgba(255,255,255,.05),0 0 0 66px rgba(255,255,255,.035),0 0 0 108px rgba(255,255,255,.02); }
.overview-balance-label { color:rgba(255,255,255,.80); font-size:12px; letter-spacing:.14em; }
.overview-wallet-mark { background:rgba(255,255,255,.18); color:#fff; border:1px solid rgba(255,255,255,.26); border-radius:50%; width:40px; height:40px; display:grid; place-items:center; }
.overview-hero .overview-balance>strong { margin:20px 0 10px; font:700 clamp(46px,5.7vw,86px)/.98 var(--font-display); letter-spacing:-.045em; text-shadow:0 4px 30px rgba(20,6,80,.35); }
.overview-hero .overview-balance>p { color:rgba(255,255,255,.78); font-size:15px; }
.overview-hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; }
.hero-pill { display:inline-flex; align-items:center; gap:9px; min-height:46px; padding:0 20px; border:1px solid rgba(255,255,255,.26); border-radius:var(--r-pill); background:rgba(255,255,255,.14); color:#fff; font:600 14px var(--font-ui); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); transition:background-color .2s var(--ease-standard),transform .2s var(--ease-standard),box-shadow .2s var(--ease-standard); }
.hero-pill .icon { width:17px; height:17px; }
.hero-pill:hover { background:rgba(255,255,255,.24); transform:translateY(-2px); }
.hero-pill.primary { border-color:#fff; background:#fff; color:#2A1285; box-shadow:0 12px 28px -12px rgba(10,0,60,.6); }
.hero-pill.primary:hover { background:#F3EEFF; }
.overview-hero .overview-allocation { margin-top:30px; padding-top:20px; border-top:1px solid rgba(255,255,255,.2); }
.overview-hero .overview-allocation-head { color:rgba(255,255,255,.9); }
.overview-hero .overview-allocation-head>a { color:#fff; opacity:.85; }
.overview-hero .overview-allocation-track { height:12px; background:rgba(255,255,255,.16); box-shadow:none; }
.overview-hero .overview-allocation-track .cash { background:#6BF0B2; }
.overview-hero .overview-allocation-track .principal { background:rgba(255,255,255,.92); }
.overview-hero .overview-allocation-legend { color:rgba(255,255,255,.78); }
.overview-hero .overview-allocation-legend i { background:#6BF0B2; }
.overview-hero .overview-allocation-legend i.principal { background:#fff; }

/* Saúde: anel grande, copy curta, sem texto técnico */
.overview-health-wrap { display:flex; }
.overview-health-card {
  flex:1; flex-direction:column; flex-wrap:nowrap; align-items:center; justify-content:center; gap:26px; padding:34px 28px; text-align:center;
  border:1px solid var(--hairline); border-radius:36px; background:var(--surface);
  backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:var(--shadow-soft);
}
.health-ring-wrap { position:relative; display:grid; place-items:center; }
.health-ring-wrap:before { content:''; position:absolute; inset:-14px; border-radius:50%; background:radial-gradient(circle,var(--ring-glow,rgba(45,190,127,.22)),transparent 68%); pointer-events:none; }
.overview-health-card.health-medium { --ring-glow:rgba(245,165,36,.24); }
.overview-health-card.health-low { --ring-glow:rgba(240,86,106,.24); }
.overview-health-card.health-unavailable { --ring-glow:transparent; }
.overview-health-card .health-gauge { width:184px; height:184px; filter:none; }
.overview-health-card .health-gauge circle { stroke-width:6.5; }
.overview-health-card .health-gauge-track { stroke:var(--surface-sunk); }
.overview-health-card .health-gauge.health-good .health-gauge-value { stroke:var(--ring-good); }
.overview-health-card .health-gauge.health-medium .health-gauge-value { stroke:var(--ring-mid); }
.overview-health-card .health-gauge.health-low .health-gauge-value { stroke:var(--ring-low); }
.overview-health-card .health-gauge-copy strong { font:700 52px/1 var(--font-display); letter-spacing:-.04em; color:var(--ink); }
.overview-health-card .health-gauge-copy small { margin-top:6px; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--tertiary); }
.health-copy .eyebrow { margin:0 0 8px; font-size:11px; letter-spacing:.16em; color:var(--tertiary); }
.overview-health-card .health-copy h2 { margin:0 0 6px; font:700 26px/1.1 var(--font-display); letter-spacing:-.03em; }
.overview-health-card.health-good .health-copy h2 { color:var(--ring-good); }
.overview-health-card.health-medium .health-copy h2 { color:var(--ring-mid); }
.overview-health-card.health-low .health-copy h2 { color:var(--ring-low); }
.overview-health-card .health-copy p:not(.eyebrow) { max-width:240px; margin:0 auto; font-size:14px; line-height:1.5; color:var(--secondary); }
.pill-link { display:inline-flex; align-items:center; gap:6px; min-height:42px; margin-top:18px; padding:0 18px; border:1px solid var(--hairline-strong); border-radius:var(--r-pill); background:var(--surface-sunk); color:var(--ink); font-size:13px; font-weight:650; transition:background-color .2s var(--ease-standard),transform .2s var(--ease-standard); }
.pill-link:hover { background:var(--surface-hover); transform:translateY(-1px); }
.pill-link .icon { width:15px; height:15px; }

/* Indicadores: faixa única, sem caixas repetidas */
.overview-kpi-strip { gap:0; margin:0 0 22px; padding:8px; border:1px solid var(--hairline); border-radius:32px; background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:var(--shadow-soft); }
.overview-kpi { min-height:138px; padding:22px 24px; border:0; border-radius:24px; background:transparent; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; transition:background-color .22s var(--ease-standard); }
.overview-kpi:hover { background:var(--surface-sunk); transform:none; }
.overview-kpi+.overview-kpi:before { content:''; position:absolute; left:0; top:24px; bottom:24px; width:1px; background:var(--hairline); }
.overview-kpi-label { font-size:13px; font-weight:600; color:var(--secondary); }
.overview-kpi-mark { top:20px; right:20px; width:38px; height:38px; border-radius:50%; }
.overview-kpi>strong { margin-top:8px; font:700 clamp(26px,2.4vw,36px)/1.08 var(--font-display); letter-spacing:-.035em; }
.overview-kpi>small { font-size:13px; color:var(--tertiary); }

/* ---------- Movimento ---------- */
@keyframes rise { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
@keyframes hero-drift { from { transform:translate3d(-14px,8px,0) scale(1); } to { transform:translate3d(16px,-10px,0) scale(1.08); } }
@keyframes ring-sweep { from { stroke-dashoffset:var(--ring-length); } }
@keyframes bar-grow { from { transform:scaleY(0); } to { transform:scaleY(1); } }
main.stagger>* { animation:rise .7s var(--ease-out) both; }
main.stagger>*:nth-child(2) { animation-delay:60ms; }
main.stagger>*:nth-child(3) { animation-delay:120ms; }
main.stagger>*:nth-child(4) { animation-delay:180ms; }
main.stagger>*:nth-child(5) { animation-delay:240ms; }
main.stagger>*:nth-child(n+6) { animation-delay:300ms; }
.overview-health-card .health-gauge-value { animation:ring-sweep 1.4s var(--ease-out) both; transition:none; }
.counting { font-variant-numeric:tabular-nums; }
.overview-hero,.overview-kpi { animation:none; }
@media (prefers-reduced-motion:reduce) {
  main.stagger>*,.overview-hero .overview-balance:before,.overview-health-card .health-gauge-value { animation:none !important; }
}

/* ---------- Gráficos: barras planas em cápsula, sem faces 3D ---------- */
@keyframes overview-bar-enter { from { transform:scaleY(.04); opacity:.35; } to { transform:scaleY(1); opacity:1; } }
.overview-analytics-grid,.overview-focus-grid,.overview-support-grid { gap:20px; margin-bottom:22px; }
.overview-chart-plot { height:200px; }
.overview-chart-grid>i { height:0; background:none; border-top:1px dashed var(--hairline-strong); opacity:.7; }
.overview-month-column.current:before { inset:0 2px 22px; border-radius:20px; background:var(--surface-sunk); }
.overview-month-bars { perspective:none; gap:5px; }
.overview-bar { width:min(36%,16px); border-radius:var(--r-pill); transform-origin:center bottom; }
.overview-bar:before,.overview-bar:after { display:none; }
.overview-bar.lent { background:linear-gradient(180deg,#A486FF,var(--hero-b)); }
.overview-bar.received { background:linear-gradient(180deg,#7BF0B8,#1FB878); }
.overview-bar.interest { width:min(46%,22px); background:linear-gradient(180deg,#FFD27A,#F29A1A); }
.overview-month-column:hover .overview-bar { filter:brightness(1.1) saturate(1.1); }
.overview-month-column.current .overview-bar { filter:none; box-shadow:0 8px 20px -8px rgba(109,59,245,.55); }
.overview-month-column>small { color:var(--tertiary); font-size:12px; font-weight:600; }

.overview-week-chart { gap:10px; padding:26px 28px 14px; }
.overview-week-day { grid-template-rows:18px 150px auto auto; gap:8px; }
.overview-week-track { width:min(100%,44px); height:150px; border-radius:var(--r-pill); background:var(--surface-sunk); }
.overview-week-track>span { border-radius:var(--r-pill); background:linear-gradient(180deg,#A486FF,var(--hero-b)); }
.overview-week-day.today .overview-week-track>span { background:linear-gradient(180deg,#FFD27A,#F29A1A); }
.overview-week-value { color:var(--secondary); font-weight:650; }

/* ---------- Listas e linhas ---------- */
.overview-support-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; }
.overview-support-grid>.overview-contracts { grid-column:1/-1; }
@media (max-width:900px) { .overview-support-grid { grid-template-columns:1fr; } }
.overview-priority-row,.overview-guarantee-row { border-radius:18px; transition:background-color .18s var(--ease-standard); }
.overview-priority-row:hover,.overview-guarantee-row:hover { background:var(--surface-sunk); }
.overview-section-head { padding:26px 28px 0; }
.overview-reminders .reminder-item { border:1px solid var(--hairline); border-radius:22px; background:var(--surface-sunk); }
.overview-chart-empty,.overview-week-empty { border-radius:24px; background:var(--surface-sunk); }


/* =====================================================================
   Mobile (≤650px): cabeçalho compacto, dock de vidro e cartões empilhados
   ===================================================================== */
@media (max-width:650px) {
  body:before { background:radial-gradient(700px 420px at 0% -6%,var(--bg-glow-a),transparent 62%),radial-gradient(600px 400px at 100% 0%,var(--bg-glow-b),transparent 60%); }
  .app>header { height:auto; padding:10px 16px 6px; gap:8px; }
  .header-right { padding:3px; gap:2px; }
  .header-right .icon-button,.header-right .theme-toggle { width:40px; height:40px; }
  /* Tema em um único botão: mostra o ícone do tema para o qual se vai trocar. */
  .theme-toggle { display:grid; grid-template-columns:1fr; padding:0; border-radius:50%; background:transparent; }
  .theme-toggle:before { display:none; }
  .theme-toggle button { width:40px; height:40px; border-radius:50%; color:var(--secondary); }
  .theme-toggle button[aria-pressed="true"] { display:none; }
  main { padding:6px 16px 120px; }
  .page-heading h1 { font-size:clamp(30px,9vw,38px); }

  .overview-alert { border-radius:26px; grid-template-columns:42px minmax(0,1fr); }
  .overview-alert>a { grid-column:1/-1; justify-content:center; }
  .overview-hero { grid-template-columns:1fr; gap:14px; }
  .overview-hero .overview-balance { min-height:0; padding:26px 24px 24px; border-radius:30px; }
  .overview-hero .overview-balance>strong { font-size:clamp(40px,12.4vw,56px); margin:16px 0 8px; }
  .overview-hero-actions { gap:8px; margin-top:22px; }
  .hero-pill { min-height:44px; padding:0 15px; font-size:13px; }
  .overview-hero-actions .hero-pill:nth-child(n+3) { display:none; }
  .overview-hero .overview-allocation { margin-top:22px; }
  .overview-health-card { flex-direction:row; text-align:left; gap:18px; padding:22px; border-radius:30px; }
  .overview-health-card .health-gauge { width:112px; height:112px; }
  .overview-health-card .health-gauge-copy strong { font-size:34px; }
  .overview-health-card .health-copy h2 { font-size:22px; }
  .overview-health-card .health-copy p:not(.eyebrow) { margin:0; font-size:13px; }
  .pill-link { margin-top:12px; min-height:38px; }
  .overview-kpi-strip { grid-template-columns:repeat(2,minmax(0,1fr)); padding:6px; border-radius:28px; }
  .overview-kpi { min-height:118px; padding:16px 16px; }
  .overview-kpi+.overview-kpi:before { display:none; }
  .overview-kpi>strong { font-size:clamp(20px,6vw,26px); }
  .overview-kpi-mark { top:14px; right:12px; width:32px; height:32px; }
  .overview-analytics-grid,.overview-focus-grid,.overview-support-grid { grid-template-columns:1fr; gap:14px; margin-bottom:14px; }
  .overview-chart-plot { height:170px; }
  .overview-week-chart { gap:6px; padding:20px 14px 10px; }
  .overview-week-day { grid-template-rows:18px 110px auto auto; }
  .overview-week-track { height:110px; width:min(100%,34px); }
  .panel,.metric { border-radius:26px; }
  .overview-section-head,.panel-head { padding:22px 20px 0; }

  /* Dock flutuante de vidro, legível nos dois temas */
  .mobile-nav { border:1px solid var(--hairline-strong); background:var(--dock-bg); box-shadow:var(--shadow-float),inset 0 1px 0 rgba(255,255,255,.12); }
  .mobile-nav:before { background:var(--surface-sunk); box-shadow:none; }
  .mobile-nav-item { color:var(--secondary); }
  .mobile-nav-item.active,.mobile-nav-item[aria-current="page"] { color:var(--brand); }
  .mobile-nav-action { border:1px solid rgba(255,255,255,.4); background:linear-gradient(135deg,var(--hero-a),var(--hero-b)); box-shadow:0 12px 26px -8px rgba(94,46,235,.7); }
}

/* =====================================================================
   Calendário: dias em quadrados arredondados
   ===================================================================== */
.calendar-grid { gap:8px; padding:8px 10px 14px; }
.calendar-weekdays { padding:0 10px; gap:8px; }
.calendar-weekdays span { font-size:11px; letter-spacing:.12em; color:var(--tertiary); }
.calendar-cell { min-height:104px; border:1px solid var(--hairline); border-radius:22px; background:var(--surface-sunk); color:var(--secondary); transition:background-color .2s var(--ease-standard),transform .2s var(--ease-standard),box-shadow .2s var(--ease-standard); }
.calendar-cell.blank { background:transparent; border-color:transparent; }
.calendar-cell.has-events { background:var(--surface-hover); border-color:var(--hairline-strong); }
.calendar-cell.has-events:hover { transform:translateY(-2px); box-shadow:var(--shadow-soft); background:var(--surface-hover); color:var(--ink); }
.calendar-cell.has-events:hover small,.calendar-cell.has-events:hover strong { color:var(--secondary); }
.calendar-cell.selected,.calendar-cell.selected:hover { background:linear-gradient(140deg,var(--hero-a),var(--hero-b)); border-color:transparent; color:#fff; box-shadow:0 18px 34px -16px rgba(94,46,235,.75),inset 0 1px 0 rgba(255,255,255,.3); transform:none; }
.calendar-cell.selected small,.calendar-cell.selected strong { color:rgba(255,255,255,.86); }
.calendar-cell.today span { background:var(--solid); color:var(--on-solid); }
.calendar-cell.selected.today span { background:rgba(255,255,255,.22); color:#fff; }
.calendar-cell strong { color:var(--ink); font-size:13px; }
.calendar-payment { border-radius:20px; }
@media (max-width:650px) {
  .calendar-grid,.calendar-weekdays { gap:4px; padding-left:6px; padding-right:6px; }
  .calendar-cell { min-height:54px; border-radius:16px; padding:6px; align-items:center; }
}

/* ---------- Ajustes finos ---------- */
.loan-table-panel { background:var(--surface); border:1px solid var(--hairline); border-radius:var(--r-card); box-shadow:var(--shadow-soft); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); }
.loan-table-panel th,.loan-table-panel td { padding-left:14px; padding-right:14px; }
.loan-table-panel th:first-child,.loan-table-panel td:first-child { padding-left:24px; }
.loan-table-panel th:last-child,.loan-table-panel td:last-child { padding-right:22px; }
.loan-table-panel .button,.loan-table-panel .row-action { min-height:40px; padding:0 16px; }
@media (max-width:650px) {
  header .header-right [data-action="global-search"],.header-right [data-action="global-search"] { border:1px solid var(--hairline-strong); border-radius:var(--r-pill); background:var(--surface-sunk); color:var(--ink); box-shadow:none; }
  .calendar-grid,.calendar-weekdays { grid-template-columns:repeat(7,minmax(0,1fr)); }
  .calendar-cell { min-width:0; padding:4px; }
}

/* Admin: mesma casca de vidro, sem as cores fixas antigas */
body[data-role="admin"] .sidebar { background:var(--surface); border-color:var(--hairline); }
body[data-role="admin"] .workspace { background:var(--surface-sunk); border-color:var(--hairline); }
body[data-role="admin"] .workspace-icon { background:var(--brand-soft); color:var(--brand); }
body[data-role="admin"] .nav-item.active,body[data-role="admin"] .nav-item.active:hover { background:var(--solid); color:var(--on-solid); box-shadow:0 8px 20px -10px rgba(15,13,23,.55); }

/* =====================================================================
   Biblioteca de componentes das telas (x-*)
   ===================================================================== */
.x-card { position:relative; min-width:0; padding:26px 28px; border:1px solid var(--hairline); border-radius:var(--r-card); background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:var(--shadow-soft); transition:border-color .2s var(--ease-standard),box-shadow .25s var(--ease-standard),transform .25s var(--ease-out); }
.x-grid { display:grid; gap:20px; margin-bottom:22px; align-items:start; }
.x-grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.x-grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.x-grid-aside { grid-template-columns:minmax(0,1.6fr) minmax(300px,.8fr); }
.x-grid.tight { gap:22px; margin:0; }
main>.x-card,main>.x-stat-strip,main>.x-toolbar,main>.x-month-nav,main>.x-note,#x-exp-body>.x-stat-strip,#x-exp-body>.x-note { margin-bottom:22px; }
.x-title { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.x-title h2 { margin:0 0 4px; font:650 20px/1.25 var(--font-display); letter-spacing:-.02em; }
.x-title h3 { margin:0; font:650 16px var(--font-display); }
.x-title p { margin:0; font-size:14px; color:var(--secondary); }
.x-title.sub { margin:26px 0 10px; }
.x-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.x-actions.wrap { gap:10px; }
.x-eyebrow { margin:0 0 8px; font-size:11px; font-weight:700; letter-spacing:.16em; color:var(--tertiary); }
.x-lead { margin:0; font-size:17px; line-height:1.55; color:var(--secondary); max-width:560px; }
.x-muted { color:var(--tertiary); font-size:14px; margin:0; }
.x-note { margin:0; font-size:14px; color:var(--secondary); }
.x-note strong { color:var(--ink); }
.x-warning { display:flex; gap:10px; align-items:flex-start; margin:16px 0 0; padding:12px 14px; border-radius:16px; background:var(--warning-soft); color:var(--ink); font-size:13px; line-height:1.5; }
.x-warning .icon { flex:0 0 18px; width:18px; height:18px; color:var(--warning); margin-top:2px; }

/* Chips e barras */
.x-chip { display:inline-flex; align-items:center; gap:6px; min-height:28px; padding:0 12px; border-radius:var(--r-pill); font-size:12px; font-weight:650; white-space:nowrap; background:var(--surface-sunk); color:var(--secondary); }
.x-chip.good { background:var(--success-soft); color:var(--green); }
.x-chip.warn { background:var(--warning-soft); color:var(--warning); }
.x-chip.bad { background:var(--danger-soft); color:var(--red); }
.x-chip.info { background:var(--brand-soft); color:var(--brand); }
.x-bar { height:10px; overflow:hidden; border-radius:var(--r-pill); background:var(--surface-sunk); }
.x-bar>span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#A486FF,var(--hero-b)); transform-origin:left; animation:allocation-fill .9s var(--ease-out) both; }
.x-bar.good>span { background:linear-gradient(90deg,#7BF0B8,#1FB878); }
.x-bar.warn>span { background:linear-gradient(90deg,#FFD27A,#F29A1A); }
.x-bar.bad>span { background:linear-gradient(90deg,#FF9CAA,#E8445C); }

/* Segmentos */
.x-seg { display:inline-flex; gap:2px; padding:4px; border:1px solid var(--hairline); border-radius:var(--r-pill); background:var(--surface-sunk); max-width:100%; overflow-x:auto; scrollbar-width:none; }
.x-seg::-webkit-scrollbar { display:none; }
.x-seg button { display:inline-flex; align-items:center; gap:6px; min-height:38px; padding:0 16px; border:0; border-radius:var(--r-pill); background:transparent; color:var(--secondary); font:600 14px var(--font-ui); white-space:nowrap; transition:background-color .2s var(--ease-standard),color .2s var(--ease-standard),box-shadow .2s var(--ease-standard); }
.x-seg button:hover { color:var(--ink); }
.x-seg button.active { background:var(--solid); color:var(--on-solid); box-shadow:0 6px 16px -8px rgba(15,13,23,.6); }
.x-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; }
.x-toolbar.flat { margin:0 0 18px; justify-content:flex-start; }
.x-toolbar-fields { display:flex; flex-wrap:wrap; gap:10px; }
.x-select,.x-search { min-height:46px; padding:0 16px; border:1px solid var(--hairline-strong); border-radius:var(--r-pill); background:var(--field-bg); color:var(--ink); font:500 14px var(--font-ui); }
.x-search { min-width:220px; }
.x-range { margin:-6px 0 18px; }

/* Indicadores em faixa */
.x-stat-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:8px; border:1px solid var(--hairline); border-radius:32px; background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:var(--shadow-soft); }
.x-stat { position:relative; display:grid; align-content:start; gap:4px; min-width:0; padding:20px 24px; border-radius:24px; transition:background-color .22s var(--ease-standard); }
.x-stat:hover { background:var(--surface-sunk); }
.x-stat+.x-stat:before { content:''; position:absolute; left:0; top:22px; bottom:22px; width:1px; background:var(--hairline); }
.x-stat-label { font-size:13px; font-weight:600; color:var(--secondary); }
.x-stat>strong { overflow:hidden; text-overflow:clip; white-space:nowrap; font:700 clamp(22px,2vw,31px)/1.1 var(--font-display); letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.x-stat>small { font-size:13px; color:var(--tertiary); }
.x-stat.pos>strong { color:var(--green); }
.x-stat.neg>strong { color:var(--red); }

/* Anel */
.x-ring { --ring-c:var(--brand); position:relative; display:grid; place-items:center; flex:0 0 auto; }
.x-ring.good { --ring-c:var(--ring-good); } .x-ring.warn { --ring-c:var(--ring-mid); } .x-ring.bad { --ring-c:var(--ring-low); } .x-ring.muted { --ring-c:var(--tertiary); }
.x-ring svg { display:block; width:100%; height:100%; transform:rotate(-90deg); }
.x-ring circle { fill:none; }
.x-ring-track { stroke:var(--surface-sunk); }
.x-ring-value { stroke:var(--ring-c); stroke-linecap:round; animation:ring-sweep 1.4s var(--ease-out) both; filter:drop-shadow(0 0 8px color-mix(in srgb,var(--ring-c) 45%,transparent)); }
.x-ring-copy { position:absolute; inset:0; display:grid; align-content:center; justify-items:center; text-align:center; }
.x-ring-copy strong { font:700 clamp(36px,4vw,54px)/1 var(--font-display); letter-spacing:-.04em; }
.x-ring-copy small { margin-top:6px; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--tertiary); }

/* Estado vazio */
.x-empty { display:grid; justify-items:center; gap:8px; padding:34px 20px; text-align:center; border-radius:24px; background:var(--surface-sunk); }
.x-empty-mark { display:grid; place-items:center; width:52px; height:52px; border-radius:50%; background:var(--brand-soft); color:var(--brand); }
.x-empty-mark .icon { width:24px; height:24px; }
.x-empty strong { font:650 17px var(--font-display); }
.x-empty p { margin:0; max-width:340px; font-size:14px; color:var(--secondary); }
.x-empty .button { margin-top:8px; }

/* Saúde */
.x-health-hero { display:grid; grid-template-columns:auto minmax(0,1fr); gap:34px; align-items:center; padding:36px 40px; margin-bottom:22px; border-radius:36px; overflow:hidden; isolation:isolate; }
.x-health-hero:before { content:''; position:absolute; z-index:-1; inset:-40% -10% auto auto; width:520px; height:520px; border-radius:50%; background:radial-gradient(circle,var(--hero-glow,rgba(45,190,127,.18)),transparent 68%); }
.x-health-hero.medium { --hero-glow:rgba(245,165,36,.20); } .x-health-hero.low { --hero-glow:rgba(240,86,106,.20); } .x-health-hero.unavailable { --hero-glow:rgba(120,120,140,.12); }
.x-health-copy h2 { margin:0 0 10px; font:700 clamp(34px,3.6vw,50px)/1.02 var(--font-display); letter-spacing:-.04em; }
.x-health-hero.good h2 { color:var(--ring-good); } .x-health-hero.medium h2 { color:var(--ring-mid); } .x-health-hero.low h2 { color:var(--ring-low); }
.x-potential { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:16px; font-size:14px; color:var(--secondary); }
.x-scale { grid-column:1/-1; padding-top:6px; }
.x-scale-track { position:relative; display:grid; grid-template-columns:50fr 25fr 25fr; gap:4px; height:12px; }
.x-scale-track i { display:block; border-radius:var(--r-pill); opacity:.85; }
.x-scale-track i.bad { background:linear-gradient(90deg,#FF9CAA,#E8445C); } .x-scale-track i.warn { background:linear-gradient(90deg,#FFD27A,#F29A1A); } .x-scale-track i.good { background:linear-gradient(90deg,#7BF0B8,#1FB878); }
.x-scale-marker { position:absolute; top:50%; width:0; height:0; }
.x-scale-marker b { position:absolute; left:0; top:0; transform:translate(-50%,-50%); display:grid; place-items:center; min-width:34px; height:34px; padding:0 8px; border:3px solid var(--paper); border-radius:var(--r-pill); background:var(--solid); color:var(--on-solid); font:700 13px var(--font-ui); box-shadow:var(--shadow-float); }
.x-scale-labels { display:grid; grid-template-columns:50fr 25fr 25fr; gap:4px; margin-top:12px; font-size:13px; font-weight:600; color:var(--secondary); }
.x-scale-labels small { display:block; font-weight:500; color:var(--tertiary); }
.x-factor { display:grid; gap:14px; align-content:start; }
.x-factor-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.x-factor-head h3 { margin:0; font:650 16px var(--font-display); }
.x-factor-value { font:700 clamp(34px,3.4vw,46px)/1 var(--font-display); letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.x-factor-meaning { margin:0; font-size:14px; line-height:1.5; color:var(--secondary); }
.x-factor-block { padding:14px 16px; border-radius:18px; background:var(--surface-sunk); }
.x-factor-block small { display:block; margin-bottom:4px; font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--tertiary); }
.x-factor-block p { margin:0; font-size:14px; line-height:1.5; }
.x-factor-block.tip { background:var(--brand-soft); }
.x-factor-block.tip small { color:var(--brand); }
.x-factor .pill-link { margin-top:2px; justify-self:start; }
.x-steps { display:grid; gap:12px; margin:0; padding:0; list-style:none; }
.x-steps li { display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:14px; align-items:center; padding:14px 16px; border-radius:20px; background:var(--surface-sunk); }
.x-step-n { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:var(--solid); color:var(--on-solid); font:700 14px var(--font-ui); }
.x-steps strong { display:block; font-size:15px; }
.x-steps p { margin:2px 0 0; font-size:13px; line-height:1.45; color:var(--secondary); }
.x-steps .pill-link,.x-check .pill-link { margin:0; min-height:38px; white-space:nowrap; }
.x-signals { display:grid; gap:12px; }
.x-signal { display:block; padding:16px 18px; border-radius:20px; background:var(--surface-sunk); border:1px solid transparent; transition:transform .2s var(--ease-out),border-color .2s var(--ease-standard); }
.x-signal:hover { transform:translateY(-2px); border-color:var(--hairline-strong); }
.x-signal-top { display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:14px; font-weight:650; }
.x-signal-top b { font:700 24px var(--font-display); letter-spacing:-.03em; }
.x-signal.good .x-signal-top b { color:var(--green); } .x-signal.warn .x-signal-top b { color:var(--warning); } .x-signal.bad .x-signal-top b { color:var(--red); }
.x-signal p { margin:6px 0 4px; font-size:14px; line-height:1.5; }
.x-signal small { font-size:13px; color:var(--tertiary); }

/* Fechamento e relatórios */
.x-month-nav { display:flex; align-items:center; flex-wrap:wrap; gap:14px; }
.x-month-nav>div { min-width:170px; text-align:center; }
.x-month-nav strong { display:block; font:700 22px var(--font-display); letter-spacing:-.02em; }
.x-month-nav strong:first-letter { text-transform:uppercase; }
.x-month-nav small { color:var(--tertiary); font-size:13px; }
.x-round { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--hairline-strong); border-radius:50%; background:var(--surface); color:var(--ink); transition:background-color .2s,transform .2s var(--ease-out); }
.x-round:hover:not(:disabled) { background:var(--surface-hover); transform:scale(1.06); }
.x-round:disabled { opacity:.35; cursor:default; }
.x-flow { display:grid; }
.x-flow-row { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:13px 0; border-bottom:1px dashed var(--hairline-strong); font-size:15px; }
.x-flow-row b { font-variant-numeric:tabular-nums; }
.x-flow-row.in b { color:var(--green); } .x-flow-row.out b { color:var(--secondary); }
.x-flow-row.total { margin-top:6px; padding:16px 18px; border:0; border-radius:20px; background:var(--surface-sunk); font-weight:650; }
.x-flow-row.total b { font:700 24px var(--font-display); letter-spacing:-.03em; }
.neg { color:var(--red) !important; } .pos { color:var(--green); }
.x-result { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin-bottom:18px; }
.x-result>strong { font:700 clamp(36px,4vw,54px)/1 var(--font-display); letter-spacing:-.045em; font-variant-numeric:tabular-nums; }
.x-stack { display:flex; height:14px; overflow:hidden; border-radius:var(--r-pill); background:var(--surface-sunk); }
.x-stack .a { background:linear-gradient(90deg,#7BF0B8,#1FB878); } .x-stack .b { background:linear-gradient(90deg,#A486FF,var(--hero-b)); }
.x-legend { display:flex; flex-wrap:wrap; gap:8px 22px; margin-top:12px; font-size:13px; color:var(--secondary); }
.x-legend span { display:inline-flex; align-items:center; gap:8px; }
.x-legend i { width:10px; height:10px; border-radius:50%; background:var(--brand); }
.x-legend i.a,.x-legend i.recv { background:#1FB878; } .x-legend i.b,.x-legend i.lent { background:var(--hero-b); } .x-legend i.exp { background:#F29A1A; }
.x-legend b { color:var(--ink); }
.x-mini-stats,.x-mini-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:20px; }
.x-mini-grid { margin-top:0; } .x-mini-grid.four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.x-mini-stats>div,.x-mini-grid>div { display:grid; gap:4px; align-content:start; padding:14px 16px; border-radius:18px; background:var(--surface-sunk); }
.x-mini-stats small,.x-mini-grid small { font-size:12px; color:var(--tertiary); }
.x-mini-stats b,.x-mini-grid b { font:700 18px var(--font-display); letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.x-rank { display:grid; gap:14px; }
.x-rank-row { display:grid; gap:8px; width:100%; padding:0; border:0; background:transparent; text-align:left; color:inherit; font:inherit; }
.x-rank-row>div { display:flex; justify-content:space-between; gap:12px; font-size:14px; }
.x-rank-row b { font-variant-numeric:tabular-nums; } .x-rank-row small { color:var(--tertiary); font-weight:500; }
.x-rank-row.clickable { padding:8px 10px; margin:-8px -10px; border-radius:16px; cursor:pointer; transition:background-color .18s; }
.x-rank-row.clickable:hover,.x-rank-row.clickable.active { background:var(--surface-sunk); }
.x-list { display:grid; gap:4px; }
.x-list-row { display:flex; justify-content:space-between; align-items:center; gap:14px; width:100%; padding:12px 14px; border:0; border-radius:16px; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; transition:background-color .18s; }
.x-list-row:hover { background:var(--surface-sunk); }
.x-list-row strong { display:block; font-size:15px; } .x-list-row small { color:var(--tertiary); font-size:13px; } .x-list-row b { font-variant-numeric:tabular-nums; }
.x-check { display:grid; gap:10px; margin:0; padding:0; list-style:none; }
.x-check li { display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:14px; align-items:center; padding:12px 14px; border-radius:18px; background:var(--surface-sunk); }
.x-check-mark { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; }
.x-check li.ok .x-check-mark { background:var(--success-soft); color:var(--green); } .x-check li.todo .x-check-mark { background:var(--warning-soft); color:var(--warning); }
.x-check-mark .icon { width:18px; height:18px; }
.x-check strong { display:block; font-size:15px; } .x-check small { color:var(--secondary); font-size:13px; line-height:1.4; }
.x-close-action { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px; margin-bottom:22px; background:linear-gradient(135deg,var(--brand-soft),var(--surface)); }
.x-close-action h2 { margin:0 0 4px; font:650 20px var(--font-display); } .x-close-action p { margin:0; font-size:14px; color:var(--secondary); max-width:520px; }
.x-table { overflow-x:auto; }
.x-table table { min-width:0; width:100%; }
.x-table th,.x-table td { padding-left:12px; padding-right:12px; }
.x-table th:first-child,.x-table td:first-child { padding-left:4px; }
.x-table th:last-child,.x-table td:last-child { padding-right:4px; }
.x-table th.n,.x-table td.n { text-align:right; }
.x-table td small { display:block; color:var(--tertiary); font-size:12px; }
.x-table tr[data-x-month-row] { cursor:pointer; }
.x-spark { width:120px; height:10px; border-radius:var(--r-pill); background:var(--surface-sunk); overflow:hidden; }
.x-spark span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7BF0B8,#1FB878); } .x-spark span.neg { background:linear-gradient(90deg,#FF9CAA,#E8445C); }
.x-bars { display:flex; align-items:flex-end; gap:8px; height:210px; padding:6px 2px 0; }
.x-bars-col { flex:1; display:grid; grid-template-rows:minmax(0,1fr) 24px; height:100%; min-width:0; text-align:center; border-radius:16px; }
.x-bars-col.current { background:var(--surface-sunk); }
.x-bars-set { display:flex; align-items:flex-end; justify-content:center; gap:3px; min-height:0; padding:0 3px; }
.x-bars-set i { width:min(32%,12px); min-height:2px; border-radius:var(--r-pill); transform-origin:bottom; animation:overview-bar-enter .8s var(--ease-out) both; }
.x-bars-set i.lent { background:linear-gradient(180deg,#A486FF,var(--hero-b)); } .x-bars-set i.recv { background:linear-gradient(180deg,#7BF0B8,#1FB878); } .x-bars-set i.exp { background:linear-gradient(180deg,#FFD27A,#F29A1A); }
.x-bars-col small { align-self:end; font-size:11px; font-weight:600; color:var(--tertiary); text-transform:capitalize; }
.x-group h3 { margin:0 0 14px; font:650 15px var(--font-display); }
.x-group .x-rank-row { margin-bottom:12px; }

/* Caixa */
.x-capital { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px; margin-bottom:22px; }
.x-capital h2 { margin:0 0 4px; font:650 20px var(--font-display); } .x-capital p { margin:0; max-width:560px; font-size:14px; color:var(--secondary); }
.x-sumline { display:flex; flex-wrap:wrap; gap:8px 24px; margin-bottom:14px; font-size:14px; color:var(--secondary); }
.x-sumline b { color:var(--ink); } .x-sumline .pos b { color:var(--green); } .x-sumline .neg b { color:var(--red); }
.x-ledger { display:grid; gap:2px; }
.x-ledger-row { display:grid; grid-template-columns:44px minmax(0,1fr) 92px 170px; gap:16px; align-items:center; padding:12px 14px; border-radius:18px; transition:background-color .18s; }
.x-ledger-row:hover { background:var(--surface-sunk); }
.x-ledger-mark { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--success-soft); color:var(--green); }
.x-ledger-row.out .x-ledger-mark { background:var(--surface-sunk); color:var(--secondary); }
.x-ledger-mark .icon { width:19px; height:19px; }
.x-ledger-main strong,.x-ledger-date strong { display:block; font-size:15px; } .x-ledger-main small,.x-ledger-date small,.x-ledger-amount small { display:block; font-size:13px; color:var(--tertiary); }
.x-ledger-amount { text-align:right; } .x-ledger-amount b { font:700 17px var(--font-display); font-variant-numeric:tabular-nums; }
.x-ledger-row.in .x-ledger-amount b { color:var(--green); }

/* Responsivo das telas novas */
@media (max-width:1180px) { .x-grid-3 { grid-template-columns:1fr; } .x-grid-aside { grid-template-columns:1fr; } .x-stat-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } .x-stat:nth-child(3):before { display:none; } }
@media (max-width:900px) { .x-grid-2 { grid-template-columns:1fr; } .x-health-hero { grid-template-columns:1fr; justify-items:center; text-align:center; } .x-health-copy .x-lead { margin-inline:auto; } .x-potential { justify-content:center; } }
@media (max-width:650px) {
  .x-card { padding:22px 20px; border-radius:26px; }
  .x-stat-strip { border-radius:28px; } .x-stat { padding:16px; } .x-stat+.x-stat:before { display:none; }
  .x-title { flex-direction:column; align-items:stretch; }
  .x-mini-stats,.x-mini-grid,.x-mini-grid.four { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .x-ledger-row { grid-template-columns:40px minmax(0,1fr) auto; gap:12px; } .x-ledger-date { display:none; } .x-ledger-mark { width:40px; height:40px; }
  .x-steps li,.x-check li { grid-template-columns:36px minmax(0,1fr); } .x-steps .pill-link,.x-check .pill-link { grid-column:1/-1; justify-self:start; }
  .x-health-hero { padding:28px 22px; }
  .x-scale-labels { font-size:12px; }
  .x-toolbar { align-items:stretch; } .x-toolbar-fields { width:100%; } .x-toolbar-fields>* { flex:1 1 100%; } .x-search { min-width:0; width:100%; }
  .x-bars { height:170px; gap:4px; }
  .x-month-nav>div { min-width:0; flex:1; }
}
@media (prefers-reduced-motion:reduce) { .x-bar>span,.x-ring-value,.x-bars-set i { animation:none !important; } }

/* =====================================================================
   Clientes, garantias e simulador
   ===================================================================== */
.x-round.sm { width:38px; height:38px; }
.x-round.sm .icon { width:16px; height:16px; }
.initials.lg { width:64px; height:64px; font-size:22px; flex:0 0 64px; }
.x-clients { padding:10px 12px 12px; }
.x-clients-head,.x-client { display:grid; grid-template-columns:minmax(220px,1.7fr) 150px 120px 130px 150px 92px; gap:16px; align-items:center; }
.x-clients-head { padding:12px 16px 10px; font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--tertiary); }
.x-client { padding:14px 16px; border-radius:22px; cursor:pointer; transition:background-color .18s var(--ease-standard),transform .2s var(--ease-out); }
.x-client:hover,.x-client:focus-visible { background:var(--surface-sunk); outline:0; }
.x-client+.x-client { border-top:1px solid var(--hairline); border-top-left-radius:0; border-top-right-radius:0; }
.x-client-id { display:flex; align-items:center; gap:14px; min-width:0; }
.x-client-id>div { min-width:0; } .x-client-id strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; }
.x-client-id small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; color:var(--tertiary); }
.x-client-status { display:grid; justify-items:start; gap:4px; } .x-client-status small { font-size:12px; font-weight:600; }
.x-client-cell small { display:none; font-size:11px; color:var(--tertiary); } .x-client-cell b { font-size:15px; font-variant-numeric:tabular-nums; }
.x-punct { display:flex; align-items:center; gap:10px; } .x-punct .x-bar { flex:1; height:8px; } .x-punct b { font-size:13px; min-width:38px; text-align:right; }
.x-client-actions { display:flex; justify-content:flex-end; gap:8px; }
.x-list-end { display:grid; justify-items:end; gap:4px; }
.x-sheet { display:grid; gap:18px; }
.x-sheet-top { display:flex; gap:18px; align-items:center; }
.x-sheet-chips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.x-sheet-info { display:flex; flex-wrap:wrap; gap:6px 18px; font-size:14px; color:var(--secondary); }
.x-sheet-info span { display:inline-flex; align-items:center; gap:7px; } .x-sheet-info .icon { width:15px; height:15px; color:var(--tertiary); }
.x-sheet .section-title { margin:6px 0 -4px; font:650 16px var(--font-display); }
.x-sheet-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:6px; }
.x-guar-mini { display:flex; flex-wrap:wrap; gap:8px; }
.x-guar-chip { display:inline-flex; align-items:center; gap:8px; min-height:34px; padding:0 14px; border-radius:var(--r-pill); font-size:13px; font-weight:600; background:var(--cat-bg); color:var(--cat-fg); }
.x-guar-chip .icon { width:15px; height:15px; }

/* Garantias */
.cat-property { --cat-fg:#7C4DFF; --cat-bg:rgba(124,77,255,.14); } .cat-vehicle { --cat-fg:#3B82F6; --cat-bg:rgba(59,130,246,.14); } .cat-electronics { --cat-fg:#0EA5A4; --cat-bg:rgba(14,165,164,.14); }
.cat-phone { --cat-fg:#0891B2; --cat-bg:rgba(8,145,178,.14); } .cat-jewelry { --cat-fg:#DB2777; --cat-bg:rgba(219,39,119,.14); } .cat-equipment { --cat-fg:#D97706; --cat-bg:rgba(217,119,6,.15); } .cat-other { --cat-fg:#6B7280; --cat-bg:rgba(107,114,128,.16); }
:root[data-theme="dark"] .cat-property { --cat-fg:#B79CFF; } :root[data-theme="dark"] .cat-vehicle { --cat-fg:#7DB1FF; } :root[data-theme="dark"] .cat-electronics { --cat-fg:#4FD9D6; } :root[data-theme="dark"] .cat-phone { --cat-fg:#4FC8E6; } :root[data-theme="dark"] .cat-jewelry { --cat-fg:#FF7EB6; } :root[data-theme="dark"] .cat-equipment { --cat-fg:#FFB84D; } :root[data-theme="dark"] .cat-other { --cat-fg:#B6BAC5; }
.x-seg-icons button { display:inline-flex; align-items:center; gap:8px; } .x-seg-icons .icon { width:16px; height:16px; } .x-seg small,.x-seg-icons small { opacity:.6; font-weight:600; }
.x-guar-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(310px,1fr)); gap:16px; }
.x-guar { display:grid; gap:14px; padding:20px; border:1px solid var(--hairline); border-radius:26px; background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:var(--shadow-soft); cursor:pointer; transition:transform .25s var(--ease-out),box-shadow .25s var(--ease-standard),border-color .2s; }
.x-guar:hover,.x-guar:focus-visible { transform:translateY(-3px); box-shadow:var(--shadow-float); border-color:var(--hairline-strong); outline:0; }
.x-guar-top { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:14px; align-items:center; }
.x-guar-top strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; } .x-guar-top small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; color:var(--tertiary); }
.x-guar-icon { display:grid; place-items:center; width:48px; height:48px; border-radius:16px; background:var(--cat-bg); color:var(--cat-fg); }
.x-guar-icon .icon { width:22px; height:22px; }
.x-guar-values { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.x-guar-values>div { padding:10px 12px; border-radius:14px; background:var(--surface-sunk); } .x-guar-values small { display:block; font-size:11px; color:var(--tertiary); } .x-guar-values b { font:700 16px var(--font-display); font-variant-numeric:tabular-nums; }
.x-guar-cover { display:grid; gap:6px; } .x-guar-cover small,.x-guar-id { font-size:12px; color:var(--tertiary); }

/* Simulador */
.x-sim { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr); gap:20px; align-items:start; }
.x-sim-inputs { display:grid; gap:26px; padding:32px; }
.x-sim-field { display:grid; gap:12px; } .x-sim-field>label { font:650 16px var(--font-display); }
.x-money { display:flex; align-items:center; gap:10px; min-height:68px; padding:0 20px; border:1px solid var(--hairline-strong); border-radius:22px; background:var(--field-bg); transition:border-color .2s,box-shadow .2s; }
.x-money:focus-within { border-color:var(--brand); box-shadow:0 0 0 4px var(--focus); }
.x-money span { font:600 20px var(--font-display); color:var(--tertiary); }
.x-money input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--ink); font:700 30px var(--font-display); letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.x-stepper { display:grid; grid-template-columns:64px minmax(0,1fr) 64px; align-items:center; min-height:68px; border:1px solid var(--hairline-strong); border-radius:22px; background:var(--field-bg); overflow:hidden; }
.x-stepper button { height:100%; border:0; background:transparent; color:var(--ink); font:500 28px var(--font-ui); transition:background-color .18s; } .x-stepper button:hover { background:var(--surface-sunk); }
.x-stepper input { width:100%; border:0; outline:0; background:transparent; color:var(--ink); text-align:center; font:700 30px var(--font-display); font-variant-numeric:tabular-nums; -moz-appearance:textfield; }
.x-stepper input::-webkit-outer-spin-button,.x-stepper input::-webkit-inner-spin-button,.x-money input::-webkit-outer-spin-button,.x-money input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.x-rate { display:grid; gap:12px; } .x-quick { display:flex; flex-wrap:wrap; gap:8px; }
.x-quick button { min-height:40px; padding:0 18px; border:1px solid var(--hairline-strong); border-radius:var(--r-pill); background:var(--surface-sunk); color:var(--ink); font:600 14px var(--font-ui); transition:background-color .18s,transform .18s var(--ease-out); } .x-quick button:hover { background:var(--brand-soft); color:var(--brand); transform:translateY(-1px); }
.x-sim-advanced { border-radius:20px; background:var(--surface-sunk); padding:4px 18px; } .x-sim-advanced summary { padding:14px 0; font-weight:650; cursor:pointer; } .x-sim-advanced[open] summary { margin-bottom:6px; } .x-sim-advanced .form-grid { padding-bottom:16px; }
.x-sim-result { position:sticky; top:96px; display:grid; gap:14px; padding:32px; background:linear-gradient(150deg,var(--brand-soft),var(--surface) 70%); }
.x-sim-big { font:700 clamp(44px,5vw,64px)/1 var(--font-display); letter-spacing:-.045em; font-variant-numeric:tabular-nums; }
.x-sim-sum { display:grid; margin-top:6px; } .x-sim-sum>div { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px dashed var(--hairline-strong); font-size:15px; } .x-sim-sum b { font-variant-numeric:tabular-nums; }
.x-sim-sum .total { margin-top:8px; padding:16px 18px; border:0; border-radius:20px; background:var(--surface-sunk); font-weight:650; } .x-sim-sum .total b { font:700 24px var(--font-display); letter-spacing:-.03em; }
.x-sim-schedule summary { cursor:pointer; font-weight:650; padding:6px 0; color:var(--brand); } .x-sim-cta { width:100%; min-height:54px; }
@media (max-width:1180px) { .x-clients-head { display:none; } .x-client { grid-template-columns:minmax(0,1fr) auto; gap:10px 16px; } .x-client-cell { display:grid; grid-template-columns:auto 1fr; gap:8px; align-items:center; } .x-client-cell small { display:inline; } .x-client-actions { grid-column:2; grid-row:1; } .x-client-status { grid-column:1; } .x-client-cell { grid-column:1/-1; } .x-sim { grid-template-columns:1fr; } .x-sim-result { position:static; } .x-sim { grid-template-columns:minmax(0,1fr); } }
@media (max-width:650px) { .x-sim-inputs,.x-sim-result { padding:24px 20px; } .x-money input,.x-stepper input { font-size:26px; } .x-guar-grid { grid-template-columns:1fr; } .x-sheet-top { flex-direction:column; align-items:flex-start; } }

.x-seg-icons { flex-wrap:wrap; overflow:visible; border-radius:26px; }
.x-guar-cover { grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; }

/* =====================================================================
   Selos e contrato: legíveis nos dois temas
   ===================================================================== */
.badge { min-height:28px; padding:0 12px; font-size:12px; font-weight:700; letter-spacing:.01em; background:var(--surface-sunk); color:var(--secondary); }
.badge:before { width:7px; height:7px; background:currentColor; }
.badge.open { background:var(--success-soft); color:var(--green); }
.badge.late { background:var(--danger-soft); color:var(--red); }
.badge.paid { background:var(--brand-soft); color:var(--brand); }
.modal-body>.panel-head { flex-wrap:wrap; gap:12px 16px; padding:0 0 18px; align-items:center; }
.modal-body>.panel-head>p { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin:0; font:650 15px var(--font-ui); color:var(--secondary); }
.modal-body>.panel-head .actions { gap:8px; flex-wrap:wrap; }
.modal-body .detail-grid { gap:14px 22px; padding:20px 22px; border:1px solid var(--hairline); border-radius:24px; background:var(--surface-sunk); backdrop-filter:none; box-shadow:none; }
.modal-body .detail-grid small { font-size:12px; color:var(--tertiary); }
.modal-body .detail-grid strong { font:700 17px var(--font-display); letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.installment-scroll { max-height:none !important; overflow-x:auto; border:1px solid var(--hairline); border-radius:22px; }
.installment-scroll table { width:100%; }
.installment-scroll th { position:static; background:transparent; }
.installment-scroll td { vertical-align:middle; }
.loan-guarantee-note { display:grid; gap:4px; padding:16px 18px; border:1px solid var(--hairline); border-radius:20px; background:var(--brand-soft); color:var(--ink); }
.loan-guarantee-note strong { font-size:15px; } .loan-guarantee-note span { font-size:13px; color:var(--secondary); }
.payment-record { border-radius:20px; background:var(--surface-sunk); border:1px solid var(--hairline); }
.modal-body h3,.modal-body .section-title { font:650 16px var(--font-display); letter-spacing:-.01em; }

/* =====================================================================
   Cobranças, WhatsApp, Configurações e Planos
   ===================================================================== */
.button.sm { min-height:38px; padding:0 16px; font-size:13px; }
.button.ghost { border-color:transparent; background:transparent; }
.has-avatar .profile .avatar,.has-avatar header .avatar.small,.has-avatar .mobile-welcome-avatar,.has-avatar .mobile-welcome .avatar { background-image:var(--avatar-url); background-size:cover; background-position:center; color:transparent !important; border-color:var(--hairline-strong); }

/* Régua */
.x-rule { margin-bottom:22px; }
.x-rule-switch { display:flex; align-items:center; gap:12px; font-size:14px; font-weight:650; color:var(--secondary); }
.x-switch { position:relative; width:56px; height:32px; padding:0; border:0; border-radius:var(--r-pill); background:var(--hairline-strong); transition:background-color .25s var(--ease-standard); }
.x-switch i { position:absolute; top:3px; left:3px; width:26px; height:26px; border-radius:50%; background:#fff; box-shadow:0 2px 6px rgba(0,0,0,.3); transition:transform .3s var(--ease-out); }
.x-switch.on { background:linear-gradient(135deg,var(--hero-a),var(--hero-b)); } .x-switch.on i { transform:translateX(24px); }
.x-rule-steps { position:relative; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin:0 0 18px; padding:0; list-style:none; }
.x-rule-steps li { position:relative; display:grid; gap:8px; align-content:start; padding:16px; border-radius:20px; background:var(--surface-sunk); border:1px solid transparent; transition:border-color .2s,background-color .2s; }
.x-rule-steps li.has { border-color:var(--brand); background:var(--brand-soft); }
.x-rule-dot { width:12px; height:12px; border-radius:50%; background:var(--hairline-strong); }
.x-rule-steps li.has .x-rule-dot { background:var(--brand); box-shadow:0 0 0 5px color-mix(in srgb,var(--brand) 22%,transparent); }
.x-rule-steps strong { font-size:15px; display:block; } .x-rule-steps small { font-size:13px; color:var(--secondary); line-height:1.4; }
.x-rule-note { display:flex; gap:12px; align-items:flex-start; padding:14px 16px; margin-bottom:16px; border-radius:18px; background:var(--success-soft); }
.x-rule-note.off { background:var(--warning-soft); }
.x-rule-note>span { flex:0 0 22px; color:var(--green); } .x-rule-note.off>span { color:var(--warning); } .x-rule-note .icon { width:20px; height:20px; }
.x-rule-note p { margin:0; font-size:14px; line-height:1.55; }
.x-collect-section { margin-bottom:22px; }
.x-collect-list { display:grid; gap:10px; }
.x-collect { display:grid; grid-template-columns:minmax(200px,1.2fr) minmax(130px,.8fr) minmax(140px,.7fr) auto; gap:16px; align-items:center; padding:14px 16px; border:1px solid var(--hairline); border-radius:22px; background:var(--surface-sunk); transition:transform .22s var(--ease-out),border-color .2s; }
.x-collect:hover { transform:translateY(-2px); border-color:var(--hairline-strong); }
.x-collect.late { border-left:4px solid var(--red); }
.x-collect-id { display:flex; align-items:center; gap:14px; min-width:0; } .x-collect-id strong { display:block; font-size:15px; } .x-collect-id small,.x-collect-when small,.x-collect-amount small { display:block; font-size:13px; color:var(--tertiary); }
.x-collect-when { display:grid; justify-items:start; gap:4px; }
.x-collect-amount b { font:700 20px var(--font-display); letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.x-collect-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.x-fold summary { display:flex; align-items:center; justify-content:space-between; gap:16px; list-style:none; cursor:pointer; } .x-fold summary::-webkit-details-marker { display:none; }
.x-fold summary strong { display:block; font:650 18px var(--font-display); } .x-fold summary small { color:var(--secondary); font-size:14px; }
.x-fold summary>.icon { width:20px; height:20px; transition:transform .25s var(--ease-out); } .x-fold[open] summary>.icon { transform:rotate(90deg); } .x-fold[open] summary { margin-bottom:16px; }
.x-list-row.static { cursor:default; align-items:flex-start; } .x-list-row.static:hover { background:transparent; }

/* WhatsApp */
.x-form-card { display:grid; gap:20px; }
.x-presets,.x-vars { display:flex; flex-wrap:wrap; align-items:center; gap:8px; } .x-presets>span,.x-vars>span { margin-right:6px; font-size:13px; font-weight:600; color:var(--tertiary); }
.x-quick-btn,.x-var { min-height:36px; padding:0 16px; border:1px solid var(--hairline-strong); border-radius:var(--r-pill); background:var(--surface-sunk); color:var(--ink); font:600 13px var(--font-ui); transition:background-color .18s,color .18s,transform .18s var(--ease-out); }
.x-var { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; }
.x-quick-btn:hover,.x-var:hover { background:var(--brand-soft); color:var(--brand); transform:translateY(-1px); }
.x-wa { padding:20px; border-radius:24px; background:linear-gradient(160deg,#E9F5EE,#DDEFE6); } :root[data-theme="dark"] .x-wa { background:linear-gradient(160deg,#10231B,#0D1B15); }
.x-wa .x-eyebrow { color:#4F7F68; } :root[data-theme="dark"] .x-wa .x-eyebrow { color:#7DB89A; }
.x-wa-bubble { position:relative; max-width:440px; margin-left:auto; padding:12px 14px 22px; border-radius:18px 18px 4px 18px; background:#D8FDD2; color:#0B1A12; box-shadow:0 1px 2px rgba(0,0,0,.12); }
:root[data-theme="dark"] .x-wa-bubble { background:#1F4D36; color:#EAFBF0; }
.x-wa-bubble p { margin:0; font-size:15px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.x-wa-bubble span { position:absolute; right:12px; bottom:6px; font-size:11px; opacity:.6; }
.x-toggle-row { display:flex; gap:14px; align-items:flex-start; padding:16px 18px; border-radius:20px; background:var(--surface-sunk); cursor:pointer; }
.x-toggle-row input { width:22px; height:22px; margin-top:2px; accent-color:var(--brand); flex:0 0 22px; }
.x-toggle-row strong { display:block; font-size:15px; } .x-toggle-row small { display:block; margin-top:2px; font-size:13px; line-height:1.5; color:var(--secondary); }
.x-stack-col { display:grid; gap:20px; align-content:start; }
.x-howto { display:grid; gap:14px; margin:0 0 16px; padding:0; list-style:none; }
.x-howto li { display:grid; grid-template-columns:34px minmax(0,1fr); gap:14px; align-items:start; } .x-howto li>span { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:var(--brand-soft); color:var(--brand); font-weight:700; }
.x-howto strong { display:block; font-size:15px; } .x-howto small { font-size:13px; color:var(--secondary); line-height:1.45; }

/* Configurações */
.x-settings { display:grid; grid-template-columns:200px minmax(0,1fr); gap:28px; align-items:start; } .x-settings.single { grid-template-columns:minmax(0,820px); }
.x-settings-nav { position:sticky; top:96px; display:grid; gap:4px; padding:8px; border:1px solid var(--hairline); border-radius:26px; background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); }
.x-settings-nav a { display:flex; align-items:center; gap:12px; min-height:44px; padding:0 14px; border-radius:18px; color:var(--secondary); font-size:14px; font-weight:600; transition:background-color .18s,color .18s; }
.x-settings-nav a:hover,.x-settings-nav a.active { background:var(--solid); color:var(--on-solid); } .x-settings-nav .icon { width:18px; height:18px; }
.x-settings-body { display:grid; gap:20px; min-width:0; }
.x-plan-banner { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; border-radius:28px; background:linear-gradient(135deg,var(--hero-a),var(--hero-c)); color:#fff; box-shadow:var(--shadow-hero); transition:transform .25s var(--ease-out); } .x-plan-banner:hover { transform:translateY(-2px); }
.x-plan-banner small { display:block; font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:rgba(255,255,255,.85); } .x-plan-banner strong { font:700 28px var(--font-display); letter-spacing:-.03em; } .x-plan-banner .x-chip { background:rgba(255,255,255,.18); color:#fff; }
.x-setting { scroll-margin-top:100px; display:grid; gap:22px; }
.x-setting-head { display:flex; gap:16px; align-items:center; } .x-setting-head h2 { margin:0 0 2px; font:650 20px var(--font-display); } .x-setting-head p { margin:0; font-size:14px; color:var(--secondary); }
.x-setting-icon { display:grid; place-items:center; flex:0 0 46px; width:46px; height:46px; border-radius:16px; background:var(--brand-soft); color:var(--brand); } .x-setting-icon .icon { width:22px; height:22px; }
.x-setting .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; } .x-setting .form-grid .full { grid-column:1/-1; } .x-setting .form-actions { grid-column:1/-1; margin-top:4px; } .x-setting .inline-error { grid-column:1/-1; margin:0; }
.x-avatar { display:inline-grid; place-items:center; flex:0 0 auto; overflow:hidden; border-radius:50%; background:linear-gradient(145deg,var(--brand-soft),color-mix(in srgb,var(--brand) 35%,var(--brand-soft))); color:var(--brand); font:700 28px var(--font-display); box-shadow:0 0 0 3px var(--hairline-strong); }
.x-avatar img { width:100%; height:100%; object-fit:cover; }
.x-avatar-row { display:flex; gap:22px; align-items:center; } .x-avatar-row strong { display:block; font-size:18px; } .x-avatar-row small { display:block; font-size:14px; color:var(--secondary); } .x-avatar-row .x-actions { margin:12px 0 6px; }
.x-theme-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.x-theme-card { display:grid; gap:4px; justify-items:start; padding:14px; border:2px solid var(--hairline); border-radius:24px; background:var(--surface-sunk); color:var(--ink); text-align:left; transition:border-color .2s,transform .2s var(--ease-out); } .x-theme-card:hover { transform:translateY(-2px); } .x-theme-card.active { border-color:var(--brand); box-shadow:0 0 0 4px var(--focus); }
.x-theme-card strong { margin-top:8px; font-size:15px; } .x-theme-card small { font-size:13px; color:var(--secondary); }
.x-theme-preview { display:grid; grid-template-columns:1fr 2fr; gap:6px; width:100%; height:78px; padding:8px; border-radius:16px; } .x-theme-preview i { border-radius:8px; background:rgba(128,128,150,.25); } .x-theme-preview i:first-child { grid-row:1/3; } .x-theme-preview i:nth-child(2) { background:var(--brand); opacity:.9; }
.x-theme-preview.light { background:#F4F3F9; } .x-theme-preview.dark { background:#0C0A12; } .x-theme-preview.dark i { background:rgba(255,255,255,.14); } .x-theme-preview.dark i:nth-child(2) { background:#8B63FF; } .x-theme-preview.auto { background:linear-gradient(105deg,#F4F3F9 50%,#0C0A12 50%); }
.x-data-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.x-data-card { display:grid; gap:4px; justify-items:start; padding:18px; border:1px solid var(--hairline); border-radius:22px; background:var(--surface-sunk); color:var(--ink); text-align:left; transition:transform .2s var(--ease-out),background-color .18s; } .x-data-card:hover { transform:translateY(-3px); background:var(--brand-soft); }
.x-data-card .icon { width:22px; height:22px; color:var(--brand); margin-bottom:6px; } .x-data-card strong { font-size:15px; } .x-data-card small { font-size:13px; color:var(--secondary); }
.x-danger { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; border-radius:20px; background:var(--surface-sunk); } .x-danger strong { display:block; font-size:15px; } .x-danger small { font-size:13px; color:var(--secondary); } .x-danger.bad { background:var(--danger-soft); }
.button.danger { background:var(--red); border-color:var(--red); color:#fff; }

/* Planos */
.x-plan-summary { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,.9fr); gap:28px; align-items:center; margin-bottom:22px; }
.x-plan-summary h2 { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 0 4px; font:700 clamp(30px,3vw,40px)/1.1 var(--font-display); letter-spacing:-.035em; }
.x-plan-usage { display:grid; gap:10px; } .x-plan-usage>div { display:flex; justify-content:space-between; font-size:14px; color:var(--secondary); } .x-plan-usage b { color:var(--ink); } .x-plan-usage small { color:var(--tertiary); font-size:13px; }
.x-plans { align-items:stretch; }
.x-plan { display:grid; gap:14px; align-content:start; padding:30px 28px; } .x-plan h3 { margin:0; font:650 20px var(--font-display); }
.x-plan.popular { border-color:var(--brand); box-shadow:0 0 0 1px var(--brand),var(--shadow-float); } .x-plan.current { background:linear-gradient(160deg,var(--brand-soft),var(--surface) 65%); }
.x-plan-flag { position:absolute; top:-13px; left:28px; padding:4px 14px; border-radius:var(--r-pill); background:linear-gradient(135deg,var(--hero-a),var(--hero-b)); color:#fff; font-size:12px; font-weight:700; }
.x-plan-price { display:flex; align-items:baseline; gap:6px; } .x-plan-price strong { font:700 clamp(34px,3.4vw,46px)/1 var(--font-display); letter-spacing:-.04em; } .x-plan-price small { color:var(--tertiary); font-size:15px; }
.x-plan-limit { margin:0; color:var(--secondary); font-size:15px; } .x-plan-limit b { color:var(--ink); }
.x-plan ul { display:grid; gap:10px; margin:6px 0 10px; padding:0; list-style:none; } .x-plan li { display:flex; gap:10px; align-items:flex-start; font-size:14px; line-height:1.45; } .x-plan li .icon { flex:0 0 18px; width:18px; height:18px; margin-top:2px; color:var(--green); }
.x-plan .button { width:100%; min-height:50px; }
.x-center { text-align:center; margin-top:8px; }

@media (max-width:1180px) { .x-rule-steps { grid-template-columns:repeat(2,minmax(0,1fr)); } .x-collect { grid-template-columns:minmax(0,1fr) auto; } .x-collect-when,.x-collect-amount { grid-column:1; } .x-collect-actions { grid-column:1/-1; justify-content:flex-start; } .x-data-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:900px) { .x-settings { grid-template-columns:1fr; } .x-settings-nav { position:sticky; top:8px; z-index:5; display:flex; overflow-x:auto; scrollbar-width:none; } .x-settings-nav a { flex:0 0 auto; } .x-plan-summary { grid-template-columns:1fr; } }
@media (max-width:650px) { .x-setting .form-grid { grid-template-columns:1fr; } .x-theme-grid { grid-template-columns:1fr; } .x-avatar-row { flex-direction:column; align-items:flex-start; } .x-danger { flex-direction:column; align-items:stretch; } .x-rule-steps { grid-template-columns:1fr; } .x-data-grid { grid-template-columns:1fr 1fr; } }
.x-form-card .inline-error { min-height:0; margin:0; }
.x-form-card .form-actions { margin-top:0; }

/* =====================================================================
   Mobile · Visão geral com cara de aplicativo
   ===================================================================== */
@media (max-width:650px) {
  /* Cabeçalho: foto + saudação à esquerda, botões circulares à direita */
  .app>header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px 8px; height:auto; }
  header .mobile-welcome { display:flex; align-items:center; gap:12px; min-width:0; flex:1; }
  header .mobile-welcome[hidden] { display:none !important; }
  .mobile-welcome-avatar { width:46px; height:46px; flex:0 0 46px; border:2px solid var(--hairline-strong); box-shadow:0 8px 20px -10px rgba(94,46,235,.6); }
  .mobile-welcome-copy { display:grid; min-width:0; line-height:1.15; }
  .mobile-welcome-copy small { font-size:13px; color:var(--secondary); }
  .mobile-welcome-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:700 19px var(--font-display); letter-spacing:-.02em; }
  .header-right { flex:0 0 auto; padding:0; gap:8px; border:0; background:transparent; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .header-right .icon-button,.header-right [data-action="global-search"],header .header-right [data-action="global-search"],.header-right .theme-toggle,.header-right .theme-toggle button { width:44px; height:44px; min-width:44px; padding:0; border:1px solid var(--hairline-strong); border-radius:50%; background:var(--surface); color:var(--ink); box-shadow:none; }
  .header-right .theme-toggle { border:0; background:transparent; } .header-right .theme-toggle button { border:1px solid var(--hairline-strong); }
  .header-right [data-action="global-search"] span { display:none; }
  .header-right [data-action="global-search"] .icon,.header-right .icon-button .icon,.header-right .theme-toggle .icon { width:19px; height:19px; margin:0; }
  #mobile-export,.header-right .avatar.small { display:none !important; }

  /* Sem título repetido: o dock já mostra onde a pessoa está */
  body[data-page="overview"] .page-heading { display:none; }
  body[data-page="overview"] main { display:flex; flex-direction:column; gap:14px; padding-top:4px; }
  body[data-page="overview"] main>* { order:6; margin-bottom:0; }
  body[data-page="overview"] .overview-hero { display:contents; }
  body[data-page="overview"] .overview-balance { order:1; }
  body[data-page="overview"] main>.overview-alert { order:2; margin:0; }
  body[data-page="overview"] .overview-health-wrap { order:3; }
  body[data-page="overview"] main>.overview-kpi-strip { order:4; }
  body[data-page="overview"] main>.overview-analytics-grid { order:5; }

  /* Cartão principal mais enxuto e legível */
  .overview-hero .overview-balance { padding:24px 22px 22px; border-radius:32px; }
  .overview-hero .overview-balance>strong { font-size:clamp(40px,12.6vw,54px); margin:14px 0 6px; }
  .overview-balance-label { font-size:11px; }
  .overview-hero .overview-balance>p { font-size:14px; }
  .overview-hero-actions { margin-top:20px; }
  .overview-hero .overview-allocation { margin-top:20px; padding-top:16px; }
  .overview-alert { padding:10px 12px; gap:10px; }
  .overview-alert-copy strong { font-size:14px; } .overview-alert-copy small { white-space:normal; }
  .overview-health-card { padding:20px; }
}

/* =====================================================================
   Movimento geral: entrada escalonada, diálogos, listas e feedback
   ===================================================================== */
@keyframes pop-in { from { opacity:0; transform:translateY(18px) scale(.97); } to { opacity:1; transform:none; } }
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
@keyframes slide-up { from { opacity:0; transform:translateY(100%); } to { opacity:1; transform:none; } }
main.stagger .x-grid>*,main.stagger .x-stat-strip .x-stat,main.stagger .x-guar,main.stagger .x-plan { animation:rise .75s var(--ease-out) both; }
main.stagger .x-grid>*:nth-child(2),main.stagger .x-stat-strip .x-stat:nth-child(2),main.stagger .x-guar:nth-child(2),main.stagger .x-plan:nth-child(2) { animation-delay:90ms; }
main.stagger .x-grid>*:nth-child(3),main.stagger .x-stat-strip .x-stat:nth-child(3),main.stagger .x-guar:nth-child(3),main.stagger .x-plan:nth-child(3) { animation-delay:170ms; }
main.stagger .x-stat-strip .x-stat:nth-child(4),main.stagger .x-guar:nth-child(4) { animation-delay:240ms; }
main.stagger .x-guar:nth-child(n+5) { animation-delay:300ms; }
main.stagger .x-ledger-row,main.stagger .x-client,main.stagger .x-collect { animation:rise .6s var(--ease-out) both; }
main.stagger .x-ledger-row:nth-child(-n+8),main.stagger .x-client:nth-child(-n+9),main.stagger .x-collect:nth-child(-n+6) { animation-delay:calc(var(--i,0)*0ms + 120ms); }
dialog#modal[open] { animation:pop-in .34s var(--ease-out); }
dialog#modal[open]::backdrop { animation:fade-in .3s ease both; }
#toast { transition:opacity .3s var(--ease-standard),transform .35s var(--ease-out); }
.metric-value.counting,.x-stat strong.counting { opacity:.92; }
.button,.x-round,.x-quick button,.x-seg button,.pill-link,.x-data-card,.x-theme-card { transition-property:background-color,border-color,color,transform,box-shadow; transition-duration:.2s; transition-timing-function:var(--ease-out); }
.button:active,.x-round:active,.pill-link:active,.x-quick button:active { transform:scale(.97); }
.x-card:hover,.x-guar:hover { box-shadow:var(--shadow-float); }
@media (max-width:650px) {
  #mobile-more[open] .mobile-more-sheet { animation:slide-up .4s var(--ease-out); }
  dialog#modal[open] { animation:slide-up .4s var(--ease-out); }
}
@media (prefers-reduced-motion:reduce) {
  main.stagger .x-grid>*,main.stagger .x-stat-strip .x-stat,main.stagger .x-guar,main.stagger .x-plan,main.stagger .x-ledger-row,main.stagger .x-client,main.stagger .x-collect,dialog#modal[open],dialog#modal[open]::backdrop,#mobile-more[open] .mobile-more-sheet { animation:none !important; }
}

.x-sim>* { min-width:0; } .x-sim-field,.x-money,.x-stepper { min-width:0; max-width:100%; }
.mobile-nav .mobile-nav-more.active { background:transparent; color:var(--brand); }


/* ==========================================================================
   Desktop · casca limpa (07/11/2026)
   - Cabeçalho fica no topo da página (não acompanha a rolagem nem cobre conteúdo).
   - Sidebar: trilho de ícones que se abre ao passar o mouse; lista rola por dentro
     e o perfil fica sempre visível embaixo.
   - Bloco "Minha operação" removido da sidebar (era informação repetida).
   ========================================================================== */
.side-search .icon { width:19px; height:19px; stroke-width:1.7; }
.header-right button.avatar.small { border:0; cursor:pointer; font-family:inherit; transition:transform .2s var(--ease-standard),box-shadow .2s var(--ease-standard); }
.header-right button.avatar.small:hover { transform:scale(1.06); box-shadow:0 0 0 3px var(--focus); }
.side-search { display:none; }

@media (min-width:651px) {
  /* Cabeçalho no fluxo normal da página */
  .app>header { position:relative; top:auto; z-index:1; }
  .workspace { display:none; }

  /* Sidebar: coluna com área de rolagem própria */
  .sidebar { display:flex; flex-direction:column; overflow:hidden; z-index:30; }
  .sidebar>.brand { flex:none; }
  .sidebar>.nav-label { display:none; }
  .sidebar #nav { flex:1 1 auto; align-content:start; grid-auto-rows:max-content; min-height:0; overflow-y:auto; overflow-x:hidden; gap:2px; margin-top:10px; padding-bottom:6px; overscroll-behavior:contain; scrollbar-width:none; }
  .sidebar #nav::-webkit-scrollbar { display:none; }
  .sidebar .sidebar-bottom { flex:none; margin-top:8px; padding-top:10px; border-top:1px solid var(--hairline); }
  .nav-group { display:grid; gap:2px; }
  .nav-group+.nav-group { margin-top:6px; padding-top:6px; border-top:1px solid var(--hairline); }
  .nav-group-title { padding:6px 14px 4px; font-size:11px; letter-spacing:.14em; color:var(--tertiary); white-space:nowrap; }
  .nav-item { min-height:42px; }
  .nav-item .nav-text { white-space:nowrap; }
  .side-search { display:flex; align-items:center; gap:12px; flex:none; width:100%; min-height:44px; margin-top:10px; padding:0 17px; border:1px solid var(--hairline); border-radius:16px; background:var(--surface-sunk); color:var(--secondary); font:600 14px var(--font-ui); cursor:pointer; transition:background-color .2s var(--ease-standard),color .2s var(--ease-standard); }
  .side-search:hover { background:var(--surface-hover); color:var(--ink); }
  .side-search .icon { flex:none; }
}

/* Mouse + tela larga: trilho que se abre ao passar o mouse */
@media (min-width:651px) and (hover:hover) and (pointer:fine) {
  .sidebar { width:76px; padding:16px 10px 12px; transition:width .3s var(--ease-fluid) .05s,box-shadow .3s var(--ease-fluid),background-color .3s var(--ease-fluid); will-change:width; }
  .app { margin-left:104px; }
  .sidebar:hover:not(.rest),.sidebar:focus-within:not(.rest) { width:246px; box-shadow:var(--shadow-float); transition-delay:0s; }
  .sidebar:hover:not(.rest) { background:color-mix(in srgb,var(--surface) 70%,var(--bg)); }

  .sidebar .brand { padding:0 9px 4px; gap:0; white-space:nowrap; }
  .sidebar .brand-mark { flex:none; }
  .sidebar .nav-item { padding:0 11px; gap:0; }
  .sidebar .side-search { gap:0; padding:0 17px; }
  .sidebar .profile { padding:7px 6px; gap:0; min-height:50px; white-space:nowrap; }
  .sidebar .profile .avatar { flex:none; }
  .sidebar .profile>span:not(.avatar) { white-space:nowrap; min-width:0; text-align:left; }

  /* Textos aparecem só com a sidebar aberta */
  .sidebar .nav-text,.sidebar .brand-word,.sidebar .profile>span:not(.avatar),.sidebar .nav-group-title { opacity:0; max-width:0; margin-left:0; overflow:hidden; transition:opacity .1s linear,max-width .3s var(--ease-fluid),margin .3s var(--ease-fluid); }
  .sidebar .nav-group-title { max-height:0; padding-top:0; padding-bottom:0; transition:opacity .1s linear,max-height .3s var(--ease-fluid),padding .3s var(--ease-fluid); }
  .sidebar:hover:not(.rest) .nav-text,.sidebar:focus-within:not(.rest) .nav-text,
  .sidebar:hover:not(.rest) .brand-word,.sidebar:focus-within:not(.rest) .brand-word,
  .sidebar:hover:not(.rest) .profile>span:not(.avatar),.sidebar:focus-within:not(.rest) .profile>span:not(.avatar) { opacity:1; max-width:180px; margin-left:12px; white-space:normal; transition:opacity .2s ease .07s,max-width .3s var(--ease-fluid),margin .3s var(--ease-fluid); }
  .sidebar:hover:not(.rest) .nav-item .nav-text,.sidebar:focus-within:not(.rest) .nav-item .nav-text,.sidebar:hover:not(.rest) .side-search .nav-text,.sidebar:focus-within:not(.rest) .side-search .nav-text { margin-left:10px; }
  .sidebar:hover:not(.rest) .brand-word,.sidebar:focus-within:not(.rest) .brand-word { margin-left:12px; }
  .sidebar:hover:not(.rest) .nav-group-title,.sidebar:focus-within:not(.rest) .nav-group-title { opacity:1; max-width:200px; max-height:30px; padding-top:6px; padding-bottom:4px; transition:opacity .2s ease .07s,max-height .3s var(--ease-fluid),padding .3s var(--ease-fluid); }
  .sidebar:hover:not(.rest) .nav-group+.nav-group,.sidebar:focus-within:not(.rest) .nav-group+.nav-group { border-top-color:transparent; }
}
@media (prefers-reduced-motion:reduce) {
  .sidebar,.sidebar *,.header-right button.avatar.small { transition:none !important; }
}


/* ==========================================================================
   Fluidez (07/11/2026): curva suave, atrasos curtos, movimento menor.
   --ease-out (expo) arrancava rápido e rastejava no fim; --ease-fluid mantém
   velocidade até assentar. Reduced-motion continua desligando tudo acima.
   ========================================================================== */
:root { --ease-fluid:cubic-bezier(.32,.72,0,1); }
@keyframes rise-soft { from { opacity:0; transform:translate3d(0,10px,0); } to { opacity:1; transform:none; } }
main.stagger>* { animation:rise-soft .5s var(--ease-fluid) both; }
main.stagger>*:nth-child(2) { animation-delay:40ms; }
main.stagger>*:nth-child(3) { animation-delay:80ms; }
main.stagger>*:nth-child(4) { animation-delay:120ms; }
main.stagger>*:nth-child(5) { animation-delay:160ms; }
main.stagger>*:nth-child(n+6) { animation-delay:200ms; }
main.stagger .x-grid>*,main.stagger .x-stat-strip .x-stat,main.stagger .x-guar,main.stagger .x-plan { animation:rise-soft .5s var(--ease-fluid) both; }
main.stagger .x-grid>*:nth-child(2),main.stagger .x-stat-strip .x-stat:nth-child(2),main.stagger .x-guar:nth-child(2),main.stagger .x-plan:nth-child(2) { animation-delay:50ms; }
main.stagger .x-grid>*:nth-child(3),main.stagger .x-stat-strip .x-stat:nth-child(3),main.stagger .x-guar:nth-child(3),main.stagger .x-plan:nth-child(3) { animation-delay:100ms; }
main.stagger .x-stat-strip .x-stat:nth-child(4),main.stagger .x-guar:nth-child(4) { animation-delay:150ms; }
main.stagger .x-guar:nth-child(n+5) { animation-delay:190ms; }
main.stagger .x-ledger-row,main.stagger .x-client,main.stagger .x-collect { animation:rise-soft .45s var(--ease-fluid) both; }
main.stagger .x-ledger-row:nth-child(-n+8),main.stagger .x-client:nth-child(-n+9),main.stagger .x-collect:nth-child(-n+6) { animation-delay:70ms; }
.overview-health-card .health-gauge-value,.x-ring-value { animation-duration:1.05s; animation-timing-function:var(--ease-fluid); }
.x-bar>span { animation-duration:.7s; animation-timing-function:var(--ease-fluid); }
.x-bars-set i { animation-duration:.6s; animation-timing-function:var(--ease-fluid); }
dialog#modal[open] { animation-duration:.28s; animation-timing-function:var(--ease-fluid); }


/* ==========================================================================
   Visão geral · Carteira total + Juros total + Caixa para emprestar (07/11/2026)
   ========================================================================== */
.overview-hero .overview-balance-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; max-width:700px; margin:22px 0 0; }
.overview-hero .overview-balance-stat { display:grid; gap:2px; min-width:0; padding:14px 18px 15px; border:1px solid rgba(255,255,255,.22); border-radius:22px; background:rgba(255,255,255,.13); color:#fff; text-decoration:none; backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); transition:background-color .2s var(--ease-fluid),transform .2s var(--ease-fluid); }
.overview-hero a.overview-balance-stat:hover,.overview-hero a.overview-balance-stat:focus-visible { background:rgba(255,255,255,.22); transform:translateY(-2px); }
.overview-hero .overview-balance-stat small { font-size:13px; font-weight:600; color:rgba(255,255,255,.86); }
.overview-hero .overview-balance-stat b { font:700 clamp(20px,2vw,26px)/1.15 var(--font-display); letter-spacing:-.025em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.overview-hero .overview-balance-stat em { font-style:normal; font-size:12.5px; color:rgba(255,255,255,.74); }
@media (max-width:650px) {
  .overview-hero .overview-balance-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:18px; }
  .overview-hero .overview-balance-stat.cash { grid-column:1/-1; }
  .overview-hero .overview-balance-stat { padding:12px 14px 13px; border-radius:18px; }
  .overview-hero .overview-balance-stat { padding:12px 12px 13px; }
  .overview-hero .overview-balance-stat small { font-size:12.5px; }
  .overview-hero .overview-balance-stat b { font-size:17px; white-space:nowrap; overflow-wrap:normal; }
  .overview-hero .overview-balance-stat em { font-size:12px; }
}


/* ==========================================================================
   Tutorial guiado (07/11/2026)
   ========================================================================== */
.tour-btn .icon { width:20px; height:20px; }
body[data-role="admin"] .tour-btn { display:none; }
.tour { position:fixed; inset:0; z-index:200; }
.tour[hidden] { display:none; }
.tour.dim { background:rgba(10,8,20,.62); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); }
.tour-spot { position:fixed; border-radius:26px; box-shadow:0 0 0 9999px rgba(10,8,20,.62),0 0 0 3px color-mix(in srgb,var(--hero-a) 80%,#fff); pointer-events:none; transition:left .35s var(--ease-fluid),top .35s var(--ease-fluid),width .35s var(--ease-fluid),height .35s var(--ease-fluid),opacity .25s; }
.tour-card { position:fixed; width:min(380px,calc(100vw - 32px)); padding:22px 22px 18px; border:1px solid var(--hairline-strong); border-radius:28px; background:var(--bg); color:var(--ink); box-shadow:var(--shadow-float); outline:0; transition:left .35s var(--ease-fluid),top .35s var(--ease-fluid),opacity .2s; }
:root:not([data-theme="dark"]) .tour-card { background:#fff; }
.tour-card.busy { opacity:.55; }
.tour-top { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.tour-count { font:700 12px var(--font-ui); letter-spacing:.12em; text-transform:uppercase; color:var(--brand); }
.tour-skip { min-height:36px; padding:0 12px; border:0; border-radius:var(--r-pill); background:transparent; color:var(--tertiary); font:600 14px var(--font-ui); cursor:pointer; }
.tour-skip:hover { background:var(--surface-sunk); color:var(--ink); }
.tour-card h2 { margin:0 0 8px; font:700 22px/1.2 var(--font-display); letter-spacing:-.025em; }
.tour-card p { margin:0; font-size:16px; line-height:1.55; color:var(--secondary); }
.tour-dots { display:flex; gap:6px; margin:16px 0 4px; }
.tour-dots i { width:7px; height:7px; border-radius:50%; background:var(--hairline-strong); transition:width .3s var(--ease-fluid),background-color .3s; }
.tour-dots i.done { background:color-mix(in srgb,var(--brand) 45%,transparent); } .tour-dots i.on { width:22px; border-radius:var(--r-pill); background:var(--brand); }
.tour-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; }
.tour-actions .button { min-height:50px; padding:0 24px; }
.tour-actions .button.primary { min-width:130px; }
.tour-more { display:flex; align-items:center; gap:12px; }
.tour-q { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--brand-soft); color:var(--brand); font:700 16px var(--font-display); }
.tour-open { overflow:hidden; }
@media (max-width:650px) {
  .tour-card.sheet { left:12px; right:12px; top:auto; bottom:calc(12px + env(safe-area-inset-bottom)); width:auto; padding:20px 20px 16px; border-radius:26px; }
  .tour-card h2 { font-size:20px; } .tour-card p { font-size:15.5px; }
  .tour-actions .button { flex:1; } .tour-actions .button:not(.primary) { flex:0 0 auto; }
}
@media (prefers-reduced-motion:reduce) { .tour-spot,.tour-card,.tour-dots i { transition:none; } }

/* Cobranças: abas ao lado do título e lista logo no topo */
.x-collect-section .x-title { flex-wrap:wrap; row-gap:14px; }
.x-collect-section .x-title .x-seg { margin-left:auto; }
@media (max-width:650px) { .x-collect-section .x-title .x-seg { margin-left:0; width:100%; } .x-collect-section .x-title .x-seg button { flex:1; padding:0 8px; justify-content:center; } }

/* Tabelas empilháveis no celular (cada linha vira um cartão com rótulos) */
@media (max-width:650px) {
  .x-table.stackable table,.x-table.stackable tbody,.x-table.stackable tr,.x-table.stackable td { display:block; width:100%; }
  .x-table.stackable thead { display:none; }
  .x-table.stackable tr { padding:14px 2px; border-bottom:1px solid var(--hairline); }
  .x-table.stackable td { padding:3px 0; border:0; }
  .x-table.stackable td:first-child { padding-bottom:8px; font-size:15px; }
  .x-table.stackable td.n { display:flex; justify-content:space-between; gap:12px; text-align:right; font-size:15px; }
  .x-table.stackable td.n:before { content:attr(data-label); color:var(--tertiary); font-weight:500; text-align:left; }
}

/* Caixa: botões de ação no cabeçalho e faixa "como o caixa chegou até aqui" (07/11/2026) */
.cash-actions { display:flex; flex-wrap:wrap; gap:10px; }
.x-cash-how { margin-bottom:22px; }
.x-cash-how .x-fold>summary { min-height:56px; }
.x-cash-block h3 { margin:0 0 6px; font:650 18px var(--font-display); letter-spacing:-.02em; }
.x-cash-block .x-flow-row:first-of-type { padding-top:10px; }
.x-cash-how .x-note { margin:18px 0 0; }
@media (max-width:650px) {
  .page-heading .actions.cash-actions { display:grid; grid-template-columns:1fr; gap:10px; width:100%; }
  .cash-actions .button { justify-content:center; width:100%; } .cash-actions .button.primary { order:-1; }
  .x-stat-strip .x-stat { padding-left:12px; padding-right:12px; }
  .x-stat-strip .x-stat strong { font-size:clamp(15px,4.9vw,20px); letter-spacing:-.03em; white-space:nowrap; }
}

/* ==========================================================================
   Visão geral · alinhamento dos cartões Garantias / Lembretes / Prioridades (07/11/2026)
   O CSS legado usava 20px nas listas e o título Aurora usa 28px: o conteúdo saía da margem.
   ========================================================================== */
.overview-guarantee-list { padding:14px 18px 6px; }
.overview-guarantee-row { padding:0 10px; }
.overview-guarantee-empty { padding:14px 28px 6px; }
.overview-reminders .overview-reminder-count { margin:0 28px; padding:16px 0 8px; }
.overview-reminders .due-list { padding:4px 28px 18px; }
.overview-reminders .empty { margin:14px 28px 20px; }
.overview-more-link,.overview-guarantee-link { margin:0 28px 18px; }
.overview-priority-list { padding-left:18px; padding-right:18px; }
@media (max-width:650px) {
  .overview-guarantee-list { padding:12px 10px 4px; }
  .overview-guarantee-row { padding:0 10px; }
  .overview-guarantee-empty { padding:12px 20px 4px; }
  .overview-reminders .overview-reminder-count { margin:0 20px; padding:14px 0 6px; }
  .overview-reminders .due-list { padding:4px 20px 16px; }
  .overview-reminders .empty { margin:12px 20px 16px; }
  .overview-more-link,.overview-guarantee-link { margin:0 20px 16px; }
  .overview-priority-list { padding-left:10px; padding-right:10px; }
}


/* ==========================================================================
   Primeiro uso mais fácil (07/11/2026): Comece por aqui, formulários enxutos, glossário
   ========================================================================== */
.overview-start { padding:32px; border:1px solid var(--hairline); border-radius:var(--r-card); background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); box-shadow:var(--shadow-soft); }
.overview-start-head h2 { margin:6px 0 8px; font:700 clamp(24px,3vw,32px)/1.1 var(--font-display); letter-spacing:-.035em; }
.overview-start-head>p:not(.eyebrow) { margin:0; color:var(--secondary); font-size:16px; }
.overview-start-head .eyebrow { margin:0; font-size:11px; letter-spacing:.16em; color:var(--brand); }
.start-steps { display:grid; gap:12px; margin:26px 0 8px; padding:0; list-style:none; }
.start-step { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:18px; align-items:center; padding:18px 20px; border:1px solid var(--hairline); border-radius:24px; background:var(--surface-sunk); transition:border-color .2s var(--ease-fluid),background-color .2s var(--ease-fluid); }
.start-step.now { border-color:var(--brand); background:var(--brand-soft); }
.start-step.later { opacity:.78; }
.start-n { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--surface); border:1px solid var(--hairline-strong); font:700 18px var(--font-display); color:var(--secondary); }
.start-step.now .start-n { background:var(--brand); border-color:transparent; color:#fff; }
.start-step.done .start-n { background:var(--success-soft); border-color:transparent; color:var(--green); }
.start-n .icon { width:22px; height:22px; }
.start-copy strong { display:block; font:650 18px/1.3 var(--font-display); letter-spacing:-.015em; }
.start-copy small { display:block; margin-top:4px; font-size:15px; line-height:1.5; color:var(--secondary); }
.start-ok { font-weight:700; font-size:14px; color:var(--green); }
.start-step .button { min-height:50px; padding:0 22px; white-space:nowrap; }
.start-links { display:flex; flex-wrap:wrap; gap:6px 20px; margin-top:14px; }
@media (max-width:650px) {
  .overview-start { padding:22px 18px; border-radius:28px; }
  .start-step { grid-template-columns:40px minmax(0,1fr); gap:12px 14px; padding:16px; }
  .start-n { width:38px; height:38px; font-size:16px; }
  .start-step .button,.start-step .start-ok { grid-column:1/-1; justify-self:stretch; justify-content:center; }
  .start-copy strong { font-size:17px; } .start-copy small { font-size:14.5px; }
}
/* "Mais dados" e "Opções avançadas" recolhidos nos formulários */
.more-fields { border:1px solid var(--hairline); border-radius:20px; background:var(--surface-sunk); padding:0 16px; }
.more-fields>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:52px; list-style:none; cursor:pointer; font:600 15px var(--font-ui); color:var(--brand); }
.more-fields>summary::-webkit-details-marker { display:none; }
.more-fields>summary:after { content:'+'; font:500 22px var(--font-ui); }
.more-fields[open]>summary:after { content:'−'; }
.more-fields[open]>summary { margin-bottom:6px; }
.more-fields>.form-grid { padding-bottom:16px; }
.loan-quick { margin:0; padding:12px 16px; border-radius:16px; background:var(--brand-soft); color:var(--ink); font-size:15px; line-height:1.5; }
.loan-quick:empty { display:none; }
.row-action.pay { background:var(--brand); color:#fff; border-color:transparent; }
.row-action.pay:hover { filter:brightness(1.08); }
.glossary { display:grid; gap:2px; margin:6px 0 0; }
.glossary>div { display:grid; gap:2px; padding:12px 0; border-bottom:1px solid var(--hairline); }
.glossary dt { font:650 16px var(--font-display); } .glossary dd { margin:0; font-size:15px; color:var(--secondary); line-height:1.5; }


/* ==========================================================================
   Formulários — correção visual (07/11/2026)
   "Mais dados" / "Opções avançadas" ocupam a largura toda; cartão de resultado do empréstimo.
   ========================================================================== */
.form-grid>.more-fields,.form-grid>.loan-quick,.form-grid>.help-text.full { grid-column:1/-1; }
.more-fields { padding:0; border:1px solid var(--hairline); border-radius:22px; background:var(--surface-sunk); overflow:hidden; }
.more-fields>summary { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:14px; min-height:58px; padding:12px 18px; list-style:none; cursor:pointer; font:650 15px var(--font-ui); color:var(--ink); }
.more-fields>summary>span { grid-column:1; }
.more-fields>summary>small { grid-column:1; font:500 13px/1.4 var(--font-ui); color:var(--tertiary); }
.more-fields>summary:after { grid-column:2; grid-row:1/span 2; display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--surface); border:1px solid var(--hairline); font:500 20px/1 var(--font-ui); color:var(--brand); }
.more-fields[open]>summary { border-bottom:1px solid var(--hairline); margin:0; }
.more-fields>.form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:18px; }
.more-fields .field.full { grid-column:1/-1; }
.loan-quick { display:grid; gap:6px; align-content:center; min-height:116px; padding:18px 20px; border:1px solid color-mix(in srgb,var(--brand) 24%,transparent); border-radius:22px; background:var(--brand-soft); margin:0; }
.loan-quick .lq-hint { font-size:15px; line-height:1.5; color:var(--secondary); }
.loan-quick .lq-label { font:650 13px var(--font-ui); letter-spacing:.02em; color:var(--brand); }
.loan-quick .lq-total { font:700 clamp(30px,5vw,38px)/1.05 var(--font-display); letter-spacing:-.04em; color:var(--ink); font-variant-numeric:tabular-nums; }
.loan-quick .lq-row { display:flex; flex-wrap:wrap; gap:4px 20px; font-size:15px; color:var(--secondary); }
.loan-quick .lq-row b { color:var(--ink); font-variant-numeric:tabular-nums; }
.loan-step[data-step="0"]:not([hidden])~#loan-preview,.loan-step[data-step="1"]:not([hidden])~#loan-preview { display:none; }
@media (max-width:650px) {
  .more-fields>.form-grid { grid-template-columns:minmax(0,1fr); padding:14px 16px 16px; gap:13px; }
  .more-fields>summary { padding:12px 16px; }
  .loan-quick { min-height:104px; padding:16px 18px; }
}

/* Formulários — ajustes depois da revisão visual (07/11/2026) */
.more-fields>summary { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.more-fields>summary:after { flex:none; grid-column:auto; grid-row:auto; }
.more-fields .mf-text { display:grid; gap:2px; min-width:0; }
.more-fields .mf-text strong { font:650 15px var(--font-ui); color:var(--ink); }
.more-fields .mf-text small { font:500 13px/1.4 var(--font-ui); color:var(--tertiary); }
@media (max-width:650px) {
  /* o resultado fica no topo e fixo: dá para ver quanto recebe enquanto preenche */
  .loan-step[data-step="0"] .loan-quick { order:-1; position:sticky; top:0; z-index:3; min-height:0; padding:14px 18px; box-shadow:0 10px 24px -14px rgba(60,28,170,.45); background:color-mix(in srgb,var(--brand-soft) 88%,var(--bg)); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
  .loan-step[data-step="0"] .loan-quick .lq-total { font-size:30px; }
  .loan-step[data-step="0"] .loan-quick .lq-hint { font-size:14px; }
}


/* ==========================================================================
   Celular · padrão de app (07/11/2026)
   Quem tocou em "Fechamento" já sabe onde está: o título grande e a frase de apoio saem
   (ficam só para leitores de tela). Sobram os botões de ação, no topo, em largura total.
   ========================================================================== */
@media (max-width:650px) {
  body[data-page]:not([data-page="overview"]) .page-heading { display:block; margin:0; }
  body[data-page]:not([data-page="overview"]) .page-heading>div:first-child { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
  body[data-page]:not([data-page="overview"]) .page-heading .actions:empty { display:none; }
  body[data-page]:not([data-page="overview"]) .page-heading:has(.actions>*) { margin-bottom:14px; }
  body[data-page]:not([data-page="overview"]) .page-heading .actions { display:flex; flex-wrap:wrap; gap:10px; width:100%; }
  body[data-page]:not([data-page="overview"]) .page-heading .actions .button { flex:1 1 140px; justify-content:center; min-height:50px; }
  /* sem faixa de título: o conteúdo começa logo no topo, respeitando o entalhe do iPhone */
  body[data-page]:not([data-page="overview"]) main { padding-top:calc(16px + env(safe-area-inset-top)); }
  .app>header { padding-top:calc(8px + env(safe-area-inset-top)); }
}

/* Instalar no celular (07/11/2026) */
.install-lead { margin:0 0 14px; font-size:16px; line-height:1.55; color:var(--ink); }
.install-warn { margin:0 0 14px; padding:12px 16px; border-radius:16px; background:var(--warn-soft); color:var(--ink); font-size:15px; line-height:1.5; }
.install-steps { display:grid; gap:10px; margin:0 0 6px; padding:0; list-style:none; }
.install-steps li { display:grid; grid-template-columns:34px minmax(0,1fr); gap:14px; align-items:center; padding:12px 14px; border:1px solid var(--hairline); border-radius:18px; background:var(--surface-sunk); }
.install-n { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:var(--brand); color:#fff; font:700 15px var(--font-display); }
.install-text { font-size:15.5px; line-height:1.5; color:var(--ink); }
.install-text svg { display:inline-block; vertical-align:-5px; margin:0 2px; color:var(--brand); }


/* ==========================================================================
   Central de notificações — sininho (07/11/2026)
   ========================================================================== */
#bell { position:relative; }
#bell[data-count]:not([data-count="0"])::after { content:attr(data-count); position:absolute; top:1px; right:0; min-width:19px; height:19px; padding:0 5px; border-radius:10px; background:var(--red); color:#fff; font:700 11px/19px var(--font-ui); text-align:center; box-shadow:0 0 0 2px var(--bg); }
.mobile-nav-item { position:relative; }
.mobile-nav-item[data-dot="1"]::after { content:''; position:absolute; top:7px; left:calc(50% + 7px); width:9px; height:9px; border-radius:50%; background:var(--red); box-shadow:0 0 0 2px var(--bg); }
.tour-q[data-count]:not([data-count=""]) { position:relative; }
.tour-q[data-count]:not([data-count=""])::after { content:attr(data-count); position:absolute; top:-6px; right:-8px; min-width:18px; height:18px; padding:0 4px; border-radius:9px; background:var(--red); color:#fff; font:700 11px/18px var(--font-ui); text-align:center; }
.tour-q .icon { width:18px; height:18px; }
.notify { position:fixed; inset:0; z-index:150; }
.notify[hidden] { display:none; }
.notify-backdrop { position:absolute; inset:0; background:rgba(10,8,20,.16); }
.notify-panel { position:absolute; top:70px; right:24px; display:flex; flex-direction:column; width:min(440px,calc(100vw - 32px)); max-height:min(680px,calc(100dvh - 96px)); border:1px solid var(--hairline-strong); border-radius:28px; background:var(--bg); box-shadow:var(--shadow-float); overflow:hidden; outline:0; animation:notify-in .26s var(--ease-fluid); }
:root:not([data-theme="dark"]) .notify-panel { background:#fff; }
@keyframes notify-in { from { opacity:0; transform:translateY(-8px) scale(.985); } to { opacity:1; transform:none; } }
.notify-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 22px 8px; }
.notify-head h2 { margin:0; font:700 22px/1.2 var(--font-display); letter-spacing:-.025em; }
.notify-head small { color:var(--tertiary); font-size:14px; }
.notify-tools { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:6px 22px 12px; }
.notify-tools .x-seg button { min-height:34px; padding:0 14px; font-size:13.5px; }
.notify-tools .text-button:disabled { opacity:.4; cursor:default; }
.notify-list { flex:1 1 auto; min-height:120px; overflow-y:auto; padding:0 10px 10px; overscroll-behavior:contain; }
.notify-group { padding:12px 14px 6px; font:700 11.5px var(--font-ui); letter-spacing:.12em; text-transform:uppercase; color:var(--tertiary); }
.notify-item { display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:13px; align-items:start; width:100%; padding:12px 12px; border:0; border-radius:20px; background:transparent; color:var(--ink); text-align:left; cursor:pointer; font-family:var(--font-ui); transition:background-color .18s var(--ease-fluid); }
.notify-item:hover,.notify-item:focus-visible { background:var(--surface-sunk); outline:0; }
.notify-item.unread { background:color-mix(in srgb,var(--brand) 7%,transparent); }
.notify-item.unread:hover { background:color-mix(in srgb,var(--brand) 12%,transparent); }
.ni-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:15px; background:var(--brand-soft); color:var(--brand); }
.ni-icon .icon { width:20px; height:20px; }
.lvl-good .ni-icon { background:var(--green-soft,var(--success-soft)); color:var(--green); }
.lvl-warn .ni-icon { background:var(--warning-soft); color:var(--warning); }
.lvl-bad .ni-icon { background:var(--danger-soft); color:var(--red); }
.ni-main { display:grid; gap:2px; min-width:0; }
.ni-main strong { font-size:15px; line-height:1.35; font-weight:650; }
.notify-item:not(.unread) .ni-main strong { font-weight:550; color:var(--secondary); }
.ni-main small { font-size:14px; line-height:1.45; color:var(--secondary); }
.ni-main em { font-style:normal; font-size:12.5px; color:var(--tertiary); }
.ni-tag { display:inline-block; padding:1px 8px; border-radius:999px; background:var(--brand); color:#fff; font:700 11px var(--font-ui); letter-spacing:.02em; }
.ni-dot { width:10px; height:10px; margin-top:6px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 22%,transparent); }
.notify-item.is-notice { border:1px solid var(--hairline); }
.notify-empty { display:grid; justify-items:center; gap:6px; padding:42px 24px; text-align:center; }
.notify-empty strong { font:650 17px var(--font-display); } .notify-empty p { margin:0; max-width:280px; font-size:14.5px; color:var(--secondary); line-height:1.5; }
.notify-empty .ni-icon { width:52px; height:52px; border-radius:18px; margin-bottom:6px; }
.notify-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 22px 16px; border-top:1px solid var(--hairline); }
.notify-foot-note { margin:0; flex:1 1 200px; font-size:13px; color:var(--tertiary); line-height:1.45; }
.notify-foot-ok { display:flex; align-items:center; gap:8px; margin:0; font-size:13.5px; font-weight:600; color:var(--green); }
.notify-foot-ok .icon { width:18px; height:18px; }
body[data-role="admin"] #bell { display:none; }
@media (max-width:650px) {
  .notify-backdrop { background:rgba(10,8,20,.46); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); }
  .notify-panel { top:auto; right:8px; left:8px; bottom:calc(8px + env(safe-area-inset-bottom)); width:auto; max-height:84dvh; border-radius:30px; animation:notify-sheet .32s var(--ease-fluid); }
  @keyframes notify-sheet { from { transform:translateY(40px); opacity:0; } to { transform:none; opacity:1; } }
  .notify-head { padding:20px 20px 6px; } .notify-tools { padding:6px 20px 10px; } .notify-foot { padding:12px 20px calc(16px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion:reduce) { .notify-panel { animation:none; } }


/* ==========================================================================
   Equipe / funcionários (07/11/2026)
   ========================================================================== */
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.team-list { display:grid; gap:10px; margin:6px 0 22px; }
.team-empty { margin:0; padding:18px 4px; }
.team-row { display:grid; grid-template-columns:48px minmax(0,1.3fr) 160px 150px auto; gap:14px; align-items:center; padding:14px 16px; border:1px solid var(--hairline); border-radius:22px; background:var(--surface-sunk); }
.team-row.is-paused { opacity:.72; }
.team-av { display:grid; place-items:center; width:46px; height:46px; border-radius:50%; background:var(--brand-soft); color:var(--brand); font:700 15px var(--font-display); flex:none; }
.team-av.lg { width:56px; height:56px; font-size:18px; }
.team-who { display:grid; gap:1px; min-width:0; }
.team-who strong { font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .team-who small { color:var(--secondary); font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.team-role select { width:100%; min-height:44px; padding:0 12px; border:1px solid var(--hairline-strong); border-radius:14px; background:var(--field-bg); color:var(--ink); font:600 14.5px var(--font-ui); }
.team-status { display:grid; gap:4px; justify-items:start; } .team-status small { font-size:12.5px; color:var(--tertiary); }
.team-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.button.danger-ghost { color:var(--red); }
.team-form { padding:22px; margin:0 0 22px; border:1px solid var(--hairline); border-radius:24px; background:var(--surface-sunk); }
.team-form h3,.team-legend h3 { margin:0 0 14px; font:650 18px var(--font-display); letter-spacing:-.02em; }
.team-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.team-pass { display:flex; gap:8px; align-items:center; } .team-pass input { flex:1; min-width:0; }
.team-limit { display:flex; gap:12px; align-items:flex-start; margin:0 0 22px; padding:16px 18px; border-radius:20px; background:var(--warning-soft); font-size:15px; line-height:1.5; }
.team-limit .icon { width:22px; height:22px; flex:none; color:var(--warning); margin-top:1px; }
.team-legend-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.team-legend-item { padding:16px 18px; border:1px solid var(--hairline); border-radius:20px; background:var(--surface-sunk); }
.team-legend-item strong { display:block; margin-bottom:4px; font:650 16px var(--font-display); } .team-legend-item p { margin:0; font-size:14.5px; line-height:1.5; color:var(--secondary); }
.team-safe { display:flex; gap:12px; align-items:flex-start; margin:14px 0 0; padding:14px 18px; border-radius:18px; background:var(--success-soft); font-size:14.5px; line-height:1.5; }
.team-safe .icon { width:22px; height:22px; flex:none; color:var(--green); }
.team-cred { display:grid; gap:10px; margin:6px 0 4px; }
.team-cred>div { display:grid; gap:2px; padding:14px 16px; border:1px solid var(--hairline); border-radius:18px; background:var(--surface-sunk); }
.team-cred small { color:var(--tertiary); font-size:13px; } .team-cred b { font:650 17px var(--font-ui); word-break:break-all; }
.team-me { display:flex; gap:16px; align-items:center; margin:4px 0 12px; } .team-me strong { display:block; font:700 20px var(--font-display); } .team-me small { display:block; margin:2px 0 8px; color:var(--secondary); font-size:15px; }
@media (max-width:1100px) { .team-row { grid-template-columns:48px minmax(0,1fr); } .team-role,.team-status,.team-actions { grid-column:1/-1; } .team-actions { justify-content:flex-start; } .team-legend-grid { grid-template-columns:1fr; } }
@media (max-width:650px) { .team-fields { grid-template-columns:1fr; } .team-form { padding:18px; } .team-actions .button { flex:1 1 auto; justify-content:center; } }

/* Perfis de funcionário: some o que o perfil não pode usar (o servidor também bloqueia) */
body[data-staff="cobrador"] :is([data-edit-loan],[data-renegotiate],[data-cancel-loan],[data-reverse-payment],[data-action="loan"],[data-action="client"],[data-x-client-loan],#quick-loan,[data-action="expense"],[data-action="capital-entry"],[data-action="capital-withdrawal"],.mobile-nav-action),
body[data-staff="operador"] :is([data-renegotiate],[data-cancel-loan],[data-reverse-payment],[data-action="expense"],[data-action="capital-entry"],[data-action="capital-withdrawal"]),
body[data-staff="gerente"] :is([data-action="capital-entry"],[data-action="capital-withdrawal"]),
body[data-staff] :is([data-action="backup"],[data-action="import"],[data-action="clear"]) { display:none !important; }
.team-form .inline-error:empty { display:none; }
.team-form .inline-error:not(:empty) { margin:12px 0 0; }
.team-form .x-actions { margin-top:18px; }
.team-list:empty { display:none; }


/* ==========================================================================
   Console do administrador (07/11/2026)
   ========================================================================== */
.adm-toolbar { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:0 0 18px; }
.adm-toolbar .x-search { flex:1 1 260px; min-width:0; }
.adm-toolbar select { min-height:44px; padding:0 14px; border:1px solid var(--hairline-strong); border-radius:var(--r-pill); background:var(--field-bg); color:var(--ink); font:600 14px var(--font-ui); }
.adm-toolbar .x-seg { flex:0 1 auto; }
.adm-actions { display:flex; flex-wrap:wrap; gap:10px; }
.adm-bars { display:flex; align-items:flex-end; gap:14px; height:200px; padding:6px 4px 0; }
.adm-bars>div { flex:1; display:grid; grid-template-rows:auto 1fr auto; justify-items:center; gap:6px; height:100%; }
.adm-bars b { font:700 15px var(--font-display); font-variant-numeric:tabular-nums; }
.adm-bars i { align-self:end; width:min(100%,46px); border-radius:12px 12px 6px 6px; background:linear-gradient(180deg,var(--hero-a),var(--hero-b)); min-height:4px; transform-origin:bottom; animation:bar-grow .7s var(--ease-fluid) both; }
.adm-bars span { font-size:13px; color:var(--tertiary); text-transform:capitalize; }
.adm-lines { display:grid; gap:4px; }
.adm-line { display:grid; grid-template-columns:44px minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:10px 6px; border-bottom:1px solid var(--hairline); }
.adm-line:last-child { border-bottom:0; }
.adm-line-who { display:grid; min-width:0; } .adm-line-who strong { font-size:15.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .adm-line-who small { font-size:13.5px; color:var(--secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.adm-when { font-size:13px; color:var(--tertiary); white-space:nowrap; }
.adm-foot { margin:6px 0 0; text-align:center; font-size:13px; color:var(--tertiary); } .adm-foot.left { text-align:left; margin-top:14px; }
.adm-acc { display:flex; align-items:center; gap:12px; min-width:0; } .adm-acc span:last-child { display:grid; min-width:0; } .adm-acc strong { font-size:15.5px; } .adm-acc small { color:var(--secondary); font-size:13.5px; }
.adm-row-actions { white-space:nowrap; text-align:right; } .adm-row-actions .button+.button { margin-left:8px; }
.adm-sub { margin:0 0 14px; color:var(--secondary); font-size:15px; }
.adm-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0 0 18px; }
.adm-grid>div { padding:12px 14px; border-radius:16px; background:var(--surface-sunk); } .adm-grid small { display:block; color:var(--tertiary); font-size:12.5px; } .adm-grid b { font:700 17px var(--font-display); font-variant-numeric:tabular-nums; }
.adm-form { margin:0 0 16px; padding:16px; border:1px solid var(--hairline); border-radius:20px; background:var(--surface-sunk); }
.adm-form h3,.adm-danger h3 { margin:0 0 12px; font:650 16px var(--font-display); } .adm-form h3 small { font:500 13px var(--font-ui); color:var(--tertiary); }
.adm-form .form-actions { margin-top:12px; }
.adm-form textarea { width:100%; border:1px solid var(--hairline-strong); border-radius:16px; background:var(--field-bg); color:var(--ink); padding:12px 14px; font:500 15px/1.5 var(--font-ui); resize:vertical; }
.adm-danger { padding:16px; border:1px solid color-mix(in srgb,var(--red) 28%,transparent); border-radius:20px; background:var(--danger-soft); }
.adm-danger-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; } .adm-danger .x-muted { margin:0; font-size:13.5px; }
.adm-templates { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 14px; } .adm-templates small { color:var(--tertiary); font-size:13px; } .adm-templates .x-chip { cursor:pointer; border:0; font-family:inherit; }
#adm-notice-form { display:grid; gap:16px; }
#adm-notice-form textarea { width:100%; border:1px solid var(--hairline-strong); border-radius:18px; background:var(--field-bg); color:var(--ink); padding:14px 16px; font:500 15.5px/1.5 var(--font-ui); resize:vertical; }
.adm-label { font:600 14px var(--font-ui); color:var(--muted); } .adm-count { align-self:flex-end; font-size:12.5px; color:var(--tertiary); font-weight:500; } .adm-hint { font-size:13.5px; color:var(--secondary); font-weight:500; }
.adm-preview { cursor:default; }
.adm-notices { display:grid; gap:12px; }
.adm-notice { display:grid; gap:10px; padding:18px 20px; border:1px solid var(--hairline); border-radius:22px; background:var(--surface-sunk); }
.adm-notice.is-off { opacity:.62; }
.adm-notice-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; } .adm-notice-top strong { font:650 17px/1.3 var(--font-display); }
.adm-notice p { margin:0; font-size:15px; line-height:1.55; color:var(--secondary); }
.adm-notice-meta { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; font-size:13.5px; color:var(--tertiary); }
.adm-reach { display:grid; gap:6px; } .adm-reach small { font-size:13px; color:var(--secondary); }
.adm-notice .button { justify-self:start; }
.button.danger-ghost { color:var(--red); border-color:color-mix(in srgb,var(--red) 30%,transparent); }
.adm-feed { display:grid; }
.adm-event { display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:14px; align-items:start; padding:14px 4px; border-bottom:1px solid var(--hairline); }
.adm-event:last-child { border-bottom:0; }
.adm-event-main { display:grid; gap:2px; min-width:0; } .adm-event-main strong { font-size:15.5px; } .adm-event-main small { font-size:14px; color:var(--secondary); overflow-wrap:anywhere; } .adm-event-main em { font-style:normal; font-size:12.5px; color:var(--tertiary); }
.adm-event time { font-size:13px; color:var(--tertiary); white-space:nowrap; }
@media (max-width:900px) { .adm-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:650px) {
  .adm-toolbar .x-seg { width:100%; } .adm-toolbar select,.adm-toolbar .button { flex:1 1 140px; }
  .adm-line { grid-template-columns:44px minmax(0,1fr); } .adm-line .x-chip,.adm-line .adm-when,.adm-line .button { grid-column:2; justify-self:start; }
  .adm-bars { gap:8px; height:170px; }
  .adm-event { grid-template-columns:42px minmax(0,1fr); } .adm-event time { grid-column:2; }
  .adm-row-actions { text-align:left; display:flex; gap:8px; } .adm-row-actions .button { flex:1; justify-content:center; } .adm-row-actions .button+.button { margin-left:0; }
  .adm-acc { padding-bottom:4px; }
}

/* Correções depois da revisão visual do console (07/11/2026) */
#adm-notice-form .inline-error:empty { display:none; }
#adm-notice-form .inline-error:not(:empty) { margin:0; }
@media (max-width:650px) {
  /* tabelas empilhadas: todo campo com rótulo vira uma linha "rótulo ........ valor" */
  .x-table.stackable td[data-label] { display:flex; justify-content:space-between; align-items:center; gap:12px; text-align:right; font-size:15px; }
  .x-table.stackable td[data-label]::before { content:attr(data-label); color:var(--tertiary); font-weight:500; text-align:left; }
  .adm-acc { padding-bottom:6px; }
  body[data-page]:not([data-page="overview"]) .page-heading .actions .button.primary { flex:1 1 100%; }
  body[data-page="admin"] .page-heading { display:block; margin-bottom:14px; }
  body[data-page="admin"] .page-heading .actions { display:flex; flex-wrap:wrap; gap:10px; width:100%; }
  body[data-page="admin"] .page-heading .actions .button { flex:1 1 140px; justify-content:center; min-height:50px; }
  body[data-page="admin"] .page-heading .actions .button.primary { flex:1 1 100%; }
}

/* Recuperar senha (07/11/2026) */
.auth-info { margin:0; padding:0; font-size:15px; line-height:1.5; font-weight:600; color:var(--green); }
.auth-info:empty { display:none; }
.auth-info:not(:empty) { padding:12px 16px; border-radius:16px; background:var(--success-soft); }
.auth-side form .auth-switch+.auth-switch { margin-top:-6px; }

/* Entrar com Google e aviso de e-mail não confirmado */
.auth-google { margin-top:18px; display:grid; gap:12px; justify-items:center; }
.auth-google[hidden] { display:none; }
.auth-google .auth-or { display:flex; align-items:center; gap:12px; width:100%; color:var(--secondary); font-size:13px; }
.auth-google .auth-or::before, .auth-google .auth-or::after { content:""; flex:1; height:1px; background:var(--hairline); }
.auth-google-button { display:flex; justify-content:center; width:100%; min-height:44px; }
.verify-banner { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px 14px; padding:10px 16px; padding-top:max(10px, env(safe-area-inset-top)); background:var(--brand-soft); color:var(--ink); font-size:14px; line-height:1.4; text-align:center; }
.verify-banner .text-button { font-weight:700; min-height:36px; padding:0 8px; }

/* ===== Ajustes de 07/11: Em atraso no celular, menu Mais, rodapé dos formulários, empréstimo e documentos ===== */
@media (max-width:760px) {
  .loan-results tr { grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); }
  .loan-results td::before { white-space:normal; }
  .loan-results td.name { padding:0; align-items:center; min-width:0; }
  .loan-results td.name>span:last-child { min-width:0; overflow-wrap:anywhere; }
  .loan-results .name small { max-width:none; white-space:normal; line-height:1.35; }
  .loan-results td:nth-child(6) { white-space:nowrap; }
  .loan-results tr>td:nth-child(7) { display:flex; gap:8px; padding:10px 0 0; }
  .loan-results tr>td { padding-left:0; padding-right:0; }
  .loan-results td:nth-child(7) .row-action { width:auto; flex:1 1 0; min-width:0; justify-content:center; padding:9px 10px; white-space:normal; line-height:1.2; }
  .loan-results td:nth-child(7) .row-action.pay { flex:1.2 1 0; }
  .loan-results td:nth-child(4) { text-align:right; }
  /* menu Mais: tudo alinhado na mesma margem */
  .mobile-more-sheet { padding:10px 14px calc(28px + env(safe-area-inset-bottom)); }
  .mobile-more-header { padding:0 12px; }
  .mobile-more-group-title { padding:0 12px 5px; }
  .mobile-more-links { padding-bottom:8px; }
  .mobile-more-link>.icon:first-child,.mobile-more-link>.tour-q { width:24px; height:24px; flex:0 0 24px; }
  .mobile-more-link>.tour-q { font-size:14px; }
  .mobile-more-link.active { border-color:color-mix(in srgb,var(--brand) 28%,transparent); }
}
.mobile-more-sheet { border-color:var(--hairline); }
.mobile-more-handle { background:var(--hairline-strong); }

/* Empréstimo: opções avançadas sempre visíveis + escolher/cadastrar cliente */
.loan-advanced { display:grid; gap:12px; padding:16px; border:1px solid var(--hairline); border-radius:18px; background:var(--surface-sunk,transparent); }
.loan-advanced h4 { margin:0; font:700 15px var(--font-ui); color:var(--ink); }
.client-pick { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; }
.client-pick label { display:grid; gap:6px; min-width:0; }
.client-pick .button { white-space:nowrap; min-height:46px; }
@media (max-width:520px) { .client-pick { grid-template-columns:1fr; } .client-pick .button { width:100%; } }

/* Documentos do cliente */
.client-docs { display:grid; gap:8px; }
.client-docs-title { font:600 14px var(--font-ui); color:var(--ink); }
.doc-list { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.doc-list:empty { display:none; }
.doc-list li { display:flex; align-items:center; gap:10px; min-height:44px; padding:6px 12px; border:1px solid var(--hairline); border-radius:14px; background:var(--field-bg,transparent); }
.doc-list .doc-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); font-weight:600; font-size:14px; }
.doc-list a.doc-name { color:var(--brand); }
.doc-list small { color:var(--secondary); white-space:nowrap; }
.doc-list .text-button.danger { color:var(--red); }
.doc-add { position:relative; justify-self:start; cursor:pointer; overflow:hidden; }
.doc-add input { position:absolute; inset:0; opacity:0; cursor:pointer; font-size:0; }

/* Carteira total em verde (legível sobre o violeta) */
.overview-hero .overview-balance>strong { color:#7DF3B4; text-shadow:0 4px 30px rgba(8,40,30,.45); }

/* Em atraso no celular: selo compacto para o nome e as parcelas terem espaço */
@media (max-width:760px) {
  .loan-results td:nth-child(6) .badge { padding:4px 10px; font-size:12px; gap:6px; }
  .loan-results td:nth-child(6) .badge::before { width:6px; height:6px; }
  .loan-results td:nth-child(7) .row-action,.loan-results td:nth-child(7) .row-action+.row-action { margin:0; }
}
@media (max-width:760px) { .late-loan-screen .loan-results td:nth-child(4)::before { content:'Venceu em'; } }
.form-grid>.loan-advanced,.form-grid>.client-pick,.form-grid>.client-docs { grid-column:1/-1; }
.loan-advanced .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (max-width:520px) { .loan-advanced .form-grid { grid-template-columns:1fr; } }

/* Menu Mais: o título é uma tag <header> e herdava vidro, altura e borda do cabeçalho do app (faixa quadrada sobreposta) */
#mobile-more .mobile-more-header { position:sticky; top:-10px; z-index:2; height:auto; min-height:60px; margin:0 -14px 10px; padding:10px 26px 10px; border:0; border-bottom:1px solid var(--hairline); border-radius:0; background:var(--paper); backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:none; }

/* Admin: ativação dos assinantes */
.adm-funnel-rows { display:grid; gap:14px; }
.adm-funnel-row { display:grid; gap:7px; }
.adm-funnel-row>div:first-child { display:flex; justify-content:space-between; gap:12px; font-size:14px; }
.adm-funnel-row b { font-variant-numeric:tabular-nums; } .adm-funnel-row small { color:var(--tertiary); font-weight:500; }
.adm-funnel-bar { height:10px; border-radius:999px; background:var(--surface-sunk); overflow:hidden; }
.adm-funnel-bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--brand),color-mix(in srgb,var(--brand) 60%,#9d7bff)); }
.adm-funnel-stall { display:grid; gap:12px; margin-top:22px; padding-top:18px; border-top:1px solid var(--hairline); }
.adm-funnel-stall h3 { margin:0; font:700 15px var(--font-ui); }
.adm-funnel-stall .x-seg { flex-wrap:wrap; }
.adm-funnel-hint,.adm-empty { margin:0; color:var(--secondary); font-size:14px; }

/* Trava do aplicativo (PIN) */
dialog.applock { width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; background:var(--bg); color:var(--ink); }
dialog.applock::backdrop { background:var(--bg); }
dialog.applock[open] { display:grid; place-items:center; }
.applock-card { width:min(360px,100%); display:grid; justify-items:center; gap:10px; padding:24px 20px calc(24px + env(safe-area-inset-bottom)); text-align:center; }
.applock-card .brand-mark { width:52px; height:52px; font-size:26px; }
.applock-card h2 { margin:10px 0 0; font:700 24px var(--font-display); }
.applock-text { margin:0; color:var(--secondary); font-size:15px; }
.applock-dots { display:flex; gap:16px; margin:14px 0 4px; }
.applock-dots i { width:16px; height:16px; border-radius:50%; border:2px solid var(--hairline-strong); transition:background-color .15s,border-color .15s; }
.applock-dots i.on { background:var(--brand); border-color:var(--brand); }
.applock-error { min-height:20px; margin:0; color:var(--red); font-size:14px; font-weight:600; }
.applock-pad { display:grid; grid-template-columns:repeat(3,76px); gap:14px; margin:6px 0; }
.applock-pad button { height:76px; border:1px solid var(--hairline); border-radius:50%; background:var(--surface); color:var(--ink); font:600 28px var(--font-display); cursor:pointer; }
.applock-pad button:active { background:var(--brand-soft); }
.applock-links { display:grid; gap:2px; justify-items:center; }
.applock-links .text-button { min-height:44px; }
dialog.applock.shake .applock-dots { animation:applock-shake .4s; }
@keyframes applock-shake { 20%,60% { transform:translateX(-8px); } 40%,80% { transform:translateX(8px); } }
@media (prefers-reduced-motion:reduce) { dialog.applock.shake .applock-dots { animation:none; } }
.x-subhead { margin:26px 0 8px; font:700 16px var(--font-ui); }
.applock-panel { display:grid; gap:14px; }
.applock-panel .x-actions { display:flex; flex-wrap:wrap; gap:10px; }

/* Multa e juros de atraso */
.late-fees { display:block; margin-top:2px; color:var(--red); font:600 12px var(--font-ui); }
.late-payment[hidden] { display:none; }
.late-payment .late-hint { margin-top:2px; }
.adm-funnel-row>div:first-child { align-items:baseline; line-height:1.3; }
.adm-funnel-row b { display:inline-flex; align-items:baseline; gap:8px; white-space:nowrap; }
.adm-funnel-row b small { display:inline; margin:0; }
.adm-funnel .x-seg button { white-space:nowrap; }
.adm-funnel .x-seg { display:flex; flex-wrap:wrap; gap:6px; padding:6px; border-radius:22px; }
.adm-funnel .x-seg button { flex:1 1 auto; justify-content:center; }
