/* Prumo, sistema visual. Fonte Manrope (OFL, local), tokens em :root, marca da empresa em --brand.
   Azul firme (#2b4fd8) nas áreas de destaque, status e gráficos saturados, contraste AA. */
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-latin.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-latin-ext.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  /* base do Prumo (claro): azul firme, fundos com um toque de azul, nada de cinza chapado */
  --bg: #f5f7fb; --surface: #ffffff; --sunk: #f1f4fd; --fg: #0f172a; --muted: #55627d; --line: #e1e7f2;
  --accent: #2b4fd8; --accent-strong: #1e3bb0; --accent-soft: #e6ebfb; --accent-2: #f59e0b; --accent-2-soft: #fef3c7;
  --positivo: #16a34a; --atrasado: #dc2626; --alerta: #d97706;
  /* marca da empresa: por padrão o azul do Prumo; a cor de destaque do cliente substitui pelo JS */
  --brand: var(--accent); --brand-strong: var(--accent-strong); --brand-soft: var(--accent-soft); --brand-ink: #ffffff; --brand-ring: rgba(43, 79, 216, .28);
  /* nomes usados pelas telas */
  --page: var(--bg); --card: var(--surface); --card-2: var(--sunk);
  --line-2: #cbd5e6;
  --ink: var(--fg); --ink-2: #334155; --ink-3: var(--muted); --ink-4: #64708a;
  --menu-bg: #ffffff; --menu-line: var(--line); --menu-text: #1e293b; --menu-muted: #5b6884;
  --menu-active-bg: var(--brand-soft); --menu-active-text: var(--brand-strong);
  --ok-text: #166534; --ok-bg: #dcfce7; --ok-dot: #16a34a;
  --warn-text: #92400e; --warn-bg: #fef3c7; --warn-dot: #f59e0b;
  --danger-text: #991b1b; --danger-bg: #fee2e2; --danger-dot: #dc2626;
  --info-text: #1e40af; --info-bg: #dbeafe; --info-dot: #3b82f6;
  --review-text: #5b21b6; --review-bg: #ede9fe; --review-dot: #8b5cf6;
  --muted-text: #475569; --muted-bg: #e8edf8; --muted-dot: #94a3b8;
  --s1: var(--brand); --s2: #0ea5a4; --s3: #f59e0b; --s4: #8b5cf6; --s5: #94a3b8; --s6: #ef4444;
  --grid: #e9eef8; --axis: #cbd5e6;
  --r-card: 16px; --r-ctl: 10px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(30, 59, 176, .07);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .18);
  --font: "Manrope", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-title: var(--font);
  --font-num: var(--font);   /* Manrope com algarismos tabulares (font-variant-numeric) */
  --font-code: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --sidebar-w: 260px;
}
/* tema escuro: segue o sistema, a menos que a página force claro; data-theme="dark" força escuro */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1220; --surface: #111a2e; --sunk: #16213a; --fg: #e2e8f0; --muted: #a3b1c8; --line: #24304a;
    --accent: #7b93ff; --accent-strong: #a5b6ff; --accent-soft: rgba(91, 124, 250, .18); --accent-2: #fbbf24; --accent-2-soft: rgba(251, 191, 36, .16);
    --brand-ink: #0b1220; --brand-ring: rgba(123, 147, 255, .38);
    --line-2: #33415e; --ink-2: #cbd5e1; --ink-4: #94a3b8;
    --menu-bg: #0f172a; --menu-text: #e2e8f0; --menu-muted: #94a3b8;
    --ok-text: #86efac; --ok-bg: rgba(22, 163, 74, .22); --warn-text: #fcd34d; --warn-bg: rgba(245, 158, 11, .2);
    --danger-text: #fca5a5; --danger-bg: rgba(220, 38, 38, .24); --info-text: #93c5fd; --info-bg: rgba(59, 130, 246, .2); --info-dot: #60a5fa;
    --review-text: #c4b5fd; --review-bg: rgba(139, 92, 246, .2); --muted-text: #cbd5e1; --muted-bg: #1c2840;
    --grid: #1c2840; --axis: #33415e;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220; --surface: #111a2e; --sunk: #16213a; --fg: #e2e8f0; --muted: #a3b1c8; --line: #24304a;
  --accent: #7b93ff; --accent-strong: #a5b6ff; --accent-soft: rgba(91, 124, 250, .18); --accent-2: #fbbf24; --accent-2-soft: rgba(251, 191, 36, .16);
  --brand-ink: #0b1220; --brand-ring: rgba(123, 147, 255, .38);
  --line-2: #33415e; --ink-2: #cbd5e1; --ink-4: #94a3b8;
  --menu-bg: #0f172a; --menu-text: #e2e8f0; --menu-muted: #94a3b8;
  --ok-text: #86efac; --ok-bg: rgba(22, 163, 74, .22); --warn-text: #fcd34d; --warn-bg: rgba(245, 158, 11, .2);
  --danger-text: #fca5a5; --danger-bg: rgba(220, 38, 38, .24); --info-text: #93c5fd; --info-bg: rgba(59, 130, 246, .2); --info-dot: #60a5fa;
  --review-text: #c4b5fd; --review-bg: rgba(139, 92, 246, .2); --muted-text: #cbd5e1; --muted-bg: #1c2840;
  --grid: #1c2840; --axis: #33415e;
}
:root[data-menu="escuro"] {
  --menu-bg: #0f172a; --menu-line: rgba(255, 255, 255, .08); --menu-text: #e2e8f0; --menu-muted: #94a3b8;
  --menu-active-bg: rgba(255, 255, 255, .08); --menu-active-text: #ffffff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--page); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-strong); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(22px, 2vw, 28px); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }
small { font-size: 12px; }
:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; border-radius: 6px; }
.num, .table td.num, .table th.num, .kpi-value, .money { font-variant-numeric: tabular-nums; text-align: right; }
.table td.num, .money { font-family: var(--font-num); }
.mono, code { font-family: var(--font-code); font-size: .94em; }
.kpi-value { text-align: left; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-4); }
.strong { font-weight: 700; }
.right { text-align: right; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-2 { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.icon { width: 18px; height: 18px; flex: 0 0 auto; display: inline-block; vertical-align: -3px; }
.icon.sm { width: 14px; height: 14px; }
.icon.lg { width: 24px; height: 24px; }

/* Boot */
.boot { display: grid; place-items: center; gap: 12px; min-height: 100vh; color: var(--ink-3); }
.boot-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--brand); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.94); } 50% { opacity: 1; transform: scale(1); } }

/* Shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; background: var(--menu-bg); color: var(--menu-text); border-right: 1px solid var(--menu-line); overflow-y: auto; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; text-decoration: none; color: inherit; }
.brand-logo { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 17px; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand strong { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.brand small { display: block; color: var(--menu-muted); font-size: 11.5px; }
.nav { display: grid; gap: 2px; }
.nav-label { margin: 14px 10px 6px; color: var(--menu-muted); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border-radius: 10px; color: inherit; font-size: 14px; font-weight: 600; text-decoration: none; }
.nav-item .icon { width: 20px; height: 20px; color: var(--menu-muted); }
.nav-item:hover { background: var(--menu-active-bg); }
.nav-item.active { background: var(--menu-active-bg); color: var(--menu-active-text); }
.nav-item.active .icon { color: var(--brand); }
.nav-item .count { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--danger-bg); color: var(--danger-text); font-size: 11px; font-weight: 800; }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--menu-line); display: grid; gap: 8px; }
.plan-box { padding: 10px 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--menu-line); font-size: 12px; color: var(--menu-muted); }
:root[data-menu="escuro"] .plan-box { background: rgba(255, 255, 255, .05); }
.plan-box strong { display: block; color: var(--menu-text); font-size: 12.5px; }
.plan-box a { color: var(--brand); font-weight: 700; text-decoration: none; }
:root[data-menu="escuro"] .plan-box a { color: #93c5fd; }
.user-box { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; font-size: 13px; }
.user-box strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.user-box small { display: block; color: var(--menu-muted); font-size: 11.5px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--brand-strong); font-weight: 700; cursor: pointer; }
:root[data-menu="escuro"] .sidebar .link-btn { color: #93c5fd; }
.sidebar-backdrop { display: none; }
.mobile-bar { display: none; }

.workspace { min-width: 0; padding: 20px clamp(16px, 2.4vw, 36px) 56px; max-width: 1560px; width: 100%; margin: 0 auto; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 20px; }
.crumbs { color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.crumbs b { color: var(--ink); font-weight: 700; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.page-head .lead { color: var(--ink-3); font-size: 13.5px; max-width: 760px; margin-top: 4px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.month-nav { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow-sm); }
.month-nav b { min-width: 150px; text-align: center; font-weight: 700; font-size: 13.5px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--r-ctl); font-weight: 700; font-size: 13.5px; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--brand-strong); }
.btn.secondary { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--card-2); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--muted-bg); }
.btn.danger { background: var(--danger-bg); color: var(--danger-text); }
.btn.danger:hover { background: #fecaca; }
.btn.ok { background: var(--ok-bg); color: var(--ok-text); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.icon-only { padding: 0; width: 36px; }
.btn.sm.icon-only { width: 32px; }
.btn.full { width: 100%; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn .icon { width: 16px; height: 16px; }

/* Cards and KPIs */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-sm); padding: 18px 20px; min-width: 0; }
.card.flat { box-shadow: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head .kicker { color: var(--ink-3); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.card-head h2 { margin-top: 2px; }
.card-head .hint { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 16px; }
.kpi { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-sm); min-width: 0; text-decoration: none; color: inherit; }
.kpi.clickable:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.kpi-label { color: var(--ink-3); font-size: 12.5px; font-weight: 700; }
.kpi-value { margin-top: 4px; font-size: clamp(18px, 1.6vw, 25px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.kpi-sub { margin-top: 4px; color: var(--ink-3); font-size: 12px; }
.kpi-sub.up { color: var(--ok-text); } .kpi-sub.down { color: var(--danger-text); }
.kpi-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand-strong); }
.kpi-icon .icon { width: 20px; height: 20px; }
.kpi-icon.ok { background: var(--ok-bg); color: var(--ok-text); }
.kpi-icon.warn { background: var(--warn-bg); color: var(--warn-text); }
.kpi-icon.danger { background: var(--danger-bg); color: var(--danger-text); }
.kpi-icon.info { background: var(--info-bg); color: var(--info-text); }
.kpi-icon.review { background: var(--review-bg); color: var(--review-text); }
.kpi.hero { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%); color: #fff; border: 0; }
.kpi.hero .kpi-label, .kpi.hero .kpi-sub { color: rgba(255, 255, 255, .8); }
.kpi.hero .kpi-value { font-size: clamp(26px, 2.4vw, 34px); }
.hero-list { display: grid; gap: 6px; align-content: center; }
.hero-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .12); }

