:root {
  --forest: #123c36;
  --forest-2: #1b5249;
  --lime: #d9ed83;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --ink: #17211e;
  --muted: #6d7772;
  --line: #e5e2d9;
  --danger: #b44338;
  --shadow: 0 18px 55px rgba(20, 42, 36, .12);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { min-height: 100vh; }
.topbar { height: 80px; padding: 0 28px; background: var(--forest); color: white; display: flex; align-items: center; justify-content: space-between; gap: 18px; position: sticky; top: 0; z-index: 40; }
.brand { display: inline-flex; align-items: center; gap: 11px; background: none; border: 0; color: white; padding: 0; cursor: pointer; text-align: left; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--lime); color: var(--forest); display: grid; place-items: center; font: 900 23px/1 Georgia, serif; transform: rotate(-3deg); }
.brand strong { display: block; font-family: Georgia, serif; letter-spacing: .065em; font-size: 17px; }
.brand small { display: block; margin-top: 2px; color: rgba(255,255,255,.58); font-size: 8px; letter-spacing: .2em; font-weight: 800; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.live-pill { height: 40px; padding: 0 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.8); font-weight: 750; font-variant-numeric: tabular-nums; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(217,237,131,.12); }
.icon-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 13px; background: white; display: grid; place-items: center; cursor: pointer; }
.topbar .icon-btn { color: white; border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.06); }
.topbar .icon-btn svg { fill: currentColor; stroke: none; }
.printer-btn { height: 42px; padding: 0 16px; display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 13px; background: var(--lime); color: var(--forest); font-size: 13px; font-weight: 850; cursor: pointer; }
.printer-btn.connected { background: #fff; }
.printer-btn.connected::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #38a169; }
.workspace { min-height: calc(100vh - 80px); display: grid; grid-template-columns: minmax(0, 1fr) 390px; }
.menu-panel { padding: 34px 32px 70px; min-width: 0; }
.welcome-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; max-width: 1050px; margin: 0 auto; }
.eyebrow { margin: 0 0 8px; color: #74807b; font-size: 10px; line-height: 1; font-weight: 900; letter-spacing: .2em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font: 700 clamp(31px, 4vw, 45px)/1 Georgia, serif; letter-spacing: -.045em; }
.subcopy { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.mobile-cart-button { display: none; }
.searchbox { height: 52px; max-width: 1050px; margin: 28px auto 16px; padding: 0 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,248,.9); display: flex; align-items: center; gap: 11px; box-shadow: 0 5px 18px rgba(30,45,39,.035); }
.searchbox svg { color: #78827e; }
.searchbox input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.searchbox kbd { padding: 3px 7px; border: 1px solid var(--line); border-radius: 7px; background: #f2efe8; color: #88908c; font: 700 11px ui-monospace, monospace; }
.categories { max-width: 1050px; margin: 0 auto 24px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.categories::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; height: 39px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,248,.75); color: #68736e; font-size: 12px; font-weight: 800; cursor: pointer; }
.category-chip.active { border-color: var(--forest); background: var(--forest); color: white; }
.menu-grid { max-width: 1050px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.product-card { min-height: 184px; padding: 13px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); display: flex; flex-direction: column; text-align: left; cursor: pointer; position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.product-card:hover { transform: translateY(-2px); border-color: #c9d1c8; box-shadow: 0 11px 30px rgba(27,64,54,.09); }
.product-card:active { transform: scale(.985); }
.product-art { height: 82px; margin-bottom: 12px; border-radius: 13px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; font-size: 39px; }
.product-art::before, .product-art::after { content: ''; position: absolute; border-radius: 50%; opacity: .28; }
.product-art::before { width: 70px; height: 70px; right: -16px; top: -22px; background: white; }
.product-art::after { width: 44px; height: 44px; left: -12px; bottom: -15px; border: 8px solid rgba(255,255,255,.8); }
.art-bakmie { background: #eadcaa; }
.art-nasi-goreng { background: #e5c7a4; }
.art-nasi-tempong { background: #bed5ae; }
.art-minuman { background: #bddbd7; }
.art-topping { background: #ebc5b6; }
.product-card h3 { min-height: 35px; margin: 0 0 8px; font-size: 14px; line-height: 1.25; letter-spacing: -.015em; }
.product-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-bottom strong { color: var(--forest); font-size: 15px; }
.add-dot { width: 28px; height: 28px; border-radius: 9px; background: var(--forest); color: white; display: grid; place-items: center; font-size: 20px; line-height: 1; }
.product-qty { position: absolute; right: 9px; top: 9px; min-width: 27px; height: 27px; padding: 0 7px; border: 2px solid var(--paper); border-radius: 10px; background: var(--forest); color: white; display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.empty-menu { max-width: 1050px; margin: 60px auto; text-align: center; color: var(--muted); }
.empty-menu > span { font-size: 44px; }
.empty-menu h2 { margin: 10px 0 6px; color: var(--ink); font-family: Georgia, serif; }
.cart-panel { min-width: 0; padding: 27px 24px 24px; background: var(--paper); border-left: 1px solid var(--line); display: flex; flex-direction: column; height: calc(100vh - 80px); position: sticky; top: 80px; overflow: hidden; }
.cart-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cart-head .eyebrow { margin-bottom: 5px; }
.cart-head h2 { margin: 0; font: 700 25px/1 Georgia, serif; }
.text-btn { padding: 8px; border: 0; background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.text-btn.danger { color: var(--danger); }
.mobile-close { display: none; }
.order-switch { margin-top: 22px; padding: 4px; border-radius: 13px; background: #efeee8; display: grid; grid-template-columns: 1fr 1fr; }
.order-switch button { height: 38px; border: 0; border-radius: 10px; background: transparent; color: #6d7671; font-size: 12px; font-weight: 800; cursor: pointer; }
.order-switch button.active { background: white; color: var(--forest); box-shadow: 0 3px 10px rgba(20,40,34,.08); }
.customer-field { margin-top: 17px; display: block; }
.customer-field span { display: block; margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.customer-field input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: white; font-size: 13px; }
.customer-field input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(27,82,73,.09); }
.cart-items { flex: 1; margin: 18px -8px 0 0; padding-right: 8px; overflow-y: auto; scrollbar-width: thin; }
.empty-cart { height: 100%; min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-bowl { width: 66px; height: 66px; margin-bottom: 15px; border-radius: 22px; background: #f0eee7; color: #9aa39e; display: grid; place-items: center; font: 34px Georgia, serif; }
.empty-cart h3 { margin-bottom: 5px; font-size: 14px; }
.empty-cart p { max-width: 200px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.cart-item { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
.cart-item h3 { margin: 0 0 5px; font-size: 13px; line-height: 1.3; }
.cart-item-price { color: var(--forest); font-size: 13px; font-weight: 850; }
.cart-item-actions { display: flex; align-items: center; gap: 4px; }
.qty-button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; font-weight: 850; }
.qty-value { min-width: 23px; text-align: center; font-size: 12px; font-weight: 850; }
.remove-item { width: 28px; height: 28px; margin-left: 4px; border: 0; background: transparent; color: #a36a63; cursor: pointer; font-size: 16px; }
.cart-summary { padding-top: 17px; border-top: 1px solid var(--line); }
.cart-summary > div { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.total-row { padding-top: 8px; color: var(--ink) !important; }
.total-row span { font-weight: 800; }
.total-row strong { font: 700 25px Georgia, serif; letter-spacing: -.02em; }
.pay-button { width: 100%; height: 54px; margin-top: 8px; padding: 0 18px; border: 0; border-radius: 15px; background: var(--forest); color: white; display: flex; align-items: center; justify-content: space-between; font-weight: 850; cursor: pointer; }
.pay-button:disabled { cursor: not-allowed; background: #c7cbc7; }
.pay-button svg { width: 18px; }
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(13,26,23,.48); opacity: 0; visibility: hidden; transition: .2s; }
.toast { min-width: 230px; max-width: calc(100vw - 32px); padding: 13px 17px; border-radius: 13px; background: #17211e; color: white; box-shadow: var(--shadow); position: fixed; z-index: 200; left: 50%; top: 94px; translate: -50% -16px; opacity: 0; pointer-events: none; font-size: 13px; font-weight: 750; text-align: center; transition: .2s; }
.toast.show { opacity: 1; translate: -50% 0; }
.modal { width: auto; max-width: none; height: auto; max-height: none; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.modal::backdrop { background: rgba(11,27,23,.58); backdrop-filter: blur(4px); }
.modal-card { width: min(92vw, 510px); max-height: min(90vh, 820px); padding: 25px; border: 1px solid rgba(255,255,255,.4); border-radius: 26px; background: var(--paper); box-shadow: 0 30px 90px rgba(11,31,25,.28); overflow-y: auto; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.modal-head .eyebrow { margin-bottom: 6px; }
.modal-head h2 { margin: 0; font: 700 27px/1.08 Georgia, serif; letter-spacing: -.03em; }
.modal-close { flex: 0 0 auto; color: #6e7773; font-size: 24px; }
.payment-total { margin: 22px 0 16px; padding: 17px 18px; border-radius: 16px; background: var(--forest); color: white; display: flex; align-items: center; justify-content: space-between; }
.payment-total span { color: rgba(255,255,255,.7); font-size: 12px; }
.payment-total strong { font: 700 25px Georgia, serif; }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.payment-method { min-width: 0; padding: 12px 10px; border: 1px solid var(--line); border-radius: 15px; background: white; text-align: left; cursor: pointer; position: relative; }
.payment-method.active { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.payment-method > span:nth-child(2) { display: block; margin-top: 10px; }
.payment-method b, .payment-method small { display: block; }
.payment-method b { font-size: 12px; }
.payment-method small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.3; }
.payment-method i { display: none; position: absolute; right: 9px; top: 9px; width: 17px; height: 17px; border-radius: 50%; background: var(--forest); color: white; font: 800 10px/17px sans-serif; text-align: center; }
.payment-method.active i { display: block; }
.method-icon { width: 33px; height: 33px; border-radius: 10px; background: #efeee8; color: var(--forest); display: grid; place-items: center; font-size: 10px; font-weight: 900; }
.cash-section, .qris-section, .transfer-section { margin-top: 16px; padding: 17px; border-radius: 16px; background: #f0eee7; }
.cash-input > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.cash-input > div { height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: white; display: flex; align-items: center; gap: 8px; }
.cash-input b { color: #818a85; font-size: 13px; }
.cash-input input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 20px; font-weight: 850; }
.quick-cash { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.quick-cash button { height: 30px; padding: 0 10px; border: 1px solid #d7d4cb; border-radius: 9px; background: white; color: #5e6863; font-size: 10px; font-weight: 800; cursor: pointer; }
.change-row, .bank-row { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.change-row strong { font-size: 16px; color: var(--forest); }
.qris-section { text-align: center; }
.qr-art { width: 126px; height: 126px; margin: 0 auto 12px; border: 10px solid white; outline: 1px solid #ddd8ce; background: repeating-conic-gradient(#17211e 0 25%, white 0 50%) 0 0 / 18px 18px; display: grid; place-items: center; }
.qr-art span { padding: 5px; background: white; color: var(--forest); font-size: 7px; font-weight: 1000; }
.qris-section p, .transfer-section p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.transfer-section .bank-row { margin-top: 0; margin-bottom: 12px; }
.confirm-payment, .print-button, .secondary-button, .new-order-button { height: 50px; padding: 0 17px; border: 0; border-radius: 14px; font-weight: 850; cursor: pointer; }
.confirm-payment { width: 100%; margin-top: 16px; background: var(--forest); color: white; }
.confirm-payment:disabled { background: #bfc5c1; cursor: not-allowed; }
.success-card { padding: 35px; text-align: center; overflow: visible; }
.success-mark { width: 67px; height: 67px; margin: 0 auto 23px; border-radius: 23px; background: var(--lime); color: var(--forest); display: grid; place-items: center; font-size: 34px; font-weight: 900; transform: rotate(-3deg); }
.success-card h2 { margin: 0 0 8px; font: 700 30px Georgia, serif; }
.success-card > p:not(.eyebrow) { color: var(--muted); font-size: 13px; }
.success-actions { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.print-button { background: var(--forest); color: white; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--forest); }
.new-order-button { width: 100%; height: 40px; margin-top: 12px; background: transparent; color: var(--muted); font-size: 12px; }
.receipt-wrap { width: min(94vw, 480px); }
.receipt { --paper-width: 58mm; width: min(100%, var(--paper-width)); margin: 22px auto 18px; padding: 18px 14px; background: white; color: #111; box-shadow: 0 7px 28px rgba(30,30,30,.1); font: 11px/1.45 "Courier New", monospace; }
.receipt.paper-80 { --paper-width: 80mm; }
.receipt-brand { text-align: center; }
.receipt-brand h3 { margin: 0; font: 900 17px/1.2 "Courier New", monospace; }
.receipt-brand p { margin: 4px 0; }
.receipt-rule { margin: 11px 0; border-top: 1px dashed #555; }
.receipt-meta div, .receipt-line, .receipt-total div { display: flex; justify-content: space-between; gap: 12px; }
.receipt-item { margin: 8px 0; }
.receipt-item > b { display: block; }
.receipt-total strong { font-size: 14px; }
.receipt-footer { margin: 14px 0 3px; text-align: center; }
.receipt-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.paper-toggle { padding: 3px; border-radius: 10px; background: #efeee8; display: flex; }
.paper-toggle button { height: 35px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.paper-toggle button.active { background: white; color: var(--forest); box-shadow: 0 2px 8px rgba(20,30,25,.08); }
.receipt-actions .print-button { min-width: 100px; }
.compact-card { width: min(92vw, 420px); text-align: center; }
.compact-card .modal-head { text-align: left; }
.printer-illustration { width: 110px; height: 86px; margin: 27px auto 21px; border-radius: 16px; background: var(--forest); position: relative; }
.printer-illustration::before { content: ''; width: 70px; height: 38px; background: white; border: 1px solid var(--line); position: absolute; left: 20px; top: -15px; }
.printer-illustration span { width: 76px; height: 38px; background: white; position: absolute; left: 17px; bottom: -15px; box-shadow: inset 0 0 0 1px var(--line); }
.printer-illustration i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); position: absolute; right: 14px; top: 17px; }
.compact-card h3 { margin-bottom: 8px; }
.compact-card > p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.mock-note { display: block; margin-top: 12px; color: #929a96; font-size: 9px; }
.image-card { width: min(92vw, 620px); }
.image-card img { display: block; width: 100%; max-height: 72vh; margin-top: 20px; object-fit: contain; border-radius: 16px; background: #eee; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 355px; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .topbar { height: 68px; padding: 0 16px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: 14px; }
  .live-pill { display: none; }
  .printer-btn { width: 42px; padding: 0; justify-content: center; }
  .printer-btn span { display: none; }
  .workspace { min-height: calc(100vh - 68px); display: block; }
  .menu-panel { padding: 27px 16px 110px; }
  .welcome-row { align-items: center; }
  .mobile-cart-button { height: 43px; padding: 0 11px 0 14px; border: 0; border-radius: 13px; background: var(--forest); color: white; display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 850; }
  .mobile-cart-button b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 8px; background: var(--lime); color: var(--forest); display: grid; place-items: center; font-size: 10px; }
  h1 { font-size: 31px; }
  .subcopy { font-size: 12px; }
  .searchbox { margin-top: 22px; }
  .searchbox kbd { display: none; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .product-card { min-height: 167px; padding: 10px; border-radius: 17px; }
  .product-art { height: 72px; margin-bottom: 10px; font-size: 34px; }
  .product-card h3 { font-size: 12px; }
  .product-bottom strong { font-size: 13px; }
  .cart-panel { width: min(92vw, 390px); height: 100dvh; padding: max(22px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); border: 0; box-shadow: -18px 0 60px rgba(13,30,25,.2); position: fixed; z-index: 70; right: 0; top: 0; transform: translateX(105%); transition: transform .25s ease; }
  .cart-panel.open { transform: translateX(0); }
  body.cart-open { overflow: hidden; }
  body.cart-open .scrim { opacity: 1; visibility: visible; }
  .cart-head .text-btn { margin-left: auto; }
  .mobile-close { display: grid; }
  .payment-methods { grid-template-columns: 1fr; }
  .payment-method { display: grid; grid-template-columns: 35px 1fr; align-items: center; column-gap: 9px; }
  .payment-method > span:nth-child(2) { margin-top: 0; }
  .payment-method small { font-size: 9px; }
  .success-card { padding: 29px 22px; }
}
@media (max-width: 370px) {
  .menu-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 145px; display: grid; grid-template-columns: 93px minmax(0,1fr); grid-template-rows: 1fr auto; gap: 4px 12px; }
  .product-art { grid-row: 1 / 3; height: 100%; min-height: 115px; margin: 0; }
}
@media print {
  @page { size: 58mm auto; margin: 0; }
  body * { visibility: hidden !important; }
  #receiptDialog, #receiptDialog *, #receipt { visibility: visible !important; }
  #receiptDialog { display: block !important; position: absolute; inset: 0; margin: 0; padding: 0; background: white; }
  #receiptDialog::backdrop, .no-print { display: none !important; }
  .receipt-wrap { width: auto; max-height: none; padding: 0; border: 0; box-shadow: none; overflow: visible; }
  .receipt { width: var(--paper-width); margin: 0; padding: 4mm 3mm; box-shadow: none; }
}
