body.admin { background: #eceae4; }
.a-top { position: sticky; top: 0; z-index: 30; background: var(--brand); color: #fff; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 0; }
.a-top-row { display: flex; align-items: center; gap: 10px; max-width: 1500px; margin: 0 auto; }
.a-top-row b { font-size: 17px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-top .icon-btn { background: rgba(255,255,255,.12); color: #fff; }
.a-top .icon-btn.on { background: var(--gold); color: var(--brand); }
.a-tabs { display: flex; gap: 2px; max-width: 1500px; margin: 8px auto 0; overflow-x: auto; scrollbar-width: none; }
.a-tabs button { background: none; border: 0; color: #b9cbbf; padding: 10px 14px; font-weight: 650; border-bottom: 3px solid transparent; white-space: nowrap; }
.a-tabs button.active { color: #fff; border-color: var(--gold); }
.a-tabs .cnt { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; margin-left: 4px; padding: 0 5px; }
.a-main { max-width: 1500px; margin: 0 auto; padding: 14px 14px calc(40px + var(--safe-b)); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; padding: 4px 10px; border-radius: 999px; }
.pill.paused { background: #fde6e2; color: #7a2316; }
.pill.live { background: #ddf3e5; color: #1c5a34; }

.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); color: #5b4511; margin-bottom: 14px; font-size: 14px; }
.banner .btn { margin-left: auto; flex: none; }
.banner.red { background: #fde6e2; color: #7a2316; }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 4px 10px; display: flex; gap: 8px; align-items: center; }
.col h3 .n { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; }
.col .stack { gap: 12px; }
.col-empty { color: var(--muted); text-align: center; padding: 28px 10px; border: 2px dashed #d4cfc4; border-radius: 14px; font-size: 14px; }
.subtabs { display: none; }
@media (max-width: 1000px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .board .col { display: none; }
  .board .col.show { display: block; }
  .col h3 { display: none; }
  .subtabs { display: flex; margin-bottom: 12px; }
  .subtabs.seg { width: 100%; }
  .subtabs button { flex: 1; }
}

.oc { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; border: 2px solid transparent; }
.oc.new { border-color: var(--accent); animation: glow 1.4s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(210,69,47,.18); } }
.oc-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--surface-2); flex-wrap: wrap; }
.oc-head .id { font-weight: 800; font-size: 18px; }
.oc-head .ago { color: var(--muted); font-size: 13px; margin-left: auto; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fff; }
.tag.del { background: #e3eefc; color: #1d4f91; }
.tag.pick { background: #f1e6fb; color: #5d2a8a; }
.tag.pre { background: var(--gold-soft); color: #6b5212; }
.tag.st { background: var(--ink); color: #fff; }
.oc-body { padding: 12px 14px; display: grid; gap: 10px; font-size: 15px; }
.oc-cust b { font-size: 16px; }
.oc-cust a { color: var(--brand-2); font-weight: 600; }
.oc-items { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 8px 0; display: grid; gap: 6px; }
.oc-items .li { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px; }
.oc-items .q { font-weight: 800; }
.oc-items .op { grid-column: 2 / -1; color: var(--muted); font-size: 13px; margin-top: -3px; }
.oc-items .nt { grid-column: 2 / -1; color: var(--accent); font-size: 13px; font-weight: 650; margin-top: -3px; }
.oc-note { background: #fff6e0; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.oc-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 17px; }
.oc-eta { display: flex; justify-content: space-between; align-items: center; background: #e7f2ea; color: #1c4a2d; border-radius: 10px; padding: 8px 10px; font-weight: 650; }
.oc-actions { padding: 0 14px 14px; display: grid; gap: 8px; }
.eta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.eta-grid .btn { padding: 12px 6px; border-radius: 12px; flex-direction: column; gap: 0; line-height: 1.1; }
.eta-grid .btn small { font-weight: 500; font-size: 11px; opacity: .85; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row2 .btn, .oc-actions > .btn { border-radius: 12px; }

/* Menü-Verwaltung */
.m-cat { margin-bottom: 18px; }
.m-cat h3 { font-size: 16px; margin: 0 4px 8px; }
.m-row { display: grid; grid-template-columns: 40px 1fr 110px 64px; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.m-row:first-of-type { border-radius: 14px 14px 0 0; }
.m-row:last-child { border-bottom: 0; border-radius: 0 0 14px 14px; }
.m-row .nr { color: var(--muted); font-size: 13px; }
.m-row input.price { width: 100%; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; text-align: right; }
.m-row.off .nm { text-decoration: line-through; color: var(--muted); }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #cfcac0; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid rgba(31,61,44,.35); outline-offset: 2px; }

/* Einstellungen */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.set-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.hours-edit { display: grid; grid-template-columns: 100px 1fr 1fr; gap: 8px; align-items: center; }
.hours-edit input, .zone-edit input { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; width: 100%; min-width: 0; }
.zone-edit { display: grid; grid-template-columns: 72px 1fr 72px 72px 72px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.dev { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dev:last-child { border-bottom: 0; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--brand-2), var(--brand)); }
.login .card { width: 100%; max-width: 380px; padding: 28px; }
.login h1 { font-size: 22px; margin: 12px 0 18px; }

.hist-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 4px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.hist-row > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .hist-row .tag { display: none; } .hist-row { grid-template-columns: auto auto minmax(0, 1fr) auto; } }

@media (max-width: 560px) {
  .zone-edit { grid-template-columns: 1fr 1fr 1fr 36px; }
  .zone-edit > :nth-child(2) { grid-column: span 3; order: -1; }
  .zone-edit.small { display: none; }
}
.m-row .variants { font-size: 13px; color: var(--muted); text-align: right; }

/* ---------- Speisekarten-Editor ---------- */
.me-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.me-top .seg { flex: 1; max-width: 360px; }
.m-cat-head { display: flex; align-items: center; gap: 6px; margin: 18px 0 8px; }
.m-cat-head h3 { flex: 1; margin: 0; }
.m-row .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line); }
.m-row .thumb.empty { display: inline-block; }
.m-row.hidden-item .nm { opacity: .55; }
.m-row .sort-btns { display: flex; gap: 4px; }
.m-add { display: block; width: 100%; padding: 12px; border: 0; border-top: 1px dashed var(--line); background: none; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.m-add:hover { background: var(--bg); }
.me-sheet { max-width: 640px; }
.grid-nr { display: grid; grid-template-columns: 90px 1fr; gap: 10px; }
.img-edit { display: flex; gap: 12px; align-items: center; }
.img-prev { width: 96px; height: 96px; border-radius: 12px; background: var(--bg) center/cover no-repeat; display: grid; place-items: center; font-size: 28px; border: 1.5px dashed var(--line); flex: none; }
.v-row, .o-row { display: grid; grid-template-columns: 1fr 110px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.o-row { grid-template-columns: 1fr 90px auto 36px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.o-row .o-sizes { grid-column: 1 / -1; }
.o-size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 6px; }
.o-size-grid label { display: grid; gap: 4px; }
.chips-edit { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-edit label { cursor: pointer; }
.chips-edit input { position: absolute; opacity: 0; pointer-events: none; }
.chips-edit span { display: inline-block; min-width: 36px; text-align: center; padding: 6px 10px; border-radius: 99px; border: 1.5px solid var(--line); font-size: 14px; }
.chips-edit input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips-edit input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
details.field summary { cursor: pointer; padding: 6px 0; }
@media (max-width: 560px) {
  .o-row { grid-template-columns: 1fr 80px auto 36px; }
  .m-row .variants { font-size: 12px; }
}
.m-row { display: flex; gap: 10px; }
.m-row .nm { flex: 1; min-width: 0; }
.m-row .nm .nr { color: var(--muted); margin-right: 6px; font-size: 13px; }
.m-row input.price { width: 84px; flex: none; }
.m-row .variants { flex: none; max-width: 45%; }

[hidden] { display: none !important; }
.m-row .nm { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .m-row { flex-wrap: wrap; row-gap: 4px; }
  .m-row .thumb.empty { display: none; }
  .m-row .variants { order: 10; flex-basis: 100%; max-width: none; text-align: left; font-size: 13px; }
  .m-row .variants br { display: none; }
  .m-row .variants br + * { margin-left: 0; }
}
.m-row .variants .vp { display: block; white-space: nowrap; }
@media (max-width: 560px) {
  .m-row .variants .vp { display: inline; white-space: normal; }
  .m-row .variants .vp + .vp::before { content: " · "; }
}
.me-del { color: var(--danger); }
.me-del-icon { display: none; }
@media (max-width: 560px) {
  .me-del-icon { display: inline; }
  .me-del-txt { display: none; }
  .me-sheet .sheet-foot .btn { padding-left: 14px; padding-right: 14px; }
}

/* Bildbibliothek im Gericht-Editor */
.lib { margin-top: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg); }
.lib-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.lib-head b { font-size: 14px; flex: none; }
.lib-head .input { flex: 1; min-width: 0; padding: 7px 10px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; }
.lib-tile { display: grid; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; text-align: center; }
.lib-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; background: var(--line); }
.lib-tile span { font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-tile.on { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.lib-none { grid-column: 1 / -1; justify-self: start; }
.banner.demo-tip { display: flex; gap: 10px; align-items: flex-start; background: #fff4e5; color: #4a2a0a; border: 1px solid #f6d3a6; }
.banner.demo-tip a { color: inherit; font-weight: 700; }
.exc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.exc-row label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.exc-row label.grow { flex: 1 1 160px; }
.exc-row input { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: var(--surface); min-width: 0; }

/* ---------- Umstieg von Lieferportalen ---------- */
.a-tabs { overflow-x: auto; scrollbar-width: none; }
.a-tabs::-webkit-scrollbar { display: none; }
.sw { display: grid; gap: 14px; max-width: 900px; margin: 0 auto; }
.sw .card { padding: 18px; }
.sw-hero { display: flex; gap: 18px; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #1c1917, #3a2a1f); color: #fff; border: 0; }
.sw-kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #f6dea6; }
.sw-hero h2 { margin: 6px 0 6px; font-size: clamp(20px, 3vw, 26px); line-height: 1.15; }
.sw-hero p { margin: 0; color: rgba(255,255,255,.75); }
.sw-ring { position: relative; width: 96px; height: 96px; flex: none; }
.sw-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sw-ring circle { fill: none; stroke-width: 7; }
.sw-ring .bg { stroke: rgba(255,255,255,.15); }
.sw-ring .fg { stroke: #f6dea6; stroke-linecap: round; transition: stroke-dashoffset .5s; }
.sw-ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.sw-ring b { font-size: 22px; line-height: 1; }
.sw-ring small { font-size: 11px; color: rgba(255,255,255,.7); margin-top: 2px; }
.sw-calc h3 { margin: 0 0 12px; }
.sw-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sw-calc-grid label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.sw-calc-grid span { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.sw-calc-grid input { max-width: 140px; }
.sw-calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.sw-calc-out div { background: var(--bg); border-radius: 12px; padding: 12px; }
.sw-calc-out small { display: block; color: var(--muted); font-size: 12px; }
.sw-calc-out b { font-size: 19px; }
.sw-calc-out .hl { background: #e9f6ee; }
.sw-calc-out .hl b { color: var(--ok); }
.sw-phase header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.sw-phase header h3 { margin: 0; }
.sw-phase header p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.sw-phase header > div { flex: 1; }
.sw-num { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.sw-phase.complete .sw-num { background: var(--ok); }
.sw-when { text-align: right; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.sw-when small { display: block; font-weight: 600; }
.sw-steps { list-style: none; margin: 0; padding: 0; }
.sw-step { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.sw-check { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); flex: none; cursor: pointer; display: grid; place-items: center; font-weight: 800; color: #fff; margin-top: 1px; }
.sw-check:hover:not(:disabled) { border-color: var(--brand); }
.sw-step.done .sw-check, .sw-exit-list li.done .sw-check { background: var(--ok); border-color: var(--ok); }
.sw-check:disabled { cursor: default; }
.sw-body { flex: 1; min-width: 0; }
.sw-body > b { font-size: 15.5px; }
.sw-step.done .sw-body > b { color: var(--muted); }
.sw-body p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.sw-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sw-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--bg); color: var(--muted); vertical-align: 2px; margin-left: 4px; }
.sw-tag.star { background: #fff1e6; color: #b45309; }
.sw-tag.ok { background: #e9f6ee; color: var(--ok); }
.sw-portals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
.sw-portal { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; align-content: start; background: var(--surface); }
.sw-portal.used { border-color: #d6d1c7; }
.sw-portal.st-cancelled { background: #fff8ee; }
.sw-portal.st-ended { background: #eef8f1; border-color: #bfe3cc; }
.sw-portal-head { display: flex; align-items: center; justify-content: space-between; }
.sw-portal label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.sw-portal-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sw-portal .input { padding: 8px 10px; }
.sw-exit-bar { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sw-exit-bar i { display: block; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.sw-exit-bar b { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .25s; }
.sw-exit-bar.big { margin: 14px 0 6px; font-size: 13px; }
.sw-exit-facts { display: grid; gap: 10px; background: var(--soft, #f4f2ee); border-radius: 14px; padding: 12px 14px; }
.sw-exit-facts small { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sw-exit-facts p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.sw-exit-list { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 2px; }
.sw-exit-list li { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.sw-exit-list li p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.sw-exit-list li.done b { text-decoration: line-through; color: var(--muted); }
.sw-guide { padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.sw-copybox { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 10px 12px; margin: 14px 0 8px; }
.sw-copybox code { flex: 1; word-break: break-all; font-size: 14px; }
.sw-tpl { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.sw-tpl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sw-tpl pre { white-space: pre-wrap; font: inherit; font-size: 14px; margin: 0; color: var(--ink); }
.sw-sheet { max-width: 720px; }
.sw-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #e9e6e0; margin-top: 12px; display: grid; place-items: center; }
.sw-preview iframe { border: 0; background: #fff; transform-origin: top center; }
.sw-preview.poster { height: 360px; } .sw-preview.poster iframe { width: 560px; height: 794px; transform: scale(.44); margin-bottom: -444px; }
.sw-preview.flyer { height: 380px; } .sw-preview.flyer iframe { width: 794px; height: 1123px; transform: scale(.33); margin-bottom: -752px; }
.sw-preview.letter { height: 400px; } .sw-preview.letter iframe { width: 794px; height: 1123px; transform: scale(.35); margin-bottom: -730px; }
.sw-note { display: flex; gap: 10px; background: #fff4e5; border: 1px solid #f6d3a6; border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
@media (max-width: 640px) {
  .sw-hero { flex-direction: column-reverse; align-items: flex-start; }
  .sw-calc-grid { grid-template-columns: 1fr; }
  .sw-calc-out { grid-template-columns: 1fr; }
  .sw-when { display: none; }
}
