/* ==========================================================
   Surpreis Pay – Design
   Schlicht, schwarz/weiss, Systemschrift, weiche Materialien.
   ========================================================== */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --fill: rgba(118, 118, 128, .12);      /* iOS-Füllfarbe */
  --fill-2: rgba(118, 118, 128, .08);
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #86868b;
  --hairline: rgba(0, 0, 0, .09);

  --brand: #00c6a7;                      /* Surpreis Türkis aus dem Logo */
  --brand-ink: #00806b;
  --brand-soft: rgba(0, 198, 167, .12);
  --black: #000;

  --orange: #ff9500;
  --green: #34c759;
  --red: #ff3b30;
  --gray: #8e8e93;

  --s-zubereitung: var(--orange);
  --s-abholbereit: var(--green);
  --s-fertig: var(--gray);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --shadow-1: 0 1px 3px rgba(0, 0, 0, .04), 0 1px 1px rgba(0, 0, 0, .03);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, .08);
  --shadow-3: 0 30px 80px rgba(0, 0, 0, .25);
  --header-h: 56px;
  --ease: cubic-bezier(.25, .1, .25, 1);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.4; }

/* ---------- Kopfzeile (Glas-Material) ---------- */
header {
  height: var(--header-h); display: flex; align-items: center; gap: 14px; padding: 0 20px;
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 19px; letter-spacing: -.02em; }
.brand .logo { width: 30px; height: 30px; display: block; }
.brand .word { font-weight: 600; }
.brand .word span { font-weight: 400; }
.page-title { color: var(--muted); font-size: 14px; padding-left: 14px; border-left: 1px solid var(--hairline); }
/* Segmented Control */
header nav { margin-left: auto; display: flex; background: var(--fill); padding: 2px; border-radius: 9px; }
header nav a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; padding: 5px 14px; border-radius: 7px; transition: background .2s var(--ease), box-shadow .2s var(--ease); }
header nav a.active { background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); font-weight: 600; }
header label { color: var(--ink-2) !important; display: flex; align-items: center; gap: 6px; font-size: 13px !important; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(255, 149, 0, .14); color: #c26a00; }

/* ---------- Buttons & Eingaben ---------- */
button {
  font: inherit; font-weight: 500; letter-spacing: -.01em; cursor: pointer; color: var(--ink);
  background: var(--fill-2); border: none; border-radius: var(--r-sm); padding: 10px 16px;
  transition: background .15s var(--ease), transform .12s var(--ease), opacity .15s;
}
button:hover:not(:disabled) { background: var(--fill); }
button:active:not(:disabled) { transform: scale(.96); }
button:focus-visible { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; }
button.primary { background: var(--black); color: #fff; font-weight: 600; }
button.primary:hover:not(:disabled) { background: #2c2c2e; }
button.danger { color: var(--red); }
button.danger:hover:not(:disabled) { background: rgba(255, 59, 48, .1); }
button:disabled { opacity: .3; cursor: default; }

input, textarea { font: inherit; color: var(--ink); letter-spacing: -.01em; }
input:not([type=checkbox]), textarea {
  border: none; border-radius: var(--r-sm); background: var(--fill-2); padding: 10px 12px;
  transition: background .15s, box-shadow .15s;
}
input:not([type=checkbox]):focus, textarea:focus { outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(0, 113, 227, .35); }
input::placeholder, textarea::placeholder { color: #a1a1a6; }

/* ---------- Kasse ---------- */
.pos { display: grid; grid-template-columns: 1fr 390px; height: calc(100vh - var(--header-h)); }
.catalog { padding: 24px 28px 48px; overflow: auto; }
.catalog h2 { font-size: 22px; font-weight: 700; letter-spacing: -.025em; margin: 30px 0 12px; }
.catalog h2:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.product {
  position: relative; text-align: left; padding: 18px; min-height: 112px; border-radius: 18px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  background: var(--surface); box-shadow: var(--shadow-1);
}
.product:hover:not(:disabled) { background: var(--surface); box-shadow: var(--shadow-2); }
.product strong { font-size: 17px; font-weight: 600; letter-spacing: -.02em; padding-right: 30px; }
.product span { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.product span small { font-size: 12px; margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: var(--fill-2); }
.product.in-cart { box-shadow: 0 0 0 2.5px var(--ink), var(--shadow-1); }
.product .qty-badge {
  position: absolute; top: 12px; right: 12px; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px;
  background: var(--ink); color: #fff; font-style: normal; font-weight: 600; font-size: 14px; display: grid; place-items: center;
  font-variant-numeric: tabular-nums; animation: pop .25s var(--ease);
}

.cart { background: var(--surface); border-left: .5px solid var(--hairline); display: flex; flex-direction: column; padding: 22px 20px 20px; min-height: 0; }
.cart-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cart-title span:first-child { font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.cart-title span:last-child { color: var(--muted); font-size: 14px; }
.cart-items { flex: 1; overflow: auto; min-height: 60px; }
.line { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: .5px solid var(--hairline); }
.line .name { flex: 1; font-weight: 500; }
.line .qty { display: inline-flex; align-items: center; background: var(--fill-2); border-radius: 99px; font-weight: 600; font-variant-numeric: tabular-nums; }
.line .qty button { background: transparent; width: 30px; height: 30px; border-radius: 99px; }
.line .qty b { min-width: 18px; text-align: center; font-weight: 600; }
.line .sum { width: 66px; text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 40px 10px; text-align: center; font-size: 15px; margin: 0; }
.empty::before { content: ''; display: block; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; background: var(--fill-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%2386868b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M6 7h12l-1 13H7L6 7Z'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0'/%3E%3C/svg%3E") center no-repeat; }
textarea { width: 100%; resize: none; margin: 12px 0 4px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 14px; font-variant-numeric: tabular-nums; }
.total span:first-child { color: var(--muted); font-size: 15px; }
.total span:last-child { font-size: 32px; font-weight: 700; letter-spacing: -.03em; }
.pay { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.pay button { padding: 13px 6px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 12px; font-size: 14px; }
.pay button svg { width: 22px; height: 22px; }

/* ---------- Dialoge (Sheets) ---------- */
dialog { border: none; border-radius: 26px; padding: 28px; width: min(420px, 92vw); box-shadow: var(--shadow-3); color: var(--ink); text-align: center; }
dialog[open] { animation: sheet .35s cubic-bezier(.2, .9, .3, 1.1); }
dialog::backdrop { background: rgba(0, 0, 0, .3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
dialog h3 { margin: 0 0 2px; font-size: 15px; font-weight: 500; color: var(--muted); }
dialog p { color: var(--ink-2); }
dialog .big { font-size: 46px; font-weight: 700; letter-spacing: -.035em; margin: 2px 0 20px; font-variant-numeric: tabular-nums; }
dialog .actions { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 22px; }
dialog .actions button { width: 100%; padding: 14px; border-radius: 14px; font-size: 16px; }
dialog:not(.sheet) label { font-size: 13px; color: var(--muted); display: block; text-align: left; }
dialog:not(.sheet) input { font-size: 24px !important; width: 100%; margin-top: 6px; font-weight: 600; text-align: center; }
.quick { display: flex; gap: 6px; margin-top: 10px; justify-content: center; flex-wrap: wrap; }
.quick button { border-radius: 99px; padding: 7px 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.change { margin-top: 14px; font-size: 17px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); }
.change:empty { display: none; }

/* Kartenzahlung: Kontaktlos-Puls und Häkchen */
.tap { position: relative; width: 96px; height: 96px; margin: 4px auto 12px; display: grid; place-items: center; }
.tap::before, .tap::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: ripple 2s var(--ease) infinite; }
.tap::after { animation-delay: 1s; }
.tap svg { width: 46px; height: 46px; color: var(--ink); }
@keyframes ripple { 0% { transform: scale(.55); opacity: .7; } 100% { transform: scale(1.15); opacity: 0; } }
.done { width: 96px; height: 96px; margin: 4px auto 12px; }
.done circle { stroke: var(--brand); stroke-width: 3; fill: none; stroke-dasharray: 290; stroke-dashoffset: 290; animation: draw .5s var(--ease) forwards; }
.done path { stroke: var(--brand); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .35s .4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.spinner { display: none; }

@keyframes sheet { from { transform: translateY(24px) scale(.96); opacity: 0; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }

.toast {
  position: fixed; top: 14px; left: 50%; transform: translate(-50%, -20px) scale(.95); z-index: 100;
  background: rgba(29, 29, 31, .9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff;
  padding: 12px 20px; border-radius: 99px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .4s cubic-bezier(.2, .9, .3, 1.2); box-shadow: var(--shadow-2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- Pager-Auswahl ---------- */
.pager-box { border-top: .5px solid var(--hairline); padding-top: 14px; margin-top: 6px; }
.pager-head { font-weight: 600; margin-bottom: 10px; font-size: 15px; }
.pager-head .need { color: var(--orange); font-weight: 500; }
.pagers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-height: 172px; overflow: auto; padding: 2px; }
.pagers button { padding: 10px 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pagers button.sel { background: var(--ink); color: #fff; }
.pagers button:disabled { text-decoration: line-through; opacity: .25; }
small.direct { font-size: 11px; font-weight: 500; color: var(--muted); background: var(--fill-2); padding: 2px 8px; border-radius: 99px; margin-left: 6px; }

/* ---------- Board ---------- */
.board { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.2fr) minmax(250px, .85fr); gap: 18px; padding: 20px; height: calc(100vh - var(--header-h)); }
.col { background: rgba(0, 0, 0, .035); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 0; transition: background .2s; }
.col h2 { font-size: 20px; font-weight: 700; letter-spacing: -.025em; margin: 0; padding: 18px 18px 12px; display: flex; align-items: center; gap: 9px; }
.col h2 .dot { width: 9px; height: 9px; border-radius: 50%; }
.col h2 .count { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 17px; font-variant-numeric: tabular-nums; }
.col .list { flex: 1; overflow: auto; padding: 2px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.col.drop { background: var(--brand-soft); }
.col.drop .list { outline: 2px dashed var(--brand); outline-offset: -4px; border-radius: var(--r); }
.order { background: var(--surface); border-radius: 18px; padding: 16px; cursor: grab; box-shadow: var(--shadow-1); animation: rise .3s var(--ease); }
.order:active { cursor: grabbing; }
.order .top { display: flex; align-items: center; gap: 10px; }
.order .nr { font-size: 24px; font-weight: 700; }
.order .pager { font-size: 11px; font-weight: 600; background: var(--c); color: #fff; border-radius: 12px; padding: 5px 11px; display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .04em; }
.order .pager b { font-size: 24px; letter-spacing: -.02em; }
.order .nr-small { color: var(--muted); font-size: 14px; }
.order .meta { color: var(--muted); font-size: 13px; margin-left: auto; text-align: right; line-height: 1.45; font-variant-numeric: tabular-nums; }
.order ul { margin: 14px 0; padding: 0; list-style: none; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.order li { padding: 3px 0; }
.order li b { display: inline-block; min-width: 34px; font-weight: 700; }
.order .note { background: rgba(255, 149, 0, .12); color: #9a5200; padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.order .btns { display: flex; gap: 6px; }
.order .btns button { flex: 1; padding: 11px; border-radius: 12px; }
.order .btns button[title] { flex: 0 0 48px; }
/* Lange Wartezeit (Minuten in den Einstellungen): roter Rahmen innen, damit er nie abgeschnitten wird */
.order.old { box-shadow: inset 0 0 0 2px var(--red), var(--shadow-1); }
.order.old .meta .age { color: var(--red); font-weight: 600; }


/* ---------- Einstellungen (wie Systemeinstellungen) ---------- */
:root { --tint: var(--ink); }
.prefs { display: grid; grid-template-columns: 250px 1fr; height: calc(100vh - var(--header-h)); }
.sidebar { border-right: .5px solid var(--hairline); background: rgba(236, 236, 240, .55); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 9px; background: transparent; font-size: 15px; font-weight: 500; text-align: left; }
.side-item:hover:not(:disabled) { background: rgba(0, 0, 0, .05); }
.side-item:active:not(:disabled) { transform: none; }
.side-item.active, .side-item.active:hover { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 1px rgba(0,0,0,.04); }
.side-icon { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--ink) !important; }
.side-icon svg { width: 16px; height: 16px; }
.side-count { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.side-item.active .side-count { color: var(--muted); }
.pane { overflow: auto; padding: 30px 32px 80px; }
.pane-inner { max-width: 700px; margin: 0 auto; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pane-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -.035em; margin: 0; }
.pane-sub { color: var(--muted); margin: 4px 0 22px; font-size: 15px; }
button.add { width: 34px; height: 34px; border-radius: 50%; padding: 0; background: var(--ink); color: #fff; font-size: 24px; font-weight: 400; line-height: 1; display: grid; place-items: center; }
button.add:hover:not(:disabled) { background: #2c2c2e; }
.search input { width: 100%; padding: 9px 12px 9px 34px; border-radius: 10px; font-size: 16px; background: var(--fill-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238e8e93' stroke-width='2.2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 11px center no-repeat; }
.search input:focus { background-color: var(--fill-2); box-shadow: none; }
.group-title { font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--muted); margin: 26px 16px 7px; letter-spacing: 0; }
.group { background: var(--surface); border-radius: 12px; overflow: hidden; }
.group + .group, .group-foot + .group, .group-foot + .danger-row, .group + .danger-row { margin-top: 26px; }
.group-foot { font-size: 13px; color: var(--muted); margin: 8px 16px 0; line-height: 1.45; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px; position: relative; cursor: pointer; background: var(--surface); transition: background .15s; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 44px; right: 0; height: .5px; background: var(--hairline); }
.row:hover { background: #fafafa; }
.row:active { background: #ebebed; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; font-weight: 500; letter-spacing: -.015em; display: flex; align-items: center; gap: 8px; }
.row-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }
.tag-k { color: var(--orange); }
.row-value { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chev { width: 8px; height: 14px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='14' fill='none' stroke='%23c4c4c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 8 14'%3E%3Cpath d='m1 1 6 6-6 6'/%3E%3C/svg%3E") center no-repeat; }
.grip { width: 16px; height: 16px; flex: none; cursor: grab; opacity: .35; transition: opacity .15s; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 16 16'%3E%3Cpath d='M2 5h12M2 8h12M2 11h12'/%3E%3C/svg%3E") center no-repeat; }
.row:hover .grip { opacity: 1; }
.row.dragging { opacity: .35; }
.row.drop-before { box-shadow: inset 0 2.5px 0 var(--tint); }
.empty-row { padding: 16px; color: var(--muted); font-size: 15px; }
.empty-row.drop-into { background: var(--fill-2); color: var(--ink); }
.pill-off { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--fill-2); color: var(--muted); letter-spacing: 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--surface); border-radius: 14px; padding: 14px 16px; }
.stat b { font-size: 30px; font-weight: 700; letter-spacing: -.035em; display: block; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.pager-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.ptile { background: var(--surface); border-radius: 14px; padding: 14px 6px 11px; display: flex; flex-direction: column; align-items: center; gap: 3px; box-shadow: var(--shadow-1); }
.ptile:hover:not(:disabled) { background: var(--surface); box-shadow: var(--shadow-2); }
.ptile b { font-size: 28px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.ptile span { font-size: 12px; font-weight: 500; color: var(--green); }
.ptile.busy span { color: var(--orange); }
.ptile.off { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); }
.ptile.off b, .ptile.off span { color: var(--muted); }

/* iOS-Schalter */
.switch { position: relative; display: inline-block; width: 51px; height: 31px; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: rgba(120, 120, 128, .16); border-radius: 99px; transition: background .25s var(--ease); }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; background: #fff; border-radius: 50%; transition: transform .25s cubic-bezier(.3, .7, .4, 1.2); box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; }

/* Formular-Sheets */
dialog.sheet { padding: 0; width: min(520px, 94vw); background: #f2f2f7; text-align: left; border-radius: 16px; overflow: hidden; }
.sheet-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 16px; background: rgba(249, 249, 249, .94); border-bottom: .5px solid var(--hairline); }
.sheet-bar h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: -.02em; }
.link-btn { background: none !important; color: var(--tint); padding: 4px 0; font-size: 17px; border-radius: 0; justify-self: start; }
.link-btn.strong { font-weight: 600; justify-self: end; }
.link-btn:active:not(:disabled) { transform: none; opacity: .5; }
.sheet-body { padding: 22px 16px 26px; }
.field { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 48px; position: relative; background: var(--surface); cursor: text; }
.field + .field::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--hairline); }
.field > span:first-child { width: 120px; flex: none; font-size: 16px; }
.field.toggle { justify-content: space-between; cursor: pointer; }
.field.toggle > span:first-child { width: auto; }
.field input:not([type=checkbox]), .field select { flex: 1; min-width: 0; border: none; background: transparent !important; padding: 13px 0; font-size: 16px; text-align: right; box-shadow: none !important; border-radius: 0; color: var(--ink); }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 10 14'%3E%3Cpath d='m2 5 3-3 3 3M2 9l3 3 3-3'/%3E%3C/svg%3E") right center no-repeat !important; text-align-last: right; font: inherit; font-size: 16px; }
.field em { font-style: normal; color: var(--muted); }
.danger-row { display: block; width: 100%; background: var(--surface); color: var(--red); font-size: 16px; padding: 14px; border-radius: 12px; }
.danger-row:hover:not(:disabled) { background: #fff5f4; }
.danger-row[hidden] { display: none; }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 900px) {
  .col[data-col=zubereitung] .list { grid-template-columns: 1fr; }
  .prefs { grid-template-columns: 200px 1fr; }
  .pos { grid-template-columns: 1fr 330px; }
  .board { grid-template-columns: 1fr; height: auto; }
  .page-title { display: none; }
}

/* ---------- Bestätigungs-Dialog (Alert) ---------- */
dialog.alert { width: min(320px, 90vw); padding: 22px 20px 16px; }
dialog.alert h3 { color: var(--ink); font-size: 17px; font-weight: 600; text-transform: none; letter-spacing: -.02em; margin-bottom: 6px; }
dialog.alert p { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.45; }
dialog.alert .actions { flex-direction: row; margin-top: 18px; }
dialog.alert .actions button { flex: 1; padding: 11px; font-size: 15px; }
button.destructive { background: var(--red); color: #fff; font-weight: 600; }
button.destructive:hover:not(:disabled) { background: #e0352b; }
button.icon, button.add { display: inline-grid; place-items: center; padding: 0; line-height: 0; }
svg.ico { display: block; flex: none; }
.order .btns button.icon { color: var(--muted); }
.order .btns button.icon:hover { color: var(--red); }
.field input[type=number] { -moz-appearance: textfield; }
.field input[type=number]::-webkit-inner-spin-button, .field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Benutzer-Menü in der Kopfzeile ---------- */
.user { position: relative; }
.user-btn { width: 32px; height: 32px; border-radius: 50%; padding: 0; line-height: 1; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; display: grid; place-items: center; }
.user-btn:hover:not(:disabled) { background: #2c2c2e; }
.user-menu { position: absolute; right: 0; top: 42px; min-width: 200px; padding: 14px; border-radius: 14px; z-index: 50;
  background: #fff; box-shadow: var(--shadow-2), 0 0 0 .5px var(--hairline); animation: rise .18s var(--ease); }
.user-name { font-weight: 600; font-size: 15px; }
.user-role { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.user-logout { width: 100%; color: var(--red); }

/* ---------- Anmeldeseite ---------- */
.login-page { display: grid; place-items: center; min-height: 100vh; }
.login { width: min(360px, 90vw); text-align: center; padding-bottom: 8vh; }
.login-logo { width: 72px; height: 72px; margin-bottom: 14px; }
.login h1 { font-size: 30px; font-weight: 600; letter-spacing: -.03em; margin: 0; }
.login h1 span { font-weight: 400; }
.login-sub { color: var(--muted); margin: 6px 0 26px; }
.login-form .group { text-align: left; box-shadow: var(--shadow-1); }
.login-form input { display: block; width: 100%; border-radius: 0 !important; background: var(--surface) !important; padding: 14px 16px !important; font-size: 17px; box-shadow: none !important; }
.login-form input + input { border-top: .5px solid var(--hairline) !important; }
.login-form button { width: 100%; margin-top: 16px; padding: 14px; font-size: 17px; border-radius: 12px; }
.login-error { color: var(--red); font-size: 14px; min-height: 20px; margin: 10px 0 0; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--fill); color: var(--ink-2); font-weight: 600; display: grid; place-items: center; flex: none; }
.row:has(.avatar) + .row::before { left: 62px; }
[hidden] { display: none !important; }

/* In Zubereitung: Karten in mehreren Spalten (2 nebeneinander, auf grossen Bildschirmen mehr) */
.col[data-col=zubereitung] .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); align-content: start; align-items: start; }

/* Fertig: kompakte Liste */
.col[data-col=fertig] .list { gap: 0; padding: 2px 10px 10px; }
.done-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; background: var(--surface); cursor: grab; font-size: 14px; }
.done-row:first-child { border-radius: 12px 12px 0 0; }
.done-row:last-child { border-radius: 0 0 12px 12px; }
.done-row:only-child { border-radius: 12px; }
.done-row + .done-row { border-top: .5px solid var(--hairline); }
.done-pager { min-width: 30px; height: 26px; padding: 0 7px; border-radius: 8px; background: var(--fill); color: var(--ink-2); font-weight: 700; font-size: 14px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.done-items { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.done-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.done-row button.icon { width: 28px; height: 28px; border-radius: 8px; background: transparent; color: var(--muted); }
.done-row button.icon:hover { background: var(--fill-2); color: var(--ink); }
.done-row button.icon.danger:hover { color: var(--red); background: rgba(255,59,48,.1); }

/* ---------- Geräte (SumUp) ---------- */
.mode-card { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.mode-card b { font-size: 16px; }
.mode-card span { font-size: 14px; }
.mode-card.test { background: rgba(255, 149, 0, .12); color: #8a4d00; }
.mode-card.live { background: rgba(52, 199, 89, .14); color: #1d6b32; }
.dev-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--fill); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.dev-icon svg { display: block; }
.row:has(.dev-icon) + .row::before { left: 62px; }
.row-sub .on { color: var(--green); }
.row-sub .off { color: var(--orange); }
.row-check { font-size: 13px; font-weight: 600; color: var(--ink); background: var(--fill-2); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.empty-row.err { color: var(--red); }
.link-btn.inline { font-size: 15px; padding: 0 0 0 6px; color: var(--ink); text-decoration: underline; }
.field.info { cursor: default; }
.field.info em { margin-left: auto; font-style: normal; color: var(--muted); }
.plain-row { display: block; width: 100%; background: var(--surface); color: var(--ink); font-size: 16px; padding: 14px; border-radius: 12px; margin-top: 26px; }
.plain-row + .danger-row { margin-top: 12px; }
.guide { background: var(--surface); border-radius: 12px; padding: 4px 0; }
.guide summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after { content: ''; margin-left: auto; width: 8px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='14' fill='none' stroke='%23c4c4c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 8 14'%3E%3Cpath d='m1 1 6 6-6 6'/%3E%3C/svg%3E") center no-repeat; transition: transform .2s; }
.guide[open] summary::after { transform: rotate(90deg); }
.guide ol { counter-reset: step; list-style: none; margin: 0; padding: 4px 16px 6px; }
.guide li { counter-increment: step; position: relative; padding: 10px 0 10px 40px; border-top: .5px solid var(--hairline); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.guide li::before { content: counter(step); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.guide li b { color: var(--ink); }
.guide a { color: var(--ink); }
.guide code { background: var(--fill-2); padding: 1px 6px; border-radius: 6px; font-size: 14px; }
.guide .group-foot { margin: 0 16px 10px; }
