/* app.css — menu.emm.sa page-local styles on top of tokens/base/components. */
.logo-mark .ic, .nav-brand .ic { width: 22px; height: 22px; }
.ic { width: 1.1em; height: 1.1em; vertical-align: -0.15em; }
.wa-btn { background: #0e7a45; color: #fff; }
.wa-btn:hover { background: #0b6339; }
.inline-form { display: inline; }
.stack { display: grid; gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
.section-tight { padding-block: var(--space-2xl); }
.sec-title { text-align: center; margin-bottom: var(--space-sm); }
.sec-sub { text-align: center; color: var(--text-muted); margin-bottom: var(--space-2xl); }
.faq-wrap { max-width: var(--container-narrow); margin-inline: auto; }
.feature-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .feature-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid-4 { grid-template-columns: 1fr; } }
.steps-light .step { color: var(--on-navy); }
.steps-light .step::before { background: var(--accent); color: #fff; }
.steps-light .step h3 { font-size: var(--text-lg); margin-bottom: var(--space-2xs); }
.steps-light .step p { color: var(--on-navy-muted); }
.cta-box h1, .cta-box h2 { color: var(--on-navy); } /* qa:cta-box — h2 was navy-on-navy (invisible) */
.cta-box .text-muted { color: var(--on-navy-muted); }
.cta-box { background: var(--navy-2); color: var(--on-navy); border-radius: var(--radius-lg); padding: var(--space-2xl); text-align: center; }
.cta-box .lead { color: var(--on-navy-muted); }
.card-center { text-align: center; padding: var(--space-2xl); }
.card-center h1 { font-size: var(--text-2xl); }
.waitlist-form { text-align: start; margin-top: var(--space-lg); }
.waitlist-form .label, .waitlist-form .hint { color: var(--on-navy); }
.waitlist-form .input { background: var(--navy-700); border-color: var(--navy-500); color: var(--on-navy); }
.cta-box .waitlist-form { color: var(--on-navy); }
.price-per { font-size: var(--text-sm); color: var(--text-muted); }
.price-card.current { outline: 2px solid var(--success); }
.price-card .badge { margin-inline-start: 4px; }
.pay-badge { font-weight: var(--weight-bold); }
.alert { padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md); margin-block: var(--space-md); font-size: var(--text-sm); border: 1px solid transparent; }
.alert-success { background: color-mix(in srgb, var(--success) 12%, var(--surface)); border-color: var(--success); }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-color: var(--danger); }
.alert-warning { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border-color: var(--warning); }
.disclosure { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); font-size: var(--text-sm); text-align: start; }
.disclosure p { margin-bottom: var(--space-2xs); }
.draft-banner { background: var(--warning); color: #1a1a2e; padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md); font-weight: var(--weight-bold); margin-bottom: var(--space-lg); }
.legal h1 { font-size: var(--text-2xl); margin-bottom: var(--space-sm); }
.legal h2 { font-size: var(--text-lg); margin-top: var(--space-xl); }
.legal p, .legal li { line-height: 1.8; }
.contact-list li { margin-bottom: var(--space-2xs); }
.footer-legal li { font-size: var(--text-sm); }
.footer .footer-grid > div:first-child { color: var(--on-navy-muted); } /* qa:footer-brand-contrast — gray-500 brand/description text on the navy footer was 2.56:1 */
.footer-legal a { text-decoration: underline; }
.checkout-embed{margin-top:var(--space-lg)}
.checkout-embed #stream-checkout{min-height:560px}
/* app */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.page-head h1 { font-size: var(--text-2xl); }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
@media (max-width: 760px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); }
.stat-label { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-2xs); }
.plan-name { font-size: var(--text-lg); }
.actions { display: flex; gap: var(--space-2xs); flex-wrap: wrap; align-items: center; }
.row-form { display: flex; gap: var(--space-2xs); align-items: center; flex-wrap: wrap; }
.row-form.wrap { align-items: end; }
.grow { flex: 1 1 200px; }
.input-sm, .select-sm { padding: 8px 10px; font-size: var(--text-sm); min-height: 40px; }
.input-prefix { background: var(--surface-2); border: 1.5px solid var(--border); border-inline-end: 0; border-radius: var(--radius-sm); padding: 0 10px; display: inline-flex; align-items: center; font-size: var(--text-sm); color: var(--text-muted); }
.input-group { display: flex; }
.input-group .input { border-start-start-radius: 0; border-end-start-radius: 0; }
.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-size: var(--text-sm); margin-inline-end: var(--space-2xs); }
.items-table td, .items-table th { padding: 6px; vertical-align: middle; }
.items-table .input-sm { min-width: 120px; }
.items-table td:first-child .input-sm { min-width: 160px; }
.btn-ghost.danger { color: var(--danger); }
.logo-preview { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); }
/* menu editor */
.menu-editor { display: grid; grid-template-columns: 300px 1fr; gap: var(--space-lg); align-items: start; }
@media (max-width: 1000px) { .menu-editor { grid-template-columns: 1fr; } }
.editor-side { display: grid; gap: var(--space-md); }
.cat-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); margin-bottom: var(--space-md); }
.cat-head { display: flex; justify-content: space-between; gap: var(--space-sm); align-items: center; flex-wrap: wrap; margin-bottom: var(--space-sm); }
.cat-form { flex: 1 1 240px; }
.cat-form .input-sm { min-width: 160px; }
.cat-empty { padding: var(--space-xs) 0; }
tr.item-row.unavailable td { opacity: .55; }
tr.item-row.unavailable td.cell-actions { opacity: 1; }
.cell-img { width: 84px; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); display: block; margin-bottom: 4px; background: var(--surface-2); }
.upload-form { display: inline; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cell-actions { min-width: 260px; }
.cell-actions .actions { flex-wrap: nowrap; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider::before { transform: translateX(20px); }
[dir="rtl"] .switch input:checked + .slider::before { transform: translateX(-20px); }
/* QR print sheet */
.qr-sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-2xl); text-align: center; max-width: 520px; margin-inline: auto; }
.qr-brand { font-size: var(--text-2xl); font-weight: var(--weight-extrabold); margin-bottom: var(--space-md); }
.qr-img { width: min(360px, 80vw); height: auto; image-rendering: pixelated; }
.qr-cta { font-size: var(--text-lg); margin-top: var(--space-md); }
.qr-url { color: var(--text-muted); font-size: var(--text-sm); word-break: break-all; }
@media print { .nav, .footer, .no-print, .toast-stack { display: none !important; } .qr-sheet { border: 0; } body { background: #fff; } }
/* public menu */
.menu-page { min-height: 100dvh; }
.menu-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.menu-header-inner { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-sm) var(--space-md); max-width: 760px; margin-inline: auto; }
.menu-logo { width: 48px; height: 48px; object-fit: contain; border-radius: var(--radius-md); }
.menu-logo-text { font-size: var(--text-2xl); color: var(--accent); }
.menu-title { flex: 1; min-width: 0; }
.menu-title h1 { font-size: var(--text-xl); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-toggle { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px 10px; font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--text); cursor: pointer; }
.menu-main { max-width: 760px; margin-inline: auto; padding: var(--space-md); padding-bottom: 96px; }
.menu-tools { display: grid; gap: var(--space-sm); margin-bottom: var(--space-md); }
.menu-search input { width: 100%; }
.cat-tabs { display: flex; gap: var(--space-2xs); overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cat-tab { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-weight: var(--weight-medium); font-size: var(--text-sm); cursor: pointer; }
.cat-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.menu-cat-title { font-size: var(--text-lg); margin: var(--space-lg) 0 var(--space-sm); padding-inline-start: var(--space-2xs); border-inline-start: 4px solid var(--accent); }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
@media (max-width: 520px) { .menu-grid { grid-template-columns: 1fr; } }
.menu-item { display: flex; gap: var(--space-sm); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-sm); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.menu-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.menu-item-img { flex: 0 0 76px; width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.menu-item-img img { width: 100%; height: 100%; object-fit: cover; }
.menu-item-img-ph { font-size: var(--text-xl); opacity: .5; }
.menu-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-item-name { font-size: var(--text-md); font-weight: var(--weight-bold); }
.menu-item-desc { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2xs); margin-top: auto; padding-top: var(--space-2xs); }
.menu-item-price { font-weight: var(--weight-bold); color: var(--accent-ink); }
.menu-item-price small { font-size: var(--text-xs); font-weight: normal; color: var(--text-muted); }
.add-btn { padding: 4px 12px; min-height: 34px; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty-btn { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--accent); background: transparent; color: var(--accent); font-size: var(--text-md); cursor: pointer; line-height: 1; }
.qty-n { min-width: 18px; text-align: center; font-weight: var(--weight-bold); }
.menu-item.hidden, .menu-cat.hidden { display: none; }
.empty-menu { text-align: center; color: var(--text-muted); padding: var(--space-2xl) 0; }
.menu-footer { text-align: center; color: var(--text-muted); font-size: var(--text-xs); margin-top: var(--space-2xl); }
.menu-badge { display: inline-block; margin-top: var(--space-2xs); color: var(--text-muted); text-decoration: none; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 4px 12px; }
.menu-badge strong { color: var(--accent-ink); }
/* modals */
dialog.item-modal, dialog.cart-modal { border: 0; border-radius: var(--radius-lg); padding: var(--space-lg); width: min(440px, 92vw); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(0,0,0,.55); }
dialog.cart-modal { position: fixed; inset: auto 0 0 0; margin: 0 auto; border-radius: var(--radius-lg) var(--radius-lg) 0 0; width: min(560px, 100vw); }
.modal-close { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--surface-2); border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: var(--text-md); cursor: pointer; color: var(--text); }
.modal-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-md); margin-bottom: var(--space-sm); background: var(--surface-2); }
.cart-lines { display: grid; gap: var(--space-2xs); margin-block: var(--space-md); }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: var(--space-sm); align-items: center; padding: var(--space-2xs) 0; border-bottom: 1px dashed var(--border); font-size: var(--text-sm); }
.cart-bar { position: fixed; bottom: 12px; inset-inline: 12px; max-width: 736px; margin-inline: auto; z-index: 30; background: var(--navy); color: var(--on-navy); border-radius: var(--radius-lg); padding: var(--space-sm) var(--space-md); display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); box-shadow: var(--shadow-lg); }
.cart-bar[hidden] { display: none; }

