/* ============ Finance Intelligence — design system ============ */
:root {
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc; --surface-3: #eef2f7;
  --text: #0f1b2d; --muted: #5b6b80; --faint: #8a98ab; --border: #e1e7ef; --border-strong: #cdd6e2;
  --primary: #12304f; --primary-ink: #ffffff; --primary-soft: #e7eef7;
  --accent: #0d9488; --accent-soft: #d9f3ef;
  --pos: #0f8a5f; --pos-soft: #dcf5ea; --neg: #c8312f; --neg-soft: #fde4e3; --warn: #b7791f; --warn-soft: #fcefd2; --info: #2563a8; --info-soft: #dfeaf8;
  --c1: #0d9488; --c2: #e0593f; --c3: #d99a1b; --c4: #3b6fd4; --c5: #8a5bd6; --c6: #5b6b80; --c7: #cf4d8f; --c8: #4aa24f;
  --shadow: 0 1px 2px rgba(15,27,45,.05), 0 4px 14px rgba(15,27,45,.05);
  --shadow-lg: 0 10px 40px rgba(15,27,45,.18);
  --radius: 14px; --radius-sm: 9px; --sidebar: 252px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a111e; --surface: #111b2d; --surface-2: #0e1727; --surface-3: #18253b;
  --text: #e8eef8; --muted: #9db0c8; --faint: #6f819b; --border: #22324c; --border-strong: #2f4363;
  --primary: #2dd4bf; --primary-ink: #04201c; --primary-soft: #14312f;
  --accent: #2dd4bf; --accent-soft: #123631;
  --pos: #4ade9b; --pos-soft: #12372a; --neg: #ff7b78; --neg-soft: #3b1819; --warn: #f2bf55; --warn-soft: #3a2d0f; --info: #7db4f0; --info-soft: #14273f;
  --c1: #2dd4bf; --c2: #ff8c6b; --c3: #f2bf55; --c4: #7da7f5; --c5: #b794f6; --c6: #9db0c8; --c7: #f08cc0; --c8: #86d98a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a111e; --surface: #111b2d; --surface-2: #0e1727; --surface-3: #18253b;
    --text: #e8eef8; --muted: #9db0c8; --faint: #6f819b; --border: #22324c; --border-strong: #2f4363;
    --primary: #2dd4bf; --primary-ink: #04201c; --primary-soft: #14312f; --accent: #2dd4bf; --accent-soft: #123631;
    --pos: #4ade9b; --pos-soft: #12372a; --neg: #ff7b78; --neg-soft: #3b1819; --warn: #f2bf55; --warn-soft: #3a2d0f; --info: #7db4f0; --info-soft: #14273f;
    --c1: #2dd4bf; --c2: #ff8c6b; --c3: #f2bf55; --c4: #7da7f5; --c5: #b794f6; --c6: #9db0c8; --c7: #f08cc0; --c8: #86d98a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.55); color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; } h4 { font-size: .9rem; }
p { margin: 0 0 .6em; } a { color: var(--info); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .82rem; } .xs { font-size: .74rem; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .warn { color: var(--warn); }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; } .grow { flex: 1; } .hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 700; letter-spacing: -.02em; font-size: 1.02rem; }
.brand .logo { width: 32px; height: 32px; border-radius: 9px; background: #12304f; display: grid; place-items: center; flex: none; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 550; font-size: .93rem; }
.nav a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--text); }
.nav a.active svg { color: var(--accent); }
.nav svg { width: 19px; height: 19px; flex: none; }
.sidebar .foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--text); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.topbar h1 { font-size: 1.35rem; }
.content { padding: 8px 28px 90px; max-width: 1280px; width: 100%; margin: 0 auto; }
.bottomnav { display: none; }

