/* Platform base styles. Tenant branding later overrides --brand-* at runtime. */
:root {
    --brand-primary: #1f6f4a;
    --brand-accent: #e8742c;
    --warm-accent: #b5501f;
    --warm-accent-dark: #93400f;
    --warm-amber: #d9963c;
    --warm-paper: #fffaf1;
    --warm-border: #e9d9bf;
    --bg: #f6f4ef;
    --surface: #ffffff;
    --text: #1d1f1c;
    --muted: #5d625b;
    --border: #e3e0d8;
    --ok: #1f7a4d;
    --warn: #a15c07;
    --bad: #b42318;
    --radius: 14px;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.04);
    --status-new: #f5a524;
    --status-preparing: #3b82c4;
    --status-ready: #1f7a4d;
    --status-out: #7c4dbc;
    --status-completed: #7a7f78;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141613;
        --surface: #1d201c;
        --text: #ecebe6;
        --muted: #a3a89f;
        --border: #30342f;
        --ok: #4cc488;
        --warn: #e6a23c;
        --bad: #f0786c;
        --warm-accent: #d97a3f;
        --warm-accent-dark: #eda468;
        --warm-paper: #282219;
        --warm-border: #4d3d28;
        --shadow: none;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; margin-top: 1rem; }
p { margin: 0 0 0.75rem; }

