:root{--nav:#102c29;--nav2:#163934;--ink:#172520;--muted:#73807b;--bg:#f4f6f2;--panel:#fff;--line:#e4e9e3;--green:#16725b;--green2:#dff2e9;--orange:#d97032;--orange2:#fff0e5;--red:#b84c44;--shadow:0 18px 45px rgba(25,50,41,.08)}
*{box-sizing:border-box}body{margin:0;font-family:"DM Sans",sans-serif;background:var(--bg);color:var(--ink)}button,input,textarea,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}.eyebrow{font-size:10px;letter-spacing:.16em;font-weight:800;color:var(--green);margin-bottom:7px}.eyebrow.light{color:#9ecbc0}.brand-mark{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:var(--green);color:#fff;font:800 20px Manrope}.brand-mark.large{width:56px;height:56px;border-radius:17px;background:#e0f3ea;color:#15483d}
.login-view{min-height:100vh;display:grid;grid-template-columns:1.1fr .9fr;background:#fff}.login-art{background:radial-gradient(circle at 75% 18%,#28564e 0 1px,transparent 2px),linear-gradient(145deg,#0f2e2a,#173c36);background-size:20px 20px,auto;color:#fff;padding:9vh 9vw;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}.login-art:after{content:"";position:absolute;width:440px;height:440px;border:1px solid rgba(255,255,255,.1);border-radius:50%;right:-170px;bottom:-150px;box-shadow:0 0 0 70px rgba(255,255,255,.025),0 0 0 140px rgba(255,255,255,.018)}.login-art h1{font:800 clamp(48px,6vw,84px)/1.02 Manrope;margin:10px 0 24px;letter-spacing:-.07em}.login-art p{color:#aec8c1;font-size:17px;max-width:460px;line-height:1.6}.login-stat{position:relative;z-index:1;display:grid;grid-template-columns:auto 1fr;column-gap:14px;width:max-content;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:16px;padding:15px 18px;backdrop-filter:blur(10px)}.login-stat span{grid-row:span 2;background:#e0f3ea;color:#15483d;border-radius:8px;padding:11px;font-weight:800}.login-stat small{color:#9eb9b2}.login-card{width:min(410px,80%);margin:auto;display:grid;gap:19px}.login-card h2{font:800 34px Manrope;margin:24px 0 6px;letter-spacing:-.04em}.login-card p{margin:0;color:var(--muted)}label{display:grid;gap:7px;font-size:12px;font-weight:700;color:#53605b}input,select,textarea{border:1px solid var(--line);border-radius:10px;padding:12px 13px;background:#fff;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus{border-color:#62a590;box-shadow:0 0 0 3px rgba(22,114,91,.08)}.primary{border:0;border-radius:10px;background:var(--green);color:#fff;padding:12px 16px;font-weight:800}.wide{width:100%;display:flex;justify-content:space-between}.form-error{font-size:12px;color:var(--red);min-height:18px}
.app{min-height:100vh;display:grid;grid-template-columns:236px 1fr}.sidebar{position:fixed;inset:0 auto 0 0;width:236px;background:var(--nav);color:#fff;padding:24px 14px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:11px;padding:0 8px 25px;border-bottom:1px solid rgba(255,255,255,.08)}.brand strong{display:block;font:800 15px Manrope}.brand span{font-size:10px;color:#9dbab3;text-transform:uppercase;letter-spacing:.12em}.sidebar nav{display:grid;gap:5px;padding-top:22px}.sidebar nav button,.logout{border:0;background:transparent;color:#a9c1bb;text-align:left;padding:11px 13px;border-radius:9px;font-weight:600}.sidebar nav button i{display:inline-grid;width:26px;font-style:normal;font-size:17px}.sidebar nav button:hover,.sidebar nav button.active{background:rgba(255,255,255,.08);color:#fff}.sidebar-foot{margin-top:auto;display:grid;gap:13px}.erp-badge{display:flex;gap:9px;align-items:center;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.04);border-radius:11px;padding:10px}.erp-badge>span{width:8px;height:8px;background:#f0a56c;border-radius:50%;box-shadow:0 0 0 4px rgba(240,165,108,.1)}.erp-badge.live>span{background:#64d19d}.erp-badge strong,.erp-badge small{display:block;font-size:10px}.erp-badge small{color:#8facaa;margin-top:2px}.logout{border:1px solid rgba(255,255,255,.09);text-align:center}.app main{grid-column:2;min-width:0}.app header{height:82px;background:rgba(255,255,255,.83);backdrop-filter:blur(15px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px;position:sticky;top:0;z-index:10}.app header h2{font:800 20px Manrope;margin:0;letter-spacing:-.04em}.header-actions{display:flex;gap:10px}.icon-button,.avatar,.menu-btn{border:1px solid var(--line);background:#fff;border-radius:10px;width:39px;height:39px}.avatar{background:var(--nav);color:#fff;border:0;font-size:11px;font-weight:800}.menu-btn{display:none}.content{padding:28px 32px 50px;max-width:1500px;margin:auto}.section-head{display:flex;align-items:end;justify-content:space-between;gap:15px;margin-bottom:20px}.section-head h1{font:800 29px Manrope;letter-spacing:-.05em;margin:0 0 4px}.section-head p{margin:0;color:var(--muted);font-size:13px}.button-row{display:flex;gap:9px}.secondary{border:1px solid var(--line);background:#fff;border-radius:9px;padding:10px 13px;font-weight:700;color:#44514c}
.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:22px}.metric{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;box-shadow:0 5px 20px rgba(25,50,41,.025)}.metric-top{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;font-weight:700}.metric-icon{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;background:var(--green2);color:var(--green);font-size:16px}.metric h3{font:800 26px Manrope;letter-spacing:-.05em;margin:18px 0 4px}.metric p{font-size:11px;color:var(--muted);margin:0}.metric.warn .metric-icon{background:var(--orange2);color:var(--orange)}.dashboard-grid{display:grid;grid-template-columns:1.6fr .9fr;gap:18px}.panel{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 5px 20px rgba(25,50,41,.025);overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:18px 19px;border-bottom:1px solid var(--line)}.panel-head h3{font:800 15px Manrope;margin:0}.panel-head span{font-size:11px;color:var(--muted)}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:15px}.quick{border:1px solid var(--line);background:#fafcf9;border-radius:11px;padding:17px;text-align:left;color:var(--ink)}.quick b{display:block;font-size:19px;color:var(--green);margin-bottom:15px}.quick strong,.quick small{display:block}.quick small{color:var(--muted);font-size:10px;margin-top:3px}.activity{padding:4px 18px}.activity-row{display:grid;grid-template-columns:37px 1fr auto;gap:10px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.activity-row:last-child{border:0}.activity-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--green2);color:var(--green);font-size:12px;font-weight:800}.activity-row strong,.activity-row small{display:block}.activity-row strong{font-size:12px}.activity-row small{font-size:10px;color:var(--muted);margin-top:3px}.activity-row b{font-size:12px}
.toolbar{display:flex;justify-content:space-between;gap:12px;margin-bottom:15px}.search{position:relative;min-width:300px}.search input{width:100%;padding-left:37px}.search span{position:absolute;left:13px;top:11px;color:var(--muted)}.pager{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px}.pager .secondary{padding:8px 11px}.secondary:disabled{opacity:.45;cursor:not-allowed}.source-pill,.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;background:var(--green2);color:var(--green);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;min-width:850px}.data-table th{background:#f8faf7;color:#7a8781;text-transform:uppercase;letter-spacing:.08em;font-size:9px;text-align:left;padding:11px 16px;border-bottom:1px solid var(--line)}.data-table td{padding:13px 16px;border-bottom:1px solid var(--line);font-size:12px}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#fbfcfa}.product-name strong,.customer-name strong{display:block}.product-name span,.customer-name span{font-size:10px;color:var(--muted)}.stock-pill{display:inline-flex;min-width:55px;justify-content:center;padding:5px 8px;border-radius:999px;background:var(--green2);color:var(--green);font-weight:800;font-size:10px}.stock-pill.low{background:var(--orange2);color:var(--orange)}.stock-pill.out{background:#f9e9e8;color:var(--red)}.row-action{border:1px solid var(--line);background:#fff;border-radius:7px;padding:6px 9px;font-size:10px;font-weight:800}.balance.due{color:var(--red);font-weight:800}.balance.advance{color:var(--green);font-weight:800}.empty{padding:40px;text-align:center;color:var(--muted)}
.sale-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(480px,34vw);gap:18px;align-items:start}.sale-left{display:grid;gap:16px;min-width:0}.selection-card{padding:18px}.selected-customer{display:flex;justify-content:space-between;gap:15px;align-items:center;background:#f7faf7;border:1px solid var(--line);border-radius:11px;padding:13px}.selected-customer h3{font:800 14px Manrope;margin:0}.selected-customer p{font-size:10px;color:var(--muted);margin:4px 0 0}.cart{position:sticky;top:105px;min-width:0}.cart-lines{max-height:520px;overflow:auto;padding:4px 17px}.cart-line{display:grid;grid-template-columns:1fr 65px 30px;gap:8px;padding:13px 0;border-bottom:1px solid var(--line)}.cart-line strong,.cart-line small{display:block}.cart-line strong{font-size:11px}.cart-line small{font-size:9px;color:var(--muted);margin-top:3px}.cart-line input{padding:7px;width:100%;font-size:11px}.remove{border:0;background:transparent;color:var(--red)}.totals{padding:16px 18px;background:#fafcf9;border-top:1px solid var(--line);display:grid;gap:8px}.total-row{display:flex;justify-content:space-between;color:var(--muted);font-size:11px}.total-row.grand{color:var(--ink);font:800 17px Manrope;border-top:1px dashed #cad2cc;padding-top:12px}.cart-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:0 18px 18px}.cart-actions button:last-child{grid-column:span 2}.notes{margin:0 18px 14px;width:calc(100% - 36px);min-height:65px}
.billing-grid{grid-template-columns:1.2fr 1.2fr .8fr}.billing-modal-form{grid-template-columns:minmax(0,1fr) minmax(560px,42vw);gap:12px}.billing-modal-form .selection-card{padding:12px}.billing-modal-form .panel-head{padding:12px 14px}.billing-modal-form .cart-lines{max-height:62vh}.target-summary{padding:10px 18px;border-bottom:1px solid var(--line);background:#fafcf9}.inline-head{padding:0 0 14px;border-bottom:0}.padded-toolbar{padding:14px 18px;margin:0;border-bottom:1px solid var(--line)}.billing-history-toolbar{align-items:center;margin-bottom:0}.history-filters{display:grid;grid-template-columns:140px 140px minmax(160px,1fr) minmax(210px,1fr);gap:8px;align-items:end}.history-filters input,.history-filters select{padding:9px}.bill-history-list{display:grid;gap:9px;padding:12px}.bill-history-card{display:grid;grid-template-columns:1fr 1.4fr .35fr .75fr .55fr .55fr auto;gap:10px;align-items:center;border:1px solid var(--line);border-radius:12px;background:#fff;padding:12px}.bill-history-card strong,.bill-history-card small{display:block}.bill-history-card small{color:var(--muted);font-size:9px}.save-status{padding:0 18px 10px;min-height:26px}.lookup-results{display:grid;gap:8px;margin-top:12px;max-height:300px;overflow:auto}.lookup-row{border:1px solid var(--line);background:#fafcf9;border-radius:10px;padding:11px;text-align:left;color:var(--ink)}.lookup-row strong,.lookup-row small{display:block}.lookup-row small{color:var(--muted);font-size:10px;margin-top:3px}.product-result{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.product-result-actions{display:flex;align-items:center;gap:5px}.product-result-actions button{border:1px solid var(--line);background:#fff;border-radius:999px;width:30px;height:30px;font-size:9px;font-weight:800}.product-result-actions .row-action{width:auto;border-radius:8px;padding:7px 9px}.product-result-actions button:disabled{opacity:.45;cursor:not-allowed}.empty.small{padding:14px;font-size:11px}.customer-billing-card{display:grid;grid-template-columns:1.2fr 2fr auto;gap:12px;align-items:center;width:100%}.customer-billing-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.customer-billing-metrics span{background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px}.customer-billing-metrics small,.payment-box small{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.07em}.customer-billing-metrics strong{font-size:11px}.history-box{margin-top:14px;border-top:1px solid var(--line);padding-top:14px}.history-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:260px;overflow:auto}.history-row{min-height:76px}.near-badge{display:inline-flex;vertical-align:middle;margin-left:6px;border-radius:999px;padding:3px 7px;background:var(--orange2);color:var(--orange);font-size:9px;font-weight:800;white-space:nowrap}.billing-line{display:grid;gap:8px;padding:13px 0;border-bottom:1px solid var(--line);min-width:0}.billing-line.stock-warning{background:#fff8f1;margin:0 -10px;padding:13px 10px;border-radius:10px}.billing-line-title{display:flex;justify-content:space-between;gap:10px}.billing-line-title strong{font-size:12px}.billing-line small,.billing-line-foot span{font-size:10px;color:var(--muted)}.billing-line-grid{display:grid;grid-template-columns:.55fr .95fr .72fr .72fr .72fr .55fr;gap:7px}.billing-line-grid label{font-size:9px}.billing-line-grid input,.billing-line-grid select{padding:7px;font-size:11px;min-width:0}.billing-line-foot{display:flex;justify-content:space-between;gap:10px;align-items:center}.button-row.mini{gap:5px;flex-wrap:wrap}.button-row.mini .row-action{font-size:9px;padding:5px 7px}.clear-remove{border:1px solid #f0cfca;background:#fff7f6;border-radius:7px;padding:5px 8px;font-size:9px;font-weight:800}.payment-box{margin:0 18px 14px;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fafcf9;display:grid;gap:9px}.payment-title{display:flex;justify-content:space-between;align-items:center}.payment-options{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.payment-options button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 5px;font-size:10px;font-weight:800}.payment-options button.active{background:var(--green);border-color:var(--green);color:#fff}.compact-table{min-width:0}.secondary[href]{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.document-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.document-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:17px;display:grid;gap:14px}.document-card-top{display:flex;justify-content:space-between}.document-card h3{font:800 14px Manrope;margin:0}.document-card p{margin:4px 0 0;color:var(--muted);font-size:10px}.document-card strong{font:800 18px Manrope}.document-card .button-row button{flex:1}.status-pill.open{background:var(--orange2);color:var(--orange)}.status-pill.converted{background:#eef0ef;color:#78827e}
.modal-shell{position:fixed;inset:0;background:rgba(8,28,24,.55);z-index:50;display:grid;place-items:center;padding:25px;backdrop-filter:blur(5px)}.modal{width:min(900px,96vw);max-height:90vh;background:#fff;border-radius:16px;box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column}.modal-head{flex:0 0 auto;background:#fff;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line)}.modal-head h3{margin:0;font:800 17px Manrope}.modal-close{border:0;background:#f1f4f1;border-radius:8px;width:32px;height:32px}.modal-body{padding:20px;overflow:auto;min-height:0;-webkit-overflow-scrolling:touch}.customer-summary{display:grid;grid-template-columns:1fr repeat(3,auto);gap:24px;background:#f7faf7;border:1px solid var(--line);padding:16px;border-radius:12px;margin-bottom:18px}.customer-summary strong,.customer-summary small{display:block}.customer-summary small{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:5px}.invoice-paper{padding:28px}.invoice-title{display:flex;justify-content:space-between;border-bottom:2px solid var(--nav);padding-bottom:18px;margin-bottom:20px}.invoice-title h2{font:800 27px Manrope;margin:0}.invoice-title p{margin:4px 0;color:var(--muted);font-size:11px}.invoice-meta{text-align:right}.invoice-total{margin-left:auto;width:260px;display:grid;gap:8px;margin-top:16px}.toast{position:fixed;right:25px;bottom:25px;background:var(--nav);color:#fff;border-radius:10px;padding:12px 16px;z-index:80;font-size:11px;box-shadow:var(--shadow)}
@media(max-width:1100px){.metrics{grid-template-columns:repeat(2,1fr)}.dashboard-grid,.sale-layout{grid-template-columns:1fr}.cart{position:static}.document-cards{grid-template-columns:repeat(2,1fr)}.bill-history-card{grid-template-columns:1fr 1fr 1fr}.history-filters{grid-template-columns:1fr 1fr 1.4fr}.customer-billing-card{grid-template-columns:1fr}.customer-billing-metrics{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.login-view{grid-template-columns:1fr}.login-art{display:none}.login-card{min-height:100vh;align-content:center}.app{display:block}.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:translateX(0)}.app main{display:block}.app header{padding:0 16px}.menu-btn{display:block}.header-actions .icon-button{display:none}.content{padding:20px 14px}.metrics,.document-cards,.billing-grid,.history-filters,.customer-billing-metrics,.history-list{grid-template-columns:1fr}.dashboard-grid{grid-template-columns:1fr}.toolbar,.section-head,.billing-history-toolbar{align-items:stretch;flex-direction:column}.search{min-width:0}.sale-layout{display:block}.customer-summary{grid-template-columns:1fr 1fr}.cart{margin-top:16px}.billing-line-grid,.bill-history-card,.product-result{grid-template-columns:1fr}.product-result-actions{justify-content:flex-start;flex-wrap:wrap}.payment-options{grid-template-columns:1fr 1fr}.billing-line-foot{display:grid}.data-table{min-width:0}}
@media print{body>*{display:none!important}#modal{display:block!important;position:static;background:#fff;padding:0}.modal{box-shadow:none;max-height:none;width:100%}.modal-head{display:none}.invoice-paper{display:block}.invoice-paper .row-action{display:none}}
.sidebar nav a{border:0;background:transparent;color:#a9c1bb;text-align:left;padding:11px 13px;border-radius:9px;font-weight:600;text-decoration:none}.sidebar nav a i{display:inline-grid;width:26px;font-style:normal;font-size:17px}.sidebar nav a:hover,.sidebar nav a.active{background:rgba(255,255,255,.08);color:#fff}
.chart-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding:16px}.chart-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-card{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fafcf9;text-align:center}.chart-card h3{font:800 13px Manrope;margin:10px 0}.pie{width:130px;height:130px;border-radius:50%;margin:auto;position:relative}.pie:after{content:"";position:absolute;inset:28px;background:#fff;border-radius:50%}.chart-legend{display:grid;gap:6px;text-align:left}.chart-legend div{display:grid;grid-template-columns:8px 1fr auto;gap:6px;align-items:center;font-size:9px}.chart-legend i{width:8px;height:8px;border-radius:50%}.segment-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.segment-grid .panel{max-height:520px}.segment-grid .table-wrap{overflow:auto}
@media(max-width:1200px){.chart-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.chart-grid,.segment-grid{grid-template-columns:1fr}}
.link-button{border:0;background:transparent;color:var(--green);font-weight:800;text-align:center;padding:4px}.muted{color:var(--muted);font-size:12px;line-height:1.5}.form-grid{display:grid;gap:14px}.form-grid.padded{padding:18px}.check-row{display:flex;align-items:center;gap:8px;color:var(--ink);font-size:12px}.check-row input{width:auto}.branch-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:9px;max-height:210px;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:10px;background:#fafcf9}.admin-grid{display:grid;grid-template-columns:360px 1fr;gap:18px;align-items:start}.admin-form{position:sticky;top:104px}@media(max-width:1100px){.admin-grid{grid-template-columns:1fr}.admin-form{position:static}}@media(max-width:760px){.branch-checks{grid-template-columns:1fr}}

.history-filters{grid-template-columns:140px 140px minmax(210px,1fr) minmax(190px,1fr)}
.customer-billing-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.branch-balance-list{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}.branch-balance-list span{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 10px}.branch-balance-list small{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.06em;margin-right:6px}.branch-balance-list strong{font-size:11px}
.schedule-badge{display:inline-flex;vertical-align:middle;margin-left:6px;border-radius:999px;padding:3px 7px;background:#e8eefb;color:#3f5f99;font-size:9px;font-weight:800;white-space:nowrap}
.billing-line.margin-warn{background:#fffbea;margin:0 -10px;padding:13px 10px;border-radius:10px}
.billing-line.margin-danger{background:#fff0ef;margin:0 -10px;padding:13px 10px;border-radius:10px}
.line-error{color:#b42318!important;font-weight:800}
.target-flash{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:16px 18px;background:linear-gradient(135deg,#0f6f59,#22a174 55%,#f2a13a);color:#fff}.target-flash div{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.28);border-radius:16px;padding:16px 17px;box-shadow:0 14px 30px rgba(16,44,41,.2)}.target-flash small{display:block;text-transform:uppercase;letter-spacing:.09em;font-size:10px;opacity:.86;font-weight:800}.target-flash strong{display:block;font:900 28px Manrope;margin-top:4px;letter-spacing:-.05em;text-shadow:0 2px 10px rgba(0,0,0,.15)}
.form-grid .span-2{grid-column:span 2}
.modal:has(.billing-modal-form){width:calc(100vw - 28px);max-width:none;height:calc(100vh - 28px);max-height:none;border-radius:14px}
.modal:has(.billing-modal-form) .modal-body{flex:1 1 auto;height:auto;overflow:auto;padding:14px;overscroll-behavior:contain}
.modal-shell.child{z-index:70;background:rgba(8,28,24,.35)}
.billing-modal-form .cart{top:0}
.billing-readonly{filter:saturate(.85)}
.receipt-paper{width:320px;margin:0 auto;padding:12px 10px;background:#fff;color:#000;font:11px/1.25 "Courier New",monospace}
.receipt-head{text-align:center}.receipt-head h2{font:800 15px "Courier New",monospace;margin:0 0 2px}.receipt-head p{margin:1px 0;color:#000;font-size:10px}.receipt-head strong{display:block;margin:3px 0;font-size:12px}
.receipt-rule{border-top:1px dashed #000;margin:5px 0}
.receipt-grid{display:grid;grid-template-columns:1fr 43px 45px 48px 54px;gap:3px;align-items:start;font-size:9px}.receipt-grid span:nth-child(n+2){text-align:right}.receipt-grid-head{font-weight:800;font-size:9px}
.receipt-item{padding:2px 0}.receipt-item strong{display:block;font-size:10px}.receipt-item small{display:block;font-size:8.5px;color:#000}
.receipt-totals{display:grid;gap:2px}.receipt-totals div{display:flex;justify-content:space-between;font-size:10px}.receipt-net{border-top:1px dashed #000;margin-top:4px;padding-top:4px;font-size:13px!important;font-weight:800}
.receipt-thanks{text-align:center;margin:5px 0 0;font-size:10px}
.receipt-paper{position:relative}
.receipt-secret{position:absolute;right:8px;top:5px;font-size:7px;color:#000}
.receipt-logo{display:block;width:38px;height:auto;margin:0 auto 2px;filter:grayscale(1) contrast(1.4)}
.hot-banners{display:grid;gap:7px;grid-column:1/-1;width:100%}
.hot-banner{border-radius:0;padding:8px 10px;color:#fff;display:grid;grid-template-columns:150px minmax(0,1fr);gap:9px;align-items:center;overflow:hidden;width:100%}
.hot-banner.near{background:#b91c1c}.hot-banner.margin{background:#087a55}.hot-banner.muted{background:#f6faf7;color:var(--muted);border:1px solid var(--line)}
.hot-banner strong{text-transform:uppercase;letter-spacing:.08em;font-size:10px}.hot-banner span{font-size:11px}
.hot-marquee{overflow:hidden;white-space:nowrap}
.hot-track{display:inline-flex;gap:8px;min-width:max-content;animation:hotMarquee 92s linear infinite}
.hot-track:hover{animation-play-state:paused}
.hot-track button{border:1px solid rgba(255,255,255,.45);background:rgba(255,255,255,.14);color:#fff;border-radius:999px;padding:6px 10px;font-size:10px;font-weight:800;cursor:pointer}
@keyframes hotMarquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.billing-modal-form{grid-template-columns:minmax(0,1.25fr) minmax(520px,.75fr);min-height:100%;height:auto;overflow:visible;align-items:start}
.billing-modal-form .sale-left{min-height:0;overflow:visible;padding-right:4px}
.billing-modal-form .cart{position:sticky;top:0;max-height:calc(100vh - 118px);min-height:0;display:flex;flex-direction:column}
.billing-modal-form .selection-card{padding:10px}.billing-modal-form .search input{padding:11px 13px}
.billing-modal-form .cart-lines{max-height:none;flex:1;padding:4px 12px}
.billing-modal-form .payment-box{margin:0 12px 8px;padding:9px}.billing-modal-form .totals{padding:10px 12px;gap:4px}
.billing-modal-form .total-row{font-size:10px}.billing-modal-form .total-row.grand{font-size:15px;padding-top:7px}
.billing-modal-form .cart-actions{padding:0 12px 10px;gap:7px;grid-template-columns:1fr 1fr}.billing-modal-form .cart-actions button{padding:10px 12px;font-size:12px}.billing-modal-form .cart-actions button:last-child{grid-column:auto}
.billing-modal-form .notes{margin:0 12px 8px;width:calc(100% - 24px);min-height:44px}
.billing-line{padding:9px 0;gap:6px}.billing-line-grid{grid-template-columns:.45fr .8fr .62fr .58fr .58fr .48fr}
.billing-line-grid input,.billing-line-grid select{padding:6px;font-size:10px}.billing-line-title strong{font-size:11px}
.billing-product-search{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;align-items:center}
.billing-product-search span{left:14px}
.billing-product-search input{grid-column:1;padding-left:37px!important}
.billing-product-search button{height:100%;min-height:42px;border:1px solid var(--line);background:#fff;border-radius:12px;font-weight:900;color:var(--green);cursor:pointer}
.scan-box video{width:100%;max-height:58vh;background:#000;border-radius:14px}
.history-modal-actions{position:sticky;top:0;z-index:1;background:#fff;padding:0 0 12px;margin-bottom:10px;border-bottom:1px solid var(--line)}
.status-pill.order-pending{background:#fff7e6;color:#9a5b00}.status-pill.order-partial-stock{background:#fff0e5;color:#c05f19}.status-pill.order-no-stock{background:#f9e9e8;color:#b84c44}.status-pill.order-fulfilled{background:var(--green2);color:var(--green)}.status-pill.order-partial-fulfilled{background:#e8eefb;color:#3f5f99}.status-pill.order-cancelled{background:#eef0ef;color:#78827e}
.billing-modal-form{grid-template-columns:minmax(320px,1fr) minmax(0,2fr);gap:14px}
.billing-modal-form .hot-banners{grid-column:1/-1}
.billing-modal-form .sale-left{display:grid;gap:10px;align-content:start;padding-right:0}
.billing-control-grid{grid-template-columns:1fr 1fr;gap:8px}
.billing-control-grid label:has(#billingPayment){display:none}
.billing-control-grid label{gap:4px;font-size:10px}
.billing-control-grid select,.billing-control-grid input{padding:8px 9px;border-radius:8px;font-size:11px}
.billing-money-panel{overflow:hidden}
.billing-money-panel .notes{margin:10px;width:calc(100% - 20px);min-height:42px;padding:9px;font-size:11px}
.billing-money-panel .payment-box{margin:0 10px 8px;padding:9px;border-radius:10px}
.billing-money-panel .payment-title strong{font-size:13px}
.billing-money-panel .payment-options{grid-template-columns:repeat(2,1fr)}
.billing-money-panel .payment-options button{padding:7px 4px;font-size:10px}
.billing-money-panel .totals{padding:9px 10px;gap:4px}
.billing-money-panel .total-row{font-size:10px}.billing-money-panel .total-row.grand{font-size:15px;padding-top:7px}
.billing-workspace{position:sticky;top:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px;max-height:calc(100vh - 116px);min-height:0}
.billing-workspace .billing-add-product{padding:10px}
.billing-workspace .billing-add-product .panel-head{padding:0 0 8px}
.billing-workspace .billing-product-search input{padding:9px 11px 9px 37px!important}
.billing-workspace .billing-product-search button{min-height:38px}
.billing-workspace .lookup-results{max-height:176px;margin-top:8px}
.billing-lines-panel{min-height:0;display:flex;flex-direction:column}
.billing-lines-panel .panel-head{padding:10px 14px}
.billing-lines-panel .cart-lines{flex:1;min-height:420px;max-height:none;overflow:auto;padding:3px 12px}
.billing-lines-panel .empty.small{padding:54px 12px}
.billing-lines-panel .save-status{padding:2px 12px 6px;min-height:22px}
.billing-lines-panel .cart-actions{display:grid;grid-template-columns:.8fr .8fr 1fr;gap:7px;padding:0 12px 10px}
.billing-lines-panel .cart-actions button{padding:8px 10px;border-radius:8px;font-size:11px}
.billing-lines-panel .cart-actions button:last-child{grid-column:auto}
.billing-lines-panel .billing-line{padding:7px 0;gap:5px}
.billing-lines-panel .billing-line-grid{grid-template-columns:.42fr .85fr .62fr .56fr .56fr .46fr}
.billing-lines-panel .billing-line-grid input,.billing-lines-panel .billing-line-grid select{padding:5px 6px;font-size:10px}
.billing-lines-panel .billing-line-title strong{font-size:11px}.billing-lines-panel .billing-line small,.billing-lines-panel .billing-line-foot span{font-size:9px}
.billing-modal-form .hot-banners{position:sticky;top:0;z-index:6;gap:5px;background:#fff;padding-bottom:6px}
.billing-modal-form .hot-banner{min-height:31px;padding:5px 8px;grid-template-columns:135px minmax(0,1fr)}
.billing-modal-form .hot-banner strong{font-size:9px}.billing-modal-form .hot-banner span{font-size:10px}
.billing-modal-form .hot-track button{padding:4px 8px;font-size:9px}
.billing-modal-form .selection-card{padding:8px}
.billing-modal-form .inline-head{display:flex;align-items:center;gap:8px;padding:0 0 6px}.billing-modal-form .inline-head h3{font-size:14px}.billing-modal-form .inline-head span{font-size:10px}
.billing-control-grid{gap:6px}.billing-control-grid label{font-size:9px}.billing-control-grid select,.billing-control-grid input{padding:6px 8px;font-size:10px;min-height:32px}
.billing-add-product .lookup-results{max-height:260px;gap:5px;margin-top:6px}.billing-add-product .lookup-row{padding:7px 9px;border-radius:8px}
.billing-add-product .product-result{grid-template-columns:minmax(0,1fr) auto;gap:8px}.billing-add-product .product-result strong{font-size:12px}.billing-add-product .product-result small{font-size:9px;margin-top:1px}
.billing-add-product .product-result-actions{gap:4px}.billing-add-product .product-result-actions button{width:25px;height:25px;font-size:8px}.billing-add-product .product-result-actions .row-action{width:auto;padding:5px 8px}
.barcode-scan-btn{position:relative}.barcode-scan-btn:before{content:"";display:block;width:20px;height:18px;margin:auto;background:repeating-linear-gradient(90deg,var(--green) 0 2px,transparent 2px 4px,var(--green) 4px 5px,transparent 5px 8px);border-top:2px solid var(--green);border-bottom:2px solid var(--green)}
.billing-modal-form .panel-head h3{font-size:14px}.billing-workspace .billing-product-search input{font-size:14px;min-height:36px}.billing-workspace .billing-product-search button{min-height:36px}
.billing-modal-form .customer-billing-card{display:block;padding:8px;background:#f7faf7;border:1px solid var(--line);border-radius:10px}
.customer-billing-main h3{font-size:13px;margin:0}.customer-billing-main p{display:inline;margin:2px 8px 0 0;font-size:9px}
.billing-modal-form .customer-billing-metrics{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}.billing-modal-form .customer-billing-metrics span{padding:5px 7px;border-radius:999px}.billing-modal-form .customer-billing-metrics small{font-size:7px;margin:0}.billing-modal-form .customer-billing-metrics strong{font-size:10px}
.billing-modal-form .branch-balance-list{gap:5px;margin-top:5px}.billing-modal-form .branch-balance-list span{padding:4px 7px}.billing-modal-form .customer-billing-card .row-action{margin-top:6px;padding:5px 10px}
.billing-modal-form .button-row .secondary{padding:7px 10px;font-size:11px}.billing-modal-form .search input{padding:8px 11px 8px 34px!important;font-size:12px;min-height:34px}.billing-modal-form .search span{top:8px}
.billing-modal-form .lookup-results{gap:5px}.billing-modal-form .lookup-row{padding:7px 9px;border-radius:8px}.billing-modal-form .lookup-row strong{font-size:11px}.billing-modal-form .lookup-row small{font-size:9px;margin-top:1px}
.billing-modal-form .history-box{margin-top:8px;padding-top:8px}.billing-modal-form .history-box .button-row{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.billing-money-panel .notes{min-height:34px;margin:8px;width:calc(100% - 16px);font-size:10px;padding:7px}
.billing-money-panel .payment-box{margin:0 8px 6px;padding:8px}.billing-money-panel .payment-title{margin-bottom:2px}.billing-money-panel .payment-title strong{font-size:12px}.billing-money-panel .payment-title span{font-size:14px;font-weight:900}
.billing-money-panel .payment-options{grid-template-columns:repeat(4,1fr)!important;gap:4px}.billing-money-panel .payment-options button{padding:6px 3px;font-size:9px;border-radius:7px}
.billing-money-panel .payment-box small{font-size:8px}.billing-money-panel .payment-box .secondary{padding:6px 8px;font-size:10px}
.billing-money-panel .totals{padding:7px 8px;background:#fff;gap:5px}.billing-money-panel .total-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.billing-money-panel .total-strip span{background:#f7faf7;border:1px solid var(--line);border-radius:999px;padding:5px 6px;font-size:8px;color:var(--muted);white-space:nowrap}.billing-money-panel .total-strip strong{display:block;color:var(--ink);font-size:10px}
.billing-money-panel .total-row.grand{background:var(--nav);color:#fff;border-radius:999px;padding:7px 10px;margin-top:2px;border:0;font-size:14px}.billing-money-panel .total-row.grand strong{color:#fff}
.billing-lines-panel .cart-lines{min-height:500px;padding:2px 10px}.billing-lines-panel .billing-line{padding:5px 0;gap:3px}.billing-lines-panel .billing-line-title{align-items:center}.billing-lines-panel .billing-line-title strong{font-size:10.5px}.billing-lines-panel .billing-line-title span{margin-left:auto;font-size:13px;font-weight:900}.billing-lines-panel .billing-line-title .clear-remove{margin-left:8px;padding:3px 7px;font-size:8px}
.billing-lines-panel .billing-line small{font-size:8.5px}.billing-lines-panel .compact-line-grid{grid-template-columns:minmax(250px,1.75fr) 58px 120px 82px 72px 58px;gap:5px;align-items:end}
.billing-lines-panel .compact-line-grid label{font-size:8px;gap:2px}.billing-lines-panel .compact-line-grid input,.billing-lines-panel .compact-line-grid select{padding:4px 6px;font-size:9px;min-height:28px;border-radius:8px}
.billing-lines-panel .billing-line-foot span{font-size:8.5px}.billing-lines-panel .button-row.mini{gap:4px}.billing-lines-panel .button-row.mini .row-action{font-size:8px;padding:4px 6px}
.child .history-modal-actions{position:sticky;top:0;z-index:3;background:#fff;padding:0 0 8px;margin-bottom:8px}.child .history-modal-actions .button-row button{padding:8px 12px}.child .table-wrap{max-height:62vh;overflow:auto}.child .compact-table thead th{position:sticky;top:0;z-index:2}
.modal:has(.billing-modal-form) .modal-head{position:relative;z-index:12;gap:12px;padding:10px 16px}
.modal:has(.billing-modal-form) .modal-head h3{font-size:18px;white-space:nowrap}
.modal-head-tools{flex:1;min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:8px}
.billing-head-summary{display:flex;flex-direction:column;align-items:flex-end;min-width:118px}.billing-head-summary strong{font:900 18px Manrope}.billing-head-summary span{font-size:9px;color:var(--muted);white-space:nowrap}
.billing-head-payment{display:flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fafcf9;border-radius:999px;padding:4px 6px}.billing-head-payment .payment-title{display:none}.billing-head-payment .payment-options{display:flex!important;gap:3px}.billing-head-payment .payment-options button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:5px 8px;font-size:9px;font-weight:900}.billing-head-payment .payment-options button.active{background:var(--green);border-color:var(--green);color:#fff}.billing-head-payment small{display:none}.billing-head-payment .secondary{padding:5px 8px;border-radius:999px;font-size:9px}.billing-head-payment label{margin-left:4px;min-width:120px}.billing-head-payment select{padding:5px 7px;font-size:9px;border-radius:999px}
.billing-head-totals{min-width:310px}.billing-head-totals .total-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:3px}.billing-head-totals .total-strip span{background:#f7faf7;border:1px solid var(--line);border-radius:999px;padding:4px 6px;font-size:8px;color:var(--muted);white-space:nowrap}.billing-head-totals .total-strip strong{display:block;color:var(--ink);font-size:9px}.billing-head-totals .total-row.grand{display:none}
.billing-head-actions{display:flex;gap:6px}.billing-head-actions .primary{padding:7px 11px;border-radius:8px;font-size:11px;white-space:nowrap}
.billing-money-panel{display:none}
.billing-modal-form .sale-left>.selection-card:first-child{position:sticky;top:0;z-index:7}
.billing-workspace .billing-add-product{position:sticky;top:0;z-index:7}
.billing-workspace .billing-add-product .panel-head{display:none}
.billing-add-product .lookup-results{max-height:230px;overflow:auto}
.billing-modal-form .customer-billing-card{padding:7px 9px}
.customer-billing-main h3{font-size:12px}.customer-billing-main p{font-size:8.5px}
.billing-modal-form .customer-billing-metrics{display:block;margin-top:4px;font-size:9px;line-height:1.45;color:var(--muted)}
.billing-modal-form .customer-billing-metrics span{display:inline;padding:0;border:0;background:transparent;border-radius:0;color:var(--muted)}
.billing-modal-form .customer-billing-metrics span+span:before{content:" · ";color:#a4aca8}
.billing-modal-form .customer-billing-card .row-action{margin-top:4px;padding:4px 9px;font-size:9px}
.toast.toast-strong{left:50%;right:auto;top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(560px,calc(100vw - 42px));background:#102c29;color:#fff;border:2px solid #f4c36b;border-radius:18px;padding:24px 28px;text-align:center;font:900 22px/1.28 Manrope;box-shadow:0 30px 90px rgba(0,0,0,.35);z-index:120}
.modal:has(.billing-modal-form) .modal-body{overflow:hidden;padding:10px 14px}
.billing-modal-form{grid-template-columns:minmax(270px,.72fr) minmax(0,2.28fr);grid-template-rows:auto minmax(0,1fr);height:100%;min-height:0;overflow:hidden;gap:10px 14px}
.billing-modal-form .hot-banners{position:relative;top:auto;z-index:5}
.billing-modal-form .sale-left{min-height:0;height:100%;overflow:hidden;align-self:stretch;background:#f8fbf7;border-right:1px solid var(--line);padding:0 10px 0 0}
.billing-modal-form .sale-left>.selection-card:first-child{position:static;background:#fffaf2;border-color:#eadfcc}
.billing-modal-form .sale-left>.selection-card:nth-child(2){background:#f4faf8;border-color:#dcebe4}
.billing-modal-form .sale-left .selection-card{box-shadow:none}
.billing-workspace{position:static;height:100%;max-height:none;align-self:stretch;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.billing-workspace .billing-add-product{position:relative;top:auto;z-index:4;background:#fff}
.billing-workspace .billing-add-product .billing-product-search{position:sticky;top:0;z-index:5;background:#fff;padding-bottom:4px}
.billing-add-product .lookup-results{max-height:190px;overflow:auto}
.billing-lines-panel{height:100%;overflow:hidden}
.billing-lines-panel .cart-lines{min-height:0;height:100%;overflow:auto}
.billing-modal-form .customer-billing-metrics{font-size:8.5px;line-height:1.35}
.billing-control-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 6px}
.billing-control-grid label{min-width:0;overflow:hidden;font-size:8px;line-height:1.15}
.billing-control-grid select,.billing-control-grid input{width:100%;min-width:0;min-height:29px;padding:5px 7px;font-size:9px;border-radius:8px}
.billing-control-grid label:nth-child(1),.billing-control-grid label:nth-child(3){grid-column:1}.billing-control-grid label:nth-child(2),.billing-control-grid label:nth-child(4){grid-column:2}
.billing-modal-form .sale-left>.selection-card:first-child{padding:6px 7px}
.billing-head-actions .secondary{padding:7px 11px;border-radius:8px;font-size:11px;font-weight:900;white-space:nowrap;background:#fff}
.billing-head-actions .primary:last-child{font-size:12px;padding:9px 14px;background:#0d7f60}
.billing-head-summary strong{font-size:24px;color:#0b342d}.billing-head-summary span{font-weight:800}
.billing-head-totals .total-strip span{padding:5px 8px}.billing-head-totals .total-strip strong{font-size:10px}
.billing-modal-form .customer-billing-metrics{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
.billing-modal-form .customer-billing-metrics span{display:inline-flex;align-items:center;border-radius:999px;padding:3px 7px;font-size:8px;font-weight:800;color:#21342e;border:1px solid transparent}
.billing-modal-form .customer-billing-metrics span+span:before{content:none}
.billing-modal-form .customer-billing-metrics span:nth-child(1){background:#e9f7ef;border-color:#cce8d8;color:#0f684d}
.billing-modal-form .customer-billing-metrics span:nth-child(2){background:#eef4ff;border-color:#d8e5ff;color:#315c9f}
.billing-modal-form .customer-billing-metrics span:nth-child(3){background:#fff7df;border-color:#f0dfae;color:#86620f}
.billing-modal-form .customer-billing-metrics span:nth-child(4){background:#f7efff;border-color:#eadcff;color:#7050a8}
.billing-modal-form .customer-billing-metrics span:nth-child(5){background:#effaf9;border-color:#d1eae7;color:#27635d}
.billing-modal-form .customer-billing-metrics span:nth-child(6){background:#fff0ea;border-color:#f2d2c8;color:#9a4d32}
.billing-modal-form .customer-billing-metrics span:nth-child(7){background:#edf7e8;border-color:#d3e8cb;color:#456d29}
.billing-modal-form .customer-billing-metrics span:nth-child(n+8){background:#f3f5f2;border-color:#e1e6df;color:#5b665f}
@media print{
  @page{size:80mm auto;margin:1.5mm}
  body{background:#fff!important;color:#000!important}
  #modal{display:block!important;position:static!important;background:#fff!important;padding:0!important}
  .modal{box-shadow:none!important;max-height:none!important;width:80mm!important;border-radius:0!important;overflow:visible!important}
  .modal-body{padding:0!important}.modal-head,.no-print,.invoice-paper .button-row{display:none!important}
  .receipt-paper,.invoice-paper{width:76mm!important;margin:0!important;padding:0!important;font:9px/1.18 "Courier New",monospace!important;color:#000!important}
  .receipt-head h2{font-size:11px!important}.receipt-head p{font-size:8px!important}.receipt-head strong{font-size:9px!important}
  .receipt-grid{grid-template-columns:1fr 30px 32px 34px 38px!important;gap:2px!important;font-size:7px!important}
  .receipt-item strong{font-size:8px!important}.receipt-item small{font-size:7px!important}
  .receipt-totals div,.receipt-thanks{font-size:8px!important}.receipt-net{font-size:10px!important}
}
@media(max-width:1100px){.history-filters{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.history-filters,.customer-billing-metrics{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}}
@media(max-width:760px){html,body{max-width:100%;overflow-x:hidden}.modal-shell{padding:0;place-items:stretch}.modal{width:100vw;max-height:100vh;border-radius:0}.modal-body{padding:12px}.modal:has(.billing-modal-form){width:100vw;height:100vh}.modal:has(.billing-modal-form) .modal-body{height:calc(100vh - 70px);overflow:auto}.billing-modal-form{display:block;height:auto;overflow:visible}.billing-modal-form .sale-left{overflow:visible}.billing-modal-form .cart{position:static;margin-top:12px;height:auto}.billing-modal-form .cart-lines{max-height:none}.target-flash{grid-template-columns:1fr 1fr;padding:12px}.target-flash strong{font-size:22px}.admin-grid{display:block}.admin-form{position:static}.bill-history-card{grid-template-columns:1fr}.customer-summary{grid-template-columns:1fr}.data-table{font-size:11px}.content{overflow-x:hidden}}
@media(max-width:760px){
  html.android-webview,html.android-webview body{height:100%;min-height:100%;overflow-x:hidden;overflow-y:auto;touch-action:pan-y}
  html.android-webview .modal-shell:not(.hidden){display:block;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:0}
  html.android-webview .modal{width:100vw;min-height:100%;height:auto;max-height:none;border-radius:0;overflow:visible}
  html.android-webview .modal-head{position:sticky;top:0}
  html.android-webview .modal-body{height:auto;min-height:calc(100dvh - 70px);overflow:visible;padding:12px}
  html.android-webview .modal:has(.billing-modal-form){height:auto;min-height:100%}
  html.android-webview .modal:has(.billing-modal-form) .modal-body{height:auto;min-height:calc(100dvh - 70px);overflow:visible}
  html.android-webview .billing-modal-form{display:block;height:auto;min-height:auto;overflow:visible}
  html.android-webview .billing-modal-form .cart{position:static;max-height:none;height:auto;margin-top:12px}
  html.android-webview .billing-modal-form .cart-lines{max-height:none;overflow:visible}
}
@media(max-width:760px){
  body{overscroll-behavior-y:contain}
  .modal:has(.billing-modal-form){width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
  .modal:has(.billing-modal-form) .modal-head{position:sticky;top:0;z-index:30;display:grid;grid-template-columns:1fr auto;gap:8px;padding:9px 10px}
  .modal:has(.billing-modal-form) .modal-head h3{font-size:15px;line-height:1.1}
  .modal-head-tools{grid-column:1/-1;display:grid;grid-template-columns:1fr;gap:7px;align-items:stretch}
  .billing-head-summary{align-items:flex-start;min-width:0}.billing-head-summary strong{font-size:19px}.billing-head-summary span{white-space:normal;font-size:9px}
  .billing-head-payment{border-radius:10px;overflow-x:auto;justify-content:flex-start;padding:5px;gap:5px}
  .billing-head-payment .payment-options button{padding:7px 9px;font-size:10px}
  .billing-head-payment label{min-width:145px;margin-left:0}.billing-head-payment select{width:100%;min-height:30px}
  .billing-head-totals{min-width:0}.billing-head-totals .total-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.billing-head-totals .total-strip span{border-radius:8px}
  .billing-head-actions{display:grid;grid-template-columns:.7fr 1fr 1.15fr;gap:6px}.billing-head-actions .primary,.billing-head-actions .secondary{padding:9px 7px;font-size:10px;border-radius:8px}
  .modal:has(.billing-modal-form) .modal-body{height:calc(100dvh - 166px);min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:8px 9px 18px}
  .billing-modal-form{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto auto!important;height:auto!important;min-height:0!important;overflow:visible!important;gap:9px!important}
  .billing-modal-form .hot-banners{position:sticky;top:0;z-index:9;background:#fff;padding-bottom:4px}
  .billing-modal-form .hot-banner{grid-template-columns:92px minmax(0,1fr);min-height:28px;padding:4px 6px}.billing-modal-form .hot-banner strong{font-size:8px}.billing-modal-form .hot-track button{font-size:8px;padding:3px 7px}
  .billing-modal-form .sale-left{height:auto!important;overflow:visible!important;border-right:0!important;padding:0!important;background:transparent!important}
  .billing-control-grid{grid-template-columns:1fr 1fr!important;gap:6px}.billing-control-grid label:nth-child(n){grid-column:auto!important}.billing-control-grid select,.billing-control-grid input{min-height:36px;font-size:11px}
  .billing-modal-form .selection-card{padding:8px!important;border-radius:10px}
  .billing-modal-form .inline-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.billing-modal-form .inline-head h3{font-size:14px}.billing-modal-form .inline-head span{font-size:8px;line-height:1.25}
  .billing-modal-form .button-row{gap:6px}.billing-modal-form .button-row .secondary{padding:8px 10px;font-size:11px}
  .billing-modal-form .search input{min-height:39px;font-size:13px}
  .billing-modal-form .customer-billing-card{padding:8px;border-radius:10px}.billing-modal-form .customer-billing-metrics{gap:4px}.billing-modal-form .customer-billing-metrics span{font-size:8px;padding:3px 6px}
  .billing-workspace{height:auto!important;display:grid!important;grid-template-rows:auto auto!important;overflow:visible!important;gap:9px}
  .billing-workspace .billing-add-product{position:sticky!important;top:0!important;z-index:12;border-radius:10px}
  .billing-workspace .billing-add-product .billing-product-search{position:sticky;top:0;background:#fff}
  .billing-product-search{grid-template-columns:minmax(0,1fr) 42px}.billing-product-search button{min-height:40px}
  .billing-add-product .lookup-results{max-height:38dvh!important;overflow:auto!important;-webkit-overflow-scrolling:touch}
  .billing-add-product .product-result{grid-template-columns:minmax(0,1fr) auto!important}.billing-add-product .product-result-actions{flex-wrap:wrap;justify-content:flex-end}.billing-add-product .product-result-actions button{width:28px;height:28px}.billing-add-product .product-result-actions .row-action{padding:6px 9px}
  .billing-lines-panel{height:auto!important;overflow:visible!important;border-radius:10px}
  .billing-lines-panel .panel-head{position:sticky;top:52px;z-index:8;background:#fff;padding:9px 10px}
  .billing-lines-panel .cart-lines{height:auto!important;min-height:42dvh!important;max-height:none!important;overflow:visible!important;padding:2px 8px 8px}
  .billing-lines-panel .billing-line-title{display:grid;grid-template-columns:1fr auto auto;align-items:start;gap:5px}.billing-lines-panel .billing-line-title strong{font-size:11px;line-height:1.25}.billing-lines-panel .billing-line-title span{font-size:13px}
  .billing-lines-panel .compact-line-grid{display:grid;grid-template-columns:1fr 74px 92px;gap:6px}.billing-lines-panel .compact-line-grid label:first-child{grid-column:1/-1}.billing-lines-panel .compact-line-grid label{font-size:8px}.billing-lines-panel .compact-line-grid input,.billing-lines-panel .compact-line-grid select{min-height:32px;font-size:10px}
  .billing-lines-panel .button-row.mini{display:flex;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}.billing-lines-panel .button-row.mini .row-action{flex:0 0 auto;font-size:9px;padding:6px 8px}
  .child .modal{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.child .modal-body{height:calc(100dvh - 62px);overflow:auto;-webkit-overflow-scrolling:touch}
  .scan-box video{max-height:54dvh;border-radius:10px}.scan-box .search{display:grid;grid-template-columns:1fr auto;gap:7px}.scan-box .search span{display:none}.scan-box .search input{padding-left:12px!important}
}
@media(max-width:760px){
  html,body{height:auto!important;min-height:100%!important;overflow-y:auto!important;touch-action:pan-y!important}
  .modal-shell:not(.hidden){display:block!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;padding:0!important}
  .modal-shell:not(.hidden) .modal{width:100vw!important;min-height:100%!important;height:auto!important;max-height:none!important;border-radius:0!important;overflow:visible!important}
  .modal-shell:not(.hidden) .modal-head{position:sticky!important;top:0!important;z-index:35!important}
  .modal-shell:not(.hidden) .modal-body{height:auto!important;min-height:calc(100dvh - 70px)!important;overflow:visible!important;-webkit-overflow-scrolling:auto!important}
  .modal-shell:not(.hidden) .billing-modal-form{height:auto!important;min-height:auto!important;overflow:visible!important}
  .modal-shell:not(.hidden) .billing-workspace,.modal-shell:not(.hidden) .billing-lines-panel{height:auto!important;overflow:visible!important}
  .modal-shell:not(.hidden) .billing-lines-panel .cart-lines{height:auto!important;overflow:visible!important}
  .modal-shell:not(.hidden) .billing-add-product{position:sticky!important;top:0!important;z-index:20!important}
  .modal-shell:not(.hidden) .lookup-results{overscroll-behavior:contain}
}
