*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif;background:#f5f6f8;color:#17191c}a{color:inherit}h1{margin-top:0}.muted{color:#737985}.small{font-size:12px}.break{word-break:break-all}.setup{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#111827,#374151);padding:20px}.card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:22px;box-shadow:0 4px 18px #0000000a}.setup-card{width:min(760px,100%)}.login-card{width:min(420px,100%)}.brand{font-weight:800;letter-spacing:2px}label{display:block;font-weight:600;margin:12px 0 6px}input,select,textarea{width:100%;border:1px solid #d7dbe0;border-radius:10px;padding:11px 12px;font:inherit;background:#fff}textarea{min-height:80px;resize:vertical}.form-grid,.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.btn,button{border:0;border-radius:10px;padding:10px 14px;font-weight:700;cursor:pointer;background:#e9edf2}.btn.primary{background:#111827;color:#fff}.btn.danger{background:#fee2e2;color:#991b1b}.wide{width:100%}.smallbtn{padding:7px 9px;font-size:12px}.alert{padding:12px 14px;border-radius:10px;margin:12px 0}.success{background:#dcfce7;color:#166534}.danger{background:#fee2e2;color:#991b1b}.topbar{height:58px;background:#111827;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 22px}.topbar a{color:#fff}.layout{display:grid;grid-template-columns:210px 1fr;min-height:calc(100vh - 58px)}.sidebar{background:#fff;border-right:1px solid #e5e7eb;padding:18px}.sidebar a{display:block;text-decoration:none;padding:11px;border-radius:9px;margin:4px 0}.sidebar a:hover{background:#f1f3f5}.content{padding:26px;min-width:0}.content.full{max-width:1300px;margin:auto}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.stat{background:#fff;padding:20px;border-radius:14px;border:1px solid #e5e7eb}.stat b{font-size:28px;display:block}.stat span{color:#6b7280}.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.chips span{padding:7px 10px;background:#f1f5f9;border-radius:20px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:10px;border-bottom:1px solid #e5e7eb;vertical-align:middle}.thumb{width:62px;height:48px;object-fit:cover;border-radius:8px}.inline{display:inline-flex;gap:5px}.rowform{display:grid;grid-template-columns:1fr 2fr auto;gap:10px}.qr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:15px}.qr-card{text-align:center;border:1px solid #e5e7eb;border-radius:14px;padding:15px}.qr-card img{max-width:220px;width:100%}.customer{background:#f7f7f8}.customer-head{position:sticky;top:0;z-index:5;background:#fff;border-bottom:1px solid #e5e7eb;padding:14px 18px;display:flex;justify-content:space-between;align-items:center}.customer-head h1{font-size:20px;margin:0}.customer-head span{font-size:13px;color:#666}.cart-btn{font-size:18px}.menu-wrap{max-width:980px;margin:auto;padding:18px}.menu-wrap h2{margin-top:26px}.menu-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.food-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;overflow:hidden;display:grid;grid-template-columns:160px 1fr}.food-card img,.food-placeholder{width:160px;height:150px;object-fit:cover}.food-placeholder{display:grid;place-items:center;background:#eef2f7;font-size:44px}.food-body{padding:15px}.food-body h3{margin:0 0 6px}.food-body p{margin:0;color:#6b7280;font-size:14px;min-height:42px}.food-foot{display:flex;justify-content:space-between;align-items:center;margin-top:12px}.modal{position:fixed;inset:0;background:#0008;display:none;place-items:end center;z-index:20}.modal.show{display:grid}.modal-card{background:#fff;width:min(640px,100%);max-height:90vh;overflow:auto;border-radius:20px 20px 0 0;padding:22px;position:relative}.close{position:absolute;right:15px;top:12px;font-size:25px;background:none}.cart-line{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid #eee}.cart-line small{display:block;color:#666}.cart-line input{padding:7px;margin-top:6px}.qty{display:flex;align-items:center;gap:8px}.qty button{width:34px;height:34px;padding:0}.cart-total{display:flex;justify-content:space-between;font-size:19px;margin:18px 0}.receipt{max-width:520px;margin:40px auto}.success-icon{width:64px;height:64px;border-radius:50%;background:#dcfce7;color:#166534;display:grid;place-items:center;font-size:36px;margin:auto}.receipt h1{text-align:center}.status-pill{text-align:center;background:#e0e7ff;color:#3730a3;padding:9px;border-radius:10px;margin:16px 0}.receipt-line{display:flex;justify-content:space-between;padding:8px 0}.receipt-line.total{font-size:22px}.order-grid,.cashier-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:13px}.order-card{background:#fff;border-radius:14px;border:1px solid #e5e7eb;padding:16px;border-top:5px solid #94a3b8}.status-new{border-top-color:#ef4444}.status-cooking{border-top-color:#f59e0b}.status-ready{border-top-color:#10b981}.order-head{display:flex;justify-content:space-between}.bigstatus{font-size:12px;font-weight:800;letter-spacing:1px;margin-top:10px}.status-actions{display:flex;flex-wrap:wrap;gap:5px}.status-actions button{font-size:11px;padding:7px}.kitchen{background:#111827;color:#fff}.kitchen-wrap{padding:18px}.kitchen-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}.k-card{background:#fff;color:#111;border-radius:12px;overflow:hidden}.k-head{background:#f59e0b;padding:12px;display:flex;justify-content:space-between;font-size:20px}.k-card h3{padding:0 14px}.k-item{padding:10px 14px;border-top:1px solid #eee}.k-item small{display:block;color:#b45309;margin-top:5px}.k-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px}.k-actions button:last-child{background:#10b981;color:#fff}.empty{font-size:24px}.cash-total{font-size:32px;font-weight:800;margin:15px 0}.check{display:flex;align-items:center;gap:8px}.check input{width:auto}.api-key{display:block;word-break:break-all;padding:12px;background:#f1f5f9;border-radius:9px}
@media(max-width:800px){.layout{grid-template-columns:1fr}.sidebar{display:flex;overflow:auto;border-right:0;border-bottom:1px solid #ddd;padding:8px}.sidebar a{white-space:nowrap}.content{padding:16px}.stats{grid-template-columns:1fr 1fr}.grid2,.form-grid{grid-template-columns:1fr}.menu-grid{grid-template-columns:1fr}.food-card{grid-template-columns:120px 1fr}.food-card img,.food-placeholder{width:120px;height:140px}.rowform{grid-template-columns:1fr}.topbar{padding:0 12px}.receipt{margin:16px}.qr-grid{grid-template-columns:1fr}}
@media print{.topbar,.sidebar,.btn,form{display:none!important}.qr-card{break-inside:avoid;border:0}.qr-grid{grid-template-columns:repeat(2,1fr)}body{background:#fff}}
/* v1.1 */
.center{text-align:center}.table-message{display:block;color:#6b7280;margin-top:3px}.category-picker{margin-bottom:24px}.category-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:12px}.category-card{display:block;text-decoration:none;background:#fff;border:1px solid #e5e7eb;border-radius:15px;overflow:hidden;text-align:center;scroll-margin-top:85px}.category-card img,.category-placeholder{width:100%;height:105px;object-fit:cover}.category-placeholder{display:grid;place-items:center;background:#eef2f7;font-size:36px}.category-card strong{display:block;padding:10px}.menu-section{scroll-margin-top:80px}.food-card{cursor:pointer}.category-admin-list{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}.category-admin-item{display:flex;align-items:center;gap:7px;padding:6px 10px;background:#f1f5f9;border-radius:12px}.category-admin-item img,.category-mini-placeholder{width:34px;height:34px;border-radius:8px;object-fit:cover}.category-mini-placeholder{display:grid;place-items:center;background:#fff}.item-modal-image,.item-modal-placeholder{width:100%;height:250px;border-radius:14px;object-fit:cover;margin-bottom:15px}.item-modal-placeholder{display:grid;place-items:center;background:#eef2f7;font-size:64px}.item-price{font-size:24px;font-weight:800;margin:12px 0}.item-qty{margin:10px 0 18px}.item-qty strong{min-width:40px;text-align:center;font-size:20px}.confirm-line{display:flex;justify-content:space-between;gap:18px;padding:12px 0;border-bottom:1px solid #eee}.confirm-line small,.line-note{display:block;color:#6b7280;font-weight:400;margin-top:3px}.confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.receipt-nav{margin-bottom:16px}.table-create-form{display:grid;grid-template-columns:1fr 1.5fr 2fr auto;gap:10px;align-items:end}.qr-message{min-height:36px;color:#475569}.qr-message-form{text-align:left;margin-top:12px}.qr-actions{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;margin-top:10px}.bill-items-mini{border-top:1px solid #eee;border-bottom:1px solid #eee;margin:12px 0;padding:8px 0}.bill-items-mini>div,.cash-breakdown>div,.order-item-summary>div{display:flex;justify-content:space-between;gap:10px;padding:5px 0}.order-item-summary{margin:10px 0;padding:8px 0;border-top:1px solid #eee;border-bottom:1px solid #eee}.order-item-summary small{display:block;color:#6b7280}.recent-bills{margin-top:20px}.bill-page{background:#e5e7eb;padding:24px}.bill-sheet{background:#fff;width:min(760px,100%);margin:auto;padding:32px;box-shadow:0 8px 30px #0002}.bill-toolbar{display:flex;justify-content:space-between;margin-bottom:22px}.bill-head{text-align:center;border-bottom:1px dashed #aaa;padding-bottom:16px}.bill-head h1{margin-bottom:8px}.bill-meta{display:flex;justify-content:space-between;gap:20px;padding:16px 0}.right{text-align:right}.bill-table{margin:8px 0}.bill-table .num{text-align:right}.bill-totals{margin-left:auto;width:min(360px,100%);padding-top:12px}.bill-totals>div{display:flex;justify-content:space-between;padding:5px 0}.bill-totals .grand{font-size:22px;border-top:2px solid #111;margin-top:5px;padding-top:10px}.bill-footer{text-align:center;margin-top:28px;padding-top:18px;border-top:1px dashed #aaa}.qr-print-area{padding:4px}
@media(max-width:800px){.table-create-form{grid-template-columns:1fr}.category-grid{grid-template-columns:repeat(2,1fr)}.confirm-actions{grid-template-columns:1fr}.bill-page{padding:0}.bill-sheet{padding:20px;min-height:100vh}.bill-meta{font-size:13px}.item-modal-image,.item-modal-placeholder{height:210px}}
@media print{.bill-page{padding:0}.bill-sheet{box-shadow:none;width:100%;padding:0}.bill-toolbar{display:none!important}.qr-card{display:none!important}.qr-card.print-this{display:block!important;max-width:420px;margin:20px auto}.qr-card.print-this .qr-message-form,.qr-card.print-this .qr-actions,.qr-card.print-this .qr-url{display:none!important}.qr-card.print-this .qr-print-area{display:block!important}.qr-card.print-this img{max-width:300px}.recent-bills{display:none!important}}
/* v1.2 - customer order review & history */
.customer-actions{display:flex;align-items:center;gap:8px}.history-btn,.cart-btn{display:inline-flex;align-items:center;gap:5px;border:1px solid #e5e7eb;background:#fff;border-radius:10px;padding:9px 11px;text-decoration:none;color:#111827;font:inherit;cursor:pointer}.history-btn:hover,.cart-btn:hover{background:#f8fafc}.review-section{border:1px solid #e5e7eb;border-radius:14px;padding:14px;margin:14px 0;background:#fff}.previous-review{background:#f8fafc}.new-review{border-color:#bfdbfe;background:#f8fbff}.review-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.review-title h3{margin:0}.review-title a{font-size:13px}.new-badge,.ordered-badge{display:inline-block;font-size:11px;font-weight:800;padding:4px 8px;border-radius:999px;background:#dbeafe;color:#1d4ed8;vertical-align:middle}.ordered-badge{background:#e2e8f0;color:#475569}.previous-order-block{padding:8px 0 12px;border-bottom:1px dashed #cbd5e1}.previous-order-block:last-child{border-bottom:0}.previous-order-meta,.previous-order-total{display:flex;justify-content:space-between;gap:10px;align-items:center}.previous-order-meta span{font-size:12px;background:#eef2ff;color:#4338ca;border-radius:999px;padding:4px 8px}.previous-order-total{padding-top:8px;margin-top:5px;border-top:1px solid #e5e7eb}.review-line,.history-line{display:flex;justify-content:space-between;gap:14px;padding:8px 0}.review-line small,.history-line small{display:block;color:#6b7280;font-weight:400;margin-top:3px}.review-subtotal{display:flex;justify-content:space-between;gap:10px;padding-top:10px;margin-top:8px;border-top:1px solid #e5e7eb}.combined-total{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:20px;padding:16px 0;border-top:2px solid #111827}.combined-total b{font-size:24px}.cart-review-actions{display:grid;grid-template-columns:1fr 1.5fr;gap:10px}.confirm-summary{border-top:1px solid #e5e7eb;margin-top:14px;padding-top:10px}.confirm-summary>div,.history-summary>div{display:flex;justify-content:space-between;gap:12px;padding:6px 0}.confirm-summary .grand,.history-summary .grand{font-size:20px;border-top:2px solid #111827;margin-top:5px;padding-top:10px}.order-history-page{max-width:620px}.history-order{border:1px solid #e5e7eb;border-radius:14px;padding:14px;margin:14px 0;background:#fff}.history-order.current-order{border-color:#93c5fd;box-shadow:0 0 0 2px #dbeafe inset}.history-order-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding-bottom:9px;border-bottom:1px solid #e5e7eb}.history-order-head small{display:block;color:#6b7280;margin-top:3px}.mini-status{font-size:12px;font-weight:700;background:#eef2ff;color:#4338ca;border-radius:999px;padding:5px 9px;white-space:nowrap}.history-order-total{display:flex;justify-content:space-between;gap:12px;padding-top:10px;margin-top:5px;border-top:1px dashed #cbd5e1}.history-summary{background:#f8fafc;border-radius:14px;padding:14px;margin:16px 0}.history-summary h3{margin-top:0}.empty-history{text-align:center;padding:35px 10px}.empty-history>div{font-size:48px}.after-order-actions{display:grid;gap:8px}
@media(max-width:560px){.customer-head{gap:8px}.customer-actions{gap:5px}.history-btn,.cart-btn{padding:8px}.history-btn span{display:none}.cart-review-actions{grid-template-columns:1fr}.review-section{padding:12px}.history-order-head{flex-direction:column}.mini-status{align-self:flex-start}}
/* v1.3 - professional table sessions, checkout and simplified ordering review */
.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.page-heading h1{margin-bottom:4px}.mode-pill,.table-state{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800;white-space:nowrap}.mode-pill{background:#e0e7ff;color:#3730a3}.table-state.open{background:#dcfce7;color:#166534}.table-state.closed{background:#fff1f2;color:#be123c}.warning{background:#fff7ed!important;color:#c2410c!important}.table-card-head,.cashier-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;text-align:left}.table-card-head h3,.cashier-head h2{margin:0}.table-card-head small{color:#94a3b8}.qr-card{position:relative}.qr-paused{height:250px;border:2px dashed #cbd5e1;border-radius:14px;background:#f8fafc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#64748b}.qr-paused span{width:70px;height:70px;border-radius:18px;background:#e2e8f0;display:grid;place-items:center;font-size:22px;font-weight:900}.qr-paused b{color:#334155}.table-bill-note{margin-top:10px;padding:8px 10px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:12px;font-weight:700}.setting-subhead{margin:24px 0 8px}.choice-card{display:flex!important;gap:12px;align-items:flex-start;border:1px solid #e2e8f0;border-radius:14px;padding:14px;margin:10px 0;cursor:pointer;font-weight:400}.choice-card:has(input:checked){border-color:#64748b;box-shadow:0 0 0 2px #e2e8f0;background:#f8fafc}.choice-card input{width:auto;margin-top:4px}.choice-card span{display:block}.choice-card b{display:block;margin-bottom:4px}.choice-card small{display:block;color:#64748b;line-height:1.5}.settings-save{margin-top:16px}.topbar-title{display:flex;align-items:center;gap:10px}.muted-light{font-size:12px;color:#94a3b8}.topbar-actions{display:flex;align-items:center;gap:14px}.topbar-btn{text-decoration:none;background:#ffffff18;border:1px solid #ffffff22;padding:7px 10px;border-radius:9px}.empty-panel{text-align:center;color:#64748b}.checkout-waiting{border-color:#fdba74;box-shadow:0 0 0 2px #ffedd5 inset}.checkout-btn,.checkout-accent{display:inline-flex;align-items:center;justify-content:center;gap:5px;border-radius:10px;padding:9px 11px;text-decoration:none;font-weight:750;background:#fff7ed!important;color:#9a3412!important;border:1px solid #fed7aa!important}.customer-state-card{width:min(520px,calc(100% - 32px));margin:8vh auto;background:#fff;border:1px solid #e5e7eb;border-radius:22px;padding:30px;text-align:center;box-shadow:0 14px 45px #0f172a12}.state-icon{font-size:54px}.customer-state-card h1{margin:12px 0 5px}.state-actions{display:grid;gap:9px;margin-top:22px}.receipt-nav.dual{display:flex;justify-content:space-between;gap:8px}.history-food-line,.checkbill-line,.order-review-row{display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:11px;padding:10px 0;border-bottom:1px solid #f1f5f9}.history-food-image,.checkbill-thumb,.order-review-thumb{width:58px;height:58px;border-radius:12px;overflow:hidden;background:#f1f5f9;display:grid;place-items:center;font-size:24px}.history-food-image img,.checkbill-thumb img,.order-review-thumb img{width:100%;height:100%;object-fit:cover}.history-food-main,.checkbill-item-main,.order-review-main{min-width:0}.history-food-main b,.checkbill-item-main b,.order-review-main b{display:block}.history-food-main small,.checkbill-item-main small,.order-review-main small{display:block;color:#64748b;margin-top:3px}.order-review-main input{margin-top:7px;padding:7px}.order-review-row .qty{align-self:center}.previous-order-block .order-review-row:last-child{border-bottom:0}.checkbill-icon{text-align:center;font-size:44px}.checkbill-page h1{text-align:center;margin-bottom:5px}.checkbill-items{border-top:1px solid #e5e7eb;margin-top:20px}.bill-summary{margin-bottom:12px}.checkbill-help{color:#64748b;font-size:13px;line-height:1.55;text-align:center}.bill-requested{display:flex;flex-direction:column;gap:4px;text-align:center;padding:16px;border-radius:14px;background:#ecfdf5;color:#166534}.history-add{margin-top:8px}.kitchen-page-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 18px}.kitchen-page-head h1{margin:0;color:#fff}.kitchen-page-head p{margin:4px 0 0;color:#94a3b8}.kitchen-page-head .btn{background:#ffffff18;color:#fff;border:1px solid #ffffff22}.k-empty{grid-column:1/-1;text-align:center;padding:70px 20px;color:#94a3b8}.k-empty>div{margin:auto;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:#10b98122;color:#34d399;font-size:34px}.k-empty h2{color:#fff;margin-bottom:5px}
@media(max-width:650px){.page-heading{flex-direction:column}.page-heading>.btn{width:100%;text-align:center}.customer-actions{gap:4px}.checkout-btn span,.history-btn span{display:none}.receipt-nav.dual{display:grid;grid-template-columns:1fr 1fr}.history-food-line,.checkbill-line,.order-review-row{grid-template-columns:50px minmax(0,1fr) auto}.history-food-image,.checkbill-thumb,.order-review-thumb{width:50px;height:50px}.order-review-row .qty{grid-column:2/4;justify-content:flex-start}.kitchen-page-head{align-items:flex-start;flex-direction:column}.kitchen-page-head .btn{width:100%;text-align:center}.topbar .muted-light{display:none}}
@media print{.table-state,.table-bill-note,.mode-pill{display:none!important}}