.shell { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 0 8px; }
.eyebrow { color: var(--brand-primary); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; }
.lede { color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.chip { white-space: nowrap; background: var(--brand-primary); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.narrow { max-width: 480px; margin: 48px auto; }
.platform-nav { display: flex; gap: 16px; margin-top: 4px; }
.pa-shop { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 4px; }
.pa-shop-text { display: grid; gap: 1px; min-width: 0; color: var(--text); text-decoration: none; }
.pa-shop-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-shop-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pa-shop-links .button { padding: 6px 12px; font-size: 0.85rem; white-space: nowrap; }
.pa-token { width: 100%; font: 600 0.95rem ui-monospace, monospace; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); margin-bottom: 10px; }
.form .pa-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.pa-progress { width: 100%; height: 8px; accent-color: var(--brand-primary); }
.pa-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pa-checklist li { display: grid; gap: 1px; padding-left: 28px; position: relative; font-weight: 600; }
.pa-checklist li::before { content: "○"; position: absolute; left: 4px; color: var(--muted); }
.pa-checklist li.done::before { content: "✓"; color: var(--ok); }
.pa-now { margin: 0; font-weight: 700; color: var(--bad); }
.pa-now.open { color: var(--ok); }
.pa-danger { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.pa-danger h2 { color: var(--bad); }
.sd-full { grid-column: 1 / -1; }
.pa-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.form .pa-preset { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.pa-preset span { display: grid; gap: 2px; }
.pa-preset:has(input:checked) { border-color: var(--brand-primary); box-shadow: inset 0 0 0 1px var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 6%, var(--surface)); }
@media (max-width: 720px) {
  .pa-shop { grid-template-columns: 40px minmax(0, 1fr); }
  .pa-shop .sa-chip, .pa-shop-links { grid-column: 2; justify-self: start; }
}
.geo-picker { display: grid; gap: 8px; }
/* A product's choices sit side by side, two to a row on a phone, so four sugar levels take two
   short rows instead of a screen. Each choice keeps a 44px tap target. */
.sf-options { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.sf-options legend { font-weight: 700; margin-bottom: 6px; }
.sf-options .sf-choice { flex: 1 1 calc(50% - 4px); min-width: 0; min-height: 44px; padding: 6px 12px; gap: 8px; border-radius: 12px; }
.sf-options .sf-choice input { width: 18px; height: 18px; flex: none; }
.sf-options .sf-choice span { min-width: 0; overflow-wrap: break-word; }
/* The extra price goes under the name when both do not fit, never through the middle of a word. */
.sf-options .sf-choice { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
.sf-options .sf-choice small { white-space: nowrap; margin-left: auto; }
@media (max-width: 639px) {
    .sf-options .sf-choice span { flex: 1 1 0; }
}
@media (min-width: 640px) {
    .sf-options .sf-choice { flex: 0 1 auto; }
}
/* The product page's photo shows the dish, it does not fill the screen. */
.sf-summary .sf-product-photo { width: 100%; height: clamp(150px, 28vh, 240px); object-fit: contain; border-radius: 14px; }
.form label.check { display: flex; align-items: center; gap: 8px; }
.geo-picker[hidden] { display: none; }
.geo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.geo-map { height: 260px; border-radius: 12px; border: 1px solid var(--border); z-index: 0; }

.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }

.stat { display: grid; gap: 4px; }
.stat .label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value { font-size: 1.25rem; font-weight: 650; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }

.flow { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 8px; counter-reset: step; }
.flow-step { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 6px; border-top: 4px solid var(--step-color, var(--border)); }
.flow-step .actor { font-size: 0.875rem; color: var(--muted); }
.badge { justify-self: start; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 6px; color: #fff; background: var(--step-color, var(--muted)); }
.status-new { --step-color: var(--status-new); }
.status-preparing { --step-color: var(--status-preparing); }
.status-ready { --step-color: var(--status-ready); }
.status-out { --step-color: var(--status-out); }
.status-completed { --step-color: var(--status-completed); }

.mini-flow { padding-left: 1.25rem; margin: 0 0 8px; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: 0.875rem; }

.receipt { margin-top: 12px; background: #fffef9; color: #111; font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: 0.9rem; padding: 18px 20px; border-radius: 4px; max-width: 320px; box-shadow: 0 2px 10px rgb(0 0 0 / 0.12); border-bottom: 3px dashed #c9c5ba; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 10px 0; }
.receipt-number { font-size: 2rem; font-weight: 800; text-align: center; }
.receipt-meta { text-align: center; color: #444; }
.receipt-line { margin-top: 8px; }
.receipt-option { padding-left: 1.5rem; color: #333; }

.code { margin: 12px 0 0; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: 0.8rem; overflow: auto; max-height: 420px; white-space: pre; }

.milestones { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.milestones li { border-left: 3px solid var(--border); padding: 4px 0 4px 12px; color: var(--muted); }
.milestones li strong { display: block; color: var(--text); }
.milestones li.current { border-left-color: var(--brand-accent); }

@media (max-width: 560px) {
    .hero { flex-direction: column; }
}

/* Storefront */
.store-header { padding: 8px 0 0; }
.menu-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.menu-nav a { white-space: nowrap; text-decoration: none; color: var(--text); border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; }
.menu-section { scroll-margin-top: 56px; }
.menu-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.menu-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border); }
.menu-item-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.menu-item-thumb-empty { display: grid; place-items: center; font-weight: 800; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface)); }
.menu-item-text { margin-right: auto; }
.menu-item:first-child { border-top: 0; }
.menu-item-text { display: grid; gap: 2px; min-width: 0; }
.menu-item-name { font-weight: 600; }
.menu-item-description { color: var(--muted); font-size: 0.9rem; }
.menu-item-status { color: var(--warn); font-size: 0.85rem; font-weight: 600; }
.menu-item-price { font-weight: 650; white-space: nowrap; }
.menu-item.unavailable .menu-item-name, .menu-item.unavailable .menu-item-price { color: var(--muted); }

/* Forms and admin */
.form { display: grid; gap: 14px; margin-top: 12px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.form input { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.form input:focus { outline: 2px solid var(--brand-primary); outline-offset: 1px; }
.form-error, .validation-message, .validation-errors { color: var(--bad); margin: 0; }
.validation-errors { padding-left: 1.2rem; }
.button { font: inherit; font-weight: 650; border: 0; border-radius: 10px; padding: 10px 16px; background: var(--brand-primary); color: #fff; cursor: pointer; }
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tag-muted { font-size: 0.75rem; font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.menu-item form { margin: 0; align-self: center; }
.toggle { font: inherit; font-weight: 700; min-width: 64px; min-height: 40px; border-radius: 999px; border: 0; cursor: pointer; }
.toggle.on { background: var(--ok); color: #fff; }
.toggle.off { background: var(--border); color: var(--muted); }

/* Order tracking */
.track-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.track-steps li { position: relative; padding: 10px 0 10px 32px; color: var(--muted); }
.track-steps li::before { content: ""; position: absolute; left: 6px; top: 14px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); }
.track-steps li.done { color: var(--text); }
.track-steps li.done::before { background: var(--ok); border-color: var(--ok); }
.track-steps li.current { color: var(--text); font-weight: 700; }
.track-steps li.current::before { background: var(--brand-accent); border-color: var(--brand-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-accent) 25%, transparent); }
.track-cancelled { color: var(--bad); font-weight: 600; margin: 0; }
.track-items { list-style: none; margin: 0; padding: 0; }
.track-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.track-items li:first-child { border-top: 0; }
.track-total { display: flex; justify-content: space-between; border-top: 2px solid var(--border); padding-top: 10px; margin-top: 4px; }
.store-closed { margin: 0; padding: 12px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border)); color: var(--text); font-weight: 600; }

/* «Βάλτε το στην αρχική οθόνη»: one line, shown by storefront.js only where it applies. */
.sf-install { display: flex; gap: 12px; align-items: center; margin: 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.sf-install[hidden], .sf-install p[hidden] { display: none; }
.sf-install img { flex: none; border-radius: 9px; }
.sf-install p { flex: 1; margin: 0; font-size: .92rem; line-height: 1.4; }
.sf-install svg { vertical-align: -3px; color: var(--brand-primary); }
.sf-install-add { margin-left: 6px; padding: 4px 12px; border: 0; border-radius: 999px; background: var(--brand-primary); color: #fff; font: inherit; font-weight: 600; }
.sf-install-close { flex: none; border: 0; background: none; color: var(--muted); font-size: 1rem; padding: 6px; cursor: pointer; }

/* Kitchen board */
.board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); align-items: start; }
.board-column { display: grid; gap: 10px; background: color-mix(in srgb, var(--step-color, var(--border)) 8%, var(--bg)); border-radius: var(--radius); padding: 10px; border-top: 4px solid var(--step-color, var(--border)); }
.board-column h2 { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 1rem; }
.ticket { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.ticket-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.ticket-number { font-size: 1.5rem; font-weight: 800; }
.fulfilment { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 6px; }
.fulfilment.delivery { background: color-mix(in srgb, var(--status-out) 18%, var(--surface)); color: var(--status-out); }
.fulfilment.pickup { background: color-mix(in srgb, var(--brand-accent) 20%, var(--surface)); color: var(--brand-accent); }
.ticket-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ticket-note { margin: 0; color: var(--warn); font-weight: 600; font-size: 0.9rem; }
.print-state { margin: 0; font-size: 0.85rem; color: var(--muted); }
.print-state.print-sent { color: var(--ok); }
.print-state.print-failed { color: var(--bad); font-weight: 700; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-actions form { margin: 0; }
.ticket-actions .button { min-height: 44px; }
/* Accepting with a time: the picker sits in the same form, before «Αποδοχή». */
.ticket-actions form:has(.promise-pick) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.promise-pick { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.promise-pick select { font: inherit; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.ticket-promise { font-weight: 800; color: var(--brand-primary); }
.track-promise { margin: 12px 0 0; font-weight: 700; color: var(--brand-primary); }
.button.danger { background: transparent; color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--border)); }

/* Live kitchen */
.kitchen-controls { display: flex; gap: 10px; align-items: center; }
.live-status { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.live-status[data-state="live"] { color: var(--ok); }
.live-status[data-state="offline"] { color: var(--bad); }
.sound-enable { width: 100%; font: inherit; font-size: 1.1rem; font-weight: 700; padding: 16px; border-radius: var(--radius); border: 2px dashed var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 12%, var(--surface)); color: var(--text); cursor: pointer; }
.sound-enable[hidden] { display: none; }
body.kitchen-alarm .board-column.status-new { animation: kitchen-flash 1s ease-in-out infinite alternate; }
@keyframes kitchen-flash { from { box-shadow: 0 0 0 0 transparent; } to { box-shadow: 0 0 0 4px var(--status-new); } }
@media (prefers-reduced-motion: reduce) { body.kitchen-alarm .board-column.status-new { animation: none; box-shadow: 0 0 0 4px var(--status-new); } }

/* Staff */
.form-ok { color: var(--ok); margin: 0; font-weight: 600; }
.form select { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.staff-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.staff-list li { border-top: 1px solid var(--border); padding-top: 12px; display: grid; gap: 8px; }
.staff-list li:first-child { border-top: 0; padding-top: 0; }
.staff-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; }
.inline-form input { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; background: var(--surface); color: var(--text); }
.admin-nav { flex-wrap: wrap; }
.admin-nav a[aria-current="page"] { border-color: var(--brand-primary); color: var(--brand-primary); font-weight: 700; }
.inline-form select, .inline-form input[type="time"] { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.ticket-actions form .tag-muted { margin-right: 4px; font-size: 0.95rem; padding: 4px 10px; color: var(--text); }

/* Catalog admin */
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions form { margin: 0; }
.button.icon { min-width: 40px; padding: 8px 10px; }
.button:disabled { opacity: 0.4; cursor: default; }
.form textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); resize: vertical; }
a.menu-item-name { color: var(--text); }

/* Orders admin */
.badge-status { font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; color: #fff; background: var(--step-color, var(--muted)); white-space: nowrap; }
.badge-status.status-cancelled { --step-color: var(--bad); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline-form input[type="date"] { font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }

/* Driver */
#driver { max-width: 560px; width: 100%; margin: 0 auto; display: grid; gap: 14px; }
.dv-icon { flex: none; }
.dv-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dv-bar form { margin: 0; }
.dv-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dv-brand strong { display: block; font-size: 1.15rem; color: var(--brand-primary); line-height: 1.1; }
.dv-brand div span { display: block; font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-logo { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-primary); color: #fff; display: grid; place-items: center; flex: none; }
.dv-end { font: inherit; font-size: 0.85rem; font-weight: 650; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.dv-profile { display: flex; align-items: center; gap: 14px; }
.dv-profile h1 { margin: 0; font-size: 1.3rem; }
.dv-profile p { margin: 4px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
.dv-avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 14%, var(--surface)); border: 2px solid color-mix(in srgb, var(--brand-primary) 35%, var(--surface)); }
.dv-on-shift { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 650; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.dv-on-shift::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.dv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dv-stat { display: grid; gap: 2px; padding: 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--brand-primary) 7%, var(--surface)); color: var(--brand-primary); min-width: 0; }
.dv-stat strong { color: var(--text); font-size: 1.35rem; line-height: 1.2; overflow-wrap: anywhere; }
.dv-stat-label, .dv-stat-sub { color: var(--muted); font-size: 0.78rem; }
.dv-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.dv-tabs a { padding: 12px 4px; text-align: center; font-weight: 650; font-size: 0.92rem; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.dv-tabs a[aria-current="page"] { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.dv-empty { margin: 8px 0; color: var(--muted); }
.dv-card { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.dv-card form { margin: 0; }
.dv-card-head { display: flex; align-items: center; gap: 10px; }
.dv-round { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface)); }
.dv-number { font-size: 1.05rem; }
.dv-pill { padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface)); }
.dv-place { display: flex; gap: 12px; align-items: center; }
.dv-place > div { display: grid; gap: 2px; min-width: 0; }
.dv-place strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.dv-card-meta { display: flex; gap: 8px; align-items: baseline; }
.dv-photo { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; }
.dv-photo-empty { display: grid; place-items: center; color: var(--muted); background: color-mix(in srgb, var(--muted) 10%, var(--surface)); }
.dv-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dv-steps li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; position: relative; padding-bottom: 14px; color: var(--muted); }
.dv-steps li:last-child { padding-bottom: 0; }
.dv-steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 2px; background: var(--border); }
.dv-steps li.done::after { background: var(--brand-primary); }
.dv-step-mark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; background: var(--surface); }
.dv-steps li.done .dv-step-mark { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.dv-steps li.current .dv-step-mark { border-color: var(--brand-primary); box-shadow: inset 0 0 0 5px var(--surface), inset 0 0 0 12px var(--brand-primary); }
.dv-steps li.done, .dv-steps li.current { color: var(--text); }
.dv-steps li.current strong { color: var(--brand-primary); }
.dv-step-text { display: grid; gap: 2px; font-size: 0.95rem; }
.dv-step-text span { font-size: 0.85rem; color: var(--muted); }
.dv-steps time { font-size: 0.85rem; }
.dv-rows { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.dv-rows li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dv-rows li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dv-rows a { color: var(--text); font-weight: 600; text-decoration: none; }
.dv-rows .dv-icon { color: var(--muted); }
.dv-call { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--brand-primary) !important; background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface)); }
.dv-money strong { font-size: 1.1rem; }
.dv-note { margin: 0; padding: 8px 12px; border-radius: 10px; color: var(--warn); font-weight: 600; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.dv-items { border-top: 1px solid var(--border); padding-top: 12px; }
.dv-items summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; min-height: 32px; }
.dv-items summary::-webkit-details-marker { display: none; }
.dv-items summary::after { content: "⌄"; margin-left: auto; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.dv-items[open] summary::after { content: "⌃"; }
.dv-items summary .dv-icon { color: var(--muted); }
.dv-items ul { margin: 8px 0 0 32px; padding: 0; list-style: none; display: grid; gap: 4px; }
.dv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dv-button { font: inherit; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 0; cursor: pointer; text-decoration: none; }
.dv-primary { min-height: 58px; font-size: 1.1rem; color: #fff; background: var(--brand-primary); }
.dv-secondary { color: var(--text); background: color-mix(in srgb, var(--muted) 10%, var(--surface)); border: 1px solid var(--border); }
.dv-nav { color: var(--status-preparing); background: color-mix(in srgb, var(--status-preparing) 14%, var(--surface)); }
.dv-button:disabled { opacity: 0.5; cursor: default; }

/* Product photos */
.product-photo { display: block; max-width: 100%; height: auto; border-radius: 10px; margin-bottom: 12px; }
.menu-item-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; }

/* Shop admin layout */
.sa { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sa-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--border); }
.sa-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; padding: 0 6px; }
.sa-brand strong { display: block; font-size: 1.2rem; color: var(--brand-primary); line-height: 1.1; }
.sa-brand small { display: block; color: var(--muted); font-size: 0.78rem; }
.sa-logo { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand-primary); color: #fff; font-weight: 800; }
.sa-nav { display: grid; gap: 2px; }
.sa-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 550; }
.sa-nav a:hover { background: color-mix(in srgb, var(--brand-primary) 6%, var(--surface)); }
.sa-nav a[aria-current="page"] { background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface)); color: var(--brand-primary); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand-primary); }
.sa-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--bad); color: #fff; font-size: 0.75rem; font-weight: 700; }
.sa-store { margin-top: auto; display: grid; gap: 2px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); font-size: 0.9rem; }
.sa-store strong::before { content: "● "; }
.sa-store.open strong { color: var(--ok); }
.sa-store.closed strong { color: var(--bad); }
.sa-store span { color: var(--muted); }
.sa-store a { margin-top: 6px; font-weight: 600; color: var(--brand-primary); }
.sa-main { min-width: 0; display: grid; grid-template-rows: auto 1fr; }
.sa-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--border); }
.sa-shop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sa-shop strong { font-size: 1.1rem; }
.sa-chip { padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.sa-chip.open { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.sa-chip.closed { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.sa-user { display: flex; align-items: center; gap: 10px; }
.sa-user form { margin: 0; }
.sa-initials { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface)); }
.sa-user-text strong { display: block; font-size: 0.9rem; }
.sa-user-text small { display: block; color: var(--muted); font-size: 0.78rem; }
.sa-content { padding: 24px 28px 64px; display: grid; gap: 16px; align-content: start; max-width: 1360px; width: 100%; }
.sa-content .admin-header h1 { font-size: 1.6rem; margin: 0; }
.sa-content .admin-header { align-items: center; }

@media (max-width: 900px) {
    .sa { grid-template-columns: minmax(0, 1fr); }
    .sa-side { position: static; height: auto; padding: 12px 16px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--border); }
    .sa-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .sa-nav a { flex: none; padding: 8px 12px; border: 1px solid var(--border); }
    .sa-nav a[aria-current="page"] { box-shadow: none; border-color: var(--brand-primary); }
    .sa-store { display: none; }
    .sa-top { padding: 12px 16px; }
    .sa-user-text { display: none; }
    .sa-content { padding: 16px 16px 48px; }
}

