/* 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; }
}
