*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Yu Gothic UI","Noto Sans JP",sans-serif;background:#f5f3ef;color:#292929}button{font:inherit;cursor:pointer}.pad-shell{height:calc(100vh - 78px);display:grid;grid-template-columns:190px 1fr 250px;background:#eee}.category-rail{background:#64230d;color:white;display:flex;flex-direction:column}.brand,.rail-bottom{padding:18px;font-size:22px;font-weight:800;background:#4e1607}.cat-btn{border:0;border-bottom:1px solid #9a5b41;background:#713319;color:#fff;padding:16px 10px;font-weight:800}.cat-btn.active{background:#cec525;color:#222}.menu-area{overflow:auto;background:#fff5e4}.menu-title{height:54px;background:#a64911;color:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 18px;font-weight:800}.product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;padding:3px}.product-grid.hidden,.hidden{display:none!important}.product-card{background:white;border:1px solid #ddd;min-height:220px}.product-image{height:165px;background:#e79b1c;display:flex;align-items:center;justify-content:center;overflow:hidden}.product-image img{width:100%;height:100%;object-fit:cover}.placeholder{font-size:28px;color:#fff}.product-name{padding:8px 10px 2px;font-size:18px;font-weight:700}.product-price{padding:0 10px 8px;color:#9b3b00;font-weight:800}.cart-panel{background:#9d3307;display:flex;flex-direction:column}.table-no{height:54px;background:#80300f;color:white;text-align:right;padding:12px;font-weight:800}.cart-list{background:#fff;flex:1;overflow:auto}.empty-cart{text-align:center;padding-top:130px;color:#777;font-size:24px}.empty-cart small{font-size:14px}.cart-item{padding:12px;border-bottom:1px solid #ddd;display:grid}.cart-item span{justify-self:end}.cart-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px;background:#eee}.primary{background:#e85a05!important;color:#fff;border:0;border-radius:10px;padding:16px;font-weight:800}.secondary,.outline{background:white;border:1px solid #e38a22;border-radius:10px;padding:14px;font-weight:700}.bottom-tools{height:78px;background:#f4f4f4;display:flex;gap:8px;padding:8px 190px 8px 10px}.bottom-tools button{border:1px solid #ddd;border-radius:22px;background:#fff;padding:8px 14px}.modal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:20}.modal-card{width:min(850px,90vw);background:white;border-radius:8px;padding:34px;position:relative}.modal-x{position:absolute;right:12px;top:8px;border:0;background:none;font-size:34px}.detail-wrap{display:grid;grid-template-columns:1.2fr 1fr;gap:28px}.detail-image{width:100%;height:320px;object-fit:cover;background:#eee}.qty-row{display:flex;gap:14px;align-items:center;background:#1f2937;color:#fff;padding:12px}.qty-row button{border-radius:50%;border:0;width:36px;height:36px}.modal-actions{display:flex;gap:30px;justify-content:center;margin-top:28px}.modal-actions button{min-width:220px}.confirm-row{display:grid;grid-template-columns:1fr 60px 120px;padding:14px;border-bottom:1px solid #eee}.total-line{text-align:center;background:#1f2937;color:#fff;padding:14px;font-size:24px;margin-top:20px}.kds{padding:20px}.kds header{display:flex;justify-content:space-between}.kds-cols{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.tickets{display:grid;gap:12px}.ticket{background:white;border-radius:10px;padding:14px;box-shadow:0 3px 12px #0001}.ticket-head{display:flex;justify-content:space-between}.ticket button{width:100%;padding:12px;background:#e85a05;color:#fff;border:0;border-radius:8px}.pos{display:grid;grid-template-columns:280px 1fr;height:100vh}.pos aside{background:#222;color:#fff;padding:18px}.table-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}.table-list button{padding:16px;border:0;border-radius:8px}.table-list small{display:block}.pos main{padding:24px}.bill-row{display:flex;justify-content:space-between;background:#fff;padding:14px;border-bottom:1px solid #eee}.bill-total{text-align:right;font-size:30px;padding:25px}.pay-methods{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.pay-methods button{padding:28px;border:0;border-radius:10px;background:#333;color:#fff}.admin{padding:24px}.admin header{display:flex;justify-content:space-between}.admin nav a{margin-left:18px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.stats div{background:#fff;padding:20px;border-radius:10px}.stats strong{display:block;font-size:28px}.floor-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}.floor-table{background:#fff;border:3px solid #ddd;border-radius:10px;padding:18px;display:grid;min-height:100px}.status-dining{border-color:#f0a202}.status-available{border-color:#49a078}.status-bill_requested{border-color:#d62828}.status-reserved{border-color:#7251b5}@media(max-width:900px){.pad-shell{grid-template-columns:130px 1fr}.cart-panel{position:fixed;right:0;top:0;width:230px;height:100vh;transform:translateX(100%)}.product-grid{grid-template-columns:repeat(2,1fr)}.bottom-tools{padding-left:5px;overflow:auto}.kds-cols{grid-template-columns:1fr}.floor-grid{grid-template-columns:repeat(3,1fr)}}
/* V2 management / handy enhancements */
.admin-shell{min-height:100vh;background:#f4f6f8;padding:20px}.topbar{display:flex;align-items:center;justify-content:space-between;background:#20252b;color:#fff;padding:14px 20px;border-radius:12px;margin-bottom:18px}.topbar h1{margin:0;font-size:24px}.topbar nav{display:flex;gap:14px;flex-wrap:wrap}.topbar a{color:#fff;text-decoration:none}.panel{background:#fff;border-radius:12px;padding:18px;margin-bottom:18px;box-shadow:0 3px 12px #0000000d}.table-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}.table-tile{padding:16px;border-radius:14px;border:3px solid transparent;background:white;box-shadow:0 4px 14px #00000012}.table-tile .table-name{font-size:28px;font-weight:800}.table-tile strong{display:block;font-size:18px;margin:8px 0}.status-available{border-color:#4caf50}.status-reserved{border-color:#8e44ad}.status-seated{border-color:#3498db}.status-dining{border-color:#f39c12}.status-bill_requested{border-color:#e74c3c}.status-cleaning{border-color:#95a5a6}.status-disabled{opacity:.55}.admin-table{width:100%;border-collapse:collapse}.admin-table th,.admin-table td{padding:10px;border-bottom:1px solid #e5e7eb;text-align:left}.admin-table small{display:block;color:#777}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.form-grid input,.form-grid select,.inline-form input,.table-tile select{padding:10px;border:1px solid #d0d5dd;border-radius:8px}.form-grid button,.table-tile button,.inline-form button{padding:10px 16px;border:0;border-radius:8px;cursor:pointer}.handy{min-height:100vh;background:#eef1f4;padding:16px}.handy header{display:flex;justify-content:space-between;align-items:center}.handy-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.handy-table{min-height:110px;border:3px solid #bbb;border-radius:14px;background:#fff;font-size:18px;display:flex;flex-direction:column;justify-content:center;gap:5px}.handy-table strong{font-size:28px}.kds-headline{display:flex;justify-content:space-between;align-items:center}.ticket-time{font-size:12px;color:#8b5e00;margin:6px 0}.ticket-ready{border-left:6px solid #27ae60}.ticket-cooking{border-left:6px solid #f39c12}.ticket-sent{border-left:6px solid #e74c3c}.pos-table.selected{outline:4px solid #222}.pay-amount{width:100%;padding:12px;font-size:20px;margin:10px 0;border:1px solid #ccc;border-radius:8px}@media(max-width:800px){.topbar{align-items:flex-start;flex-direction:column}.handy-grid{grid-template-columns:repeat(2,1fr)}.table-grid{grid-template-columns:repeat(2,1fr)}}
/* V3 production UI */
body{background:#f2f1ed}.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#312016,#8b3d12)}.login-card{width:min(420px,92vw);background:#fff;padding:32px;border-radius:18px;box-shadow:0 18px 60px #0005}.login-card h1{margin:0 0 4px}.login-card label{display:grid;gap:6px;margin:16px 0;font-weight:700}.login-card input{padding:13px;border:1px solid #bbb;border-radius:9px;font-size:17px}.demo-login{margin-top:16px;padding:10px;background:#fff7e8;border-radius:8px;color:#8a4b0f}.alert-error,.alert-success{padding:11px 14px;border-radius:8px;margin:10px 0}.alert-error{background:#ffe8e8;color:#9b1c1c}.alert-success{background:#e7f7ec;color:#176b32}
.product-card{position:relative;transition:.12s}.product-card:active{transform:scale(.985)}.product-card.soldout{opacity:.55}.recommend-badge,.soldout-badge{position:absolute;top:8px;left:8px;padding:5px 9px;border-radius:12px;font-size:12px;font-weight:800}.recommend-badge{background:#e95005;color:#fff}.soldout-badge{background:#333;color:#fff}.food-placeholder{font-weight:900;font-size:54px;color:white}.product-price small{font-size:11px}.cart-summary{background:#252d39;color:#fff;padding:10px 14px;text-align:right;font-size:18px}.cart-mini-qty{display:flex;align-items:center;justify-content:flex-end;gap:7px}.cart-mini-qty button{width:28px;height:28px;border-radius:50%;border:1px solid #ddd;background:#fff}.cart-item{grid-template-columns:1fr auto;gap:5px}.cart-item>span{grid-column:1/3}.cart-item small,.confirm-row small{display:block;color:#777}.allergen{color:#a34c0c;background:#fff4df;padding:10px;border-radius:7px}.detail-wrap textarea{width:100%;margin-top:7px;padding:9px}.small-modal{max-width:540px}.service-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.service-grid button{padding:25px;border:1px solid #ddd;border-radius:12px;background:#fff;font-weight:800}.history-order{border-bottom:1px solid #ddd;padding:12px 0}.history-order>div{display:flex;justify-content:space-between}.history-order p{display:flex;justify-content:space-between;margin:7px 0}.history-order em{font-style:normal;font-size:12px;background:#eee;border-radius:10px;padding:2px 8px}
.kds{min-height:100vh;background:#17202a;color:#fff}.kds-headline{padding:14px 18px;background:#111820}.kds-headline h1{margin:0 0 8px}.kds-headline a{color:#fff}.station-filter{display:flex;gap:8px;flex-wrap:wrap}.station-filter button{border:1px solid #4c5967;background:#263342;color:#fff;border-radius:16px;padding:7px 12px}.station-filter button.active{background:#f39c12;color:#111}.kds-board{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:12px}.kds-board section{background:#202b36;border-radius:12px;padding:10px;min-height:calc(100vh - 125px)}.kds-board h2{margin:4px 6px 10px}.ticket{color:#222}.ticket-meta{display:flex;justify-content:space-between;font-size:12px;color:#666;margin-top:6px}.ticket-note{background:#fff3d6;padding:8px;border-radius:6px;font-weight:700}
.pos-shell{display:grid;grid-template-columns:330px 1fr;height:100vh;background:#edf0f2}.pos-tables{background:#20252b;color:#fff;padding:18px;overflow:auto}.pos-table-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.pos-table{min-height:78px;border:3px solid #777;border-radius:11px;background:#fff;display:flex;flex-direction:column;justify-content:center}.pos-table b{font-size:24px}.pos-main{padding:22px;overflow:auto}.pos-title{display:flex;justify-content:space-between;align-items:center}.bill{background:#fff;border-radius:12px;overflow:hidden}.bill-totals{padding:18px;font-size:19px;text-align:right;border-top:2px solid #222}.bill-totals>div{margin:6px}.bill-totals .due{font-size:28px}.payment-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.payment-buttons button{padding:25px 10px;border:0;border-radius:12px;background:#283442;color:#fff;font-weight:800}.payment-history{display:grid;grid-template-columns:1fr auto auto;gap:12px;padding:8px 12px;background:#fff;border-bottom:1px solid #eee}.pos-help{color:#666}
.stats.four{grid-template-columns:repeat(4,1fr)}.report-grid{display:grid;grid-template-columns:1fr 1.5fr;gap:16px}.metric-row{display:flex;justify-content:space-between;padding:10px;border-bottom:1px solid #eee}.bar-row{display:grid;grid-template-columns:60px 1fr 100px;gap:10px;align-items:center;padding:6px 0}.bar{height:18px;background:#e98a22;width:var(--w);min-width:2px;border-radius:4px}.filter-row{display:flex;gap:10px;flex-wrap:wrap}.filter-row input,.filter-row select{padding:9px;border:1px solid #ccc;border-radius:7px}.filter-row button{padding:9px 18px;border:0;border-radius:7px;background:#333;color:#fff}.order-line{padding:5px 0}.order-line.cancelled{text-decoration:line-through;color:#999}.inline-cancel{display:inline-flex;gap:3px;margin-left:8px}.inline-cancel input{width:80px}.inline-cancel button{font-size:11px}.pager{padding:15px}.pager svg{width:18px}.pager nav>div:first-child{display:none}
@media(max-width:1000px){.kds-board{grid-template-columns:1fr}.pos-shell{grid-template-columns:250px 1fr}.payment-buttons{grid-template-columns:1fr 1fr}.report-grid{grid-template-columns:1fr}.stats.four{grid-template-columns:1fr 1fr}}
/* Commercial operations */
:root{--ink:#17212b;--navy:#152536;--orange:#ee6b2f;--cream:#f7f3ec;--line:#dfe4e8;--green:#23845b}.commercial-page{background:linear-gradient(180deg,#eef2f4,#f8f6f1)}.topbar{background:linear-gradient(135deg,#132433,#243b4d);box-shadow:0 12px 30px #17212b25}.topbar small,.section-title small{letter-spacing:.14em;color:#f3a66f;font-weight:800}.ops-tabs{display:flex;gap:7px;overflow:auto;padding:6px;background:#fff;border-radius:14px;box-shadow:0 4px 20px #17212b12;margin-bottom:16px;position:sticky;top:8px;z-index:5}.ops-tabs button{white-space:nowrap;border:0;background:transparent;padding:12px 18px;border-radius:10px;font-weight:800;color:#596775}.ops-tabs button.active{background:var(--navy);color:#fff}.ops-panel{display:none}.ops-panel.active{display:block}.section-title{display:flex;justify-content:space-between;align-items:center;margin:22px 0 12px}.section-title h2{margin:4px 0}.compact{padding:10px 16px}.commercial-split{display:grid;grid-template-columns:1.5fr 1fr;gap:18px}.floor-canvas{height:620px;position:relative;border-radius:18px;background-color:#fff;background-image:linear-gradient(#e9edf0 1px,transparent 1px),linear-gradient(90deg,#e9edf0 1px,transparent 1px);background-size:25px 25px;box-shadow:inset 0 0 0 1px var(--line);overflow:hidden}.floor-node{position:absolute;touch-action:none;border:3px solid var(--green);background:#fff;border-radius:18px;box-shadow:0 8px 18px #17212b1c;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.floor-node b{font-size:24px}.floor-node.status-dining{border-color:#f09b35}.floor-node.status-bill_requested{border-color:#d84b4b}.qr-list{display:grid;gap:10px;max-height:620px;overflow:auto}.qr-card{display:grid;grid-template-columns:108px 1fr;gap:12px;background:#fff;border-radius:14px;padding:10px;box-shadow:0 4px 16px #17212b12}.qr-card img{width:108px;height:108px}.qr-card h3{margin:5px 0}.qr-card small{word-break:break-all;color:#74808b}.qr-actions{display:flex;gap:12px;margin-top:8px}.qr-actions form{display:inline}.qr-actions a,.qr-actions button{border:0;background:none;color:#d9561c;font-weight:800;padding:0}.stack-form{display:grid;gap:11px}.stack-form input,.stack-form select,.stack-form textarea,.inventory-card input{padding:12px;border:1px solid #ccd3d8;border-radius:9px;background:#fff}.tag-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.tag-list span{background:#edf2f5;padding:8px 11px;border-radius:20px}.option-summary{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--line)}.option-summary span{background:#fff4e8;border-radius:14px;padding:5px 8px}.inventory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}.inventory-card{display:grid;grid-template-columns:1fr auto;gap:8px;background:#fff;padding:14px;border-radius:13px;border:1px solid var(--line)}.inventory-card>div,.inventory-card>label{grid-column:1/3}.inventory-card small,.device-row small{display:block;color:#75818b}.inventory-card.low-stock{border:2px solid #db5a4f;background:#fff6f4}.inventory-card button{border:0;border-radius:8px;background:var(--navy);color:#fff}.cash-open{display:grid;padding:18px;background:#e9f7ef;border-radius:12px;margin-bottom:14px}.cash-open strong{font-size:32px}.danger{background:#c94040;color:#fff;border:0;border-radius:10px;padding:13px;font-weight:800}.device-row{display:grid;grid-template-columns:12px 1fr auto;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid var(--line)}.status-dot{width:10px;height:10px;border-radius:50%;background:#aab2b8}.status-dot.online,.status-dot.printed{background:#27a267}.status-dot.queued{background:#ec9d29}.calendar-toolbar{display:flex;justify-content:center;align-items:center;gap:28px}.calendar-toolbar a{text-decoration:none;color:#d9561c;font-weight:800}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-bottom:18px}.weekday{text-align:center;padding:8px}.calendar-day{min-height:84px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px;text-decoration:none;color:var(--ink);display:flex;flex-direction:column}.calendar-day span{color:#d9561c;font-weight:800;margin-top:auto}.calendar-day.selected{outline:3px solid var(--orange)}.calendar-day.muted{background:transparent;border:0}.inline-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}@media(max-width:900px){.commercial-split{grid-template-columns:1fr}.floor-canvas{height:480px}.qr-list{max-height:none}.calendar-day{min-height:58px;padding:5px}.calendar-day small{display:none}.topbar nav{gap:9px}.admin-shell{padding:10px}}
.handy-header{background:var(--navy);color:#fff;padding:14px 18px;border-radius:14px;margin-bottom:12px}.handy-header h1{margin:2px 0}.handy-header>div:last-child{display:flex;gap:18px}.handy-header a{color:#fff}.handy-header small{color:#f3a66f;letter-spacing:.12em}.call-strip{display:flex;gap:8px;overflow:auto;padding:10px;background:#fff1db;border-radius:12px;margin-bottom:12px}.call-strip button{border:0;background:#d95e27;color:#fff;padding:10px 14px;border-radius:20px;white-space:nowrap}.handy-sheet{max-height:92vh;overflow:auto}.session-card{display:flex;gap:12px;align-items:center;background:#eaf6ef;padding:12px;border-radius:10px}.session-card .course-timer{margin-left:auto;font-size:20px}.urgent,.course-pill.urgent{background:#d64040!important;color:#fff!important}.handy-order{border:1px solid var(--line);border-radius:10px;margin:10px 0;overflow:hidden}.handy-order header,.handy-order>div{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:10px}.handy-order header{background:#edf2f5}.handy-order button{border:0;background:#d95e27;color:#fff;border-radius:12px;padding:5px 9px}.handy-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;position:sticky;bottom:0;background:#fff;padding-top:12px}.handy-products{display:grid;grid-template-columns:1fr 1fr;gap:7px;max-height:45vh;overflow:auto}.handy-products h3{grid-column:1/3;margin:10px 0 2px}.handy-product{display:grid;grid-template-columns:1fr auto;border:1px solid var(--line);background:#fff;border-radius:10px;padding:12px;text-align:left}.handy-product small{grid-column:2;font-size:18px}.handy-cart{margin:12px 0}.handy-cart>div{display:grid;grid-template-columns:1fr auto auto auto auto;gap:8px;align-items:center;padding:7px;border-bottom:1px solid var(--line)}.handy-cart button{width:28px;height:28px;border-radius:50%;border:1px solid var(--line)}#handyNote{width:100%;padding:10px;margin-bottom:10px}.pos-brand{margin-bottom:18px}.pos-brand h2{margin:4px 0}.cash-state{display:inline-block;padding:5px 10px;border-radius:14px;background:#a93f3f}.cash-state.open{background:#1f875c}.pos-admin-link{display:block;color:#fff;margin-top:20px}.pos-workspace{display:grid;grid-template-columns:1.5fr .8fr;gap:16px}.amount-label{display:grid;gap:5px;margin-top:10px;font-weight:800}.payment-buttons button{display:grid;gap:5px;font-size:22px}.payment-buttons span{font-size:14px}.refund-panel{background:#fff;border-radius:12px;padding:14px;max-height:75vh;overflow:auto}.refund-panel article{padding:11px 0;border-bottom:1px solid var(--line)}.refund-panel article>div{display:flex;justify-content:space-between;gap:8px}.refund-panel strong{display:block;font-size:18px;margin:6px 0}.refund-panel strong small{font-weight:400;color:#777}.refund-panel button,.refund-panel a,.csv-button{border:0;background:#fff1e8;color:#c94f1c;padding:7px 11px;border-radius:8px;text-decoration:none;font-weight:800}.detail-options fieldset{border:1px solid var(--line);border-radius:10px;margin:8px 0;padding:10px}.detail-options label{display:block;padding:7px}.bottom-tools select{border:1px solid #ddd;border-radius:20px;padding:7px}.course-pill{background:#203449!important;color:#fff;font-weight:800}@media(max-width:900px){.pos-workspace{grid-template-columns:1fr}.refund-panel{max-height:none}.handy-actions{grid-template-columns:1fr}.handy-products{grid-template-columns:1fr}.handy-products h3{grid-column:1}.modal-card{padding:20px}.detail-wrap{grid-template-columns:1fr}.pad-shell{height:calc(100vh - 65px);grid-template-columns:105px 1fr}.category-rail{font-size:12px}.brand,.rail-bottom{padding:12px;font-size:15px}.product-grid{grid-template-columns:repeat(2,1fr)}.product-image{height:125px}.cart-panel{width:min(88vw,340px);z-index:10}.bottom-tools{height:65px;padding:6px;justify-content:center}.bottom-tools button{padding:7px}}
.mobile-cart-toggle{display:none}@media(max-width:900px){.mobile-cart-toggle{display:block!important;background:#e85a05!important;color:#fff!important}.cart-panel.open{transform:translateX(0);box-shadow:-12px 0 35px #0005}}
.product-admin-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:12px}.product-edit-card{border:1px solid var(--line);border-radius:12px;padding:12px}.product-edit-title{display:grid;grid-template-columns:54px 1fr auto;gap:10px;align-items:center;margin-bottom:10px}.product-edit-title img{width:54px;height:54px;object-fit:cover;border-radius:9px}.product-edit-title small{display:block;color:#77828b}.product-edit-card label{display:flex;align-items:center;gap:7px}@media(max-width:650px){.product-admin-list{grid-template-columns:1fr}.product-edit-card .form-grid{grid-template-columns:1fr}}

/* V4 role-first navigation and settings */
.app-nav{height:76px;position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:22px;padding:9px 20px;background:#101d29;color:#fff;box-shadow:0 5px 22px #101d2930}.app-nav a{text-decoration:none}.app-nav-brand{display:flex;align-items:center;gap:10px;color:#fff;font-weight:900;white-space:nowrap}.app-nav-brand>span{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:var(--orange);font-size:22px}.app-nav-brand small{display:block;color:#91a1ae;font-size:10px}.role-launchers{display:flex;align-self:stretch;gap:7px}.role-link{min-width:112px;display:grid;align-content:center;padding:7px 13px;border-radius:10px;color:#dce5eb}.role-link small{color:#91a1ae;font-size:10px}.role-link:hover,.role-link.active{background:#263b4c;color:#fff}.role-link.active{box-shadow:inset 0 -3px var(--orange)}.manage-menu{margin-left:auto;position:relative}.manage-menu summary{list-style:none;background:#fff;color:#17212b;border-radius:10px;padding:11px 15px;font-weight:800;cursor:pointer}.manage-menu summary::-webkit-details-marker{display:none}.manage-popover{position:absolute;right:0;top:50px;width:260px;background:#fff;color:#17212b;border-radius:14px;padding:10px;box-shadow:0 18px 55px #0004;display:grid}.manage-popover strong{padding:9px 10px 5px;color:#9b4a22;font-size:11px;letter-spacing:.1em}.manage-popover a{padding:9px 10px;border-radius:8px;color:#293845}.manage-popover a:hover{background:#f3f5f6}.nav-user{display:flex;gap:10px;align-items:center;white-space:nowrap;margin-left:auto}.nav-user form{margin:0}.nav-user button{border:0;background:transparent;color:#aebbc5;font-size:12px}.topbar nav{display:none!important}.has-app-nav .pos,.has-app-nav .kds,.has-app-nav .handy{min-height:calc(100vh - 76px);height:auto}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;margin:12px 0 20px}.page-heading small{color:#c75524;font-weight:900;letter-spacing:.13em}.page-heading h1{font-size:34px;margin:4px 0}.page-heading p{color:#6f7c85;margin:0}.operation-launch-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:18px}.operation-launch{min-height:176px;padding:20px;border-radius:18px;color:#fff;display:grid;grid-template-columns:auto 1fr;gap:14px;position:relative;overflow:hidden}.operation-launch>span{font-size:12px;border:1px solid #ffffff70;border-radius:20px;height:min-content;padding:4px 8px}.operation-launch h2{font-size:23px;margin:6px 0}.operation-launch p{margin:0;color:#ffffffc9}.operation-launch>b{grid-column:2;align-self:end}.operation-launch.hall{background:linear-gradient(135deg,#1e704f,#2e9b70)}.operation-launch.register{background:linear-gradient(135deg,#b84b1e,#ed7138)}.operation-launch.kitchen{background:linear-gradient(135deg,#263e56,#476780)}.home-columns{display:grid;grid-template-columns:2fr 1fr;gap:18px}.section-title a{color:#c75524;text-decoration:none;font-weight:800}.reservation-row{display:grid;grid-template-columns:55px 1fr;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.reservation-row time{font-size:18px;font-weight:900}.reservation-row small{display:block;color:#78838c}.settings-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:18px}.setting-note{margin-top:13px;padding:11px;background:#edf3f6;border-radius:9px;overflow-wrap:anywhere}.table-settings-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:12px}.table-setting-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:13px}.table-setting-card form:first-child{display:grid;grid-template-columns:1fr 1fr;gap:8px}.table-setting-card input,.table-setting-card button{padding:10px;border:1px solid #d2d9de;border-radius:8px}.table-setting-title{grid-column:1/3;display:flex;justify-content:space-between}.table-setting-card input[name=name]{grid-column:1/3}.table-setting-card form:first-child button{background:var(--navy);color:#fff}.text-danger{border:0!important;background:transparent!important;color:#bb3434!important;padding:9px 0!important}.file-field{border:1px dashed #b7c1c8;border-radius:8px;padding:9px!important;display:grid!important;gap:5px!important}.file-field input{padding:0!important;border:0!important}.product-form textarea{padding:10px;border:1px solid #d0d5dd;border-radius:8px}.product-edit-card{background:#fff}.product-edit-card>form:last-child{text-align:right;margin-top:7px}
@media(max-width:900px){.app-nav{height:auto;min-height:66px;padding:8px 10px;gap:8px;flex-wrap:wrap}.app-nav-brand div,.nav-user>span{display:none}.role-launchers{order:3;width:100%;justify-content:space-between}.role-link{min-width:0;flex:1;text-align:center}.manage-menu{margin-left:auto}.manage-popover{position:fixed;right:10px;top:58px;width:calc(100vw - 20px)}.operation-launch-grid,.home-columns,.settings-grid{grid-template-columns:1fr}.operation-launch{min-height:145px}.page-heading time{display:none}.floor-grid{grid-template-columns:repeat(2,1fr)}.has-app-nav .pos,.has-app-nav .kds,.has-app-nav .handy{min-height:calc(100vh - 118px)}}

/* Customer welcome and branding */
.customer-welcome{position:fixed;inset:0;z-index:100;background:#17212b var(--welcome-bg) center/cover no-repeat;color:#fff;display:grid;place-items:center;overflow:auto;transition:opacity .35s,visibility .35s}.customer-welcome.dismissed{opacity:0;visibility:hidden;pointer-events:none}.welcome-shade{position:absolute;inset:0;background:linear-gradient(135deg,#101923ed,#3b2416b5)}.welcome-content{position:relative;width:min(980px,92vw);padding:46px 24px;text-align:center}.welcome-logo{max-width:190px;max-height:92px;object-fit:contain;margin-bottom:18px}.welcome-store{font-size:15px;font-weight:900;letter-spacing:.22em;color:#ffc69c}.welcome-content h1{font-size:clamp(36px,7vw,72px);margin:10px 0}.welcome-content>p{font-size:clamp(15px,2.2vw,21px);margin:0 auto 15px;max-width:680px;color:#e7edf1}.welcome-promotion{display:inline-block;padding:9px 18px;border:1px solid #ffffff75;border-radius:30px;background:#ffffff18;font-weight:800}.welcome-featured{margin:28px auto 24px}.welcome-featured>small{letter-spacing:.18em;color:#ffbb8a;font-weight:900}.welcome-featured>div{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-top:10px}.welcome-featured article{background:#fff;color:#1b2730;border-radius:12px;overflow:hidden;text-align:left}.welcome-featured article img{width:100%;height:94px;object-fit:cover}.welcome-featured article span{display:grid;padding:8px;font-size:12px}.welcome-featured article b{color:#d75822;margin-top:4px}.welcome-content>button{border:0;border-radius:40px;background:var(--orange);color:#fff;font-size:19px;font-weight:900;padding:16px 34px;box-shadow:0 10px 28px #0005}.welcome-content>button span{margin-left:18px}.welcome-table{display:block;margin-top:13px;color:#bbc8d1}.brand-preview{min-height:170px;background:#1b2d3c center/cover;border-radius:13px;padding:24px;color:#fff;display:flex;align-items:flex-end;gap:16px;margin:12px 0 18px}.brand-preview img{width:92px;height:70px;object-fit:contain}.brand-preview div{display:grid}.brand-preview b{font-size:24px}.brand-preview span{color:#dce5eb}.recommend-settings{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}.recommend-settings label{display:grid;grid-template-columns:auto 58px 1fr;align-items:center;gap:9px;border:1px solid var(--line);border-radius:11px;padding:8px}.recommend-settings img{width:58px;height:50px;object-fit:cover;border-radius:7px}.recommend-settings span{font-weight:800}.recommend-settings small{display:block;color:#d75822}.settings-save{margin-top:18px}.stack-form label{display:grid;gap:6px;font-weight:700}.stack-form label>input,.stack-form label>textarea{width:100%}
@media(max-width:700px){.welcome-content{padding:22px 12px}.welcome-featured>div{grid-template-columns:repeat(3,1fr)}.welcome-featured article:nth-child(n+4){display:none}.welcome-featured article img{height:72px}.welcome-content h1{font-size:38px}.welcome-logo{max-height:65px}.recommend-settings{grid-template-columns:1fr 1fr}.recommend-settings label{grid-template-columns:auto 1fr}.recommend-settings img{display:none}}
.menu-brand-badge{position:fixed;z-index:12;left:0;top:0;width:190px;min-height:78px;padding:10px 12px;background:#4e1607;color:#fff;display:flex;align-items:center;gap:9px}.menu-brand-badge img{width:52px;height:52px;object-fit:contain}.menu-brand-badge>span{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:10px;background:#e85a05;font-size:23px;font-weight:900}.menu-brand-badge strong{font-size:14px;line-height:1.35;overflow-wrap:anywhere}.category-rail>.brand{min-height:78px;color:transparent}@media(max-width:900px){.menu-brand-badge{width:105px;min-height:65px;padding:7px;display:grid;grid-template-columns:32px 1fr;gap:5px}.menu-brand-badge img,.menu-brand-badge>span{width:32px;height:32px;font-size:17px}.menu-brand-badge strong{font-size:10px}.category-rail>.brand{min-height:65px}}

/* Two-level menu navigation */
.menu-group-list{flex:1;overflow:auto}.menu-group{border-bottom:1px solid #8f3d20}.menu-group-toggle{width:100%;min-height:58px;border:0;background:linear-gradient(180deg,#a7461b,#87330f);color:#fff;padding:10px 12px;text-align:left;font-weight:900;display:flex;align-items:center;justify-content:space-between;line-height:1.25}.menu-group-toggle b{font-size:19px;transition:transform .2s}.menu-group.open .menu-group-toggle{background:#be551f}.menu-group.open .menu-group-toggle b{transform:rotate(180deg)}.menu-subcategories{display:grid;grid-template-rows:0fr;overflow:hidden;background:#5d230e;transition:grid-template-rows .22s}.menu-subcategories>*{min-height:0}.menu-group.open .menu-subcategories{grid-template-rows:1fr}.menu-subcategories .cat-btn{font-size:13px;padding:13px 9px;background:#713319;border-left:4px solid transparent}.menu-subcategories .cat-btn.active{background:#d7c929;color:#241c12;border-left-color:#fff}.menu-subcategories>small{display:block;padding:14px 9px;color:#dbc9c0}.category-rail .rail-bottom{flex:none}.category-rail{overflow:hidden}@media(max-width:900px){.menu-group-toggle{font-size:11px;min-height:52px;padding:8px 6px}.menu-subcategories .cat-btn{font-size:10px;padding:11px 5px}.menu-group-toggle b{font-size:15px}}
.category-assignment{display:grid;grid-template-columns:1fr minmax(150px,1fr) auto;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}.category-assignment select,.category-assignment button,.menu-group-admin input,.menu-group-admin button{padding:9px;border:1px solid #ccd4da;border-radius:8px}.category-assignment button,.menu-group-admin button{background:var(--navy);color:#fff}.menu-group-admin{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}.menu-group-admin .panel{display:grid;grid-template-columns:1fr 90px;gap:9px;margin:0}.menu-group-admin .section-title,.menu-group-admin label,.menu-group-admin button{grid-column:1/3}.menu-group-admin h3{margin:0}@media(max-width:650px){.category-assignment{grid-template-columns:1fr}.menu-group-admin{grid-template-columns:1fr}}
.menu-subcategories{display:block;max-height:0;transition:max-height .25s ease}.menu-group.open .menu-subcategories{max-height:700px}

/* V5 full-height admin sidebar */
.has-admin-sidebar{background:#eef1f3}.admin-sidebar{position:fixed;inset:0 auto 0 0;width:258px;z-index:60;background:#142330;color:#fff;display:flex;flex-direction:column;overflow:auto;box-shadow:8px 0 30px #1423301f}.sidebar-brand{display:flex;align-items:center;gap:11px;padding:20px 18px;color:#fff;text-decoration:none;border-bottom:1px solid #ffffff14}.sidebar-brand>span{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--orange);font-size:23px;font-weight:900}.sidebar-brand div{display:grid}.sidebar-brand small{color:#8ea1af;font-size:10px}.admin-sidebar nav{padding:10px;flex:1}.admin-sidebar nav section{display:grid;margin-bottom:12px}.admin-sidebar nav section>small{padding:10px 11px 6px;color:#f0a16e;font-size:10px;font-weight:900;letter-spacing:.12em}.admin-sidebar nav a{color:#d9e2e8;text-decoration:none;padding:10px 12px;border-radius:8px;font-size:14px}.admin-sidebar nav a:hover,.admin-sidebar nav a.active{background:#263b4c;color:#fff}.admin-sidebar nav a.active{box-shadow:inset 3px 0 var(--orange)}.sidebar-operations{padding:12px 16px;border-top:1px solid #ffffff14}.sidebar-operations>small{color:#8ea1af}.sidebar-operations>div{display:flex;gap:6px;margin-top:8px}.sidebar-operations a{flex:1;text-align:center;background:#263b4c;color:#fff;padding:7px 4px;border-radius:7px;text-decoration:none;font-size:12px}.admin-sidebar footer{display:flex;justify-content:space-between;gap:8px;padding:14px 16px;background:#0e1a23}.admin-sidebar footer div{display:grid}.admin-sidebar footer small{color:#8ea1af}.admin-sidebar footer form{margin:0}.admin-sidebar footer button{border:0;background:transparent;color:#b9c5cd;font-size:11px}.admin-workspace{margin-left:258px;min-height:100vh;width:calc(100% - 258px)}.admin-workspace>.admin-shell,.admin-workspace>main{width:100%;max-width:none}.has-admin-sidebar .topbar{background:transparent;color:var(--ink);box-shadow:none;padding:5px 0;margin-bottom:14px}.has-admin-sidebar .topbar small{color:#c55525}.staff-summary{display:flex;gap:10px;margin-bottom:16px}.staff-summary span{background:#fff;border:1px solid var(--line);padding:10px 15px;border-radius:10px}.staff-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px}.staff-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px;box-shadow:0 5px 18px #17212b0b}.staff-card.inactive{opacity:.68}.staff-card>header{display:grid;grid-template-columns:48px 1fr auto;gap:10px;align-items:center;margin-bottom:14px}.staff-avatar{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#e7edf1;color:#243a4b;font-size:21px;font-weight:900}.staff-card h2{font-size:18px;margin:0}.staff-card header span{color:#78858f;font-size:12px}.staff-card header em{font-style:normal;background:#e5f5eb;color:#1e754e;padding:5px 9px;border-radius:20px;font-size:11px}.staff-card.inactive header em{background:#eee;color:#777}.staff-edit-form{display:grid;grid-template-columns:1fr 1fr;gap:9px}.staff-edit-form label{display:grid;gap:4px;color:#66737c;font-size:12px}.staff-edit-form input,.staff-edit-form select{width:100%;padding:10px;border:1px solid #ccd4da;border-radius:8px;background:#fff}.password-fields{grid-column:1/3;display:grid;grid-template-columns:1fr 1fr;gap:9px;padding-top:8px;border-top:1px solid var(--line)}.staff-edit-form>small{align-self:center}.save-staff{border:0;border-radius:8px;background:var(--navy);color:#fff;font-weight:800}.staff-card>footer{display:flex;justify-content:flex-end;gap:12px;margin-top:12px;border-top:1px solid var(--line);padding-top:8px}.staff-card>footer form{margin:0}.staff-card>footer button{border:0;background:transparent;color:#52616c;padding:7px}.staff-management .page-heading button{align-self:center}
@media(max-width:820px){.admin-sidebar{position:sticky;width:100%;height:auto;max-height:none;overflow:visible}.admin-sidebar .sidebar-brand{padding:10px 14px}.admin-sidebar nav{display:flex;overflow:auto;padding:6px}.admin-sidebar nav section{display:flex;margin:0}.admin-sidebar nav section>small{display:none}.admin-sidebar nav a{white-space:nowrap}.sidebar-operations,.admin-sidebar footer{display:none}.admin-workspace{margin-left:0;width:100%}.staff-card-grid{grid-template-columns:1fr}.page-heading{gap:10px}.page-heading h1{font-size:28px}.password-fields{grid-template-columns:1fr}.password-fields label{grid-column:1/3}}

/* V6 collapsible administration and full-height customer categories */
.admin-toolbar{height:70px;position:sticky;top:0;z-index:45;display:flex;align-items:center;gap:14px;padding:9px 18px;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 4px 16px #17212b0b}.admin-toolbar>button{width:40px;height:40px;border:1px solid var(--line);border-radius:9px;background:#f5f7f8}.admin-toolbar>strong{white-space:nowrap}.admin-toolbar nav{display:flex;gap:7px;margin-left:auto}.admin-toolbar nav a{min-width:105px;padding:8px 12px;border-radius:9px;background:#25394a;color:#fff;text-decoration:none;font-weight:800}.admin-toolbar nav small{display:block;color:#aebbc5;font-size:10px}.toolbar-user{display:flex;align-items:center;gap:12px;padding-left:12px;border-left:1px solid var(--line)}.toolbar-user>span{display:grid;font-weight:800}.toolbar-user small{color:#7c8992;font-size:10px}.toolbar-user form{margin:0}.toolbar-user button{border:0;background:#fff0e9;color:#bd4b1c;padding:9px 11px;border-radius:8px}.admin-sidebar nav section>small{cursor:pointer;display:flex;align-items:center;justify-content:space-between}.admin-sidebar nav section>small:after{content:'⌄';font-size:15px;transition:transform .2s}.admin-sidebar nav section.closed>small:after{transform:rotate(-90deg)}.admin-sidebar nav section.closed>a{display:none}.admin-sidebar,.admin-workspace{transition:width .22s,margin-left .22s}.admin-sidebar-collapsed .admin-sidebar{width:72px}.admin-sidebar-collapsed .sidebar-brand div,.admin-sidebar-collapsed .admin-sidebar nav span,.admin-sidebar-collapsed .admin-sidebar nav section>small,.admin-sidebar-collapsed .sidebar-operations,.admin-sidebar-collapsed .admin-sidebar footer{display:none}.admin-sidebar-collapsed .admin-sidebar nav a{display:grid;place-items:center;font-size:0;padding:12px}.admin-sidebar-collapsed .admin-sidebar nav a i{font-size:18px;font-style:normal}.admin-sidebar-collapsed .admin-workspace{margin-left:72px;width:calc(100% - 72px)}.category-rail .rail-bottom{display:none}.menu-group-list{padding-bottom:10px}.menu-subcategories .cat-btn{display:block;width:100%;min-height:48px;text-align:center;white-space:normal}.menu-group-toggle{width:100%}
@media(max-width:820px){.admin-toolbar{height:auto;flex-wrap:wrap;padding:7px 10px}.admin-toolbar nav{order:3;width:100%;overflow:auto}.admin-toolbar nav a{flex:1;min-width:92px}.toolbar-user>span{display:none}.admin-sidebar-collapsed .admin-sidebar{width:100%}.admin-sidebar-collapsed .admin-workspace{margin-left:0;width:100%}.admin-sidebar-collapsed .admin-sidebar nav{display:none}}
.service-grid button,.modal-actions button,.bottom-tools button,.cart-actions button{box-shadow:0 5px 0 #c7cbd0,0 8px 16px #17212b22;transform:translateY(0);transition:transform .08s,box-shadow .08s,filter .12s}.service-grid button:hover,.modal-actions button:hover,.bottom-tools button:hover,.cart-actions button:hover{filter:brightness(.97)}.service-grid button:active,.service-grid button.pressed,.modal-actions button:active,.bottom-tools button:active,.cart-actions button:active{transform:translateY(4px);box-shadow:0 1px 0 #aeb3b8,0 3px 7px #17212b20}.service-grid button:disabled{opacity:.72}.pad-toast{position:fixed;z-index:200;left:50%;bottom:90px;transform:translate(-50%,25px);opacity:0;pointer-events:none;min-width:280px;max-width:90vw;padding:16px 22px;border-radius:12px;background:#176b45;color:#fff;text-align:center;font-size:17px;font-weight:900;box-shadow:0 12px 35px #0004;transition:.2s}.pad-toast.show{opacity:1;transform:translate(-50%,0)}.pad-toast.error{background:#b63737}
/* Group navigation and focused product settings */
.admin-sidebar nav section{display:grid;gap:4px;margin-bottom:10px;padding:5px;background:#192c3b;border:1px solid #ffffff0b;border-radius:12px}
.sidebar-group-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;padding:12px 10px;border:0;border-radius:8px;background:#223949;color:#b9cbd6;font:inherit;font-size:13px;font-weight:700;text-align:left;cursor:pointer}
.sidebar-group-toggle:after{content:'›';font-size:20px;line-height:1;transform:rotate(90deg);transition:transform .18s}
.closed>.sidebar-group-toggle:after{transform:rotate(0)}
.sidebar-group-toggle:hover{background:#2d485b;color:#fff}
.has-selection>.sidebar-group-toggle{background:#365064;color:#fff}
.admin-sidebar nav section>a{margin:0 3px;padding:11px 12px;color:#aebfca;font-size:13px;border-radius:7px}
.admin-sidebar nav section>a:hover{background:#294355;color:#fff}
.admin-sidebar nav section>a.active{background:#fff0e6;color:#a4431c;box-shadow:inset 3px 0 #e8783c;font-weight:700}
.admin-sidebar nav section.closed>a{display:none}
.sidebar-group-toggle:focus-visible,.admin-sidebar nav a:focus-visible{outline:2px solid #f0a16e;outline-offset:2px}
.admin-sidebar-collapsed .sidebar-group-toggle{font-size:10px;padding:8px 2px;white-space:normal}
.admin-sidebar-collapsed .sidebar-group-toggle:after{display:none}
#tab-structure .settings-grid,.option-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
#tab-structure .panel,#tab-menu .panel{min-width:0;padding:24px;border-radius:14px}
#tab-structure h2,#tab-menu h2{margin:0 0 16px;font-size:18px}
#tab-structure h3{margin:26px 0 12px;padding-top:20px;border-top:1px solid var(--line);font-size:15px}
#tab-structure .section-title{margin-bottom:18px}
#tab-structure .section-title p{margin:0;color:#647580}
#tab-structure .category-assignment{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,1fr) auto;align-items:center;gap:10px;padding:12px 0}
#tab-structure .category-assignment b{overflow-wrap:anywhere}
#tab-structure .menu-group-admin form{display:grid;grid-template-columns:minmax(0,1fr) 64px auto auto;gap:8px;align-items:center}
#tab-structure input,#tab-structure select{min-width:0;width:100%}
#tab-structure input[type=checkbox]{width:auto}
#tab-menu .option-summary{padding:14px 0;border-bottom:1px solid var(--line);display:flex;gap:10px;flex-wrap:wrap}
.settings-description,.settings-empty{color:#647580;line-height:1.7;margin:0 0 20px}
.settings-empty{padding:24px;background:#f4f7f9;border-radius:10px;text-align:center;margin:0}
#tab-stock .inventory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
#tab-stock .inventory-card{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:20px;border-radius:14px}
#tab-stock .inventory-card>div,#tab-stock .inventory-card>label:first-of-type,#tab-stock .inventory-card>button{grid-column:1/-1}
#tab-stock .inventory-card>label{display:block;font-size:12px;color:#647580}
#tab-stock .inventory-card input[type=number]{display:block;width:100%;min-width:0;margin-top:6px}
#tab-stock .inventory-card>button{padding:10px;background:var(--navy);color:#fff;border:0;border-radius:8px}
@media(max-width:1100px){#tab-structure .settings-grid,.option-layout{grid-template-columns:1fr}}
@media(max-width:820px){.admin-sidebar nav{display:block;overflow:visible}.admin-sidebar nav section{display:grid;margin-bottom:8px}.admin-sidebar nav section>a{white-space:normal}}

/* Consistent pointer, keyboard and pressed feedback */
:where(button,input[type=submit],input[type=button],a[href],summary,[role=button]){
    -webkit-tap-highlight-color:#e8783c33;
    transition:background-color .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease,filter .16s ease;
}
:where(a[href],summary,[role=button]){cursor:pointer}
a[href]{text-underline-offset:4px;text-decoration-thickness:2px}
@media(hover:hover){
    button:not(:disabled):not([aria-disabled=true]):hover,
    input[type=submit]:not(:disabled):hover,
    input[type=button]:not(:disabled):hover{
        filter:brightness(.91);
        box-shadow:0 0 0 2px #e8783c55,0 5px 14px #14233026;
    }
    a[href]:not([aria-disabled=true]):hover{
        text-decoration:none;
        box-shadow:0 0 0 2px #e8783c66;
        filter:brightness(.94);
    }
    .admin-sidebar nav a:hover,.app-nav a:hover,.admin-toolbar nav a:hover{
        text-decoration:none;
        box-shadow:inset 3px 0 #f0a16e,0 0 0 1px #f0a16e88;
    }
    summary:hover,[role=button]:not([aria-disabled=true]):hover{background-color:#e8783c22}
}
body :is(button,input[type=submit],input[type=button],a[href],summary,[role=button]):focus-visible{
    outline:3px solid #de6b2c;
    outline-offset:3px;
    box-shadow:0 0 0 6px #fff;
}
body :is(.admin-sidebar,.app-nav) :is(button,a[href]):focus-visible{
    outline-color:#ffc18f;
    box-shadow:0 0 0 6px #142330;
}
button:not(:disabled):not([aria-disabled=true]):active,
input[type=submit]:not(:disabled):active,
input[type=button]:not(:disabled):active,
a[href]:not([aria-disabled=true]):active{
    filter:brightness(.82);
    box-shadow:inset 0 2px 5px #14233044;
}
button:disabled,input[type=submit]:disabled,input[type=button]:disabled,[aria-disabled=true]{cursor:not-allowed;opacity:.55}
@media(prefers-reduced-motion:reduce){
    :where(button,input[type=submit],input[type=button],a[href],summary,[role=button]){transition:none!important}
}
.cash-preview,.cash-result{padding:18px 20px;border:1px solid #d6e0e5;border-radius:12px;background:#f5f8fa;margin:0 0 18px}.cash-preview>span{display:block;font-weight:700;margin-bottom:12px}.cash-preview>div,.cash-result>div{display:flex;justify-content:space-between;gap:16px;padding:7px 0}.cash-preview .cash-change{color:#176b45;border-top:1px solid #d6e0e5;margin-top:6px;font-size:22px}.cash-preview p:empty{display:none}.cash-preview p{color:#99601b;font-size:13px;margin-bottom:0}.cash-result{background:#eaf7ef;border-color:#83bb96}.cash-result h3{margin:0 0 10px;color:#176b45}.cash-result strong{font-size:20px}.cash-result[hidden]{display:none}

a[href],a[href]:hover,a[href]:focus,a[href]:active{text-decoration:none}
.cash-result .receipt-action{display:block;margin-top:14px;padding:12px 16px;border-radius:8px;background:#223949;color:#fff;text-align:center;font-weight:700;text-decoration:none}
.auto-print-setting{padding:14px 16px;margin:0 0 16px;border:1px solid #d6e0e5;border-radius:10px;background:#fff}.auto-print-setting label{display:flex;align-items:center;gap:10px;font-weight:700;cursor:pointer}.auto-print-setting input{width:18px;height:18px;accent-color:#e8783c}.auto-print-setting small{display:block;margin:7px 0 0 28px;color:#647580}
.device-filters{display:grid;grid-template-columns:2fr 1fr 1fr auto;align-items:end;gap:12px}.device-filters label,.device-setup-grid label{display:grid;gap:6px;font-size:13px;color:#526570}.device-filters input,.device-filters select,.device-setup-grid select{width:100%;padding:11px;border:1px solid #cdd7de;border-radius:8px;background:white}.device-filters button,.device-guide-button{padding:11px;border:1px solid #cdd7de;border-radius:8px;background:#edf3f7;color:#223949}.device-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}.device-search-card{border:1px solid #dae2e7;border-radius:12px;padding:18px;min-width:0}.device-search-card h3{margin:0}.device-search-card dl{font-size:12px}.device-search-card dd{margin:0 0 8px;overflow-wrap:anywhere}.device-search-card dt{color:#74828d}.device-state{padding:4px 8px;border-radius:20px;font-size:11px;white-space:nowrap;background:#edf0f2}.device-state.online{background:#e2f5e9;color:#246c45}.device-setup-grid{display:grid;grid-template-columns:minmax(260px,1fr) minmax(0,2fr);gap:20px;align-items:start}.device-setup-grid li{margin:12px 0;line-height:1.8}#deviceSetupGuide{scroll-margin-top:90px}#deviceApiGuide{margin-top:20px;padding:14px;background:#f1f5f8;border-radius:10px}#deviceApiGuide code{overflow-wrap:anywhere}#tab-devices [hidden]{display:none!important}@media(max-width:1000px){.device-filters{grid-template-columns:1fr 1fr}.device-setup-grid{grid-template-columns:1fr}}@media(max-width:500px){.device-filters{grid-template-columns:1fr}}
.connection-fields{display:grid;gap:12px}.connection-fields label{display:grid;gap:6px}.connection-fields small{color:#687d89}.device-edit{margin-top:14px}.device-edit summary{padding:10px;background:#edf3f7;border-radius:8px;cursor:pointer}.device-edit form{margin-top:12px}.discovery-actions{display:flex;gap:12px;flex-wrap:wrap}.discovery-actions button,#discoveryResults button{padding:12px 16px;border:1px solid #b5c9d5;border-radius:8px;background:#223949;color:white}#discoveryStatus{font-weight:700;color:#35546b}
.canon-example ol{line-height:1.9;padding-left:22px}.canon-example li{margin:10px 0}.canon-example details{margin-top:18px}.canon-example button,.test-device-connection{padding:11px 15px;background:#edf3f7;color:#223949;border:1px solid #bdcdd8;border-radius:8px;cursor:pointer}.connection-test-result:empty{display:none}.connection-test-result,[id=canonWebResult]{font-size:13px;line-height:1.7}.connection-test-result[data-state=success],[id=canonWebResult][data-state=success]{color:#176b45}.connection-test-result[data-state=error],[id=canonWebResult][data-state=error]{color:#ab3434}

.device-delete-form{margin-top:14px}.device-delete-form .danger:hover{background:#a62f2f}.device-delete-form .danger:focus-visible{outline:3px solid #ed9999;outline-offset:3px}

/* Keep staff dialogs above the sticky navigation, including on short screens. */
.handy .modal{z-index:100;padding:12px}
.handy .modal-card{max-height:calc(100dvh - 24px);overflow:auto}
.handy-modal-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:-34px -34px 18px;padding:14px 20px;background:#fff;border-bottom:1px solid var(--line)}
.handy-modal-header h2{margin:0}
.handy-modal-header .modal-x{position:static;flex:0 0 44px;width:44px;height:44px;display:grid;place-items:center;padding:0;line-height:1;border-radius:10px;background:#f2f4f6;color:var(--ink)}
.handy-modal-header .modal-x:hover{background:#ffe9db}
.handy-modal-header .modal-x:focus-visible{outline:3px solid var(--orange);outline-offset:2px}

/* Shared table-state palette for floor service, POS and table administration. */
.status-available{--table-bg:#e7f5ed;--table-border:#58a77b;--table-ink:#205c3b}
.status-reserved{--table-bg:#f0eafb;--table-border:#9672bd;--table-ink:#614080}
.status-seated{--table-bg:#e5f2fc;--table-border:#639fc9;--table-ink:#255c82}
.status-dining{--table-bg:#fff0d6;--table-border:#dba34a;--table-ink:#805310}
.status-bill_requested{--table-bg:#fde6e6;--table-border:#d87a7a;--table-ink:#8f3636}
.status-paying{--table-bg:#ffe9db;--table-border:#d78b58;--table-ink:#89471f}
.status-paid{--table-bg:#e0f3f2;--table-border:#61a6a2;--table-ink:#24635f}
.status-cleaning{--table-bg:#edf0f4;--table-border:#9ba6b4;--table-ink:#526071}
.status-disabled{--table-bg:#e1e3e6;--table-border:#93999f;--table-ink:#51575e}
:is(.handy-table,.pos-table,.table-tile,.floor-table,.floor-node){background:var(--table-bg,#fff);border-color:var(--table-border,#bbb);color:var(--table-ink,#292929)}
:is(.handy-table,.pos-table,.floor-table,.floor-node){transition:box-shadow .15s ease,filter .15s ease}
:is(.handy-table,.pos-table,.floor-table,.floor-node):hover{filter:brightness(.97);box-shadow:0 4px 14px #17212b20}
:is(.handy-table,.pos-table,.floor-table,.floor-node):focus-visible{outline:3px solid #25394a;outline-offset:3px}
.pos-table.selected{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 6px #ee6b2f}
:is(.handy-table,.pos-table,.floor-table,.floor-node) small{color:inherit}

.kds-controls{display:flex;align-items:center;flex-wrap:wrap;gap:14px;background:#fff;padding:16px;border:1px solid #dfe4e8;border-radius:12px;margin-bottom:18px}.kds-controls label{display:flex;align-items:center;gap:8px}.kds-controls select,.kds-controls button{padding:10px;border-radius:8px;border:1px solid #bbc6cf;background:#f7f9fa}.kds-controls p{flex-basis:100%;margin:0;color:#566674}.ticket .kds-print-button{margin-top:8px;background:#263e50}

/* Compact kitchen settings in the title area. */
.kds-header-compact{background:#101820;color:#f4f7fa;border-radius:12px;padding:18px 20px;margin-bottom:16px}
.kds-title-row,.kds-filter-row{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.kds-title-row h1{font-size:26px;margin:0;white-space:nowrap}
.kds-toolbar{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:18px;flex-wrap:wrap;color:#edf3f8}
.kds-toolbar label{font-size:13px;font-weight:700;color:#edf3f8}
.kds-setting{display:flex;align-items:center;gap:8px}
.kds-toolbar select{max-width:220px;height:38px;padding:0 30px 0 10px;background:#243442;color:#fff;border:1px solid #526475;border-radius:8px;font:inherit}
.kds-toolbar #kdsTestSound{height:38px;padding:0 12px;border:1px solid #526475;border-radius:8px;color:#f4f7fa;background:#243442;white-space:nowrap}
.kds-toolbar #kdsTestSound:hover{background:#365064}
.kds-switch-label{display:flex;align-items:center;gap:9px;cursor:pointer;white-space:nowrap}
.kds-switch{position:relative;display:inline-flex;width:46px;height:26px;flex-shrink:0}
.kds-switch input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:1}
.kds-switch-track{width:46px;height:26px;border:1px solid #71808d;background:#465461;border-radius:20px;transition:background .18s}
.kds-switch-track:before{content:'';position:absolute;width:18px;height:18px;left:4px;top:4px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0005;transition:transform .18s}
.kds-switch input:checked+.kds-switch-track{background:#23845b;border-color:#5ec798}
.kds-switch input:checked+.kds-switch-track:before{transform:translateX(20px)}
.kds-switch input:focus-visible+.kds-switch-track{outline:3px solid #ffc18f;outline-offset:3px}
#kdsPrintState{min-width:26px;font-size:11px;color:#c9d7e2}
.kds-filter-row{margin-top:14px}.kds-filter-row .station-filter{margin:0;display:flex;gap:8px;flex-wrap:wrap}
.kds-header-meta{display:flex;align-items:center;gap:14px;font-size:13px;color:#b8c9d7}.kds-header-meta a{color:#dbe8f2}
.kds-header-compact #kdsNotice{margin:10px 0 0;color:#ffd59d;font-size:13px}.kds-header-compact #kdsNotice:empty{display:none}
@media(max-width:900px){.kds-toolbar{justify-content:flex-start;margin-left:0;gap:12px}.kds-title-row{gap:14px}.kds-setting{flex-direction:column;align-items:flex-start;gap:4px}.kds-toolbar select{max-width:190px}.kds-header-compact{padding:14px}}

.phone-order-nav{display:none}
@media(max-width:767px){
 #customerOrdering{--phone-nav:calc(66px + env(safe-area-inset-bottom,0px));padding-top:58px;padding-bottom:calc(var(--phone-nav) + 62px);min-height:100dvh;background:#faf7f2}
 #customerOrdering .menu-brand-badge{position:fixed;top:0;left:0;width:100%;height:58px;min-height:58px;padding:8px 16px;display:flex;gap:10px;background:#fff;color:#35271e;border-bottom:1px solid #e7ded4;z-index:15}
 #customerOrdering .menu-brand-badge strong{font-size:15px}#customerOrdering .menu-brand-badge img{width:38px;height:38px}
 #customerOrdering .pad-shell{display:block;height:auto;min-height:0;background:transparent}
 #customerOrdering .category-rail{width:100%;height:auto;max-height:190px;overflow:auto;background:#fff;border-bottom:1px solid #eadfd4}
 #customerOrdering .category-rail .brand{display:none}
 #customerOrdering .menu-group-list{padding:8px;display:flex;gap:8px;align-items:flex-start;overflow-x:auto}
 #customerOrdering .menu-group{flex:0 0 150px;margin:0}
 #customerOrdering .menu-group-toggle{border-radius:10px;font-size:13px;padding:12px 9px}
 #customerOrdering .menu-subcategories .cat-btn{min-height:40px;font-size:12px;padding:9px}
 #customerOrdering .menu-group-list>.cat-btn{flex:0 0 130px;border-radius:10px}
 #customerOrdering .menu-area{overflow:visible;background:transparent}
 #customerOrdering .menu-title{height:auto;min-height:48px;padding:12px 14px;background:#faf7f2;color:#493323;font-size:13px}
 #customerOrdering .product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 12px 16px}
 #customerOrdering .product-card{min-height:0;overflow:hidden;border:1px solid #eee3d8;border-radius:14px;box-shadow:0 3px 10px #59371308}
 #customerOrdering .product-image{height:auto;aspect-ratio:1.15}
 #customerOrdering .product-image img{width:100%;height:100%;object-fit:cover}
 #customerOrdering .product-name{font-size:14px;line-height:1.45;padding:9px 10px 4px}
 #customerOrdering .product-price{font-size:16px;padding:0 10px 12px}#customerOrdering .product-price small{font-size:10px}
 #customerOrdering .cart-panel{display:none;position:static;transform:none;width:100%;height:auto;min-height:calc(100dvh - 190px);background:#fff;color:#39271e;padding:14px;box-shadow:none}
 #customerOrdering .cart-panel .table-no{background:#faf0e6;color:#603c20;border-radius:10px;text-align:left}
 #customerOrdering .empty-cart{padding:65px 0;font-size:20px}
 #customerOrdering .cart-list{overflow:visible;min-height:180px}
 #customerOrdering .cart-summary{padding:16px;background:#fff4e8;color:#583218}
 #customerOrdering .cart-actions{display:block;background:#fff;padding:12px 0}#customerOrdering .cart-actions #sendBtn{width:100%}#customerOrdering .cart-actions #historyBtn{display:none}
 #customerOrdering[data-mobile-view="cart"] .cart-panel{display:flex}
 #customerOrdering:not([data-mobile-view="menu"]) .category-rail,#customerOrdering:not([data-mobile-view="menu"]) .menu-area{display:none}
 #customerOrdering .bottom-tools{position:fixed;left:0;right:0;bottom:var(--phone-nav);height:56px;padding:7px 10px;display:flex;justify-content:center;gap:6px;overflow-x:auto;z-index:16;border-top:1px solid #e6ded5;background:#fff}
 #customerOrdering .bottom-tools button,#customerOrdering .bottom-tools select{font-size:12px;padding:7px 9px;white-space:nowrap;box-shadow:none;min-width:0}
 #customerOrdering #cartToggle{display:none}
 #customerOrdering .phone-order-nav{position:fixed;left:0;right:0;bottom:0;height:var(--phone-nav);padding:5px 8px calc(5px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:repeat(4,1fr);background:#fff;box-shadow:0 -3px 18px #402a1512;border-top:1px solid #ece2d8;z-index:120}
 .phone-order-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px;background:transparent;border:0;border-radius:12px;color:#79716b;font-size:11px;font-weight:700}
 .phone-order-nav button>span{position:relative;font-size:24px;line-height:26px}.phone-order-nav button[aria-current="page"]{background:#fff0e2;color:#b7460d}
 #phoneCartCount{position:absolute;top:-4px;right:-14px;min-width:18px;padding:2px 4px;border-radius:12px;background:#d14d10;color:white;font-size:10px;line-height:14px}
 #customerOrdering .customer-welcome{bottom:var(--phone-nav);z-index:100;place-items:start center}
 #customerOrdering .welcome-content{width:100%;padding:36px 20px}.welcome-content .welcome-featured>div{flex-wrap:wrap}
 #customerOrdering .modal{z-index:130;padding:10px;align-items:center}
 #customerOrdering .modal-card{width:100%;max-height:calc(100dvh - 24px);overflow:auto;padding:48px 18px 20px;border-radius:18px}
 #customerOrdering .modal-x{top:8px;right:10px;width:40px;height:40px;font-size:28px;background:#f5eee7;border-radius:50%;z-index:2}
 #customerOrdering .detail-wrap{grid-template-columns:1fr;gap:16px}#customerOrdering .detail-image{height:190px;border-radius:12px}
 #customerOrdering .modal-actions{gap:10px;margin-top:18px}#customerOrdering .modal-actions button{min-width:0;flex:1;padding:13px 8px;font-size:14px;box-shadow:none}
 #customerOrdering textarea{width:100%}
 #customerOrdering[data-mobile-view="history"] #historyModal{position:static;display:block;background:transparent;padding:0;z-index:auto}
 #customerOrdering[data-mobile-view="history"] #historyModal .modal-card{border-radius:0;max-height:none;min-height:50vh;padding:18px;background:#faf7f2}
 #customerOrdering[data-mobile-view="history"] #historyModal .modal-x{display:none}
 #customerOrdering #padToast{z-index:150;bottom:calc(var(--phone-nav) + 66px);font-size:14px;min-width:0;width:90%}
}

/* Phone ordering: compact header, single bottom navigation and touch-sized controls. */
.phone-only{display:none}
@media(max-width:767px){
 body:has(#customerOrdering){overflow-x:hidden}
 body.phone-modal-open{overflow:hidden}
 #customerOrdering{--phone-nav:calc(64px + env(safe-area-inset-bottom,0px));padding-top:64px;padding-bottom:calc(var(--phone-nav) + 16px);font-size:15px}
 #customerOrdering button{touch-action:manipulation}
 #customerOrdering .menu-brand-badge{height:64px;min-height:64px;padding:8px 12px;gap:10px}
 #customerOrdering .menu-brand-badge strong{flex:1;min-width:0;font-size:15px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 #customerOrdering #phoneToolsToggle{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 52px;min-height:44px;border:1px solid #ebded0;background:#fff8f0;color:#774220;border-radius:12px;font-size:18px;line-height:16px}
 #phoneToolsToggle span{font-size:10px;line-height:14px}
 #customerOrdering .category-rail{display:none}
 #customerOrdering .phone-category-picker{display:grid;gap:5px;margin:12px 12px 0}
 #customerOrdering .phone-category-picker label{font-size:12px;color:#78695c;font-weight:700}
 #customerOrdering .phone-category-picker select{width:100%;height:46px;padding:8px 12px;border:1px solid #e1d4c6;background:#fff;color:#35271e;border-radius:12px;font-size:16px}
 #customerOrdering:not([data-mobile-view="menu"]) .phone-category-picker{display:none}
 #customerOrdering .menu-title{min-height:44px;padding:10px 14px;font-size:12px;gap:10px}
 #customerOrdering .menu-title span{min-width:0;overflow-wrap:anywhere}
 #customerOrdering .product-grid{gap:10px}
 #customerOrdering .product-name{font-size:14px;min-height:50px;line-height:1.5;overflow-wrap:anywhere}
 #customerOrdering .product-price{font-size:17px;font-weight:800;display:flex;align-items:baseline;gap:3px;flex-wrap:wrap}
 #customerOrdering .recommend-badge,#customerOrdering .soldout-badge{font-size:10px;padding:4px 6px}
 #customerOrdering .bottom-tools{display:none;top:70px;bottom:auto;left:auto;right:10px;width:min(280px,calc(100vw - 20px));height:auto;padding:12px;border:1px solid #e3d7cb;border-radius:16px;box-shadow:0 12px 40px #35271e33;z-index:125;overflow:visible}
 #customerOrdering[data-tools-open] .bottom-tools{display:grid;grid-template-columns:1fr;gap:9px}
 #customerOrdering .bottom-tools button,#customerOrdering .bottom-tools select{min-height:44px;width:100%;font-size:15px;border-radius:10px;border:1px solid #ddd2c6;background:#fff}
 #customerOrdering .cart-panel{padding:14px 12px;min-height:calc(100dvh - 145px)}
 #customerOrdering .cart-item{padding:14px 0;gap:12px;border-bottom:1px solid #eee2d7;font-size:15px}
 #customerOrdering .cart-item>div:first-child{min-width:0;overflow-wrap:anywhere}
 #customerOrdering .cart-mini-qty{display:flex;align-items:center;gap:14px}
 #customerOrdering .cart-mini-qty button{width:42px;height:42px;border-radius:12px;font-size:22px;flex-shrink:0}
 #customerOrdering .cart-summary{border-radius:12px;font-size:16px}
 #customerOrdering .cart-summary strong{font-size:24px}
 #customerOrdering .cart-actions #sendBtn{min-height:52px;font-size:17px;border-radius:14px}
 #customerOrdering .phone-order-nav{padding-left:6px;padding-right:6px}
 #customerOrdering .phone-order-nav button{font-size:11px;gap:3px}
 #customerOrdering .customer-welcome{padding-bottom:0}
 #customerOrdering .welcome-content{padding:28px 18px}
 #customerOrdering .welcome-content h1{font-size:32px;line-height:1.3}
 #customerOrdering .welcome-content>p{font-size:15px;line-height:1.8}
 #customerOrdering .welcome-logo{max-width:150px;max-height:80px;object-fit:contain}
 #customerOrdering .welcome-featured>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #customerOrdering .welcome-featured article{width:auto;min-width:0;max-width:100%;overflow:hidden}
 #customerOrdering .welcome-featured article img{width:100%;height:95px;object-fit:cover}
 #customerOrdering .welcome-featured article span{font-size:12px;overflow-wrap:anywhere}
 #customerOrdering .welcome-content>button{width:100%;min-height:52px;font-size:17px;padding:14px 20px}
 #customerOrdering .modal{padding:8px;align-items:flex-end}
 #customerOrdering .modal-card{max-height:calc(100dvh - 16px);padding:54px 16px calc(16px + env(safe-area-inset-bottom,0px));border-radius:20px;overscroll-behavior:contain;scroll-padding-top:54px}
 #customerOrdering .modal-x{height:44px;width:44px;background:#fff5e9;border:1px solid #e9d7c4}
 #customerOrdering .detail-image{height:clamp(140px,24dvh,220px);object-fit:contain;background:#faf6f1}
 #customerOrdering #detailName{font-size:21px;line-height:1.4;margin:6px 0}
 #customerOrdering #detailDescription{font-size:14px;line-height:1.7}
 #customerOrdering .qty-row{padding:10px 12px;border-radius:12px;justify-content:space-between}
 #customerOrdering .qty-row button{width:44px;height:44px;font-size:23px}
 #customerOrdering .detail-options fieldset{min-width:0;margin:12px 0;padding:12px;border:1px solid #e4d9cd;border-radius:12px}
 #customerOrdering .detail-options label{min-height:44px;display:flex;align-items:center;gap:8px;font-size:15px}
 #customerOrdering .detail-options input{width:20px;height:20px;flex-shrink:0}
 #customerOrdering textarea{font-size:16px;min-height:80px;border:1px solid #d8cbbc;border-radius:10px;padding:10px;box-sizing:border-box}
 #customerOrdering .modal-actions{position:sticky;bottom:-16px;background:#fff;padding:12px 0 4px;margin-top:14px;z-index:1;gap:8px}
 #customerOrdering .modal-actions button{min-height:48px;font-size:14px;border-radius:12px}
 #customerOrdering .confirm-row{grid-template-columns:minmax(0,1fr) 30px 88px;gap:6px;padding:12px 0;font-size:14px}
 #customerOrdering .confirm-row small{display:block;overflow-wrap:anywhere;font-size:12px}
 #customerOrdering .total-line{font-size:20px;border-radius:12px;padding:14px}
 #customerOrdering .service-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #customerOrdering .service-grid button{min-width:0;min-height:64px;padding:12px 6px;font-size:15px}
 #customerOrdering[data-mobile-view="history"] #historyModal .modal-card{padding:16px 12px}
 #customerOrdering #historyList .history-order{padding:16px;border:1px solid #eadfd4;background:#fff;border-radius:14px;margin-bottom:12px}
 #customerOrdering #historyList h3{font-size:13px;color:#7d6958;overflow-wrap:anywhere;margin:0 0 12px}
 #customerOrdering #historyList p{font-size:15px;line-height:1.7;padding:9px 0;border-bottom:1px solid #f0e8df;margin:0;overflow-wrap:anywhere}
 #customerOrdering #padToast{bottom:calc(var(--phone-nav) + 12px);padding:12px 16px}
}
@media(max-width:360px){#customerOrdering .product-grid{gap:8px;padding-left:8px;padding-right:8px}#customerOrdering .product-name{font-size:13px;padding-left:8px;padding-right:8px}#customerOrdering .product-price{font-size:16px}#customerOrdering .phone-order-nav button{font-size:10px}}

.history-grand-total{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px;margin-bottom:16px;border:1px solid #edceb0;border-radius:12px;background:#fff0df;color:#673612;font-weight:700}.history-grand-total strong{font-size:24px;white-space:nowrap}

/* Phone settings are a bottom-navigation destination, not a second toolbar. */
@media(max-width:767px){
 #customerOrdering #phoneToolsToggle{display:none}
 #customerOrdering .phone-order-nav{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
 #customerOrdering .phone-order-nav button{padding:4px 0;font-size:10px;min-width:0}
 #customerOrdering .phone-order-nav button>span{font-size:23px}
 #customerOrdering #phoneTools{display:none}
 #customerOrdering[data-mobile-view="settings"] #phoneTools{display:flex;position:static;width:auto;height:auto;margin:14px 12px;padding:18px;flex-direction:column;align-items:stretch;gap:14px;border:1px solid #eadfd4;border-radius:16px;box-shadow:none;background:#fff;color:#35271e}
 #customerOrdering #phoneTools .phone-settings-title{display:block;margin:0}
 #customerOrdering #phoneTools h2{font-size:21px}
 #customerOrdering #phoneTools p{font-size:14px;line-height:1.7;color:#78695c}
 #customerOrdering #phoneTools select,#customerOrdering #phoneTools button{min-height:52px;width:100%;font-size:16px;text-align:center;border:1px solid #e1d4c6;background:#fff8f0;border-radius:12px;box-shadow:none}
 #customerOrdering #phoneTools #cartToggle{display:none}
}

@media(max-width:767px){
 #customerOrdering #phoneTopLanguage{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 22px}
 #phoneTopLanguage label{font-size:12px;color:#f1eee8}
 #customerOrdering #phoneTopLanguage select{min-height:44px;max-width:100%;font-size:16px;padding:8px 12px;color:#35271e;background:#fff;border:1px solid #e1d4c6;border-radius:12px}
}

@media(max-width:767px){
 #customerOrdering .phone-order-nav{grid-template-columns:repeat(4,minmax(0,1fr))}
 #customerOrdering .phone-order-nav button{font-size:11px}
 #customerOrdering #phoneToolsToggle{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 58px;min-height:44px;background:#fff5e9;border:1px solid #e4cdb5;color:#774220;border-radius:12px}
 #customerOrdering #phoneTools{display:none!important}
 #customerOrdering .phone-history-bill{margin:-4px 0 18px}
 #customerOrdering .phone-history-bill #billBtn{width:100%;min-height:48px;padding:12px;border:1px solid #ce793f;border-radius:12px;background:#fff1e2;color:#81400f;font-size:16px;font-weight:700}
 #customerOrdering .phone-history-bill #billBtn:hover{background:#ffe3c4}
 #customerOrdering .phone-history-bill #billBtn:disabled{opacity:.6}
}

@media(max-width:767px){
 #customerOrdering .product-card{display:flex;flex-direction:column}
 #customerOrdering .product-card .product-image{flex-shrink:0;width:100%}
 #customerOrdering .product-card .phone-quick-add{display:block;margin:auto 10px 12px;width:calc(100% - 20px);min-height:44px;border:1px solid #d76522;border-radius:10px;background:#fff0e2;color:#a33f0b;font-size:15px;font-weight:800}
 #customerOrdering .product-card .phone-quick-add:hover{background:#ffe1c5}
 #customerOrdering .product-card .phone-quick-add:active{background:#ffd1a8}
 #customerOrdering .product-card .phone-quick-add:focus-visible{outline:3px solid #d76522;outline-offset:2px}
 #customerOrdering .product-card .phone-quick-add:disabled{background:#f0ede9;color:#918880;border-color:#d7d0c8;cursor:not-allowed}
}

/* Separate tablet proportions from phone-only purchasing controls. */
@media(min-width:768px){
 #customerOrdering .pad-shell{grid-template-columns:clamp(210px,16vw,260px) minmax(0,1fr) 250px;height:calc(100dvh - 78px)}
 #customerOrdering .menu-brand-badge{width:clamp(210px,16vw,260px);min-height:78px;display:flex;padding:12px;gap:10px}
 #customerOrdering .menu-brand-badge strong{font-size:15px}
 #customerOrdering .menu-brand-badge img,#customerOrdering .menu-brand-badge>span{width:48px;height:48px}
 #customerOrdering .category-rail{font-size:15px;min-width:0}
 #customerOrdering .category-rail>.brand{min-height:78px}
 #customerOrdering .menu-group-toggle{font-size:16px;padding:18px 14px}
 #customerOrdering .menu-subcategories .cat-btn,#customerOrdering .menu-group-list>.cat-btn{font-size:15px;min-height:52px;padding:14px 10px;line-height:1.5}
 #customerOrdering .product-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;padding:8px;align-content:start}
 #customerOrdering .product-card{min-width:0;min-height:0;overflow:hidden}
 #customerOrdering .product-image{width:100%;height:auto;aspect-ratio:4/3;overflow:hidden}
 #customerOrdering .product-image img{display:block;width:100%;height:100%;object-fit:contain}
 #customerOrdering .product-name{font-size:17px;line-height:1.5;padding:10px 12px 4px}
 #customerOrdering .product-price{font-size:17px;padding:2px 12px 12px}
 #customerOrdering .cart-panel{position:static;transform:none;width:auto;height:auto;box-shadow:none}
 #customerOrdering .bottom-tools{height:78px}
}
@media(min-width:768px) and (max-width:1000px){
 #customerOrdering .pad-shell{grid-template-columns:200px minmax(0,1fr)}
 #customerOrdering .menu-brand-badge{width:200px}
 #customerOrdering .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #customerOrdering .cart-panel{position:fixed;right:0;top:0;width:280px;height:100dvh;transform:translateX(100%);z-index:30}
 #customerOrdering .cart-panel.open{transform:translateX(0)}
 #customerOrdering #cartToggle{display:inline-block}
}
@media(max-width:767px){
 #customerOrdering .product-purchase-row{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:auto;padding:4px 10px 12px}
 #customerOrdering .product-purchase-row .product-price{padding:0;min-width:0;gap:2px;flex:1;font-size:16px;line-height:1.4}
 #customerOrdering .product-purchase-row .product-price small{font-size:9px;font-weight:400}
 #customerOrdering .product-card .product-purchase-row .phone-quick-add{margin:0;width:auto;min-width:62px;min-height:36px;flex:0 0 auto;padding:6px 10px;font-size:12px;line-height:1.3;border-radius:18px;background:#fff3e8;border-color:#edc5a2;color:#ab480e;box-shadow:0 2px 5px #a74c1410}
 #customerOrdering .product-card .product-purchase-row .phone-quick-add:hover{background:#ffe6cf;border-color:#df9d66}
 #customerOrdering .product-card .product-purchase-row .phone-quick-add:disabled{color:#8d8780;background:#eeeae5;border-color:#d6d0c9;box-shadow:none}
}
@media(max-width:360px){
 #customerOrdering .product-purchase-row{padding-left:8px;padding-right:8px;gap:4px}
 #customerOrdering .product-purchase-row .product-price{font-size:15px}
 #customerOrdering .product-card .product-purchase-row .phone-quick-add{min-width:56px;padding:6px 8px;font-size:11px}
}

/* Landscape PAD: category rail, photographic menu, persistent order tray. */
@media(min-width:768px){
 #customerOrdering{--pad-left:clamp(155px,15vw,220px);--pad-right:clamp(190px,18vw,270px);--pad-bottom:74px;background:#a64109}
 #customerOrdering .pad-shell{height:calc(100dvh - var(--pad-bottom));grid-template-columns:var(--pad-left) minmax(0,1fr) var(--pad-right);gap:3px;background:#f4e8d7}
 #customerOrdering .menu-brand-badge{width:var(--pad-left);height:72px;min-height:72px;background:linear-gradient(135deg,#772606,#a34213);border-bottom:1px solid #e7b086;color:#fff;padding:10px;gap:8px}
 #customerOrdering .menu-brand-badge img,#customerOrdering .menu-brand-badge>span{width:42px;height:42px;flex-shrink:0}
 #customerOrdering .menu-brand-badge strong{font-size:13px;line-height:1.4}
 #customerOrdering .category-rail{background:linear-gradient(90deg,#773010,#934514);overflow:hidden;color:#fff}
 #customerOrdering .category-rail>.brand{height:72px;min-height:72px;padding:0;flex-shrink:0}
 #customerOrdering .menu-group-list{overflow-y:auto;min-height:0;padding:0 0 8px;scrollbar-width:thin}
 #customerOrdering .menu-group{margin:0;border-radius:0}
 #customerOrdering .menu-group-toggle{border-radius:0;border:0;border-bottom:1px solid #ffffff45;background:linear-gradient(110deg,#98360b,#c75a16);color:#fff;padding:17px 12px;font-size:16px;font-weight:800;min-height:58px;text-align:left}
 #customerOrdering .menu-group.open .menu-group-toggle{background:linear-gradient(110deg,#a73c0b,#c15b15)}
 #customerOrdering .menu-subcategories .cat-btn,#customerOrdering .menu-group-list>.cat-btn{min-height:56px;padding:14px 8px;background:transparent;color:#fff;font-size:15px;line-height:1.45;border:0;border-bottom:1px solid #ffffff45;border-radius:0}
 #customerOrdering .menu-subcategories .cat-btn.active,#customerOrdering .menu-group-list>.cat-btn.active{background:#dfce29;color:#3f3000;font-weight:900;box-shadow:inset 5px 0 #fff39b}
 #customerOrdering .cat-btn:hover{filter:brightness(1.12)}
 #customerOrdering .menu-area{min-width:0;background:#f9f0db;overflow-y:auto;scrollbar-width:thin}
 #customerOrdering .menu-title{position:sticky;top:0;z-index:3;height:42px;padding:8px 14px;background:linear-gradient(90deg,#9c3e08,#b65a10);color:#fff;font-size:15px;font-weight:800;border-bottom:3px solid #f2e5cd}
 #customerOrdering .product-grid{grid-template-columns:repeat(3,minmax(0,1fr));padding:8px;gap:10px 8px;align-content:start;align-items:stretch}
 #customerOrdering .product-card{background:#fffaf0;border:2px solid #fff;border-radius:2px;min-height:0;box-shadow:none;display:flex;flex-direction:column}
 #customerOrdering .product-image{aspect-ratio:1.18;width:100%;height:auto;background:#f2e5c9;overflow:hidden;flex-shrink:0}
 #customerOrdering .product-image img{width:100%;height:100%;display:block;object-fit:contain}
 #customerOrdering .product-name{font-size:clamp(14px,1.3vw,20px);line-height:1.4;padding:9px 8px 5px;color:#29231c;font-weight:800;overflow-wrap:anywhere}
 #customerOrdering .product-purchase-row{margin-top:auto}
 #customerOrdering .product-price{padding:0 8px 10px;font-size:16px;color:#9f400c;font-weight:700}
 #customerOrdering .product-price small{font-size:11px}
 #customerOrdering .cart-panel{position:static;transform:none;width:auto;height:auto;min-width:0;display:flex;flex-direction:column;background:linear-gradient(130deg,#a84109,#c85c12);padding:0;box-shadow:none}
 #customerOrdering .cart-panel .table-no{height:42px;min-height:42px;background:#873509;color:#fff;font-size:17px;padding:8px 12px;text-align:center;border-bottom:2px solid #f3d9bb}
 #customerOrdering .cart-list{background:transparent;min-height:0;overflow-y:auto;padding:8px;flex:1}
 #customerOrdering .cart-list .empty-cart{padding:50px 8px 0;font-size:20px;color:#fff0df}
 #customerOrdering .cart-list .empty-cart small{font-size:13px;color:#f7d5b6}
 #customerOrdering .cart-item{background:#fffaf2;border:1px solid #e5c6a5;border-radius:5px;padding:10px;margin-bottom:8px;font-size:14px;gap:8px;color:#34291f}
 #customerOrdering .cart-item strong{line-height:1.5;overflow-wrap:anywhere}
 #customerOrdering .cart-mini-qty{display:flex;align-items:center;gap:10px}
 #customerOrdering .cart-mini-qty button{width:34px;height:34px;border:1px solid #dbc5ae;background:#fff;border-radius:8px;color:#583519}
 #customerOrdering .cart-summary{padding:12px 10px;background:#fff1dc;color:#673509;font-size:15px}
 #customerOrdering .cart-summary strong{font-size:22px}
 #customerOrdering .cart-actions{display:flex;flex-direction:column-reverse;gap:8px;padding:10px;background:#f5ecdf}
 #customerOrdering .cart-actions button{width:100%;min-width:0;min-height:48px;border-radius:26px;padding:10px 12px;box-shadow:none;font-size:16px}
 #customerOrdering .cart-actions #sendBtn{background:#21313f!important;color:#fff}
 #customerOrdering .cart-actions #historyBtn{border:1px solid #c99654;background:#fff9ef;color:#8f5318}
 #customerOrdering .bottom-tools{height:var(--pad-bottom);padding:10px 14px;gap:12px;background:linear-gradient(#fffdf9,#e9e4dc);align-items:center;overflow-x:auto;justify-content:flex-start}
 #customerOrdering .bottom-tools>button,#customerOrdering .bottom-tools>select{height:50px;min-width:128px;border-radius:28px;padding:10px 20px;font-size:16px;box-shadow:none;border:1px solid #dfb87f;background:#f0a021;color:#fff;font-weight:700;white-space:nowrap}
 #customerOrdering .bottom-tools>select{background:#26333e;color:#fff;border-color:#26333e}
 #customerOrdering #cartToggle{display:none}
}
@media(min-width:768px) and (max-width:1000px){
 #customerOrdering{--pad-left:148px;--pad-right:185px}
 #customerOrdering .product-grid{gap:6px;padding:6px}
 #customerOrdering .product-name{font-size:13px;padding:7px 6px 4px}
 #customerOrdering .product-price{font-size:14px;padding-left:6px}
 #customerOrdering .menu-subcategories .cat-btn{font-size:13px}
 #customerOrdering .menu-brand-badge strong{font-size:11px}
 #customerOrdering .cart-item{font-size:13px}
}

.pad-history-only{display:none}
@media(min-width:768px){
 #customerOrdering #historyModal{z-index:140;padding:24px;background:#24140699}
 #customerOrdering #historyModal .modal-card{width:min(1120px,92vw);height:min(780px,90dvh);max-height:90dvh;display:flex;flex-direction:column;padding:24px 30px;border-radius:14px;background:#fffdf8;overflow:hidden}
 #customerOrdering #historyModal h2{margin:0 46px 18px 0;font-size:26px;color:#332d25}
 #customerOrdering #historyModal h2 small{display:inline;margin-left:16px;font-size:17px;font-weight:400;color:#80705e}
 #customerOrdering #historyList{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#dc8b20 #f0e2cc;scrollbar-width:auto;padding-right:12px}
 .pad-history-row{display:grid;grid-template-columns:clamp(110px,15vw,190px) minmax(0,1fr) 200px;align-items:center;gap:20px;padding:14px 0;border-bottom:1px solid #e9e1d6}
 .pad-history-image{width:100%;height:130px;object-fit:contain;background:#f6e9cc;border:1px solid #f0e4ce}
 .pad-history-info h3{font-size:21px;margin:0 0 10px;line-height:1.5;overflow-wrap:anywhere}.pad-history-info p{font-size:14px;margin:4px 0;color:#7b6245}.pad-history-info small{font-size:12px;color:#8b8174}
 .pad-history-details{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;font-size:15px}.pad-history-details>strong{font-size:19px;text-align:right}.pad-history-state{grid-column:1/-1;text-align:center;padding:7px 10px;background:#e89717;color:#fff;font-weight:800;border-radius:5px}.pad-history-state.ready{background:#2e8e61}.pad-history-state.served{background:#70818a}.pad-history-state.is-cancelled{background:#a9a29a}.pad-history-unit{font-size:12px;color:#71695f}.pad-history-row.is-cancelled{opacity:.6}
 #customerOrdering .pad-history-footer{display:flex;flex-direction:column;align-items:center;gap:18px;padding-top:16px;flex-shrink:0}
 .pad-history-total{display:flex;justify-content:space-between;align-items:center;gap:20px;width:100%;padding:15px 18px;border-radius:7px;background:#253441;color:#fff;font-size:18px;font-weight:700}.pad-history-total>span:first-child{background:#fff8ed;color:#3a342d;padding:5px 10px;border-radius:4px}.pad-history-total strong{font-size:30px;margin-left:12px}.pad-history-total small{color:#ffc253;font-size:16px}
 #padHistoryClose{min-width:200px;min-height:48px;border-radius:28px;color:#b26a0e;border-color:#d59630;font-size:20px;background:#fffdf8}.pad-history-empty{text-align:center;padding:40px;color:#827364}
}
@media(min-width:768px) and (max-width:950px){.pad-history-row{grid-template-columns:110px minmax(0,1fr) 165px;gap:12px}.pad-history-info h3{font-size:17px}.pad-history-image{height:105px}}

.phone-cart-image{display:none}
@media(max-width:767px){
 #customerOrdering .cart-item{display:grid;grid-template-columns:76px minmax(0,1fr);gap:10px 12px;align-items:start}
 #customerOrdering .cart-item .phone-cart-image{display:block;grid-column:1;grid-row:1/3;width:76px;height:76px;object-fit:contain;border-radius:10px;background:#f6eadb;border:1px solid #eee0ce}
 #customerOrdering .cart-item>div:first-of-type{grid-column:2;min-width:0;overflow-wrap:anywhere}
 #customerOrdering .cart-item .cart-mini-qty{grid-column:2;gap:12px}
 #customerOrdering .cart-item>span{grid-column:2;justify-self:end;font-size:17px;font-weight:800;color:#9f400c}
 #customerOrdering .phone-history-item{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;padding:13px 0;border-bottom:1px solid #f0e8df;align-items:start}
 #customerOrdering .phone-history-item img{width:76px;height:76px;object-fit:contain;border-radius:10px;border:1px solid #eee0ce;background:#f6eadb}
 #customerOrdering .phone-history-item>div{display:grid;gap:6px;min-width:0}
 #customerOrdering .phone-history-item strong{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
 #customerOrdering .phone-history-item span{font-size:12px;color:#796b5d}
 #customerOrdering .phone-history-item b{font-size:16px;color:#9f400c;text-align:right}
}

#waitingLanguage{font-size:16px;min-height:44px;border-radius:10px;padding:8px 14px;margin-bottom:20px;background:#fff;color:#35271e;border:1px solid #ddcbb6}
@media(max-width:767px){html[lang="en"] #customerOrdering .phone-order-nav button{font-size:10px}html[lang="en"] #customerOrdering .product-purchase-row .product-price small{font-size:8px}html[lang="en"] #customerOrdering .modal-actions button{font-size:12px}html[lang="en"] #customerOrdering .welcome-content h1{font-size:30px}}

.translation-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}.translation-fields label{display:grid;gap:4px;font-size:12px;color:#65727d}.translation-fields input{min-width:0;width:100%;padding:9px;border:1px solid #cdd6de;border-radius:8px}.menu-group-admin .translation-fields,.table-setting-card .translation-fields{grid-column:1/-1}.option-edit{padding:14px 0;border-top:1px solid #dfe4e8}.category-assignment>div{min-width:0}.category-assignment input{width:100%}

/* Table settings cards must shrink their form tracks, not overflow them. */
#tab-settings .settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
#tab-settings .settings-grid>.panel{min-width:0}
#tab-settings .setting-note{overflow-wrap:anywhere}
#tab-settings .table-settings-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px;align-items:start}
#tab-settings .table-setting-card{min-width:0;padding:16px}
#tab-settings .table-setting-card form:first-child{grid-template-columns:minmax(0,1fr) 76px;gap:10px;min-width:0}
#tab-settings .table-setting-card form>*{min-width:0;max-width:100%;box-sizing:border-box}
#tab-settings .table-setting-card input{width:100%;min-width:0;max-width:100%;height:42px}
#tab-settings .table-setting-title{grid-column:1/-1;align-items:flex-start;gap:10px;margin-bottom:4px}
#tab-settings .table-setting-title b{min-width:0;overflow-wrap:anywhere;line-height:1.5}
#tab-settings .table-setting-title span{flex-shrink:0;white-space:nowrap;padding:3px 8px;border-radius:12px;font-size:12px;background:#edf2f5;color:#536572}
#tab-settings .table-setting-card input[name=name],#tab-settings .table-setting-card .translation-fields{grid-column:1/-1}
#tab-settings .table-setting-card input[name=area]{grid-column:1/-1}
#tab-settings .table-setting-card input[name=seats]{grid-column:1/-1;width:100%}
#tab-settings .table-setting-card form:first-child>button{grid-column:1/-1;width:100%;min-height:44px;margin-top:4px}
#tab-settings .table-setting-card form:last-child{margin-top:12px;padding-top:10px;border-top:1px solid #edf0f2}
#tab-settings .table-setting-card .translation-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){#tab-settings .settings-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:420px){#tab-settings .table-setting-card .translation-fields{grid-template-columns:minmax(0,1fr)}}

/* Product editor: give upload controls their own full-width row. */
.product-settings-page .product-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}
.product-settings-page .product-admin-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:16px}
.product-settings-page .product-edit-card{min-width:0}
.product-settings-page .product-edit-card .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.product-settings-page .form-grid>*{min-width:0;max-width:100%}
.product-settings-page .form-grid input:not([type=checkbox]),.product-settings-page .form-grid select,.product-settings-page .form-grid textarea{width:100%;min-width:0;box-sizing:border-box}
.product-settings-page .form-grid>label:not(.file-field){display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.product-settings-page .form-grid>label select{flex:1;min-width:120px}
.product-settings-page .file-field{grid-column:1/-1;display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:14px 16px;border:1px dashed #b7c6d3;border-radius:12px;background:#f7fafc;color:#344b5c}
.product-settings-page .file-field input[type=file]{display:block;width:100%;max-width:100%;min-width:0;padding:0;border:0;background:transparent;font-size:14px;line-height:36px}
.product-settings-page input[type=file]::file-selector-button{padding:8px 14px;margin-right:12px;border:1px solid #bccbd7;border-radius:8px;background:#fff;color:#263e50;cursor:pointer}
.product-settings-page input[type=file]::file-selector-button:hover{background:#e9f1f7}
.product-settings-page .selected-image-name{overflow-wrap:anywhere;font-size:13px;color:#62798a;line-height:1.5}
.product-settings-page .selected-image-name:empty{display:none}
.product-settings-page .product-form textarea{grid-column:1/-1;min-height:90px}
.product-settings-page .form-grid>.primary{grid-column:1/-1;min-height:44px}
.product-settings-page .product-edit-title{grid-template-columns:64px minmax(0,1fr) auto;gap:12px}
.product-settings-page .product-edit-title img{width:64px;height:64px;object-fit:contain}
.product-settings-page .product-edit-title b,.product-settings-page .product-edit-title small{overflow-wrap:anywhere}
@media(max-width:1000px){.product-settings-page .product-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.product-settings-page .product-form,.product-settings-page .product-edit-card .form-grid{grid-template-columns:minmax(0,1fr)}}

#tab-structure .category-delete-form{display:flex;justify-content:flex-end;padding:0 0 16px;margin:0 0 12px;border-bottom:1px solid #e1e6eb}#tab-structure .category-delete-form button{color:#b63e35;background:#fff4f2;border:1px solid #efcac6;border-radius:8px;padding:9px 12px}

/* Product catalog and dedicated editing page */
.product-search{display:grid;grid-template-columns:1fr 1.5fr 1fr auto auto;gap:14px;align-items:end;margin-bottom:20px}.product-search label,.product-detail-grid label{display:flex;flex-direction:column;gap:8px;min-width:0}.product-search input,.product-search select,.product-detail input:not([type=checkbox]):not([type=hidden]),.product-detail select,.product-detail textarea{width:100%;min-width:0;box-sizing:border-box}.product-table-scroll{overflow-x:auto}.product-table{width:100%;border-collapse:collapse;text-align:left}.product-table th{background:#edf2f5;color:#526776;font-size:13px}.product-table th,.product-table td{padding:14px 12px;border-bottom:1px solid #e1e7ec}.product-table tbody tr:hover{background:#fff8f1}.product-table td>small{display:block;color:#718096;margin-top:4px}.product-list-name{display:flex;align-items:center;gap:14px;min-width:240px;color:inherit}.product-list-name img{width:64px;height:64px;object-fit:contain;border-radius:10px;background:#faf4e9}.product-list-name span{display:flex;flex-direction:column;gap:5px}.product-list-name small{color:#718096;font-size:12px}.product-state{display:inline-block;white-space:nowrap;padding:6px 12px;border-radius:20px;background:#fff0e3;color:#a34c13;font-size:13px}.product-state.selling{background:#e7f5ed;color:#247446}.product-empty{text-align:center;padding:40px!important}.product-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.product-detail em{font-size:11px;color:#cf5000;font-style:normal}.product-detail h2{margin:12px 0 20px}.product-detail-grid+h2{margin-top:30px}.product-image-editor{display:grid;grid-template-columns:160px minmax(0,1fr);gap:24px;padding:20px;background:#f6f8fa;border:1px dashed #b8c8d7;border-radius:12px;margin-bottom:28px}.product-image-editor img{width:160px;height:160px;object-fit:contain;background:white;border-radius:10px}.product-image-editor p{overflow-wrap:anywhere;color:#667788}.product-flags,.product-form-actions{display:flex;gap:24px;align-items:center;flex-wrap:wrap}.product-form-actions{border-top:1px solid #e1e7ec;margin-top:26px;padding-top:22px}.product-form-actions button{min-width:180px}.product-delete-action{margin-top:20px;text-align:right}
@media(max-width:1100px){.product-search{grid-template-columns:repeat(2,minmax(0,1fr))}.product-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.product-search,.product-detail-grid{grid-template-columns:minmax(0,1fr)}.product-image-editor{grid-template-columns:minmax(0,1fr)}.product-table{min-width:700px}.product-form-actions>*{width:100%;text-align:center}}

/* Category management: separate creation and individual records */
#tab-structure .category-intro{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}#tab-structure .category-intro p{margin:0;color:#647687}
#tab-structure .category-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}#tab-structure .category-column{min-width:0;background:#edf2f6;border:1px solid #dbe4ec;border-radius:16px;padding:20px}#tab-structure .category-column-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}#tab-structure .category-column-heading>div{display:flex;align-items:center;gap:10px}#tab-structure h2{font-size:20px;margin:0}#tab-structure .category-column-heading p{width:100%;margin:0;font-size:13px;color:#617486}#tab-structure .category-step{display:grid;place-items:center;width:32px;height:32px;background:#243d4e;color:white;border-radius:9px;font-size:12px;font-weight:700}#tab-structure .category-count{font-size:12px;white-space:nowrap;background:#e7edf2;color:#526879;padding:5px 10px;border-radius:20px}
#tab-structure .category-create{border:1px solid #f1d5bf;border-radius:12px;background:#fffaf5;overflow:hidden;margin-bottom:24px}#tab-structure .category-create summary{cursor:pointer;padding:17px 18px;font-weight:700;color:#ae4b08}#tab-structure .category-create .category-fields{padding:0 18px 18px}#tab-structure .category-list-label{font-size:13px;font-weight:700;color:#637587;margin-bottom:12px}#tab-structure .category-records{display:grid;gap:16px}#tab-structure .category-record{min-width:0;background:white;border:1px solid #dae3eb;border-radius:12px;box-shadow:0 2px 5px #182b3d04;padding:18px}#tab-structure .category-record>header{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #edf0f3;padding-bottom:14px;margin-bottom:16px}#tab-structure .category-record h3{margin:0;font-size:16px;overflow-wrap:anywhere}
#tab-structure .category-fields{display:grid;gap:14px}#tab-structure .category-fields label{display:flex;flex-direction:column;gap:7px;color:#526575;font-size:13px;min-width:0}#tab-structure .category-fields input:not([type=checkbox]),#tab-structure .category-fields select{width:100%;min-width:0;height:42px;box-sizing:border-box;padding:9px 11px;border:1px solid #cbd6df;border-radius:8px;background:white;font:inherit;color:#172e40}#tab-structure .translation-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}#tab-structure .category-meta{display:grid;grid-template-columns:120px minmax(0,1fr);gap:18px;align-items:end}#tab-structure .category-fields .category-check{flex-direction:row;align-items:center;min-height:42px}#tab-structure input[type=checkbox]{width:17px;height:17px;accent-color:#e85d04}
#tab-structure .category-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px}#tab-structure footer.category-actions{margin-top:18px;padding-top:16px;border-top:1px solid #edf0f3}#tab-structure .category-delete-form{margin:0 auto 0 0;padding:0;border:0;display:block}#tab-structure .category-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;width:auto;padding:10px 20px;border-radius:8px;border:1px solid transparent;font:inherit;font-size:14px;font-weight:600;line-height:20px;text-decoration:none;cursor:pointer;box-shadow:none;transition:background .15s,border-color .15s,box-shadow .15s}#tab-structure .category-button.primary{background:#e95e00;color:white}#tab-structure .category-button.primary:hover{background:#cc4f00}#tab-structure .category-button.secondary{background:#243d4e;color:white}#tab-structure .category-button.secondary:hover{background:#35566c}#tab-structure .category-button.danger{background:white;border-color:#edcdcc;color:#b44640}#tab-structure .category-button.danger:hover{background:#fff0ef;border-color:#d9817c}#tab-structure .category-button:focus-visible,#tab-structure input:focus-visible,#tab-structure select:focus-visible,#tab-structure summary:focus-visible{outline:3px solid #f2ae72;outline-offset:2px}
@media(max-width:1050px){#tab-structure .category-columns{grid-template-columns:minmax(0,1fr)}}@media(max-width:540px){#tab-structure .category-column{padding:14px}#tab-structure .translation-fields{grid-template-columns:minmax(0,1fr)}#tab-structure .category-intro{align-items:flex-start;flex-direction:column}#tab-structure .category-button{padding:10px 14px}}

/* Match the product detail header return link to the footer action. */
.product-detail .topbar a.csv-button,
.product-detail .product-form-actions a.csv-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;box-sizing:border-box;padding:10px 18px;background:#fff1e8;color:#a94013;border:1px solid #efc5ab;border-radius:8px;font-size:14px;font-weight:700;text-decoration:none;transition:background .15s,border-color .15s}
.product-detail .topbar a.csv-button:hover,
.product-detail .product-form-actions a.csv-button:hover{background:#ffe1cd;color:#87320e;border-color:#df9a70}
.product-detail .topbar a.csv-button:focus-visible,
.product-detail .product-form-actions a.csv-button:focus-visible{outline:3px solid #eaa06f;outline-offset:3px}

/* Keep the product catalog create action consistent with return actions. */
.product-catalog .topbar a.csv-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;box-sizing:border-box;padding:10px 18px;background:#fff1e8;color:#a94013;border:1px solid #efc5ab;border-radius:8px;font-size:14px;font-weight:700;text-decoration:none;transition:background .15s,border-color .15s}
.product-catalog .topbar a.csv-button:hover{background:#ffe1cd;color:#87320e;border-color:#df9a70}
.product-catalog .topbar a.csv-button:focus-visible{outline:3px solid #eaa06f;outline-offset:3px}

/* Promotions */
.promotion-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:end}.promotion-form label{display:flex;flex-direction:column;gap:7px;font-size:13px;color:#526575}.promotion-check{flex-direction:row!important;align-items:center;padding-bottom:12px}.promotion-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.promotion-card>header{display:flex;justify-content:space-between;gap:12px;align-items:start;border-bottom:1px solid #e5ebef;margin-bottom:16px}.promotion-card header small{color:#d95100;letter-spacing:.14em}.promotion-card h2{margin:5px 0 15px}.promotion-card>form:last-child{text-align:right;margin-top:14px}.pos-discount{margin:14px 0;padding:15px;border:1px solid #d8e1e7;border-radius:12px;background:#fff}.pos-discount-title{display:flex;justify-content:space-between;align-items:start;margin-bottom:12px}.pos-discount-title div{display:grid;gap:3px}.pos-discount-title small{color:#6b7a84}.pos-discount-title a{color:#bd4c12;font-weight:700}.pos-discount-controls{display:grid;grid-template-columns:1fr 1.3fr;gap:10px}.pos-discount-controls select,.coupon-scan input{width:100%;min-width:0;padding:11px;border:1px solid #cbd5dc;border-radius:8px;background:#fff}.coupon-scan{display:grid;grid-template-columns:1fr auto;gap:7px}.coupon-scan button{border:0;border-radius:8px;padding:0 16px;background:#294354;color:white;font-weight:700}.discount-preview{margin-top:10px;padding:9px 11px;border-radius:8px;background:#fff2e8;color:#a64312;font-weight:700}.discount-line{color:#b44812}.discount-line b{color:#b44812}@media(max-width:900px){.promotion-form{grid-template-columns:repeat(2,minmax(0,1fr))}.promotion-grid{grid-template-columns:1fr}}@media(max-width:600px){.promotion-form,.pos-discount-controls{grid-template-columns:1fr}}