/* Pills, chips, badges */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; background: var(--muted-bg); color: var(--muted-text); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-dot); }
.pill.ok { background: var(--ok-bg); color: var(--ok-text); } .pill.ok::before { background: var(--ok-dot); }
.pill.warn { background: var(--warn-bg); color: var(--warn-text); } .pill.warn::before { background: var(--warn-dot); }
.pill.danger { background: var(--danger-bg); color: var(--danger-text); } .pill.danger::before { background: var(--danger-dot); }
.pill.info { background: var(--info-bg); color: var(--info-text); } .pill.info::before { background: var(--info-dot); }
.pill.review { background: var(--review-bg); color: var(--review-text); } .pill.review::before { background: var(--review-dot); }
.pill.plain::before { display: none; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--card); color: var(--ink-2); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.chip:hover { background: var(--card-2); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip b { padding: 0 6px; border-radius: 999px; background: rgba(15, 23, 42, .08); font-size: 11px; }
.chip.active b { background: rgba(255, 255, 255, .2); }
.chip.danger.active { background: var(--danger-text); border-color: var(--danger-text); }
.chip.review.active { background: var(--review-text); border-color: var(--review-text); }
.chip.ok.active { background: var(--ok-text); border-color: var(--ok-text); }
.badge-new { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 10px; font-weight: 800; }

/* Forms */
.field { display: grid; gap: 5px; min-width: 0; }
.field label, .field > span.label { color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.field .help { color: var(--ink-3); font-size: 12px; }
.field .error { color: var(--danger-text); font-size: 12px; font-weight: 600; }
.input, .select, .textarea, input[type="date"], input[type="month"] { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--card); color: var(--ink); font-size: 14px; }
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); outline: none; }
.input.invalid, .select.invalid { border-color: var(--danger-dot); }
.input[type="file"] { padding: 7px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364708a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 32px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.form-error { padding: 10px 12px; border-radius: 10px; background: var(--danger-bg); color: var(--danger-text); font-weight: 600; font-size: 13px; }
.form-ok { padding: 10px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok-text); font-weight: 600; font-size: 13px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); }
.check strong { display: block; font-size: 13.5px; }
.check span { color: var(--ink-3); font-size: 12.5px; }
.search { position: relative; min-width: 220px; }
.search .icon { position: absolute; left: 11px; top: 11px; color: var(--ink-4); }
.search .input { padding-left: 36px; }
.money-input { text-align: right; }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type="color"] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.swatch.active { border-color: var(--ink); }