/* ---- online ordering (public cart + payment page) ---- */
.order-type { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xs); }
.order-type-opt { position: relative; }
.order-type-opt input { position: absolute; opacity: 0; inset: 0; }
.order-type-opt span { display: block; text-align: center; padding: var(--space-sm) var(--space-xs); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: var(--text-sm); cursor: pointer; color: var(--text-muted); }
.order-type-opt input:checked + span { border-color: var(--accent); background: var(--accent-bg, var(--surface-2)); color: var(--accent-ink); font-weight: var(--weight-bold); }
.order-type-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp-field { position: absolute; right: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.order-main { max-width: 720px; margin-inline: auto; padding: var(--space-lg) var(--space-md) var(--space-3xl); }
.order-card { padding: var(--space-lg); }
.order-steps { display: flex; justify-content: space-between; gap: var(--space-xs); margin-bottom: var(--space-lg); font-size: var(--text-xs); color: var(--text-muted); }
.order-steps .step { flex: 1; text-align: center; padding: var(--space-2xs); border-bottom: 3px solid var(--border); }
.order-steps .step.done { border-color: var(--success); color: var(--success); }
.order-steps .step.active { border-color: var(--accent); color: var(--accent-ink); font-weight: var(--weight-bold); }
.order-table td { vertical-align: top; }
.order-line td:first-child { color: var(--text); }
.order-total td { font-size: var(--text-md); border-top: 2px solid var(--border); }
.order-meta { display: grid; gap: var(--space-2xs); margin: var(--space-md) 0; font-size: var(--text-sm); }
.order-meta div { display: grid; grid-template-columns: 90px 1fr; gap: var(--space-sm); }
.order-meta dt { color: var(--text-muted); }
.order-meta dd { margin: 0; }
.checkout-embed { margin-top: var(--space-md); }
.order-done .order-check { width: 64px; height: 64px; border-radius: 50%; background: var(--success); color: #fff; font-size: 34px; font-weight: var(--weight-black); display: grid; place-items: center; margin: 0 auto var(--space-md); }
.order-num { font-size: var(--text-lg); }
.order-actions { display: grid; gap: var(--space-sm); max-width: 420px; margin: var(--space-md) auto 0; }
/* ---- restaurant orders dashboard ---- */
.orders-callout { margin-top: var(--space-xl); }
.card-inner-toggle { padding: var(--space-md); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); }
.upgrade-cta p { margin-bottom: var(--space-2xs); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; }
.seg-btn { padding: 6px 16px; font-size: var(--text-sm); color: var(--text-muted); }
.seg-btn.active { background: var(--navy); color: var(--on-navy); }
.nav-badge { font-size: 11px; padding: 0 7px; margin-inline-start: 4px; }
.orders-table td { vertical-align: top; }
.orders-table .order-row.st-paid td { background: var(--success-bg); }
.orders-table .order-row.st-refunded td, .orders-table .order-row.st-cancelled td { opacity: .7; }
.order-items-cell { display: flex; flex-wrap: wrap; gap: 4px; max-width: 320px; }
.order-item { display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface-2); font-size: var(--text-xs); white-space: nowrap; }
.orders-table .cell-actions { display: flex; flex-wrap: wrap; gap: 4px; min-width: 180px; }
@media (max-width: 760px) { .order-main { padding-inline: var(--space-sm); } .order-card { padding: var(--space-md); } }