/* Owner dashboard */
.sd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.sd-kpi { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); min-width: 0; }
.sd-kpi > div { display: grid; gap: 2px; min-width: 0; }
.sd-kpi strong { font-size: 1.9rem; line-height: 1.1; overflow-wrap: anywhere; }
.sd-kpi-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface)); }
.sd-warm .sd-kpi-icon { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.sd-cool .sd-kpi-icon { color: var(--status-preparing); background: color-mix(in srgb, var(--status-preparing) 14%, var(--surface)); }
.sd-kpi-label { font-weight: 600; }
.sd-kpi-sub { color: var(--muted); font-size: 0.82rem; }
.sd-trend { margin-left: 6px; font-weight: 700; }
.sd-trend.up { color: var(--ok); }
.sd-trend.down { color: var(--bad); }
.sd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.sd-wide { grid-column: span 2; }
.sd-panel { display: grid; gap: 12px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); min-width: 0; }
.sd-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sd-panel-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.sd-panel-head .button { padding: 6px 12px; font-size: 0.85rem; white-space: nowrap; }
.sd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.sd-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.sd-rows > li + li { border-top: 1px solid var(--border); }
.sd-rows a { color: var(--text); text-decoration: none; }
.sd-order { display: grid; grid-template-columns: 64px minmax(0, 1fr) 84px 124px; gap: 12px; align-items: center; padding: 10px 4px; }
.sd-order-total { text-align: right; }
.sd-order:hover, .sd-kitchen:hover { background: color-mix(in srgb, var(--brand-primary) 5%, var(--surface)); }
.sd-order-number, .sd-order-who { display: grid; min-width: 0; }
.sd-order-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sd-counters span { display: grid; justify-items: center; padding: 10px 4px; border-radius: 12px; background: color-mix(in srgb, var(--step-color, var(--muted)) 14%, var(--surface)); color: var(--step-color, var(--text)); }
.sd-counters small { font-size: 0.78rem; font-weight: 600; }
.sd-subhead { margin: 14px 0 4px; font-weight: 600; }
.sd-counters strong { font-size: 1.5rem; }
.sd-counters .status-new { --step-color: var(--bad); }
.sd-counters .status-preparing { --step-color: var(--warn); }
.sd-counters .status-ready { --step-color: var(--ok); }
.sd-kitchen { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; padding: 10px 4px; }
.sd-age { font-weight: 700; color: var(--muted); text-align: right; }
.sd-age.slow { color: var(--warn); }
.sd-age.late { color: var(--bad); }
.sd-scroll { max-height: 360px; overflow-y: auto; }
.sd-product { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 4px; }
.sd-product img, .sd-thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.sd-thumb { background: color-mix(in srgb, var(--muted) 12%, var(--surface)); }
.sd-product > span, .sd-driver > span:nth-child(2) { display: grid; min-width: 0; }
.sd-product form { margin: 0; }
.sd-driver { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 4px; }
.sd-initials { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, var(--surface)); }
.sd-state::before { content: "● "; }
.sd-state.busy { color: var(--status-preparing); }
.sd-state.free { color: var(--ok); }
.sd-state.off { color: var(--muted); }
.sd-badge { min-width: 28px; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--border); text-align: center; font-weight: 700; }