/* Filters bar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 12px; }
.toolbar .chips { flex: 1 1 auto; }
.filters-advanced { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); margin-bottom: 12px; }
details.more > summary { list-style: none; cursor: pointer; color: var(--brand-strong); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
details.more > summary::-webkit-details-marker { display: none; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { position: sticky; top: 0; z-index: 1; padding: 10px 14px; background: var(--card-2); color: var(--ink-3); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--card-2); }
.table td.num, .table th.num { text-align: right; }
.table td .sub { display: block; color: var(--ink-3); font-size: 12px; margin-top: 1px; }
.table tfoot td { background: var(--card-2); font-weight: 800; }
.table .actions { white-space: nowrap; text-align: right; }
.table tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger-dot); }
.table tr.group td { background: var(--card-2); color: var(--ink-2); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--ink-3); font-size: 12.5px; }
.pager .row { gap: 4px; }

/* Lists */
.list { display: grid; gap: 8px; }
.list-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; color: inherit; }
.list-item:hover { border-color: var(--line-2); background: var(--card-2); }
.list-item .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-dot); }
.list-item .dot.danger { background: var(--danger-dot); } .list-item .dot.warn { background: var(--warn-dot); } .list-item .dot.info { background: var(--info-dot); } .list-item .dot.review { background: var(--review-dot); } .list-item .dot.ok { background: var(--ok-dot); }
.list-item strong { display: block; font-size: 13.5px; }
.list-item small { display: block; color: var(--ink-3); }
.list-item .amount { font-weight: 800; white-space: nowrap; }
.attention-count { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-weight: 800; font-size: 12.5px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; padding: 0 0 14px 22px; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.timeline-item::after { content: ""; position: absolute; left: 8.5px; top: 16px; bottom: -2px; width: 1px; background: var(--line-2); }
.timeline-item:last-child::after { display: none; }
.timeline-item strong { font-size: 13px; }
.timeline-item small { display: block; color: var(--ink-3); }
.timeline-item .diff { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-2); }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-3); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.tab.active { color: var(--brand-strong); border-bottom-color: var(--brand); }

/* Empty, notice, skeleton */
.empty { display: grid; place-items: center; gap: 8px; padding: 36px 20px; text-align: center; color: var(--ink-3); }
.empty .icon { width: 36px; height: 36px; color: var(--ink-4); }
.empty h3 { color: var(--ink); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13px; }
.notice .icon { margin-top: 1px; }
.notice.info { background: var(--info-bg); color: var(--info-text); }
.notice.warn { background: var(--warn-bg); color: var(--warn-text); }
.notice.danger { background: var(--danger-bg); color: var(--danger-text); }
.notice.ok { background: var(--ok-bg); color: var(--ok-text); }
.notice.review { background: var(--review-bg); color: var(--review-text); }
.notice strong { display: block; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--card-2) 25%, var(--line) 50%, var(--card-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; min-height: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Drawer, modal, toast */
.drawer-backdrop, .modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 40; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--card); box-shadow: var(--shadow-lg); z-index: 41; display: flex; flex-direction: column; animation: slide .2s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer.wide { width: min(760px, 100%); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.drawer-head .kicker { color: var(--ink-3); font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.drawer-body { padding: 18px 22px; overflow-y: auto; flex: 1 1 auto; }
.drawer-foot { padding: 12px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--card-2); }
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 42; padding: 16px; }
.modal-card { width: min(480px, 100%); background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 22px; animation: pop .15s ease; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-card h2 { margin-bottom: 6px; }
.modal-card p { color: var(--ink-2); }
.toast-root { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(440px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 13.5px; animation: rise .2s ease; }
.toast.ok { background: #14532d; color: #fff; } .toast.danger { background: #7f1d1d; color: #fff; } .toast.warn { background: #78350f; color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* Charts */
.chart { position: relative; width: 100%; min-height: 240px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.chart text { fill: var(--ink-3); font-size: 11px; }
.chart .grid line { stroke: var(--grid); }
.chart .axis line, .chart .axis path { stroke: var(--axis); }
.chart .s1 { fill: var(--s1); } .chart .s2 { fill: var(--s2); } .chart .s3 { fill: var(--s3); } .chart .s4 { fill: var(--s4); } .chart .s5 { fill: var(--s5); } .chart .s6 { fill: var(--s6); }
.chart .l1 { stroke: var(--s1); } .chart .l2 { stroke: var(--s2); } .chart .l3 { stroke: var(--s3); } .chart .l4 { stroke: var(--s4); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { opacity: .12; }
.chart .bar { rx: 4; }
.chart .bar:hover, .chart .hit:hover ~ .bar { opacity: .85; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .dot { stroke: #fff; stroke-width: 2; }
.chart .zero { stroke: var(--ink-4); stroke-dasharray: 3 3; }
.chart .neg { fill: var(--s6); }
.chart-tip { position: fixed; z-index: 70; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; box-shadow: var(--shadow-lg); pointer-events: none; max-width: 260px; }
.chart-tip b { display: block; font-size: 12.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--s1); }
.legend i.s2 { background: var(--s2); } .legend i.s3 { background: var(--s3); } .legend i.s4 { background: var(--s4); } .legend i.s5 { background: var(--s5); } .legend i.s6 { background: var(--s6); }
.chart-table { margin-top: 8px; }
.chart-table summary { cursor: pointer; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.bars-h { display: grid; gap: 8px; }
.bars-h .bar-row { display: grid; grid-template-columns: minmax(90px, 30%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 12.5px; }
.bars-h .track { height: 10px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.bars-h .fill { height: 100%; border-radius: 999px; background: var(--s1); }
.bars-h .fill.s2 { background: var(--s2); } .bars-h .fill.s3 { background: var(--s3); } .bars-h .fill.s4 { background: var(--s4); } .bars-h .fill.s6 { background: var(--s6); }
.bars-h .val { font-weight: 700; white-space: nowrap; }
.donut { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center; }
.sparkline { width: 90px; height: 28px; }

/* Onboarding steps */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.step.active { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.step.done { color: var(--ok-text); background: var(--ok-bg); border-color: transparent; }
.step i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--muted-bg); font-style: normal; font-size: 11px; }
.step.active i { background: var(--brand); color: var(--brand-ink); }
.step.done i { background: var(--ok-dot); color: #fff; }
.segment-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.segment-card { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-align: left; cursor: pointer; }
.segment-card:hover { border-color: var(--line-2); }
.segment-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.segment-card .icon { width: 22px; height: 22px; color: var(--brand); }
.segment-card strong { font-size: 13.5px; }
.segment-card small { color: var(--ink-3); }

/* Integrations */
.integration-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.integration { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.integration .top { display: flex; align-items: center; gap: 10px; }
.integration .mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; }
.integration h3 { font-size: 14.5px; }
.integration p { color: var(--ink-2); font-size: 13px; }
.integration .methods { display: flex; flex-wrap: wrap; gap: 4px; }
.integration .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.code { display: block; padding: 12px 14px; border-radius: 10px; background: #0f172a; color: #e2e8f0; font: 12.5px/1.5 var(--font-code); overflow-x: auto; white-space: pre; }
.code.inline { display: inline; padding: 2px 6px; white-space: normal; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .code { flex: 1 1 auto; }

/* Auth */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-side { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; color: #fff; background: radial-gradient(1200px 600px at 10% 0%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(160deg, #2b4fd8 0%, #1e3bb0 70%, #0f172a 140%); overflow: hidden; }
.auth-side .brand-logo { background: rgba(255, 255, 255, .16); color: #fff; }
.auth-side .brand strong { color: #fff; max-width: none; }
.auth-side .brand small { color: rgba(255, 255, 255, .7); }
.auth-hero h1 { color: #fff; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05; max-width: 520px; }
.auth-hero p { margin-top: 16px; max-width: 460px; color: rgba(255, 255, 255, .82); font-size: 15px; }
.auth-points { display: grid; gap: 10px; margin-top: 28px; }
.auth-points div { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: rgba(255, 255, 255, .9); }
.auth-points .icon { color: #fff; margin-top: 2px; }
.auth-side footer { color: rgba(255, 255, 255, .6); font-size: 12px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(440px, 100%); }
.auth-card h2 { font-size: 24px; letter-spacing: -.02em; }
.auth-card .lead { color: var(--ink-3); margin: 6px 0 22px; }
.auth-card form { display: grid; gap: 14px; }
.auth-foot { margin-top: 18px; color: var(--ink-3); font-size: 13px; text-align: center; }
.auth-foot a, .auth-foot button { color: var(--brand-strong); font-weight: 700; text-decoration: none; }
.auth-org { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); margin-bottom: 18px; }
.auth-org img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; }
.password-meter { height: 6px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.password-meter i { display: block; height: 100%; width: 0; background: var(--danger-dot); transition: width .2s; }
.password-meter i.mid { background: var(--warn-dot); } .password-meter i.good { background: var(--ok-dot); }

/* Landing site */
.site { color: var(--ink); }
.site-nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-nav nav { display: flex; gap: 18px; font-weight: 700; font-size: 13.5px; }
.site-nav nav a { color: var(--ink-2); text-decoration: none; }
.site section { padding: clamp(40px, 7vw, 96px) clamp(16px, 4vw, 48px); max-width: 1180px; margin: 0 auto; }
.site .hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.site .hero h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -.03em; }
.site .hero .lead { margin-top: 18px; color: var(--ink-2); font-size: 17px; max-width: 520px; }
.site .hero .cta { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.site .eyebrow { color: var(--brand-strong); font-weight: 800; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.site h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; }
.site .sub { color: var(--ink-2); font-size: 15.5px; margin-top: 10px; max-width: 640px; }
.mock { padding: 14px; border-radius: 20px; background: linear-gradient(160deg, var(--brand-soft), var(--surface)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mock .mock-top { display: flex; gap: 6px; margin-bottom: 12px; }
.mock .mock-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
.mock .kpi { padding: 12px; }
.mock .kpi-value { font-size: 18px; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 32px; }
.feature { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.feature .kpi-icon { margin-bottom: 12px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 13.5px; }
.how { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 32px; counter-reset: passo; }
.how div { padding: 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.how div::before { counter-increment: passo; content: counter(passo, decimal-leading-zero); display: block; color: var(--brand); font-weight: 800; font-size: 22px; margin-bottom: 8px; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 32px; align-items: stretch; }
.plan { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.plan .price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--ink-2); font-size: 13.5px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li .icon { color: var(--ok-dot); margin-top: 2px; }
.site footer.site-foot { padding: 32px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .icon { color: var(--ok-dot); }

/* Aviso de licença */
.license-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px clamp(16px, 2.4vw, 36px); font-size: 13px; font-weight: 600; }
.license-banner span { flex: 1 1 260px; }
.license-banner.info { background: var(--info-bg); color: var(--info-text); }
.license-banner.warn { background: var(--warn-bg); color: var(--warn-text); }
.license-banner.danger { background: var(--danger-bg); color: var(--danger-text); }

/* Responsive */
@media (max-width: 1100px) {
  :root { --sidebar-w: 232px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--menu-bg); color: var(--menu-text); border-bottom: 1px solid var(--menu-line); position: sticky; top: 0; z-index: 30; }
  .mobile-bar .brand { padding: 0; }
  .sidebar { position: fixed; top: 0; left: 0; z-index: 45; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(15, 23, 42, .4); }
  .workspace { padding: 16px 16px 48px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 22px; min-height: auto; }
  .auth-hero h1 { font-size: 30px; }
  .auth-points, .auth-side footer { display: none; }
  .site .hero { grid-template-columns: 1fr; }
  .site-nav nav { display: none; }
  .kpi.hero { grid-template-columns: 1fr; }
  .donut { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi-icon { display: none; }
  .month-nav b { min-width: 120px; }
  .table th { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--ink-3); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; text-align: left; }
  .table td.actions { justify-content: flex-end; }
  .table tr.overdue td:first-child { box-shadow: none; }
  .table tfoot { display: none; }
  .drawer { width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .mobile-bar, .page-actions, .toolbar, .btn { display: none !important; } .shell { display: block; } .card, .kpi { box-shadow: none; } }

/* campo curto de dinheiro, usado na repartição de uma transação entre contas */
.input-valor { max-width: 130px; text-align: right; }


/* ---------------------------------------------------------------- Prumo */
.brand-mark { width: 40px; height: 40px; flex: 0 0 auto; display: block; border-radius: 12px; }
.brand-mark .bm-fundo { fill: #2b4fd8; }
.brand-mark .bm-f { fill: #ffffff; }
.brand-mark .bm-visto { fill: none; stroke: #ffffff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.auth-side .brand-mark .bm-fundo { fill: rgba(255, 255, 255, .16); }
.made-with { color: var(--ink-4); font-size: 11.5px; text-align: center; margin: 4px 0 0; }
.made-with a { color: inherit; }
.auth-side .made-with, .auth-side footer a { color: rgba(255, 255, 255, .7); }
.boot-mark { background: var(--brand); }

.table td.num, .table th.num { white-space: nowrap; }
.table th { font-family: var(--font); }
.btn.danger:hover { filter: brightness(.96); }
.steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
details > summary { cursor: pointer; padding: 6px 0; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 10px; background: var(--card-2); font-size: 15px; }
.secret-key { font-size: 15px; letter-spacing: .04em; word-break: break-all; }
.legal-page { max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; }
.legal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legal-head nav { display: flex; gap: 16px; flex-wrap: wrap; }
.legal-head nav a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.legal-doc { line-height: 1.65; }
.legal-doc.card { padding: clamp(18px, 4vw, 40px); }
.legal-doc h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 12px; }
.legal-doc h3 { margin: 20px 0 8px; font-size: 17px; }
.legal-doc p, .legal-doc ul, .legal-doc ol, .legal-doc .table-wrap { margin: 0 0 12px; }
.legal-doc blockquote { margin: 0 0 16px; padding: 12px 14px; border-left: 4px solid var(--alerta); background: var(--warn-bg); color: var(--warn-text); border-radius: 0 10px 10px 0; }
.legal-accept { padding: clamp(18px, 4vw, 36px); display: grid; gap: 12px; }
.legal-accept .legal-doc { max-height: 46vh; overflow: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); }
@media (max-width: 400px) { .recovery-codes { grid-template-columns: 1fr; } }
/* cartões de resumo: valores em mono tabular, numa linha só; três por linha em tela larga */
.kpi-value { font-family: var(--font-num); font-weight: 800; font-size: clamp(17px, 1.4vw, 23px); letter-spacing: -.02em; white-space: nowrap; overflow-wrap: normal; }
.kpi.hero .kpi-value { font-size: clamp(22px, 2vw, 30px); }
.kpi-label { font-weight: 600; }
@media (min-width: 1100px) { .kpi-grid.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.table td.actions .acoes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 420px) { .kpi-value { font-size: 16px; } }

/* ---------------------------------------------------------- acabamento */
/* nomes no menu e na barra do celular: quebram a linha (até duas) em vez de cortar no meio */
.brand > span:last-child, .user-box > span:last-child { min-width: 0; }
.brand strong, .user-box strong { white-space: normal; overflow: hidden; text-overflow: clip; max-width: none; line-height: 1.25; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mobile-bar .brand { min-width: 0; }
.mobile-bar .brand strong { font-size: 15px; }
/* aviso: negrito no meio da frase fica na linha; só o título do aviso ganha linha própria */
.notice strong { display: inline; }
.notice strong.notice-title { display: block; }
/* barra de filtros: atalhos à esquerda, seleções e busca à direita, na mesma linha quando cabe */
.toolbar > .row { flex: 0 1 auto; justify-content: flex-end; flex-wrap: nowrap; }
.toolbar .row > .select { width: auto; min-width: 150px; flex: 0 0 auto; }
.toolbar .search { flex: 0 1 240px; min-width: 160px; }
/* colunas do painel: cada cartão com a própria altura (sem esticar até a coluna vizinha) */
.grid-main > .stack { align-content: start; }
/* rosca: anel com cor por fatia, valor do centro com folga e legenda legível */
.donut { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 20px; }
.donut svg { flex: 0 0 140px; }
.donut .fatia { stroke: var(--s1); cursor: pointer; }
.donut .fatia.s2 { stroke: var(--s2); } .donut .fatia.s3 { stroke: var(--s3); } .donut .fatia.s4 { stroke: var(--s4); } .donut .fatia.s5 { stroke: var(--s5); } .donut .fatia.s6 { stroke: var(--s6); }
.donut .donut-valor { fill: var(--ink); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.donut .donut-rotulo { fill: var(--ink-3); font-size: 11px; }
.donut-legenda { flex: 1 1 200px; min-width: 0; margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.donut-legenda li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13px; color: var(--ink-2); }
.donut-legenda i { width: 10px; height: 10px; border-radius: 3px; background: var(--s1); align-self: center; }
.donut-legenda i.s2 { background: var(--s2); } .donut-legenda i.s3 { background: var(--s3); } .donut-legenda i.s4 { background: var(--s4); } .donut-legenda i.s5 { background: var(--s5); } .donut-legenda i.s6 { background: var(--s6); }
.donut-legenda b { font-variant-numeric: tabular-nums; color: var(--ink); }
.bars-h .fill.s5 { background: var(--s5); }
/* cartões lado a lado que não devem esticar até a altura do vizinho */
.grid-2.topo { align-items: start; }
/* segundo fator: QR Code ao lado da chave */
.mfa-setup { display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: flex-start; }
.mfa-setup > :last-child { flex: 1 1 260px; min-width: 0; }
.qr-box { flex: 0 0 auto; width: 188px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; }
.qr-box svg { display: block; width: 100%; height: auto; }
.copy-row .code { min-width: 0; overflow-x: auto; }
@media (max-width: 640px) {
  /* ações do topo no celular: mês numa linha, os dois botões dividindo a de baixo */
  .page-actions { width: 100%; }
  .page-actions > .month-nav { flex: 1 1 100%; justify-content: space-between; }
  .page-actions > .btn { flex: 1 1 0; justify-content: center; white-space: nowrap; }
  .toolbar > .row { flex-wrap: wrap; }
  .toolbar .row > .select, .toolbar .search { flex: 1 1 100%; width: 100%; }
}
/* celular: nada empurra a página para o lado; abas roláveis em vez de vazar */
.shell-main, .page-head > div { min-width: 0; }
.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.tab { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 900px) { .shell { grid-template-columns: minmax(0, 1fr); } }
.table .diff { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-2); }
@media (max-width: 640px) {
  /* tabela em cartões no celular: a linha de apoio (conta, contato, competência) desce para baixo do valor */
  .table td { flex-wrap: wrap; }
  .table td > .sub { flex: 1 1 100%; text-align: right; }
}
.integration .methods { align-items: flex-start; }
