:root {
  color-scheme: light;
  --ink: #1e2c3f;
  --muted: #77869a;
  --line: #e2eaf4;
  --paper: #fff;
  --canvas: #f3f7fc;
  --blue: #1764ad;
  --blue-dark: #104c88;
  --blue-pale: #eaf2fc;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; max-width: 1600px; margin: 0 auto; padding: 0 48px; }

.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #dce6f2; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 39px; border-radius: 13px 13px 13px 4px; background: var(--blue); color: white; font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 16px; letter-spacing: -1px; }
.brand-mark span { color: #cde4ff; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-family: 'Playfair Display', Georgia, serif; font-size: 18px; letter-spacing: -.35px; }
.brand-copy small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.topbar-right { display: flex; align-items: center; gap: 27px; color: var(--muted); font-size: 12px; }
.open-indicator { display: flex; align-items: center; gap: 8px; color: #41678f; }
.open-indicator span { width: 7px; height: 7px; background: #4884c3; border-radius: 50%; box-shadow: 0 0 0 3px #e2effb; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 38px; min-height: calc(100vh - 136px); padding: 38px 0 34px; }
.menu-panel { min-width: 0; }
.section-heading, .order-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 8px; color: #9a9f98; font-size: 9px; font-weight: 700; letter-spacing: 1.75px; }
h1, h2, p { margin-top: 0; }
h1, h2 { margin-bottom: 0; font-family: 'Playfair Display', Georgia, serif; font-weight: 600; letter-spacing: -.6px; }
h1 { font-size: 31px; }
h2 { font-size: 22px; }
.subheading { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background .16s, border-color .16s, transform .16s; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button-outline { border-color: #dfe3dc; background: #fff; }
.button-outline:hover { border-color: #aeb9ad; background: #fbfcfa; }
.add-menu-button { margin-top: 18px; }
.add-menu-button span { font-size: 17px; line-height: 1; }
.search-box { height: 46px; display: flex; align-items: center; gap: 10px; margin-top: 27px; padding: 0 13px; border: 1px solid #e7e9e3; border-radius: 8px; background: white; color: #899189; }
.search-box > span:first-child { font-size: 21px; transform: rotate(-20deg); }
.search-box input { width: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-box input::placeholder { color: #a6aba5; }
kbd { min-width: 21px; padding: 2px 5px; border: 1px solid #e9eae6; border-radius: 4px; color: #a2a7a0; text-align: center; font: 11px 'DM Sans', sans-serif; }
.category-tabs { display: flex; gap: 8px; margin: 21px 0 19px; overflow-x: auto; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab { padding: 8px 14px; flex: 0 0 auto; border: 1px solid transparent; border-radius: 20px; background: transparent; color: #777f77; cursor: pointer; font-size: 11px; font-weight: 500; }
.category-tab:hover { background: white; }
.category-tab.active { border-color: var(--blue); background: var(--blue); color: white; }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.menu-card { position: relative; min-height: 169px; display: flex; flex-direction: column; justify-content: space-between; padding: 15px; border: 1px solid #e9eae6; border-radius: 10px; background: white; text-align: left; cursor: pointer; transition: border-color .16s, box-shadow .16s, transform .16s; }
.menu-card:hover { transform: translateY(-2px); border-color: #c8d6ca; box-shadow: 0 7px 20px #263d3010; }
.menu-card:focus-visible, .button:focus-visible, .category-tab:focus-visible, .icon-button:focus-visible { outline: 3px solid #a8c7ad; outline-offset: 2px; }
.food-art { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: var(--art-bg, #f5eee6); font-size: 23px; }
.food-meta { display: grid; gap: 5px; padding-right: 14px; }
.food-name { font-size: 12px; font-weight: 600; line-height: 1.4; }
.food-category { color: #969c95; font-size: 10px; }
.food-price { position: absolute; right: 15px; bottom: 15px; color: var(--blue); font-size: 12px; font-weight: 700; }
.empty-menu { padding: 45px 12px; color: var(--muted); text-align: center; font-size: 13px; }
.hidden { display: none !important; }

.order-panel { display: flex; flex-direction: column; min-height: 620px; padding: 23px 22px 19px; border: 1px solid #e8e9e4; border-radius: 12px; background: white; box-shadow: 0 5px 22px #263d3007; }
.order-heading { align-items: center; }
.order-heading .eyebrow { margin-bottom: 6px; }
.order-count { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-left: 4px; border-radius: 50%; background: var(--blue-pale); color: var(--blue); font: 600 11px 'DM Sans', sans-serif; vertical-align: 3px; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid #e7e9e3; border-radius: 8px; background: white; color: #788078; cursor: pointer; font-size: 18px; }
.icon-button:hover { background: #f7f8f5; }
.order-type { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding: 11px 0 13px; border-bottom: 1px solid var(--line); color: #858c84; font-size: 11px; }
.order-type select { padding: 5px 8px; border: 1px solid #e8eae5; border-radius: 6px; background: #fff; color: var(--ink); font-size: 11px; }
.cart-list { max-height: 340px; overflow-y: auto; }
.cart-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 16px 0; border-bottom: 1px solid #eff0ed; }
.cart-item-name { overflow: hidden; color: #38433c; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-price { margin-top: 5px; color: #858c84; font-size: 10px; }
.cart-row-right { display: flex; align-items: center; gap: 10px; }
.cart-line-total { min-width: 54px; color: var(--ink); text-align: right; font-size: 11px; font-weight: 600; }
.quantity-control { display: flex; align-items: center; gap: 8px; }
.quantity-control button { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 1px solid #e5e8e2; border-radius: 6px; background: white; color: #5d6c60; cursor: pointer; font-size: 14px; line-height: 1; }
.quantity-control button:hover { border-color: #bbcbbc; background: #f7faf7; }
.quantity-control span { min-width: 10px; text-align: center; font-size: 11px; font-weight: 600; }
.empty-cart { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 150px; color: #9aa098; text-align: center; }
.empty-cart-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 3px; border-radius: 50%; background: #f3f5f1; color: #77907b; font-size: 24px; }
.empty-cart strong { color: #657067; font-size: 12px; }
.empty-cart > span:last-child { font-size: 10px; }
.order-footer { margin-top: auto; }
.tax-control { display: flex; align-items: center; justify-content: space-between; padding: 13px 0 12px; border-top: 1px solid var(--line); color: #858c84; font-size: 11px; }
.tax-input-wrap { display: flex; align-items: center; gap: 4px; color: #777f77; }
.tax-input-wrap input { width: 48px; padding: 5px 6px; border: 1px solid #e8eae5; border-radius: 5px; color: var(--ink); text-align: right; font-size: 11px; }
.totals > div { display: flex; align-items: center; justify-content: space-between; margin: 9px 0; color: #838b83; font-size: 11px; }
.totals strong { color: #4a554d; font-size: 11px; font-weight: 600; }
.grand-total { margin-top: 13px !important; padding-top: 14px; border-top: 1px dashed #e2e5df; color: var(--ink) !important; font-size: 13px !important; font-weight: 600; }
.grand-total strong { color: var(--blue); font-size: 21px; font-weight: 700; letter-spacing: -.4px; }
.button-primary { background: var(--blue); color: white; }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.checkout-button { width: 100%; min-height: 48px; justify-content: space-between; margin-top: 9px; padding: 0 16px; font-size: 12px; }
.checkout-button span { font-size: 15px; }
.secure-note { margin: 10px 0 0; color: #a0a59e; text-align: center; font-size: 9px; }
.secure-note span { color: #5680ad; }
.app-footer { display: flex; align-items: center; justify-content: space-between; min-height: 50px; border-top: 1px solid #e5e6e0; color: #a0a49e; font-size: 9px; font-weight: 600; letter-spacing: 1.3px; }
.text-button { padding: 7px 0; border: 0; background: transparent; color: #687b6b; cursor: pointer; font-size: 10px; font-weight: 600; letter-spacing: 0; }
.text-button:disabled { color: #afb4ae; cursor: not-allowed; }
.status-message { position: fixed; right: 25px; bottom: 23px; z-index: 5; max-width: min(360px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 8px; background: #293d30; box-shadow: 0 5px 20px #0002; color: white; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.status-message.visible { opacity: 1; transform: translateY(0); }

.menu-dialog { width: min(440px, calc(100vw - 32px)); padding: 27px; border: 1px solid #e5e9e2; border-radius: 13px; box-shadow: 0 20px 70px #17251c30; }
.menu-dialog::backdrop { background: #1f2a2370; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.dialog-heading .eyebrow { margin-bottom: 6px; }
.dialog-heading h2 { font-size: 23px; }
.form-field { display: grid; gap: 7px; margin: 14px 0; color: #59645b; font-size: 11px; font-weight: 600; }
.form-field input, .form-field select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #dfe4dc; border-radius: 7px; outline-color: #8eaa91; background: white; color: var(--ink); font-size: 12px; font-weight: 400; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.dialog-hint { margin: 17px 0; color: #929991; font-size: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.receipt-print { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .app-shell { padding: 0 28px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 350px; gap: 24px; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-shell { padding: 0 18px; }
  .topbar { height: 72px; }
  .topbar-right { gap: 12px; }
  .today-label { display: none; }
  .workspace { grid-template-columns: 1fr; gap: 27px; padding: 28px 0; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-card { min-height: 152px; }
  .order-panel { min-height: 560px; }
  .app-footer { margin-top: 0; }
}
@media (max-width: 390px) {
  .app-shell { padding: 0 13px; }
  .menu-grid { gap: 9px; }
  .menu-card { min-height: 143px; padding: 12px; }
  .food-price { right: 12px; bottom: 12px; }
  .brand-copy strong { font-size: 16px; }
  .open-indicator { font-size: 10px; }
}
@media print {
  @page { size: 80mm auto; margin: 5mm; }
  body { min-width: 0; background: white; }
  .app-shell, .menu-dialog, .status-message { display: none !important; }
  .receipt-print { display: block !important; width: 70mm; margin: 0 auto; color: #111; font: 12px/1.45 'Courier New', monospace; }
  .receipt-print h1 { margin: 0; font: bold 19px/1.2 'Courier New', monospace; text-align: center; letter-spacing: 0; }
  .receipt-print p { margin: 4px 0; text-align: center; }
  .receipt-divider { margin: 10px 0; border: 0; border-top: 1px dashed #777; }
  .receipt-meta, .receipt-line, .receipt-total { display: flex; justify-content: space-between; gap: 8px; }
  .receipt-meta { margin: 3px 0; }
  .receipt-line { margin: 6px 0; }
  .receipt-line-name { max-width: 42mm; overflow-wrap: anywhere; }
  .receipt-line-detail { color: #444; font-size: 10px; }
  .receipt-total { margin: 5px 0; }
  .receipt-grand { margin-top: 8px; font-size: 15px; font-weight: bold; }
  .receipt-thanks { margin-top: 14px !important; }
}