/* ---------- componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; } .card.tight { padding: 14px; }
.card > header, .card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.span2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 14px; } .row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; } .section-title h2 { flex: 1; }
.kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .label { font-size: .78rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.kpi .sub { font-size: .78rem; color: var(--muted); }
.kpi.hero .value { font-size: 2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .9rem; cursor: pointer; min-height: 38px; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-3); } .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); } .btn.primary:hover { filter: brightness(1.12); background: var(--primary); }
.btn.danger { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 45%, var(--border)); } .btn.danger:hover { background: var(--neg-soft); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--surface-3); }
.btn.sm { padding: 5px 10px; min-height: 30px; font-size: .82rem; border-radius: 8px; } .btn.block { width: 100%; }
.btn svg { width: 17px; height: 17px; } .btn.sm svg { width: 15px; height: 15px; }
.icon-btn { width: 36px; height: 36px; padding: 0; } .icon-btn.sm { width: 30px; height: 30px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 650; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.badge.pos { background: var(--pos-soft); color: var(--pos); } .badge.neg { background: var(--neg-soft); color: var(--neg); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); } .badge.accent { background: var(--accent-soft); color: var(--accent); }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 99px; font-size: .84rem; cursor: pointer; font-weight: 550; }
.chip:hover { background: var(--surface-3); } .chip.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 6px 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; border: 0; background: none; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--text); } .tab.active { color: var(--text); border-color: var(--accent); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; font-size: .88rem; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; } .progress > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .5s; }
.progress.pos > i { background: var(--pos); } .progress.warn > i { background: var(--warn); } .progress.neg > i { background: var(--neg); }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); } .empty svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 8px; } .empty h3 { color: var(--text); margin-bottom: 4px; }
.note { padding: 10px 13px; border-radius: 10px; background: var(--info-soft); color: var(--text); font-size: .86rem; border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); }
.note.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); } .note.neg { background: var(--neg-soft); border-color: color-mix(in srgb, var(--neg) 30%, transparent); } .note.pos { background: var(--pos-soft); border-color: color-mix(in srgb, var(--pos) 30%, transparent); }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 10px; min-height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- tabelas e listas ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; } tbody tr:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list { display: flex; flex-direction: column; } .list > * { padding: 11px 0; border-bottom: 1px solid var(--border); } .list > *:last-child { border-bottom: 0; }
.item { display: flex; align-items: center; gap: 12px; }
.item .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); flex: none; color: var(--muted); } .item .ico svg { width: 18px; height: 18px; }
.item .ico.pos { background: var(--pos-soft); color: var(--pos); } .item .ico.neg { background: var(--neg-soft); color: var(--neg); } .item .ico.warn { background: var(--warn-soft); color: var(--warn); } .item .ico.info { background: var(--info-soft); color: var(--info); }
.item .body { flex: 1; min-width: 0; } .item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .item .meta { font-size: .8rem; color: var(--muted); }
.alert-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--border-strong); }
.alert-item.danger { border-left-color: var(--neg); background: var(--neg-soft); } .alert-item.warn { border-left-color: var(--warn); background: var(--warn-soft); } .alert-item.info { border-left-color: var(--info); background: var(--info-soft); }
.alert-item b { display: block; font-size: .9rem; } .alert-item span { font-size: .82rem; color: var(--muted); }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .field label { font-size: .8rem; font-weight: 650; color: var(--muted); }
.field .hint { font-size: .76rem; color: var(--faint); }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], input[type=search], input[type=month], input[type=file], select, textarea {
  width: 100%; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; min-height: 40px; }
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); border-color: var(--accent); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 9px; font-size: .9rem; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .form-grid .full { grid-column: 1 / -1; }
.money-input { position: relative; } .money-input::before { content: "R$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: .85rem; pointer-events: none; } .money-input input { padding-left: 38px; font-variant-numeric: tabular-nums; }
.err { color: var(--neg); font-size: .84rem; } .form-error { padding: 10px 12px; background: var(--neg-soft); color: var(--neg); border-radius: 10px; font-size: .88rem; }

/* ---------- modal / drawer / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8,14,26,.55); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .14s; }
.modal { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal.wide { width: min(860px, 100%); } .modal.narrow { width: min(420px, 100%); }
.modal > header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); } .modal > header h2 { flex: 1; }
.modal .body { padding: 20px; overflow-y: auto; } .modal > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(14px); opacity: 0; } }
.modal { animation: up .18s; }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .9rem; max-width: 360px; animation: up .2s; pointer-events: auto; }
.toast.err { background: var(--neg); color: #fff; } .toast.ok { background: var(--pos); color: #04200f; }
:root[data-theme="dark"] .toast.ok { color: #052e1a; }

/* ---------- gráficos ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; } .chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); } .chart .grid-line { stroke: var(--border); stroke-width: 1; } .chart .axis { stroke: var(--border-strong); }
.chart .tt { pointer-events: none; opacity: 0; transition: opacity .1s; } .chart-wrap { position: relative; } .chart-tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); padding: 7px 10px; border-radius: 9px; font-size: .78rem; box-shadow: var(--shadow-lg); z-index: 5; display: none; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); margin-top: 8px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.gauge-score { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; }
.indicator { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--border); } .indicator:last-child { border: 0; }
.indicator .progress { grid-column: 1 / -1; height: 6px; }

/* fases */
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .phase { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; opacity: .75; }
.phase b { display: block; font-size: .86rem; } .phase.current { opacity: 1; background: var(--primary-soft); border-color: var(--accent); } .phase .n { color: var(--accent); font-weight: 800; font-size: .75rem; }

