:root {
  --brand: #e63b2e;
  --brand-dark: #c42e22;
  --ink: #1b1f3b;
  --muted: #6b6b70;
  --line: #e7e5e2;
  --bg: #f7f5f2;
  --card: #fff;
  --ok: #1f9d55;
  --warn: #c98a00;
  --bad: #d23b3b;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: inherit; }
h1 { font-size: 1.6rem; margin: 0 0 .75rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1rem; margin: 0 0 .4rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.logo img { height: 36px; width: auto; display: block; }
#brand:empty { display: none; }
#brand { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .15rem .45rem; border-radius: 6px; background: var(--brand); color: #fff; }
@media (max-width: 600px) { .logo img { height: 28px; } }
#nav { display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap; align-items: center; }
#nav a { text-decoration: none; padding: .45rem .75rem; border-radius: 999px; font-size: .92rem; }
#nav a:hover { background: var(--bg); }
#nav a.active { background: var(--ink); color: #fff; }
.cart-badge { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 .45rem; margin-left: .3rem; font-size: .78rem; }

main { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.loader { padding: 3rem; text-align: center; color: var(--muted); }

/* Elemente */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.stack > * + * { margin-top: .75rem; }
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

button, .btn { font: inherit; border: 0; border-radius: 10px; padding: .6rem 1rem; cursor: pointer;
  background: var(--brand); color: #fff; font-weight: 600; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: var(--brand-dark); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary, .btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.secondary:hover { background: var(--bg); }
button.danger { background: var(--bad); }
button.ok { background: var(--ok); }
button.small { padding: .35rem .65rem; font-size: .85rem; }
button.icon { padding: .2rem .6rem; background: var(--bg); color: var(--ink); border: 1px solid var(--line); }

input, select, textarea { font: inherit; width: 100%; padding: .6rem .7rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.field { margin-bottom: .8rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 .8rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.check input { width: auto; }

/* Hero */
.hero { background: linear-gradient(120deg, var(--brand), #ff9a3c); color: #fff; border-radius: 22px;
  padding: 2.2rem 1.6rem; margin-bottom: 1.5rem; }
.hero h1 { font-size: 2rem; }
.hero form { display: flex; gap: .5rem; max-width: 420px; margin-top: 1rem; }
.hero input { border: 0; }
.hero button { background: var(--ink); }

/* Restaurantkarte */
.rest { overflow: hidden; padding: 0; text-decoration: none; display: block; transition: transform .12s; }
.rest:hover { transform: translateY(-2px); }
.rest-img { height: 130px; background: #ffd9bd center/cover; display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; font-weight: 800; color: rgba(0,0,0,.18); }
.rest-body { padding: .9rem 1rem; }
.rest.closed { opacity: .6; }
.pill { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; background: var(--bg); border: 1px solid var(--line); }
.pill.ok { background: #e6f6ec; border-color: #bfe6cd; color: var(--ok); }
.pill.warn { background: #fff5dc; border-color: #f2dc9b; color: #8a5f00; }
.pill.bad { background: #fde8e8; border-color: #f4c2c2; color: var(--bad); }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin: .75rem 0 1rem; }
.chips button { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; font-weight: 500; }
.chips button.on { background: var(--ink); color: #fff; }

/* Speisekarte */
.menu-item { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: 0; }
.cart { position: sticky; top: 80px; }
.cart-line { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: .35rem 0; }
.sum { display: flex; justify-content: space-between; padding: .2rem 0; }
.sum.total { font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .6rem; }

/* Status-Tracker */
.steps { display: flex; gap: .4rem; margin: 1rem 0; }
.steps div { flex: 1; text-align: center; font-size: .8rem; color: var(--muted); }
.steps div::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: .4rem; }
.steps div.done { color: var(--ink); font-weight: 600; }
.steps div.done::before { background: var(--brand); }

/* Tabellen */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table-wrap { overflow-x: auto; }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { background: none; color: var(--muted); border-radius: 0; border-bottom: 3px solid transparent; padding: .6rem .9rem; }
.tabs button.on { color: var(--ink); border-color: var(--brand); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.kpi .v { font-size: 1.5rem; font-weight: 800; }
.kpi .l { font-size: .8rem; color: var(--muted); }

.order-card { border-left: 5px solid var(--line); }
.order-card.s-placed { border-left-color: var(--bad); animation: pulse 1.6s infinite; }
.order-card.s-accepted, .order-card.s-preparing { border-left-color: var(--warn); }
.order-card.s-ready, .order-card.s-picked_up { border-left-color: var(--ok); }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(210,59,59,.15); } }

.stars button { background: none; color: #d0cdc8; font-size: 1.8rem; padding: 0 .1rem; }
.stars button.on { color: #f5a623; }

#toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 50; }
#toast div { background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 10px; margin-top: .5rem; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
#toast div.err { background: var(--bad); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }

/* Kontotyp-Auswahl bei der Registrierung */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.choice label { margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: block; border: 2px solid var(--line); border-radius: 12px; padding: .75rem; height: 100%; font-weight: 500; }
.choice span strong { display: block; }
.choice span small { color: var(--muted); }
.choice input:checked + span { border-color: var(--brand); background: #fff4ec; }
.choice input:focus-visible + span { outline: 2px solid var(--brand); }
.restfields { border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem .2rem; margin: 0 0 .9rem; }
.restfields legend { font-weight: 700; padding: 0 .3rem; }

/* Gewerbeanmeldung */
.doc-previews { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.doc-previews img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.doc-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.doc-gallery figure { margin: 0; }
.doc-gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; background: #fff; }
.doc-gallery figcaption { font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.doc-gallery .missing { height: 160px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .8rem; }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
.modal-box { background: #fff; border-radius: 16px; padding: 1.1rem; width: min(900px, 100%); }
.modal-body { margin-top: .8rem; }

/* Admin-Seite (admin.…) */
.admin-mode .topbar { background: #1d1d1f; border-bottom-color: #1d1d1f; color: #fff; }
.admin-mode .topbar .logo { color: #fff; }
.admin-mode #nav a { color: #fff; }
.admin-mode #nav a:hover { background: #333; }
.admin-mode #nav .pill { background: #333; border-color: #444; color: #fff; }
.admin-mode .nav-user { color: #bbb; margin: 0 .4rem; }
.admin-mode main { max-width: 1280px; }

/* Kategorien */
.catpick { display: flex; flex-wrap: wrap; gap: .35rem; }
.catpick label { margin: 0; cursor: pointer; font-weight: 500; }
.catpick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.catpick span { display: inline-block; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .9rem; }
.catpick input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.catpick input:focus-visible + span { outline: 2px solid var(--brand); }
.chips button { white-space: nowrap; }
@media (max-width: 700px) { .chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .3rem; } }
.chip-n { opacity: .55; font-size: .8em; margin-left: .15rem; }

/* Ablehnungs-/Sperrgrund */
.reason-box { border: 1px solid #f4c2c2; background: #fdf0f0; color: #7a1f1f; border-radius: 12px; padding: .8rem 1rem; margin-bottom: .8rem; }
.reason { color: var(--bad); max-width: 260px; }

/* Fahrer-App: Adressen antippen -> Google Maps */
.maplink { display: block; margin-top: .3rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: inherit; background: #fff; line-height: 1.35; }
.maplink span { display: block; color: var(--brand); font-weight: 600; margin-top: .15rem; }
.maplink:hover, .maplink:active { border-color: var(--brand); }
.maplink.go { border-color: var(--brand); background: #fff5ec; font-weight: 600; }

/* Notizen pro Artikel + Lieferanweisung */
.item-note { font-size: .82rem; color: var(--muted); margin: .1rem 0 0 .1rem; }
.item-note.kitchen { color: #8a5a00; background: #fff6df; border-radius: 6px; padding: .15rem .45rem; display: inline-block; font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; margin: .1rem 0 0; color: var(--brand); font-size: .8rem; font-weight: 600; cursor: pointer; display: block; }
.linkbtn:hover { text-decoration: underline; background: none; }
.instr { margin-top: .4rem; padding: .45rem .6rem; border-radius: 8px; background: #fff6df; border: 1px solid #f2dc9b; font-size: .9rem; }

/* Kfz-Kennzeichen */
.plate { display: inline-block; font-family: "DIN 1451", Arial, sans-serif; font-weight: 700; letter-spacing: .05em; font-size: .85rem;
  padding: .05rem .45rem .05rem .9rem; border: 2px solid #1b1f3b; border-radius: 4px; background: #fff linear-gradient(90deg, #1d4ed8 0 .55rem, #fff .55rem); color: #1b1f3b; white-space: nowrap; }

/* Auswahl-Kategorien */
.item-opts { font-size: .82rem; color: var(--ink); opacity: .8; margin: .05rem 0 0 .1rem; }
.optgroup { border: 1px solid var(--line); border-radius: 10px; padding: .6rem; margin-bottom: .6rem; background: #fcfbfa; }
.optgroup .optchoice { margin-top: .35rem; }
.optpick { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .8rem; margin: 0 0 .6rem; }
.optpick legend { font-weight: 700; padding: 0 .3rem; }
.optpick label { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; font-weight: 500; cursor: pointer; }
.optpick input { width: auto; }

/* Restaurant-Profil */
.rest-profile { padding: 0; overflow: hidden; }
.rest-cover { height: 180px; background: linear-gradient(135deg, var(--brand), #ff9a5a) center/cover no-repeat; position: relative; }
.rest-logo { position: absolute; left: 1rem; bottom: -36px; width: 80px; height: 80px; border-radius: 16px; object-fit: cover; background: #fff; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.rest-logo-txt { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: var(--brand); }
.rest-profile-body { padding: 2.6rem 1.1rem 1rem; }
.hours { margin-top: .3rem; border-collapse: collapse; } .hours td { padding: .1rem .8rem .1rem 0; } .hours tr.today { font-weight: 700; }
.rest-img { position: relative; }
.rest-offer { position: absolute; top: .5rem; left: .5rem; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
.rest-card-logo { position: absolute; right: .6rem; bottom: -18px; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #fff; border: 2px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.15); }
.offer { display: flex; gap: .8rem; align-items: center; padding: .6rem; border: 1px solid #f6c9c4; background: #fff5f4; border-radius: 12px; margin-bottom: .5rem; }
.offer.later { opacity: .65; background: #fafafa; border-color: var(--line); }
.offer-badge { min-width: 62px; text-align: center; font-weight: 800; color: #fff; background: var(--brand); border-radius: 10px; padding: .45rem .3rem; }
.offer.later .offer-badge { background: #9a9aa0; }
.media-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.media-box { border: 1px dashed var(--line); border-radius: 12px; padding: .6rem; width: 220px; }
.media-box img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: .4rem; background: #f3f2f0; }

/* Ränge & Rechte */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; margin-top: .8rem; }
.perm-group { border: 1px solid var(--line, #e7e5e2); border-radius: 10px; padding: .6rem .7rem; }
label.perm { display: flex; align-items: center; gap: .45rem; font-weight: 400; margin: .2rem 0; cursor: pointer; }
label.perm input { width: auto; margin: 0; }
label.perm.perm-cat { font-weight: 700; }
label.perm.perm-right { padding-left: 1.4rem; font-size: .92rem; }

/* Support-Chat */
#chatFab { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; padding: 0;
  font-size: 1.6rem; line-height: 1; box-shadow: 0 8px 24px rgba(0,0,0,.22); display: grid; place-items: center; }
#chatFab.on { background: #1b1f3b; }
#chatFab .chat-dot { position: absolute; top: 6px; right: 6px; width: 14px; height: 14px; border-radius: 50%; background: #22a35a; border: 2px solid #fff; }
#chatPanel { position: fixed; right: 18px; bottom: 88px; z-index: 60; width: min(380px, calc(100vw - 24px)); height: min(580px, calc(100vh - 120px));
  background: #fff; border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
#chatPanel[hidden] { display: none; }
#chatPanel header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .75rem 1rem; background: var(--brand, #e63b2e); color: #fff; }
#chatPanel header .small { opacity: .9; }
#chatPanel header .icon { background: transparent; color: #fff; border: 0; font-size: 1.1rem; padding: .2rem .4rem; }
#chatPanel .cbody { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .45rem; background: #f7f6f4; }
.cmsg { max-width: 85%; padding: .5rem .7rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: .93rem; line-height: 1.4; align-self: flex-start; overflow-wrap: anywhere; }
.cmsg.me { align-self: flex-end; background: #1b1f3b; color: #fff; border-color: #1b1f3b; }
.cmsg.staff { background: #eaf7ee; border-color: #b9e3c6; }
.cmsg.sys { align-self: center; background: transparent; border: 0; color: var(--muted, #6b6b70); font-size: .8rem; text-align: center; max-width: 95%; }
.cmsg .ctime { font-size: .7rem; opacity: .6; margin-top: .15rem; text-align: right; }
.cmsg .cwho { font-size: .75rem; font-weight: 700; color: #1d5b31; margin-bottom: .15rem; }
.cquick { margin: .2rem 0 0; }
.cquick .chip { font-size: .82rem; }
.cmsg.typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: #999; animation: cdot 1s infinite; }
.cmsg.typing span:nth-child(2) { animation-delay: .15s; } .cmsg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cdot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
#cform { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--line); }
#cform textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; }
#cform button { padding: 0 .9rem; }
#chatPanel footer { display: flex; justify-content: space-between; gap: .5rem; padding: 0 .8rem .55rem; font-size: .8rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand, #e63b2e); font-weight: 600; font-size: .8rem; cursor: pointer; }
/* Admin: Support */
.sup-wrap { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 1rem; align-items: start; }
@media (max-width: 860px) { .sup-wrap { grid-template-columns: 1fr; } }
.sup-list { max-height: 70vh; overflow-y: auto; padding: .3rem; }
.sup-item { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; margin-bottom: .4rem; color: inherit; font-weight: 400; }
.sup-item.on { border-color: var(--brand, #e63b2e); box-shadow: 0 0 0 2px rgba(230,59,46,.15); }
.sup-item.unread { border-left: 4px solid #22a35a; }
.sup-thread { display: flex; flex-direction: column; gap: .45rem; max-height: 55vh; overflow-y: auto; padding: .8rem; background: #f7f6f4; border-radius: 10px; }
.sup-thread .cmsg.me { align-self: flex-start; background: #fff; color: inherit; border-color: var(--line); }
.sup-thread .cmsg.bot { background: #f0f0ff; border-color: #d8d8f5; }
.sup-thread .cmsg.staff { align-self: flex-end; }
button.sup-item, button.sup-item:hover, button.sup-item.on { background: #fff; color: inherit; }
button.sup-item.on { background: #fff6f5; }
.cmsg.note { align-self: stretch; max-width: 100%; background: #fff8e1; border-color: #f3d98b; }
textarea.note-input { background: #fffdf3; border-color: #f3d98b; }
.tab-badge { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; line-height: 1.3em; text-align: center; vertical-align: 1px; }
.cmsg.staff.mail { background: #eef4ff; border-color: #c7d8f5; }

/* Allergene, 18+, Bestellarten */
.allergen-line { font-size: .78rem; color: var(--muted); margin-top: .15rem; cursor: help; }
.pill.age { background: #fde8e7; color: #a12b22; border-color: #f3b9b4; font-weight: 700; }
.pill.pickup { background: #eef4ff; color: #2a4c8f; border-color: #c7d8f5; }
.pill.sched { background: #fff5e0; color: #8a5a00; border-color: #f3d98b; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .1rem .6rem; }
.check-grid .check { margin: .1rem 0; font-size: .88rem; }
.allergen-edit summary, .allergen-filter summary { cursor: pointer; }
.allergen-filter .chips button { font-size: .8rem; }
.allergen-filter .chips button.on { background: var(--bad, #c0392b); color: #fff; border-color: transparent; text-decoration: line-through; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; border-radius: 0; background: #fff; color: var(--ink); font-weight: 600; padding: .55rem .9rem; }
.seg button.on { background: var(--ink); color: #fff; }
.age-confirm { background: #fff5f4; border: 1px solid #f3b9b4; border-radius: 10px; padding: .6rem .7rem; margin-top: .8rem; }

/* Rechtstexte & Fußzeile */
.legal { max-width: 820px; margin: 0 auto; line-height: 1.6; }
.legal h2 { margin: 1.6rem 0 .4rem; font-size: 1.2rem; }
.legal h3 { margin: 1.2rem 0 .3rem; }
.legal mark { background: #fff1b8; padding: 0 .2em; border-radius: 3px; }
.site-footer { max-width: 1100px; margin: 2rem auto 0; padding: 1.2rem 1.25rem 6rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; font-size: .9rem; }
.site-footer a { color: var(--muted); margin-right: 1rem; text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Öffnungszeiten-Editor */
.hours-editor { display: grid; gap: .35rem; }
.hday { display: grid; grid-template-columns: 70px 1fr auto; gap: .5rem; align-items: center; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.hday-l { margin: 0; }
.hranges { display: flex; flex-wrap: wrap; gap: .4rem .8rem; }
.hrange { display: inline-flex; align-items: center; gap: .25rem; }
.hrange .tsel { width: auto; padding: .3rem .35rem; }
.open-info { margin: -.6rem 0 1rem; text-align: right; }
@media (max-width: 600px) { .hday { grid-template-columns: 60px 1fr; } .hbtns { grid-column: 2; } .open-info { text-align: left; } }

/* Öffnungsstatus & Eckdaten der Restaurants */
.open-line { font-size: .85rem; font-weight: 600; margin-top: .35rem; }
.open-line.is-open { color: var(--ok, #1f9d55); }
.open-line.is-closed { color: var(--bad); }
.rest-facts { display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .82rem; margin-top: .35rem; color: var(--ink); }
.rest-facts.big { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; margin: .7rem 0 .5rem; }
.rest-facts.big > div { background: #f7f6f4; border-radius: 10px; padding: .5rem .7rem; display: flex; flex-direction: column; }
.rest-facts.big span { font-size: .75rem; color: var(--muted); }
.rest-facts.big strong { font-size: .98rem; }
.imprint p { line-height: 1.5; }

/* Verträge zur Zustimmung */
.contract-gate { max-width: 820px; margin: 1.5rem auto; }
.contract-doc { border: 1px solid var(--line, #e7e5e2); border-radius: 10px; padding: .6rem .9rem; margin: .8rem 0 .4rem; background: #fff; }
.contract-doc summary { cursor: pointer; }
.contract-body { max-height: 420px; overflow: auto; border-top: 1px solid var(--line, #e7e5e2); margin-top: .6rem; padding-top: .4rem; font-size: .92rem; }
.contract-check { margin: .2rem 0 .4rem; }
@media print { .contract-gate button, .site-footer, header, nav { display: none !important; } }
.md-ln { display: block; }
.md-sub { padding-left: 2.2em; text-indent: -.8em; }

/* Speisekarten-Import */
.mi-table { max-height: 58vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.mi-table td { vertical-align: top; }
.mi-table input:not([type=checkbox]) { padding: .35rem .5rem; font-size: .9rem; }
.mi-table tr.mi-off { opacity: .5; }
.danger-text { color: var(--bad); border-color: #f3c2bd; }

/* Push-Hinweis */
.push-hint { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: .55rem .8rem; margin: 0 0 .8rem; font-size: .9rem; }
.push-hint span { flex: 1 1 220px; }

/* Fotos bei Gerichten */
.menu-item.has-img { justify-content: flex-start; align-items: flex-start; }
.menu-item .dish-text { flex: 1; min-width: 0; }
.dish-img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex-shrink: 0; background: #f2efea; }
.dish-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #f2efea; }
.dish-thumb.sm { width: 40px; height: 40px; border-radius: 8px; float: left; margin: 0 .6rem .3rem 0; }
@media (max-width: 520px) { .dish-img { width: 76px; height: 76px; } }

/* Viel los / Pause, Ausverkauft-Liste, Bewertungen */
.busy-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: #fff1ec; border: 1px solid #f7c3b4; border-radius: 12px; padding: .5rem .8rem; margin: -.3rem 0 .8rem; font-size: .92rem; }
.busy-bar span { flex: 1 1 240px; }
.busy-bar.paused { background: #f2f1ff; border-color: #c9c5f5; }
.avail-row { display: flex; padding: .35rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.avail-row.is-off { color: var(--muted); }
.review-row { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.reply-form textarea { margin-top: .4rem; }
.review-reply { margin: .4rem 0 0 .8rem; padding: .4rem .7rem; border-left: 3px solid var(--brand); background: #fbf8f4; border-radius: 0 8px 8px 0; font-size: .92rem; }
.tip-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.tip-row button { min-width: 64px; }
.tip-row button.on { background: var(--ink); color: #fff; }
.zone-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: .5rem; align-items: end; margin-bottom: .4rem; }
@media (max-width: 520px) { .zone-row { grid-template-columns: 1fr 1fr; } .zone-row .field:first-child { grid-column: 1 / -1; } .zone-row [data-zonedel] { grid-column: 1 / -1; justify-self: end; } }
.preview-bar { position: sticky; top: .5rem; z-index: 20; display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #fff6db; border: 1px solid #f2d27a; border-radius: 12px; padding: .6rem .8rem; margin-bottom: 1rem; font-size: .92rem; box-shadow: 0 4px 14px rgba(0,0,0,.06); }

/* ---------- Kasse ---------- */
.pos-top { gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.pos-area { margin: 1rem 0 .5rem; font-size: 1rem; color: var(--muted); }
.pos-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.pos-table { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 96px; padding: .6rem;
  background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: var(--radius); }
.pos-table .n { font-size: 1.45rem; font-weight: 800; } .pos-table .s { font-weight: 700; } .pos-table .m { font-size: .78rem; color: var(--muted); }
.pos-table.busy { border-color: var(--brand); background: #fff1ef; } .pos-table.add { border-style: dashed; }
.pos-table:hover { border-color: var(--brand); }
.pos-main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 1rem; align-items: start; }
.pos-cats { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .5rem; }
.pos-cats button { white-space: nowrap; background: var(--card); color: var(--ink); border: 1px solid var(--line); padding: .45rem .8rem; }
.pos-cats button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.pos-item { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; min-height: 78px; padding: .6rem .7rem;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; font-weight: 600; }
.pos-item .p { color: var(--brand); font-weight: 800; margin-top: .3rem; } .pos-item:active { transform: scale(.97); } .pos-item.off { opacity: .45; }
.pos-ticket { position: sticky; top: .8rem; }
.pos-lines { margin: .6rem 0; max-height: 52vh; overflow-y: auto; border-top: 1px solid var(--line); }
.pos-line { display: grid; grid-template-columns: auto 1fr auto auto; gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.pos-line .q { font-weight: 800; display: flex; align-items: center; gap: .3rem; } .pos-line .p { font-weight: 700; white-space: nowrap; }
.pos-line.draft { background: #fffaf0; } .pos-newhead { padding: .4rem 0 .1rem; color: #8a5f00; font-weight: 700; }
.pos-split .pos-line { grid-template-columns: 1fr auto; }
.pos-total { font-size: 1.35rem; font-weight: 800; padding: .3rem 0 .6rem; }
.pos-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; } .pos-actions button { padding: .8rem .6rem; }
.pos-actions [data-psend], .pos-actions [data-ppay] { font-size: 1.05rem; }
.pos-pay .pos-big { font-size: 2.2rem; font-weight: 900; text-align: center; margin: .3rem 0 .8rem; }
.pos-method { gap: .5rem; margin-bottom: .8rem; } .pos-method button { flex: 1; padding: .9rem; font-size: 1.05rem; }
.pos-change { font-size: 1.25rem; margin: .7rem 0; }
@media (max-width: 860px) { .pos-main { grid-template-columns: 1fr; } .pos-ticket { position: static; } .pos-lines { max-height: none; } }
.grid2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.pos-pay .c { text-align: center; }
.pt-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.pos-item:hover { background: #fff1ef; border-color: var(--brand); color: var(--ink); }
.pos-table:hover { background: #fff1ef; color: var(--ink); }
.kasse-mode .topbar { background: #1b1f3b; border-bottom-color: #1b1f3b; }
.kasse-mode #nav a:hover { background: #2c3159; }
.kasse-mode main { max-width: 1400px; }
