.theme-toggle{border:1px solid var(--line);border-radius:24px;padding:9px 13px;font-size:12px;font-weight:700;white-space:nowrap;min-height:40px;color:var(--ink);background:var(--white)}
html[data-theme=dark]{color-scheme:dark;--paper:#171b19;--white:#222925;--ink:#eff3ec;--muted:#b0baaf;--line:#424e45;--lime:#344932;--peach:#49352e;--lilac:#3d3547;--orange:#e98560;--orange-dark:#c46c4b}
html[data-theme=dark] body{background:#171b19;color:var(--ink)}
html[data-theme=dark] :is(.workspace-sidebar,.workspace-topbar,.panel,.stat-card,dialog,.menu-topbar,.menu-product,.service-card,.pos-product,.billing-plan,.saved-order){background:var(--white);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(input,textarea,select,.filter-select){background:#19201b;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.workspace-nav button,.logout-button,.row-action,.field-label,.menu-header-note,.tracking-launch,.cart-tools,.order-meta,.field-hint,.account-details dd){color:var(--muted)}
html[data-theme=dark] :is(.workspace-nav button.active,.workspace-nav button:hover,.sidebar-plan,.early-banner,.welcome-panel,.payment-box,.kitchen-column,.pos-cart,.order-sidebar,.service-table,.billing-plan:has(input:checked)){background:#303b30;color:#edf3e8;border-color:var(--line)}
html[data-theme=dark] :is(.product-row,.order-row,.audit-row,.panel-header,.detail-items li,.detail-total,.cart-items li,.quantity-control,.modifier-choice,.modifier-fieldset,.service-consumption article,.pos-line,.preview-items li){border-color:var(--line)}
html[data-theme=dark] :is(.badge,.badge-neutral){background:#384638;color:#e2ecdb}html[data-theme=dark] .badge-warm{background:#54412b;color:#ffe0ac}
html[data-theme=dark] :is(.button-outline:hover,.quantity-control button:hover,.saved-order:hover){background:#384639}html[data-theme=dark] .button-dark{background:#e0e9d8;color:#20291e}html[data-theme=dark] .button-orange{background:#b94d2d;color:white}
html[data-theme=dark] :is(.kitchen-card,.service-table.is-occupied){background:#3b3027;border-color:#796047;color:#f4e8dd}
html[data-theme=dark] :is(.service-card p,.service-card small,.pos-product small,.pos-line small,.stat-card p,.stat-card small,.row-info p,.workspace-heading p,.workspace-label,.sidebar-plan small,.empty-state p){color:var(--muted)}
html[data-theme=dark] .menu-page{--menu-dark:#edf3e8;--menu-orange:#bf5b39;--accent-soft:#344337}
html[data-theme=dark] [data-accent=terracotta]{--accent:#b94d2d;--accent-soft:#453128}html[data-theme=dark] [data-accent=forest]{--accent:#347354;--accent-soft:#293e30}html[data-theme=dark] [data-accent=plum]{--accent:#975879;--accent-soft:#402e3c}html[data-theme=dark] [data-accent=ocean]{--accent:#31768e;--accent-soft:#253a42}html[data-theme=dark] [data-accent=amber]{--accent:#916520;--accent-soft:#423925}
html[data-theme=dark] .menu-page .brand{color:var(--ink)}html[data-theme=dark] .menu-page .restaurant-banner{background:#2a2722;color:#fff0dd;border-color:#4b493f}
html[data-theme=dark] .menu-page[data-template=jardim] .restaurant-banner{background:#27372c;color:#edf5e7}html[data-theme=dark] .menu-page[data-template=atelier] .restaurant-banner{background:transparent;color:#f2e8ed}
html[data-theme=dark] .menu-page :is(.menu-search,.order-sidebar,.menu-categories button,.tracking-launch){background:var(--white);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .menu-page .menu-categories button.selected{background:var(--accent);color:#fff;border-color:var(--accent)}
html[data-theme=dark] .menu-page :is(.restaurant-intro,.menu-kicker,.hero-menu-link,.restaurant-facts b,.restaurant-facts small,.template-headline){color:#d4ddce!important}
html[data-theme=dark] .menu-page :is(.menu-product-price strong,.menu-footer b,.catalog-heading h2,.menu-category-heading h3,.order-sidebar>h2){color:var(--ink)}
html[data-theme=dark] .menu-page :is(.menu-description,.menu-product-price small,.product-category-label,.restaurant-contact,.catalog-count,.section-overline,.menu-category-heading>span,.preview-empty p,.preview-hint,.order-sidebar-note,.order-sidebar-heading,.menu-footer,.tracking-help,.tracking-heading p,.tracking-code small,.tracking-steps,.cart-empty p){color:var(--muted)!important}
html[data-theme=dark] .menu-page .menu-photo{background:var(--accent-soft);background-image:none}html[data-theme=dark] .menu-page .photo-placeholder{color:#b8c5ac}html[data-theme=dark] .tracking-steps .done{color:#d3ecc5}html[data-theme=dark] .tracking-steps li>span{background:#384336;color:#edf3e8}
html[data-theme=dark] .form-error{background:#482d2a;color:#ffd9cd;border-color:#765044}html[data-theme=dark] .template-choice{background:var(--white)}html[data-theme=dark] .service-summary .button{color:#272d20;background:#fff}html[data-theme=dark] .photo-placeholder{color:#c7a68c}html[data-theme=dark] .auth-aside{background:#29382b}html[data-theme=dark] .auth-main{background:var(--paper)}
@media(max-width:520px){.menu-header>.theme-toggle{grid-column:1;grid-row:2;justify-self:start;font-size:10px;min-height:32px;padding:6px 10px}.workspace-topbar{flex-wrap:wrap;gap:10px}.workspace-topbar .panel-actions{flex-wrap:wrap}.theme-toggle{font-size:11px}.menu-header{column-gap:8px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

.auth-top{flex-wrap:wrap;gap:12px}html[data-theme=dark] .auth-story{background:#29382b;color:#eff3ec}html[data-theme=dark] .auth-story p,html[data-theme=dark] .auth-story-footer{color:#bac7b5}html[data-theme=dark] .plan-choice{background:#222925;border-color:#424e45}html[data-theme=dark] .plan-choice:has(input:checked){background:#3c3c2b}html[data-theme=dark] .auth-main .eyebrow{color:#e98560}

html[data-theme=dark] .workspace{background:var(--paper)}
html[data-theme=dark] :is(.icon-button,.quantity-control button){background:#3c483b;color:#f4f7ef}
html[data-theme=dark] :is(.cart-tools #clear-cart,.button-danger){color:#ffb49c}
html[data-theme=dark] :is(.copy-field code,.user-avatar){background:#40372f;color:#f5e6d8}
html[data-theme=dark] .menu-page .catalog-heading h2>span{color:#e4ac89}
html[data-theme=dark] .menu-page .saved-order b{color:#f0ac8b}

html[data-theme=dark] .menu-page .button-orange{background:var(--accent);color:#fff}
html[data-theme=dark] .tracking-payment-box{background:var(--white);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.online-card-choice,.online-pix-choice,.inline-pix-pending){background:#19201b;border-color:var(--line);color:var(--ink)}
html[data-theme=dark] .online-method-icon{background:#304838;color:#cbe9d1}
html[data-theme=dark] .inline-pix{background:#20352a;border-color:#426a4c}
html[data-theme=dark] .inline-pix-heading>span{color:#a9dfb3}
html[data-theme=dark] .online-pix-choice .field input,html[data-theme=dark] .inline-pix textarea{background:#171d19;color:var(--ink);border-color:var(--line)}

/* Subscription checkout surfaces in dark mode */
html[data-theme=dark] .billing-plan{background:linear-gradient(150deg,#252e28,#202722);border-color:#465349;color:#eff3ec}
html[data-theme=dark] .billing-plan:has(input:checked){background:linear-gradient(145deg,#344433,#28342c);border-color:#e98560;box-shadow:0 0 0 2px #e9856045,0 14px 30px #0002}
html[data-theme=dark] .billing-plan-icon{background:#49352e;color:#ffb195}
html[data-theme=dark] .billing-plan-heading em{background:#414d37;color:#e0efbd}
html[data-theme=dark] .billing-plan-choose{border-color:#465349;color:#ffad8c}
html[data-theme=dark] .billing-preferences-grid,html[data-theme=dark] .billing-pix-summary,html[data-theme=dark] .pix-status-card,html[data-theme=dark] .pix-dialog .pix-period,html[data-theme=dark] .pix-dialog .pix-expiry{background:#19201b}
html[data-theme=dark] .billing-explainer{background:#303b30;color:#cbd4c8}
html[data-theme=dark] .billing-gateway-card{background:linear-gradient(140deg,#222925,#1d241f);border-color:#424e45}
html[data-theme=dark] .billing-gateway-head{background:linear-gradient(110deg,#29382e,#242a25);border-color:#424e45}
html[data-theme=dark] .billing-state-pill{background:#19201b;border-color:#424e45}
html[data-theme=dark] .billing-pix-symbol{background:#2a4535;color:#a6e0bc}
html[data-theme=dark] .billing-pix-indicator{background:#51442f;color:#f4d395}
html[data-theme=dark] .pix-dialog-head{background:linear-gradient(110deg,#29382e,#282c25);border-color:#424e45}
html[data-theme=dark] .pix-status-mark{background:#364633;color:#c7e0ae}
html[data-theme=dark] .pix-status-card.is-approved .pix-status-mark{background:#254732;color:#a9ecc0}
html[data-theme=dark] .pix-status-card.is-expired .pix-status-mark,html[data-theme=dark] .pix-status-card.is-rejected .pix-status-mark{background:#51402d;color:#f3c47d}
html[data-theme=dark] .pix-qr-frame{background:#f5f7f1;border-color:#5c675d}
html[data-theme=dark] .pix-confirm-card{background:linear-gradient(145deg,#312a26,#252b27);border-color:#674c3d;box-shadow:0 10px 28px #0002}
html[data-theme=dark] .pix-confirm-icon{background:#54382d;color:#ffb195}
html[data-theme=dark] .pix-confirm-copy .billing-kicker{color:#f09a76}
html[data-theme=dark] .pix-confirm-check{background:#19201b;border-color:#465349}
/* Account security */
.two-factor-card{margin-top:30px;padding:28px;border:1px solid var(--line,#7a887a);border-radius:22px;background:var(--surface,#ffffff08)}
.two-factor-card h3{font-size:24px;margin:12px 0}.two-factor-card p{line-height:1.65}.two-factor-card .form-grid{margin-top:22px}.two-factor-card .button{width:100%;justify-content:center}.mfa-badge{display:inline-flex;padding:7px 12px;border-radius:30px;background:#76944825;font-size:13px;font-weight:700}.mfa-secret{display:block;overflow-wrap:anywhere;padding:18px;border:1px dashed #879577;border-radius:12px;letter-spacing:2px;user-select:all}.recovery-codes{font-size:15px;line-height:1.85;padding:18px;border-radius:12px;background:#76944818;user-select:all;white-space:pre-wrap}

html[data-theme=dark] .inline-pix-expired{background:#472c28;border-color:#89574c;color:#ffe0d8}
