:root{--bg:#f5f6f8;--surface:#fff;--surface-2:#f0f2f5;--text:#16181d;--muted:#5d6470;--border:#e1e4ea;--primary:#1d4ed8;--primary-ink:#fff;--primary-soft:#e6edfd;--green:#127a3e;--green-soft:#e3f4ea;--amber:#8a5a00;--amber-soft:#fdf1d8;--red:#b42318;--red-soft:#fde8e6;--blue-soft:#e6edfd;--radius:12px;--shadow:0 1px 2px #1018280f, 0 1px 3px #10182814;--tabbar-h:64px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,sans-serif;font-size:15px;line-height:1.45}@media (prefers-color-scheme:dark){:root{--bg:#0f1115;--surface:#171a20;--surface-2:#1f232b;--text:#e8eaee;--muted:#9aa3b2;--border:#2a2f39;--primary:#5b8cff;--primary-ink:#0b1020;--primary-soft:#1c2742;--green:#4cc38a;--green-soft:#15301f;--amber:#f0b54a;--amber-soft:#33290f;--red:#ff6b5e;--red-soft:#3a1714;--blue-soft:#1c2742;--shadow:none;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}html,body,#root{min-height:100%;margin:0}body{background:var(--bg);color:var(--text)}h1,h2,h3{margin:0;line-height:1.25}h1{font-size:1.45rem}h2{font-size:1.05rem}a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}code,.mono{font-family:ui-monospace,Consolas,monospace;font-size:.9em}img{max-width:100%}.shell{min-height:100vh}.sidebar{display:none}.content{padding:12px 12px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));max-width:1100px;margin:0 auto}.page{flex-direction:column;gap:14px;display:flex}.page-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:12px;padding:6px 2px 2px;display:flex}.page-head p{margin:4px 0 0}.tabbar{z-index:20;background:var(--surface);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom);height:calc(var(--tabbar-h) + env(safe-area-inset-bottom));display:flex;position:fixed;bottom:0;left:0;right:0}.tabbar .nav-item{border-radius:0;flex-direction:column;flex:1;justify-content:center;gap:2px;padding:6px 2px;font-size:.72rem;position:relative}.tabbar .nav-icon{font-size:1.25rem}.tabbar .nav-badge{position:absolute;top:6px;left:55%}.nav-item{color:var(--muted);font:inherit;cursor:pointer;text-align:left;background:0 0;border:0;border-radius:8px;align-items:center;gap:10px;width:100%;padding:9px 12px;display:flex;text-decoration:none!important}.nav-item:hover{background:var(--surface-2);color:var(--text)}.nav-item.active{color:var(--primary);background:var(--primary-soft);font-weight:600}.tabbar .nav-item.active{background:0 0}.nav-item.danger{color:var(--red)}.nav-icon{text-align:center;width:1.4em}.nav-badge{background:var(--red);color:#fff;text-align:center;border-radius:999px;min-width:18px;margin-left:auto;padding:0 6px;font-size:.7rem;font-weight:700}.nav-sep{background:var(--border);height:1px;margin:8px 0}.sheet-backdrop{z-index:40;background:#00000059;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--surface);width:100%;padding:14px 12px calc(14px + env(safe-area-inset-bottom));border-radius:16px 16px 0 0;flex-direction:column;gap:2px;display:flex}.sheet-user{border-bottom:1px solid var(--border);flex-direction:column;margin-bottom:6px;padding:4px 12px 10px;display:flex}.sheet-user small{color:var(--muted)}@media (width>=900px){.shell{grid-template-columns:240px 1fr;display:grid}.sidebar{background:var(--surface);border-right:1px solid var(--border);flex-direction:column;height:100vh;padding:16px 12px;display:flex;position:sticky;top:0}.side-nav{flex-direction:column;flex:1;gap:2px;margin-top:18px;display:flex;overflow:auto}.side-user{border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:8px;padding-top:12px;display:flex}.side-user div{flex-direction:column;display:flex}.side-user small{color:var(--muted)}.tabbar{display:none}.content{width:100%;padding:24px 28px 48px}h1{font-size:1.6rem}}.brand{align-items:center;gap:10px;display:flex}.brand div{flex-direction:column;display:flex}.brand small{color:var(--muted);font-size:.78rem}.brand-mark{background:var(--primary);width:36px;height:36px;color:var(--primary-ink);border-radius:10px;place-items:center;font-size:1.2rem;font-weight:800;display:grid}.brand.big .brand-mark{width:46px;height:46px;font-size:1.5rem}.brand.big strong{font-size:1.3rem}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);color:inherit;flex-direction:column;gap:12px;padding:14px;display:flex}.card-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;display:flex}.cards{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;display:grid}a.card:hover{border-color:var(--primary);text-decoration:none}.ledger-card{gap:8px}.list{flex-direction:column;display:flex}.list.refreshing{opacity:.6;transition:opacity .2s}.list>*+*{border-top:1px solid var(--border)}.section-title{color:var(--muted);margin-top:4px;font-size:.92rem}.bill-row{color:inherit;grid-template-columns:auto 1fr auto;align-items:start;gap:10px;padding:10px 4px;display:grid}.bill-row:hover{background:var(--surface-2);text-decoration:none}.bill-row.deleted{opacity:.55}.bill-row .sl{color:var(--primary);font-variant-numeric:tabular-nums;min-width:2.6em;font-weight:700}.bill-main{flex-direction:column;min-width:0;display:flex}.bill-main strong,.bill-main small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.bill-side{flex-direction:column;align-items:flex-end;gap:4px;font-weight:600;display:flex}.approval{flex-direction:column;gap:6px;padding:6px 0 12px;display:flex}.approval.txn,.txn-row,.month-row,.user-row{flex-flow:wrap;align-items:center;gap:10px;padding:10px 4px;display:flex}.txn-row.void,.txn-row.rejected,.user-row.inactive{opacity:.55}.chips{flex-wrap:wrap;gap:4px;margin-top:4px;display:flex}.chip{background:var(--surface-2);border:1px solid var(--border);color:var(--muted);border-radius:999px;padding:1px 8px;font-size:.72rem}.chip.ledger{background:var(--primary-soft);color:var(--primary);border-color:#0000}.stats{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;display:grid}.stats.compact{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.stat{background:var(--surface-2);border-radius:10px;flex-direction:column;gap:2px;padding:10px 12px;display:flex}.stat:first-child{grid-column:1/-1}.stats.compact .stat:first-child{grid-column:auto}.stat-label{color:var(--muted);font-size:.8rem}.stat-value{font-variant-numeric:tabular-nums;font-size:1.25rem;font-weight:700}.stat:first-child .stat-value{font-size:1.9rem}.stats.compact .stat .stat-value{font-size:1.25rem}.stat-sub{color:var(--muted);font-size:.78rem}.stat.pos .stat-value{color:var(--green)}.stat.neg .stat-value{color:var(--red)}@media (width>=700px){.stat:first-child{grid-column:span 2}}.money{font-variant-numeric:tabular-nums;white-space:nowrap}.money.neg{color:var(--red)}.money.pos{color:var(--green)}.big-money{font-size:1.4rem;font-weight:700}.table-wrap{margin:0 -14px;padding:0 14px;overflow-x:auto}.table{border-collapse:collapse;width:100%;font-size:.92rem}.table.small{font-size:.82rem}.table th{text-align:left;color:var(--muted);border-bottom:1px solid var(--border);white-space:nowrap;padding:6px 8px;font-size:.8rem;font-weight:600}.table td{border-bottom:1px solid var(--border);vertical-align:top;padding:8px}.table .num{text-align:right;white-space:nowrap}.table .strong{font-weight:700}.pending-row{color:var(--muted);font-style:italic}.form{flex-direction:column;gap:12px;display:flex}.field{flex-direction:column;gap:4px;min-width:0;display:flex}.field-label{font-size:.85rem;font-weight:600}.field-hint{color:var(--muted);font-size:.78rem}.field-error{color:var(--red);font-size:.8rem}input,select,textarea{font:inherit;color:inherit;background:var(--surface);border:1px solid var(--border);border-radius:8px;width:100%;min-width:0;min-height:42px;padding:9px 10px}textarea{resize:vertical;min-height:60px}input:focus,select:focus,textarea:focus{outline:2px solid var(--primary);outline-offset:-1px;border-color:var(--primary)}input:disabled,select:disabled{opacity:.6}.has-error input,.has-error select,.has-error textarea{border-color:var(--red)}.has-warn input,.has-warn select{border-color:var(--amber);background:var(--amber-soft)}input[type=checkbox],input[type=radio]{width:18px;height:18px;min-height:0;accent-color:var(--primary);flex:none}.input-group{align-items:center;gap:6px;display:flex}.grid-2{grid-template-columns:1fr;gap:12px;display:grid}.grid-3{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;display:grid}@media (width>=560px){.grid-2{grid-template-columns:1fr 1fr}}fieldset{border:1px solid var(--border);border-radius:10px;margin:0;padding:10px 12px}legend{padding:0 4px;font-size:.85rem;font-weight:600}.choice{flex-wrap:wrap;gap:18px;display:flex}.choice label,.switch,.check{cursor:pointer;align-items:center;gap:8px;display:flex}.checks{flex-direction:column;gap:10px;display:flex}.checks label{cursor:pointer;align-items:flex-start;gap:10px;display:flex}.checks label span{flex-direction:column;display:flex}.checks label small{color:var(--muted);font-size:.78rem}.checks label.disabled{opacity:.5;cursor:not-allowed}.checks-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px;display:grid}.filters{flex-flow:wrap;gap:8px}.filters>*{flex:150px}.filters>.grow{flex:2 220px}.btn{font:inherit;cursor:pointer;border:1px solid var(--border);background:var(--surface);min-height:40px;color:var(--text);white-space:nowrap;border-radius:8px;justify-content:center;align-items:center;gap:8px;padding:9px 14px;font-weight:600;display:inline-flex;text-decoration:none!important}.btn:disabled{opacity:.55;cursor:not-allowed}.btn-primary{background:var(--primary);color:var(--primary-ink);border-color:var(--primary)}.btn-danger{background:var(--red-soft);color:var(--red);border-color:#0000}.btn-success{background:var(--green);color:#fff;border-color:var(--green)}.btn-ghost{color:var(--primary);background:0 0;border-color:#0000}.btn-ghost:hover:not(:disabled){background:var(--primary-soft)}.btn-secondary:hover:not(:disabled){background:var(--surface-2)}.btn.block{width:100%;min-height:46px}.link{font:inherit;color:var(--primary);cursor:pointer;background:0 0;border:0;padding:0}.link:hover{text-decoration:underline}.link.danger{color:var(--red)}.icon-btn{cursor:pointer;color:var(--muted);background:0 0;border:0;padding:2px 6px;font-size:1.4rem;line-height:1}.badge{background:var(--surface-2);color:var(--muted);white-space:nowrap;border-radius:999px;padding:2px 8px;font-size:.72rem;font-weight:600;display:inline-block}.badge-green{background:var(--green-soft);color:var(--green)}.badge-amber{background:var(--amber-soft);color:var(--amber)}.badge-red{background:var(--red-soft);color:var(--red)}.badge-blue{background:var(--blue-soft);color:var(--primary)}.alert{border:1px solid #0000;border-radius:10px;align-items:flex-start;gap:10px;padding:10px 12px;font-size:.92rem;display:flex}.alert-info{background:var(--blue-soft)}.alert-success{background:var(--green-soft)}.alert-warn{background:var(--amber-soft)}.alert-error{background:var(--red-soft);color:var(--red)}.alert-error a,.alert-error .link{color:inherit;text-decoration:underline}.error-text{color:var(--red)}.modal-backdrop{z-index:50;background:#00000073;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.modal{background:var(--surface);border-radius:16px 16px 0 0;flex-direction:column;width:100%;max-height:92vh;display:flex}.modal-head{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:14px 16px;display:flex}.modal-body{flex-direction:column;gap:12px;padding:14px 16px;display:flex;overflow:auto}.modal-foot{padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--border);flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}@media (width>=640px){.modal-backdrop{align-items:center;padding:24px}.modal{border-radius:14px;max-width:520px}.modal.wide{max-width:760px}}.toasts{left:50%;bottom:calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));z-index:60;flex-direction:column;gap:8px;width:min(92vw,420px);display:flex;position:fixed;transform:translate(-50%)}@media (width>=900px){.toasts{bottom:24px}}.toast{background:var(--text);color:var(--bg);border-radius:10px;padding:10px 14px;font-weight:500;box-shadow:0 6px 20px #0003}.toast-error{background:var(--red);color:#fff}.spinner{border:3px solid var(--border);border-top-color:var(--primary);border-radius:50%;width:28px;height:28px;animation:.8s linear infinite spin;display:inline-block}.spinner.sm{border-width:2px;border-color:#0000 currentColor currentColor;width:14px;height:14px}@keyframes spin{to{transform:rotate(360deg)}}.center-pad{text-align:center;flex-direction:column;align-items:center;gap:10px;padding:28px;display:flex}.empty{text-align:center;color:var(--muted);padding:28px 12px}.pager{justify-content:center;align-items:center;gap:10px;display:flex}.auth-page{place-items:center;min-height:100vh;padding:16px;display:grid}.auth-card{background:var(--surface);border:1px solid var(--border);width:min(420px,100%);box-shadow:var(--shadow);border-radius:16px;flex-direction:column;gap:14px;padding:24px 20px;display:flex}.capture-actions{grid-template-columns:1fr;gap:10px;display:grid}@media (width>=560px){.capture-actions{grid-template-columns:1fr 1fr}}.big-btn{white-space:normal;text-align:center;flex-direction:column;gap:4px;min-height:110px;padding:18px 12px}.big-btn small{opacity:.85;font-size:.78rem;font-weight:400}.big-icon{font-size:1.8rem}.thumbs{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;display:grid}.thumb{border:1px solid var(--border);background:var(--surface-2);border-radius:10px;flex-direction:column;display:flex;overflow:hidden}.thumb img{object-fit:contain;background:#fff;width:100%;height:150px}.thumb-actions{border-top:1px solid var(--border);display:flex}.thumb-actions button{background:var(--surface);font:inherit;cursor:pointer;color:var(--text);border:0;flex:1;padding:8px 4px;font-size:.8rem}.thumb-actions button+button{border-left:1px solid var(--border)}.file-tile{height:150px;color:var(--muted);text-align:center;flex-direction:column;justify-content:center;align-items:center;padding:8px;font-size:1.4rem;font-weight:800;display:flex}.file-tile small{word-break:break-all;font-size:.7rem;font-weight:400}.crop{flex-direction:column;gap:12px;display:flex}.crop-wrap{justify-content:center;width:100%;display:flex}.crop-stage{touch-action:none;-webkit-user-select:none;user-select:none;position:relative}.crop-stage canvas{display:block}.crop-rect{border:2px solid var(--primary);cursor:move;touch-action:none;position:absolute;box-shadow:0 0 0 9999px #00000080}.crop-stage{overflow:hidden}.crop-h{background:var(--primary);touch-action:none;border:3px solid #fff;border-radius:50%;width:28px;height:28px;position:absolute}.crop-h.nw{cursor:nwse-resize;top:-14px;left:-14px}.crop-h.ne{cursor:nesw-resize;top:-14px;right:-14px}.crop-h.sw{cursor:nesw-resize;bottom:-14px;left:-14px}.crop-h.se{cursor:nwse-resize;bottom:-14px;right:-14px}.crop-actions{align-items:center}.review{grid-template-columns:1fr;gap:14px;display:grid}@media (width>=1000px){.review{grid-template-columns:1fr 1fr;align-items:start}.review-preview{position:sticky;top:16px}}.done{text-align:center;flex-direction:column;align-items:center;gap:8px;padding:12px 0;display:flex}.done-icon{background:var(--green-soft);width:64px;height:64px;color:var(--green);border-radius:50%;place-items:center;font-size:2rem;font-weight:800;display:grid}.detail{grid-template-columns:1fr;gap:14px;display:grid}@media (width>=1000px){.detail{grid-template-columns:1fr 1fr;align-items:start}}.facts{grid-template-columns:max-content 1fr;gap:8px 14px;margin:0;display:grid}.facts dt{color:var(--muted);padding-top:2px;font-size:.85rem}.facts dd{overflow-wrap:anywhere;min-width:0;margin:0}.pages{flex-direction:column;gap:10px;display:flex}.page-img{border:1px solid var(--border);cursor:zoom-in;background:#fff;border-radius:8px;width:100%}.img-ph{background:var(--surface-2);min-height:260px;color:var(--muted);border-radius:8px;place-items:center;font-size:.85rem;display:grid}.img-ph.loading{animation:1.2s ease-in-out infinite pulse}@keyframes pulse{50%{opacity:.5}}.zoom{z-index:70;cursor:zoom-out;background:#000000e6;justify-content:center;display:flex;position:fixed;inset:0;overflow:auto}.zoom img{align-self:flex-start;width:min(1400px,200vw);max-width:none;height:auto}@media (width>=900px){.zoom img{width:min(1400px,96vw)}}.timeline{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.timeline li{border-left:2px solid var(--border);flex-direction:column;padding:8px 0 8px 14px;display:flex}.timeline li.clickable{cursor:pointer}.diff{background:var(--surface-2);border-radius:6px;max-height:240px;padding:8px;font-size:.75rem;overflow:auto}.plan{flex-direction:column;gap:3px;margin:0;padding-left:18px;font-size:.88rem;display:flex}.preview{border:1px solid var(--border);border-radius:10px;max-height:360px;padding:10px 12px;overflow:auto}.notices summary{cursor:pointer;font-size:.9rem;font-weight:600}.advanced{border-top:1px dashed var(--border);padding-top:10px}.crumbs{font-size:.9rem}.browse{flex-direction:column;gap:4px;display:flex}.browse-item{text-align:left;background:var(--surface-2);border:1px solid var(--border);font:inherit;color:inherit;cursor:pointer;border-radius:8px;padding:10px}.browse-item:hover{border-color:var(--primary)}.temp-pw{letter-spacing:.06em;background:var(--surface-2);text-align:center;-webkit-user-select:all;user-select:all;border-radius:10px;padding:12px;font-family:ui-monospace,Consolas,monospace;font-size:1.6rem;font-weight:700}.msg-preview{white-space:pre-wrap;background:var(--surface-2);color:var(--muted);border-radius:8px;padding:10px;font-size:.8rem}.row{align-items:center;display:flex}.row.between{justify-content:space-between}.row.end{justify-content:flex-end}.row.wrap,.wrap{flex-wrap:wrap}.center-row{justify-content:center}.gap-xs{gap:4px}.gap-s{gap:8px}.grow{flex:1;min-width:0}.stack-s{flex-direction:column;gap:8px;display:flex}.muted{color:var(--muted)}.light{font-weight:400}.small{font-size:.82rem}.center{text-align:center;align-self:center}
