:root{font-family:system-ui,sans-serif;color:#261b2e;background:#f6f3f8;line-height:1.45;--plum:#392648;--edge:#ded3e5;--wash:#f4eff7}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
header{background:var(--plum);color:white;display:flex;align-items:center;justify-content:space-between;padding:13px max(16px,calc((100vw - 740px)/2));gap:16px}
.brand{display:flex;align-items:center;gap:12px;letter-spacing:.01em}
.mark{border:1px solid #a995b4;border-radius:12px;padding:8px;font-weight:750}
small{display:block;color:#685773}
header small{color:#e3d5eb}
main{max-width:744px;margin:0 auto;padding:18px 14px 32px}
.panel{background:white;border:1px solid var(--edge);border-radius:16px;padding:18px;box-shadow:0 3px 12px #3926480c}
.login{max-width:420px;margin:5vh auto 0}
h1,h2,p{margin:0 0 12px}
h1{font-size:1.44rem}
h2{font-size:1.12rem;overflow-wrap:anywhere;margin:0}
form,label{display:grid;gap:9px}
form{margin:10px 0}
label{font-weight:640}
input,select,button{font:inherit;min-height:43px;border-radius:9px}
input,select{width:100%;color:inherit;border:1px solid #bcaec7;background:white;padding:8px 10px}
button{cursor:pointer;font-weight:700;border:1px solid transparent;background:var(--plum);color:white;padding:8px 13px}
button:disabled{opacity:.5;cursor:wait}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #a68ab9;outline-offset:2px}
.secondary,.quiet{background:white;color:var(--plum);border-color:var(--edge)}
.login button,.login #demo,#camera{width:100%}
.location{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:9px;margin-bottom:10px}
.location label{flex:1;max-width:300px}
.badge{color:#55316e;background:#ecdef3;padding:6px 9px;border-radius:8px;font-weight:700;font-size:.85rem}
nav{display:flex;gap:4px;margin-bottom:10px;flex-wrap:wrap}
.tab{flex:1;border-color:var(--edge);color:var(--plum);background:#fff;padding-inline:7px}
.tab[aria-current]{background:var(--plum);color:#fff;border-color:var(--plum)}
#status{position:sticky;top:0;z-index:2;padding:10px 12px;border-radius:9px;background:#e9f3ea;color:#224a33}
#status[data-error=true]{background:#fbe8e8;color:#782530}
.stock-card{margin-top:15px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-radius:9px;background:var(--wash)}
.stock-card strong{display:block;font-size:1.4rem;text-align:right}
.buttons{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.buttons>*{flex:1}
.heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.heading h1{margin:0}
ul{list-style:none;padding:0;margin:14px 0 0}
li{border-top:1px solid var(--edge);padding:10px 2px;overflow-wrap:anywhere}
li button{display:block;text-align:left;width:100%;color:inherit;background:transparent;padding:4px}
nav .tab{flex:1 0 29%}
#saleCamera,#saveSale,#retrySale{width:100%}
#saleScanForm label{flex:2 1 199px;min-width:0}
#saleScanForm button{flex:1 1 auto}
.cart-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:start}
.cart-item .line-price{text-align:right}
.cart-item .line-actions{display:flex;justify-content:space-between;gap:12px;align-items:end;grid-column:1/-1}
.cart-item .line-actions input{width:75px}
.cart-item .line-actions button{width:auto;background:#fff;color:var(--plum);border:1px solid var(--edge);padding:8px 12px}
.sale-total{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:16px 0;padding:12px;background:var(--wash);border-radius:9px}
.sale-total strong{font-size:1.4rem}
#reportScope select{width:100%}
.receipt-lines{margin-top:6px}
#reportFilters{display:grid;gap:10px;margin:0;padding:12px;border:1px solid var(--edge);border-radius:9px;min-width:0}
#reportFinance{background:var(--wash);border-radius:9px;padding:10px;white-space:pre-line}
.report-finance-detail{white-space:pre-line}
