@font-face {
  font-family:'Satoshi';
  src:url('/assets/fonts/Satoshi-Variable.woff2') format('woff2');
  font-style:normal;
  font-weight:300 900;
  font-display:swap;
}
@font-face {
  font-family:'Geist';
  src:url('/assets/fonts/Geist-Variable.woff2') format('woff2');
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
}
/* ---------- Fundação Nexo: superfícies, elevação, vidro e tema ---------- */
:root {
  color-scheme: light;
  /* Marca e semântica — estáveis nos dois temas */
  --brand:#6D3BF5; --brand-hover:#5C2DE0; --brand-contrast:#FFFFFF;
  --green:#30A46C; --red:#D95365; --warning:#F5A524;
  --chart-blue:#4387F5; --chart-teal:#36A88A; --chart-plum:#A58AEF; --chart-amber:#D89116;

  /* Superfícies — 4 níveis de profundidade */
  --bg:#EFEDF5;                 /* nível 0 · fundo do app */
  --paper:#FFFFFF;              /* nível 1 · cartão */
  --paper-soft:#F7F6FB;         /* nível 1 recuado */
  --surface-raised:#FFFFFF;     /* nível 2 · cartão elevado */
  --surface-muted:#F3F2F7;
  --focal:#17151F;              /* nível 3 · foco escuro */
  --focal-soft:#201D2B;
  --bg-glow-a:rgba(109,59,245,.14);
  --bg-glow-b:rgba(67,135,245,.10);

  /* Texto */
  --ink:#16141F; --secondary:#5F5C6B; --muted:#777481; --tertiary:#8C8995;
  --on-focal:#FFFFFF; --on-focal-muted:rgba(255,255,255,.66);

  /* Linhas e tintas suaves */
  --line:#E4E1EC; --line-soft:#F0EEF5; --line-strong:#D5D1DF;
  --brand-soft:#F1EBFF; --lime:#F1EBFF; --success-soft:#EAF7EF;
  --warning-soft:#FFF5E3; --danger-soft:#FFF0F2;

  /* Vidro — translucidez real com borda de luz */
  --glass-bg:rgba(255,255,255,.72);
  --glass-bg-strong:rgba(255,255,255,.86);
  --glass-border:rgba(255,255,255,.75);
  --glass-edge:inset 0 1px 0 rgba(255,255,255,.9);
  --glass-blur:saturate(180%) blur(22px);
  --glass-tint:linear-gradient(160deg,rgba(255,255,255,.55),rgba(255,255,255,.14));

  /* Elevação — escala real de 3 degraus (ambiente + direcional) */
  --shadow-card:0 1px 2px rgba(26,20,46,.05),0 6px 16px -6px rgba(26,20,46,.10);
  --shadow-lift:0 2px 4px rgba(26,20,46,.05),0 18px 40px -14px rgba(26,20,46,.20);
  --shadow-pop:0 4px 10px rgba(26,20,46,.07),0 36px 72px -22px rgba(26,20,46,.32);
  --shadow-focal:0 2px 6px rgba(12,9,24,.22),0 34px 70px -24px rgba(12,9,24,.55);
  --shadow-brand:0 10px 30px -10px rgba(109,59,245,.52);
  --focus:rgba(109,59,245,.26);

  /* Forma — escala contínua */
  --radius-xs:8px; --radius-sm:12px; --radius-md:18px; --radius-lg:24px;
  --radius-xl:30px; --radius-pill:999px;

  /* Tipografia */
  --font-ui:'Geist',-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
  --font-display:'Satoshi','Geist',-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
  --type-caption:12px; --type-label:13px; --type-body:15px; --type-body-large:16px;
  --type-section:20px; --type-page:clamp(30px,2.5vw,36px); --type-display:clamp(40px,4vw,50px);

  /* Movimento */
  --ease-standard:cubic-bezier(.2,.75,.25,1); --ease-out:cubic-bezier(.16,1,.3,1);
  --motion-fast:160ms; --motion-route:360ms;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:20px; --space-6:24px;
}

/* ---------- Tema escuro ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand:#8B63FF; --brand-hover:#9D7CFF; --brand-contrast:#0E0C14;
  --green:#3DD68C; --red:#FF6B81; --warning:#FFB94D;
  --chart-blue:#6AA5FF; --chart-teal:#4FD3AE; --chart-plum:#BCA2FF; --chart-amber:#F0B44C;

  --bg:#0C0A12;
  --paper:#17151F;
  --paper-soft:#1C1A26;
  --surface-raised:#211E2C;
  --surface-muted:#1C1A26;
  --focal:#242032;
  --focal-soft:#2B2639;
  --bg-glow-a:rgba(139,99,255,.20);
  --bg-glow-b:rgba(106,165,255,.12);

  --ink:#F2F0F7; --secondary:#AFABBD; --muted:#918DA1; --tertiary:#7D7A8B;
  --on-focal:#FFFFFF; --on-focal-muted:rgba(255,255,255,.62);

  --line:#2A2635; --line-soft:#221F2D; --line-strong:#39344A;
  --brand-soft:#241C3C; --lime:#241C3C; --success-soft:#14301F;
  --warning-soft:#33240C; --danger-soft:#361820;

  --glass-bg:rgba(32,29,43,.68);
  --glass-bg-strong:rgba(32,29,43,.85);
  --glass-border:rgba(255,255,255,.10);
  --glass-edge:inset 0 1px 0 rgba(255,255,255,.07);
  --glass-tint:linear-gradient(160deg,rgba(255,255,255,.07),rgba(255,255,255,.01));

  --shadow-card:0 1px 2px rgba(0,0,0,.45),0 6px 16px -6px rgba(0,0,0,.55);
  --shadow-lift:0 2px 4px rgba(0,0,0,.45),0 18px 40px -14px rgba(0,0,0,.65);
  --shadow-pop:0 4px 10px rgba(0,0,0,.5),0 36px 72px -22px rgba(0,0,0,.78);
  --shadow-focal:0 2px 6px rgba(0,0,0,.5),0 34px 70px -24px rgba(0,0,0,.8);
  --shadow-brand:0 10px 30px -10px rgba(139,99,255,.55);
  --focus:rgba(139,99,255,.38);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--type-body)/1.55 var(--font-ui);
  accent-color:var(--brand);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  transition:background-color .3s var(--ease-standard),color .3s var(--ease-standard);
}
/* Brilho ambiente: dá profundidade ao fundo sem saturar a leitura. */
body:before {
  content:'';
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(900px 540px at 12% -8%,var(--bg-glow-a),transparent 62%),
    radial-gradient(760px 480px at 92% 4%,var(--bg-glow-b),transparent 60%);
}
button,input,select,textarea {
  font: inherit;
}
button,a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:focus-visible,a:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.mobile-nav,.mobile-more { display:none; }
a {
  color: inherit;
  text-decoration: none;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: var(--glass-bg-strong);
  backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  border-right: 1px solid var(--line-soft);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.sidebar::-webkit-scrollbar {
  width: 8px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #D7D5DC;
  border: 2px solid var(--paper);
  border-radius: 999px;
  min-height: 40px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--lime);
}
.brand {
  font:700 29px var(--font-display);
  letter-spacing: -1.1px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  margin-bottom: 2px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  width: 38px;
  height: 38px;
  font-size: 29px;
  border-radius: 12px;
}
.beta {
  font: 600 9px var(--font-ui);
  letter-spacing: 1px;
  border: 1px solid var(--line);
  padding: 4px 5px;
  margin: 5px 0 0 5px;
  border-radius: 4px;
  color: var(--muted);
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 12px;
  margin: 22px 0 24px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-muted);
  color: var(--ink);
}
.workspace-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--brand-soft);
  border-radius: 11px;
  font-size: 15px;
  color: var(--brand);
}
small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}
.local-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--surface-muted);
}
.workspace .local-dot {
  margin-left: auto;
}
.nav-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.35px;
  color: var(--secondary);
  margin: 0 12px 12px;
}
nav {
  display: grid;
  gap: 6px;
}
.nav-item {
  padding: 8px 11px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--secondary);
  font-size: 14px;
  min-height: 48px;
  font-weight: 550;
  transition: background-color var(--motion-fast) var(--ease-standard),color var(--motion-fast) var(--ease-standard),transform var(--motion-fast) var(--ease-standard),box-shadow var(--motion-fast) var(--ease-standard);
}
.nav-item.active {
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  box-shadow:0 5px 14px rgba(109,59,245,.19);
}
.nav-item:hover {
  background: var(--surface-muted);
  color: var(--ink);
}
svg.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.count {
  margin-left: auto;
  background: #FFF5E3;
  color: #8A4C27;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.local-info {
  font-size: 12px;
  color: var(--muted);
  padding: 17px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.local-info .local-dot {
  margin-right: 6px;
}
.local-info small {
  font-size: 12px;
  margin: 7px 0 0 12px;
}
.profile {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 13px;
  color: var(--ink);
  min-height: 48px;
  padding: 7px 9px;
  border-radius: 12px;
  transition: background-color .16s ease;
}
.profile>span:last-child {
  margin-left: auto;
  color: var(--secondary);
}
.avatar {
  width: 36px;
  height: 36px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.avatar.small {
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.app {
  margin-left: 232px;
  min-width: 0;
}
header {
  height: 68px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--glass-bg);
  backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  box-shadow:var(--glass-edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 8;
}
/* A saudação com avatar pertence somente ao cabeçalho móvel da Visão geral. */
header .mobile-welcome { display:none; }
header .mobile-welcome[hidden] { display:none !important; }
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 12px;
  color: var(--tertiary);
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
}
.demo-pill {
  font-size: 12px;
  color: var(--secondary);
  display: flex;
  gap: 7px;
  align-items: center;
}
.demo-pill i {
  width: 5px;
  height: 5px;
  background: var(--surface-muted);
  border-radius: 50%;
}
.icon-button {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 5px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: background-color .16s ease,border-color .16s ease;
}
main {
  padding: 34px 38px 24px;
  max-width: 1680px;
  margin: auto;
  width: 100%;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}
.page-heading .actions:empty { display:none; }
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: var(--muted);
  margin-bottom: 9px;
  font-weight: 700;
}
h1 {
  font:700 var(--type-page)/1.16 var(--font-display);
  letter-spacing: -.03em;
  font-variant-numeric: lining-nums;
  margin: 0 0 9px;
}
p {
  line-height: 1.55;
}
h2,h3 { font-family:var(--font-display); letter-spacing:-.02em; line-height:1.3; }
h2 { font-size:var(--type-section); font-weight:600; }
h3 { font-size:17px; font-weight:600; }
.subtitle {
  color: var(--muted);
  font-size: var(--type-body);
  margin: 0;
  line-height: 1.5;
}
.button {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  min-height: 44px;
  transition: transform var(--motion-fast) var(--ease-standard),box-shadow var(--motion-fast) var(--ease-standard),background-color var(--motion-fast) var(--ease-standard),border-color var(--motion-fast) var(--ease-standard),color var(--motion-fast) var(--ease-standard);
}
.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-contrast);
  box-shadow:var(--shadow-brand);
}
.button.primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow:0 8px 20px rgba(109,59,245,.22);
}
.button svg {
  width: 15px;
  height: 15px;
}
.actions {
  display: flex;
  gap: 10px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.metric {
  background: var(--surface-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  min-height: 150px;
  box-shadow: var(--shadow-card),var(--glass-edge);
  transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.metric.featured {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
  position: relative;
  overflow: hidden;
  box-shadow:var(--shadow-card);
}
.metric.featured:after {
  content: none;
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px solid #ffffff0c;
  border-radius: 50%;
  right: -70px;
  bottom: -80px;
  box-shadow: 0 0 0 23px #ffffff03,0 0 0 45px #ffffff03;
}
.metric-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.featured .metric-top {
  color: var(--secondary);
}
.metric-top .icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.metric-value {
  font: 700 clamp(24px,2.2vw,34px)/1.12 var(--font-display);
  letter-spacing: -.03em;
  margin: 19px 0 10px;
  font-variant-numeric:tabular-nums;
}
.metric-foot {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.metric-foot strong {
  font-weight: 700;
  color: var(--muted);
  margin-right: 5px;
}
.featured .metric-foot {
  color: var(--secondary);
}
.featured .metric-foot strong {
  color: var(--brand);
}
.metric.warning .metric-value {
  color: var(--red);
}
.chart-grid {
  display: grid;
  grid-template-columns: minmax(0,1.8fr) minmax(290px,1fr);
  gap: 20px;
  margin-bottom: 22px;
}
.panel {
  background: var(--surface-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card),var(--glass-edge);
  transition:border-color var(--motion-fast) var(--ease-standard),box-shadow var(--motion-fast) var(--ease-standard),transform var(--motion-fast) var(--ease-standard);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px 0;
  gap: 16px;
}
.panel h2 {
  font: 600 18px/1.3 var(--font-display);
  margin: 0 0 6px;
  letter-spacing: -.3px;
  color: var(--ink);
  font-size:18px;
}
.panel-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.period {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 10px;
  background: var(--paper);
  color: var(--muted);
}
.chart {
  padding: 22px 23px 12px;
}
.chart-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.chart-summary strong {
  font: 600 22px var(--font-display);
  letter-spacing: -.6px;
}
.chart-summary span {
  color: var(--secondary);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 4px 6px;
  font-size: 12px;
}
.chart svg {
  width: 100%;
  height: 172px;
  overflow: visible;
}
.chart-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 17px;
}
.chart-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-right: 5px;
  background: var(--brand);
}
.chart-legend .light {
  background: var(--green);
}
.portfolio {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 24px 18px;
}
.donut {
  --paid: 35%;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: conic-gradient(var(--brand) 0% var(--paid),var(--surface-muted) var(--paid) var(--open),var(--red) var(--open) 100%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transform: rotate(-90deg);
}
.donut-inner {
  background: var(--paper);
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(90deg);
}
.donut strong {
  font: 600 28px var(--font-display);
  letter-spacing: -1px;
}
.donut small {
  font-size: 12px;
}
.legend-list {
  display: grid;
  gap: 17px;
  flex: 1;
}
.legend-row {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--muted);
}
.legend-row i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.legend-row b {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.portfolio-foot {
  border-top: 1px solid var(--line-soft);
  margin: 3px 23px 0;
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.portfolio-foot b {
  font-weight: 500;
  color: var(--muted);
}
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0,1.8fr) minmax(290px,1fr);
  gap: 22px;
}
.text-button {
  border: 0;
  background: none;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color .16s ease,color .16s ease;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .65px;
  color: var(--muted);
  padding: 15px 20px 13px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 20px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
tr:last-child td {
  border: 0;
}
td.name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 500;
}
.initials {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper-soft);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  flex-shrink: 0;
}
.initials.tone-1 {
  background: var(--brand-soft);
  color: #6D3BF5;
}
.initials.tone-2 {
  background: var(--surface-muted);
  color: var(--muted);
}
.initials.tone-3 {
  background: var(--brand-soft);
  color: #6D3BF5;
}
.name small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.loan-guarantee-label {
  color: var(--brand) !important;
  font-weight: 600;
}
td.money {
  color: var(--muted);
  font-weight: 600;
}
.badge {
  font-size: 12px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--paper-soft);
  color: var(--muted);
  font-weight: 700;
  min-height: 26px;
}
.badge.late {
  color: var(--red);
  background: var(--danger-soft);
}
.badge.paid {
  background: var(--paper-soft);
  color: var(--muted);
}
.badge:before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.table-foot {
  border-top: 1px solid var(--line);
  padding: 13px 23px;
  font-size: 12px;
  color: var(--muted);
}
.due-list {
  padding: 7px 23px 0;
}
.due-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.date-box {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  width: 36px;
  height: 40px;
  text-align: center;
  padding: 4px;
  color: var(--muted);
  font-size: 15px;
  flex-shrink: 0;
}
.date-box small {
  font-size: 8px;
  margin: 0;
}
.due-name {
  font-size: 14px;
  color: var(--muted);
}
.due-name small {
  font-size: 12px;
  color: var(--muted);
}
.due-amount {
  margin-left: auto;
  text-align: right;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}