@media (max-width: 1100px) {
    .sd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .sd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .sd-kpi { flex-direction: column; gap: 8px; padding: 14px; }
    .sd-kpi strong { font-size: 1.45rem; }
    .sd-kpi-icon { width: 38px; height: 38px; }
    .sd-grid { grid-template-columns: minmax(0, 1fr); }
    .sd-wide { grid-column: auto; }
    .sd-order { grid-template-columns: 56px minmax(0, 1fr) auto; }
    .sd-order .badge-status { grid-column: 2 / -1; justify-self: start; }
}

/* The customer pages have one light palette: their cards are cream whatever the phone's theme,
   so the text must stay dark too. Without this a phone in dark mode turned the text light on the
   cream cards (2026-11-16). Staff pages keep following the phone's theme. */
:root:has(.sf, .track-steps) {
    --bg: #f6f4ef;
    --surface: #ffffff;
    --text: #1d1f1c;
    --muted: #5d625b;
    --border: #e3e0d8;
    --ok: #1f7a4d;
    --warn: #a15c07;
    --bad: #b42318;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.04);
    color-scheme: light;
}

/* Customer storefront: warm café palette on the shop's green. The accent is spent on
   prices' companions, the order button and small marks — never on body text. */
.sf {
    --warm-accent: #b5501f;
    --warm-accent-dark: #93400f;
    --warm-amber: #d9963c;
    --warm-paper: #fffaf1;
    --warm-border: #e9d9bf;
    --warm-shadow: 0 1px 3px rgb(122 72 20 / 0.07), 0 10px 30px rgb(122 72 20 / 0.10);
    --deep-green: #17452e;
    display: grid; gap: 16px; max-width: 760px; width: 100%; margin: 0 auto;
}
.sf h1, .sf-section h2, .sf-panel h2, .sf-pagehead h1 { font-family: Georgia, "Palatino Linotype", "Times New Roman", serif; letter-spacing: -0.01em; }
/* The search script hides items, sections and the search box itself with [hidden]; class display rules must not undo it. */
.sf [hidden] { display: none !important; }
.sf-store { max-width: none; }
.shell:has(.sf-store) { max-width: 1320px; }
.sf-layout { display: grid; gap: 20px; align-items: start; }
.sf-main { display: grid; gap: 16px; min-width: 0; }
.sf-hero { position: relative; overflow: hidden; border-radius: 24px; background: var(--deep-green); color: #fff; box-shadow: var(--warm-shadow); }
.sf-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sf-hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgb(16 42 27 / 0.88) 30%, rgb(16 42 27 / 0.45) 62%, rgb(16 42 27 / 0.10)); }
.sf-hero-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; padding: 26px 22px; min-height: 168px; }
.sf-hero.has-photo .sf-hero-main { min-height: 218px; }
.sf-logo { width: 68px; height: 68px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 1.45rem; font-weight: 800; color: var(--deep-green); background: var(--warm-paper); border: 2px solid rgb(255 255 255 / 0.65); box-shadow: var(--warm-shadow); }
.sf-title h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 6vw, 2.6rem); color: #fff; text-shadow: 0 1px 10px rgb(0 0 0 / 0.25); }
.sf-title p { margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sf-hero-facts { margin-top: 10px !important; gap: 6px !important; }
.sf-hero-facts span { padding: 4px 11px; border-radius: 999px; font-size: 0.82rem; font-weight: 650; color: #ffe9c9; background: rgb(217 150 60 / 0.28); border: 1px solid rgb(255 233 201 / 0.35); }
.sf-state { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: 0.9rem; font-weight: 700; background: #fff; }
.sf-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sf-state.open { color: var(--ok); }
.sf-state.closed { color: var(--bad); }
.sf-hours { color: rgb(255 255 255 / 0.85); font-size: 0.9rem; }
.sf-search { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 54px; border-radius: 16px; background: var(--warm-paper); border: 1px solid var(--warm-border); box-shadow: var(--warm-shadow); color: var(--muted); }
.sf-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); }
.sf-search:focus-within { border-color: var(--warm-amber); }
.sf-cats { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0 12px; position: sticky; top: 0; z-index: 2; background: var(--bg); scrollbar-width: none; }
.sf-cats::-webkit-scrollbar { display: none; }
.sf-cats a { flex: none; display: flex; align-items: center; gap: 8px; padding: 7px 15px 7px 7px; border-radius: 999px; background: var(--warm-paper); border: 1px solid var(--warm-border); box-shadow: 0 2px 8px rgb(122 72 20 / 0.06); color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 650; }
.sf-cats a:hover { border-color: var(--warm-amber); color: var(--warm-accent-dark); }
.sf-cats img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--warm-amber); }
.sf-cat-mark { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--warm-accent); background: color-mix(in srgb, var(--warm-amber) 18%, var(--warm-paper)); }
.sf-section { display: grid; gap: 12px; scroll-margin-top: 84px; }
.sf-section h2 { margin: 14px 0 0; font-size: 1.55rem; color: var(--deep-green); display: flex; align-items: center; gap: 12px; }
.sf-section h2::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--warm-amber) 45%, transparent); }
.sf-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.sf-item { display: flex; gap: 14px; padding: 10px; border-radius: 22px; background: var(--warm-paper); border: 1px solid var(--warm-border); box-shadow: var(--warm-shadow); min-width: 0; }
@media (hover: hover) {
    .sf-item { transition: transform 0.18s ease, box-shadow 0.18s ease; }
    .sf-item:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgb(122 72 20 / 0.07), 0 18px 38px rgb(122 72 20 / 0.16); }
}
.sf-media { position: relative; flex: none; width: 118px; height: 118px; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, var(--warm-amber) 16%, var(--warm-paper)); }
.sf-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2rem; font-weight: 800; font-family: Georgia, serif; color: color-mix(in srgb, var(--warm-accent) 60%, var(--warm-paper)); }
.sf-media-badge { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #fff; background: rgb(0 0 0 / 0.62); }
.sf-text { display: grid; align-content: start; gap: 4px; min-width: 0; flex: 1; padding: 4px 4px 2px 0; }
.sf-text h3 { margin: 0; font-size: 1.12rem; }
.sf-desc { margin: 0; color: var(--muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--warm-border); }
.sf-price { font-size: 1.28rem; font-weight: 800; color: var(--deep-green); }
.sf-off { color: var(--warn); font-size: 0.85rem; font-weight: 700; }
.sf-item.unavailable .sf-photo { filter: grayscale(1); }
.sf-empty { color: var(--muted); text-align: center; padding: 24px 0; }
.sf-add-inline { margin: 0; }
.sf-add-inline button { font: inherit; font-weight: 800; width: 34px; height: 34px; border: 0; border-radius: 9px; cursor: pointer; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface)); }

