/* Financeiro AVANTE — identidade: fundo claro, azul-marinho AVANTE, cards limpos. */
:root {
  --navy: #0c213a; --navy2: #123255; --navy3: #08192d;
  --blue: #1769d3; --blue-d: #125bb8; --blue-l: #eaf2ff;
  --bg: #f3f6fa; --card: #fff; --text: #122033; --muted: #5c6b7f; --line: #e2e8f0; --line2: #edf1f5;
  --ok: #0d7a4c; --ok-bg: #dcf5e8; --bad: #c42f37; --bad-bg: #fde4e4; --warn: #a65a00; --warn-bg: #fff0d6; --off: #6b7280; --off-bg: #eef0f3;
  --s1: #2a78d6; --s2: #eb6834;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 32, 56, .05), 0 2px 8px rgba(16, 32, 56, .04);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot { min-height: 100vh; display: grid; place-content: center; font-weight: 800; font-size: 28px; letter-spacing: 2px; color: var(--navy); text-align: center; }
.boot small { display: block; font-size: 11px; letter-spacing: 3px; color: var(--muted); }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 20% -10%, #1a3a63 0, var(--navy) 45%, var(--navy3) 100%); }
.auth-card { width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.auth-brand { text-align: center; font-weight: 800; font-size: 30px; letter-spacing: 3px; color: var(--navy); margin-bottom: 22px; }
.auth-brand small { display: block; font-size: 12px; letter-spacing: 4px; font-weight: 600; color: var(--muted); margin-top: 2px; text-transform: uppercase; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-foot { color: #9eb4cc; font-size: 12px; margin-top: 18px; }
.steps { padding-left: 18px; margin: 0; font-size: 13px; display: grid; gap: 4px; }
.secret { font: 600 18px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 1px; text-align: center; background: var(--blue-l); border: 1px dashed #a9c9ee; border-radius: 10px; padding: 10px; word-break: break-all; user-select: all; }
.secret.small { font-size: 13px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.codes code { background: #f6f8fb; border: 1px solid var(--line); border-radius: 6px; padding: 6px; text-align: center; font-size: 14px; }
.center { text-align: center; margin: 0; }

/* ---------- layout ---------- */
.layout { display: flex; min-height: 100vh; }
.side { width: 248px; background: linear-gradient(180deg, var(--navy), var(--navy3)); color: #fff; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto; z-index: 30; }
.brand { padding: 4px 10px 16px; font-weight: 800; font-size: 25px; letter-spacing: 2px; }
.brand small { display: block; font-size: 10px; letter-spacing: 3px; font-weight: 600; color: #9eb4cc; }
.navgroup { font-size: 10px; color: #7f9ab7; font-weight: 800; letter-spacing: 1.3px; margin: 14px 10px 5px; }
.side nav a, .side-foot a { display: flex; gap: 10px; align-items: center; color: #c9d7e6; padding: 8px 10px; border-radius: 8px; margin: 1px 0; font-size: 13.5px; }
.side nav a:hover, .side-foot a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; color: #fff; }
.side nav a.active, .side-foot a.active { background: var(--blue); color: #fff; }
.ni { width: 18px; text-align: center; opacity: .9; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 10px; display: flex; flex-direction: column; }
.main { margin-left: 248px; width: calc(100% - 248px); min-width: 0; }
.top { min-height: 68px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 10px 24px; position: sticky; top: 0; z-index: 20; }
.titlewrap { flex: 1; min-width: 0; }
.titlewrap h1 { font-size: 20px; }
.titlewrap p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.period { display: flex; align-items: center; gap: 4px; background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.period[hidden] { display: none; }
.period .plabel { font-weight: 700; min-width: 128px; text-align: center; font-size: 13.5px; }
.period select { border: 0; background: transparent; padding: 6px; font-size: 12.5px; color: var(--muted); }
.content { padding: 20px 24px 48px; max-width: 1600px; }
.menu { display: none; }

/* ---------- botões ---------- */
.btn { border: 1px solid #d5deea; background: #fff; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: #f6f8fb; text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.success:hover { filter: brightness(.95); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: #fff; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.block { width: 100%; justify-content: center; padding: 11px; font-size: 14px; letter-spacing: .5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.danger-text { color: var(--bad) !important; }
.icon-btn { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); }
.icon-btn:hover { background: #eef2f7; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn.tiny { width: 22px; height: 22px; font-size: 13px; }
.linkbtn { border: 0; background: none; color: var(--blue); cursor: pointer; padding: 0; font-size: 13px; text-align: left; }
.linkbtn.light { color: #9eb4cc; padding: 8px 10px; }
.linkbtn.small { font-size: 12px; }

/* ---------- cards e KPIs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { padding: 16px 18px; margin-bottom: 16px; }
.sectionhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.sectionhead h2 { font-size: 15px; }
.hint { font-size: 12px; color: var(--muted); }
.kpis { display: grid; gap: 12px; margin-bottom: 14px; }
.kpis.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.k1 { grid-template-columns: 1fr; }
.kpi { padding: 13px 15px; display: block; color: inherit; }
a.kpi:hover { text-decoration: none; border-color: #b4cbe9; }
.kpi[data-go] { cursor: pointer; }
.kpi[data-go]:hover { border-color: #b4cbe9; }
.kpi .lab { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.kpi .val { font-size: 21px; font-weight: 800; margin: 6px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .sub { font-size: 11.5px; color: var(--muted); }
.kpi.hero { background: var(--navy); color: #fff; border-color: var(--navy); }
.kpi.hero .lab, .kpi.hero .sub { color: #b9cbe0; }
.kpi.pos .val, .pos { color: var(--ok); }
.kpi.neg .val, .neg { color: var(--bad); }
.kpi.alert { border-color: #f2b8bb; background: #fff8f8; }
.divisions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.division { padding: 14px; cursor: pointer; border-top: 3px solid var(--line); }
.division:hover { border-color: #b4cbe9; }
.d-renda { border-top-color: #0d7a4c; } .d-despesas { border-top-color: #c42f37; } .d-contas_fixas { border-top-color: #1769d3; } .d-dividas { border-top-color: #6542ae; } .d-poupanca { border-top-color: #167684; }
.dv-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.dv-val { font-size: 19px; font-weight: 800; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.dv-sub { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.dv-extra { font-size: 12px; margin-top: 8px; color: var(--muted); }
.grid2c { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2c > .card { margin-bottom: 0; }
.grid2c + .grid2c, .grid2c { margin-bottom: 14px; }
.notice { background: #fff7df; border: 1px solid #f1d899; padding: 10px 14px; border-radius: 10px; color: #6e4d0e; font-size: 13px; margin-bottom: 14px; }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed #cbd5e1; border-radius: 10px; background: #fafcff; }
.empty.small { padding: 14px; font-size: 13px; }
.empty.err { color: var(--bad); border-color: #f2b8bb; }
.loading { padding: 30px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mb { margin-bottom: 10px; }
.h3 { font-size: 13px; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.warn-text { color: var(--warn); }
.metricline { display: flex; justify-content: space-between; font-size: 13px; margin: 5px 0; gap: 10px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }

/* ---------- status (cor + ícone + texto) ---------- */
.st { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.st-ok { background: var(--ok-bg); color: var(--ok); }
.st-bad { background: var(--bad-bg); color: var(--bad); }
.st-warn { background: var(--warn-bg); color: var(--warn); }
.st-muted { background: #eef2f7; color: #4b5b70; }
.st-off { background: var(--off-bg); color: var(--off); text-decoration: line-through; }
.st.mini { padding: 1px 6px; text-decoration: none; }
.gp { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.g-renda { background: #dcf5e8; color: #0b6b43; } .g-desp { background: #fde4e4; color: #a8262e; } .g-cf { background: #e4efff; color: #155ba9; }
.g-div { background: #efe8ff; color: #5b3aa6; } .g-poup { background: #dff5f7; color: #126773; } .g-tr { background: #eef0f3; color: #4b5563; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: #66778c; background: #f8fafc; text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.tbl tbody tr:hover td { background: #fbfdff; }
.tbl tr[data-tx], .tbl tr[data-ct] { cursor: pointer; }
.tbl tfoot th { background: #f3f6fa; font-size: 12.5px; text-transform: none; color: var(--text); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c { text-align: center !important; }
.act { text-align: right; white-space: nowrap; }
.act .btn { margin-left: 4px; }
.desc { max-width: 360px; }
.row-off td, .row-off { opacity: .55; }
.w30 { width: 22%; }
.w120 { width: 120px; }
.w200 { max-width: 260px; }
.inline-money { width: 120px; text-align: right; border: 1px solid #d9e2ec; border-radius: 6px; padding: 5px 8px; }
.totals { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 8px 2px 12px; font-size: 13px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input, .toolbar select { border: 1px solid #d5deea; border-radius: 8px; padding: 7px 9px; background: #fff; max-width: 220px; }
.toolbar input[type=search] { min-width: 240px; max-width: 360px; flex: 1; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); margin: -4px -2px 14px; padding-bottom: 8px; }
.tabs button, .tabs a { border: 1px solid transparent; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: #4b5b70; font-size: 13px; }
.tabs button:hover, .tabs a:hover { background: #f3f6fa; text-decoration: none; }
.tabs .active { background: var(--blue-l); color: #145eb5; border-color: #b8d3f3; }

/* ---------- barras de progresso ---------- */
.bar-track { display: block; height: 7px; background: #edf2f7; border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar-fill { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.bar-fill.over { background: var(--bad); }

/* ---------- formulários e modal ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 11.5px; font-weight: 700; color: #5d6d82; text-transform: uppercase; letter-spacing: .3px; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 10px; border: 1px solid #d5deea; border-radius: 8px; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 2px solid #cfe1f8; outline-offset: 0; }
.field small { color: var(--muted); font-size: 11.5px; }
.field[hidden], [hidden] { display: none !important; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0; }
.full { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.checks { display: grid; gap: 6px; margin-bottom: 10px; }
.checks.cols3 { grid-template-columns: repeat(3, 1fr); }
.form-error { background: var(--bad-bg); color: var(--bad); border: 1px solid #f2b8bb; padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; }
.form-info { background: var(--blue-l); color: #134e95; border: 1px solid #b8d3f3; padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.seg { display: flex; background: #f1f4f8; border-radius: 10px; padding: 3px; margin-bottom: 14px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px; cursor: pointer; font-weight: 600; color: #4b5b70; }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg.small { margin: 0; }
details.more { margin-top: 12px; border-top: 1px solid var(--line2); padding-top: 10px; }
details.more summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.modal-wrap { position: fixed; inset: 0; background: rgba(5, 16, 28, .5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal { width: min(560px, 100%); background: #fff; border-radius: 14px; box-shadow: 0 25px 80px rgba(0, 0, 0, .25); }
.modal.wide { width: min(780px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 14px 20px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line2); flex-wrap: wrap; }
.settle-head { background: #f6f8fb; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.det-head { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.det-val { margin-left: auto; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin-bottom: 10px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.kv span { color: var(--muted); }
.kv b { text-align: right; font-weight: 600; }
.hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; }
.hist li { border-left: 3px solid var(--line); padding-left: 10px; }
.attach { margin: 8px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.preview { background: #f6f8fb; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-size: 11.5px; }

/* ---------- toasts e tooltip ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .2); font-size: 13.5px; max-width: 380px; transition: opacity .4s, transform .4s; }
.toast.t-err { background: var(--bad); }
.toast.t-warn { background: #8a4b00; }
.toast.out { opacity: 0; transform: translateY(8px); }
#chart-tip { position: fixed; display: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); padding: 8px 10px; font-size: 12px; z-index: 150; pointer-events: none; min-width: 140px; }
#chart-tip div { display: flex; justify-content: space-between; gap: 12px; }

/* ---------- gráficos ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #edf1f5; stroke-width: 1; }
.chart .zero { stroke: #9aa8b8; stroke-width: 1; }
.chart .ax { fill: #6b7a8f; font-size: 11px; }
.chart .ln { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--s1); stroke: #fff; stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart g:hover .hit { fill: rgba(23, 105, 211, .05); }
.chart .bar { stroke: #fff; stroke-width: 1; }
.chart .bar.s1, .sw.s1, .hb.s1 { fill: var(--s1); background: var(--s1); }
.chart .bar.s2, .sw.s2, .hb.s2 { fill: var(--s2); background: var(--s2); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbars { display: grid; gap: 8px; }
.hb-row { display: grid; grid-template-columns: 150px 1fr 110px; gap: 10px; align-items: center; font-size: 12.5px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { display: flex; flex-direction: column; gap: 2px; }
.hb { display: block; height: 10px; border-radius: 0 4px 4px 0; }
.hb-v { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- orçamento diário, calendário, metas, contas ---------- */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-bottom: 12px; }
.day { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 11.5px; display: flex; flex-direction: column; gap: 1px; }
.day b { font-size: 12px; } .day small { font-weight: 700; }
.day.d1 { background: #f0faf5; } .day.d1 small { color: var(--ok); }
.day.d2 { background: #fff7e8; } .day.d2 small { color: var(--warn); }
.day.d3 { background: #fdeeee; } .day.d3 small { color: var(--bad); }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calhead { font-size: 11px; font-weight: 800; color: var(--muted); text-align: center; }
.cday { background: #fff; border: 1px solid var(--line); border-radius: 8px; min-height: 104px; padding: 6px; font-size: 11.5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cday.off { background: transparent; border: 0; }
.cday.today { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.cd-h { display: flex; justify-content: space-between; align-items: center; }
.cev { display: block; text-align: left; border: 0; border-radius: 5px; padding: 3px 5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; width: 100%; }
.ev-ok { background: var(--ok-bg); color: var(--ok); } .ev-bad { background: var(--bad-bg); color: var(--bad); } .ev-warn { background: var(--warn-bg); color: var(--warn); } .ev-muted { background: #eef2f7; color: #43536a; }
.ctask { display: flex; gap: 4px; align-items: flex-start; font-size: 11px; }
.ctask.done { text-decoration: line-through; color: var(--muted); }
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.goal { padding: 15px; }
.goal h3 { font-size: 15px; }
.ring-line { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; margin: 10px 0; }
.big { font-size: 20px; }
.goal-line { margin-bottom: 10px; }
.accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.acc { padding: 14px; color: inherit; }
.acc:hover { text-decoration: none; border-color: #b4cbe9; }
.acc.sel { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.reports { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; }
.rep-nav { display: flex; flex-direction: column; padding: 8px; position: sticky; top: 84px; }
.rep-nav button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.rep-nav button:hover { background: #f3f6fa; }
.rep-nav button.active { background: var(--blue-l); color: #145eb5; font-weight: 700; }
.print-head { display: none; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.catcol { padding: 12px; }
.catcol h3 { font-size: 14px; }
.catlist { list-style: none; margin: 0; padding: 0; }
.catlist li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.cat-act { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.subs td.c { padding-left: 2px; padding-right: 2px; }

/* ---------- responsivo ---------- */
@media (max-width: 1280px) {
  .kpis.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .divisions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .grid2c, .reports { grid-template-columns: 1fr; }
  .rep-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .kpis.k5, .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .main { margin-left: 0; width: 100%; }
  .menu { display: inline-block; }
  .top { padding: 10px 16px; flex-wrap: wrap; }
  .controls { width: 100%; justify-content: space-between; }
  .content { padding: 14px 16px 40px; }
  .divisions, .kpis.k6, .kpis.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .kvs { grid-template-columns: 1fr; }
  .calendar { grid-template-columns: repeat(7, minmax(40px, 1fr)); overflow-x: auto; }
  .cday { min-height: 70px; }
  .hb-row { grid-template-columns: 100px 1fr 90px; }
}
@media (max-width: 520px) {
  .divisions, .kpis.k6, .kpis.k5, .kpis.k4, .kpis.k3 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 10px 11px; } .kpi .val { font-size: 16px; } .kpi .lab { font-size: 10.5px; } .kpi .sub { font-size: 10.5px; }
  .division { padding: 10px; } .dv-val { font-size: 16px; }
  .titlewrap p { display: none; }
  .period .plabel { min-width: 90px; }
  .checks.cols3 { grid-template-columns: 1fr; }
}

/* ---------- impressão / PDF ---------- */
@media print {
  body.printing .side, body.printing .top, body.printing .rep-nav, body.printing .no-print, body.printing #toasts { display: none !important; }
  body.printing .main { margin: 0; width: 100%; }
  body.printing .reports { display: block; }
  body.printing .card { box-shadow: none; border: 0; }
  body.printing .print-head { display: block; font-size: 12px; margin-bottom: 10px; border-bottom: 2px solid var(--navy); padding-bottom: 6px; }
  body.printing .tbl th, body.printing .tbl td { padding: 4px 6px; font-size: 10.5px; }
  body.printing .table-wrap { overflow: visible; }
}
.tbl.compact td { padding: 8px 6px; } .tbl.compact .desc { max-width: none; }
.chart { max-height: 320px; }
.side nav a, .side-foot a { padding: 6px 10px; }
.navgroup { margin: 10px 10px 3px; }
.brand { padding-bottom: 10px; }
