@font-face{font-family:Prompt;src:url('./fonts/prompt-thai-400-normal.woff2') format('woff2');font-weight:400;font-display:swap;unicode-range:U+0E00-0E7F}@font-face{font-family:Prompt;src:url('./fonts/prompt-latin-400-normal.woff2') format('woff2');font-weight:400;font-display:swap}@font-face{font-family:Prompt;src:url('./fonts/prompt-thai-600-normal.woff2') format('woff2');font-weight:600;font-display:swap;unicode-range:U+0E00-0E7F}@font-face{font-family:Prompt;src:url('./fonts/prompt-latin-600-normal.woff2') format('woff2');font-weight:600;font-display:swap}
:root{--bg:#F7F4ED;--paper:#FFFDF8;--ink:#403D34;--muted:#837D70;--line:#E9E3D8;--green:#687A56;--green-dark:#4C6042;--sand:#EDE6D8;--pink:#B95C78;--radius:22px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Prompt,sans-serif;font-size:14px;line-height:1.6}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit}button{border:0;color:inherit;background:none}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #C3CFAC;outline-offset:4px}input:focus,select:focus,textarea:focus{outline:2px solid #AAB596;outline-offset:1px}h1,h2,h3,p{margin:0}h1{font-size:27px;font-weight:600;letter-spacing:-.6px;line-height:1.4}h2{font-size:19px;font-weight:600}h3{font-size:15px}small,.muted{color:var(--muted);font-size:12px}.eyebrow{font-size:10px;letter-spacing:2.5px;font-weight:600;color:var(--muted)}svg.icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.loading{display:grid;place-content:center;min-height:100dvh;gap:15px;text-align:center;color:var(--muted)}.loading img{width:85px;margin:auto;animation:bob 2s ease-in-out infinite}.shell{max-width:1550px;margin:auto}.sidebar{display:none}.topbar{height:80px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px}.brand img{width:45px}.brand strong{display:block;font-size:16px;line-height:1.3}.brand span{font-size:10px;color:var(--muted);letter-spacing:1.6px}.user-menu{display:flex;align-items:center;gap:10px}.avatar{display:grid;place-items:center;background:#E9ECDD;width:37px;height:37px;border-radius:50%;color:var(--green-dark);font-size:12px}.user-name{display:none}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:var(--paper);border:1px solid var(--line)}main{padding:24px 18px 110px;max-width:1180px;margin:auto}.page-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:23px}.page-head p{margin-top:6px;color:var(--muted);font-size:12px}.head-deer{width:58px;animation:bob 5s ease-in-out infinite}.page-head .eyebrow{margin-bottom:8px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 17px;border-radius:13px;border:1px solid var(--line);background:var(--paper);font-weight:600;font-size:12px;text-decoration:none;transition:transform .18s,background .18s}.btn:hover{background:#EFEADF;transform:translateY(-1px)}.btn.primary{background:var(--green);border-color:var(--green);color:white}.btn.primary:hover{background:var(--green-dark)}.btn.danger{background:#FAEEE9;color:#9F4848;border-color:#EFCFC6}.btn.wide{width:100%}.btn.subtle{background:transparent}.summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:19px}.stat{background:var(--paper);border:1px solid var(--line);border-radius:17px;padding:14px 10px;position:relative;overflow:hidden}.stat:last-child{background:#EAEEDC;border-color:#DEE4CC}.stat .label{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}.stat .label svg{width:15px}.stat strong{display:block;font-size:clamp(17px,5vw,27px);font-weight:600;letter-spacing:-.6px;margin:8px 0 0;white-space:nowrap}.stat small{font-size:10px}.stat.income strong{color:#5B7050}.stat.expense strong{color:#A56558}.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin-bottom:18px}.section-label{display:flex;align-items:center;gap:8px;margin-bottom:13px;font-weight:600;font-size:12px}.section-label svg{color:var(--muted)}.dates{display:grid;grid-template-columns:1fr 1fr;gap:10px}label{display:grid;gap:6px;font-size:12px;color:#716B5F}input,select,textarea{display:block;width:100%;min-width:0;border:1px solid #E5DFD3;border-radius:11px;padding:11px 12px;background:#FDFCFA;color:var(--ink);min-height:45px;font-size:14px}input[type=date]{font-size:13px}input[type=color]{padding:6px;height:45px}textarea{resize:vertical;min-height:80px}input[type=checkbox]{width:19px;min-height:19px;accent-color:var(--green)}.quick-dates{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:13px}.chip{border:1px solid var(--line);background:#F7F4EE;font-size:11px;border-radius:100px;padding:6px 11px;min-height:34px}.chip:hover{background:#EBE8DC}.filter-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}.search-wrap{position:relative;grid-column:1/-1}.search-wrap .icon{position:absolute;left:12px;top:13px;color:#A39D90}.search-wrap input{padding-left:39px}.period-save{margin-left:auto;font-size:11px;color:var(--green-dark);display:flex;gap:5px;align-items:center;padding:7px 2px}.period-save .icon{width:15px}.brand-cards{display:flex;gap:8px;overflow-x:auto;padding-bottom:7px;margin-bottom:16px;scrollbar-width:none}.brand-card{min-width:145px;flex:1;text-align:left;padding:14px;background:var(--paper);border:1px solid var(--line);border-radius:15px}.brand-card.selected{outline:2px solid var(--green);outline-offset:-2px}.brand-card .dot{display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:var(--brand-color)}.brand-card span{font-size:11px;color:var(--muted)}.brand-card strong{display:block;margin-top:6px;font-size:16px}.list-head{display:flex;align-items:center;justify-content:space-between;margin:20px 0 14px}.list-head h2{font-size:17px}.list-head small{display:block;margin-top:3px}.list-head .btn svg{width:16px}.table-box{background:var(--paper);border:1px solid var(--line);border-radius:20px;overflow:hidden}table{border-collapse:collapse;width:100%}thead{display:none}tbody tr{display:grid;grid-template-columns:1fr auto;padding:15px 16px;border-bottom:1px solid var(--line);gap:5px 12px;transition:background .2s}tbody tr:last-child{border-bottom:0}tbody tr:hover{background:#FAF7F0}td{padding:0}.date-cell{font-size:10px;color:var(--muted);grid-column:1;grid-row:1}.description-cell{grid-column:1;grid-row:2}.description-cell strong{font-size:12px;font-weight:400;display:block}.description-cell small{font-size:10px}.brand-cell{grid-column:1;grid-row:3}.pill{display:inline-flex;align-items:center;gap:5px;font-size:10px;padding:3px 8px;border-radius:7px;background:color-mix(in srgb,var(--brand-color) 10%,white);color:var(--brand-color)}.pill i{height:5px;width:5px;border-radius:50%;background:currentColor}.amount-cell{grid-column:2;grid-row:2;text-align:right;font-weight:600;white-space:nowrap;font-size:14px}.amount-cell.income{color:var(--green-dark)}.amount-cell.expense{color:#8E6558}.row-actions{grid-column:2;grid-row:3;display:flex;justify-content:flex-end;gap:3px}.row-actions button{width:30px;height:30px;display:grid;place-items:center;border-radius:8px;color:var(--muted)}.row-actions .icon{width:16px}.row-actions button:hover{background:var(--sand)}.kind-cell{display:none}.empty{padding:45px 20px;text-align:center;color:var(--muted)}.empty img{width:65px;margin-bottom:13px;opacity:.8}.empty p{font-size:13px}.pager{display:flex;align-items:center;justify-content:space-between;margin-top:14px;font-size:11px;color:var(--muted)}.pager button{width:40px;height:40px;border:1px solid var(--line);border-radius:12px;display:grid;place-items:center}.bottom-nav{position:fixed;z-index:20;bottom:0;left:0;right:0;border-top:1px solid var(--line);background:#FFFDF8F5;backdrop-filter:blur(12px);display:flex;justify-content:space-around;padding:9px 12px calc(9px + env(safe-area-inset-bottom))}.nav-btn{display:flex;flex-direction:column;align-items:center;gap:5px;color:var(--muted);font-size:10px;padding:6px 17px;border-radius:13px;min-width:75px}.nav-btn.active{background:#EDEFE3;color:var(--green-dark)}.nav-btn .icon{width:21px}.fab{position:fixed;z-index:21;bottom:calc(90px + env(safe-area-inset-bottom));right:20px;width:53px;height:53px;border-radius:18px;background:var(--green);color:white;display:grid;place-items:center;box-shadow:0 6px 18px #50613E30;transition:transform .2s}.fab:hover{transform:translateY(-3px)}.fab svg{width:24px}.desktop-add{display:none}.demo-banner{font-size:11px;text-align:center;background:#F1E8D8;color:#8B704C;padding:8px}.report-actions{display:flex;flex-wrap:wrap;gap:9px;margin:18px 0}.report-actions .btn{flex:1}.paper-preview{background:white;border:1px solid var(--line);border-radius:4px;padding:27px 20px;color:#222;font-family:'Times New Roman',serif;box-shadow:0 8px 24px #6E5F4010}.paper-preview h2{text-align:center;font-size:22px;margin-bottom:25px}.paper-preview h3{font-size:16px;margin-bottom:7px}.paper-preview .paper-period{font-weight:bold;font-size:15px;margin-bottom:3px}.paper-preview .paper-subtitle{font-size:12px;margin-bottom:28px}.paper-group{margin-bottom:23px}.paper-line{display:flex;align-items:baseline;gap:5px;margin:8px 0;font-size:14px}.paper-line .leader{flex:1;border-bottom:1px dotted #999;min-width:8px}.paper-line .value{white-space:nowrap}.paper-line.total{font-weight:400}.paper-total{margin-top:28px;font-weight:bold}.paper-hint{margin-top:15px;font-size:11px;color:var(--muted)}.master-tabs{display:flex;gap:8px;margin-bottom:20px}.master-grid{display:grid;gap:10px}.master-item{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:16px}.master-item .swatch{width:35px;height:35px;background:color-mix(in srgb,var(--brand-color) 14%,white);color:var(--brand-color);display:grid;place-items:center;border-radius:12px}.master-item .swatch i{width:11px;height:11px;background:currentColor;border-radius:50%}.master-item .details{display:flex;gap:12px;align-items:center}.master-item small{display:block}.master-item.disabled{opacity:.65}.period-card{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px;border-bottom:1px solid var(--line)}.period-card:last-child{border:0}.period-card small{display:block;font-size:11px}.period-card strong{font-size:13px}.login-screen{min-height:100dvh;display:grid;place-items:center;padding:20px;background:radial-gradient(ellipse at 30% 20%,#ECEEDA,transparent 55%),var(--bg)}.login-card{text-align:center;max-width:420px;width:100%;padding:42px 30px;background:var(--paper);border:1px solid var(--line);border-radius:32px;box-shadow:0 18px 60px #7463480B}.login-card img{width:106px;animation:bob 5s ease-in-out infinite}.login-card .eyebrow{margin:20px 0 9px}.login-card p{font-size:13px;color:var(--muted);margin:15px 0 28px}.login-card small{display:block;margin-top:18px}.login-error{color:#A95550;margin-top:12px}.login-art{font-size:11px;margin-top:28px;color:var(--muted)}dialog{padding:0;border:0;border-radius:25px 25px 0 0;position:fixed;inset:auto 0 0;max-width:100%;width:100%;max-height:92dvh;margin:0;overflow:auto;background:var(--paper);color:var(--ink);box-shadow:0 -10px 60px #423B3220}dialog::backdrop{background:#36332B55;backdrop-filter:blur(3px)}dialog[open]{animation:sheetIn .25s ease-out}.sheet-head{padding:23px 22px 15px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.sheet-head h2{font-size:19px}.sheet-body{padding:22px}.form-grid{display:grid;gap:16px}.form-grid.two{grid-template-columns:1fr 1fr}.form-grid .full{grid-column:1/-1}.segmented{display:flex;gap:6px;background:#F0EBE1;border-radius:12px;padding:5px}.segmented label{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:8px;padding:8px;font-size:12px}.segmented label:has(input:checked){background:var(--paper);color:var(--green-dark);box-shadow:0 2px 6px #45352008}.segmented input{width:15px;min-height:15px;accent-color:var(--green)}.form-footer{display:flex;gap:10px;padding-top:24px}.form-footer .primary{flex:1}.form-error{color:#A44B43;font-size:12px;margin-top:16px}.check-label{display:flex;align-items:center;gap:10px}.coverage{border-top:1px solid var(--line);padding-top:12px}.coverage summary{font-size:12px;color:var(--muted);cursor:pointer}.coverage .dates{margin-top:12px}.toast{position:fixed;z-index:100;bottom:110px;left:50%;transform:translateX(-50%);padding:13px 20px;border-radius:15px;background:#454D38;color:white;box-shadow:0 6px 20px #0002;font-size:12px;max-width:90%;animation:toastIn .3s ease-out}.toast.error{background:#985A4D}.history-item{padding:14px 0;border-bottom:1px solid var(--line)}.history-item p{font-size:13px}.history-item small{display:block}.view{animation:appear .3s ease-out}.footer-note{display:flex;align-items:center;gap:8px;justify-content:center;color:#A39B8E;font-size:10px;margin-top:27px}.footer-note img{width:22px;opacity:.7}.error-panel{padding:16px;margin-bottom:14px;background:#FAEEE9;border-radius:12px;color:#985448}.role-note{font-size:11px;color:var(--muted);margin-bottom:15px}
@keyframes bob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-5px) rotate(2deg)}}@keyframes appear{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}@keyframes sheetIn{from{opacity:0;transform:translateY(40px)}to{opacity:1;transform:none}}@keyframes toastIn{from{opacity:0;translate:0 7px}to{opacity:1;translate:0 0}}
@media(min-width:700px){main{padding:35px 30px 80px}.summary{gap:15px}.stat{padding:22px}.stat .label{font-size:13px}.stat strong{font-size:28px}.stat small{font-size:11px}.page-head h1{font-size:32px}.head-deer{width:78px}.panel{padding:24px}.dates{max-width:500px}.filter-row{grid-template-columns:1fr 1fr 1fr 1.5fr}.search-wrap{grid-column:auto}.date-cell{font-size:12px}.description-cell strong{font-size:13px}.brand-card{min-width:160px}.paper-preview{padding:42px 50px;max-width:730px;margin:auto}.paper-preview h2{font-size:27px}.paper-line{font-size:17px}.master-grid{grid-template-columns:1fr 1fr}dialog{inset:0;max-width:560px;width:calc(100% - 40px);max-height:90dvh;margin:auto;border-radius:25px}.user-name{display:block}.desktop-add{display:inline-flex}.fab{display:none}.toast{bottom:30px}}
@media(min-width:1050px){.shell{display:grid;grid-template-columns:220px 1fr;min-height:100dvh}.sidebar{display:flex;flex-direction:column;position:sticky;top:0;height:100dvh;padding:29px 20px;border-right:1px solid var(--line);background:#F4F0E7}.sidebar .brand{padding:0 0 34px}.sidebar .brand img{width:46px}.sidebar .brand strong{font-size:17px}.sidebar .brand span{font-size:9px}.sidebar nav{display:grid;gap:9px;margin-top:18px}.sidebar .nav-btn{flex-direction:row;gap:13px;font-size:12px;justify-content:flex-start;padding:13px 16px}.sidebar-foot{margin-top:auto;text-align:center;padding:20px 0;color:var(--muted)}.sidebar-foot img{width:65px;animation:bob 6s ease-in-out infinite}.sidebar-foot p{font-size:11px;margin-top:14px}.sidebar-foot span{font-size:9px;letter-spacing:1.2px}.topbar{height:85px;padding:0 35px}.topbar>.brand{display:none}.topbar::before{content:'สมุดรายรับรายจ่าย / ร้านคุณเดียร์';font-size:12px;color:var(--muted)}.bottom-nav{display:none}main{padding:34px 36px 55px}.date-panel{display:grid;grid-template-columns:1fr}.summary{margin-bottom:22px}.stat{padding:22px 25px}.filter-row{grid-template-columns:1fr 1fr 1fr 1.5fr}.quick-dates{max-width:650px}thead{display:table-header-group;background:#F7F4EC}th{text-align:left;font-weight:400;color:var(--muted);font-size:11px;padding:14px 18px}tbody tr{display:table-row}td{padding:17px 18px;vertical-align:middle;border-top:1px solid var(--line)}.date-cell{font-size:11px;white-space:nowrap}.description-cell{max-width:310px}.description-cell strong{font-size:12px}.kind-cell{display:table-cell;font-size:10px;color:var(--muted)}.amount-cell{font-size:13px}.row-actions{display:table-cell;white-space:nowrap}.row-actions button{display:inline-grid}.pill{font-size:10px}.footer-note{margin-top:30px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.search-wrap{align-self:end}
@media(max-width:699px){.summary{grid-template-columns:1fr 1fr}.stat:last-child{grid-column:1/-1;padding:13px 16px;display:grid;grid-template-columns:1fr auto;align-items:center}.stat:last-child strong{grid-column:2;grid-row:1/3;margin:0;font-size:25px}.stat strong{font-size:23px}}