/* ---- platform upgrade: mobile hamburger nav, API keys page, docs ---- */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius-md, 10px); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.nav-toggle .ic { width: 22px; height: 22px; }
@media (max-width: 760px) {
  .nav-inner { position: relative; }
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .nav-links { display: none; }
  .nav.nav-open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-sm); position: absolute; top: 100%; inset-inline: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--space-md); z-index: 50; box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.08)); }
  .nav.nav-open .nav-links li { width: 100%; }
  .nav.nav-open .nav-links a, .nav.nav-open .nav-links .btn { display: block; width: 100%; text-align: start; padding: var(--space-sm) var(--space-md); }
  .nav.nav-open .theme-toggle { display: none; }
}
pre.code { direction: ltr; text-align: left; background: var(--surface-2, var(--surface)); border: 1px solid var(--border); border-radius: var(--radius-md, 10px); padding: var(--space-md); overflow-x: auto; font-size: 0.85rem; white-space: pre-wrap; word-break: break-all; font-family: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } /* qa:pre-mono */}
pre.code code { background: none; padding: 0; }
.endpoint { border: 1px solid var(--border); border-radius: var(--radius-md, 10px); padding: var(--space-lg); margin-bottom: var(--space-lg); background: var(--surface); }
.method { display: inline-block; font-family: ui-monospace, monospace; font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2, #eef); margin-inline-end: var(--space-sm); }
.method-GET { color: #0a7d3a; } .method-POST { color: #0b5ed7; } .method-PUT, .method-PATCH { color: #8a5a0b; } /* qa:method-contrast */ [data-theme="dark"] .method-PUT, [data-theme="dark"] .method-PATCH { color: #fcd34d; } .method-DELETE { color: #a3262a; } /* qa:method-contrast */ [data-theme="dark"] .method-DELETE { color: #fca5a5; }
.key-reveal { direction: ltr; text-align: left; font-family: ui-monospace, monospace; word-break: break-all; background: var(--surface-2, #eef); padding: var(--space-md); border-radius: var(--radius-md, 10px); border: 1px dashed var(--border); }
.checkbox-row { display: flex; gap: var(--space-sm); align-items: flex-start; }
.stack { display: grid; gap: var(--space-md); }