/* Basket panel (desktop sidebar; swapped in place by storefront.js) */
.sf-cartpanel { display: none; }
.sf-panel { display: grid; gap: 14px; padding: 20px; border-radius: 22px; background: var(--warm-paper); border: 1px solid var(--warm-border); box-shadow: var(--warm-shadow); }
.sf-panel h2 { margin: 0; font-size: 1.35rem; color: var(--deep-green); padding-bottom: 10px; border-bottom: 2px solid color-mix(in srgb, var(--warm-amber) 55%, transparent); }
.sf-panel-empty { margin: 0; color: var(--muted); }
.sf-panel-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sf-panel-lines li { display: flex; gap: 10px; align-items: center; }
.sf-panel-lines li.unavailable { opacity: 0.65; }
.sf-panel-lines img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
.sf-panel-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.sf-panel-text strong { overflow-wrap: anywhere; }
.sf-panel-side { display: grid; justify-items: end; gap: 5px; }
.sf-panel-totals { display: grid; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--warm-border); }
.sf-panel-totals strong { color: var(--warm-accent-dark); font-size: 1.1rem; }
.sf-panel-totals p { margin: 0; display: flex; justify-content: space-between; gap: 12px; }
.sf-panel-cartlink { text-align: center; font-weight: 650; color: var(--brand-primary); }

