:root{--red: #b91c1c;--red-dark: #991b1b;--green: #15803d;--bg: #f4f4f5;--card: #ffffff;--text: #18181b;--muted: #71717a;--line: #e4e4e7;--radius: 12px;color-scheme:light}*{box-sizing:border-box}html,body{margin:0}body{background:var(--bg);color:var(--text);font:16px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-text-size-adjust:100%}h1{font-size:1.4rem;margin:0}h2{font-size:1.1rem;margin:0}h3{font-size:1rem;margin:0}a{color:var(--red)}code{background:#f1f1f3;padding:1px 5px;border-radius:4px}.app{min-height:100dvh;padding-bottom:calc(64px + env(safe-area-inset-bottom))}.topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 16px;background:var(--red);color:#fff}.who{display:flex;align-items:center;gap:8px;font-size:.9rem}.who-name{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{max-width:720px;margin:0 auto;padding:16px}.tabs{position:fixed;bottom:0;left:0;right:0;z-index:5;display:flex;background:var(--card);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}.tabs a{flex:1;text-align:center;padding:14px 4px;text-decoration:none;color:var(--muted);font-weight:600;font-size:.9rem}.tabs a.active{color:var(--red);box-shadow:inset 0 3px 0 var(--red)}.stack{display:flex;flex-direction:column;gap:14px}.stack.tight{gap:8px}.row{display:flex;align-items:center}.row.between{justify-content:space-between}.row.gap{gap:10px}.row.wrap{flex-wrap:wrap}.row.start{align-items:flex-start}.grow{flex:1;min-width:0}.center{text-align:center}.pad{padding:28px 8px}.muted{color:var(--muted)}.small{font-size:.85rem}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:14px}.card.item{padding:12px 14px}.list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.list .item{border-top:1px solid var(--line);padding:10px 0}.list .item:first-child{border-top:0}.list>li>.card.item,.list>li.card{border-top:1px solid var(--line)}a.link{display:block;color:inherit;text-decoration:none}a.link:active{background:#fafafa}.item.inactive{opacity:.6}.item.voided{opacity:.55}.item.voided strong,.item.voided .money{text-decoration:line-through}.entry.checked{border-color:var(--red);background:#fef2f2}.day{font-weight:700;color:var(--muted);font-size:.85rem;text-transform:uppercase;letter-spacing:.04em}details summary{cursor:pointer;font-weight:600}.money{font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap}.owe{color:var(--red)}.big{font-size:2rem}.balance{margin:10px 0}.summary .big{line-height:1.1}.aging{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.age{padding:10px 8px;text-align:center}.age .money{font-size:.95rem}.age.has .money{color:var(--red)}input,select,textarea{width:100%;font:inherit;padding:12px;border:1px solid #d4d4d8;border-radius:10px;background:#fff;color:var(--text)}input[type=checkbox]{width:22px;height:22px;padding:0;flex:none}input:focus,select:focus,textarea:focus{outline:2px solid var(--red);outline-offset:1px}.field{display:flex;flex-direction:column;gap:4px}.field>span{font-weight:600;font-size:.9rem}.check{display:flex;align-items:center;gap:10px}select,.row .grow{width:auto}.btn{font:inherit;font-weight:600;padding:12px 16px;border-radius:10px;cursor:pointer;border:1px solid #d4d4d8;background:#fff;color:var(--text);min-height:44px}.btn.small{padding:6px 12px;min-height:36px;font-size:.85rem}.btn.primary{background:var(--red);border-color:var(--red);color:#fff}.btn.good{background:var(--green);border-color:var(--green);color:#fff}.btn.danger{color:var(--red);border-color:var(--red)}.btn.block{width:100%}.btn:disabled{opacity:.5;cursor:not-allowed}.topbar .btn{background:#ffffff26;border-color:#fff6;color:#fff}.actions{display:flex;gap:6px;flex-wrap:wrap}.actions.end{justify-content:flex-end;margin-top:8px}.badge{display:inline-block;font-size:.72rem;font-weight:700;padding:2px 8px;margin-left:4px;border-radius:999px;background:#fee2e2;color:var(--red-dark);vertical-align:middle}.topbar .badge{background:#fff3;color:#fff;margin-left:0}.badge.gray{background:#e4e4e7;color:#3f3f46}.badge.red{background:var(--red);color:#fff}.badge.green{background:#dcfce7;color:var(--green)}.error{background:#fef2f2;border:1px solid #fecaca;color:#991b1b;padding:10px 12px;border-radius:10px}.notice{background:#fffbeb;border:1px solid #fde68a;color:#78350f;padding:10px 12px;border-radius:10px}.notice.ok{background:#f0fdf4;border-color:#bbf7d0;color:#14532d}.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;background:#00000073;display:flex;align-items:flex-end;justify-content:center}.modal{background:var(--card);width:100%;max-width:520px;max-height:92dvh;overflow-y:auto;border-radius:16px 16px 0 0;padding:16px 16px calc(20px + env(safe-area-inset-bottom))}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.icon{font-size:1.6rem;line-height:1;background:none;border:0;cursor:pointer;color:var(--muted);padding:4px 8px}@media (min-width: 640px){.backdrop{align-items:center}.modal{border-radius:16px}}.login{min-height:100dvh;display:grid;place-items:center;padding:16px}.login-card{width:100%;max-width:380px;display:flex;flex-direction:column;gap:14px}.login-card h1{color:var(--red)}.login-card{max-width:420px}.tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.tile{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 8px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);cursor:pointer;font:inherit;color:inherit}.tile:active{background:#fafafa}.tile-name{font-weight:700}.tile-role{font-size:.75rem;color:var(--muted);margin-top:-4px}.avatar{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:50%;background:#3f3f46;color:#fff;font-weight:800;font-size:1.3rem;letter-spacing:.02em}.avatar.manager{background:#1d4ed8}.avatar.owner{background:var(--red)}.avatar.employee{background:#15803d}.picked{display:flex;align-items:center;gap:12px}.picked .avatar{width:52px;height:52px;font-size:1.1rem}.pinpad{display:flex;flex-direction:column;gap:14px}.dots{display:flex;justify-content:center;gap:12px;min-height:22px}.dot{width:16px;height:16px;border-radius:50%;border:2px solid #a1a1aa}.dot.on{background:var(--text);border-color:var(--text)}.keys{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.key{font:inherit;font-size:1.5rem;font-weight:600;padding:16px 0;border-radius:14px;border:1px solid #d4d4d8;background:#fff;cursor:pointer;min-height:60px}.key:active{background:#f4f4f5}.key.sub{color:var(--muted)}.key.ok{background:var(--red);border-color:var(--red);color:#fff;font-size:1.2rem}.key:disabled{opacity:.45;cursor:not-allowed}.tabs a{font-size:.82rem}.btn.big{padding:18px 16px;font-size:1.1rem}.card.attn{border-color:#f59e0b;background:#fffbeb}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end}.photo{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:inherit}.photo img,.photo-img{width:100%;max-height:300px;object-fit:contain;background:#f4f4f5;border-radius:8px}.checks.good{border-color:#86efac;background:#f0fdf4}.checks.bad{border-color:#fca5a5;background:#fef2f2}.checks ul{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}.checks li.ok{color:#166534}.checks li.no{color:#991b1b;font-weight:600}.catrow{display:grid;grid-template-columns:1fr 64px 92px 34px;gap:6px;align-items:center}.catrow input{padding:9px 8px}.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px}.chip{flex:none;font:inherit;padding:8px 14px;border-radius:999px;border:1px solid #d4d4d8;background:#fff;cursor:pointer;white-space:nowrap}.chip.on{background:var(--red);border-color:var(--red);color:#fff;font-weight:600}.kpis{display:grid;grid-template-columns:1fr 1fr;gap:10px}.kpi{display:flex;flex-direction:column;gap:2px;padding:12px}.kpi .big{font-size:1.45rem}.up{color:#15803d}.down{color:var(--red)}.chart{width:100%;height:auto}.chart .axis{stroke:#d4d4d8}.chart .bar{fill:var(--red)}.chart .bar-missing{fill:none;stroke:#a1a1aa;stroke-dasharray:3 3}.chart .tick{font-size:11px;fill:var(--muted)}.hbars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.hbars .track{height:8px;background:#f4f4f5;border-radius:999px;overflow:hidden;margin-top:4px}.hbars .fill{height:100%;background:var(--red);border-radius:999px}.stack-bar{display:flex;height:18px;border-radius:999px;overflow:hidden;background:#f4f4f5}.legend{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px 16px}.swatch{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px}.table{width:100%;border-collapse:collapse;font-size:.92rem}.table th{text-align:right;color:var(--muted);font-weight:600;padding:4px 0}.table td{padding:7px 0;border-top:1px solid var(--line);text-align:right;font-variant-numeric:tabular-nums}.table td:first-child{text-align:left}@media (min-width: 640px){.kpis{grid-template-columns:repeat(4,1fr)}}.note{padding:12px 14px}.print-table th,.print-table td{padding:5px 4px;font-size:.85rem}.print-block{margin-top:14px}.print-title{margin-top:8px}@media print{body *{visibility:hidden}.print-area,.print-area *{visibility:visible}.print-area{position:absolute;left:0;top:0;width:100%;padding:0;background:#fff}.no-print{display:none!important}.print-block{break-inside:avoid}body{background:#fff}}:root{--viz-surface: #ffffff;--viz-text: #0b0b0b;--viz-text2: #52514e;--viz-muted: #898781;--viz-grid: #e1e0d9;--viz-axis: #c3c2b7;--s1: #2a78d6;--s2: #eb6834;--s3: #1baf7a;--s4: #eda100;--s5: #e87ba4;--s6: #008300;--s7: #6250d6;--s8: #e34948;--cmp: #a8a69f;--up: #006300;--down: #b42323;--seq1: #cde2fb;--seq2: #86b6ef;--seq3: #3987e5;--seq4: #1c5cab;--seq5: #0d366b}.viz-card{padding:14px 14px 12px}.viz-card h2{font-size:1rem}.viz-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:8px}.link-btn{background:none;border:0;font:inherit;font-size:.82rem;color:var(--s1);cursor:pointer;padding:4px 0;white-space:nowrap}.viz-legend{list-style:none;margin:0 0 6px;padding:0;display:flex;flex-wrap:wrap;gap:4px 14px;font-size:.82rem;color:var(--viz-text2)}.viz-legend .swatch{margin-right:6px}.viz-wrap{position:relative}.viz-svg{width:100%;height:auto;display:block;touch-action:pan-y}.v-grid{stroke:var(--viz-grid);stroke-width:1}.v-axis{stroke:var(--viz-axis);stroke-width:1}.v-tick{font-size:11px;fill:var(--viz-muted)}.v-label{font-size:11px;fill:var(--viz-text2);font-weight:600}.v-cross{stroke:var(--viz-axis);stroke-width:1}.v-ring{stroke:var(--viz-surface);stroke-width:2}.bar-missing{fill:none;stroke:var(--viz-axis);stroke-width:1}.v-tip{position:absolute;top:0;transform:translate(-50%);z-index:3;pointer-events:none;background:#fff;border:1px solid var(--viz-grid);border-radius:10px;padding:8px 10px;min-width:150px;box-shadow:0 4px 14px #0000001f;font-size:.82rem}.v-tip-title{font-weight:700;margin-bottom:4px}.v-tip-row{display:flex;align-items:center;gap:6px}.v-tip-row b{margin-left:auto;padding-left:10px;font-variant-numeric:tabular-nums}.v-tip .swatch{margin:0;flex:none}.delta{font-size:.78rem;font-weight:600;white-space:nowrap}.delta.good{color:var(--up)}.delta.bad{color:var(--down)}.delta.flat,.delta.none{color:var(--viz-muted);font-weight:500}.rank{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}.rank-label{color:var(--viz-text)}.rank-val{color:var(--viz-text);font-variant-numeric:tabular-nums;text-align:right}.rank-track{height:8px;background:#eef2f8;border-radius:999px;margin-top:5px;overflow:hidden}.rank-fill{height:100%;background:var(--s1);border-radius:999px}.spark{width:100%;height:28px;display:block}.heat{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.heat-h{text-align:center;font-size:.72rem;color:var(--viz-muted);padding-bottom:2px}.heat-c{position:relative;aspect-ratio:1.15;border:0;border-radius:8px;font:inherit;font-size:.78rem;cursor:pointer;padding:0}.heat-c:disabled{cursor:default}.heat-c.lv0{background:#f1f1ef;color:var(--viz-muted)}.heat-c.lvx{background:transparent}.heat-c.lv1{background:var(--seq1);color:#0b0b0b}.heat-c.lv2{background:var(--seq2);color:#0b0b0b}.heat-c.lv3{background:var(--seq3);color:#fff}.heat-c.lv4{background:var(--seq4);color:#fff}.heat-c.lv5{background:var(--seq5);color:#fff}.heat-c.sel{outline:3px solid var(--viz-text);outline-offset:1px}.heat-legend{display:flex;align-items:center;gap:4px;margin-top:8px;flex-wrap:wrap}.heat-key{display:inline-block;width:16px;height:12px;border-radius:3px}.heat-key.lv0{background:#f1f1ef;margin-left:10px}.heat-key.lv1{background:var(--seq1)}.heat-key.lv2{background:var(--seq2)}.heat-key.lv3{background:var(--seq3)}.heat-key.lv4{background:var(--seq4)}.heat-key.lv5{background:var(--seq5)}[data-tip]:hover:after,[data-tip]:focus:after{content:attr(data-tip);position:absolute;z-index:4;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:#fff;color:var(--viz-text);border:1px solid var(--viz-grid);border-radius:8px;padding:6px 9px;font-size:.78rem;font-weight:500;white-space:nowrap;box-shadow:0 4px 14px #0000001f;pointer-events:none}.stackrows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.stackrows li{display:grid;grid-template-columns:54px 1fr;gap:8px;align-items:center}.stackrows-label{font-size:.8rem;color:var(--viz-text2)}.seg{display:flex;gap:2px;height:24px}.seg-thin{height:10px}.seg-part{position:relative;display:flex;align-items:center;padding-left:7px;font-size:.72rem;font-weight:600;color:#fff;border-radius:4px;min-width:0;overflow:visible;white-space:nowrap}.seg-part:first-child{border-radius:999px 4px 4px 999px}.seg-part:last-child{border-radius:4px 999px 999px 4px}.seg-part:only-child{border-radius:999px}.seg-thin .seg-part{padding:0}.seg-part[style*=--s4]{color:#0b0b0b}.viz-table-wrap{overflow-x:auto}.viz-table th,.viz-table td{white-space:nowrap;padding:6px 8px}.dash{gap:14px}.filters{display:flex;flex-direction:column;gap:10px}.filter-row{align-items:flex-end}.inline-field{display:flex;flex-direction:column;gap:3px}.inline-field select{width:auto;padding:9px 10px;min-width:130px}.subtabs{display:flex;gap:4px;background:#e9e9e7;padding:4px;border-radius:12px;overflow-x:auto}.subtabs button{flex:1;font:inherit;font-weight:600;font-size:.86rem;border:0;background:transparent;padding:9px 10px;border-radius:9px;cursor:pointer;color:var(--viz-text2);white-space:nowrap}.subtabs button.on{background:#fff;color:var(--viz-text);box-shadow:0 1px 3px #0000001f}.chip.on-soft{border-color:var(--viz-text2);background:#fff;font-weight:600}.chips.wrap{flex-wrap:wrap;overflow:visible;margin-bottom:10px}.kpis2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.kpi2{display:flex;flex-direction:column;gap:3px;padding:14px}.kpi2.hero{grid-column:1 / -1;padding:18px 16px 12px}.hero-fig{font-size:3rem;line-height:1.05;font-weight:700;letter-spacing:-.02em}.kpi-fig{font-size:1.55rem;line-height:1.15;font-weight:700}.kpi2 .spark{margin-top:6px}.insights{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:8px}.insights li::marker{color:var(--s1)}.movers{display:grid;grid-template-columns:1fr 1fr;gap:14px}.movers .list li{padding:6px 0;border-top:1px solid var(--line)}.movers .list li:first-child{border-top:0}@media (min-width: 720px){.kpis2{grid-template-columns:repeat(4,1fr)}.kpi2.hero{grid-column:span 2}.content:has(.dash){max-width:900px}}@media (max-width: 480px){.movers{grid-template-columns:1fr}}.filter-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end}.filter-row .inline-field select{width:100%;min-width:0}.viz-table th,.viz-table td{white-space:normal;padding:7px 6px;font-size:.88rem}.viz-table td:not(:first-child),.viz-table th:not(:first-child){white-space:nowrap}@media (min-width: 720px){.filter-row{grid-template-columns:repeat(3,minmax(150px,220px))}}