/* calendário */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; } .cal .dow { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 650; padding: 4px; text-transform: uppercase; }
.cal .day { min-height: 92px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 5px; font-size: .72rem; overflow: hidden; } .cal .day.dim { opacity: .35; } .cal .day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal .day .dn { font-weight: 700; font-size: .78rem; margin-bottom: 2px; } .cal .ev { display: block; padding: 1px 5px; border-radius: 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--surface-3); }
.cal .ev.income { background: var(--pos-soft); color: var(--pos); } .cal .ev.expense, .cal .ev.debt, .cal .ev.tax { background: var(--neg-soft); color: var(--neg); } .cal .ev.card { background: var(--warn-soft); color: var(--warn); } .cal .ev.negotiation { background: var(--info-soft); color: var(--info); }
.cal .ev.projected { opacity: .65; font-style: italic; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 12px; min-height: 360px; } .msg { max-width: min(680px, 92%); padding: 11px 14px; border-radius: 14px; font-size: .94rem; } .msg.user { align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 4px; } .msg details { margin-top: 8px; font-size: .84rem; color: var(--muted); } .msg summary { cursor: pointer; font-weight: 650; color: var(--text); } .msg ul { margin: 6px 0 0; padding-left: 18px; } .msg li { margin: 3px 0; }
.src { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); margin: 3px 4px 0 0; color: var(--muted); }

/* auth */
.auth-wrap { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-hero { background: #12304f; color: #eaf2fb; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 26px; position: relative; overflow: hidden; }
.auth-hero h1 { font-size: 2.3rem; line-height: 1.12; letter-spacing: -.03em; max-width: 520px; } .auth-hero p { color: #b9cde3; max-width: 480px; font-size: 1.02rem; }
.auth-hero ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 480px; } .auth-hero li { display: flex; gap: 12px; color: #d4e2f1; font-size: .95rem; } .auth-hero li svg { width: 20px; height: 20px; color: #2dd4bf; flex: none; margin-top: 2px; }
.auth-card { display: grid; place-items: center; padding: 28px; } .auth-card .inner { width: min(410px, 100%); display: flex; flex-direction: column; gap: 16px; }

/* onboarding */
.stepper { display: flex; gap: 6px; margin-bottom: 18px; } .stepper i { flex: 1; height: 5px; border-radius: 9px; background: var(--surface-3); } .stepper i.done { background: var(--accent); } .stepper i.cur { background: color-mix(in srgb, var(--accent) 55%, var(--surface-3)); }
.rowform { display: grid; grid-template-columns: 1.6fr 1fr .6fr auto; gap: 8px; align-items: end; padding: 10px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--border); }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .sidebar { display: none; }
  .topbar { padding: 12px 16px; } .topbar h1 { font-size: 1.15rem; } .content { padding: 4px 16px 96px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--muted); padding: 5px 2px; border: 0; background: none; font-weight: 600; cursor: pointer; }
  .bottomnav svg { width: 22px; height: 22px; } .bottomnav .active { color: var(--accent); } .bottomnav a:hover { text-decoration: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .g4.kpis, .g3.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span2 { grid-column: auto; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-hero { display: none; }
  .phases { grid-template-columns: repeat(2, 1fr); } .form-grid { grid-template-columns: 1fr; }
  .overlay { align-items: end; padding: 0; } .modal, .modal.wide, .modal.narrow { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; }
  .rowform { grid-template-columns: 1fr 1fr; } #toasts { left: 12px; right: 12px; bottom: 84px; } .toast { max-width: none; }
  .hero-row { grid-template-columns: 1fr !important; } .topbar .btn.primary span { display: none; } .topbar .btn.primary { padding: 0 12px; }
  .kpi .value { font-size: 1.2rem; } .kpi.hero .value { font-size: 1.5rem; } .card { padding: 14px; }
  .cal .day { min-height: 62px; } .cal .ev { font-size: 0; padding: 2px; height: 6px; }
  .fab { bottom: 76px !important; }
}
.fab { position: fixed; right: 22px; bottom: 24px; z-index: 35; box-shadow: var(--shadow-lg); border-radius: 99px; padding: 0 20px; min-height: 48px; }
.menu-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .menu-sheet a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--surface-2); color: var(--text); font-size: .8rem; font-weight: 600; border: 1px solid var(--border); } .menu-sheet svg { width: 24px; height: 24px; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .bottomnav, .fab, #toasts { display: none !important; } .shell { display: block; } }
@media (max-width: 900px) { [data-filters] select { width: 100% !important; } [data-filters] .field { min-width: 100% !important; } }
