:root{--ink:#191f28;--muted:#566272;--blue:#1769df;--line:#e9edf2;--paper:#f2f4f6;color:var(--ink);background:var(--paper);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased;font-family:-apple-system,BlinkMacSystemFont,Apple SD Gothic Neo,Malgun Gothic,sans-serif}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline-offset:3px;outline:3px solid #3182f6}h1,h2,h3,p{margin:0}h1{letter-spacing:-.055em;font-size:clamp(1.85rem,3vw,2.65rem);line-height:1.2}h2{letter-spacing:-.04em;font-size:1.25rem}[hidden]{display:none!important}.sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}
.login-shell{place-items:center;min-height:100svh;padding:24px;display:grid}.login-panel,.ledger-summary,.capture-form{background:#fff;border-radius:24px}.login-panel{width:min(100%,420px);padding:40px 32px 32px}.login-panel h1{margin-bottom:32px;font-size:30px}.login-panel .primary,.ledger-entry .primary{min-height:50px;font-size:16px;font-weight:650}.login-panel input,.ledger-entry input{font-variant-numeric:tabular-nums}.ledger{grid-template-rows:auto minmax(0,1fr) auto;height:100dvh;display:grid}.ledger-toolbar,.categories-toolbar,.category-heading,.toolbar-actions,.icon-actions{align-items:center;display:flex}.ledger-toolbar,.categories-toolbar{justify-content:space-between;gap:16px}.ledger-toolbar{background:#fff;padding:12px 24px}.ledger-toolbar h1{font-size:30px}.toolbar-actions{flex-wrap:wrap;gap:6px;width:100%}.toolbar-actions button:last-child{margin-left:auto}.toolbar-actions button{box-shadow:none;border:0;font-weight:600}.toolbar-actions button svg{vertical-align:middle}.ledger-main{grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0;padding:16px 20px 0;display:grid}.ledger-details{grid-template-rows:auto minmax(0,1fr);min-height:0;display:grid}.ledger-summary{justify-content:space-between;align-items:flex-end;gap:20px;width:min(100%,410px);margin-bottom:12px;padding:14px 20px;display:flex}.ledger-summary span,.capture-title time,.ledger-entry label,.capture-form label{color:var(--muted);font-size:14px;font-weight:600}.ledger-summary strong{letter-spacing:-.05em;margin-top:5px;font-size:clamp(28px,2.5vw,38px);line-height:1.2;display:block}.ledger-summary small{margin-left:4px;font-size:.62em}.ledger-summary div:last-child{text-align:right}.ledger-summary div:last-child strong{font-size:21px}.categories-toolbar{gap:10px;margin-bottom:10px}.categories-toolbar .add-category{width:min(100%,320px)}.category-list{align-items:flex-start;gap:12px;min-height:0;padding-bottom:6px;display:flex;overflow:auto}.category-list::-webkit-scrollbar{height:13px}.category-list::-webkit-scrollbar-track{background:#e5e9ee;border-radius:8px}.category-list::-webkit-scrollbar-thumb{background:#94a3b5;border:2px solid #e5e9ee;border-radius:8px}.category-card{background:#fff;border:1px solid #dce3eb;border-radius:14px;flex-direction:column;flex:0 0 min(100%,clamp(296px,25% - 9px,340px));min-width:0;max-height:100%;display:flex;overflow:hidden}.category-heading{flex:none;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px 14px;display:grid}.category-total{grid-column:1/-1;justify-content:space-between;align-items:baseline;display:flex}.category-total strong{letter-spacing:-.035em;font-size:21px}.category-total span{color:var(--muted);font-size:13px}.category-card .table-scroll{min-height:0;max-height:none}.category-card .history-table :is(td,th):first-child:not(.empty){text-align:left;padding-left:14px}.category-card .history-table :is(td,th):nth-child(2){text-align:right;padding-right:12px}.category-card .history-table td:nth-child(2){font-weight:650}.category-card .icon-actions button{min-height:30px;padding:5px}.category-heading h3{letter-spacing:-.035em;font-size:16px}.category-heading strong{white-space:nowrap}.icon-actions{justify-content:center}.icon-actions button{color:var(--muted);background:0 0;border:0;border-radius:8px;place-items:center;padding:7px;font-size:16px;display:grid}.icon-actions button:hover:not(:disabled){color:var(--blue);background:#edf4ff}.icon-actions button:disabled{opacity:.32}.ledger-entry{padding:14px 24px max(14px, env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(80px,120px);align-items:end;gap:16px;display:grid}.ledger-entry h2{grid-column:1/-1}.ledger-entry .primary{min-height:40px}.ledger-entry label,.capture-form label{gap:8px;display:grid}.camera-input{width:min(100%,510px);margin:auto;padding:42px 20px}.capture-title{margin-bottom:12px;padding:0 5px}.capture-title h1{margin-top:8px;font-size:clamp(28px,5vw,35px)}.camera-input:has(.capture-options:not([hidden])){height:100dvh;padding-block:max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-bottom));flex-direction:column;display:flex}.capture-options{flex-direction:column;flex:1;min-height:0;display:flex}.capture-options>:not(video){flex:none}.camera-input video{object-fit:contain;background:#101419;border-radius:18px;flex:1;width:100%;height:0;min-height:0}.capture-options select{min-width:0;max-width:100%}@media (orientation:landscape) and (max-height:540px){.camera-input:has(.capture-options:not([hidden])){width:100%}.capture-options:has(video:not([hidden])){grid-template-rows:repeat(3,auto) 1fr;grid-template-columns:minmax(0,3fr) minmax(0,2fr);column-gap:16px;display:grid}.capture-options video{grid-row:1/-1;height:100%}.capture-options>:not(video){grid-column:2}}.camera-input button,.camera-input select,.capture-form input{font:inherit;color:var(--ink);background:#f2f4f6;border:0;border-radius:12px;min-height:46px}.camera-input button{padding:10px 14px;font-weight:650}.capture-options>label:has(select){gap:8px;margin-bottom:14px;display:grid}.camera-input button.primary{color:#fff;background:var(--blue)}.camera-input button.primary:hover{background:#115dc9}.capture-options>button{text-align:left;background:#fff;border-radius:18px;align-items:center;gap:12px;width:100%;margin-top:12px;padding:18px 22px;display:flex}.capture-options>button svg:first-child{color:var(--blue);background:#edf4ff;border-radius:12px;width:36px;height:36px;padding:9px}.capture-options>button svg:last-child{color:var(--muted);margin-left:auto}.capture-form{padding:24px}.capture-form fieldset{border:0;min-width:0;margin:0;padding:0}.identity-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.capture-form input{width:100%;padding:12px;font-weight:600}.amount-field{margin-top:24px}.amount-field input{letter-spacing:-.05em;background:0 0;border-bottom:2px solid #c8defe;border-radius:0;padding:4px 0;font-size:36px}.capture-form .amount-field+button{color:var(--muted);background:0 0;padding-left:0;font-size:14px}.denominations{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;display:grid}.denominations button{color:#175ba9;background:#eaf3ff;justify-content:center;align-items:center;gap:2px;padding:4px;font-size:14px;display:flex}.form-actions{grid-template-columns:1fr 2fr;gap:8px;margin-top:28px;display:grid}.form-actions button{min-height:50px}.camera-input [role=status]:not(:empty){background:#e7effa;border-radius:14px;margin-top:12px;padding:14px}@media (max-width:760px){.ledger-entry{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 16px}.ledger-entry h2{font-size:16px}.ledger-toolbar{padding:8px 16px}.ledger-main{padding:10px 16px 0}}@media (max-width:540px){.camera-input{padding:26px 16px}.category-heading{flex-wrap:wrap;gap:4px}.categories-toolbar{flex-wrap:wrap}.login-shell{background:#fff;place-items:start center;min-height:100svh;padding:46px 24px}.login-panel{padding:0}}:is(.ledger,.login-panel,.sheet) :where(button){min-height:38px;color:var(--ink);background:#f2f4f6;border:0;border-radius:10px;justify-content:center;align-items:center;gap:6px;padding:8px 13px;font-weight:600;display:inline-flex}:is(.ledger,.login-panel,.sheet) :where(button:hover:not(:disabled)){background:#e6ecf4}:is(.ledger,.login-panel,.sheet) .primary{color:#fff;background:var(--blue)}:is(.ledger,.login-panel,.sheet) button:disabled{opacity:.5;cursor:default}:is(.ledger,.login-panel,.sheet) :where(input:not([type=checkbox]),select){width:100%;min-width:0;min-height:42px;color:var(--ink);background:#fff;border:1px solid #c9d1db;border-radius:10px;padding:9px 12px}.add-category{grid-template-columns:minmax(0,1fr) max-content;gap:6px;display:grid}.add-category button{white-space:nowrap}.password-group{gap:9px;display:grid}.password-field{position:relative}.login-panel .password-field input{padding-right:48px}.login-panel .password-field button{width:42px;color:var(--muted);background:0 0;padding:0;position:absolute;inset:1px 1px 1px auto}.field-stack,.field-stack>label:not(.check),.filter-list{gap:9px;display:grid}.field-stack{gap:15px}.field-stack>label,.sheet{color:var(--ink)}.check,.filter-list label{align-items:center;gap:8px;display:flex}input[type=checkbox]{accent-color:var(--blue)}.table-scroll{max-height:400px;overflow:auto}.history-table,.recovery-table{border-collapse:separate;border-spacing:0;width:100%;font-size:14px}.history-table{table-layout:fixed}.history-table th,.recovery-table th{color:var(--muted);background:#f7f8fa;font-weight:600;position:sticky;top:0}:is(.history-table,.recovery-table) :is(th,td){text-align:center;border-top:1px solid var(--line);overflow-wrap:anywhere;padding:8px 4px}.history-table th button{background:0 0;min-height:32px;padding:3px}.history-table [aria-pressed=true],.history-table th:not([aria-sort=none]) span{color:var(--blue)}.history-table .empty,.recovery-table .empty{color:var(--muted);padding:20px}.sheet{border:0;border-radius:20px;width:min(440px,100% - 28px);max-height:85dvh;padding:0;box-shadow:0 20px 80px #19202e33}.sheet.wide{width:min(720px,100% - 28px)}.sheet::backdrop{background:#151b2680}.sheet-body{padding:22px}.sheet header,.sheet footer{justify-content:space-between;align-items:center;gap:8px;display:flex}.sheet header{margin-bottom:18px}.sheet footer{justify-content:flex-end;margin-top:16px}.sheet .quiet{background:0 0}.filter-list{max-height:40vh;margin-top:12px;overflow-y:auto}.recovery-table{min-width:520px}.toast{z-index:5;background:var(--ink);color:#fff;border-radius:12px;padding:12px 18px;position:fixed;top:12px;left:50%;transform:translate(-50%)}@media (max-height:610px){.ledger-summary{margin-bottom:6px;padding-block:6px}.category-card{max-height:none}}
