:root{--ink:#17352d;--muted:#687a72;--paper:#f7f6f1;--card:#fff;--line:#dde6df;--green:#155b42;--green-dark:#0f3d2d;--aqua:#247f87;--orange:#f2a43c;--red:#c8493e;--shadow:0 12px 30px rgba(21,54,43,.09);font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--paper)}button,input,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}.app-shell{width:min(100%,760px);min-height:100vh;margin:auto;padding:18px 16px calc(36px + env(safe-area-inset-bottom))}.home-header,.app-header{display:flex;align-items:center;justify-content:space-between;gap:14px}.home-header{padding:10px 0 0}.home-brand,.mini-brand{display:flex;align-items:center;gap:12px}.home-brand img{width:74px;height:74px;border-radius:50%;object-fit:cover;background:#fff;border:1px solid #cad4cd;box-shadow:var(--shadow)}.mini-brand img{width:42px;height:42px;border-radius:50%;object-fit:cover;border:1px solid #cad4cd;background:#fff}.mini-brand span{font-size:14px;font-weight:800;color:var(--muted)}.kicker{margin:0 0 5px;color:var(--muted);font-size:12px;font-weight:850;letter-spacing:.1em;text-transform:uppercase}.home-brand h1,.page-heading h1{margin:0;line-height:1.02;letter-spacing:-.045em}.home-brand h1{font-size:clamp(28px,7vw,42px)}.page-heading{margin:28px 0 20px}.page-heading h1{font-size:clamp(28px,7vw,38px)}.settings-button,.home-button{width:50px;height:50px;border:1px solid var(--line);border-radius:16px;background:var(--card);box-shadow:var(--shadow);font-size:22px;color:var(--ink)}.home-button{font-size:26px}.back-button{min-height:48px;padding:0 5px 0 0;border:0;background:transparent;color:var(--ink);font-size:17px;font-weight:800}.home-intro{margin:20vh 0 14px;font-size:18px;font-weight:750}.home-grid{display:grid;gap:14px}.home-card{min-height:170px;padding:26px;border:0;border-radius:26px;color:#fff;text-align:left;box-shadow:var(--shadow);transition:transform .12s}.home-card:active{transform:scale(.985)}.home-card.tobacco{background:var(--green)}.home-card.fridge{background:var(--aqua)}.card-icon{display:block;font-size:38px;margin-bottom:16px}.card-title{display:block;font-size:30px;font-weight:900;letter-spacing:-.04em}.card-meta{display:block;margin-top:7px;font-size:15px;opacity:.9}.helper-text,.review-note,.admin-intro{margin:0 0 20px;color:var(--muted);font-size:16px;font-weight:650}.choice-list,.product-list,.admin-list,.history-list{display:grid;gap:10px}.choice-row{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:76px;padding:18px 20px;border:1px solid var(--line);border-radius:19px;background:var(--card);color:var(--ink);box-shadow:var(--shadow);font-size:19px;font-weight:850;text-align:left}.choice-row strong{color:var(--green);font-size:15px}.search-box{display:flex;align-items:center;gap:8px;min-height:54px;margin:0 0 14px;padding:0 15px;border:1px solid var(--line);border-radius:16px;background:var(--card);color:var(--muted)}.search-box input{width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:17px}.product-list{padding-bottom:24px}.product-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:74px;padding:12px 13px 12px 17px;border:1px solid var(--line);border-radius:17px;background:var(--card)}.product-row.selected{border-color:#9cc9b3;background:#fbfffc}.product-copy{min-width:0}.product-copy strong{display:block;font-size:17px;line-height:1.15}.expiry{display:block;margin-top:4px;font-size:13px;font-weight:800;color:var(--muted)}.expiry.urgent,.expiry.expired{color:var(--red)}.expiry.soon{color:#b26915}.product-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}.round-button,.add-button{width:48px;height:48px;border:0;border-radius:14px;background:#e5efe8;color:var(--green-dark);font-size:28px;line-height:1}.add-button{background:var(--green);color:#fff}.quantity{min-width:22px;text-align:center;font-size:19px}.expiry-button{min-height:44px;padding:0 10px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--green-dark);font-size:14px;font-weight:850}.order-bar{position:fixed;z-index:2;bottom:16px;left:50%;width:min(calc(100% - 32px),728px);min-height:62px;transform:translateX(-50%);border:0;border-radius:19px;background:var(--orange);color:#281a0b;box-shadow:0 14px 30px rgba(100,59,13,.24);font-size:19px;font-weight:900}.expiry-banner{display:flex;align-items:center;gap:12px;width:100%;margin:-3px 0 18px;padding:14px 16px;border:1px solid #f2cf9c;border-radius:17px;background:#fff4e2;color:#7b4a10;text-align:left}.expiry-banner>span:first-child{font-size:26px}.expiry-banner span:nth-child(2){display:grid;gap:2px;flex:1}.expiry-banner small{font-size:13px}.expiry-banner b{font-size:24px}.empty-state{padding:38px 18px;border:1px dashed #c9d6cd;border-radius:18px;color:var(--muted);font-size:17px;font-weight:700;text-align:center}.review-note{padding:14px 16px;border-radius:15px;background:#edf4ef}.review-groups{display:grid;gap:22px}.review-group h2,.admin-section h2{margin:0 0 10px;font-size:15px;letter-spacing:.08em;text-transform:uppercase}.review-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.review-row strong{font-size:17px}.review-actions{display:grid;gap:10px;margin-top:22px}.primary-action,.secondary-action,.danger-action,.admin-actions button,.admin-row-actions button{min-height:52px;padding:0 15px;border:0;border-radius:15px;font-weight:900}.primary-action{background:var(--green);color:#fff}.secondary-action{background:#e7efe9;color:var(--ink)}.danger-action{background:#f8dfdc;color:#8d2e28}.admin-intro{padding:13px 15px;border-radius:15px;background:#edf4ef}.admin-actions{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:28px}.admin-actions button{background:#e7efe9;color:var(--ink)}.admin-actions button:first-child{background:var(--green);color:#fff}.admin-section{margin-top:26px}.admin-row{display:flex;justify-content:space-between;gap:12px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#fff}.admin-row.inactive{opacity:.55}.admin-row strong,.admin-row small{display:block}.admin-row small{margin-top:4px;color:var(--muted);font-size:13px}.admin-row-actions{display:flex;align-items:center;gap:5px;flex-shrink:0}.admin-row-actions button{min-height:40px;padding:0 8px;background:#edf3ee;color:var(--ink);font-size:13px}.history-list article{display:grid;gap:4px;padding:13px 14px;border-radius:15px;background:#fff;border:1px solid var(--line)}.history-list span{color:var(--muted);font-size:14px;line-height:1.35}.compact{padding:22px}.modal-backdrop{position:fixed;z-index:5;inset:0;display:grid;place-items:end center;padding:16px;background:rgba(10,31,23,.42)}.modal-card{position:relative;width:min(100%,600px);display:grid;gap:15px;padding:23px;border-radius:24px;background:#fff;box-shadow:0 20px 60px rgba(0,0,0,.2)}.modal-card h2{margin:0}.modal-card label{display:grid;gap:7px;font-weight:800}.modal-card input,.modal-card select{min-height:50px;padding:0 12px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--ink)}.check-line{display:flex!important;align-items:center;gap:9px}.check-line input{width:22px;height:22px;min-height:0}.modal-close{position:absolute;top:12px;right:13px;border:0;background:transparent;font-size:29px;color:var(--muted)}.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.modal-actions .primary-action{width:100%}#toast{position:fixed;z-index:8;right:16px;bottom:90px;left:16px;display:flex;justify-content:center;pointer-events:none;opacity:0;transform:translateY(10px);transition:.18s}#toast.show{pointer-events:auto;opacity:1;transform:translateY(0)}#toast{padding:13px 16px;border-radius:14px;background:var(--ink);color:#fff;font-weight:800;text-align:center}#toast button{margin-left:8px;border:0;background:transparent;color:#ffd47e;text-decoration:underline;font-weight:900}@media(min-width:620px){.home-grid{grid-template-columns:1fr 1fr}.home-intro{margin-top:22vh}.product-row{min-height:78px}}
.home-grid.home-grid-single{grid-template-columns:1fr}
.search-help,.search-status{font-size:13px;line-height:1.5;color:var(--muted);margin:0 0 14px}
.search-status{font-weight:750;color:var(--green)}
.case-controls{grid-column:1/-1;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.case-controls button{min-height:44px;padding:8px 12px;border:1px solid #b7d7c2;border-radius:12px;color:var(--green-dark);background:#edf7ef;font-weight:750}
.case-controls b{font-size:14px}
.case-controls button:focus-visible{outline:3px solid #b89a4b;outline-offset:2px}
.quick-order{padding:18px;margin-bottom:22px;border:1px solid #cdddcf;border-radius:18px;background:#edf5ee}
.quick-order h2{margin:5px 0;font-size:24px}
.quick-order p{font-size:14px;line-height:1.5;margin:8px 0;color:var(--muted)}
.quick-order summary{cursor:pointer;padding:12px 0;font-weight:750}
.quick-order ul{padding-left:20px;line-height:1.7}
.quick-order li{overflow-wrap:anywhere}
.quick-order .quick-warning{color:#805111}
.quick-order [data-quick-complete]{position:fixed;z-index:3;bottom:calc(16px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(calc(100% - 32px),728px);min-height:62px;box-shadow:var(--shadow);padding:12px;font-size:17px}
.quick-order button:disabled{opacity:.6;cursor:wait}
.app-shell:has([data-quick-complete]){padding-bottom:120px}
.quick-receipt{margin-top:12px;border-top:1px solid #cdddcf}
.quick-receipt textarea{width:100%;min-height:190px;resize:vertical;border:1px solid var(--line);border-radius:10px;padding:12px;background:white;font:inherit;font-size:14px;line-height:1.6;color:var(--ink)}
.quick-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.quick-order button:focus-visible,.quick-order summary:focus-visible,.quick-receipt textarea:focus-visible{outline:3px solid #b89a4b;outline-offset:3px}
:root{--unit-bg:#edf7ef}
.unit-button{min-height:44px;padding:0 9px;border:1px solid #b7d7c2;border-radius:12px;background:var(--unit-bg);color:var(--green-dark);font-size:12px;font-weight:900}.quantity{display:grid;justify-items:center;line-height:1.05}.quantity small{font-size:9px;color:var(--muted);font-weight:800}
.build-stamp{margin:28px 0 0;color:var(--muted);font-size:12px;text-align:center}
.product-art{position:relative;width:42px;height:56px;flex:0 0 42px;display:grid;place-items:end center;padding-bottom:7px;border-radius:5px 5px 3px 3px;color:#fff;box-shadow:2px 3px 0 rgba(0,0,0,.16);overflow:hidden;font-size:7px;font-weight:950;letter-spacing:.04em}.product-art::before{content:'';position:absolute;inset:5px 5px 20px;border:1px solid rgba(255,255,255,.65);border-radius:2px}.product-art::after{content:'';position:absolute;right:-8px;top:0;width:16px;height:100%;background:rgba(255,255,255,.16);transform:skewY(-18deg)}.pack-red{background:linear-gradient(#d43d38 0 55%,#f4f0dc 55%);color:#8c271f}.pack-gold{background:linear-gradient(#c99b2e 0 55%,#f6f0d8 55%);color:#694f15}.pack-winston-red{background:linear-gradient(#b22f2c 0 55%,#143d57 55%)}.pack-winston-blue{background:linear-gradient(#246b93 0 55%,#e5ebee 55%);color:#163f57}.pack-camel-yellow{background:linear-gradient(#d9ae35 0 55%,#f4ecd2 55%);color:#5b4817}.pack-camel-blue{background:linear-gradient(#4d7598 0 55%,#eae9db 55%);color:#1b4056}.pack-stevens-red{background:linear-gradient(#b33235 0 55%,#f1eee4 55%)}.pack-stevens-gold{background:linear-gradient(#bd8b25 0 55%,#f1eee4 55%);color:#5b4311}.pack-stevens-blue,.pack-lm-blue{background:linear-gradient(#276b8c 0 55%,#edf0ed 55%);color:#1b455d}.pack-lm-red{background:linear-gradient(#b93634 0 55%,#eee9df 55%)}.pack-assos{background:linear-gradient(#193e58 0 55%,#d9e1e2 55%)}.pack-neutral{background:linear-gradient(#66777b 0 55%,#ece9dc 55%);color:#233638}.can-coke,.can-zero,.can-fanta,.can-sprite,.can-beer,.can-energy,.can-iced-tea,.can-neutral,.bottle-water{width:38px;height:54px;flex-basis:38px;border-radius:7px 7px 5px 5px;padding-bottom:8px;background:linear-gradient(90deg,rgba(255,255,255,.18),transparent 28%,rgba(0,0,0,.12));font-size:6px}.can-coke{background-color:#c93631}.can-zero{background-color:#242a2d}.can-fanta{background-color:#ee721c}.can-sprite{background-color:#71b63e}.can-beer{background-color:#d59a1c;color:#56370c}.can-energy{background-color:#7c2930}.can-iced-tea{background-color:#b75e25}.bottle-water{background-color:#55a9cc;border-radius:8px 8px 5px 5px}.can-coke::before,.can-zero::before,.can-fanta::before,.can-sprite::before,.can-beer::before,.can-energy::before,.can-iced-tea::before,.bottle-water::before{inset:7px 4px 17px;border-color:rgba(255,255,255,.8)}@media(max-width:370px){.product-art{width:36px;flex-basis:36px;height:50px}.can-coke,.can-zero,.can-fanta,.can-sprite,.can-beer,.can-energy,.can-iced-tea,.can-neutral,.bottle-water{width:34px;flex-basis:34px}.expiry-button span{display:none}.unit-button{padding:0 6px}}
/* Category presentation */
/* Category presentation: keeps the compact mobile rhythm while giving every shelf a clear visual anchor. */
.product-category,.category-section{display:grid;gap:10px;min-width:0}
.product-categories{display:grid;gap:18px}.grouped-product-list{padding-bottom:0}.admin-subcategory{display:grid;gap:8px}.admin-subcategory h3{margin:12px 0 0;color:var(--muted);font-size:13px;letter-spacing:.06em;text-transform:uppercase}
.product-list>.product-category+.product-category,.product-list>.category-section+.category-section{margin-top:14px}
.category-header,.product-category-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;margin:2px 2px 0;padding:0 2px 9px;border-bottom:1px solid var(--line)}
.category-header::before,.product-category-header::before{content:"";width:4px;align-self:stretch;min-height:26px;border-radius:999px;background:linear-gradient(180deg,var(--orange),var(--green));box-shadow:0 2px 6px rgba(21,91,66,.14)}
.category-header>div,.product-category-header>div{display:grid;gap:2px;min-width:0;flex:1}
.category-header h2,.category-header h3,.product-category-header h2,.product-category-header h3{margin:0;color:var(--ink);font-size:15px;font-weight:950;letter-spacing:.035em;line-height:1.1;text-transform:uppercase}
.category-header p,.product-category-header p{margin:0;color:var(--muted);font-size:12px;font-weight:700;line-height:1.2}
.category-count,.category-header>span,.product-category-header>span{flex:0 0 auto;min-width:28px;padding:5px 8px;border:1px solid #d6e7db;border-radius:999px;background:#f3f9f4;color:var(--green);font-size:11px;font-weight:950;text-align:center}
.product-category>.product-row,.category-section>.product-row{box-shadow:0 7px 18px rgba(21,54,43,.055)}
.product-category>.product-row:first-of-type,.category-section>.product-row:first-of-type{border-top-left-radius:15px;border-top-right-radius:15px}
.product-category>.product-row:last-child,.category-section>.product-row:last-child{border-bottom-left-radius:15px;border-bottom-right-radius:15px}
.admin-list{align-content:start}
.admin-category,.admin-category-group{display:grid;gap:8px;padding:13px 12px 12px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(180deg,#fbfdfb 0%,#f4f8f4 100%);box-shadow:0 8px 22px rgba(21,54,43,.055)}
.admin-list>.admin-category+.admin-category,.admin-list>.admin-category-group+.admin-category-group{margin-top:12px}
.admin-category>h3,.admin-category-group>h3,.admin-category-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 2px 3px;padding:1px 3px 10px;border-bottom:1px solid #d7e3da;color:var(--green-dark);font-size:14px;font-weight:950;letter-spacing:.08em;text-transform:uppercase}
.admin-category-header{margin:0}
.admin-category>h3::before,.admin-category-group>h3::before,.admin-category-header::before{content:"";width:4px;height:22px;flex:0 0 4px;border-radius:999px;background:var(--orange)}
.admin-category>h3::after,.admin-category-group>h3::after,.admin-category-header::after{content:"";width:8px;height:8px;margin-left:auto;border-top:2px solid var(--green);border-right:2px solid var(--green);transform:rotate(45deg) translateY(-2px);opacity:.65}
.admin-category>.admin-row,.admin-category-group>.admin-row{border-color:#e0e9e2;background:rgba(255,255,255,.82);box-shadow:none}
.admin-category>.admin-row+.admin-row,.admin-category-group>.admin-row+.admin-row{border-top-left-radius:13px;border-top-right-radius:13px}
.admin-category>.admin-row:last-child,.admin-category-group>.admin-row:last-child{border-bottom-left-radius:13px;border-bottom-right-radius:13px}
.admin-category .admin-row strong,.admin-category-group .admin-row strong{font-size:15px}
.admin-category .admin-row small,.admin-category-group .admin-row small{font-size:12px}
@media(max-width:520px){.category-header,.product-category-header{min-height:40px;padding-bottom:8px}.category-header h2,.category-header h3,.product-category-header h2,.product-category-header h3{font-size:13px}.category-header p,.product-category-header p{font-size:11px}.category-count,.category-header>span,.product-category-header>span{padding:4px 7px}.admin-category,.admin-category-group{padding:11px 9px 10px;border-radius:17px}.admin-category>h3,.admin-category-group>h3,.admin-category-header{font-size:12px;padding-bottom:8px}.admin-category .admin-row,.admin-category-group .admin-row{padding:12px 10px}.admin-category .admin-row-actions,.admin-category-group .admin-row-actions{gap:4px}.admin-category .admin-row-actions button,.admin-category-group .admin-row-actions button{min-height:36px;padding:0 7px;font-size:12px}}
@media(min-width:620px){.product-list>.product-category+.product-category,.product-list>.category-section+.category-section{margin-top:18px}.category-header,.product-category-header{margin-left:4px;margin-right:4px}.admin-category,.admin-category-group{padding:15px 14px 14px}}

/* Keep names readable and controls reachable on narrow phones. */
.app-shell:has(.order-bar){padding-bottom:calc(110px + env(safe-area-inset-bottom))}
.order-bar{bottom:calc(16px + env(safe-area-inset-bottom));padding:14px 16px;overflow-wrap:anywhere}
.home-intro{margin-top:clamp(28px,6vh,64px)}
.product-row{display:grid;grid-template-columns:56px minmax(0,1fr) auto}
.product-copy,.review-row>strong{text-align:left;overflow-wrap:anywhere}
.product-copy strong{line-height:1.3}
.product-photo{display:block;width:56px;height:72px;object-fit:contain;object-position:center;flex:0 0 56px;justify-self:center}
.product-actions{min-width:0;max-width:100%;flex-wrap:wrap}
.product-actions button{min-width:44px;min-height:44px;flex-shrink:0}
.quantity{overflow-wrap:anywhere;max-width:100%}
.unit-button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.search-box input{min-width:0}
.modal-backdrop{overflow-y:auto;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
.modal-card{min-width:0;max-height:calc(100vh - 32px - env(safe-area-inset-bottom));max-height:calc(100dvh - 32px - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain}
.modal-card>*{min-width:0}
.modal-card input,.modal-card select{width:100%;min-width:0}
.modal-card .check-line{min-height:44px}
.modal-card .check-line input{width:22px;flex:0 0 22px}
.modal-card>.kicker,.modal-card h2{padding-right:38px;overflow-wrap:anywhere}
.modal-close{width:44px;height:44px}
.modal-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
.product-art:has(.product-photo){width:56px;height:72px;flex-basis:56px;padding:0;box-shadow:none;background:white;border-radius:8px}
.product-art:has(.product-photo)::before,.product-art:has(.product-photo)::after{display:none}
.product-art .product-photo{object-fit:cover!important}
.category-filter{display:grid;gap:8px;margin:0 0 22px;font-size:13px;font-weight:700;color:#496153}
.category-filter select{width:100%;min-width:0;min-height:48px;padding:12px;border:1px solid #cdd9ce;border-radius:12px;background:#fff;color:#173f2e;font:inherit;font-size:15px}
.category-filter select:focus-visible{outline:3px solid #b89a4b;outline-offset:2px}
.modal-actions button{padding:10px;overflow-wrap:anywhere}
@media(max-width:520px){
  .product-row{gap:10px;padding:12px}
  .product-row.selected,.product-row:has(.expiry-button){grid-template-columns:56px minmax(0,1fr)}
  .product-row.selected .product-actions,.product-row:has(.expiry-button) .product-actions{grid-column:1/-1;justify-content:flex-end}
  .review-row{flex-wrap:wrap}
  .review-row>strong{flex:1 1 100%;min-width:0}
  .review-row .product-actions{width:100%;justify-content:flex-end}
  .admin-row{flex-wrap:wrap}
  .admin-row>div:first-child{min-width:0;overflow-wrap:anywhere}
  .admin-row-actions{max-width:100%;flex-wrap:wrap}
  .admin-row-actions button{min-width:44px;min-height:44px}
  .home-header,.app-header{gap:8px}
  .home-brand,.mini-brand{min-width:0;gap:8px}
  .home-brand>div{min-width:0;overflow-wrap:anywhere}
  .home-brand img{width:56px;height:56px;flex-shrink:0}
  .home-brand .kicker{font-size:10px;letter-spacing:.04em}
  .settings-button,.home-button{flex:0 0 50px}
  .mini-brand span{font-size:12px;overflow-wrap:anywhere}
  .back-button{flex-shrink:0}
  .home-intro{margin-top:28px}
  .home-card{min-height:146px;padding:20px}
  .card-icon{font-size:32px;margin-bottom:10px}
  .page-heading h1,.choice-row>span{overflow-wrap:anywhere;min-width:0}
}
