:root {
--bg: #f2f4f1; --surface: #ffffff; --surface-2: #e9ece7; --ink: #13201d; --ink-2: #52605c; --muted: #7f8a86; --line: #dde1db;
--accent: #0f5c6e; --accent-ink: #ffffff; --accent-soft: #dcecef; --hero-a: #0f5c6e; --hero-b: #0a3d4b;
--pos: #0a7a4f; --neg: #c2382e; --warn: #9a6207; --pos-soft: #dff2e9; --neg-soft: #fbe4e1; --warn-soft: #f8ecd2;
--s1: #2a78d6; --s2: #eb6834; --grid: #e1e0d9; --axis: #898781;
--font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--r: 16px; --shadow: 0 1px 2px rgba(19, 32, 29, .05), 0 8px 24px -16px rgba(19, 32, 29, .25);
color-scheme: light;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #0d1314; --surface: #151d1f; --surface-2: #1d282a; --ink: #e8efed; --ink-2: #aebab7; --muted: #7c8a87; --line: #263236;
--accent: #6cc4d6; --accent-ink: #06262d; --accent-soft: #17323a; --hero-a: #12505f; --hero-b: #0b2f39;
--pos: #4fc48f; --neg: #f0776b; --warn: #e0a83c; --pos-soft: #143327; --neg-soft: #3b1d1a; --warn-soft: #3a2e12;
--s1: #3987e5; --s2: #d95926; --grid: #2c2c2a; --axis: #898781; --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}
}
:root[data-theme="dark"] {
--bg: #0d1314; --surface: #151d1f; --surface-2: #1d282a; --ink: #e8efed; --ink-2: #aebab7; --muted: #7c8a87; --line: #263236;
--accent: #6cc4d6; --accent-ink: #06262d; --accent-soft: #17323a; --hero-a: #12505f; --hero-b: #0b2f39;
--pos: #4fc48f; --neg: #f0776b; --warn: #e0a83c; --pos-soft: #143327; --neg-soft: #3b1d1a; --warn-soft: #3a2e12;
--s1: #3987e5; --s2: #d95926; --grid: #2c2c2a; --axis: #898781; --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.sheet-open { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 15px; font-weight: 700; }
h2 small { font-weight: 500; color: var(--muted); margin-left: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#main { max-width: 1120px; margin: 0 auto; padding: 16px 16px 108px; display: flex; flex-direction: column; gap: 14px; }
.nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.nav .brand { display: none; }
.nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 12px; }
.nav button[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.fab { position: fixed; z-index: 21; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(15, 92, 110, .6); }
.fab .ic { width: 26px; height: 26px; }
.page-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; min-height: 40px; }
.page-h h1 { flex: 1; }
.grid2 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
body { font-size: 15px; }
#main { margin-left: 232px; padding: 28px 32px 48px; max-width: none; }
#main > * { max-width: 1080px; width: 100%; }
.nav { top: 0; right: auto; width: 232px; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--line); padding: 20px 12px; }
.nav .brand { display: block; padding: 4px 12px 18px; font-size: 17px; letter-spacing: -.01em; }
.nav button { flex: none; flex-direction: row; gap: 12px; padding: 10px 12px; font-size: 14px; justify-content: flex-start; }
.fab { bottom: 28px; right: 28px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.hero { border-radius: 22px; padding: 20px; color: #fff; background: linear-gradient(140deg, var(--hero-a), var(--hero-b)); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.hero-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; opacity: .9; font-size: 13px; }
.hero-value { font-size: clamp(30px, 9vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hero-sub { font-size: 13px; opacity: .85; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.hero-grid > div { background: rgba(255, 255, 255, .11); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-grid span { font-size: 12px; opacity: .85; } .hero-grid b { font-size: 17px; } .hero-grid small { font-size: 11px; opacity: .75; line-height: 1.3; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile span { font-size: 12px; color: var(--ink-2); line-height: 1.3; } .tile b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; } .tile small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.tiles.compact .tile { padding: 8px 10px; } .card .tile { background: var(--surface-2); border-color: transparent; }
@media (max-width: 480px) { .tile { padding: 9px 9px; } .tile b { font-size: 13.5px; letter-spacing: -.01em; } .tile span { font-size: 11px; } .tiles { gap: 8px; } }
@media (max-width: 370px) { .tile b { font-size: 12px; } }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--accent-soft); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.banner.warn { background: var(--warn-soft); } .banner.neg { background: var(--neg-soft); justify-content: flex-start; flex-wrap: nowrap; } .banner.neg .ic { color: var(--neg); }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; }
.btn.small { padding: 6px 10px; min-height: 34px; font-size: 13px; border-radius: 10px; } .btn.small .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.danger { color: var(--neg); border-color: var(--neg-soft); background: var(--neg-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 13px; padding: 4px; }
.icon-btn { border: 0; background: none; padding: 8px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn.on-hero { color: #fff; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.acts.sticky { position: sticky; bottom: 84px; background: var(--surface); padding: 10px 0 2px; }
@media (min-width: 900px) { .acts.sticky { bottom: 0; } }
.period { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button, .seg label span { border: 0; background: none; padding: 7px 11px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; display: block; text-align: center; }
.seg button[aria-selected="true"], .seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.seg.full label { flex: 1; cursor: pointer; } .seg input { position: absolute; opacity: 0; pointer-events: none; } .seg input:disabled + span { opacity: .4; } .seg input:focus-visible + span { outline: 2px solid var(--accent); }
.stepper { display: flex; align-items: center; gap: 2px; font-weight: 600; font-size: 14px; } .stepper.wide { justify-content: space-between; }
.stepper span { text-align: center; min-width: 9ch; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; vertical-align: 1px; }
.pill.pos { background: var(--pos-soft); color: var(--pos); } .pill.neg { background: var(--neg-soft); color: var(--neg); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.hint { font-size: 13px; color: var(--ink-2); max-width: 68ch; } .hint.center { text-align: center; margin: 0 auto; }
.empty { text-align: center; color: var(--ink-2); padding: 18px 8px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; } .check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rows .row:last-child { border-bottom: 0; }
.row[role="button"], .row-main[role="button"] { cursor: pointer; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main b { font-weight: 600; overflow-wrap: anywhere; } .row-main span { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; } .row-end span { font-size: 12px; color: var(--ink-2); }
.row.off { opacity: .55; } .rows.dense .row { padding: 7px 0; }
.rows.preview .row { align-items: flex-start; } .rows.preview input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; } .rows.preview select { margin-top: 4px; max-width: 260px; padding: 6px 8px; min-height: 34px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; margin-right: 6px; }
.dot.big { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin: 0; } .dot.big .ic { width: 18px; height: 18px; }
.day { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--ink-2); padding: 14px 0 2px; border-bottom: 1px solid var(--line); }
#txlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; display: flex; flex-direction: column; }
#txlist .tiles .tile { background: var(--surface-2); border-color: transparent; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.track { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 4px; } .track.thick { height: 12px; }
.fill { height: 100%; border-radius: 99px; } .s1bg { background: var(--s1); } .s2bg { background: var(--s2); } .negbg { background: var(--neg); }
.insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.insights li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--muted); }
.insights.big li { background: var(--surface); border: 1px solid var(--line); border-left-width: 4px; padding: 14px; }
.insights li.alerta { border-left-color: var(--neg); } .insights li.alerta .ic { color: var(--neg); } .insights li.atencao { border-left-color: var(--warn); } .insights li.atencao .ic { color: var(--warn); }
.insights li.bom { border-left-color: var(--pos); } .insights li.bom .ic { color: var(--pos); } .insights li.info { border-left-color: var(--accent); } .insights li.info .ic { color: var(--accent); }
.insights b { font-size: 14px; } .insights p { font-size: 13px; color: var(--ink-2); }
.menu { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.menu button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.menu li:last-child button { border-bottom: 0; } .menu div { flex: 1; display: flex; flex-direction: column; } .menu span { font-size: 12.5px; color: var(--ink-2); } .menu .ic:first-child { color: var(--accent); } .chev { color: var(--muted); }
.chart { width: 100%; height: auto; max-height: 300px; display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; } .chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .axis { fill: var(--axis); font: 500 10px var(--font); font-variant-numeric: tabular-nums; }
.chart .s1 { fill: var(--s1); } .chart .s2 { fill: var(--s2); } .chart .sneg { fill: var(--neg); }
.chart .line { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; } .chart .area { fill: var(--s1); opacity: .12; }
.chart .dot { fill: var(--s1); stroke: var(--surface); stroke-width: 2; } .chart .ghost { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 2; }
.chart .hit { fill: transparent; } .chart .hit[data-act] { cursor: pointer; }
.legend, .split-leg { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend i, .split-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; } .legend .ghostleg { height: 0; border-top: 2px dashed var(--ink); border-radius: 0; vertical-align: 4px; }
.split { display: flex; flex-direction: column; gap: 8px; } .split-bar { display: flex; height: 10px; gap: 2px; } .split-bar i { border-radius: 4px; min-width: 2px; } .split-leg b { color: var(--ink); margin-left: 4px; }
.hbars { display: flex; flex-direction: column; gap: 10px; } .hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; } .hbar-label { min-width: 0; overflow-wrap: anywhere; } .hbar small { color: var(--muted); font-size: 12px; }
#tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px; max-width: 280px; opacity: 0; transition: opacity .12s; left: 0; top: 0; }
#tip.on { opacity: 1; }
.cards-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.plastic { flex: none; width: 200px; text-align: left; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; color: var(--ink-2); }
.plastic b { color: var(--ink); font-size: 15px; } .plastic span, .plastic small { font-size: 12px; }
.plastic.on { background: linear-gradient(140deg, var(--hero-a), var(--hero-b)); color: rgba(255, 255, 255, .85); border-color: transparent; } .plastic.on b { color: #fff; }
.invoice { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; } .invoice > div { display: flex; flex-direction: column; gap: 2px; } .invoice span { font-size: 13px; color: var(--ink-2); } .invoice small { font-size: 12px; color: var(--muted); }
.big { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.sim-on { display: flex; flex-direction: column; gap: 12px; } .sim-on > div:first-child { display: flex; flex-direction: column; gap: 2px; } .sim-on span { font-size: 13.5px; color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; } th:first-child, td:first-child { text-align: left; padding-left: 0; }
td { padding: 9px 8px; border-top: 1px solid var(--line); text-align: right; vertical-align: top; } td small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
tr.pm { cursor: pointer; } tr.pm.open td { background: var(--surface-2); } tr.pd td { text-align: left; padding: 0; border-top: 0; }
.pd-in { padding: 10px 12px 14px; background: var(--surface-2); border-radius: 0 0 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.pd-in h4 { font-size: 12.5px; display: flex; justify-content: space-between; margin-top: 8px; } .pd-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); } .pd-line.total { color: var(--ink); border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
table.sample td, table.sample th { text-align: left; white-space: nowrap; padding: 6px 10px 6px 0; font-size: 12.5px; }
.filters { display: flex; flex-direction: column; gap: 8px; } .filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 44px; font-size: 16px; }
input[type="color"] { width: 56px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 3px; }
input[type="file"] { padding: 8px; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } @media (max-width: 380px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-error { color: var(--neg); font-size: 13.5px; font-weight: 600; min-height: 0; } .form-error:empty { display: none; }
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(8, 14, 13, .5); }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 92%; background: var(--bg); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .2s ease-out; }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 18px; }
.sheet-body { overflow-y: auto; padding: 8px 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.sheet footer { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); } .sheet footer:empty { display: none; } .sheet footer .btn.primary { flex: 1; }
@media (min-width: 720px) { .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 560px; max-height: 88%; border-radius: 22px; animation: none; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
#toast { position: fixed; z-index: 70; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 32px); text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.welcome { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; } .welcome h1 { font-size: 28px; } .welcome p { color: var(--ink-2); max-width: 60ch; }
.welcome-acts { display: flex; flex-wrap: wrap; gap: 8px; } .steps { margin: 0; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.lock { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; } .lock input { max-width: 220px; text-align: center; letter-spacing: .3em; }
.man { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; } .man summary { padding: 14px 0; font-weight: 700; cursor: pointer; } .man div { padding-bottom: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; max-width: 70ch; } .man ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.card > p { max-width: 70ch; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }