/* ==========================================================================
   Digitale Speisekarte - Zentrales Stylesheet
   ========================================================================== */

:root {
    --color-primary: #8b2e2e;
    --color-secondary: #f4ede4;
    --color-text: #2a2422;
    --color-text-muted: #7a6f68;
    --color-bg: #ffffff;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(0,0,0,0.08);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 640px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px 22px; border-radius: 999px; border: none;
    font-weight: 600; font-size: 15px; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-primary); color: var(--color-primary); }
.btn-ghost { background: rgba(0,0,0,.05); color: var(--color-text); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-danger { background: #c0392b; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=tel], textarea, select {
    width: 100%; padding: 12px 14px; border: 1.5px solid #e2dcd6;
    border-radius: 10px; font-size: 15px; font-family: inherit; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--color-primary); }
textarea { resize: vertical; min-height: 90px; }
.help-text { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }
.error-box { background: #fdeeee; color: #a33; border: 1px solid #f3caca; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.success-box { background: #eaf7ee; color: #2a7a45; border: 1px solid #c7e9d3; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }

/* ---------- Auth / Landing Pages ---------- */
.auth-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, #faf6f1 0%, #f1e6da 100%); padding: 40px 16px;
}
.auth-card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 40px; width: 100%; max-width: 460px;
}
.auth-card h1 { font-family: var(--font-heading); font-size: 26px; margin: 0 0 6px; }
.auth-card .sub { color: var(--color-text-muted); margin-bottom: 26px; font-size: 14px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--color-text-muted); }

.landing-hero {
    background: radial-gradient(circle at top right, #fff4e8, #fffaf5 60%);
    padding: 90px 20px 60px; text-align: center;
}
.landing-hero h1 { font-family: var(--font-heading); font-size: 42px; margin-bottom: 14px; }
.landing-hero p { font-size: 18px; color: var(--color-text-muted); max-width: 560px; margin: 0 auto 30px; }
.landing-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.landing-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 24px; margin: 60px auto; max-width: 1000px; padding: 0 20px; }
.feature-card { background: #fff; border: 1px solid #eee; border-radius: var(--radius); padding: 26px; }
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--color-text-muted); font-size: 14px; }