.due-amount small {
  font-size: 12px;
}
.due-footer {
  padding: 15px 23px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.due-footer .icon {
  width: 14px;
  height: 14px;
}
footer {
  max-width: 1600px;
  margin: auto;
  padding: 10px 38px 24px;
  display: flex;
  gap: 13px;
  font-size: 12px;
  color: var(--muted);
}
footer>span:first-child {
  border-left: 1px solid var(--line-soft);
  padding-left: 13px;
}
.footer-right {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: .5px;
}
.footer-right i {
  font-style: normal;
  margin: 0 8px;
}
.toolbar {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.search {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 15px;
  width: 300px;
  color: var(--ink);
  min-height: 46px;
  font-size: 15px;
}
.filters {
  display: flex;
  gap: 6px;
}
.filter {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: var(--type-label);
  color: var(--muted);
  min-height: 40px;
  font-weight: 600;
  transition: background-color .16s ease,color .16s ease,border-color .16s ease;
}
.filter.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.empty {
  padding: 42px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.empty h2 {
  font-size: 18px;
  color: var(--muted);
}
.row-action {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 9px;
  font-size: 12px;
  padding: 8px 12px;
  min-height: 42px;
  font-weight: 600;
}
.settings {
  padding: 26px 28px 42px;
  max-width: 980px;
  display: grid;
  gap: 18px;
}
.settings h2 {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.3;
}
.settings p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}
.settings section {
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}
.settings-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.settings-section-head > div { min-width: 0; }
.settings-section-head p { margin: 0; }
.settings-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
}
.settings-icon .icon { width: 21px; height: 21px; }
.settings-divider {
  height: 1px;
  margin: 24px 0 20px;
  background: var(--line);
}
.settings h3 {
  margin: 0 0 4px;
  font: 700 16px/1.35 var(--font-ui);
  color: var(--ink);
}
.settings-note {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  border-radius: 0 9px 9px 0;
  background: var(--paper-soft);
  color: var(--ink) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}
.settings-message-preview {
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}
.settings-message-preview strong { font-size: 14px; color: var(--ink); }
.settings-message-preview p {
  min-height: 24px;
  margin: 7px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.danger {
  color: #B5474F;
  border-color: #F2C8CF;
}
dialog {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 0;
  width: 560px;
  max-width: calc(100% - 30px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(22,20,31,.18);
  color: var(--ink);
}
@supports (height: 100dvh) {
  dialog { max-height: calc(100dvh - 32px); }
}
dialog::backdrop {
  background: rgba(22,20,31,.42);
}
.modal-head {
  padding: 26px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.modal-head h2 {
  font: 700 21px/1.25 var(--font-display);
  margin: 0;
  letter-spacing: -.6px;
  color: var(--ink);
}
.close {
  border: 1px solid var(--line);
  background: var(--paper-soft);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.modal-body {
  padding: 0 28px 28px;
}
.modal-body>p {
  font-size: 14px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.field.full {
  grid-column: 1/-1;
}
.field input,.field select,.field textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 11px 13px;
  color: var(--ink);
  width: 100%;
  min-height: 46px;
  font-size: 15px;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus,.field select:focus,.field textarea:focus,.search:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  background: var(--paper-soft);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}
.detail-grid small {
  margin: 0 0 6px;
}
.detail-grid strong {
  font-size: 14px;
  font-weight: 500;
}
.help-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--secondary);
}
.inline-error {
  color: #B5474F;
  font-size: 12px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 129px);
  transform: translateX(-50%) translateY(90px);
  padding: 13px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(22,20,31,.16);
  z-index: 40;
  transition: transform .25s;
  font-size: 14px;
  font-weight: 600;
  min-height: 48px;
  display: flex;
  align-items: center;
}
#toast.show {
  transform: translateX(-50%) translateY(0);
}
#mobile-menu {
  display: none;
  background: none;
  border: 0;
  color: var(--brand);
  font-size: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  place-items: center;
}
.clickable {
  cursor: pointer;
}
.clickable:hover {
  background: var(--paper-soft);
}
.notice {
  padding: 13px 17px;
  border: 1px solid #F5A524;
  background: #FFF5E3;
  border-radius: 7px;
  margin-bottom: 20px;
  color: #8A640D;
  font-size: 12px;
}
.activity {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.installment-scroll {
  max-height: 245px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
}
.installment-scroll th {
  position: sticky;
  top: 0;
  background: var(--paper-soft);
  z-index: 1;
}
.installment-scroll th,.installment-scroll td {
  padding: 10px 12px;
}
.installment-scroll .badge {
  margin-top: 5px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-top: 22px;
}
.schedule-summary {
  margin-top: 20px;
  font-size: 12px;
}
.schedule-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.overdue-label {
  color: #8A4C27;
  font-size: 12px;
}
.due-button {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  color: inherit;
}
.due-button:hover {
  background: var(--paper-soft);
}
@media(min-width:1450px) {
  main {
    padding-top: 43px;
  }
  .metric {
    min-height: 164px;
  }
  .chart svg {
    height: 200px;
  }
  .portfolio {
    padding-top: 40px;
    padding-bottom: 33px;
  }
  td {
    padding-top: 17px;
    padding-bottom: 17px;
  }
  .due-item {
    padding-top: 21px;
    padding-bottom: 21px;
  }
}
@media(max-width:1150px) {
  .sidebar {
    width: 232px;
    padding: 24px 15px;
  }
  .app {
    margin-left: 232px;
  }
  main {
    padding: 30px 26px;
  }
  .chart-grid,.bottom-grid {
    grid-template-columns: minmax(0,1.6fr) minmax(280px,1fr);
    gap: 16px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px 14px;
  }
  .portfolio {
    gap: 12px;
    padding: 28px 18px 20px;
  }
  .donut {
    width: 120px;
    height: 120px;
  }
  .donut-inner {
    width: 96px;
    height: 96px;
  }
  th,td {
    padding-left: 15px;
    padding-right: 15px;
  }
  .header-right {
    gap: 15px;
  }
  .panel-head {
    padding-left: 18px;
    padding-right: 18px;
  }
}
@media(max-width:950px) {
  .chart-grid,.bottom-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .portfolio {
    justify-content: center;
    gap: 50px;
  }
  .legend-list {
    max-width: 220px;
  }
  .page-heading {
    gap: 16px;
  }
  .page-heading .actions {
    flex-direction: column;
  }
  .demo-pill {
    display: none;
  }
  .metric-value {
    font-size:27px;
  }
  .chart svg {
    height: 200px;
  }
}
@media(max-width:650px) {
  body[data-page]:not([data-page="overview"]) .app>header { display:none !important; }
  body[data-page]:not([data-page="overview"]) .app>main { padding-top:18px; }
  .sidebar {
    display:none;
  }
  .app {
    margin-left: 0;
  }
  .app>header {
    position:relative;
    padding:8px 18px;
    height:60px;
    gap:10px;
    border:0;
    background:transparent;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
  #mobile-menu {
    display:none;
  }
  .breadcrumb {
    margin-right: auto;
    font-size: 12px;
  }
  .breadcrumb span {
    margin: 0 5px;
  }
  #breadcrumb-root,.breadcrumb span { display:none; }
  .breadcrumb strong { font-size:14px; font-weight:600; }
  .header-right { gap:7px; }
  .header-right [data-action="global-search"] { display:inline-flex; align-items:center; justify-content:center; gap:7px; width:auto; min-width:78px; height:40px; min-height:40px; padding:0 11px; border-radius:14px; background:rgba(255,255,255,.72); color:#34313F; font-size:12px; }
  .header-right [data-action="global-search"] .icon { width:18px; height:18px; }
  .header-right .icon-button { width:40px; height:40px; }
  .header-right .avatar.small { display:none; }
  main {
    padding: 20px 16px calc(126px + env(safe-area-inset-bottom));
  }
  footer { display:none; }
  .mobile-nav { position:fixed; z-index:20; inset:auto 8px calc(9px + env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:center; gap:0; min-height:70px; padding:6px 4px; border:1px solid rgba(255,255,255,.84); border-radius:999px; background:rgba(250,249,253,.56); box-shadow:0 8px 30px rgba(28,22,46,.16),inset 0 1px rgba(255,255,255,.8); backdrop-filter:saturate(180%) blur(24px); -webkit-backdrop-filter:saturate(180%) blur(24px); isolation:isolate; }
  .mobile-nav:before { content:''; position:absolute; z-index:-1; top:6px; bottom:6px; left:4px; width:calc((100% - 8px)/5); border-radius:999px; background:rgba(109,59,245,.11); box-shadow:inset 0 1px rgba(255,255,255,.7); transform:translateX(calc(var(--nav-active-index,0)*100%)); transition:transform 320ms var(--ease-standard); pointer-events:none; }
  .mobile-nav-item { position:relative; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:4px; min-width:0; min-height:56px; padding:5px 0; border:0; border-radius:999px; background:transparent; color:var(--muted); font:600 11px/1.15 var(--font-ui); letter-spacing:0; text-align:center; text-decoration:none; transition:background-color .18s var(--ease-standard),color .18s var(--ease-standard),transform .18s var(--ease-standard); }
  .mobile-nav-item>.icon { width:21px; height:21px; flex:0 0 auto; transition:transform .18s var(--ease-standard),color .18s var(--ease-standard); }
  .mobile-nav-item span { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-nav-item.active { background:transparent; color:var(--brand); }
  .mobile-nav-item.active:before { content:none; }
  .mobile-nav-item.active>.icon { transform:translateY(-2px) scale(1.12); animation:dock-select 320ms var(--ease-standard); }
  .mobile-nav-item:active { transform:scale(.96); }
  .mobile-nav-action { display:grid; place-items:center; align-self:center; justify-self:center; width:54px; height:54px; margin-top:-17px; border:1px solid rgba(255,255,255,.9); border-radius:50%; background:var(--brand); color:#fff; box-shadow:0 8px 22px rgba(109,59,245,.34),0 2px 5px rgba(22,20,31,.16); transition:background-color .18s var(--ease-standard),box-shadow .18s var(--ease-standard),transform .18s var(--ease-standard); }
  .mobile-nav-action>.icon { width:25px; height:25px; stroke-width:2; }
  .mobile-nav-action:hover { background:var(--brand-hover); box-shadow:0 10px 26px rgba(109,59,245,.4); transform:translateY(-2px); }
  .mobile-nav-action:active { transform:scale(.94); }
  #mobile-more { position:fixed; inset:auto 0 0; display:none; width:100%; max-width:none; max-height:min(84dvh,760px); margin:0; padding:0; overflow:visible; border:0; border-radius:24px 24px 0 0; background:transparent; color:var(--ink); animation:mobile-sheet-enter .22s var(--ease-standard) both; }
  #mobile-more[open] { display:block; }
  #mobile-more .icon-button { width:42px; height:42px; }
  #mobile-more .icon-button .icon { width:19px; height:19px; }
  #mobile-more .mobile-more-sheet { max-height:min(84dvh,760px); }
  .signed-out .mobile-nav,.signed-out #mobile-more { display:none !important; }
  .app { min-height:100svh; }
  .page-heading {
    align-items:stretch;
    flex-direction:column;
    gap:16px;
    margin-bottom:22px;
  }
  .page-heading .eyebrow { display:none; }
  .page-heading h1 { max-width:100%; margin-bottom:8px; font-size:30px; line-height:1.12; letter-spacing:-.035em; }
  .page-heading .subtitle { max-width:100%; font-size:15px; line-height:1.45; }
  .page-heading .actions>.button { flex:0 1 auto; border-radius:999px; }
  .field { font-size:14px; gap:10px; }
  .field input,.field select,.field textarea { min-height:52px; padding:13px 15px; border-radius:16px; font-size:16px; }
  .field select option { font-size:16px; }
  #modal .button,#modal .row-action { min-height:48px; font-size:15px; border-radius:999px; }
  #modal .form-actions { gap:10px; }
  #modal .form-actions>.button { flex:1 1 auto; }
  #modal .close { width:44px; height:44px; flex:0 0 44px; }
  .overview-chart-grid { display:none; }
  .page-heading > div:first-child {
    min-width: 0;
  }
  .page-heading .actions {
    width: 100%;
    flex-direction: row;
  }
  .page-heading .actions > .button.primary {
    width: auto;
    min-width: 0;
    flex:1 1 100%;
  }
  .page-heading .actions>.button:not(.primary) { display:inline-flex; flex:0 1 auto; }
  .page-heading .actions { flex-wrap:wrap; gap:8px; }
  h1 {
    font-size: 28px;
    line-height: 1.15;
  }
  .subtitle {
    max-width: 260px;
    font-size: 14px;
    line-height: 1.5;
  }
  .button {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 44px;
  }
  .metric {
    min-height: 148px;
    padding: 17px 15px;
  }
  .metric-value {
    font-size: clamp(22px,6vw,28px);
  }
  .metric-top {
    font-size: 12px;
  }
  .metric-foot {
    font-size: 12px;
  }
  .toolbar {
    flex-direction: column;
  }
  .search {
    width: 100%;
  }
  .filters {
    overflow: auto;
  }
  .filter {
    white-space: nowrap;
  }
  footer {
    padding: 14px 16px;
  }
  .footer-right {
    display: none;
  }
  .panel-head {
    padding: 19px 16px 0;
  }
  #toast {
    left: 50%;
    width: max-content;
    max-width: 90%;
  }
  .form-grid {
    gap: 13px;
    grid-template-columns:minmax(0,1fr);
  }
  .field.full { grid-column:auto; }
  .modal-body {
    padding: 0 20px 24px;
  }
  .modal-head {
    padding: 22px 20px 16px;
  }
  #modal { position:fixed; inset:auto 0 0; width:100%; max-width:none; max-height:calc(92dvh - env(safe-area-inset-top)); margin:0; border-radius:24px 24px 0 0; border-bottom:0; animation:mobile-sheet-enter .22s var(--ease-standard) both; }
  #modal .modal-body { max-height:calc(92dvh - 92px - env(safe-area-inset-top)); overflow:auto; padding:0 18px calc(22px + env(safe-area-inset-bottom)); overscroll-behavior:contain; }
  #modal .form-actions { position:sticky; bottom:calc(-22px - env(safe-area-inset-bottom)); padding:12px 0 calc(8px + env(safe-area-inset-bottom)); background:var(--paper); }
  .actions {
    gap: 6px;
  }
  .quick-loan { right:14px; bottom:calc(96px + env(safe-area-inset-bottom)); z-index:18; min-height:50px; }
}
@keyframes dock-select { 0% { transform:translateY(0) scale(1); } 55% { transform:translateY(-4px) scale(1.16); } 100% { transform:translateY(-2px) scale(1.12); } }
@keyframes mobile-sheet-enter { from { opacity:.75; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
/* Conta e autenticação */
.signed-out>.sidebar,.signed-out>.app {
  display: none;
}
.signed-out #modal {
  display: none;
}
#auth-root[hidden] {
  display: none;
}
.auth-loading {
  padding: 80px;
  text-align: center;
  color: var(--brand);
}
#auth-root {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-story {
  background: var(--ink);
  color: #fff;
  padding: 55px 65px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}
.auth-story .brand {
  color: white;
}
 .auth-story .brand-mark {
  background: var(--brand);
  color: #fff;
}
.auth-story h1 {
  max-width:100%;
  font-size: var(--type-display);
  line-height: 1.12;
  letter-spacing: -.04em;
  margin: 20px 0 25px;
}
.auth-story .eyebrow {
  color: #D7C9FF;
}
.auth-story p {
  color: #D9D7E0;
  font-size: 14px;
  line-height: 1.9;
}
.auth-story>small {
  letter-spacing: 2px;
  color: #AAA7B4;
  font-size: 12px;
}
.auth-note {
  margin-top: 40px;
  padding-left: 18px;
  border-left: 2px solid var(--brand);
  font-size: 12px;
  line-height: 1.9;
  color: #D9D7E0;
}
.auth-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 55px 35px;
  background: var(--bg);
}
.auth-side form {
  width: 100%;
  max-width: 390px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 18px 48px rgba(22,20,31,.055);
}
.auth-kicker {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--brand);
}
.auth-side h2 {
  font:600 27px var(--font-display);
  letter-spacing: -1px;
  margin: 16px 0 12px;
}
.auth-side p {
  font-size: 14px;
  color: var(--secondary);
  margin-bottom: 28px;
}
.auth-side .field {
  margin-bottom: 18px;
}
.auth-side .field input {
  padding: 13px;
  background: var(--paper);
}
.auth-side form>.button {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}
.auth-side form>small {
  margin-top: -9px;
  margin-bottom: 10px;
}
.auth-side .inline-error {
  color: #B5474F;
  min-height: 18px;
  margin: 13px 0;
}
.auth-switch {
  text-align: center;
  margin-top: 22px;
}
.auth-switch .text-button {
  font-size: 12px;
  font-weight: 600;
  margin-left: 4px;
}
.auth-local {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 32px;
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.7;
}
button:disabled {
  opacity: .6;
  cursor: wait;
}
.saving .app,.saving .sidebar,.saving dialog {
  pointer-events: none;
}
.saving:after {
  content: 'Salvando na sua conta…';
  position: fixed;
  bottom: 20px;
  right: 22px;
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 7px;
  z-index: 100;
  font-size: 12px;
}
@media(max-width:800px) {
  #auth-root {
    grid-template-columns: 1fr;
  }
  .auth-story {
    min-height: 0;
    padding: 25px 30px;
  }
  .auth-story>div,.auth-story>small {
    display: none;
  }
  .auth-story .brand {
    font-size: 27px;
  }
  .auth-side {
    min-height: calc(100vh - 85px);
    padding: 35px 24px;
  }
  .auth-side h2 {
    font-size: 25px;
  }
}
.report-list {
  padding: 20px 24px;
}
.report-list>div {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--secondary);
}
.report-list strong {
  color: var(--muted);
}
.report-score { display:flex; align-items:center; gap:20px; padding:18px 24px 22px; }
.report-gauge,.health-gauge { position:relative; flex:0 0 auto; display:grid; place-items:center; }
.report-gauge { width:112px; height:112px; }
.report-gauge svg,.health-gauge svg { display:block; width:100%; height:100%; transform:rotate(-90deg); }
.report-gauge circle,.health-gauge circle { fill:none; stroke-width:8; }
.report-gauge-track { stroke:var(--surface-muted); }
.health-gauge-track { stroke:var(--line); }
.report-gauge-value,.health-gauge-value { stroke:var(--red); stroke-linecap:round; }
.report-gauge-value { transition:stroke-dashoffset .25s ease; }
.report-score.clear .report-gauge-value { stroke:var(--green); }
.report-gauge>span,.health-gauge-copy { position:absolute; inset:0; display:grid; align-content:center; justify-items:center; }
.report-gauge strong { color:var(--ink); font:700 21px/1 var(--font-display); }
.report-score.at-risk .report-gauge strong { color:var(--red); }
.report-score.clear .report-gauge strong { color:var(--green); }
.report-gauge small { margin-top:4px; color:var(--muted); font-size:12px; }
.report-risk-summary { display:grid; gap:6px; min-width:0; }
.report-risk-summary strong { color:var(--ink); font-size:15px; }
.report-risk-summary span { color:var(--ink); font-size:14px; }
.report-risk-summary small { color:var(--muted); font-size:13px; line-height:1.4; }
}
.mini-metrics {
  margin-top: -8px;
}
.attachment-box {
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  padding: 15px;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.attachment-input {
  font-size: 12px;
  color: var(--secondary);
}
.attachment-box small {
  margin: 0;
}
/* Design system SaaS: planos e administração */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
  max-width: 1100px;
}
.plan-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.plan-card.current {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft),var(--shadow-card);
}
.plan-kicker {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--brand);
  font-weight: 700;
}
.plan-card h2 {
  font: 700 22px var(--font-display);
  margin: 13px 0 5px;
}
.plan-card>strong {
  font:600 28px var(--font-display);
  color: var(--brand);
  letter-spacing: -1px;
}
.plan-card p {
  color: var(--muted);
  font-size: 14px;
  min-height: 48px;
}
.plan-card ul {
  list-style: none;
  margin: 14px 0 24px;
  padding: 0;
  display: grid;
  gap: 12px;
  color: var(--secondary);
  font-size: 14px;
}
.plan-card li:before {
  content: '✓';
  color: var(--brand);
  font-weight: 700;
  margin-right: 9px;
}
.plan-card .button,.plan-card>.help-text {
  margin-top: auto;
}
.billing-note {
  max-width: 1100px;
  margin-top: 18px;
}
.field input[readonly] {
  background: var(--paper-soft);
  color: var(--secondary);
  cursor: not-allowed;
}
@media(max-width:950px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .plan-card {
    min-height: auto;
  }
}
/* Dashboard operacional */
.dashboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0 18px;
}
.dashboard-controls strong {
  font: 600 13px var(--font-ui);
  color: var(--brand);
}
.dashboard-controls small {
  margin-top: 3px;
}
.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--paper-soft);
  border-radius: 8px;
}
.segmented button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--secondary);
  font-size: 12px;
}
.segmented button.active {
  background: var(--paper);
  color: var(--brand);
  box-shadow: 0 1px 3px rgba(22,20,31,.08);
  font-weight: 600;
}
.dashboard-signal-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
  margin: -5px 0 23px;
}
.signal-card {
  background: var(--paper-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 17px;
}
.signal-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.signal-card strong {
  display: block;
  font:600 20px var(--font-display);
  letter-spacing: -.5px;
  color: var(--muted);
  margin: 8px 0 3px;
}
.signal-card small {
  margin: 0;
}
.priority-list {
  padding: 11px 22px 22px;
  display: grid;
  gap: 1px;
}
.priority-list a,.priority-list button,.priority-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
}
.priority-list a:last-child,.priority-list button:last-child,.priority-list span:last-child {
  border-bottom: 0;
}
.priority-list strong {
  color: #8A4C27;
  font-weight: 600;
}
.priority-list span {
  color: var(--muted);
}
@media(max-width:700px) {
  .dashboard-controls {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
  .dashboard-signal-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .signal-card {
    padding: 14px;
  }
}
/* Indicadores comerciais do administrador */
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.admin-kpis section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.admin-kpis span {
  display: block;
  font-size: 14px;
  color: var(--muted);
}
.admin-kpis strong {
  display: block;
  margin: 10px 0 3px;
  font:600 23px var(--font-display);
  letter-spacing: -.6px;
  color: var(--brand);
}
.admin-kpis small {
  margin: 0;
}
.admin-toolbar {
  align-items: center;
}
.admin-toolbar .filters {
  flex-wrap: wrap;
}
.admin-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-status.is-active {
  color: var(--green);
  background: var(--success-soft);
}
.admin-status.is-trial {
  color: #946000;
  background: var(--warning-soft);
}
.admin-status.is-risk {
  color: var(--red);
  background: var(--danger-soft);
}
@media(max-width:900px) {
  .admin-kpis {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:600px) {
  .admin-kpis {
    grid-template-columns: 1fr;
  }
  .admin-toolbar .filters {
    width: 100%;
  }
}
/* Separação entre backoffice e aplicativo do assinante */
.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  margin: 0 0 22px;
}
.admin-action-grid a {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 20px 22px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--brand);
  position: relative;
  padding-right: 54px;
}
.admin-action-grid strong {
  font:600 14px var(--font-ui);
}
.admin-action-grid span {
  font-size: 12px;
  color: var(--muted);
}
.preview-banner {
  margin: 0 0 18px;
  padding: 14px 17px;
  border: 1px solid var(--line-soft);
  background: var(--paper-soft);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}
