/* 1. Variables */
:root {
  color-scheme: light;
  --color-bg: #f5f5f3;
  --color-surface: #fff;
  --color-surface-soft: #efefed;
  --color-text: #0b0b0b;
  --color-muted: #676762;
  --color-border: #deded9;
  --color-primary: #0b0b0b;
  --color-primary-hover: #30302d;
  --color-success: #177447;
  --color-warning: #946200;
  --color-danger: #b42318;
  --color-info: #2459a9;
  --primary: var(--color-primary);
  --primary-dark: var(--color-primary-hover);
  --forest: #171715;
  --forest-2: #30302d;
  --ink: var(--color-text);
  --muted: var(--color-muted);
  --surface: var(--color-surface);
  --canvas: var(--color-bg);
  --soft: var(--color-surface-soft);
  --line: var(--color-border);
  --success: var(--color-success);
  --warning: var(--color-warning);
  --danger: var(--color-danger);
  --info: var(--color-info);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .05);
  --shadow: 0 18px 50px rgba(0, 0, 0, .09);
  --radius-sm: 10px;
  --radius: 18px;
  --content: 1200px;
  --sidebar-width: 278px;
}

/* 2. Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: #aaa; text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Restaurant self-service onboarding */
.owner-cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin: 5rem 0 1.5rem; padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--color-border); border-radius: 24px; background: #fff; }
.owner-cta h2 { margin: .25rem 0; }
.owner-cta p { margin: 0; color: var(--color-muted); }
.restaurant-registration { max-width: 1180px; margin-inline: auto; }
.registration-benefits { display: grid; gap: .75rem; margin-top: 2rem; font-weight: 750; }
.registration-card { width: 100%; max-width: 760px; }
.registration-card fieldset { margin: 0 0 1.5rem; padding: 0; border: 0; }
.registration-card legend { width: 100%; margin-bottom: 1rem; padding: 0 0 .65rem; border-bottom: 1px solid var(--color-border); font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.onboarding-hero { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.5rem, 5vw, 3rem); border-radius: 24px; background: #111; color: #fff; }
.onboarding-hero h1 { margin: .25rem 0; color: #fff; }
.onboarding-hero p { max-width: 620px; color: #bbb; }
.progress-ring { display: grid; flex: 0 0 130px; place-items: center; aspect-ratio: 1; border: 8px solid #333; border-radius: 50%; text-align: center; }
.progress-ring strong { font-size: 1.65rem; }
.progress-ring span { color: #bbb; font-size: .72rem; }
.onboarding-progress { margin: 1.25rem 0; }
.onboarding-list { display: grid; gap: .65rem; }
.onboarding-step { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 1rem; padding: 1rem 1.15rem; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; color: inherit; text-decoration: none; }
.onboarding-step:hover { border-color: #111; }
.onboarding-step.complete { background: #f1f8f3; }
.step-check { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #111; color: #fff; font-size: .78rem; font-weight: 900; }
.onboarding-step.complete .step-check { background: #167044; }
.onboarding-step small { display: block; margin-top: .2rem; color: var(--color-muted); }
.onboarding-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

@media (max-width: 700px) {
  .owner-cta, .onboarding-hero { align-items: stretch; flex-direction: column; }
  .owner-cta .button { width: 100%; }
  .form-grid.three { grid-template-columns: 1fr; }
  .progress-ring { width: 110px; }
}
@media (max-width: 560px) {
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions > .button, .form-actions > button, .form-actions > form { width: 100%; }
  .form-actions > form > button { width: 100%; }
}
:focus-visible { outline: 3px solid #f2a900; outline-offset: 3px; }

/* 3. Typography */
h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.3rem, 5vw, 4.8rem); font-weight: 900; }
h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); font-weight: 850; }
h3 { font-size: 1.18rem; font-weight: 820; }
p { margin: .55rem 0 1rem; }
.muted, .helptext { color: var(--color-muted); font-size: .92rem; }
.eyebrow, .nav-label { display: block; color: var(--color-muted); font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.total { font-size: 1.4rem; font-weight: 900; }

/* 4. Layout */
.container, .shell { width: min(calc(100% - 2.5rem), var(--content)); margin-inline: auto; }
.app-main { min-width: 0; padding: 2.25rem 0 5rem; }
.app-frame { display: grid; grid-template-columns: minmax(0, 1fr) var(--sidebar-width); gap: 2rem; width: min(calc(100% - 3rem), 1440px); margin-inline: auto; }
.grid, .menu-grid, .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.row, .actions, .page-head, .section-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .85rem; flex-wrap: wrap; }
.actions form { margin: 0; }
.card .actions { justify-content: flex-start; }
.form-actions { justify-content: flex-end; margin-top: 1.5rem; }
.form-actions .secondary { order: 1; }
.form-actions button[type="submit"], .form-actions button:not([type]) { order: 2; }
.section-heading { margin-bottom: 1.5rem; }
.section-heading > p { max-width: 540px; color: var(--color-muted); }
.section-block { margin: 3rem 0; }
.nav, .breadcrumbs { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-bottom: 1.25rem; color: var(--color-muted); font-size: .9rem; }

/* 5. Header and right sidebar */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--color-border); backdrop-filter: blur(18px); }
.topbar { min-height: 72px; display: flex; align-items: center; gap: 1.5rem; }
.business-app .site-header .topbar { width: min(calc(100% - 3rem), 1440px); }
.brand { display: inline-flex; flex: 0 1 auto; align-items: center; gap: .7rem; min-width: 0; color: var(--color-text); font-weight: 900; text-decoration: none; }
.brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--color-primary); color: #fff; }
.header-context { flex: 1 1 auto; min-width: 0; color: var(--color-muted); font-size: .88rem; font-weight: 750; }
.header-context > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: .625rem; flex-wrap: nowrap; min-width: 0; margin-left: auto; }
.header-actions form { display: flex; align-items: center; margin: 0; }
.header-actions .button, .header-actions button { flex: 0 0 auto; min-height: 42px; margin: 0; white-space: nowrap; }
.header-account-action { margin-left: .125rem !important; padding-left: .75rem; border-left: 1px solid var(--color-border); }
.menu-toggle { display: none; width: 44px; padding: 0; font-size: 1.2rem; }
.app-sidebar { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 112px); overflow-y: auto; background: #10100f; color: #fff; border-radius: 20px; padding: 1rem; box-shadow: var(--shadow); }
.sidebar-business { padding: .75rem .75rem 1rem; border-bottom: 1px solid #30302e; }
.sidebar-business strong, .sidebar-business span { display: block; }
.sidebar-business strong { margin: .25rem 0; font-size: 1.1rem; }
.sidebar-business > span:last-child { color: #aaa9a4; font-size: .82rem; }
.app-sidebar .eyebrow, .app-sidebar .nav-label { color: #888883; }
.nav-section { display: grid; gap: .3rem; padding-top: 1rem; }
.nav-label { padding: 0 .7rem .25rem; }
.app-sidebar nav a { display: flex; align-items: center; gap: .75rem; color: #d4d4cf; padding: .66rem .72rem; border-radius: 10px; text-decoration: none; font-size: .91rem; font-weight: 720; }
.app-sidebar nav a > span { width: 20px; text-align: center; color: #92928d; }
.app-sidebar nav a:hover, .app-sidebar nav a.active { background: #fff; color: #0b0b0b; }
.app-sidebar nav a.active > span { color: #0b0b0b; }
.sidebar-account { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1rem; padding: 1rem .65rem .2rem; border-top: 1px solid #30302e; }
.sidebar-account strong, .sidebar-account span { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account span { color: #92928d; font-size: .72rem; }
.sidebar-logout { min-height: 34px; padding: .35rem .55rem; background: #292927; font-size: .75rem; }
.sidebar-scrim { display: none; }

/* 6. Buttons */
.button, button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .68rem 1.1rem; border: 1px solid transparent; border-radius: 10px; background: var(--color-primary); color: #fff; cursor: pointer; font-weight: 800; text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s; }
.button:hover, button:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.button.secondary, button.secondary { background: #e8e8e5; color: #111; }
.button.ghost, button.ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.button.danger, button.danger { background: var(--color-danger); color: #fff; }
.button.inverse { background: #fff; color: #0b0b0b; }
.button-large { min-height: 54px; padding: .88rem 1.35rem; font-size: 1rem; }
button:disabled { opacity: .55; cursor: wait; transform: none; }

/* 7. Forms */
.field { margin: 1rem 0; }
label { display: inline-block; margin-bottom: .38rem; font-size: .88rem; font-weight: 780; }
input:not([type=checkbox]):not([type=radio]), textarea, select, .form-control { display: block; width: 100%; min-height: 48px; padding: .78rem .88rem; border: 1px solid #c9c9c4; border-radius: 10px; background: #fff; color: var(--color-text); }
input:hover, textarea:hover, select:hover { border-color: #94948f; }
input:focus, textarea:focus, select:focus { border-color: #111; outline: 3px solid rgba(0, 0, 0, .09); }
textarea { min-height: 115px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 1.1rem; height: 1.1rem; accent-color: #111; }
.errorlist { margin: .25rem 0; padding-left: 1.1rem; color: var(--color-danger); font-size: .85rem; font-weight: 700; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); gap: clamp(2rem, 7vw, 7rem); align-items: center; min-height: calc(100vh - 190px); padding: 4rem 0; }
.auth-brand { max-width: 620px; }
.auth-brand .brand { margin-bottom: 4rem; }
.auth-brand h1 { margin-top: 1rem; }
.auth-brand p { max-width: 550px; color: var(--color-muted); font-size: 1.1rem; }
.auth-card { padding: clamp(1.5rem, 4vw, 2.4rem); background: #fff; border-radius: 20px; box-shadow: var(--shadow); }
.auth-card h2 { margin-top: .55rem; }
.auth-submit { width: 100%; margin-top: .5rem; }
.auth-switch { margin: 1rem 0 0; color: var(--color-muted); font-size: .9rem; }

/* 8. Cards and panels */
.card, .detail, .cart-line, .panel { margin: 1rem 0; padding: clamp(1rem, 3vw, 1.5rem); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel { margin: 0; }
.thumb { width: 100%; height: 170px; border-radius: 12px; object-fit: cover; background: var(--color-surface-soft); }
.empty-state { padding: 4rem 1.5rem; text-align: center; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); }
.empty-state p { max-width: 520px; margin-inline: auto; color: var(--color-muted); }
.empty-icon { font-size: 2.5rem; }

/* 9. Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { color: var(--color-muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:hover { background: #fafaf8; }

/* 10. Badges and alerts */
.badge, .payment-label { display: inline-flex; align-items: center; gap: .3rem; padding: .34rem .64rem; border-radius: 999px; background: #e9e9e6; color: #41413e; font-size: .72rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.badge.success, .payment-label.paid, .payment-label.unpaid { background: #dff5e8; color: #12623c; }
.badge.warning, .payment-label.pending { background: #f9edc9; color: #775000; }
.badge.danger, .payment-label.failed { background: #f9dfdd; color: #8d1c14; }
.badge.off, .payment-label.refunded { background: #e8e8e6; color: #5d5d59; }
.messages { display: grid; gap: .6rem; padding: 0; margin: 0 0 1rem; list-style: none; }
.alert { padding: .9rem 1rem; border-left: 4px solid var(--color-success); border-radius: 8px; background: #eaf7ef; font-weight: 650; }
.alert.error { border-color: var(--color-danger); background: #fff0ef; }
.alert.warning { border-color: var(--color-warning); background: #fff8e8; }
.alert.info { border-color: var(--color-info); background: #eef4ff; }

/* 11. Landing */
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; min-height: 690px; padding: 5rem 0; }
.landing-hero h1 { max-width: 800px; margin: 1rem 0 1.5rem; }
.landing-hero > div:first-child > p { max-width: 660px; color: var(--color-muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero-actions, .hero-proof { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.hero-proof { color: var(--color-muted); font-size: .82rem; font-weight: 720; }
.product-preview { padding: 1.15rem; border: 1px solid #30302d; border-radius: 22px; background: #10100f; color: #fff; box-shadow: 0 30px 70px rgba(0, 0, 0, .22); transform: rotate(1.2deg); }
.preview-bar { display: flex; align-items: center; gap: .35rem; padding: .35rem .2rem 1rem; color: #aaa; font-size: .75rem; }
.preview-bar i { width: 8px; height: 8px; border-radius: 50%; background: #565652; }
.preview-bar span { margin-left: auto; }
.preview-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.preview-metrics div, .preview-order { padding: 1rem; border-radius: 13px; background: #242422; }
.preview-metrics small, .preview-metrics strong, .preview-metrics em, .preview-order small { display: block; }
.preview-metrics strong { margin: .2rem 0; font-size: 1.7rem; }
.preview-metrics em { color: #91d7ad; font-size: .72rem; font-style: normal; }
.preview-order { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; margin-top: .75rem; }
.preview-order small { color: #aaa; }
.feature-section, .how-section { padding: 6rem 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 20px; background: var(--color-border); }
.feature-grid article { min-height: 240px; padding: 2rem; background: #fff; }
.feature-grid article > span { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 2.5rem; border-radius: 10px; background: #111; color: #fff; font-size: 1.2rem; }
.feature-grid p, .how-grid p { color: var(--color-muted); }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding: 0; list-style: none; counter-reset: none; }
.how-grid li { padding-top: 1.2rem; border-top: 2px solid #111; }
.how-grid li > span { color: var(--color-muted); font-size: .75rem; font-weight: 850; }
.closing-cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin: 3rem 0 6rem; padding: clamp(2rem, 6vw, 4rem); border-radius: 24px; background: #0b0b0b; color: #fff; }
.closing-cta .eyebrow { color: #999; }
.site-footer { padding: 3rem 0; border-top: 1px solid var(--color-border); background: #fff; }
.site-footer .container { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.site-footer p { color: var(--color-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--color-muted); font-size: .85rem; }

/* 12. Dashboard */
.welcome-hero { margin: 1rem 0 3rem; padding: clamp(2rem, 6vw, 4rem); border-radius: 24px; background: #111; color: #fff; }
.welcome-hero.compact { padding-block: 2.8rem; }
.welcome-hero .eyebrow { color: #aaa; }
.welcome-hero p { max-width: 620px; color: #c2c2bd; }
.welcome-hero.dashboard-welcome { border: 1px solid #dce9df; background: linear-gradient(135deg, #edf8f1 0%, #f8f5e9 58%, #fff 100%); color: #16231d; box-shadow: 0 18px 45px rgba(38, 73, 55, .08); }
.welcome-hero.dashboard-welcome h1 { color: #16231d; }
.welcome-hero.dashboard-welcome .eyebrow { color: #4d745f; }
.welcome-hero.dashboard-welcome p { color: #52645a; }
.dashboard-live-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.live-order-message { display: none; padding: .7rem 1rem; border: 1px solid #e6b84d; border-radius: 999px; background: #fff6d8; color: #654708; font-weight: 850; }
.live-order-message.is-visible { display: inline-flex; align-items: center; gap: .45rem; }
@keyframes live-order-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(230, 151, 32, 0); } 25% { border-color: #e69720; background-color: #fff3ce; box-shadow: 0 0 0 10px rgba(230, 151, 32, .16); } 60% { border-color: #efb34f; background-color: #fff9e9; box-shadow: 0 0 0 18px rgba(230, 151, 32, 0); } }
.live-order-arrival { animation: live-order-pulse 1.15s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) { .live-order-arrival { animation: none; border-color: #e69720 !important; background-color: #fff3ce !important; } }
.dashboard-business { margin: 3rem 0 5rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.metric-card { min-height: 165px; padding: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }
.metric-card > span, .metric-card small { display: block; color: var(--color-muted); }
.metric-card strong { display: block; margin: .75rem 0 .25rem; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.metric-card.attention { border-color: #e0bd54; background: #fffaf0; }
.dashboard-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: 1rem; }
.quick-actions a { display: flex; align-items: center; gap: .75rem; padding: 1rem; border-radius: 11px; background: var(--color-surface-soft); text-decoration: none; }
.quick-actions a span { font-size: 1.25rem; }
.onboarding-panel .panel-heading > strong { font-size: 1.5rem; }
.progress-track { height: 8px; margin: 1rem 0; overflow: hidden; border-radius: 999px; background: #e5e5e2; }
.progress-track span { display: block; height: 100%; background: #111; }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; color: var(--color-muted); font-size: .87rem; }
.checklist > div { display: flex; align-items: flex-start; gap: .55rem; line-height: 1.45; }
.checklist > div > span { flex: 0 0 1rem; text-align: center; }
.onboarding-panel .checklist { margin-bottom: 1rem; }
.checklist .complete { color: var(--color-success); }
.business-selector { display: grid; gap: .8rem; }
.business-select-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1.2rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }
.business-monogram { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: #111; color: #fff; font-size: 1.3rem; font-weight: 900; }
.business-select-card p { margin: 0; color: var(--color-muted); }
.shortcut-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.shortcut-grid a { display: grid; gap: .2rem; padding: 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; text-decoration: none; }
.shortcut-grid a > span { font-size: 1.4rem; }
.shortcut-grid small { color: var(--color-muted); }

/* 13. Account */
.account-heading { margin-bottom: 1.5rem; }
.account-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; }
.account-nav { position: sticky; top: 92px; align-self: start; display: grid; gap: .2rem; padding: .65rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }
.account-nav a { padding: .72rem; border-radius: 9px; text-decoration: none; font-weight: 730; }
.account-nav a:hover, .account-nav a.active { background: #111; color: #fff; }

/* 14. Utility */
.inline { display: inline; }
.status-action { min-height: 50px; }

/* 15. Responsive */
@media (max-width: 1020px) {
  .landing-hero { grid-template-columns: 1fr; min-height: auto; }
  .product-preview { max-width: 680px; transform: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .app-frame { display: block; width: min(calc(100% - 2rem), var(--content)); }
  .menu-toggle { display: inline-flex; }
  .app-sidebar { position: fixed; z-index: 80; top: 0; right: 0; width: min(88vw, 320px); max-height: 100vh; height: 100vh; border-radius: 0; transform: translateX(105%); transition: transform .22s ease; }
  .nav-open .app-sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 70; inset: 0; display: block; visibility: hidden; background: rgba(0, 0, 0, .48); opacity: 0; transition: opacity .2s, visibility .2s; }
  .nav-open .sidebar-scrim { visibility: visible; opacity: 1; }
}

@media (max-width: 760px) {
  .container, .shell, .app-frame { width: min(calc(100% - 1.25rem), var(--content)); }
  .topbar, .business-app .site-header .topbar { width: calc(100% - 2rem); min-height: 64px; gap: .75rem; }
  .header-context { display: none; }
  .header-actions { gap: .35rem; }
  .header-actions .button, .header-actions button { min-height: 40px; padding-inline: .75rem; font-size: .88rem; }
  .public-sign-in { display: none; }
  .header-account-action { margin-left: 0 !important; padding-left: .4rem; }
  .app-main { padding: 1.25rem 0 4rem; }
  h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .hide-mobile { display: none !important; }
  .auth-layout { display: block; min-height: 0; padding: 1.5rem 0 3rem; }
  .auth-brand { padding: 1.5rem 0 2rem; }
  .auth-brand .brand { display: none; }
  .landing-hero { padding: 3.5rem 0; }
  .landing-hero h1 { font-size: clamp(2.8rem, 14vw, 4.2rem); }
  .product-preview { padding: .75rem; }
  .feature-section, .how-section { padding: 3.5rem 0; }
  .feature-grid, .how-grid, .dashboard-lower, .account-layout { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 200px; }
  .how-grid { gap: 2rem; }
  .closing-cta, .site-footer .container { align-items: flex-start; flex-direction: column; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 140px; }
  .quick-actions, .checklist { grid-template-columns: 1fr; }
  .business-select-card { grid-template-columns: auto 1fr; }
  .business-select-card .button { grid-column: 1 / -1; width: 100%; }
  .shortcut-grid { grid-template-columns: 1fr 1fr; }
  .account-nav { position: static; display: flex; overflow-x: auto; margin-bottom: 1rem; }
  .account-nav a { flex: none; }
  .page-head { align-items: flex-start; }
}

@media (max-width: 420px) {
  .metrics-grid, .shortcut-grid, .form-grid { grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .preview-order { grid-template-columns: 1fr auto; }
  .preview-order .badge { grid-column: 1 / -1; justify-self: start; }
}

/* 16. Warm, light application theme */
:root {
  --color-bg: #fff8f1;
  --color-surface: #fffdf9;
  --color-surface-soft: #fff0e3;
  --color-text: #33251f;
  --color-muted: #76665d;
  --color-border: #eadbd0;
  --color-primary: #d85f3d;
  --color-primary-hover: #bd472b;
  --color-success: #39795b;
  --color-warning: #a56818;
  --color-info: #477594;
  --forest: #d85f3d;
  --forest-2: #bd472b;
  --shadow-sm: 0 6px 20px rgba(105, 69, 45, .07);
  --shadow: 0 22px 60px rgba(105, 69, 45, .12);
}
body { overflow-x: hidden; background: linear-gradient(180deg, #fffaf5 0, #fff7ef 38rem, #fffaf6 100%); }
:focus-visible { outline-color: #e6a33c; }
.site-header { border-color: rgba(218, 193, 176, .8); background: rgba(255, 252, 247, .94); }
.brand-mark { background: linear-gradient(145deg, #e97b51, #cc4f33); box-shadow: 0 6px 16px rgba(204, 79, 51, .2); }
.button, button { background: var(--color-primary); box-shadow: 0 5px 14px rgba(190, 71, 42, .14); }
.button:hover, button:hover { background: var(--color-primary-hover); }
.button.secondary, button.secondary { border-color: #eed7c6; background: #fff0e2; color: #70432f; box-shadow: none; }
.button.secondary:hover, button.secondary:hover { background: #ffe4d1; }
.button.ghost, button.ghost { border-color: #dfc9b9; background: rgba(255, 255, 255, .62); color: #684334; box-shadow: none; }
.button.inverse { background: #fff; color: #a64229; }
input:not([type=checkbox]):not([type=radio]), textarea, select, .form-control { border-color: #decbbd; background: #fffefa; }
input:hover, textarea:hover, select:hover { border-color: #c59d86; }
input:focus, textarea:focus, select:focus { border-color: #d85f3d; outline-color: rgba(216, 95, 61, .13); }
input[type=checkbox], input[type=radio] { accent-color: var(--color-primary); }
.card, .detail, .cart-line, .panel, .auth-card, .metric-card, .shortcut-grid a, .business-select-card, .empty-state, table { background: #fffefa; }
.card, .detail, .cart-line, .panel, .auth-card, .metric-card, .shortcut-grid a, .business-select-card, .empty-state, .table-wrap { border-color: #eadbd0; }
tbody tr:hover { background: #fff4e9; }

/* Light restaurant workspace navigation */
.app-sidebar { border: 1px solid #d8e5d8; background: linear-gradient(180deg, #f1f7ee, #fff9ef); color: #33463a; box-shadow: 0 18px 46px rgba(69, 92, 73, .12); }
.sidebar-business, .sidebar-account { border-color: #d7e3d6; }
.sidebar-business > span:last-child, .sidebar-account span, .app-sidebar .eyebrow, .app-sidebar .nav-label { color: #728075; }
.app-sidebar nav a { color: #4e6254; }
.app-sidebar nav a > span { color: #819186; }
.app-sidebar nav a:hover, .app-sidebar nav a.active { background: #fff; color: #b7472d; box-shadow: var(--shadow-sm); }
.app-sidebar nav a.active > span { color: #d85f3d; }
.sidebar-logout { border-color: #dfc9b9; background: #fff1e4; color: #7b4936; }

/* Light onboarding and dashboard surfaces */
.onboarding-hero, .welcome-hero { border: 1px solid #f0d8c4; background: linear-gradient(135deg, #fff0df, #fff9ed 56%, #edf6ed); color: var(--color-text); box-shadow: 0 18px 45px rgba(137, 85, 52, .08); }
.onboarding-hero h1, .welcome-hero h1 { color: var(--color-text); }
.onboarding-hero p, .welcome-hero p, .onboarding-hero .eyebrow, .welcome-hero .eyebrow { color: #735f53; }
.progress-ring { border-color: #edc9ad; background: rgba(255,255,255,.55); }
.progress-ring span { color: #77645a; }
.step-check, .business-monogram { background: #e16d49; }
.onboarding-step:hover { border-color: #dc896b; }
.progress-track span { background: linear-gradient(90deg, #e67550, #e7ae49); }
.quick-actions a { background: #fff1e5; }
.account-nav a:hover, .account-nav a.active { background: #fde5d3; color: #a64028; }

/* Homepage */
.landing-hero { position: relative; min-height: 720px; }
.landing-hero::before { position: absolute; z-index: -1; inset: 2rem -4vw; border-radius: 42px; background: radial-gradient(circle at 12% 18%, #ffe8c7 0, transparent 34%), radial-gradient(circle at 88% 72%, #dff0e1 0, transparent 35%); content: ""; }
.hero-copy h1 { color: #42291f; }
.hero-visual { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; grid-template-rows: 1fr 1fr; gap: .85rem; min-height: 560px; }
.photo-placeholder { position: relative; display: grid; place-items: center; min-height: 200px; overflow: hidden; border: 6px solid rgba(255,255,255,.78); border-radius: 28px; color: #6e4938; box-shadow: var(--shadow); }
.photo-placeholder::after { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.3), transparent 48%); content: ""; }
.photo-placeholder span { z-index: 1; font-size: clamp(3rem, 8vw, 6rem); filter: drop-shadow(0 8px 16px rgba(103,62,36,.12)); }
.photo-placeholder small { position: absolute; z-index: 2; right: 1rem; bottom: 1rem; padding: .4rem .65rem; border-radius: 999px; background: rgba(255,255,255,.86); color: #75503f; font-size: .72rem; font-weight: 800; }
.photo-main { grid-row: 1 / 3; background: linear-gradient(155deg, #ffd8a8, #f19a72); }
.photo-side-one { background: linear-gradient(145deg, #dceccf, #9dc59f); }
.photo-side-two { background: linear-gradient(145deg, #f9dfb0, #efb861); }
.product-preview { position: absolute; right: 4%; bottom: 6%; width: min(360px, 72%); padding: .8rem; border: 1px solid #ead6c5; background: rgba(255, 253, 248, .96); color: var(--color-text); box-shadow: 0 24px 55px rgba(91, 54, 33, .2); transform: rotate(-1deg); }
.preview-bar { color: #8b7468; }
.preview-bar i { background: #edb993; }
.preview-metrics div, .preview-order { background: #fff1e4; }
.preview-order small { color: var(--color-muted); }
.feature-grid { gap: 1rem; overflow: visible; border: 0; background: transparent; }
.feature-grid article { border: 1px solid var(--color-border); border-radius: 20px; background: #fffefa; box-shadow: var(--shadow-sm); }
.feature-grid article > span { background: #ffe5ce; color: #b84c30; }
.feature-grid article:nth-child(3n+2) > span { background: #e3f0df; color: #477250; }
.feature-grid article:nth-child(3n) > span { background: #e3eff7; color: #477594; }
.how-grid li { border-color: #e4a06e; }
.owner-cta { border-color: #d8e7d8; background: linear-gradient(120deg, #f0f8ee, #fffefa); box-shadow: var(--shadow-sm); }
.closing-cta { border: 1px solid #efd09f; background: linear-gradient(135deg, #ffe9be, #fff4dc 58%, #ffe3d4); color: #503326; box-shadow: var(--shadow); }
.closing-cta .eyebrow { color: #9a6238; }
.closing-cta p { margin-bottom: 0; color: #765647; }
.site-footer { border-color: #eadbd0; background: #fffdf9; }

/* Public legal and support pages */
.legal-shell { width: min(100%, 920px); margin-inline: auto; padding: clamp(1rem, 3vw, 2rem) 0 4rem; }
.legal-hero { margin-bottom: 1.25rem; padding: clamp(1.5rem, 5vw, 3.25rem); border: 1px solid #efd7c2; border-radius: 28px; background: linear-gradient(135deg, #fff0dd, #fff9ec 58%, #e8f3e7); box-shadow: var(--shadow-sm); }
.legal-hero h1 { margin: .45rem 0 .7rem; }
.legal-hero p { max-width: 700px; margin: 0; color: var(--color-muted); }
.legal-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.legal-nav { position: sticky; top: 88px; display: grid; gap: .25rem; padding: .65rem; border: 1px solid var(--color-border); border-radius: 16px; background: #fffefa; }
.legal-nav a { padding: .68rem .75rem; border-radius: 10px; color: #684334; font-size: .88rem; font-weight: 760; text-decoration: none; }
.legal-nav a:hover, .legal-nav a[aria-current="page"] { background: #fff0e3; color: #a64028; }
.legal-content { padding: clamp(1.25rem, 4vw, 2.4rem); border: 1px solid var(--color-border); border-radius: 22px; background: #fffefa; box-shadow: var(--shadow-sm); }
.legal-content section + section { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--color-border); }
.legal-content h2 { margin-bottom: .7rem; font-size: clamp(1.25rem, 3vw, 1.6rem); }
.legal-content h3 { margin: 1.15rem 0 .4rem; font-size: 1rem; }
.legal-content p, .legal-content li { color: #65544b; line-height: 1.72; }
.legal-content ul { padding-left: 1.25rem; }
.legal-note { padding: 1rem; border-left: 4px solid #df7755; border-radius: 0 12px 12px 0; background: #fff0e3; }
.support-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.support-card { padding: 1.2rem; border: 1px solid var(--color-border); border-radius: 16px; background: #fffaf4; }
.support-card h2 { margin-top: 0; }
.support-card .button { margin-top: .4rem; }
@media (max-width: 720px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; grid-template-columns: repeat(2, 1fr); }
  .support-grid { grid-template-columns: 1fr; }
}

/* Wide, sectioned restaurant registration */
.restaurant-registration { width: min(100%, 1240px); padding: clamp(2rem, 5vw, 5rem) 0; }
.registration-intro { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: clamp(2rem, 6vw, 5rem); align-items: end; margin-bottom: 2rem; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid #efd8c4; border-radius: 28px; background: linear-gradient(125deg, #fff0dd, #fff9ec 55%, #e8f3e7); box-shadow: var(--shadow-sm); }
.registration-intro h1 { max-width: 700px; margin: .5rem 0 1rem; color: #432c22; }
.registration-intro p { max-width: 650px; color: #715e54; font-size: 1.05rem; }
.registration-benefits { margin: 0; }
.registration-benefits span { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: 14px; background: rgba(255,255,255,.7); }
.registration-benefits b { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f8d6bb; color: #9c432c; }
.registration-card { max-width: none; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--color-border); border-radius: 28px; background: rgba(255, 254, 250, .88); box-shadow: var(--shadow); }
.registration-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.registration-card fieldset { margin: 0; padding: clamp(1.1rem, 3vw, 1.75rem); border: 1px solid #eadbd0; border-radius: 20px; background: #fff; }
.registration-card legend { width: auto; margin: 0; padding: 0 .4rem; border: 0; color: #56382b; font-size: 1.05rem; letter-spacing: 0; text-transform: none; }
.registration-card legend span { color: #d85f3d; }
.section-help { margin: 0 0 1rem; color: var(--color-muted); font-size: .88rem; }
.registration-submit { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; padding: 1rem 1.25rem; border-radius: 18px; background: #fff0e3; }
.registration-submit p { margin: .15rem 0 0; }

@media (max-width: 900px) {
  .hero-visual { min-height: 480px; }
  .registration-intro, .registration-sections { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .landing-hero::before { inset: 1rem -.5rem; }
  .hero-visual { grid-template-columns: 1fr 1fr; min-height: 420px; }
  .photo-main { grid-column: 1 / 3; grid-row: auto; }
  .photo-placeholder { min-height: 150px; border-width: 4px; border-radius: 20px; }
  .product-preview { right: 4%; bottom: 4%; width: 88%; }
  .registration-submit { align-items: stretch; flex-direction: column; }
  .registration-submit .button { width: 100%; }
}