/* ---------- Wizard (Registrierung Schritte) ---------- */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 30px; }
.wizard-step-dot { flex: 1; height: 4px; border-radius: 4px; background: #eee; }
.wizard-step-dot.active { background: var(--color-primary); }
.theme-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 14px; margin: 10px 0 20px; }
.theme-option { border: 2px solid #e2dcd6; border-radius: 12px; padding: 14px; cursor: pointer; text-align: center; transition: border-color .15s; }
.theme-option.selected { border-color: var(--color-primary); background: #fdf6f0; }
.theme-option-preview { height: 60px; border-radius: 8px; margin-bottom: 8px; }
.color-swatches { display: flex; gap: 10px; margin: 8px 0 20px; flex-wrap: wrap; }
.color-swatch { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; }
.color-swatch.selected { border-color: #333; }

/* ---------- Dashboard Layout ---------- */
.dash-shell { display: flex; min-height: 100vh; background: #f7f4f0; }
.dash-sidebar { width: 240px; background: #201a17; color: #f2ece6; flex-shrink: 0; padding: 26px 18px; }
.dash-sidebar .brand { font-family: var(--font-heading); font-size: 20px; margin-bottom: 30px; display:block; }
.dash-nav a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px; color: #cdc3ba; font-size: 14.5px; margin-bottom: 4px; }
.dash-nav a:hover, .dash-nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.nav-icon { width: 19px; height: 19px; flex-shrink: 0; display: inline-flex; }
.nav-icon svg { width: 100%; height: 100%; }
.dash-main { flex: 1; padding: 34px 40px; max-width: 1200px; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.dash-header h1 { font-family: var(--font-heading); font-size: 26px; margin: 0; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 28px; font-weight: 700; }
.stat-card .label { color: var(--color-text-muted); font-size: 13px; }

/* Kategorien / Menu Editor */
.category-block { border: 1px solid #eee; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.category-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.category-header input[type=text] { font-size: 17px; font-weight: 700; border: none; background: transparent; padding: 4px 0; }
.item-row { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 10px; }
.item-row:hover { background: #faf8f6; }
.item-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #eee; flex-shrink: 0; }
.item-info { flex: 1; min-width: 0; }
.item-info .name { font-weight: 600; font-size: 14.5px; }
.item-info .desc { font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price { font-weight: 700; white-space: nowrap; }
.item-actions { display: flex; gap: 6px; }
.icon-btn { background: none; border: none; padding: 6px 8px; border-radius: 8px; color: var(--color-text-muted); display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; vertical-align: middle; }
.icon-btn:hover { background: #eee; color: var(--color-text); }

.modal-overlay { position: fixed; inset: 0; background: rgba(20,15,12,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-box { background: #fff; border-radius: var(--radius); padding: 28px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal-box h2 { font-family: var(--font-heading); margin-top: 0; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* QR-Code-Bestellmodal: Material- und Größenauswahl */
.material-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 4px; }
.material-option { border: 2px solid #e2dcd6; border-radius: 12px; padding: 10px; text-align: center; cursor: pointer; font-size: 12.5px; font-weight: 600; transition: border-color .15s; }
.material-option.selected { border-color: var(--color-primary); background: #fdf6f0; }
.material-swatch { height: 54px; border-radius: 8px; margin-bottom: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.material-swatch.wood { background: repeating-linear-gradient(100deg, #8b5a2b 0, #8b5a2b 6px, #a5713a 6px, #a5713a 12px, #7a4d24 12px, #7a4d24 18px); }
.material-swatch.metal { background: linear-gradient(135deg, #c9ccd1 0%, #f2f4f6 35%, #9aa0a6 55%, #dde0e3 75%, #b7bbc0 100%); }
.material-swatch.plastic { background: linear-gradient(160deg, #2c2c2c 0%, #4a4a4a 45%, #232323 100%); position: relative; overflow: hidden; }
.material-swatch.plastic::after { content: ''; position: absolute; top: -20%; left: -10%; width: 40%; height: 140%; background: rgba(255,255,255,.18); transform: rotate(20deg); }

.size-options { display: flex; gap: 10px; }
.size-options .size-option { flex: 1; padding: 10px; border-radius: 10px; border: 2px solid #e2dcd6; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.size-options .size-option.selected { border-color: var(--color-primary); background: #fdf6f0; color: var(--color-primary); }

.qr-order-price { margin-top: 16px; font-size: 15px; text-align: center; padding: 10px; background: rgba(0,0,0,.03); border-radius: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1.5px solid #e2dcd6; font-size: 12.5px; font-weight: 600; cursor: pointer; user-select: none; color: var(--color-text-muted); transition: all .15s; }
.chip-icon { width: 14px; height: 14px; display: inline-flex; }
.chip-icon svg { width: 100%; height: 100%; }
.chip-sm { padding: 6px 10px; font-size: 12px; min-width: 30px; justify-content: center; }
.chip:has(input:checked) { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Lageplan */
.floorplan-wrap { position: relative; display: inline-block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); max-width: 100%; }
.floorplan-wrap img { max-width: 100%; display: block; }
.table-marker {
    position: absolute; width: 42px; height: 42px; margin: -21px 0 0 -21px;
    background: var(--color-primary); color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
    cursor: grab; box-shadow: 0 4px 10px rgba(0,0,0,.3); border: 2px solid #fff;
}
.table-marker.occupied { background: #c0392b; }
.table-marker.dragging { cursor: grabbing; opacity: .85; }
.table-marker.selected { box-shadow: 0 0 0 4px rgba(139,46,46,.25), 0 4px 10px rgba(0,0,0,.3); }
.marker-trash {
    display: none; position: absolute; top: -9px; right: -9px; width: 24px; height: 24px;
    border-radius: 8px; background: #c0392b; color: #fff; border: 2px solid #fff;
    align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.3);
    animation: markerTrashPop .15s ease;
}
.marker-trash svg { width: 13px; height: 13px; }
.table-marker.selected .marker-trash { display: flex; }
@keyframes markerTrashPop { from { transform: scale(0); } to { transform: scale(1); } }

/* Tabellenliste (QR) */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; }
.qr-card { border: 1px solid #eee; border-radius: 12px; padding: 16px; text-align: center; }
.qr-card canvas, .qr-card img { margin: 0 auto 10px; }

/* ---------- Öffentliche Speisekarte ---------- */

/* Sprachauswahl, immer sichtbar oben rechts */
.lang-switch { position: fixed; top: 18px; right: 18px; z-index: 50; display: flex; gap: 4px; background: rgba(255,255,255,.85); backdrop-filter: blur(6px); border-radius: 999px; padding: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.12); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.lang-switch.visible { opacity: 1; pointer-events: auto; }
.lang-switch button { border: none; background: transparent; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); }
.lang-switch button.active { background: var(--color-primary); color: #fff; }

/* Tischnummer im "Nur Speisekarte"-Modus (kein Bestellen): blendet beim
   Scrollen unten rechts kurz ein, analog zur Sprachauswahl oben rechts. */
.table-badge {
    position: fixed; bottom: 18px; right: 18px; z-index: 50;
    background: rgba(255,255,255,.88); backdrop-filter: blur(6px);
    border-radius: 999px; padding: 9px 16px; box-shadow: 0 4px 16px rgba(0,0,0,.14);
    font-size: 13px; font-weight: 700; color: var(--color-text);
    opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.table-badge.visible { opacity: 1; }

/* Scroll-Snap-Wrapper: Hero-Screen -> (Glitch) -> Speisekarten-Inhalt */
.scroll-snap-wrap { height: 100vh; overflow-y: auto; scroll-behavior: smooth; }
.menu-hero {
    min-height: 100vh; scroll-snap-align: start; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; padding: 40px 20px; position: relative;
    background: radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--color-secondary) 55%, transparent), transparent 60%);
}
.menu-logo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 20px; box-shadow: 0 10px 30px rgba(0,0,0,.16); border: 4px solid #fff; }
.menu-hero h1 { font-family: var(--font-heading); font-size: 36px; margin: 0 0 12px; color: var(--color-primary); letter-spacing: .01em; }
.menu-hero .story { max-width: 560px; margin: 10px auto 0; color: var(--color-text-muted); font-size: 15.5px; line-height: 1.7; }
.scroll-hint { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--color-text-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.scroll-hint svg { width: 20px; height: 20px; animation: bounceDown 1.6s ease-in-out infinite; }
@keyframes bounceDown { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(8px); opacity: 1; } }

.menu-content { min-height: 100vh; scroll-snap-align: start; }
.menu-content.glitch-in { animation: menuGlitch .5s steps(2, end); }
@keyframes menuGlitch {
    0%   { clip-path: inset(0 0 0 0); transform: translate(0,0); filter: none; }
    15%  { clip-path: inset(10% 0 60% 0); transform: translate(-6px,0); filter: hue-rotate(30deg); }
    30%  { clip-path: inset(70% 0 5% 0); transform: translate(6px,0); filter: hue-rotate(-20deg); }
    45%  { clip-path: inset(30% 0 40% 0); transform: translate(-4px,0); filter: none; }
    60%  { clip-path: inset(0 0 80% 0); transform: translate(4px,0); filter: hue-rotate(15deg); }
    80%  { clip-path: inset(0 0 0 0); transform: translate(0,0); filter: none; }
    100% { clip-path: inset(0 0 0 0); transform: translate(0,0); filter: none; }
}

/* Rubriken-Zeile mit Filter-Button */
.menu-cat-row { position: sticky; top: 0; background: color-mix(in srgb, var(--color-bg) 92%, transparent); backdrop-filter: blur(8px); z-index: 20; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(0,0,0,.06); padding-right: 16px; }
.menu-cat-nav { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 14px 20px; }
.menu-cat-nav button { padding: 9px 18px; border-radius: 999px; background: rgba(0,0,0,.045); border: none; font-size: 13.5px; font-weight: 600; white-space: nowrap; font-family: inherit; color: var(--color-text); transition: background .15s, color .15s; }
.menu-cat-nav button.active { background: var(--color-primary); color: #fff; }

.filter-toggle-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid rgba(0,0,0,.12); background: transparent; font-size: 13px; font-weight: 700; color: var(--color-text); white-space: nowrap; }
.filter-toggle-btn svg { width: 16px; height: 16px; }
.filter-toggle-btn.active { border-color: var(--color-primary); color: var(--color-primary); }
.filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--color-primary); color: #fff; font-size: 10.5px; font-weight: 700; }

/* Filter-Seitenpanel */
.filter-drawer-overlay { position: fixed; inset: 0; background: rgba(20,15,12,.4); z-index: 89; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.filter-drawer-overlay.visible { opacity: 1; pointer-events: auto; }
.filter-drawer { position: fixed; top: 0; right: -320px; width: 300px; max-width: 85vw; height: 100vh; background: #fff; z-index: 90; box-shadow: -8px 0 30px rgba(0,0,0,.18); transition: right .3s ease; display: flex; flex-direction: column; padding: 22px 20px; }
.filter-drawer.open { right: 0; }
.filter-drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.filter-drawer-header h3 { font-family: var(--font-heading); margin: 0; font-size: 18px; }
.filter-drawer-body { flex: 1; display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.filter-drawer-option { display: flex; align-items: center; gap: 10px; padding: 12px 8px; border-radius: 10px; cursor: pointer; font-size: 14.5px; font-weight: 600; }
.filter-drawer-option:hover { background: rgba(0,0,0,.04); }
.filter-drawer-option input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--color-primary); }
.filter-drawer-option .chip-icon { width: 18px; height: 18px; color: var(--color-primary); }

.menu-category { max-width: 720px; margin: 0 auto; border-bottom: 1px solid rgba(0,0,0,.06); }
.menu-category-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 20px; cursor: pointer; user-select: none; }
.menu-category-header h2 { font-family: var(--font-heading); font-size: 22px; color: var(--color-primary); margin: 0; }
.menu-category-header .chev { width: 20px; height: 20px; color: var(--color-text-muted); transition: transform .25s ease; flex-shrink: 0; }
.menu-category.expanded .menu-category-header .chev { transform: rotate(180deg); }
.menu-category-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; padding: 0 20px; }
.menu-category.expanded .menu-category-body { padding-bottom: 14px; }

.menu-dish { display: flex; gap: 16px; padding: 16px; border-radius: 14px; margin-bottom: 4px; transition: background .15s ease; }
.menu-dish:hover { background: color-mix(in srgb, var(--color-secondary) 45%, transparent); }
.menu-dish img { width: 82px; height: 82px; border-radius: 12px; object-fit: cover; flex-shrink: 0; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.menu-dish-info { flex: 1; min-width: 0; }
.menu-dish-info h4 { margin: 0 0 4px; font-size: 16.5px; }
.menu-dish-info p { margin: 0; font-size: 13.5px; color: var(--color-text-muted); line-height: 1.55; }
.menu-dish-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.menu-dish-price { font-weight: 700; color: var(--color-primary); font-size: 15px; }

/* Squircle-Buttons (quadratisch, abgerundete Ecken) für Warenkorb-Aktionen */
.sq-btn { width: 40px; height: 40px; border-radius: 12px; border: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .12s ease; }
.sq-btn:active { transform: scale(.92); }
.sq-btn svg { width: 19px; height: 19px; }
.add-icon-btn { background: var(--color-primary); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control .sq-btn { width: 34px; height: 34px; border-radius: 10px; background: var(--color-secondary); color: var(--color-primary); font-weight: 700; font-size: 16px; }
.qty-control .qty-num { min-width: 18px; text-align: center; font-weight: 700; }

/* Footer der Speisekarte */
.menu-footer { max-width: 720px; margin: 20px auto 90px; padding: 30px 20px 10px; text-align: center; color: var(--color-text-muted); font-size: 13px; border-top: 1px solid rgba(0,0,0,.06); }
.menu-footer .rname { font-family: var(--font-heading); font-size: 16px; color: var(--color-primary); margin-bottom: 6px; }
.menu-footer div { margin: 2px 0; }
.menu-footer a { color: var(--color-text-muted); text-decoration: underline; }

/* Allergene (hochgestellt) & Ernährungs-Icons neben dem Gerichtnamen */
.allergen-tag { color: var(--color-text-muted); font-size: 10px; font-weight: 700; margin-left: 2px; cursor: default; }
.diet-icons { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.diet-icon { width: 14px; height: 14px; display: inline-flex; color: var(--color-primary); opacity: .65; }
.diet-icon svg { width: 100%; height: 100%; }

.allergen-legend { max-width: 500px; margin: 18px auto 0; text-align: left; font-size: 12px; }
.allergen-legend summary { cursor: pointer; text-align: center; color: var(--color-text-muted); text-decoration: underline; list-style: none; }
.allergen-legend summary::-webkit-details-marker { display: none; }
.allergen-legend-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 4px 14px; margin-top: 12px; padding: 14px; background: rgba(0,0,0,.03); border-radius: 10px; }

/* ---------- Bestellfortschritt (fixer horizontaler Balken unten) ---------- */
.order-progress { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; box-shadow: 0 -6px 24px rgba(0,0,0,.12); padding: 12px 18px 14px; z-index: 60; transform: translateY(100%); transition: transform .4s ease; }
.order-progress.visible { transform: translateY(0); }
.order-progress-label { font-size: 12.5px; font-weight: 700; color: var(--color-primary); margin-bottom: 8px; text-align: center; letter-spacing: .02em; }
.order-progress-track { height: 6px; border-radius: 999px; background: rgba(0,0,0,.08); overflow: hidden; }
.order-progress-fill { height: 100%; border-radius: 999px; background: var(--color-primary); width: 8%; transition: width .6s ease; }
.order-progress-fill.cancelled { background: #c0392b; }

/* Hintergrundmuster (wählbar im Dashboard) */
.pattern-dots { background-image: radial-gradient(var(--color-secondary) 1.4px, transparent 1.4px); background-size: 22px 22px; }
.pattern-lines { background-image: repeating-linear-gradient(135deg, var(--color-secondary) 0, var(--color-secondary) 1.5px, transparent 1.5px, transparent 16px); }
.pattern-grid { background-image: linear-gradient(var(--color-secondary) 1px, transparent 1px), linear-gradient(90deg, var(--color-secondary) 1px, transparent 1px); background-size: 26px 26px; }
.pattern-paper { background-image: radial-gradient(rgba(0,0,0,.025) 1px, transparent 1px), radial-gradient(rgba(0,0,0,.02) 1px, transparent 1px); background-size: 3px 3px, 7px 7px; background-position: 0 0, 2px 2px; }

.cart-bar {
    position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
    background: var(--color-primary); color: #fff; padding: 14px 22px; border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; align-items: center; gap: 16px;
    font-weight: 700; z-index: 30; cursor: pointer; max-width: 92vw;
    transition: bottom .3s ease;
}
/* Rückt hoch, sobald zusätzlich der Bestellfortschritts-Balken unten sichtbar ist */
.cart-bar.raised { bottom: 92px; }
.cart-panel { position: fixed; inset: 0; background: rgba(20,15,12,.5); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.cart-panel-box { background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 24px; max-height: 85vh; overflow-y: auto; }
.cart-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0ebe6; gap: 10px; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; margin: 16px 0; }

.order-confirm { text-align: center; padding: 60px 20px; }
.order-confirm .check { font-size: 52px; margin-bottom: 12px; }

/* ---------- Kitchen View ---------- */
.kitchen-shell { background: #14100e; min-height: 100vh; color: #f2ece6; padding: 24px; }
.kitchen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 18px; }
.kitchen-ticket { background: #211a16; border-radius: 14px; padding: 18px; border-left: 5px solid var(--color-primary); position: relative; }
.kitchen-ticket.new { border-left-color: #e0a800; }
.kitchen-ticket h3 { margin: 0 0 4px; font-family: var(--font-heading); padding-right: 28px; }
.kitchen-ticket .time { font-size: 12px; color: #a99d92; margin-bottom: 10px; }
.kitchen-ticket ul { list-style: none; padding: 0; margin: 0 0 14px; }
.kitchen-ticket li { padding: 4px 0; font-size: 14.5px; border-bottom: 1px dashed #362c26; }
.kitchen-ticket .qty { color: var(--color-secondary); font-weight: 700; margin-right: 6px; }
.ticket-menu-btn { position: absolute; top: 14px; right: 12px; background: none; border: none; color: #a99d92; font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 9px; border-radius: 6px; }
.ticket-menu-btn:hover, .ticket-menu-btn:focus { background: rgba(255,255,255,.1); color: #fff; }
.ticket-menu-dropdown { display: none; position: absolute; top: 40px; right: 12px; background: #2b2320; border: 1px solid #443830; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.45); z-index: 20; min-width: 150px; overflow: hidden; }
.ticket-menu-dropdown.open { display: block; }
.ticket-menu-dropdown button { display: block; width: 100%; text-align: left; background: none; border: none; color: #e07a7a; padding: 11px 14px; font-size: 13.5px; cursor: pointer; }
.ticket-menu-dropdown button:hover { background: rgba(224,122,122,.14); }

/* ---------- Kellner-Modus ---------- */
.waiter-map-wrap { position: relative; display: inline-block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); max-width: 100%; margin-bottom: 22px; }
.waiter-map-wrap img { max-width: 100%; display: block; }
.waiter-marker {
    position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
    background: #ddd6cf; color: #8a8078; border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.2);
    transition: background .2s, color .2s;
}
.waiter-marker.ready { background: #e0a800; color: #fff; animation: pulseReady 1.4s ease-in-out infinite; }
@keyframes pulseReady { 0%,100% { box-shadow: 0 0 0 0 rgba(224,168,0,.5); } 50% { box-shadow: 0 0 0 10px rgba(224,168,0,0); } }

/* ---------- Theme: Modern ---------- */
body.theme-modern { --font-heading: 'Poppins', sans-serif; --radius: 6px; }
body.theme-modern .menu-header h1 { text-transform: uppercase; letter-spacing: 1px; }
body.theme-modern .menu-dish img { border-radius: 6px; }
body.theme-modern .add-btn, body.theme-modern .btn-primary { border-radius: 6px; }

/* ---------- Theme: Elegant ---------- */
body.theme-elegant { --font-heading: 'Cormorant Garamond', Georgia, serif; background: #fbfaf7; }
body.theme-elegant .menu-header h1 { font-size: 38px; font-style: italic; }
body.theme-elegant .menu-category h2 { border-bottom: 1px solid var(--color-primary); font-style: italic; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .dash-sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 200; transition: left .2s; }
    .dash-sidebar.open { left: 0; }
    .dash-main { padding: 20px; width: 100%; }
    .mobile-menu-btn { display: inline-block; }
}
@media (min-width: 861px) { .mobile-menu-btn { display: none; } }

/* ---------- Küchen-/Kellneransicht: Mobile-Feinschliff ---------- */
@media (max-width: 600px) {
    .kitchen-shell { padding: 16px 14px; }
    .kitchen-grid { grid-template-columns: 1fr; gap: 14px; }
    .kitchen-ticket { padding: 16px; }
    .kitchen-ticket > div[style*="display:flex"] { flex-direction: column; }
    .kitchen-ticket .btn { width: 100%; min-height: 46px; font-size: 14.5px; }
    .table-grid { grid-template-columns: 1fr; gap: 12px; }
    .qr-card .btn-block { min-height: 46px; font-size: 14.5px; }
    .waiter-marker { width: 34px; height: 34px; margin: -17px 0 0 -17px; font-size: 11px; }
}