.admin-preview-top {
  margin: -10px 0 16px;
}
@media(min-width:651px) and (max-width:900px) {
  .settings-complete .form-grid { grid-template-columns: minmax(0,1fr); }
  .settings-complete .field.full { grid-column: auto; }
}
@media(max-width:650px) {
  .admin-action-grid {
    grid-template-columns: 1fr;
  }
}
/* Calendário operacional */
.calendar-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap:20px;
  border: 1px solid rgba(255,255,255,.12);
  background: var(--focal-soft);
  color:#fff;
  border-radius: 20px;
  padding: 20px 24px;
  margin: 0 0 20px;
  box-shadow:0 14px 32px rgba(31,24,52,.13),inset 0 1px rgba(255,255,255,.08);
}
.calendar-summary span,.calendar-summary small {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,.68);
}
.calendar-summary strong {
  display: block;
  font:700 27px/1.15 var(--font-display);
  letter-spacing: -.7px;
  color: #fff;
  margin: 5px 0;
}
.calendar-summary a {
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:0 15px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  background:rgba(255,255,255,.07);
  color:#E4D9FF;
  font-size:14px;
  font-weight:600;
}
.calendar-panel {
  margin-bottom: 20px;
  padding: 0 20px 20px;
}
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.calendar-head h2 {
  text-transform: capitalize;
  margin: 0;
  font-size: 19px;
}
.calendar-head .icon-button {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 17px;
}
.calendar-weekdays,.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
}
.calendar-weekdays {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.calendar-weekdays span {
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}
.calendar-cell {
  min-height: 100px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper);
  padding: 11px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
}
.calendar-cell:nth-child(7n) {
  border-right: 0;
}
.calendar-cell span {
  font-size: 15px;
  font-weight: 600;
}
.calendar-cell small {
  font-size: 12px;
  color: var(--muted);
}
.calendar-cell strong {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.calendar-cell.has-events {
  background: var(--surface-hover);
  cursor: pointer;
}
.calendar-cell.has-events:hover,.calendar-cell.selected {
  background: var(--brand);
  color:#fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2),0 7px 16px rgba(109,59,245,.2);
}
.calendar-cell.selected small,.calendar-cell.selected strong { color:rgba(255,255,255,.82); }
.calendar-cell.today span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}
.calendar-cell.blank {
  background: var(--paper-soft);
}
.calendar-agenda {
  margin-bottom: 20px;
}
.calendar-payment-list {
  padding: 8px 22px 18px;
}
.calendar-payment {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 16px 0;
  text-align: left;
  border-radius:14px;
  transition:background-color var(--motion-fast) var(--ease-standard),padding var(--motion-fast) var(--ease-standard);
}
.calendar-payment:hover { padding-right:12px; padding-left:12px; background:var(--brand-soft); }
.calendar-payment:last-child {
  border: 0;
}
.calendar-payment span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 15px;
  color: var(--muted);
}
.calendar-payment small {
  font-size: 12px;
  color: var(--muted);
}
.calendar-payment b {
  margin-left: auto;
  font-size: 15px;
  color: var(--muted);
}
.calendar-empty {
  padding: 25px;
}
@media(max-width:650px) {
  .calendar-panel {
    padding: 0 10px 10px;
    border-radius:22px;
  }
  .calendar-grid,.calendar-weekdays {
    min-width:0;
    gap:4px;
    border:0;
  }
  .calendar-cell {
    min-height:60px;
    min-width:0;
    padding:6px 2px;
    border:0;
    border-radius:18px;
    align-items: center;
    text-align: center;
  }
  .calendar-cell small {
    display:none;
  }
  .calendar-cell.has-events small { display:grid; place-items:center; width:5px; height:5px; margin-top:1px; overflow:hidden; border-radius:50%; background:var(--brand); color:transparent; font-size:0; }
  .calendar-cell.selected.has-events small { background:var(--paper); }
  .calendar-cell span { display:grid; place-items:center; width:30px; height:30px; flex:0 0 auto; border-radius:50%; font-size:14px; }
  .calendar-cell.selected span { background:rgba(255,255,255,.18); color:#fff; }
  .calendar-cell.today:not(.selected) span { background:var(--brand-soft); color:var(--brand); }
  .calendar-cell strong {
    display: none;
  }
  .calendar-weekdays span {
    font-size: 11px;
  }
  .calendar-summary {
    align-items:center;
    gap:8px;
    padding:16px 17px;
    border-radius:18px;
  }
  .calendar-summary > div { min-width:0; }
  .calendar-summary span,.calendar-summary small { font-size:12px; }
  .calendar-summary strong { font-size:23px; }
  .calendar-summary a { flex:0 0 auto; min-height:38px; padding:0 11px; font-size:12px; }
  .calendar-head { padding:14px 0; }
  .calendar-head h2 { font-size:18px; }
  .calendar-head .icon-button { width:40px; height:40px; }
  .calendar-payment-list { padding:6px 16px 14px; }
  .calendar-payment { display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:10px; padding:13px 8px; }
  .calendar-payment b { font-size:14px; }
  .calendar-payment span:nth-child(2) { font-size:14px; }
  .calendar-payment small { font-size:12px; }
  .calendar-empty { padding:18px 16px; font-size:14px;
  }
}
@media(max-width:950px) {
  h1 {
    font-size: 30px;
  }
  .metric-value {
    font-size: 29px;
  }
}
@media(max-width:650px) {
  body {
    font-size: 15px;
  }
  header {
    height: calc(60px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 14px 0;
  }
  main {
    padding-top: 20px;
  }
  h1 {
    font-size: 28px;
  }
  .nav-item {
    font-size: 15px;
    padding: 14px;
  }
  .button {
    font-size: 14px;
    min-height: 44px;
  }
  .metric {
    min-height: 150px;
  }
  .metric-value {
    min-width:0;
    font-size:clamp(20px,5.2vw,24px);
    line-height:1.2;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .calendar-cell { min-height:52px; }
  .calendar-cell.blank { visibility:hidden; }
}
.filter-trigger {
  height: 43px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--muted);
  font: 600 13px var(--font-ui);
  white-space: nowrap;
  cursor: pointer;
}
.filter-trigger:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.filter-trigger.has-filters {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--muted);
}
.filter-trigger b {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
}
@media(max-width:800px) {
  .loan-toolbar {
    align-items: stretch;
  }
  .loan-toolbar .filters {
    flex: none;
  }
  .filter-trigger {
    align-self: flex-start;
  }
}
/* Oculta identificadores técnicos que não fazem parte da navegação. */
.beta,.demo-pill {
  display: none!important;
}
.search-results {
  margin-top: 18px;
  max-height: 310px;
  overflow: auto;
}
.search-result {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  background: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 14px 2px;
  color: var(--muted);
}
.search-result small {
  font-size: 12px;
  color: var(--muted);
}
.collection-section {
  margin-top: 20px;
}
.metrics.collection-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.collection-automation-panel { margin:20px 0; overflow:hidden; }
.collection-automation-panel > .settings-note { margin:0 24px 12px; }
.automation-history { display:grid; padding:0 24px; }
.automation-event { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; padding:20px 0; border-top:1px solid var(--line); }
.automation-event > .row-action { grid-column:2; justify-self:end; }
.automation-event > div { display:grid; gap:4px; min-width:0; }
.automation-event strong { color:var(--ink); font-size:15px; }
.automation-event small { color:var(--muted); font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.collection-automation-toggle { display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--paper); cursor:pointer; }
.collection-automation-toggle input { width:20px; height:20px; margin:1px 0 0; accent-color:var(--brand); flex:0 0 auto; }
.collection-automation-toggle span { display:grid; gap:4px; }
.collection-automation-toggle strong { color:var(--ink); font-size:15px; }
.collection-automation-toggle small { color:var(--muted); font-size:13px; line-height:1.45; }
@media (max-width:640px) {
  .metrics.collection-metrics { grid-template-columns:1fr; }
  .automation-history { padding:0 18px; }
  .collection-automation-panel > .settings-note { margin:0 18px 12px; }
  .automation-event { grid-template-columns:minmax(0,1fr) auto; gap:8px; }
  .automation-event .row-action { grid-column:1/-1; justify-self:start; }
}
.collection-list {
  padding: 8px 24px;
}
.collection-row {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  grid-template-areas: 'date person amount' 'date actions actions';
  align-items: center;
  column-gap: 14px;
  row-gap: 10px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.collection-row:last-child {
  border: 0;
}
.collection-row>div:first-child {
  grid-area: date;
}
.collection-row>div:nth-child(2) {
  grid-area: person;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.collection-row strong {
  font-size: 14px;
}
.collection-row small {
  font-size: 12px;
  color: var(--muted);
}
.collection-row>b {
  grid-area: amount;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.collection-row.late>b {
  color: #B5474F;
}
.collection-actions {
  grid-area: actions;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.collection-actions .row-action {
  min-width: 0;
}
@media(max-width:750px) {
  .collection-list {
    padding: 8px 16px;
  }
  .collection-row {
    grid-template-columns: 42px minmax(0,1fr);
    grid-template-areas: 'date person' 'amount amount' 'actions actions';
    gap: 10px;
  }
  .collection-row>b {
    justify-self: start;
  }
  .collection-actions {
    padding-top: 2px;
  }
}
.collection-amounts {
  display: flex!important;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--secondary)!important;
  font-size: 12px!important;
}
.collection-amounts:before {
  content: 'Valores';
  font-weight: 600;
  color: var(--muted);
  background: var(--paper-soft);
  border-radius: 4px;
  padding: 3px 5px;
}
.collection-row .row-action {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}
.collection-row [data-copy-collection],.collection-row [data-copy-pix] {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding-left: 5px;
  padding-right: 5px;
}
.collection-row [data-copy-collection]:hover,.collection-row [data-copy-pix]:hover {
  background: var(--paper-soft);
  border-color: var(--paper-soft);
}
.partial-payment-note {
  margin: 8px 0 0;
  border-top: 1px solid var(--line);
  padding: 11px 0 0;
  color: var(--muted);
}
@media(max-width:950px) {
  .collection-row {
    grid-template-columns: 42px minmax(180px,1fr) auto;
  }
  .collection-row>b {
    grid-column: 3;
  }
  .collection-row>a {
    grid-column: 2;
  }
  .collection-row>button {
    grid-column: auto;
  }
  .collection-row .collection-amounts {
    grid-column: 1/-1;
    padding-left: 0;
  }
}
/* Histórico financeiro: cada comprovante aparece no recebimento correspondente. */
.payment-history {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0 20px;
}
.payment-record {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.payment-record:last-child {
  border: 0;
}
.payment-record.is-reversed {
  background: var(--danger-soft);
}
.payment-record-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.payment-record-main strong {
  font:600 16px var(--font-ui);
  color: var(--muted);
}
.payment-record-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.payment-proofs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-right: auto;
}
.payment-proofs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proof-attach {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.proof-attach:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.proof-attach input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.contract-documents {
  margin-top: 8px;
}
@media(max-width:650px) {
  .payment-record {
    padding: 14px;
  }
  .payment-record-actions {
    align-items: stretch;
  }
  .payment-proofs {
    width: 100%;
  }
  .proof-attach,.payment-record-actions .row-action {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
  .payment-record-main {
    font-size: 12px;
  }
}
/* Ações de cobrança ficam sempre dentro do cartão, inclusive quando há PIX. */
.collection-row .collection-amounts {
  grid-column: auto;
  padding-left: 0;
}
@media(max-width:750px) {
  .collection-row {
    grid-template-columns: 42px minmax(0,1fr);
    grid-template-areas: 'date person' 'amount amount' 'actions actions';
  }
  .collection-row>b {
    grid-column: auto;
  }
  .collection-row .collection-amounts {
    grid-column: auto;
  }
}
/* Financeiro: números separados por significado, com leitura direta. */
.finance-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
  margin: 0 0 18px;
}
.finance-summary {
  display: flex;
  flex-direction: column;
}
.finance-amount {
  padding: 27px 26px 20px;
  background: var(--paper-soft);
  margin-top: 22px;
}
.finance-amount strong {
  display: block;
  font:600 33px var(--font-display);
  letter-spacing: -1.2px;
  color: var(--green);
}
.finance-amount span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--secondary);
}
.finance-flow-chart {
  display:grid;
  gap:19px;
  padding:20px 24px 16px;
}
.finance-flow-axis,.finance-flow-scale,.finance-flow-row>div:first-child {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:14px;
}
.finance-flow-axis { color:var(--muted); font-size:12px; }
.finance-flow-axis strong { color:var(--ink); font-size:12px; font-weight:600; white-space:nowrap; }
.finance-flow-row>div:first-child { color:var(--ink); font-size:14px; }
.finance-flow-row>div:first-child span { display:grid; gap:3px; }
.finance-flow-row small { color:var(--muted); font-size:12px; }
.finance-flow-row b { font:600 15px var(--font-ui); white-space:nowrap; }
.finance-flow-track {
  height:12px;
  margin-top:8px;
  overflow:hidden;
  border-radius:999px;
  background:var(--surface-muted);
}
.finance-flow-track span { display:block; height:100%; border-radius:inherit; background:var(--brand); }
.finance-flow-row.outflow .finance-flow-track span { background:#9693A0; }
.finance-flow-scale { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.finance-flow-net {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
  margin:0 24px;
  padding:14px 0 20px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:14px;
}
.finance-flow-net b { color:var(--ink); font:700 17px var(--font-display); white-space:nowrap; }
.finance-flow-net .late-money,.late-money {
  color: #B5474F;
}
.finance-flow-empty { padding:22px 24px; color:var(--muted); font-size:14px; }
.finance-breakdown-wide {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  padding-top: 2px;
}
.finance-breakdown-wide>div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
.finance-breakdown-wide b {
  font-size: 18px;
}
.finance-list {
  padding: 2px 26px 18px;
}
.finance-list button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}
.finance-list button:last-child {
  border-bottom: 0;
}
.finance-list button:hover {
  color: var(--muted);
}
.finance-list span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.finance-list strong {
  font-size: 13px;
}
.finance-list small {
  font-size: 12px;
  color: var(--muted);
}
.finance-list b {
  font:600 14px var(--font-ui);
  white-space: nowrap;
}
.finance-empty {
  margin: 0 26px 20px;
}
@media(max-width:850px) {
  .finance-grid {
    grid-template-columns: 1fr;
  }
  .finance-breakdown-wide {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .finance-breakdown-wide>div {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}
@media(max-width:650px) {
  .finance-amount {
    padding: 22px 18px 17px;
  }
  .finance-amount strong {
    font-size: 28px;
  }
  .finance-flow-chart,.finance-list {
    padding-left: 18px;
    padding-right: 18px;
  }
  .panel-head { flex-wrap:wrap; align-items:flex-start; }
  .panel-head>.actions { width:100%; flex-wrap:wrap; }
  .panel-head>.actions .button { flex:1 1 145px; justify-content:center; }
  .finance-flow-net { margin-left:18px; margin-right:18px; }
  .finance-flow-empty { padding-left:18px; padding-right:18px; }
  .report-score { gap:14px; padding:16px 18px 20px; }
  .report-gauge { width:100px; height:100px; }
  .report-risk-summary strong { font-size:14px; }
  .report-risk-summary span,.report-risk-summary small { font-size:13px; }
  .finance-empty {
    margin-left: 18px;
    margin-right: 18px;
  }
  .finance-list button {
    padding: 14px 0;
  }
}
.cash-list {
  padding: 5px 26px 18px;
}
.cash-row {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.cash-row:last-child {
  border-bottom: 0;
}
.cash-date {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
}
.cash-date strong {
  font:600 13px var(--font-ui);
}
.cash-date small,.cash-description small {
  font-size: 12px;
  color: var(--muted);
}
.cash-description {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cash-description strong {
  font-size: 14px;
}
.cash-description small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cash-amount {
  font:600 14px var(--font-ui);
  white-space: nowrap;
}
.cash-amount.in {
  color: var(--muted);
}
.cash-amount.out {
  color: #B5474F;
}
@media(max-width:650px) {
  .cash-list {
    padding: 5px 18px 18px;
  }
  .cash-row {
    grid-template-columns: 48px minmax(0,1fr);
    gap: 12px;
  }
  .cash-amount {
    grid-column: 2;
    justify-self: start;
    font-size: 13px;
  }
}
.client-timeline {
  border-left: 2px solid var(--line-soft);
  margin: 8px 0 20px;
  padding-left: 18px;
}
.client-timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 0 0 18px;
  color: var(--muted);
}
.client-timeline-item:before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  border: 2px solid var(--line-soft);
}
.client-timeline-item:last-child {
  padding-bottom: 0;
}
.client-timeline-item strong {
  font-size: 13px;
}
.client-timeline-item small {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.client-timeline-item span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.client-timeline-item div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
}
@media(max-width:650px) {
  .client-timeline {
    padding-left: 15px;
  }
  .client-timeline-item:before {
    left: -21px;
  }
}
@media(max-width:650px) {
  .settings { padding: 18px 14px 30px; gap: 14px; }
  .settings section { padding: 18px 16px 20px; }
  .settings-section-head { gap: 11px; }
  .settings-icon { flex-basis: 38px; width: 38px; height: 38px; }
  .settings-complete,.settings-complete section,.settings-complete form,.settings-complete .form-grid {
    min-width: 0;
    width: 100%;
  }
  .settings-complete .form-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .settings-complete .field.full {
    grid-column: auto;
  }
  .settings-complete .field,.settings-complete .field>* {
    min-width: 0;
    max-width: 100%;
  }
  .settings-complete .field input,.settings-complete .field select,.settings-complete .field textarea {
    width: 100%;
  }
  .settings-complete .form-actions {
    flex-wrap: wrap;
  }
  .settings-complete .form-actions .button {
    white-space: normal;
  }
}
@media(max-width:650px) {
  .metrics {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .metric {
    min-width: 0;
  }
}
nav .nav-item .icon {
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 50%;
  background: transparent;
  color: var(--secondary);
  transition: background-color .16s ease,color .16s ease;
}
.nav-item.active .icon {
  background: transparent;
  color: #fff;
}
.nav-item:hover .icon {
  color: var(--ink);
}
.nav-item.active:hover {
  background: var(--brand-hover);
  color: #fff;
}
.metric:hover {
  transform: translateY(-2px);
  border-color: #D8CFF5;
  box-shadow: var(--shadow-lift);
}
.metric.featured .metric-top .icon {
  background: var(--brand-soft);
  color: var(--brand);
}
.metric.warning {
  border-color: var(--danger-soft);
  background: var(--paper);
}
.metric.warning .metric-top .icon {
  background: var(--danger-soft);
  color: var(--red);
}
.panel-head .icon {
  width: 17px;
  height: 17px;
}
tbody tr:hover {
  background: var(--paper-soft);
}
.button:not(.primary):hover {
  background: var(--surface-muted);
  border-color: #C9B9F8;
  color: var(--ink);
  transform: translateY(-1px);
}
.icon-button:hover {
  background: var(--surface-muted);
  border-color: #C9B9F8;
  color:var(--brand);
}
.profile:hover {
  background: var(--surface-muted);
}
.profile-arrow .icon {
  width: 18px;
  height: 18px;
  color: var(--secondary);
}
.priority-list .priority-clear {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.priority-clear .icon {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.admin-action-grid a > .icon {
  position: absolute;
  right: 20px;
  top: 50%;
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  transform: translateY(-50%);
}
.admin-preview-top .button .icon {
  width: 18px;
  height: 18px;
}
.text-button .icon {
  width: 17px;
  height: 17px;
}
[data-action="global-search"] {
  gap: 8px;
}
[data-action="global-search"] .icon {
  width: 18px;
  height: 18px;
}
#mobile-menu .icon {
  width: 22px;
  height: 22px;
}
.mobile-more-links { display:grid; gap:18px; }
.mobile-more-group { display:grid; gap:5px; }
.mobile-more-group-title { padding:0 8px 5px; color:var(--tertiary); font-size:11px; font-weight:700; letter-spacing:1px; }
.mobile-more-link { display:flex; align-items:center; gap:12px; min-height:50px; padding:9px 12px; border:1px solid transparent; border-radius:14px; background:transparent; color:var(--ink); font:600 15px/1.3 var(--font-ui); text-align:left; }
.mobile-more-link>.icon:first-child { width:20px; height:20px; color:var(--muted); }
.mobile-more-link>.icon:last-child { width:16px; height:16px; margin-left:auto; color:var(--tertiary); }
.mobile-more-link.active { border-color:#E8E0FF; background:var(--brand-soft); color:var(--brand); }
.mobile-more-link.active>.icon:first-child { color:var(--brand); }
.mobile-more-header { display:flex; align-items:center; justify-content:space-between; min-height:54px; margin-bottom:16px; }
.mobile-more-header .eyebrow { margin:0 0 2px; color:var(--tertiary); font-size:10px; letter-spacing:1px; }
.mobile-more-header h2 { margin:0; font:700 21px/1.2 var(--font-display); }
.mobile-more-handle { width:38px; height:4px; margin:0 auto 16px; border-radius:4px; background:#D7D4DE; }
.mobile-more-sheet { display:grid; max-height:min(84dvh,760px); overflow:auto; padding:10px 20px calc(22px + env(safe-area-inset-bottom)); border:1px solid #E8E4EF; border-bottom:0; border-radius:24px 24px 0 0; background:var(--paper); box-shadow:0 -14px 44px rgba(22,20,31,.12); overscroll-behavior:contain; }
.mobile-more::backdrop { background:rgba(22,20,31,.3); backdrop-filter:blur(3px); }
.close .icon {
  width: 20px;
  height: 20px;
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Movimento de navegação: a página entra uma vez por rota, sem animar formulários. */
@keyframes route-appear { from { opacity:.6; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
#main.route-enter { animation:route-appear var(--motion-route) var(--ease-standard) both; }

/* O backoffice mantém a paleta do Nexo, com uma estrutura mais sóbria. */
body[data-role="admin"] .sidebar { background:#F9F8FC; border-right-color:#DED9EB; }
body[data-role="admin"] .workspace { background:#F0EDF7; border-color:#E4DDF4; }
body[data-role="admin"] .nav-item.active { background:#29233C; box-shadow:0 5px 14px rgba(41,35,60,.14); }
body[data-role="admin"] .nav-item.active:hover { background:#39314F; }

/* Componentes compartilhados: cor, foco e resposta consistentes em cada domínio. */
.nav-item.active .icon { background:rgba(255,255,255,.16); }
.nav-item:hover { transform:translateX(2px); }
.button:active,.icon-button:active,.row-action:active { transform:translateY(1px) scale(.985); }
.field input,.field select,.field textarea,.search,.period {
  transition:border-color var(--motion-fast) var(--ease-standard),box-shadow var(--motion-fast) var(--ease-standard),background-color var(--motion-fast) var(--ease-standard);
}
.field input:focus,.field select:focus,.field textarea:focus,.search:focus {
  border-color:var(--brand);
  box-shadow:0 0 0 4px var(--focus);
}
.panel { border-color:var(--line-soft); }
th { color:#696674; }
tbody tr { transition:background-color var(--motion-fast) var(--ease-standard); }
.empty { color:#696674; }
.empty h2 { color:var(--ink); }
.badge.paid,.badge.success { color:#21784D; background:var(--success-soft); }
.badge.warning,.badge.trial { color:#8A5A00; background:var(--warning-soft); }
.badge.late,.badge.danger { color:#B53B4B; background:var(--danger-soft); }
#toast { box-shadow:var(--shadow-pop); }
dialog { box-shadow:var(--shadow-pop); border-color:#E9E5F0; }

/* Navegação por áreas do trabalho e novos módulos da carteira */
[hidden] { display:none !important; }
.nav-label { display:none; }
#nav { display:grid; gap:15px; }
.nav-group { display:grid; gap:4px; }
.nav-group-title { color:var(--tertiary); font-size:12px; font-weight:700; letter-spacing:1.25px; margin:3px 11px 3px; }
.nav-item { min-height:44px; }
.overview-alert { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:12px; min-width:0; margin:-10px 0 14px; padding:12px 14px; border:1px solid var(--warning); border-radius:var(--radius-md); background:var(--warning-soft); color:var(--ink); box-shadow:var(--shadow-card); animation:overview-arrive .38s var(--ease-standard) both; }
.overview-alert.danger { border-color:var(--red); background:var(--danger-soft); color:var(--ink); }
.overview-alert-mark { display:grid; place-items:center; width:38px; height:38px; border-radius:var(--radius-sm); background:var(--warning); color:var(--brand-contrast); }
.overview-alert.danger .overview-alert-mark { background:var(--red); color:var(--brand-contrast); }
.overview-alert-mark .icon { width:20px; height:20px; }
.overview-alert-copy { display:grid; gap:2px; min-width:0; }
.overview-alert-copy strong { font-size:14px; line-height:1.3; }
.overview-alert-copy small { overflow:hidden; color:inherit; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.overview-alert>a { display:inline-flex; align-items:center; gap:5px; min-height:40px; padding:0 12px; border:1px solid var(--line); border-radius:var(--radius-pill); background:var(--surface-raised); color:inherit; font-size:13px; font-weight:700; white-space:nowrap; }
.overview-alert.danger>a { border-color:var(--line); }
.overview-alert>a .icon { width:15px; height:15px; }
.overview-hero { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(285px,.85fr); gap:14px; margin:0 0 14px; overflow:visible; animation:overview-arrive .42s var(--ease-standard) both; }
.overview-balance { position:relative; isolation:isolate; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; min-width:0; min-height:232px; padding:28px 30px; overflow:hidden; border:1px solid rgba(255,255,255,.08); border-radius:var(--radius-xl); background:linear-gradient(152deg,var(--focal-soft) 0%,var(--focal) 48%,#0D0B14 100%); color:var(--on-focal); box-shadow:var(--shadow-focal),inset 0 1px 0 rgba(255,255,255,.10); }
/* Brilho de marca: dá a profundidade iridescente sem lavar o valor. */
.overview-balance:before { position:absolute; z-index:-1; inset:0; content:""; pointer-events:none; background:radial-gradient(560px 300px at 88% -12%,rgba(139,99,255,.40),transparent 66%),radial-gradient(420px 260px at 4% 108%,rgba(67,135,245,.20),transparent 62%); }
.overview-balance:after { position:absolute; z-index:-1; top:-118px; right:-80px; width:276px; height:276px; border:1px solid rgba(255,255,255,.12); border-radius:50%; box-shadow:0 0 0 22px rgba(255,255,255,.035),0 0 0 50px rgba(255,255,255,.022),0 0 0 82px rgba(255,255,255,.012); content:""; pointer-events:none; }
.overview-balance-label { display:flex; align-items:center; gap:10px; color:var(--on-focal-muted); font-size:12px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; }
.overview-wallet-mark { display:grid; place-items:center; width:38px; height:38px; border-radius:13px; color:var(--brand); background:var(--brand-soft); }
.overview-wallet-mark .icon { width:20px; height:20px; }
.overview-balance>strong { max-width:100%; margin:14px 0 8px; color:var(--on-focal); font:700 clamp(40px,4.2vw,62px)/1 var(--font-display); letter-spacing:-2.4px; font-variant-numeric:tabular-nums; text-shadow:0 2px 18px rgba(0,0,0,.35); }
.overview-balance>p { max-width:560px; margin:0; color:var(--on-focal-muted); font-size:13px; line-height:1.5; }
.overview-allocation { width:100%; margin-top:19px; padding-top:14px; border-top:1px solid rgba(255,255,255,.12); }
.overview-allocation-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:9px; color:var(--on-focal); font-size:12px; font-weight:700; }
.overview-allocation-head>a { display:inline-flex; align-items:center; gap:4px; min-height:30px; color:#CBB8FF; font-size:12px; }
.overview-allocation-head>a .icon { width:14px; height:14px; }
.overview-allocation-track { display:flex; width:100%; height:10px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.10); box-shadow:inset 0 1px 3px rgba(0,0,0,.34); }
.overview-allocation-track>span { display:block; min-width:0; height:100%; transform-origin:left; animation:allocation-fill .85s var(--ease-standard) both; }
.overview-allocation-track .cash { background:var(--green); }
.overview-allocation-track .principal { background:#9C7AFF; }
.overview-allocation-legend { display:flex; flex-wrap:wrap; gap:8px 20px; margin-top:9px; color:var(--on-focal-muted); font-size:12px; }
.overview-allocation-legend>span { display:inline-flex; align-items:center; gap:7px; }
.overview-allocation-legend i { width:8px; height:8px; border-radius:50%; background:var(--green); }
.overview-allocation-legend i.principal { background:#9C7AFF; }
.overview-allocation-legend b { color:var(--on-focal); font-weight:700; font-variant-numeric:tabular-nums; }
.overview-cash-link { display:inline-flex; align-items:center; gap:8px; min-height:42px; margin-top:12px; padding:0 10px 0 0; border:0; border-radius:8px; background:none; color:var(--brand); font:600 14px var(--font-ui); text-decoration:none; cursor:pointer; }
.overview-cash-link .icon { width:16px; height:16px; }
.overview-cash-link:hover { color:var(--brand-hover); }
.overview-health-card { position:relative; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; min-width:0; padding:22px 24px; border:1px solid #E5E0EC; border-radius:20px; background:var(--paper); box-shadow:var(--shadow-card); }
.overview-health-card>div:first-child { min-width:0; }
.overview-health-card .eyebrow { margin:0 0 7px; color:var(--muted); font-size:11px; }
.overview-health-card h2 { margin:0 0 5px; color:var(--ink); font:700 17px/1.3 var(--font-display); }
.overview-health-card p:not(.eyebrow) { margin:0; color:var(--muted); font-size:13px; line-height:1.4; }
.overview-health-card .text-button { margin:10px 0 0 -8px; color:var(--brand); font-size:13px; }
.overview-health-card .health-gauge { width:106px; height:106px; filter:drop-shadow(0 7px 12px rgba(22,20,31,.12)); }
.overview-health-card .health-gauge-copy strong { font-size:27px; }
.overview-health-card .health-gauge-copy small { font-size:11px; }
.overview-kpi-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 20px; padding:0; }
.overview-kpi { position:relative; display:grid; align-content:start; gap:5px; min-width:0; min-height:126px; padding:17px 16px 15px; border:1px solid var(--line-soft); border-radius:var(--radius-lg); background:var(--surface-raised); box-shadow:var(--shadow-card),var(--glass-edge); transition:transform .22s var(--ease-out),box-shadow .22s var(--ease-out); animation:overview-kpi-arrive .52s var(--ease-standard) both; }
.overview-kpi:nth-child(2) { animation-delay:55ms; }
.overview-kpi:nth-child(3) { animation-delay:110ms; }
.overview-kpi:nth-child(4) { animation-delay:165ms; }
.overview-kpi-label { max-width:calc(100% - 42px); color:var(--muted); font-size:13px; font-weight:600; line-height:1.3; }
.overview-kpi-mark { position:absolute; top:13px; right:13px; display:grid; place-items:center; width:34px; height:34px; border-radius:11px; background:var(--brand-soft); color:var(--brand); }
.overview-kpi-mark .icon { width:17px; height:17px; }
.overview-kpi-mark.collected { background:var(--success-soft); color:var(--green); }
.overview-kpi-mark.overdue { background:var(--success-soft); color:var(--green); }
.overview-kpi.warning .overview-kpi-mark.overdue { background:var(--danger-soft); color:var(--red); }
.overview-kpi-mark.forecast { background:var(--warning-soft); color:var(--warning); }
.overview-kpi>strong { overflow:hidden; color:var(--ink); font:700 clamp(21px,2vw,28px)/1.15 var(--font-display); letter-spacing:-.7px; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.overview-kpi:first-child>strong { color:var(--green); }
.overview-kpi.forecast>strong { color:var(--warning); }
.overview-kpi.warning>strong { color:var(--red); }
.overview-kpi>small { color:var(--muted); font-size:12px; line-height:1.4; }
.overview-focus-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.85fr); gap:18px; margin-bottom:20px; }
.overview-focus-grid>.panel { min-width:0; }
.overview-section-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:22px 24px 0; }
.overview-section-head>div { min-width:0; }
.overview-section-head .eyebrow { margin:0 0 6px; color:var(--muted); font-size:11px; }
.overview-section-head h2 { margin:0 0 5px; color:var(--ink); font:700 18px/1.25 var(--font-display); letter-spacing:-.35px; }
.overview-section-head p:not(.eyebrow) { margin:0; color:var(--muted); font-size:13px; line-height:1.45; }
.overview-section-head>.text-button { flex:0 0 auto; margin-top:5px; }
.overview-week-chart { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:12px; padding:22px 24px 12px; }
.overview-week-day { display:grid; grid-template-rows:18px 94px auto auto; align-items:end; justify-items:center; gap:7px; min-width:0; }
.overview-week-value { max-width:100%; overflow:hidden; color:var(--muted); font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.overview-week-track { display:flex; align-items:flex-end; width:min(100%,40px); height:94px; overflow:hidden; border-radius:9px; background:#F1EFF5; }
.overview-week-track>span { display:block; width:100%; min-height:0; border-radius:8px; background:var(--brand); transform-origin:center bottom; animation:overview-bar-enter .62s var(--ease-standard) both; }
.overview-week-day.today .overview-week-track>span { background:var(--warning); }
.overview-week-day>strong { color:var(--ink); font-size:12px; font-weight:600; }
.overview-week-day>small { color:var(--muted); font-size:11px; }
.overview-week-total { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 24px; padding:14px 0 18px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.overview-week-total strong { color:var(--ink); font:700 16px var(--font-ui); font-variant-numeric:tabular-nums; }
.overview-due-list { display:grid; padding:0 24px 14px; }
.overview-due-list button { display:flex; justify-content:space-between; align-items:center; gap:14px; min-width:0; padding:11px 0; border:0; border-top:1px solid var(--line); background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.overview-due-list button>span { display:grid; gap:4px; min-width:0; }
.overview-due-list strong { overflow:hidden; color:var(--ink); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.overview-due-list small { color:var(--muted); font-size:12px; }
.overview-due-list b { color:var(--ink); font:700 14px var(--font-ui); font-variant-numeric:tabular-nums; white-space:nowrap; }
.overview-due-list button:hover strong { color:var(--brand); }
.overview-week-empty { display:flex; align-items:center; gap:14px; margin:20px 24px 22px; padding:17px; border-radius:13px; background:var(--surface-muted); }
.overview-week-empty-mark,.overview-clear-mark { display:grid; flex:0 0 auto; place-items:center; width:40px; height:40px; border-radius:13px; color:var(--brand); background:var(--brand-soft); }
.overview-week-empty-mark .icon,.overview-clear-mark .icon { width:20px; height:20px; }
.overview-week-empty strong,.overview-priority-clear strong { display:block; color:var(--ink); font-size:14px; }
.overview-week-empty p,.overview-priority-clear p { margin:4px 0 0; color:var(--muted); font-size:13px; line-height:1.4; }
.overview-priority-list { display:grid; padding:10px 20px 18px; }
.overview-priority-row { display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:center; gap:12px; width:100%; min-height:67px; padding:10px 4px; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.overview-priority-row:last-child { border-bottom:0; }
.overview-priority-row:hover .overview-priority-copy strong { color:var(--brand); }
.overview-priority-dot { width:9px; height:9px; border-radius:50%; background:var(--red); box-shadow:0 0 0 4px var(--danger-soft); }
.overview-priority-copy { display:grid; gap:4px; min-width:0; }
.overview-priority-copy strong { overflow:hidden; color:var(--ink); font-size:14px; text-overflow:ellipsis; white-space:nowrap; }
.overview-priority-copy small { color:var(--muted); font-size:12px; }
.overview-priority-row>b { color:var(--red); font:700 15px var(--font-ui); font-variant-numeric:tabular-nums; white-space:nowrap; }
.overview-priority-clear { display:flex; align-items:center; gap:13px; min-height:116px; padding:18px 6px; }
.overview-clear-mark { color:var(--green); background:var(--success-soft); }
.overview-reminder-count { margin:0 24px; padding:10px 0 0; color:var(--brand); font-size:13px; font-weight:600; }
.overview-bottom-grid { margin-top:0; }
.overview-bottom-grid>.panel { min-width:0; }
.overview-hero,.overview-focus-grid>.panel,.overview-bottom-grid>.panel { transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.overview-focus-grid>.panel:hover,.overview-bottom-grid>.panel:hover { border-color:#DDD8E8; box-shadow:var(--shadow-lift); }
.overview-week-day:nth-child(2) .overview-week-track>span { animation-delay:35ms; }
.overview-week-day:nth-child(3) .overview-week-track>span { animation-delay:70ms; }
.overview-week-day:nth-child(4) .overview-week-track>span { animation-delay:105ms; }
.overview-week-day:nth-child(5) .overview-week-track>span { animation-delay:140ms; }
.overview-week-day:nth-child(6) .overview-week-track>span { animation-delay:175ms; }
.overview-week-day:nth-child(7) .overview-week-track>span { animation-delay:210ms; }
@keyframes overview-arrive { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:translateY(0); } }
@keyframes overview-kpi-arrive { from { opacity:0; transform:translateY(9px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes overview-bar-enter { from { transform:perspective(240px) rotateX(8deg) scaleY(.06); opacity:.45; } to { transform:perspective(240px) rotateX(8deg) scaleY(1); opacity:1; } }
@keyframes allocation-fill { from { transform:scaleX(.03); opacity:.45; } to { transform:scaleX(1); opacity:1; } }
@keyframes gauge-draw { from { stroke-dashoffset:var(--ring-length); } to { stroke-dashoffset:var(--ring-offset); } }
.health-panel { padding:26px; }
.health-head { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.health-head h2 { margin:2px 0 6px; }
.health-head p { margin:0; color:var(--muted); }
.health-gauge { width:112px; height:112px; color:var(--brand); }
.health-gauge circle { stroke-width:7; }
.health-gauge-value { stroke:var(--brand); stroke-linecap:round; transition:stroke-dashoffset .25s ease; }
.overview-health-card .health-gauge-value { animation:gauge-draw 1.05s var(--ease-standard) both; }
.health-gauge.health-low { color:var(--red); }
.health-gauge.health-low .health-gauge-value { stroke:var(--red); }
.health-gauge-copy strong { color:currentColor; font:700 31px/1 var(--font-display); }
.health-gauge-copy small { margin-top:3px; color:var(--muted); font-size:12px; }
.health-breakdown { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.health-factor { display:grid; align-content:start; gap:10px; min-width:0; padding:14px 15px; background:var(--surface-muted); border:1px solid var(--line); border-radius:12px; }
.health-factor-head { display:flex; justify-content:space-between; align-items:baseline; gap:8px; color:var(--muted); font-size:14px; }
.health-factor-head b { color:var(--ink); font-size:15px; text-align:right; }
.health-factor-track { height:8px; overflow:hidden; border-radius:999px; background:var(--paper); }
.health-factor-track span { display:block; height:100%; border-radius:inherit; background:var(--brand); }
.health-factor.positive .health-factor-track span { background:var(--green); }
.health-factor.negative .health-factor-head b { color:var(--red); }
.health-factor.negative .health-factor-track span { background:var(--red); }
.health-factor.unavailable .health-factor-head b { color:var(--muted); font-weight:500; }
.health-panel .help-text { font-size:13px; line-height:1.5; }
.guarantee-intro,.capital-panel,.closing-action { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:20px; padding:18px 22px; }
.guarantee-intro h2,.capital-panel h2,.closing-action h2 { margin:0 0 5px; }
.guarantee-intro p,.capital-panel p,.closing-action p { margin:0; color:var(--muted); }
.guarantee-grid,.closing-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.guarantee-card { padding:22px; }
.guarantee-card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.guarantee-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:50%; background:var(--brand-soft); color:var(--brand); }
.guarantee-card h2 { margin:0 0 6px; font-size:21px; }
.guarantee-card>p { color:var(--muted); }
.guarantee-card .detail-grid { margin:18px 0; }
.simulator-panel { padding:24px; }
.simulator-result { margin-top:24px; }
.simulator-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.simulator-summary>div { padding:16px; border-radius:12px; background:var(--paper-soft); display:grid; gap:7px; }
.simulator-summary span { color:var(--muted); font-size:14px; }
.simulator-summary strong { color:var(--brand); font:700 23px var(--font-display); }
.closing-form { display:flex; align-items:end; gap:12px; }
.closing-form .field { min-width:190px; }
.closing-card { padding:22px; }
.closing-balance { color:var(--ink); font:700 24px var(--font-display); }
/* Empréstimos: classes próprias do módulo recebem os mesmos tokens e componentes do restante do produto. */
.loan-screen { display:grid; gap:20px; min-width:0; }
.loan-screen > .page-heading { margin-bottom:0; }
.loan-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.loan-kpi { min-width:0; padding:19px 20px; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-card); }
.loan-kpis .loan-kpi:first-child { background:var(--focal-soft); border-color:var(--focal-soft); box-shadow:0 12px 28px rgba(31,24,52,.14),inset 0 1px rgba(255,255,255,.08); }
.loan-kpis .loan-kpi:first-child > div:first-child,.loan-kpis .loan-kpi:first-child small { color:rgba(255,255,255,.7); }
.loan-kpis .loan-kpi:first-child strong { color:#fff; }
.loan-kpis .loan-kpi:first-child .icon { background:rgba(139,102,255,.18); color:#BBA6FF; }
.loan-kpis .loan-kpi:first-child { background:var(--focal-soft); border-color:var(--focal-soft); box-shadow:0 12px 28px rgba(31,24,52,.14),inset 0 1px rgba(255,255,255,.08); }
.loan-kpis .loan-kpi:first-child > div:first-child,.loan-kpis .loan-kpi:first-child small { color:rgba(255,255,255,.7); }
.loan-kpis .loan-kpi:first-child strong { color:#fff; }
.loan-kpis .loan-kpi:first-child .icon { background:rgba(139,102,255,.18); color:#BBA6FF; }
.loan-kpi > div:first-child { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--secondary); font-size:14px; font-weight:600; }
.loan-kpi .icon { width:36px; height:36px; padding:8px; flex:0 0 auto; border-radius:50%; background:var(--brand-soft); color:var(--brand); }
.loan-kpi strong { display:block; margin:14px 0 5px; color:var(--ink); font:700 clamp(24px,2vw,32px)/1.12 var(--font-display); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.loan-kpi small { display:block; color:var(--muted); font-size:13px; line-height:1.45; }
.loan-kpi.warning strong { color:var(--red); }
.loan-kpi.warning .icon { background:var(--danger-soft); color:var(--red); }
.late-overview { display:grid; grid-template-columns:minmax(230px,.8fr) minmax(0,1.5fr); gap:24px; align-items:stretch; padding:24px; border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--paper); box-shadow:var(--shadow-card); }
.late-overview-main { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; min-width:0; padding:5px 22px 5px 2px; border-right:1px solid var(--line); }
.late-overview-main .eyebrow { color:var(--secondary); }
.late-overview-main strong { margin-top:8px; color:var(--red); font:700 clamp(30px,3vw,42px)/1.12 var(--font-display); font-variant-numeric:tabular-nums; letter-spacing:-1.2px; }
.late-overview-main p { margin:9px 0 0; color:var(--muted); font-size:15px; line-height:1.5; }
.late-overview-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; align-items:stretch; }
.late-overview-stats > div { display:flex; flex-direction:column; justify-content:center; gap:10px; min-width:0; padding:16px; border-radius:var(--radius-md); background:var(--surface-muted); }
.late-overview-stats span { color:var(--secondary); font-size:14px; line-height:1.4; }
.late-overview-stats b { color:var(--ink); font:700 22px/1.2 var(--font-display); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.late-overview.has-overdue { border-color:rgba(217,83,101,.3); }
.late-overview.is-clear .late-overview-main strong { color:var(--green); font-size:32px; letter-spacing:-.5px; }
.late-overview.is-clear .late-overview-main .eyebrow { color:var(--green); }
.late-empty .button { margin-top:6px; text-decoration:none; }
.loan-table-panel { min-width:0; overflow:hidden; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-card); }
.loan-table-heading { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:20px 22px 16px; }
.loan-table-heading > div { min-width:0; margin-right:auto; }
.loan-table-heading h2 { margin:0 0 5px; color:var(--ink); font:700 20px/1.3 var(--font-display); }
.loan-table-heading p { margin:0; color:var(--muted); font-size:14px; }
.loan-tool { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; padding:9px 13px; border:1px solid var(--line); border-radius:10px; background:var(--paper); color:var(--ink); font:600 13px/1.3 var(--font-ui); white-space:nowrap; cursor:pointer; transition:background-color .16s ease,border-color .16s ease,color .16s ease; }
.loan-tool:hover { border-color:var(--brand); background:var(--brand-soft); color:var(--brand); }
.loan-tool .icon { width:17px; height:17px; flex:0 0 auto; }
.loan-controls { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:0 22px 18px; }
.loan-search { display:flex; align-items:center; gap:10px; width:min(100%,360px); min-width:220px; min-height:44px; padding:0 13px; border:1px solid var(--line); border-radius:10px; background:var(--paper); color:var(--muted); }
.loan-search:focus-within { border-color:var(--brand); box-shadow:0 0 0 3px var(--focus); }
.loan-search .icon { width:18px; height:18px; flex:0 0 auto; }
.loan-search input { width:100%; min-width:0; min-height:40px; padding:0; border:0; outline:0; background:transparent; color:var(--ink); font:14px var(--font-ui); }
.loan-search input::placeholder { color:var(--tertiary); }
.loan-tab-tools { display:flex; align-items:center; flex-wrap:wrap; gap:10px; min-width:0; }
.loan-tabs { display:flex; align-items:center; gap:3px; max-width:100%; padding:4px; overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:var(--surface-muted); }
.loan-tab { min-height:38px; padding:8px 13px; border:0; border-radius:9px; background:transparent; color:var(--secondary); font:600 13px/1.25 var(--font-ui); white-space:nowrap; cursor:pointer; }
.loan-tab:hover { color:var(--brand); background:var(--brand-soft); }
.loan-tab.active { background:var(--ink); color:#fff; }
.loan-tool.has-filters { border-color:var(--brand); background:var(--brand-soft); color:var(--brand); }
.loan-tool b { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 5px; border-radius:999px; background:var(--brand); color:#fff; font-size:12px; }
.loan-results { min-width:0; border-top:1px solid var(--line); }
.loan-results .table-wrap { overflow-x:auto; }
.loan-results table { min-width:850px; }
.loan-empty { display:grid; justify-items:center; gap:10px; padding:48px 24px; text-align:center; }
.loan-empty-icon { display:grid; place-items:center; width:48px; height:48px; border-radius:50%; background:var(--brand-soft); color:var(--brand); }
.loan-empty-icon .icon { width:24px; height:24px; }
.loan-empty h3 { margin:3px 0 0; color:var(--ink); font:700 19px/1.35 var(--font-display); }
.loan-empty p { max-width:440px; margin:0 0 6px; color:var(--muted); font-size:15px; line-height:1.5; }
.loan-guarantee-value { display:block; margin-top:3px; color:var(--muted); font-size:13px; }
.loan-guarantee-note { display:grid; gap:6px; margin:16px 0; padding:15px 17px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-muted); }
.loan-guarantee-note strong { color:var(--ink); font-size:15px; }
.loan-guarantee-note span,.loan-guarantee-note small { color:var(--muted); font-size:14px; line-height:1.45; }
.import-hint { margin:-8px 0 16px; color:var(--muted); font-size:13px; line-height:1.45; }
.loan-step[hidden] { display:none; }
.loan-step h3 { margin:6px 0 18px; font:700 19px var(--font-display); }
.loan-step-indicator { display:flex; gap:8px; margin:0 0 22px; }
.loan-step-indicator span { flex:1; padding:10px; border-bottom:3px solid var(--line); color:var(--muted); font-size:13px; font-weight:600; }
.loan-step-indicator span.current { color:var(--brand); border-color:var(--brand); }
.loan-wizard-actions { justify-content:flex-end; }
.quick-loan { position:fixed; z-index:9; right:28px; bottom:26px; display:flex; align-items:center; gap:10px; min-height:54px; padding:0 20px; color:#fff; background:var(--brand); border:0; border-radius:999px; box-shadow:0 10px 28px rgba(109,59,245,.24); font-size:15px; font-weight:700; }
.quick-loan:hover { background:var(--brand-hover); transform:translateY(-1px); }
.quick-loan .icon { width:20px; height:20px; }
.quick-loan[hidden] { display:none; }
@media(min-width:651px) {
  /* Não sobrepor os dois títulos que já têm ação principal Novo empréstimo. */
  body[data-page="overview"] #quick-loan,
  body[data-page="loans"] #quick-loan { display:none; }
}
main { padding-bottom:88px; }
@media(max-width:1080px) { .overview-hero { grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr); } .overview-kpi { padding-right:14px; padding-left:16px; } }
@media(max-width:920px) { .overview-focus-grid { grid-template-columns:1fr; } }
@media(max-width:800px) { .overview-hero { grid-template-columns:1fr; } .overview-balance { padding:20px 22px; } .overview-health-card { margin:0; } .overview-kpi-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } .overview-kpi { padding-top:16px; padding-bottom:15px; } .guarantee-grid,.closing-list { grid-template-columns:1fr; } }
@media(max-width:1050px) { .loan-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:900px) {
  .quick-loan { right:16px; bottom:calc(96px + env(safe-area-inset-bottom)); width:56px; min-height:56px; justify-content:center; padding:0; }
  .quick-loan span { display:none; }
  .quick-loan .icon { width:24px; height:24px; }
}
@media(max-width:650px) {
  /* A ação central da navegação substitui a bolha flutuante em telas móveis. */
  #quick-loan { display:none !important; }
  body[data-page="overview"] .page-heading .actions > .button.primary,
  body[data-page="loans"] .page-heading .actions > .button.primary { display:none !important; }
  #nav { gap:12px; }
  .nav-group { gap:3px; }
  .nav-group-title { margin-top:2px; }
  .nav-item { min-height:46px; }
  .health-panel { padding:18px; }
  .health-head { align-items:center; }
  .health-head p { font-size:14px; }
  .health-gauge { width:88px; height:88px; }
  .health-gauge-copy strong { font-size:25px; }
  .overview-health-card { padding:17px 18px; }
  .overview-health-card .health-gauge { width:84px; height:84px; }
  .overview-health-card .health-gauge-copy strong { font-size:23px; }
  .overview-kpi>strong { font-size:20px; }
  .overview-section-head { padding:18px 18px 0; }
  .overview-week-chart { gap:5px; padding:18px 14px 10px; }
  .overview-week-day { grid-template-rows:18px 76px auto auto; gap:6px; }
  .overview-week-track { height:76px; width:min(100%,36px); }
  .overview-week-total { margin:0 18px; }
  .overview-due-list { padding:0 18px 12px; }
  .overview-week-empty { margin:16px 18px 18px; }
  .overview-priority-list { padding:8px 16px 14px; }
  .overview-priority-clear { min-height:94px; }
  .health-breakdown { grid-template-columns:1fr; gap:7px; }
  .health-breakdown .health-factor { padding:10px 12px; font-size:13px; }
  .guarantee-intro,.capital-panel,.closing-action { align-items:flex-start; flex-direction:column; }
  .simulator-panel { padding:18px; }
  .simulator-summary { grid-template-columns:1fr; }
  .simulator-summary strong { font-size:21px; }
  .closing-form { width:100%; align-items:stretch; flex-direction:column; }
  .closing-form .field { min-width:0; }
  .loan-step-indicator { gap:6px; }
  .loan-step-indicator span { display:grid; place-items:center; min-height:46px; padding:10px 5px; border:0; border-radius:999px; background:var(--surface-muted); font-size:13px; }
  .loan-step-indicator span.current { background:var(--brand-soft); color:var(--brand); }
  .loan-screen { gap:16px; }
  .late-overview { grid-template-columns:1fr; gap:16px; padding:18px; }
  .late-overview-main { padding:2px 0 15px; border-right:0; border-bottom:1px solid var(--line); }
  .late-overview-main strong { font-size:32px; }
  .late-overview-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .late-overview-stats > div:last-child { grid-column:1/-1; }
  .late-overview-stats > div { padding:13px; gap:7px; }
  .late-overview-stats span { font-size:13px; }
  .late-overview-stats b { font-size:19px; }
  .loan-kpis { gap:10px; }
  .loan-kpi { padding:15px; }
  .loan-kpi > div:first-child { align-items:flex-start; font-size:13px; }
  .loan-kpi .icon { width:32px; height:32px; padding:7px; }
  .loan-kpi strong { margin:12px 0 5px; font-size:clamp(16px,4.6vw,20px); letter-spacing:-.75px; white-space:nowrap; overflow-wrap:normal; }
  .loan-kpi small { font-size:12px; }
  .loan-table-heading { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:17px 15px 14px; gap:8px; }
  .loan-table-heading > div { grid-column:1/-1; margin:0 0 4px; }
  .loan-table-heading .loan-tool { width:100%; min-width:0; padding:9px 8px; font-size:12px; }
  .loan-controls { align-items:stretch; flex-direction:column; padding:0 15px 15px; }
  .loan-search { width:100%; min-width:0; }
  .loan-tab-tools { width:100%; justify-content:space-between; gap:8px; }
  .loan-tabs { flex:1 1 auto; }
  .loan-tab { padding:8px 10px; font-size:12px; }
  .loan-tab-tools > .loan-tool { flex:0 0 auto; }
  .loan-empty { padding:34px 18px; }
  .overview-contracts .table-wrap { overflow:visible; }
  .overview-contracts table,.overview-contracts tbody { display:block; width:100%; min-width:0; }
  .overview-contracts thead { display:none; }
  .overview-contracts tr { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px 12px; padding:16px; }
  .overview-contracts td { min-width:0; padding:0; border:0; }
  .overview-contracts td:first-child { grid-column:1; grid-row:1/3; }
  .overview-contracts td:nth-child(2),.overview-contracts td:nth-child(3) { grid-column:2; text-align:right; }
  .overview-contracts .name { white-space:normal; }
  .overview-contracts .name small { white-space:normal; line-height:1.4; }
  .loan-results .table-wrap { overflow:visible; }
  .loan-results table { display:block; width:100%; min-width:0; }
  .loan-results thead { display:none; }
  .loan-results tbody { display:grid; gap:10px; padding:10px; }
  .loan-results tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-areas:'person status' 'amount due' 'principal guarantee' 'action action'; align-items:center; gap:12px 14px; padding:15px; border:1px solid var(--line); border-radius:17px; background:var(--paper); box-shadow:0 5px 16px rgba(37,31,58,.055); }
  .loan-results td { min-width:0; padding:0; border:0; }
  .loan-results td:first-child { grid-area:person; }
  .loan-results td:nth-child(2) { grid-area:principal; }
  .loan-results td:nth-child(3) { grid-area:amount; }
  .loan-results td:nth-child(4) { grid-area:due; text-align:right; }
  .loan-results td:nth-child(5) { grid-area:guarantee; }
  .loan-results td:nth-child(6) { grid-area:status; justify-self:end; }
  .loan-results td:nth-child(7) { grid-area:action; justify-self:stretch; border-top:1px solid var(--line); padding-top:9px; }
  .loan-results td:nth-child(2)::before,.loan-results td:nth-child(3)::before,.loan-results td:nth-child(4)::before,.loan-results td:nth-child(5)::before { display:block; margin-bottom:3px; color:var(--muted); font-size:11px; font-weight:600; }
  .loan-results td:nth-child(2)::before { content:'Emprestado'; }
  .loan-results td:nth-child(3)::before { content:'A receber'; }
  .loan-results td:nth-child(4)::before { content:'Próximo vencimento'; }
  .loan-results td:nth-child(5)::before { content:'Garantia'; }
  .loan-results .name { gap:9px; font-size:14px; }
  .loan-results .name .initials { width:38px; height:38px; }
  .loan-results .name small { display:block; max-width:40vw; font-size:11px; }
  .loan-results td:nth-child(2),.loan-results td:nth-child(3) { font-size:14px; }
  .loan-results td:nth-child(4),.loan-results td:nth-child(5) { font-size:13px; }
  .loan-results td:nth-child(7) .row-action { width:100%; min-height:42px; }
  .late-loan-screen .loan-results tr { grid-template-areas:'person status' 'amount due' 'action action'; }
  .late-loan-screen .loan-results td:nth-child(2),.late-loan-screen .loan-results td:nth-child(5) { display:none; }
  .late-loan-screen .loan-results td:nth-child(3)::before { content:'Valor vencido'; }
  .late-loan-screen .loan-results td:nth-child(4)::before { content:'Vencimento mais antigo'; }
  .late-loan-screen .loan-results td:nth-child(7) .row-action { min-height:42px; padding:9px 12px; }
  .quick-loan { right:16px; bottom:calc(96px + env(safe-area-inset-bottom)); width:56px; min-height:56px; justify-content:center; padding:0; }
  .quick-loan span { display:none; }
  .quick-loan .icon { width:24px; height:24px; }
  main { padding-bottom:96px; }
}
@media(max-width:520px) {
  .overview-hero { gap:12px; padding:0; }
  .overview-balance { min-height:0; padding:19px 16px; }
  .overview-balance>strong { font-size:36px; }
  .overview-kpi { padding-right:10px; padding-left:12px; }
  .overview-kpi-label { font-size:12px; }
  .overview-kpi>strong { font-size:18px; letter-spacing:-.4px; }
  .overview-kpi>small { font-size:12px; }
  .overview-health-card { gap:8px; padding:15px 12px; }
  .overview-health-card h2 { font-size:16px; }
  .overview-health-card p:not(.eyebrow) { font-size:12px; }
  .overview-health-card .health-gauge { width:76px; height:76px; }
  .overview-health-card .health-gauge-copy strong { font-size:21px; }
  .overview-section-head { gap:8px; }
  .overview-section-head h2 { font-size:17px; }
  .overview-section-head p:not(.eyebrow) { font-size:12px; }
  .overview-week-chart { gap:3px; padding-right:10px; padding-left:10px; }
  .overview-week-day { grid-template-rows:18px 68px auto auto; gap:5px; }
  .overview-week-track { height:68px; width:min(100%,32px); }
  .overview-week-value { font-size:12px; }
  .overview-due-list { padding-right:14px; padding-left:14px; }
}

/* Dashboard analytics: shared scales, semantic colors and compact supporting sections. */
.health-gauge.health-good { color:var(--green); }
.health-gauge.health-good .health-gauge-value { stroke:var(--green); }
.health-gauge.health-medium { color:var(--warning); }
.health-gauge.health-medium .health-gauge-value { stroke:var(--warning); }
.health-gauge.health-unavailable { color:var(--tertiary); }
.health-band-note { flex:1 0 100%; margin-top:-10px; color:var(--muted); font-size:11px; line-height:1.4; }
.overview-cash-secondary { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:8px 12px; width:min(100%,570px); margin-top:19px; padding:11px 14px; border:1px solid var(--line); border-radius:12px; background:var(--paper-soft); }
.overview-cash-secondary>span { color:var(--muted); font-size:13px; font-weight:600; }
.overview-cash-secondary>strong { color:var(--ink); font:700 16px/1.2 var(--font-ui); font-variant-numeric:tabular-nums; white-space:nowrap; }
.overview-cash-secondary.positive>strong { color:var(--green); }
.overview-cash-secondary.negative>strong { color:var(--red); }
.overview-cash-secondary>a { display:inline-flex; align-items:center; gap:4px; min-height:34px; color:var(--brand); font-size:13px; font-weight:600; white-space:nowrap; }
.overview-cash-secondary .icon { width:15px; height:15px; }
.overview-receivables { display:grid; grid-template-columns:1.1fr 1fr 1.15fr; align-items:center; gap:18px; margin-bottom:22px; padding:20px 24px; }
.overview-receivable-intro .eyebrow { margin:0 0 5px; color:var(--muted); font-size:11px; }
.overview-receivable-intro h2 { margin:0 0 4px; color:var(--ink); font:700 17px/1.3 var(--font-display); }
.overview-receivable-intro p:not(.eyebrow) { margin:0; color:var(--muted); font-size:13px; }
.overview-receivable-value { display:grid; gap:4px; min-width:0; padding-left:18px; border-left:1px solid var(--line); }
.overview-receivable-value>span { color:var(--muted); font-size:13px; font-weight:600; }
.overview-receivable-value>strong { color:var(--ink); font:700 clamp(20px,2vw,25px)/1.2 var(--font-display); font-variant-numeric:tabular-nums; }
.overview-receivable-value>small { color:var(--muted); font-size:12px; line-height:1.4; }
.overview-receivable-value.unavailable>strong { font:600 16px/1.3 var(--font-ui); }
.overview-analytics-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr); gap:18px; margin-bottom:20px; }
.overview-analytics-panel { min-width:0; padding-bottom:18px; }
.overview-analytics-panel .overview-section-head { padding-bottom:8px; }
.overview-legend { display:flex; flex-wrap:wrap; gap:10px 18px; padding:5px 24px 0; color:var(--muted); font-size:12px; }
.overview-legend>span,.overview-chart-totals>span { display:inline-flex; align-items:center; gap:7px; }
.chart-dot { display:inline-block; width:9px; height:9px; flex:0 0 auto; border-radius:50%; background:var(--brand); }
.chart-dot.lent { background:var(--brand); }
.chart-dot.received { background:var(--green); }
.overview-chart-body { display:grid; grid-template-columns:48px minmax(0,1fr); gap:8px; padding:18px 20px 0; }
.overview-chart-axis { display:flex; flex-direction:column; justify-content:space-between; padding:0 0 23px; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; text-align:right; white-space:nowrap; }
.overview-chart-plot { position:relative; min-width:0; height:154px; }
.overview-chart-grid { position:absolute; inset:0 0 23px; display:flex; flex-direction:column; justify-content:space-between; pointer-events:none; }
.overview-chart-grid>i { display:block; width:100%; height:1px; background:var(--line); }
.overview-month-series { position:relative; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:4px; height:100%; }
.overview-month-column { position:relative; display:grid; grid-template-rows:minmax(0,1fr) 23px; min-width:0; text-align:center; isolation:isolate; }
.overview-month-column.current:before { position:absolute; z-index:-1; inset:4px 5px 20px; border-radius:12px; background:#F5F1FF; content:""; }
.overview-month-bars { display:flex; align-items:flex-end; justify-content:center; gap:6px; min-height:0; padding:0 5px; perspective:480px; }
.overview-bar { position:relative; display:block; width:min(34%,17px); min-height:0; overflow:visible; border-radius:4px 4px 1px 1px; transform-origin:center bottom; animation:overview-bar-enter .72s var(--ease-standard) both; box-shadow:inset -3px 0 rgba(16,14,25,.15),0 5px 10px rgba(22,20,31,.12); }
.overview-bar:before { position:absolute; top:-4px; left:1px; width:100%; height:5px; border-radius:3px 3px 1px 1px; background:var(--bar-top); transform:skewX(-32deg); transform-origin:bottom left; content:""; }
.overview-bar:after { position:absolute; top:1px; right:-4px; width:5px; height:calc(100% - 1px); border-radius:0 2px 1px 0; background:var(--bar-side); transform:skewY(-32deg); transform-origin:left top; content:""; }
.overview-bar.lent { --bar-top:#9C7AFF; --bar-side:#4D2AB8; background:var(--brand); }
.overview-bar.received { --bar-top:#69D9A0; --bar-side:#1E754B; background:var(--green); }
.overview-bar.interest { --bar-top:#FFD47A; --bar-side:#A96800; width:min(46%,22px); background:var(--warning); }
.overview-month-column:nth-child(2) .overview-bar { animation-delay:65ms; }
.overview-month-column:nth-child(3) .overview-bar { animation-delay:120ms; }
.overview-month-column:nth-child(4) .overview-bar { animation-delay:175ms; }
.overview-month-column:nth-child(5) .overview-bar { animation-delay:230ms; }
.overview-month-column:nth-child(6) .overview-bar { animation-delay:285ms; }
.overview-month-column.current .overview-bar { filter:drop-shadow(0 0 7px rgba(109,59,245,.22)); }
.overview-month-column:hover .overview-bar { filter:brightness(1.12) drop-shadow(0 7px 8px rgba(22,20,31,.16)); }
.overview-month-column>small { align-self:end; color:var(--muted); font-size:11px; text-transform:capitalize; }
.overview-chart-totals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:14px 24px 0; padding-top:12px; border-top:1px solid var(--line); }
.overview-chart-totals>span { flex-wrap:wrap; align-content:center; color:var(--muted); font-size:12px; }
.overview-chart-totals strong { flex-basis:100%; margin-left:16px; color:var(--ink); font:700 15px var(--font-ui); font-variant-numeric:tabular-nums; }
.overview-interest-totals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:8px 20px 0; }
.overview-interest-totals>div { display:grid; gap:3px; min-width:0; padding:10px 12px; border-radius:10px; background:var(--surface-muted); }
.overview-interest-totals span { color:var(--muted); font-size:12px; }
.overview-interest-totals strong { color:var(--green); font:700 17px/1.25 var(--font-display); font-variant-numeric:tabular-nums; white-space:nowrap; }
.interest-chart-body { padding-top:14px; }
.overview-chart-footnote { margin:8px 22px 0 76px; color:var(--muted); font-size:11px; line-height:1.4; }
.overview-chart-empty { display:flex; align-items:center; gap:12px; min-height:142px; margin:16px 20px 0; padding:16px; border-radius:12px; background:var(--surface-muted); }
.overview-empty-icon { display:grid; place-items:center; width:38px; height:38px; flex:0 0 auto; border-radius:12px; color:var(--brand); background:var(--brand-soft); }
.overview-empty-icon .icon { width:20px; height:20px; }
.overview-chart-empty strong { color:var(--ink); font-size:14px; }
.overview-chart-empty p { margin:4px 0 0; color:var(--muted); font-size:13px; line-height:1.4; }
.overview-priority-row { gap:10px; }
.overview-priority-row .overview-priority-copy small { line-height:1.35; }
.overview-priority-dot.warning { background:var(--warning); box-shadow:0 0 0 4px var(--warning-soft); }
.overview-priority-row.urgent .overview-priority-dot { background:var(--red); }
.overview-priority-row.reminder { grid-template-columns:minmax(0,1fr) 40px; padding:5px 0; }
.overview-priority-main { display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:center; gap:12px; width:100%; min-width:0; min-height:56px; padding:8px 4px; border:0; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.overview-priority-main>b { color:var(--muted); font-size:12px; }
.overview-priority-complete { display:grid; place-items:center; width:38px; height:38px; border:1px solid var(--line); border-radius:11px; background:var(--paper); color:var(--green); cursor:pointer; }
.overview-priority-complete:hover { border-color:var(--green); background:var(--success-soft); }
.overview-priority-complete .icon { width:18px; height:18px; }
.overview-priority-main:hover .overview-priority-copy strong { color:var(--brand); }
.overview-more-link,.overview-guarantee-link { display:inline-flex; align-items:center; gap:6px; min-height:40px; margin:0 24px 14px; color:var(--brand); font-size:13px; font-weight:600; }
.overview-more-link .icon,.overview-guarantee-link .icon { width:15px; height:15px; }
.overview-support-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr); gap:18px; align-items:stretch; }
.overview-support-grid>.panel { min-width:0; }
.overview-contracts { grid-row:span 2; }
.overview-guarantees,.overview-reminders { align-self:start; }
.overview-guarantee-list { display:grid; padding:0 20px 4px; }
.overview-guarantee-row { display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:54px; border-top:1px solid var(--line); color:var(--ink); font-size:13px; }
.overview-guarantee-row>b { color:var(--ink); font:700 15px var(--font-ui); }
.overview-guarantee-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:11px; color:var(--brand); background:var(--brand-soft); }
.overview-guarantee-icon .icon { width:19px; height:19px; }
.overview-guarantee-row:nth-child(4n+2) .overview-guarantee-icon { color:var(--green); background:var(--success-soft); }
.overview-guarantee-row:nth-child(4n+3) .overview-guarantee-icon { color:#A66A00; background:var(--warning-soft); }
.overview-guarantee-row:nth-child(4n+4) .overview-guarantee-icon { color:var(--red); background:var(--danger-soft); }
.overview-guarantee-link { margin-top:0; }
.overview-guarantee-empty { display:flex; align-items:center; gap:11px; padding:8px 20px 4px; }
.overview-guarantee-empty p { margin:0; color:var(--muted); font-size:13px; }
.overview-reminders .overview-reminder-count { margin:0 20px; padding:7px 0; }
.overview-reminders .due-list { padding:0 20px 14px; }
.reminder-list { display:grid; gap:10px; }
.reminder-item { display:grid; grid-template-columns:40px minmax(0,1fr) 44px; align-items:start; gap:12px; padding:16px; border-radius:22px; background:var(--surface-muted); }
.reminder-mark { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:var(--brand-soft); color:var(--brand); }
.reminder-copy { display:grid; gap:5px; min-width:0; }
.reminder-copy strong { color:var(--ink); font-size:15px; }
.reminder-copy small,.reminder-copy p { margin:0; color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.reminder-copy .row-action { justify-self:start; display:inline-flex; align-items:center; gap:7px; min-height:40px; margin-top:5px; padding:8px 12px; border-radius:999px; }
.reminder-copy .row-action .icon { width:15px; height:15px; }
.reminder-complete { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--line); border-radius:50%; color:var(--green); background:var(--paper); }
.reminder-complete:hover { background:var(--success-soft); }
.reminder-empty { display:flex; align-items:center; gap:12px; border-radius:22px; text-align:left; }
.overview-reminders .activity { gap:12px; }
.overview-reminders .activity>span:last-child { display:flex; gap:8px; }
.overview-reminders .empty { margin:0 20px 16px; padding:13px; background:var(--surface-muted); }
@media(max-width:1050px) {
  .overview-analytics-grid { grid-template-columns:minmax(0,1fr) minmax(0,.9fr); gap:14px; }
  .overview-receivables { gap:12px; padding:18px; }
  .overview-chart-body { grid-template-columns:43px minmax(0,1fr); gap:6px; padding-right:14px; padding-left:14px; }
  .overview-chart-axis { font-size:9px; }
}
@media(max-width:800px) {
  .overview-analytics-grid,.overview-focus-grid { grid-template-columns:1fr; }
  .overview-support-grid { grid-template-columns:1fr; }
  .overview-contracts { grid-row:auto; }
}
@media(max-width:520px) {
  body[data-page="overview"] main { display:flex; flex-direction:column; gap:0; padding-top:14px; padding-bottom:calc(132px + env(safe-area-inset-bottom)); }
  header .breadcrumb { display:none; }
  header .mobile-welcome:not([hidden]) { display:flex; }
  header .mobile-welcome { flex:1 1 auto; align-items:center; min-width:0; gap:10px; }
  .mobile-welcome-avatar { display:grid; place-items:center; width:40px; height:40px; flex:0 0 40px; border:1px solid rgba(109,59,245,.16); border-radius:50%; background:linear-gradient(145deg,#F1EBFF,#DDD0FF); color:var(--brand); font:700 13px var(--font-ui); box-shadow:inset 0 1px rgba(255,255,255,.9); }
  .mobile-welcome-copy { display:grid; min-width:0; gap:0; line-height:1.2; }
  .mobile-welcome-copy small { color:var(--muted); font-size:11px; font-weight:550; }
  .mobile-welcome-copy strong { overflow:hidden; color:var(--ink); font:700 14px/1.25 var(--font-ui); text-overflow:ellipsis; white-space:nowrap; }
  header .header-right { flex:0 0 auto; gap:6px; }
  header .header-right [data-action="global-search"] { min-width:78px; height:40px; border:1px solid rgba(232,228,239,.9); border-radius:14px; background:rgba(255,255,255,.78); box-shadow:0 2px 8px rgba(28,22,46,.04); }
  body[data-page="overview"] main>.page-heading { display:none; }
  body[data-page="overview"] #mobile-export:not([hidden]) { display:grid; }
  body[data-page="overview"] #quick-loan { display:none !important; }
  body[data-page="overview"] main>.overview-hero { order:1; }
  body[data-page="overview"] main>.overview-alert { order:2; margin:12px 0; }
  body[data-page="overview"] main>.overview-kpi-strip { order:3; }
  body[data-page="overview"] main>.overview-analytics-grid { order:4; }
  body[data-page="overview"] main>.overview-focus-grid { order:5; }
  body[data-page="overview"] main>.overview-support-grid { order:6; }
  .mobile-nav { inset:auto 8px calc(9px + env(safe-area-inset-bottom)); min-height:70px; }
  .mobile-nav-item span { font-size:11px; }
  .mobile-nav-action:active { transform:translateY(-8px) scale(.94); }
  .overview-balance>strong { font-size:clamp(30px,8.4vw,36px); letter-spacing:-1.2px; }
  .overview-alert { grid-template-columns:34px minmax(0,1fr); gap:8px; margin:0 0 12px; padding:10px; }
  .overview-alert-mark { width:32px; height:32px; }
  .overview-alert-copy strong { font-size:13px; }
  .overview-alert-copy small { font-size:12px; }
  .overview-alert>a { grid-column:2; justify-self:start; min-height:34px; padding:0 9px; font-size:12px; }
  .overview-kpi-strip { gap:9px; margin-bottom:16px; }
  .overview-kpi { min-height:120px; padding:14px 11px; }
  .overview-kpi-mark { top:10px; right:10px; width:30px; height:30px; }
  .overview-kpi>strong { font-size:17px; }
  .overview-kpi>small { font-size:12px; }
  .overview-allocation-legend { gap:6px 12px; font-size:11px; }
  .overview-legend { gap:7px 12px; padding-right:16px; padding-left:16px; font-size:11px; }
  .overview-chart-body { grid-template-columns:42px minmax(0,1fr); gap:5px; padding-right:12px; padding-left:10px; }
  .overview-chart-axis { font-size:9px; }
  .overview-chart-plot { height:140px; }
  .overview-month-series { gap:1px; }
  .overview-month-bars { gap:2px; padding:0 1px; }
  .overview-bar { width:min(39%,15px); }
  .overview-bar.interest { width:min(48%,18px); }
  .overview-month-column>small { font-size:10px; }
  .overview-chart-totals { gap:8px; margin-right:16px; margin-left:16px; }
  .overview-chart-totals>span { font-size:11px; }
  .overview-chart-totals strong { margin-left:15px; font-size:13px; }
  .overview-interest-totals { padding-right:14px; padding-left:14px; }
  .overview-interest-totals>div { padding:9px; }
  .overview-interest-totals strong { font-size:15px; }
  .overview-chart-footnote { margin-left:57px; font-size:10px; }
  .overview-chart-empty { margin-right:14px; margin-left:14px; padding:13px; }
  .overview-priority-list { padding-right:14px; padding-left:14px; }
  .overview-priority-row { gap:8px; }
  .overview-priority-main { grid-template-columns:9px minmax(0,1fr) auto; gap:8px; }
  .overview-priority-row>b,.overview-priority-main>b { font-size:12px; }
  .overview-priority-copy strong { font-size:13px; }
  .overview-priority-copy small { font-size:11px; }
  .overview-more-link,.overview-guarantee-link { margin-right:16px; margin-left:16px; }
}

/* ---------- Seletor de tema ---------- */
.theme-toggle {
  position:relative;
  display:inline-grid;
  grid-template-columns:repeat(2,1fr);
  align-items:center;
  gap:2px;
  padding:3px;
  border:1px solid var(--line);
  border-radius:var(--radius-pill);
  background:var(--glass-bg);
  backdrop-filter:var(--glass-blur);
  -webkit-backdrop-filter:var(--glass-blur);
  box-shadow:var(--glass-edge);
}
.theme-toggle:before {
  content:'';
  position:absolute;
  z-index:0;
  top:3px;
  bottom:3px;
  left:3px;
  width:calc(50% - 3px);
  border-radius:var(--radius-pill);
  background:var(--brand);
  box-shadow:var(--shadow-brand);
  transition:transform .28s var(--ease-out);
}
:root[data-theme="dark"] .theme-toggle:before { transform:translateX(100%); }
.theme-toggle button {
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  width:34px;
  height:30px;
  padding:0;
  border:0;
  border-radius:var(--radius-pill);
  background:transparent;
  color:var(--muted);
  transition:color .2s var(--ease-standard);
}
.theme-toggle button svg { width:16px; height:16px; }
.theme-toggle button[aria-pressed="true"] { color:var(--brand-contrast); }
@media (prefers-reduced-motion:reduce) {
  .theme-toggle:before { transition:none; }
}