@media (min-width: 640px) {
    /* Wider screens get more cards side by side, each still a small photo beside its text. */
    .sf-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sf-hero.has-photo .sf-hero-main { min-height: 250px; }
}

@media (min-width: 1024px) {
    .sf-layout { grid-template-columns: minmax(0, 1fr) 350px; }
    .sf-cartpanel { display: block; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
    .sf-cartbar { display: none !important; }
    .sf:has(.sf-cartbar:not([hidden])) { padding-bottom: 0; }
}

@media (min-width: 1280px) {
    .sf-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
    .sf-hero-main { padding: 18px 16px; }
    .sf-hero.has-photo .sf-hero-main { min-height: 190px; }
    .sf-media { width: 104px; height: 104px; }
}

/* Customer ordering */
.sf-add { margin: 8px 0 0; }
.sf-add button { font: inherit; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 9px 18px; border: 0; border-radius: 999px; cursor: pointer; color: #fff; background: var(--brand-primary); box-shadow: 0 4px 14px rgb(31 111 74 / 0.28); transition: transform 0.12s ease, background 0.2s ease; }
.sf-add button:hover { background: var(--deep-green); }
.sf-add button:active { transform: scale(0.96); }
.sf-add button.added { background: var(--warm-accent); }
.sf-add button:disabled { opacity: 0.7; }
.sf:has(.sf-cartbar:not([hidden])) { padding-bottom: 88px; }
.sf-cartbar { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5; width: min(760px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border-radius: 20px; color: #fff; text-decoration: none; background: var(--brand-primary); box-shadow: 0 8px 28px rgb(0 0 0 / 0.22); }
.sf-cartbar.bump { animation: sf-bump 0.35s ease; }
@keyframes sf-bump { 40% { transform: translateX(-50%) scale(1.04); } }
.sf-cartbar-icon { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--brand-primary); background: color-mix(in srgb, #fff 88%, var(--brand-primary)); }
.sf-cartbar-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: #fff; background: var(--bad); }
.sf-cartbar-text { display: grid; flex: 1; min-width: 0; }
.sf-cartbar-text small { opacity: 0.85; }
.sf-cartbar-total { font-size: 1.15rem; white-space: nowrap; }
.sf-cartbar-go { padding: 10px 14px; border-radius: 14px; font-weight: 700; color: var(--brand-primary); background: color-mix(in srgb, #fff 90%, var(--brand-primary)); white-space: nowrap; }
.sf-pagehead { display: flex; align-items: center; gap: 12px; }
.sf-pagehead h1 { margin: 0; font-size: 1.6rem; }
.sf-back { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); }
.sf-cta { font: inherit; font-weight: 700; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 12px 18px; border: 0; border-radius: 16px; cursor: pointer; color: #fff; text-decoration: none; background: var(--warm-accent); box-shadow: 0 6px 18px rgb(181 80 31 / 0.30); font-size: 1.05rem; }
.sf-cta:hover { background: var(--warm-accent-dark); }
.sf-cta:disabled { opacity: 0.6; cursor: default; }

/* Menu cards are compact rows, like a delivery app's list: a small photo, the name, and the price
   with a small button on one line. The large .sf-cta stays for the basket and checkout only.
   (2026-11-16: on phones each card was ~170px tall, so a menu of 65 meant endless scrolling.) */
.sf-items { gap: 10px; }
.sf-item { gap: 12px; padding: 8px; border-radius: 16px; align-items: center; }
.sf-media { width: 88px; height: 88px; border-radius: 12px; }
.sf-text { gap: 2px; padding: 0; }
.sf-text h3 { font-size: 1rem; overflow-wrap: anywhere; hyphens: auto; }
.sf-desc { font-size: 0.85rem; }
.sf-card-foot { padding-top: 6px; gap: 8px; }
.sf-price { font-size: 1.05rem; }
.sf-card-foot .sf-add { margin: 0; }
.sf-card-foot .sf-add button,
.sf-card-foot .sf-cta { width: auto; min-height: 36px; padding: 6px 14px; border-radius: 999px; font-size: 0.9rem; box-shadow: none; white-space: nowrap; }
.sf-card-foot .sf-stepper button { width: 30px; height: 30px; }
.sf-media-badge { left: 4px; right: 4px; bottom: 4px; padding: 2px 4px; text-align: center; font-size: 0.66rem; line-height: 1.2; border-radius: 8px; }
@media (max-width: 420px) {
    .sf-media { width: 80px; height: 80px; }
}
.sf-emptycart { display: grid; gap: 14px; justify-items: center; padding: 32px 16px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.sf-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sf-line { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.sf-line img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.sf-line-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.sf-line-side { display: grid; justify-items: end; gap: 6px; }
.sf-line.unavailable { opacity: 0.65; }
.sf-stepper { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; border: 1px solid var(--border); }
.sf-stepper form { margin: 0; }
.sf-stepper button { font: inherit; font-weight: 800; width: 34px; height: 34px; border: 0; border-radius: 9px; cursor: pointer; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface)); }
.sf-stepper > span { min-width: 22px; text-align: center; font-weight: 700; }
.sf-summary { display: grid; gap: 8px; padding: 18px; background: var(--warm-paper); border: 1px solid var(--warm-border); box-shadow: var(--warm-shadow); border-radius: 20px; }
.sf-summary strong { color: var(--warm-accent-dark); }
.sf-summary > p { margin: 0; display: flex; justify-content: space-between; align-items: baseline; }
.sf-summary > p strong { font-size: 1.3rem; }
.sf-order h2, .sf-form h2 { margin: 0; font-size: 1.1rem; }
.sf-order ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sf-order li { display: flex; justify-content: space-between; gap: 10px; }
.sf-order li.unavailable { color: var(--muted); text-decoration: line-through; }
.sf-form { display: grid; gap: 14px; }
.sf-delivery-fields { display: grid; gap: 14px; }
.sf-field { display: grid; gap: 6px; font-weight: 600; }
.sf-field input, .sf-field textarea { font: inherit; font-weight: 400; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--warm-border); background: var(--warm-paper); color: var(--text); }
.sf-field textarea { min-height: 72px; resize: vertical; }
.sf-field input:focus, .sf-field textarea:focus { outline: 2px solid color-mix(in srgb, var(--warm-amber) 55%, transparent); border-color: var(--warm-accent); }
.sf-field.invalid input { border-color: var(--bad); }
.sf-field small.form-error { font-weight: 600; }
.sf-choice { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--warm-border); background: var(--warm-paper); cursor: pointer; font-weight: 600; }
.sf-choice:has(input:checked) { border-color: var(--warm-accent); background: color-mix(in srgb, var(--warm-amber) 14%, var(--warm-paper)); }
.sf-choice input { width: 20px; height: 20px; accent-color: var(--warm-accent); }
.sf-notes { display: grid; gap: 6px; font-weight: 600; }
.sf-notes textarea, .sf-line-note input { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--warm-border); background: var(--warm-paper); color: inherit; }
.sf-note-line { display: block; font-style: italic; color: var(--warm-accent); overflow-wrap: anywhere; }
.sf-line-note summary { cursor: pointer; font-size: 0.85rem; color: var(--muted); }
.sf-line-note form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.sf-line-note input { flex: 1 1 12rem; min-width: 0; }
.sf-placed { margin: 0; padding: 14px 16px; border-radius: 16px; font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--border)); }
@media (prefers-reduced-motion: reduce) {
    .sf-add button { transition: none; }
}
.sf-note { margin: 6px 0 0; }
