*{box-sizing:border-box}body{margin:0;background:#f4f7f5;color:#18372f;font:16px/1.55 Sarabun,Tahoma,Arial,sans-serif}header{background:#103f34;color:white;display:flex;align-items:center;justify-content:space-between;padding:15px max(5vw,18px);gap:12px}header b{font-size:23px}header span{opacity:.78}header button{margin-left:8px}main{max-width:950px;margin:28px auto;padding:0 18px}h1,h2,p{margin:0 0 10px}h1{font-size:26px}h2{font-size:18px}section{background:white;border:1px solid #d7e2dd;padding:20px;border-radius:12px;margin:12px 0}button,input,textarea{font:inherit;border:1px solid #b7cbc1;border-radius:7px;padding:9px 12px}input,textarea{width:100%;color:#163f33}button{cursor:pointer;background:white;color:#104b3d}button:disabled{opacity:.5;cursor:wait}.primary{background:#08644c;color:white;border-color:#08644c}.bar,.actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.actions{justify-content:flex-start;margin-top:14px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}label{display:block;font-weight:600;margin:8px 0}.grid label{margin:0}small,time,.sub{color:#517065}.pill{font-size:13px;background:#e4f2e9;color:#205a3e;border-radius:16px;padding:4px 10px}.returned,.reason{background:#fff2de;color:#7a4513}.reason{padding:9px 12px;border-radius:6px;white-space:pre-wrap}.amount{font-variant-numeric:tabular-nums;font-weight:bold}#notice:not(:empty){padding:10px 14px;background:#e5f3ed;border-radius:6px}#notice.error{color:#912617;background:#fff0ed}a{color:#08644c}.login{max-width:420px;margin:12vh auto}.history{font-size:14px}.card h2{overflow-wrap:anywhere}ul{padding-left:22px}@media(max-width:620px){main{margin:15px auto}section{padding:15px}.grid{grid-template-columns:1fr}header b{font-size:18px}header{flex-wrap:wrap}button{min-height:42px}}
body:has(#bottom-menu:not([hidden])) main{padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))}#bottom-menu{position:fixed;z-index:5;inset:auto 0 0;display:flex;justify-content:center;padding:4px 8px calc(4px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #cad9d2}#bottom-menu[hidden]{display:none}#bottom-menu button{flex:1;max-width:180px;min-width:0;min-height:54px;display:grid;place-items:center;gap:2px;font-size:13px;border:0;border-radius:8px;background:white;color:#496259;padding:4px}#bottom-menu svg{width:21px;height:21px}#bottom-menu [aria-current=page]{background:#e0f1e7;color:#07553e;font-weight:bold}.summary{width:100%;border-collapse:collapse}.summary td,.summary th{padding:9px 4px;text-align:right;border-bottom:1px solid #dce7df}.summary th:first-child{text-align:left}dt{color:#597267}dd{margin:0 0 12px;font-weight:bold}

.password-field{position:relative}.password-field input{padding-right:50px}.password-field button{position:absolute;right:1px;top:1px;bottom:1px;width:44px;padding:8px;border:0;background:transparent;display:grid;place-items:center}.password-field svg{width:21px;height:21px}.eye-slash{display:none}[aria-pressed=true] .eye-slash{display:block}.login .remember-choice{display:flex;gap:9px;align-items:center;margin:16px 0 0}.remember-choice input{width:18px;height:18px;accent-color:#08644c}

.pin-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:12px 0}.pin-pad button{min-height:43px;font-size:19px}.pin-pad button:active{background:#dfefe8}.login [inputmode=numeric]{letter-spacing:.3em;font-variant-numeric:tabular-nums}#create-account select{display:block;padding:9px;width:100%;font:inherit;border:1px solid #b7cbc1;border-radius:7px}
:root{--blue:#1267e6;--ink:#112650;--line:#c8d9ef}body{background:radial-gradient(ellipse at 95% 2%,#d8e5ff 0,transparent 38%),linear-gradient(150deg,#f4f9ff,#edf4ff 70%,#f8faff);color:var(--ink);min-height:100vh}header{background:linear-gradient(110deg,#f7fbff,#daeaff);color:var(--ink);border-bottom:1px solid #bdd9f5}header b:before{content:'▤';display:inline-grid;place-items:center;width:34px;height:36px;background:linear-gradient(145deg,#36b8ff,#0853de);border-radius:10px;color:white;margin-right:10px;box-shadow:inset 0 1px 2px white,0 3px 8px #4087c448}main{max-width:820px}section{border-color:#d3e2f4;box-shadow:0 3px 13px #245ca410;background:#ffffffed;border-radius:16px}h1{font-size:clamp(23px,4vw,31px)}input,textarea,select,button{color:var(--ink);border-color:#c0d2e9}select{width:100%;padding:9px 12px;font:inherit;background:white;border:1px solid var(--line);border-radius:8px}button.primary{background:linear-gradient(145deg,#138dff,#1155da);color:white;border:1px solid #0965db;box-shadow:inset 0 1px #ffffff55,0 3px 9px #095ecc20}.pill{color:#164c92;background:#e8f1ff}.pill.returned,.reason{color:#794708;background:#fff3da}.total{background:#eaf4ff;border-radius:9px;padding:9px 12px;font-weight:700;color:#124b96}#bottom-menu{background:#f8fbfff5;border-color:#c9ddf6;box-shadow:0 -2px 12px #1d518410}#bottom-menu button{color:#3d587b;background:none}#bottom-menu [aria-current=page]{color:#0757d7;background:#e3efff;box-shadow:inset 0 -3px #1475ee}.sheet{border:1px solid #c1d7f3;border-radius:18px;padding:18px;width:min(430px,94vw);color:var(--ink);box-shadow:0 16px 65px #0b2a684a}.sheet::backdrop{background:#102a4f70}.choice{display:flex;align-items:center;gap:14px;text-align:left;width:100%;margin-top:12px;padding:15px;background:linear-gradient(130deg,#fff,#edf5ff)}.choice small{display:block}.choice>b:last-child{margin-left:auto}.art{font-size:32px;background:linear-gradient(130deg,white,#cfe8ff);padding:7px;border-radius:13px}.tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tiles button{padding:15px 6px;background:linear-gradient(160deg,#fff,#e2efff)}.tiles .primary{background:linear-gradient(160deg,#1d9bff,#1559da)}details{padding:10px 0}summary{cursor:pointer;color:#265299}.file-chip{padding:5px 10px;border-radius:8px;background:#edf5ff;margin:5px 0;overflow-wrap:anywhere}.file-chip button{padding:2px 7px}pre{white-space:pre-wrap;max-height:220px;overflow:auto}.pin-pad button{background:#f6faff}.login{margin:4vh auto}.card:has(.reason){border-color:#f1ce91}.history{border-left:2px solid #b8d6fa;padding-left:10px}button:focus-visible,summary:focus-visible{outline:3px solid #5ba5ff;outline-offset:2px}
@media(max-width:600px){.sheet{margin:auto auto max(12px,env(safe-area-inset-bottom));width:calc(100% - 16px)}.actions .primary{flex:1}.bar h1{margin-bottom:0}.card{padding:13px}.tiles button{min-height:78px}}
header>div:first-child{font-weight:700;letter-spacing:.01em}.card .bar{margin-bottom:6px}.sheet .choice:focus-visible{outline-offset:0}.sheet .choice:hover,.tiles button:not(.primary):hover{border-color:#69a6fb}.tiles button{font-size:16px;font-weight:700}.choice .art{width:54px;height:54px;display:grid;place-items:center;flex:none;background:radial-gradient(ellipse at 32% 12%,#fff,#d4eaff 64%,#adcfff);box-shadow:inset 0 1px 2px white,0 3px 8px #184ea824}.sheet .choice{border-radius:13px}.art-icon{display:block;margin:0 auto 3px;width:40px;height:40px;font-size:31px;line-height:40px;filter:drop-shadow(0 2px 2px #21447544)}.receipt-form .tiles{margin-bottom:8px}.receipt-form .tiles button{min-height:85px}#ocr-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}#ocr-tools label{flex:1;min-width:155px}#ocr-tools small{width:100%}.sheet{max-height:85dvh;overflow:auto}#app .card .pill{font-weight:600}
#app>.bar:first-child{background:linear-gradient(135deg,#fff,#edf5ff);padding:18px;border-radius:18px;border:1px solid #d5e4fa;box-shadow:0 4px 16px #264f7c0c}.card .bar strong,.card .amount{font-size:19px;color:#152c51}.card:has(.reason){background:linear-gradient(110deg,#fff,#fffbf4)}.card small{line-height:1.7;color:#576b85}.actions button:not(.primary):hover{background:#f0f6ff}#bottom-menu{padding-top:5px;border-radius:16px 16px 0 0}.history{margin:8px 0}#notice:not(:empty){position:sticky;top:5px;z-index:3}

@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/sarabun/Sarabun-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/sarabun/Sarabun-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/sarabun/Sarabun-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/sarabun/Sarabun-700.ttf') format('truetype');
}
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/sarabun/Sarabun-800.ttf') format('truetype');
}

:root{--ink:#0c1e44;--blue:#0866ff;--line:#c5d8f0}body{font-family:Sarabun,Tahoma,sans-serif;letter-spacing:0;line-height:1.55;color:var(--ink);background:radial-gradient(ellipse at 20% 8%,#e0f3ff 0,transparent 43%),linear-gradient(128deg,#d3eaff,#f5f9ff 44%,#dbe7ff);background-attachment:fixed}header{position:relative;max-width:820px;margin:0 auto;min-height:67px;border:0;padding:12px 18px;background:linear-gradient(153deg,#f8fcff 0%,#eaf5ff 62%,#c4ddff 93%,#daedff);border-radius:0 0 18px 18px}header b{display:flex;align-items:center;font-weight:800;font-size:22px;letter-spacing:-.5px}header b:before{content:"";width:35px;height:40px;margin-right:6px;border-radius:8px;box-shadow:none;background:transparent url('/art/brand.webp') center/contain no-repeat;mix-blend-mode:multiply}#account{display:flex;align-items:center;gap:8px}#account span{opacity:1}.who{text-align:right;line-height:1.2}.who b{font-size:14px;letter-spacing:0;display:block}.who b:before{display:none}.who small{font-size:11px}.avatar-initial{font-size:17px;font-weight:700;background:#e1edff;border:2px solid white;border-radius:100%;width:34px;height:34px;display:grid;place-items:center;color:#184991}main{max-width:820px;margin:0 auto;padding:12px 14px 90px}h1{font-weight:750;font-size:25px;line-height:1.35}.d-hero{padding:10px 0 4px}.d-hero .bar{flex-wrap:nowrap}.d-hero h1{margin:0}.refresh{background:transparent;color:#45658a;border:0;font-size:22px;padding:4px 10px}.create{width:100%;margin:10px 0 4px;font-weight:700;font-size:18px;min-height:47px}.primary,button.primary{background:linear-gradient(150deg,#148bff,#0865ed 65%,#0756d9);border:1px solid #1174f8;box-shadow:inset 0 1px 1px #ffffff9c,0 3px 7px #234e9219}.fix-card,.bill-row{display:flex;width:100%;align-items:center;text-align:left;gap:12px;border-radius:13px;border:1px solid #e4ebf5}.fix-card{background:#fff6e9;border-color:#f4d9ae;margin:13px 0;padding:12px}.fix-card>span:first-child,.receipt-symbol{display:grid;place-items:center;background:#dfedff;border-radius:9px;min-width:31px;height:34px;font-size:22px;color:#167bff}.fix-card>span:first-child{background:#ffe7c5;color:#a45b12}.fix-card small,.bill-text small{display:block;font-size:12px}.fix-card>strong,.bill-numbers{margin-left:auto}.recent-title{font-size:18px;margin:18px 0 8px}.bill-list{display:grid;gap:7px}.bill-row{padding:10px 11px;background:linear-gradient(115deg,#fff 55%,#f4f8ff);min-height:65px;box-shadow:0 2px 4px #15366109}.bill-text{min-width:0;overflow-wrap:anywhere}.bill-numbers{display:grid;justify-items:end;flex:none;font-size:14px}.pill{font-size:12px;border-radius:15px;white-space:nowrap}.pill.approved{color:#10713c;background:#dff5dd}.pill.returned{color:#914811;background:#ffe6b9}.d-art{width:55px;height:55px;object-fit:contain;mix-blend-mode:multiply}.d-hero>.d-art{float:left;margin:0 10px 3px 0}h1:has(>.d-art){display:flex;align-items:center;gap:10px;background:linear-gradient(130deg,#f6fbff,#d9edff);border-radius:13px;padding:10px 13px;margin-bottom:14px}.receipt-form h1>.d-art{width:72px}.sheet{border-radius:17px;background:linear-gradient(#fff,#f3f8ff);padding:17px}.sheet h2{font-size:19px}.sheet .art{background:none;box-shadow:none;padding:0;width:55px;height:54px}.art img{width:52px;height:52px;object-fit:contain;mix-blend-mode:multiply}.choice small{color:#435976}.choice{box-shadow:0 3px 5px #10244713}.sheet::backdrop{background:#14254163}
#bottom-menu{margin:auto;max-width:820px;min-height:62px;border:1px solid #cfe2fa;border-radius:16px 16px 0 0;box-shadow:0 -3px 15px #244e8119;background:linear-gradient(#fff,#f2f8ff)}#bottom-menu [aria-current=page]{background:linear-gradient(140deg,#1085ff,#095cde);color:#fff;box-shadow:inset 0 1px #ffffff60}#bottom-menu button{max-width:170px;margin:0 3px;font-weight:600}.tiles .art-icon{width:48px;height:45px}.tiles svg{width:46px;height:44px}.login-brand{display:flex;align-items:center;justify-content:center;gap:7px;color:#125bc4;font-size:30px;font-weight:800}.login-brand img{width:51px}.login{background:radial-gradient(ellipse at 100% 0,#cfe9ff,transparent 38%),white}.login h1{margin-top:16px;font-size:23px}section{box-shadow:0 4px 14px #2058a014}.receipt-form:has(#picked:empty) ul:empty{display:none}label>select,label>input,textarea{margin-top:3px}.receipt-form #details{margin-top:12px}.summary th,.summary td{font-size:14px}
@media(max-width:600px){.sheet:has(.choice){margin:auto;max-width:calc(100vw - 30px)}.sheet.first-sheet{margin:auto auto max(12px,env(safe-area-inset-bottom));max-width:calc(100vw - 12px)}.sheet.first-sheet:before{content:"";display:block;width:38px;height:4px;background:#afc0d1;border-radius:4px;margin:0 auto 12px}header{padding:10px 14px}body:has(.login) header{display:none}body:has(.login) main{padding-top:15px}.receipt-form{padding:12px;margin:4px 0}.receipt-form h1{font-size:20px}.actions{row-gap:8px}}


.receipt-form.attach-first #details,.receipt-form.attach-first #save,.receipt-form.attach-first #submit{display:none}.receipt-form #manual-entry{margin-top:14px;width:100%;color:#1758ad;font-weight:600}.receipt-form #manual-entry[hidden]{display:none}.receipt-form.attach-first h1{flex-direction:column;align-items:flex-start;background:linear-gradient(155deg,#edf7ff,#d9eaff);padding:18px;border-radius:15px;width:100%}.receipt-form.attach-first h1 .d-art{width:164px;height:82px;align-self:center}.receipt-form.attach-first>.bar>.pill{display:none}.receipt-form.attach-first #ocr-tools button{width:100%;background:linear-gradient(#1986ff,#075be0);color:white;border:0;font-weight:700}.d-art,.art img,.login-brand img{mask-image:radial-gradient(ellipse closest-side,#000 76%,transparent 120%)}.bill-list+.card{margin-top:10px}
.art-icon img{width:52px;height:45px;object-fit:contain;mask-image:radial-gradient(ellipse,#000 62%,transparent 80%)}.tiles .art-icon{width:54px}
.purchase-row{margin:7px 0}.purchase-row .d-art{width:40px;height:40px}.pill.purchased{background:#dff5dd;color:#17603d}.sheet .art img{mask-image:radial-gradient(ellipse,#000 67%,transparent 87%)}@media(max-width:375px){.bill-row{gap:6px}.bill-numbers{font-size:13px}#bottom-menu button{font-size:12px}}

.receipt-form.attach-first #files-toggle{display:none}.review-fields:not(.expand-files) :is(.tiles,#picked,#ocr-tools){display:none}.review-fields #files-toggle{display:block;margin:6px 0;font-size:13px;min-height:32px;padding:4px 9px}.review-fields #ocr-result .pill{background:#e0f6e7;color:#145e35}.review-fields .actions{gap:7px}.review-fields #back{font-size:13px}.review-fields:has(#ocr-result .reason) #category{border:2px solid #1775ed}.review-fields .bar{gap:3px}.review-fields form label{font-size:14px}.review-fields form input,.review-fields form select{font-weight:400}.sheet:not(.first-sheet){margin:auto}.sheet:has(textarea){max-width:360px}.sheet:has(textarea) .actions{display:grid}.sheet:has(textarea) textarea{min-height:88px}#pr-form .grid{display:grid;grid-template-columns:1fr 1fr;align-items:end}#app:has(#pending-only) .d-hero,#app:has(#accounts)>h1,#app:has(#signout)>h1{padding-bottom:10px}header:has(~main #pending-only),header:has(~main #accounts),header:has(~main #signout){background:linear-gradient(120deg,#167df8,#0955c8);color:#fff}header:has(~main #pending-only) .who small,header:has(~main #accounts) .who small,header:has(~main #signout) .who small{color:#e6f1ff}.login .actions{display:grid}.login .actions button,.sheet .actions button{width:100%}
.what-bought{display:block}.what-bought input{margin-bottom:4px}#expense-hint{display:block;color:#2358a4;margin-bottom:8px}#digital-paper{margin-top:10px}.voucher-dialog{width:min(790px,96vw);max-height:90dvh;overflow:auto;border:1px solid #c9d9ed;border-radius:14px;padding:16px;color:#112650}.voucher-dialog::backdrop{background:#15284277}.voucher-dialog article{padding:24px;margin:14px 0;border:1px solid #c8d5e4}.paper-head,.paper-grid,.signatures{display:grid;gap:14px;grid-template-columns:1fr 1fr}.paper-head{border-bottom:2px solid #193b65}.paper-head>div:last-child{font-size:12px;text-align:right;overflow-wrap:anywhere}.paper-grid{margin:16px 0}.voucher-dialog p{white-space:pre-wrap;overflow-wrap:anywhere}.signatures{grid-template-columns:repeat(3,1fr);margin:52px 0 16px;text-align:center}.signatures span{border-top:1px solid #657792}.voucher-dialog[open]{display:block}@media(max-width:500px){.voucher-dialog article{padding:12px}.paper-grid{gap:6px}.voucher-dialog .actions{flex-wrap:wrap}}@media print{@page{size:A4;margin:16mm}body:has(.voucher-dialog[open])>*:not(.voucher-dialog){display:none!important}body:has(.voucher-dialog[open]){background:white;min-height:0}dialog.voucher-dialog[open]{position:static!important;max-width:none;width:100%;max-height:none;height:auto;overflow:visible;border:0;box-shadow:none;padding:0;margin:0}.voucher-dialog::backdrop{background:none}.voucher-dialog .paper-controls{display:none!important}.voucher-dialog article{margin:0;padding:0;border:0}.signatures{break-inside:avoid}}

.slip-uploader{padding:10px 0}.slip-uploader>button{color:#125bc4;border:1px dashed #91b6e8;font-weight:600}.slip-uploader>small{display:block;margin:3px 0}.receipt-form.attach-first.has-files #save{display:inline-block}
.member-dialog{width:min(820px,96vw);max-height:92dvh;padding:20px;border:1px solid #bfd1e8;border-radius:16px;color:#112650}.member-dialog::backdrop{background:#122b4f66}.member-tabs,.perm-actions{display:flex;align-items:center;gap:6px}.member-tabs{margin-top:12px}.member-tabs button{flex:1}.member-tabs [aria-pressed=true],.member-list [aria-pressed=true]{background:#e6f1ff;border-color:#307ae0;color:#104da8}.member-layout{display:grid;grid-template-columns:minmax(135px,1fr) minmax(210px,2fr);gap:16px;margin-top:12px}.member-list{display:flex;flex-direction:column;gap:5px;max-height:66vh;overflow:auto}.member-list button{text-align:left}.member-list small,.perm-row small{display:block;font-size:11px}.member-settings form{padding:10px;background:#f1f6ff;border-radius:10px;margin-bottom:14px}.perm-row{padding:10px 0;border-top:1px solid #e1eaf5;display:flex;align-items:center;justify-content:space-between;gap:8px}.perm-actions button{font-size:12px}.perm-switch{border:0;border-radius:999px;background:#dce3ec;color:#314459;min-width:66px;position:relative;padding:5px 8px 5px 28px}.perm-switch:before{content:"";position:absolute;left:4px;top:50%;transform:translateY(-50%);border-radius:50%;width:18px;height:18px;background:white;box-shadow:0 1px 3px #2336}.perm-switch[aria-checked=true]{background:#0966e2;color:white;padding:5px 28px 5px 8px}.perm-switch[aria-checked=true]:before{left:auto;right:4px}.perm-switch:disabled{cursor:default}.member-dialog[aria-busy=true] .member-layout{pointer-events:none;opacity:.7}.member-feedback{position:sticky;bottom:0;background:white;color:#1553a0}.member-dialog button:focus-visible{outline:3px solid #368afd}@media(max-width:620px){.member-dialog{padding:14px}.member-layout{grid-template-columns:1fr}.member-list{flex-direction:row;max-height:none;overflow-x:auto}.member-list button{flex:none}.perm-row{font-size:14px}.perm-switch{min-height:34px}}

#bottom-menu .nav-icon{position:relative;display:inline-flex}
#bottom-menu .approval-count{position:absolute;bottom:55%;left:64%;min-width:19px;height:19px;padding:0 4px;box-sizing:border-box;display:grid;place-items:center;border:1.5px solid white;border-radius:999px;background:#c82138;color:white;font:700 11px/1 Sarabun,system-ui;font-variant-numeric:tabular-nums;pointer-events:none}

@media(max-width:640px){
 .purchase-decision{position:sticky;bottom:calc(70px + env(safe-area-inset-bottom,0px));padding:8px;background:white;border-top:1px solid #d3e0f0;z-index:2}

}

.purchase-decision button#pr-ok{background:#16723b;color:#fff;border-color:#16723b}
.purchase-decision button#pr-reject{background:#b42333;color:#fff;border-color:#b42333}
.purchase-decision button#pr-ok:hover{background:#105b2e}
.purchase-decision button#pr-reject:hover{background:#921b29}

.actions.purchase-decision{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(7px,2vw,12px)}
.actions.purchase-decision button{box-sizing:border-box;width:100%;min-width:0;height:48px;margin:0;padding:4px 2px;border:1.5px solid;border-radius:14px;font-weight:700;white-space:nowrap;box-shadow:none}
@media(max-width:360px){.actions.purchase-decision button{font-size:13px}}

.category-trigger{width:100%;text-align:start;color:#144289}
dialog.category-picker{box-sizing:border-box;width:min(430px,94vw);max-height:92dvh;overflow:auto;border:1px solid #bed6f4;border-radius:22px;background:linear-gradient(155deg,#f7fcff,#e9f6ff 56%,#f1efff);padding:20px;color:#132f56}
.category-picker::backdrop{background:#10233e68}
.category-picker header{position:static;background:none;color:inherit;padding:0;display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;box-shadow:none}
.category-picker h2{margin:0;font-size:21px}
.category-picker input{width:100%;font-size:16px}
.category-picker .wheel-frame{position:relative;margin:14px 0;border-radius:18px;border:1px solid #add4ef;overflow:hidden;background:linear-gradient(115deg,#ddf3ff,#ebeaff)}
.wheel-frame:before{content:"";position:absolute;top:50%;transform:translateY(-50%);left:6px;right:6px;height:50px;background:#ffffffc9;border:1px solid #92c6ee;border-radius:12px;pointer-events:none}
.category-wheel{position:relative;height:250px;overflow-y:auto;overscroll-behavior:contain;scroll-snap-type:y mandatory;scrollbar-width:thin}
.category-wheel:before,.category-wheel:after{content:"";display:block;height:100px}
.category-wheel [role=option]{box-sizing:border-box;display:grid;align-content:center;text-align:center;height:50px;line-height:1.2;padding:0 12px;scroll-snap-align:center;color:#17395e;cursor:pointer}
.category-wheel [aria-selected=true]{font-weight:700}
.category-picker .wheel-apply,.category-picker .wheel-skip{width:100%;min-height:44px}
.category-picker .wheel-skip{margin-top:5px;background:transparent;border:0;text-decoration:underline}
select[name=category][hidden],.wheel-frame[hidden]{display:none!important}
@media(max-height:590px){.category-wheel{height:150px}.category-wheel:before,.category-wheel:after{height:50px}}

/* Receipt entry and review */
section.receipt-form{
  background:radial-gradient(ellipse at 0% 65%,#c6e9ff 0%,transparent 55%),
             linear-gradient(120deg,#f4fbff 4%,#ecf3ff 48%,#e8e1fa 100%);
  border:1px solid #c7d9f0;border-radius:23px;padding:clamp(16px,3vw,28px);
  box-shadow:0 8px 24px #334f7e12;color:#162e52;
}
.receipt-form.attach-first h1,.receipt-form.review-fields h1{background:transparent}
.receipt-form :is(.what-bought,#details label,fieldset label){color:#193454;font-weight:650}
.receipt-form :is(input:not([type=hidden],[type=file],[type=checkbox],[type=radio]),textarea,select,.category-trigger){
  box-sizing:border-box;min-width:0;max-width:100%;width:100%;min-height:46px;margin-top:6px;
  border:1px solid #9ebfe4;border-radius:18px;padding:10px 15px;
  background:linear-gradient(110deg,#fff,#f3f9ff);color:#142f52;font-size:16px;
  box-shadow:inset 0 1px 0 #fff,0 3px 8px #38578212;
}
.receipt-form input::placeholder,.receipt-form textarea::placeholder{color:#566e89}
.receipt-form :is(input,textarea,select,.category-trigger):focus-visible{
  outline:3px solid #2874bf;outline-offset:2px;border-color:#2874bf;
}
.receipt-form fieldset{min-width:0;border:1px solid #bed1e7;border-radius:15px}
.receipt-form .actions button.primary{background:linear-gradient(160deg,#1684eb,#134cb6 70%,#163b98);color:white;border-radius:20px;min-height:46px}

/* Keep totals easy to scan alongside Thai labels. */
#app :is(.bill-amount,.total,.bill-numbers strong),.bill-amount{
  font-variant-numeric:lining-nums tabular-nums;font-weight:750;color:#132f50;line-height:1.4;
}
#app .bill-numbers strong,#app .bill-amount{font-size:1.1rem}
#app .total,#app .total .bill-amount,#app h2 .bill-amount{font-size:clamp(1.25rem,4.8vw,1.55rem)}
#app :is(input[name=amount],input[name=price],input[name=actual],input[data-field=amount]){
  font-size:1.125rem;font-weight:700;color:#132f50;font-variant-numeric:tabular-nums;
}
#app .bill-text b,#app form label{font-weight:650}
#app .bill-info{margin:6px 0;color:#405a76;font-size:.875rem}
#app .bill-info summary{display:inline-flex;align-items:center;gap:6px;min-height:32px;cursor:pointer;font-weight:550}
#app .bill-info summary span{font-size:1rem;color:#185788}
#app .bill-info p{margin:2px 0 8px;line-height:1.5}

.date-columns{display:grid;grid-template-columns:minmax(0,.72fr) minmax(0,1.5fr) minmax(0,1fr);gap:5px;margin-top:12px;text-align:center}
.bill-date-picker .wheel-frame{margin:5px 0 16px}
.bill-date-picker .wheel-frame:before{left:2px;right:2px}
.bill-date-picker [role=option]{padding:0 2px;font-size:15px;opacity:.65}
.bill-date-picker [aria-selected=true]{opacity:1;color:#103565;font-size:16px}

/* Compact floating tab bar. */
#bottom-menu{
  inset:auto 10px max(6px,env(safe-area-inset-bottom,0px));max-width:680px;
  padding:4px;min-height:0;border:1px solid #d9e2ef;border-radius:24px;
  background:#fcfdff;box-shadow:0 5px 22px #19345621,inset 0 1px #fff;
}
@supports ((backdrop-filter:blur(16px)) or (-webkit-backdrop-filter:blur(16px))){
  #bottom-menu{background:rgba(250,252,255,.93);-webkit-backdrop-filter:saturate(140%) blur(16px);backdrop-filter:saturate(140%) blur(16px)}
}
#bottom-menu button{
  margin:0;min-height:52px;padding:4px 2px;gap:2px;align-content:center;
  border-radius:19px;color:#47586c;background:transparent;box-shadow:none;
  font:600 12px/1.2 Sarabun,Tahoma,sans-serif;
}
#bottom-menu svg{width:25px;height:25px;stroke-width:1.65}
#bottom-menu .tab-shape{fill:currentColor;fill-opacity:.05}
#bottom-menu [aria-current=page]{background:#e4effe;color:#0956b3;box-shadow:none;font-weight:700}
#bottom-menu [aria-current=page] .tab-shape{fill-opacity:1}
#bottom-menu [aria-current=page] .tab-detail{stroke:#fff;stroke-width:1.9}
#bottom-menu button:focus-visible{outline:2px solid #2469ba;outline-offset:-2px}
#bottom-menu .approval-count{bottom:51%;left:69%;z-index:1}

/* Bill Soft 3D navigation */
#bottom-menu .nav-light{stop-color:#f7fbff}
#bottom-menu .nav-mid{stop-color:#d3e0ed}
#bottom-menu .nav-dark{stop-color:#a4b6c9}
#bottom-menu .tab-depth{fill:#8fa3b9;stroke:#8fa3b9;stroke-width:1.1}
#bottom-menu button .tab-shape{fill:revert;fill-opacity:1;stroke:#8599b0;stroke-width:1}
#bottom-menu button .tab-detail{stroke:#465f7b;stroke-width:1.65}
#bottom-menu [aria-current=page] .nav-light{stop-color:#bceaff}
#bottom-menu [aria-current=page] .nav-mid{stop-color:#539fff}
#bottom-menu [aria-current=page] .nav-dark{stop-color:#2462cd}
#bottom-menu [aria-current=page] .tab-depth{fill:#214eae;stroke:#214eae}
#bottom-menu [aria-current=page] .tab-shape{stroke:#548ed8}
#bottom-menu [aria-current=page] .tab-detail{stroke:#fff;stroke-width:1.9}
#bottom-menu [aria-current=page] svg{filter:drop-shadow(0 2px 2px #15499a38);transform:rotate(-4deg)}
#bottom-menu [aria-current=page]{background:linear-gradient(145deg,#f5fbff,#dfedff);box-shadow:inset 0 1px 1px white,inset 0 -1px 2px #97b8e54a}
#bottom-menu [data-tab=bills] .tab-shape{fill:url(#nav-face-bills)}
#bottom-menu [data-tab=reviews] .tab-shape{fill:url(#nav-face-reviews)}
#bottom-menu [data-tab=reports] .tab-shape{fill:url(#nav-face-reports)}
#bottom-menu [data-tab=profile] .tab-shape{fill:url(#nav-face-profile)}

/* Purchase choices: a folded receipt, approval clipboard, cart and delegate bag. */
.sheet .choice .art{position:relative;width:60px;height:60px;border-radius:19px;background:radial-gradient(ellipse at 32% 15%,#fff 2%,#ebf6ff 56%,#d9eaff);box-shadow:inset 0 1px 0 #fff,0 3px 9px #1f507d14}
.sheet .choice .cg-cart{width:52px;height:52px;object-fit:contain;filter:drop-shadow(0 2px 2px #24538c28)}
.choice-glyph{display:block;position:relative;width:44px;height:44px;transform:rotate(-7deg);filter:drop-shadow(1px 3px 2px #224b883d)}
.choice-glyph i,.choice-glyph b,.choice-glyph em{position:absolute;display:block;box-sizing:border-box}
.cg-receipt i,.cg-approval i{inset:4px 8px 5px;border-radius:5px;background:linear-gradient(125deg,#b4e5ff,#59a6fa 43%,#397ad6);box-shadow:inset 1px 1px 1px #d5f3ff,2px 2px 0 #235aa7}
.cg-receipt b,.cg-approval b{inset:7px 10px 7px 11px;border-radius:3px;background:linear-gradient(120deg,#fff,#e3f0ff);box-shadow:0 1px 2px #305e9466}
.cg-receipt b::before,.cg-approval b::before{content:"";position:absolute;left:4px;right:4px;top:8px;height:2px;border-radius:3px;background:#84a9cf;box-shadow:0 5px #9db8d6,0 10px #bdcfe2}
.cg-receipt em,.cg-approval em{right:2px;bottom:2px;width:18px;height:18px;border-radius:50%;background:linear-gradient(140deg,#7ce4bb,#24a682);box-shadow:inset 1px 1px 1px #c6ffe8,1px 1px 0 #248269}
.cg-receipt em::after,.cg-approval em::after{content:"";position:absolute;left:5px;top:4px;width:4px;height:7px;border:solid white;border-width:0 2px 2px 0;transform:rotate(42deg)}
.cg-approval i::after{content:"";position:absolute;z-index:1;top:-2px;left:7px;width:14px;height:6px;border-radius:4px;background:linear-gradient(#ffda78,#e9a338)}
.cg-approval em{background:linear-gradient(140deg,#78c6ff,#3475d6);box-shadow:1px 1px #255aa5}
.cg-delegate i{left:13px;top:3px;width:18px;height:19px;border:4px solid #e4ab49;border-radius:12px;box-shadow:inset 1px 1px #ab7326,1px 0 #ffe7a2}
.cg-delegate b{left:5px;right:5px;top:13px;bottom:4px;border-radius:5px 5px 8px 8px;background:linear-gradient(125deg,#a8dcff,#549eee 48%,#427aca);box-shadow:inset 1px 2px 1px #b5eaff,2px 2px #285da7}
.cg-delegate em{right:1px;bottom:1px;width:20px;height:18px;border-radius:8px;background:linear-gradient(#fff,#daebff);box-shadow:0 1px 2px #34639c66}
.cg-delegate em::after{content:"➜";position:absolute;inset:0;text-align:center;color:#2365b4;font:700 15px/18px Sarabun,system-ui}

.page-heading{display:flex;align-items:center;gap:8px;min-width:0;flex:1}
.page-heading h1{min-width:0;margin:0}
#app .page-back{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;background:#f4f8ff;border:1px solid #c9d9eb;border-radius:14px;color:#245289}
.receipt-form.attach-first .page-heading h1,.receipt-form.review-fields .page-heading h1{flex-direction:row;align-items:center;padding:0;width:auto}
#app .page-heading h1 .d-art,.receipt-form.attach-first .page-heading h1 .d-art{width:30px;height:30px;object-fit:contain}
#app .receipt-form .tiles{gap:8px}
#app .receipt-form .tiles button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:48px;padding:7px 5px;font-size:14px;line-height:1.25}
#app .receipt-form .tiles .art-icon,#app .receipt-form .tiles .art-icon img{width:26px;height:26px;line-height:1;margin:0;flex:none}
.document-tools{margin-top:12px;color:#435b76;font-size:.875rem}
.document-tools summary{cursor:pointer;padding:6px 0}
.document-tools button{margin-top:5px}
#app .review-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:12px 0;align-items:stretch}
#app .review-filters button{box-sizing:border-box;min-width:0;width:100%;height:44px;margin:0;padding:4px 2px;border-width:1px;font-size:clamp(12px,3.4vw,15px);line-height:1.2;font-weight:650;white-space:nowrap}
#app .review-filters button.primary{box-shadow:none}
html{scrollbar-gutter:stable}

dialog.approval-feedback{
 position:fixed;inset:0;margin:auto;width:min(232px,82vw);height:fit-content;
 box-sizing:border-box;padding:28px 20px 21px;border:1px solid #d6e6fa;border-radius:26px;
 text-align:center;color:#143757;background:linear-gradient(145deg,#fff,#edf6ff);
 box-shadow:0 16px 48px #16345338,inset 0 1px 0 white;
}
.approval-feedback::backdrop{background:#162d4d55}
.approval-feedback strong{display:block;margin-top:15px;font:700 18px/1.45 Sarabun,system-ui,sans-serif}
.approval-medal{position:relative;width:62px;height:62px;margin:auto;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 32% 22%,white,#e5f1ff 64%,#c9def6);box-shadow:0 5px 8px #365b8e29}
.approval-ring{position:absolute;inset:0;border-radius:50%;border:4px solid #cfe1f8;border-top-color:#367de2;border-right-color:#77b8ff;animation:bill-approval-spin .8s linear infinite}
.approval-medal svg{width:35px;height:35px;fill:none;stroke:white;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.approved .approval-medal{background:radial-gradient(circle at 30% 18%,#9ee8ba,#29a66b 50%,#11794e 85%);box-shadow:inset 0 2px 2px #d2ffe199,inset 0 -3px 2px #125d42,0 6px 10px #12784d42;animation:bill-approval-rise .36s ease-out both}
.approved .approval-ring{display:none}
.approved .approval-medal svg{opacity:1}
@keyframes bill-approval-spin{to{transform:rotate(360deg)}}
@keyframes bill-approval-rise{from{transform:translateY(8px) scale(.86)}70%{transform:translateY(-3px) scale(1.04)}to{transform:none}}
@media(prefers-reduced-motion:reduce){.approval-ring,.approved .approval-medal{animation:none}}
@media(max-width:440px){
 #app .total.purchase-summary{font-size:clamp(15px,4.2vw,18px);padding-inline:8px}
}

.profile-view h1 .d-art{display:none}
#app .profile-view h1{background:transparent;padding:0;margin:10px 0 15px;font-size:23px}
.profile-view h2{color:#48627b;font-size:15px;margin:16px 0 7px}
.profile-view section{padding:14px;border-radius:16px}
.profile-ident{display:flex;gap:12px;align-items:center;color:#526981;overflow-wrap:anywhere}
.profile-ident img{width:55px;height:55px;object-fit:contain;background:#edf4ff;border-radius:14px}
.profile-ident strong{color:#173553;font-size:22px}
.profile-view details{margin-top:12px;border-top:1px solid #dee8f3}
.profile-view summary{padding:12px 0 2px;min-height:44px;cursor:pointer;font-weight:600}
.profile-view dl{display:grid;grid-template-columns:1fr 1fr;gap:7px;font-size:14px}
.profile-view dd{margin:0;text-align:end;overflow-wrap:anywhere}
.profile-team{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.profile-team button{display:grid;justify-items:center;gap:6px;background:#ebf4ff;color:#173c68;border:0;border-radius:13px;padding:12px 4px;font-weight:650}
.profile-personal button{width:100%;min-height:48px;display:flex;gap:12px;align-items:center;background:white;border:0;color:#213d5c;font-weight:650}
.profile-personal button+button{border-top:1px solid #e1eaf2;border-radius:0;color:#9e3542}
.profile-personal button:after{content:'›';margin-left:auto}
.profile-view button svg{color:#2668aa}

button,input,select,textarea,pre,code,kbd,samp{font-family:Sarabun,Tahoma,sans-serif}

.purchase-decision button#pr-return{background:white;color:#a03b4d;border-color:#b64a60}
.report-switch{display:inline-grid;grid-template-columns:repeat(2,1fr);gap:3px;padding:3px;background:#e8eff8;border-radius:13px;margin:3px 0 9px}
.report-switch button{min-width:82px;min-height:40px;padding:4px 12px;border-radius:10px;font-size:15px}
#app .compact-report .purchase-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:8px 10px;min-height:52px}
.compact-report .purchase-row>.d-art,.compact-report .purchase-row>span[aria-hidden]{display:none}
#app .compact-report .bill-text b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;line-height:1.35}
#app .compact-report .bill-numbers strong{font-size:16px;white-space:nowrap}
#app .compact-report h2{font-size:18px}
.compact-report .bill-numbers .pill{font-size:12px}
.transfer-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:9px 0;border-bottom:1px solid #dbe4ef;font-size:15px}
.transfer-line small{grid-column:1/-1;color:#475e78;font-size:13px}

.report-switch.payout-tabs{display:grid;width:100%;grid-template-columns:repeat(4,minmax(0,1fr));box-sizing:border-box}
.report-switch.payout-tabs button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:40px;padding:4px}
.payout-badge{display:inline-grid;place-items:center;background:#bd233a;color:#fff;border-radius:99px;min-width:17px;height:17px;padding:0 4px;font-size:11px;font-weight:bold}
.payout-badge[hidden]{display:none}
.payout-total{display:flex;align-items:center;justify-content:space-between;background:#deedff;border-radius:10px;padding:8px 10px;gap:6px;margin:4px 0 8px}
.payout-list{border:1px solid #d4e1ef;border-radius:14px;background:white;overflow:hidden}
.payout-list>p{padding:0 12px}
#app .payout-row{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto 8px;gap:8px;align-items:center;text-align:start;margin:0;padding:5px 10px;height:clamp(52px,calc((100dvh - 320px - env(safe-area-inset-bottom,0px)) / 7),80px);border:0;border-bottom:1px solid #e4ebf3;border-radius:0;background:white;box-shadow:none}
.payout-row span{min-width:0}
.payout-row b,.payout-row small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.payout-row b{font-size:15px}.payout-row small{font-size:12px;color:#496078}
.payout-row strong{font-size:16px;font-variant-numeric:tabular-nums}.payout-row i{color:#637a95}
#app:has(.payout-tabs) h1{margin:2px 0 4px;font-size:21px}
#app:has(.payout-tabs) h1 .d-art{height:27px;width:27px;object-fit:contain}

#app .payout-row b{font-size:16px;line-height:1.4}
#app .payout-row small{font-size:13px;line-height:1.4;margin-top:3px}
#app .payout-row strong{font-size:17px}

#app .compact-report .report-overview{padding:8px 12px;margin:6px 0}
.report-overview-head,.purchase-list-head,.report-period{display:flex;align-items:center;justify-content:space-between;gap:6px}
.report-period label{display:grid;place-items:center;position:relative;overflow:hidden;margin:0;min-width:90px;min-height:40px;padding:0 10px;border-radius:12px;background:#edf5ff;color:#1a5389;font-size:14px}
.report-period label input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;box-sizing:border-box}
.report-period label:focus-within{outline:2px solid #285fa5}
.report-period button{min-width:40px;min-height:40px}
#app .report-overview .total{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px;margin:3px 0;padding:5px 8px;font-size:15px}
#app .report-overview .total strong{font-size:18px}
.report-breakdown summary{cursor:pointer;font-size:14px;padding:5px 0;color:#31577e}
.purchase-list-head h2{margin:0}
#app .purchase-list-head{margin-bottom:7px}
#app .purchase-list-head button{margin:0;min-height:36px;padding:4px 9px;font-size:14px}
#app .paid-dates{padding:10px 12px}
.paid-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.paid-presets button{min-width:0;min-height:40px;padding:4px 2px;font-size:14px;border-radius:10px}
.paid-presets button[aria-pressed=true]{background:#165cc4;color:white;border-color:#165cc4}
.paid-range-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.paid-dates [hidden]{display:none!important}
.paid-dates label{min-width:0;margin:8px 0 0;font-size:14px}
.paid-dates input{width:100%;min-width:0;box-sizing:border-box;font-size:16px}
.paid-dates small{display:block;margin:7px 0 0;color:#415975}
.voucher-dialog article{background:#fff;border:1px solid #cddbeb;border-top:3px solid #2478cd;padding:clamp(14px,3vw,28px);font:14px/1.5 Sarabun,sans-serif;color:#23394e}
.voucher-heading h2{font-size:22px;margin:0}.voucher-heading p{margin:3px 0;font-size:14px}
.voucher-dialog .voucher-day{padding:9px 0;border-block:1px solid #dbe3ec}
.voucher-dialog .paper-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
.voucher-dialog .paper-grid p{margin:2px 0}
.voucher-dialog article small{font-size:12px;color:#51667a}
.voucher-dialog .summary{width:100%;margin-top:16px;border-collapse:collapse}
.voucher-dialog .summary :is(th,td){padding:7px 6px;text-align:left}
.voucher-dialog .summary :is(th,td):last-child{text-align:right;font-variant-numeric:tabular-nums}
.voucher-dialog .summary th{background:#edf4fb}
.voucher-dialog .signatures{grid-template-columns:repeat(3,minmax(0,1fr));font-size:12px;gap:10px;margin-top:32px}
.voucher-footer{display:grid;gap:7px;text-align:center}
.voucher-footer button{min-height:44px}
.voucher-footer a{font-size:14px}
#paper-message{font-size:13px;color:#315374;overflow-wrap:anywhere}
@media print{.voucher-dialog article{border:0;padding:0}.voucher-dialog .paper-controls{display:none!important}}

.report-switch.payout-tabs button{gap:3px;white-space:nowrap;font-size:clamp(12px,3.5vw,15px)}
