
:root{--bg:#f3f5f4;--paper:#fff;--ink:#163c33;--muted:#62736d;--line:#dce4df;--accent:#b95034;--green:#246b51;--warn:#9a4a1f;--soft:#e6efe9;--red:#a52d32;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);font-size:16px;background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,.button{border:0;border-radius:12px;padding:13px 19px;min-height:48px;font-weight:650;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;transition:background .15s;background:var(--ink);color:#fff}button:hover,.button:hover{filter:brightness(1.12)}button:disabled{opacity:.5;cursor:wait}.secondary{background:var(--soft);color:var(--ink)}.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}.danger{background:#f9e9e7;color:var(--red)}.small{min-height:44px;padding:9px 13px;font-size:.9rem}a{color:var(--green)}:focus-visible{outline:3px solid #dd9946;outline-offset:3px}.shell{max-width:1250px;margin:auto;padding:0 38px 70px}.topbar{display:flex;align-items:center;justify-content:space-between;padding:25px 0;border-bottom:1px solid var(--line);gap:18px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-size:1.25rem;font-weight:800;letter-spacing:-.6px}.brand img{width:39px;height:39px}.brand span small{display:block;font-size:.75rem;color:var(--muted);font-weight:500;letter-spacing:.5px}.top-actions{display:flex;gap:9px;align-items:center}.eyebrow{text-transform:uppercase;letter-spacing:2px;font-size:.78rem;font-weight:700;color:var(--muted)}h1{font-size:clamp(1.9rem,4vw,2.9rem);letter-spacing:-1.4px;line-height:1.12;margin:12px 0}h2{font-size:1.2rem;letter-spacing:-.4px;margin:0 0 18px}h3{font-size:1rem;margin:0 0 8px}p{line-height:1.6}.muted,.hint{color:var(--muted)}.hint{font-size:.88rem;line-height:1.55;margin:8px 0}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:37px 0 28px}.page-head p{margin:10px 0 0}.hero{background:var(--ink);color:#fff;border-radius:22px;display:grid;grid-template-columns:1.4fr 1fr;overflow:hidden;margin-bottom:25px}.hero-main{padding:27px 30px}.hero .eyebrow,.hero .hint{color:#bdcfc5}.hero-number{font-size:2.7rem;font-weight:750;letter-spacing:-1px;margin:8px 0}.hero-sub{display:flex;gap:24px;flex-wrap:wrap;font-size:.9rem}.hero-side{border-left:1px solid #426257;padding:28px;display:grid;gap:16px;align-content:center}.hero-side .value{font-weight:750;font-size:1.35rem;margin-top:5px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:30px}.stat{background:#fff;border:1px solid var(--line);border-radius:15px;padding:19px}.stat .label{font-size:.88rem;color:var(--muted)}.stat .value{font-size:1.45rem;letter-spacing:-.6px;font-weight:750;margin-top:9px;font-variant-numeric:tabular-nums}.stat small{display:block;margin-top:7px;color:var(--muted)}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.filters{display:flex;gap:7px;flex-wrap:wrap}.filters button{border-radius:25px;min-height:42px;padding:8px 17px;background:transparent;color:var(--muted)}.filters button.active{background:var(--ink);color:white}.search{max-width:260px}.card{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:25px;margin-bottom:20px}.fair-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.fair-card{cursor:pointer;margin:0;text-align:left;display:block;color:var(--ink);width:100%;font-weight:400;padding:24px;min-width:0}.fair-card:hover{border-color:#8bab99;filter:none;box-shadow:0 5px 20px #183b3309}.fair-top{display:flex;justify-content:space-between;gap:10px;align-items:center}.badge{border-radius:20px;background:#e9f3ec;color:var(--green);padding:6px 11px;font-size:.8rem;font-weight:650;white-space:nowrap}.badge.closed{background:#edf0ef;color:#5b6b64}.fair-card h2{margin:16px 0 8px;font-size:1.35rem}.fair-bottom{display:flex;justify-content:space-between;border-top:1px solid var(--line);margin-top:20px;padding-top:17px;gap:10px}.fair-bottom strong{display:block;margin-top:4px}.empty{border:1px dashed #b9ccc0;border-radius:20px;text-align:center;padding:48px 20px;background:#f9fcfa}.empty .beads{font-size:2rem;color:var(--accent);letter-spacing:8px}.empty h2{margin:12px 0}.empty p{color:var(--muted);max-width:420px;margin:12px auto 22px}.breadcrumbs{margin-top:25px}.breadcrumbs button{padding:0;min-height:40px;background:none;color:var(--muted);font-weight:500}.detail-head{padding-top:12px}.detail-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr);gap:22px}.quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.quick{min-height:90px;flex-direction:column;background:#edf4ee;color:var(--ink);font-size:.9rem;border:1px solid #dce7df}.quick .symbol{font-size:1.35rem;color:var(--green)}.quick.expense{background:#fbefeb;color:#95472f;border-color:#f0dcd3}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.section-title h2{margin:0}.ledger-row{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid #e7ece9}.ledger-row:last-child{border-bottom:0}.ledger-icon{width:38px;height:38px;background:var(--soft);border-radius:11px;display:grid;place-items:center;flex:none;color:var(--green)}.ledger-row.expense .ledger-icon,.ledger-row.withdrawal .ledger-icon{background:#f9eee9;color:var(--accent)}.ledger-text{flex:1;min-width:0}.ledger-text strong{font-size:.94rem}.ledger-text small{display:block;color:var(--muted);margin-top:4px;font-size:.82rem;overflow-wrap:anywhere}.amount{font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}.ledger-row.expense .amount{color:var(--accent)}.delete{background:none;color:#8d9b93;padding:8px;min-width:44px}.balance-row{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid var(--line);font-size:.93rem}.balance-row strong{white-space:nowrap}.balance-row.emphasis{font-size:1.05rem;font-weight:700;border:0;padding:19px 0 5px}.notice{padding:14px 16px;background:#edf3ee;border:1px solid #d7e5d9;border-radius:12px;font-size:.91rem;line-height:1.55;margin:15px 0}.notice.warn{background:#fff3e5;border-color:#eed8b8;color:#895024}.notice.error{background:#fceceb;color:#a1262d;border-color:#efccc9}.good{color:var(--green)}.bad{color:var(--red)}.full{width:100%}.steps{display:flex;gap:12px;justify-content:space-between;margin:20px 0 0;color:var(--muted);font-size:.82rem}.steps span{flex:1;padding-top:12px;border-top:3px solid #d8e1da}.steps .done{border-color:var(--green);color:var(--green)}label{display:block;font-size:.9rem;font-weight:650;margin:15px 0 7px}input,select,textarea{display:block;width:100%;background:white;border:1px solid #bbcfc2;border-radius:10px;min-height:48px;padding:11px 12px;color:var(--ink)}textarea{resize:vertical;min-height:85px}input[type=checkbox]{width:21px;height:21px;min-height:0;accent-color:var(--green)}.check-label{display:flex;align-items:flex-start;gap:10px;font-weight:500;line-height:1.5}.check-label input{flex:none;margin-top:2px}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.modal-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.modal-head h2{margin:0;font-size:1.5rem}.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:24px;flex-wrap:wrap}.form-error{color:var(--red);font-size:.93rem;line-height:1.5;margin-top:14px}.form-error:empty{display:none}dialog{width:min(620px,calc(100% - 26px));max-height:92dvh;border:0;border-radius:20px;padding:28px;color:var(--ink);box-shadow:0 24px 100px #122c3340}dialog::backdrop{background:#10282088;backdrop-filter:blur(3px)}.close{background:none;color:var(--muted);padding:5px;font-size:1.3rem;min-width:44px}.money-input{position:relative}.money-input input{padding-right:45px}.money-input span{position:absolute;right:13px;top:13px;color:var(--muted)}.login{min-height:100dvh;display:grid;place-items:center;padding:22px;background:radial-gradient(ellipse at 20% 20%,#dceadf,transparent 60%),var(--bg)}.login .card{width:min(430px,100%);padding:35px}.login h1{font-size:2rem;margin-top:30px}.login button[type=submit]{margin-top:22px}.loading{padding:80px;text-align:center}.mobile-add{display:none}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;box-shadow:0 6px 25px #0002;padding:14px 22px;border-radius:12px;z-index:10;max-width:calc(100% - 30px);display:none}#toast.show{display:block}.audit{margin:0;padding-left:20px;color:var(--muted);font-size:.88rem}.audit li{margin:12px 0;line-height:1.5}.audit span{display:block}.denominations{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.denominations label{margin:0;font-size:.83rem}.denominations input{margin-top:5px}.counter{border:1px solid var(--line);border-radius:12px;padding:14px;margin-top:16px}.counter summary{cursor:pointer;font-weight:650;min-height:35px}.settlement-preview{background:#f3f7f4;border-radius:12px;padding:12px 16px;margin-top:17px}.nowrap{white-space:nowrap}.footer{font-size:.82rem;color:var(--muted);margin-top:38px;line-height:1.6}.notes{white-space:pre-wrap;overflow-wrap:anywhere}.negative{color:var(--red)}
@media(max-width:800px){.shell{padding:0 19px 85px}.topbar{padding:18px 0}.brand{font-size:1.1rem}.brand span small{font-size:.68rem}.top-actions .export-label{display:none}.page-head{padding:28px 0 23px;align-items:flex-start}.page-head>button{white-space:nowrap}.hero{grid-template-columns:1fr}.hero-main{padding:23px}.hero-side{grid-template-columns:1fr 1fr;border-left:0;border-top:1px solid #426257;padding:20px 23px;gap:12px}.hero-number{font-size:2.2rem}.stats{grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:24px}.stat{padding:16px}.stat .value{font-size:1.3rem}.fair-grid{grid-template-columns:1fr}.detail-layout{grid-template-columns:1fr}.detail-layout>aside{order:-1}.detail-layout>aside .card.balance{margin-bottom:0}.toolbar{align-items:stretch;flex-direction:column}.search{max-width:none}.card{padding:20px}.detail-head{flex-wrap:wrap}.detail-head .top-actions{width:100%}.quick-grid{grid-template-columns:repeat(3,1fr)}.quick{padding:12px 6px}.footer{margin-top:25px}dialog{padding:22px}.denominations{grid-template-columns:repeat(3,1fr)}h1{letter-spacing:-1px}.balance-compact{display:none}.top-actions{gap:6px}}
@media(max-width:420px){.shell{padding-left:14px;padding-right:14px}.top-actions button{padding:9px}.brand img{width:33px;height:33px}.page-head{gap:9px}.page-head>button{padding:12px}.field-grid{grid-template-columns:1fr}.hero-sub{gap:14px}.fair-card{padding:20px}.ledger-row{gap:8px}.ledger-icon{width:30px;height:34px}.amount{font-size:.9rem}.steps{gap:7px}.brand span small{display:none}}
@media print{.topbar,.quick-grid,button,.breadcrumbs,.footer,.filters,.toolbar{display:none!important}.shell{max-width:none;padding:0}.detail-layout,.fair-grid{display:block}.card,.hero,.stat{break-inside:avoid;box-shadow:none}.hero{color:black;background:white;border:1px solid #ccc}.hero .hint,.hero .eyebrow{color:#444}body{background:white}.hero-side{border-color:#ccc}}

/* Keep phone navigation within the screen and recording ahead of the ledger. */
@media(max-width:800px){
 .detail-layout>section,.detail-layout>aside{display:contents}
 .quick-card{order:0}.balance{order:1}.ledger-card{order:2}.notes-card{order:3}.audit-card{order:4}
 .detail-layout>aside .card.balance{margin-bottom:0}
 .detail-layout>.notice{order:0}
}
@media(max-width:520px){
 .topbar{flex-wrap:wrap;gap:12px}.topbar .top-actions{width:100%;display:grid;grid-template-columns:1fr 1fr 1fr}
 .topbar .top-actions .button,.topbar .top-actions button{padding:9px 6px;font-size:.85rem}
 .page-head:not(.detail-head){flex-direction:column}.page-head:not(.detail-head)>button{width:100%}
 .hero-sub{flex-direction:column;gap:7px}.stat{min-width:0}.stat .value{overflow-wrap:anywhere}
 .fair-top{flex-wrap:wrap}.denominations{grid-template-columns:repeat(2,1fr)}
}

/* Tablet point of sale */
[hidden]{display:none!important}.shell{max-width:1440px}.topbar{flex-wrap:wrap}.topbar .top-actions{flex-wrap:wrap}.footer-links{display:flex;gap:22px;margin-top:12px}.pos-top{display:flex;justify-content:space-between;gap:18px;padding:30px 0 20px;align-items:center}.pos-top h1{font-size:clamp(1.6rem,3vw,2.4rem)}.connection{font-size:.86rem;color:var(--green);margin-top:12px}.connection:before{content:'';display:inline-block;width:7px;height:7px;background:#318363;border-radius:50%;margin-right:8px}.connection.offline{color:var(--red)}.connection.offline:before{background:var(--red)}.till-totals{display:flex;flex-wrap:wrap;gap:14px 28px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:15px 0;margin-bottom:24px;font-size:.88rem;color:var(--muted)}.till-totals strong{color:var(--ink);margin-left:5px}.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) 355px;gap:25px;align-items:start}.category-tabs{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:27px}.category-tab{padding:11px 16px;color:var(--muted);background:white;border:1px solid var(--line);border-radius:14px;min-height:58px;font-size:.95rem}.category-tab.selected{border-color:var(--ink);background:var(--ink);color:white}.category-bead{font-size:1.55rem;line-height:1}.bead-0{color:#d59475}.bead-1{color:#c3a2cb}.bead-2{color:#93b8a7}.bead-3{color:#dab879}.product-panel-heading{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:14px}.product-panel-heading h2{margin:0;font-size:1.35rem}.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.product-tile{min-height:192px;position:relative;border:1px solid #dce5df;background:white;color:var(--ink);border-radius:18px;display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;text-align:left;padding:20px;box-shadow:0 4px 14px #173e3504}.product-tile:active{transform:scale(.98);background:#edf5ef}.product-ornament{font-size:3rem;color:#ba9878;line-height:1;margin-bottom:19px;font-weight:400}.product-name{font-size:1rem;line-height:1.4}.product-tile strong{font-size:1.5rem;letter-spacing:-.7px;margin-top:7px}.product-plus{position:absolute;right:14px;top:16px;width:31px;height:31px;display:grid;place-items:center;background:var(--soft);color:var(--green);border-radius:50%;font-size:1.2rem}.cart-panel{background:white;border:1px solid var(--line);border-radius:20px;overflow:hidden;position:sticky;top:18px}.cart-heading{display:flex;justify-content:space-between;padding:23px;border-bottom:1px solid var(--line);align-items:center}.cart-heading h2{font-size:1.2rem;margin:7px 0 0}.cart-count{width:36px;height:36px;border-radius:50%;background:var(--soft);display:grid;place-items:center;font-weight:700}.cart-lines{padding:0 21px;max-height:44dvh;overflow:auto;min-height:230px}.cart-item{padding:18px 0;border-bottom:1px solid var(--line)}.cart-item-head{display:flex;justify-content:space-between;gap:10px;font-size:.95rem}.cart-item-head>span{white-space:nowrap;font-weight:700}.cart-item-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:10px;color:var(--muted);font-size:.85rem;gap:10px}.quantity-control{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;overflow:hidden;gap:2px}.quantity-control button{background:#f4f7f4;color:var(--ink);padding:5px;min-height:42px;width:42px;border-radius:0;font-size:1.1rem}.quantity-control strong{min-width:25px;text-align:center}.cart-checkout{padding:22px;background:#f9fbf9}.cart-total{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:20px}.cart-total strong{font-size:2rem;letter-spacing:-1px;white-space:nowrap}.checkout-button{width:100%;min-height:60px;font-size:1.1rem;margin-bottom:9px;border-radius:13px}.empty-cart{text-align:center;color:var(--muted);padding:42px 10px}.empty-cart>span{font-size:2.9rem;color:#c0a488}.empty-cart h3{color:var(--ink);margin-top:15px}.empty-cart p{font-size:.9rem}.till-start{max-width:570px;margin:10px auto 30px;padding:32px}.pos-intro-art{font-size:2.8rem;letter-spacing:9px;color:#b08f6e;margin-bottom:15px}.pay-total{background:var(--ink);color:white;text-align:center;border-radius:15px;padding:23px;margin-top:20px}.pay-total>span{display:block;color:#cadbd1;font-size:.9rem}.pay-total strong{display:block;font-size:2.8rem;letter-spacing:-1px;margin-top:7px}.payment-methods{display:flex;gap:10px;margin-top:16px}.method-option{display:flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:17px;flex:1;margin:0;cursor:pointer}.method-option input{width:22px;min-height:22px;margin:0;accent-color:var(--green)}.cash-shortcuts{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.cash-shortcuts button{font-size:.9rem;min-height:45px;padding:10px 14px}.change-due{display:flex;justify-content:space-between;align-items:center;border:1px solid #bfd6c8;background:#eef7f0;border-radius:13px;padding:18px;margin-top:17px;font-size:1.1rem}.change-due strong{font-size:1.65rem}.receipt{max-width:360px;margin:20px auto;background:#fffef9;border:1px solid #e6e1d5;padding:26px;color:#20362c}.receipt-brand{font-weight:800;text-align:center;letter-spacing:1px;font-size:1.2rem}.receipt h2{text-align:center;margin:13px 0 7px;font-size:1rem}.receipt>p{text-align:center;font-size:.85rem}.receipt-items{border-top:1px dashed #b8c2b6;border-bottom:1px dashed #b8c2b6;padding:12px 0}.receipt-items>div{display:flex;justify-content:space-between;gap:10px;padding:9px 0;font-size:.9rem}.receipt-items small{display:block;margin-top:4px;color:var(--muted)}.receipt-total{display:flex;justify-content:space-between;gap:10px;margin-top:20px;font-size:1.2rem;font-weight:700}.receipt-thanks{text-align:center;border-top:1px dashed #b8c2b6;padding-top:18px;font-size:.9rem}.receipt-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.receipt-list-row,.catalog-row{display:flex;text-align:left;justify-content:space-between;gap:18px;width:100%;color:var(--ink);background:white;border-radius:0;border-bottom:1px solid var(--line);padding:18px 0;font-weight:400}.receipt-list-row small,.catalog-row small{display:block;color:var(--muted);margin-top:7px;font-size:.85rem}.catalog-row>strong,.receipt-list-row>strong{white-space:nowrap}.user-row{display:flex;align-items:center;gap:15px;padding:18px 0;border-bottom:1px solid var(--line)}.user-row>div:nth-child(2){flex:1}.user-row small{display:block;color:var(--muted);font-size:.85rem;margin-top:6px}.user-avatar{width:44px;height:44px;background:var(--soft);border-radius:50%;display:grid;place-items:center;font-weight:750}.account-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.account-save{margin-top:25px}.mfa-secret{font-family:monospace;font-size:1.1rem;letter-spacing:1px;background:var(--soft);border:1px solid var(--line);padding:20px;border-radius:12px;overflow-wrap:anywhere;user-select:all}
@media(max-width:1100px){.pos-layout{grid-template-columns:minmax(0,1fr) 320px;gap:18px}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-tile{min-height:175px}.pos-top{flex-wrap:wrap}.cart-total strong{font-size:1.7rem}.shell{padding-left:22px;padding-right:22px}.topbar .top-actions{gap:6px}}
@media(max-width:700px){.pos-layout{grid-template-columns:1fr}.cart-panel{position:static}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-tile{min-height:150px;padding:16px}.product-ornament{font-size:2.2rem;margin-bottom:12px}.product-tile strong{font-size:1.3rem}.product-panel-heading{flex-wrap:wrap}.category-tabs{gap:7px;margin-bottom:20px}.category-tab{padding:10px 12px;min-height:50px}.cart-lines{max-height:none;min-height:100px}.pos-top .top-actions{flex-wrap:wrap;width:100%}.till-totals{gap:10px;font-size:.85rem}.account-grid{grid-template-columns:1fr}.topbar .top-actions{display:flex;flex-wrap:wrap}.topbar .top-actions>*{flex:1 0 auto}.catalog-row{gap:10px;flex-wrap:wrap}.user-row{flex-wrap:wrap}.user-row>div:nth-child(2){min-width:150px}.cart-total strong{font-size:2rem}.shell{padding-left:14px;padding-right:14px}.cart-panel{margin-bottom:20px}}
@media print{body:has(dialog[open]) .shell,body:has(dialog[open]) #toast{display:none!important}dialog[open]{position:static;display:block;max-height:none;width:100%;border:0;box-shadow:none;padding:0}dialog[open] .modal-head,dialog[open] .modal-actions,dialog[open] .receipt-actions{display:none!important}dialog::backdrop{display:none}.receipt{border:0;margin:0 auto;max-width:80mm;padding:10px;color:black}.receipt .hint{display:none}}
