/* Copyright (c) 2026 Michael Celik Schwan. Alle Rechte vorbehalten.
   Kopieren und Weiterverwenden nur mit schriftlicher Erlaubnis. */
:root {
  --bg: #121214;
  --panel: #1b1b1f;
  --panel-2: #232329;
  --line: #2e2e36;
  --text: #ecebe8;
  --muted: #9a99a3;
  --accent: #d4a35a;
  --accent-ink: #1a1408;
  --ok: #6cc28a;
  --warn: #e3a34a;
  --err: #e06666;
  --wa: #3fb36b;
  --ig: #d2649a;
  --mail: #6fa8dc;
  --radius: 10px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
.consent-page [hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
code { background: var(--panel-2); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
small { color: var(--muted); }

/* Layout */
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar {
  background: #0d0d0f; border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 4px 8px 16px; }
.brand-mark { color: var(--accent); font-size: 18px; }
.studio-switch { padding: 0 6px 14px; }
.studio-switch label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  text-decoration: none; color: var(--muted);
}
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active { background: var(--panel-2); color: var(--text); }
.nav-icon { width: 18px; text-align: center; }
.count {
  margin-left: auto; background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px;
}
.count.muted { background: var(--panel-2); color: var(--muted); }
.logout { margin-top: auto; padding: 8px; }
.content { min-width: 0; display: flex; flex-direction: column; }

.demo-banner {
  background: #2a2213; color: #e9c98f; border-bottom: 1px solid #4a3b1e;
  padding: 7px 20px; font-size: 13px;
}
.flashes { padding: 12px 20px 0; display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 8px; background: var(--panel-2); border-left: 3px solid var(--muted); }
.flash.ok { border-left-color: var(--ok); }
.flash.error { border-left-color: var(--err); }
.flash.info { border-left-color: var(--mail); }

/* Form elements */
input, select, textarea {
  width: 100%; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); border-radius: 8px;
  padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: #4a4a55; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: progress; }

.badge, .chip, .tag {
  display: inline-block; font-size: 11.5px; font-weight: 650; border-radius: 999px;
  padding: 2px 9px; background: var(--panel-2); color: var(--muted); text-decoration: none;
}
.ch-whatsapp { color: var(--wa); background: rgba(63, 179, 107, .13); }
.ch-instagram { color: var(--ig); background: rgba(210, 100, 154, .13); }
.ch-email { color: var(--mail); background: rgba(111, 168, 220, .13); }
.chip { padding: 5px 12px; font-size: 12.5px; border: 1px solid transparent; }
.chip.active { border-color: currentColor; color: var(--text); }
.chip.ch-whatsapp.active { color: var(--wa); }
.chip.ch-instagram.active { color: var(--ig); }
.chip.ch-email.active { color: var(--mail); }
.tag.ok { color: var(--ok); background: rgba(108, 194, 138, .13); }
.tag.best { color: var(--accent-ink); background: var(--accent); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.swatch.big { width: 34px; height: 34px; margin: 0; flex: none; }
.hint { color: var(--muted); font-size: 12.5px; }
.hint.block { display: block; margin-top: 18px; }
.empty { color: var(--muted); padding: 20px; text-align: center; }
.empty.big { margin: auto; font-size: 15px; }

/* Inbox */
.inbox { display: grid; grid-template-columns: 340px 1fr; flex: 1; min-height: 0; height: calc(100vh - 34px); }
.conv-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.pane-head { padding: 18px 16px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle-done { font-size: 12.5px; color: var(--muted); }
.conv-scroll { overflow-y: auto; flex: 1; }
.conv {
  display: block; padding: 12px 16px; text-decoration: none; border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.conv:hover { background: var(--panel); }
.conv.active { background: var(--panel-2); border-left-color: var(--accent); }
.conv.status-erledigt { opacity: .55; }
.conv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.conv-time { font-size: 12px; color: var(--muted); }
.conv-name { font-weight: 650; display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.conv-snippet {
  color: var(--muted); font-size: 13px; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.thread { display: flex; flex-direction: column; min-height: 0; }
.thread-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.thread-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.status-form { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg { background: transparent; color: var(--muted); border: 0; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg + .seg { border-left: 1px solid var(--line); }
.seg.active { background: var(--panel-2); color: var(--text); }
.messages { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 560px; display: grid; gap: 6px; }
.msg.out { align-self: flex-end; justify-items: end; }
.bubble { background: var(--panel-2); padding: 10px 14px; border-radius: 14px 14px 14px 4px; white-space: pre-wrap; line-height: 1.45; }
.msg.out .bubble { background: #3a2f1c; border-radius: 14px 14px 4px 14px; }
.meta { font-size: 11.5px; color: var(--muted); }
.ref { margin: 0; display: grid; gap: 6px; }
.ref-img { width: 240px; border-radius: 10px; border: 1px solid var(--line); cursor: context-menu; display: block; }
.ref figcaption { display: flex; align-items: center; gap: 8px; }
.reply { border-top: 1px solid var(--line); padding: 14px 22px 18px; display: grid; gap: 10px; background: var(--panel); }
.reply-actions { display: flex; align-items: center; gap: 10px; }
.reply-actions .btn.primary { margin-left: auto; }

.ctx-menu {
  position: fixed; z-index: 50; min-width: 240px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.ctx-title { font-size: 12px; color: var(--muted); padding: 6px 10px; }
.ctx-menu button {
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; width: 100%; text-align: left;
  background: transparent; border: 0; color: var(--text); padding: 8px 10px; border-radius: 7px; font: inherit; cursor: pointer;
}
.ctx-menu button small { grid-column: 2; font-size: 11.5px; }
.ctx-menu button:hover { background: var(--panel-2); }

.toast {
  position: fixed; right: 20px; top: 20px; background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--ok); padding: 12px 16px; border-radius: 10px; z-index: 60;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
}
.toast.error { border-left-color: var(--err); }

/* Pages */
.page { padding: 22px 26px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
.page.narrow { max-width: 820px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.lead { color: var(--muted); margin: 6px 0 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
.card.flush { padding: 0; overflow: hidden; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.grid-form .wide { grid-column: span 2; }
.grid-form > * { min-width: 0; }
.grid-form select { width: 100%; }
figcaption, .card h2, .card h3 { overflow-wrap: anywhere; hyphens: auto; }
.form-actions { display: flex; }

/* Calendar */
.week-nav { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.cal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.cal { border-collapse: collapse; width: 100%; min-width: 900px; background: var(--panel); }
.cal th, .cal td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 10px; vertical-align: top; text-align: left; }
.cal thead th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--panel-2); }
.cal th.today, .cal td.today { background: #22201a; }
.cal thead th.today { color: var(--accent); }
.cal-artist-col { width: 160px; }
.cal-artist { font-weight: 650; }
.cal-artist small { display: block; font-weight: 400; margin-top: 4px; font-size: 11.5px; }
.appt { background: var(--panel-2); border-left: 3px solid var(--accent); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; display: grid; gap: 2px; font-size: 12.5px; }
.free { font-size: 12px; color: var(--ok); padding: 3px 0; }
.cal td.past { background: #161618; }
.cal td.past .appt { opacity: .55; }

/* Walk-in */
.suggestions { display: grid; gap: 10px; }
.suggestion {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.suggestion.best { border-color: var(--accent); }
.s-left { display: flex; gap: 14px; align-items: center; }
.suggestion h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.suggestion p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.suggestion .when { color: var(--text); font-weight: 600; }
.suggestion form { display: flex; gap: 8px; align-items: center; }
.inline-input { width: 160px; padding: 6px 10px; }

/* Payments */
.list { width: 100%; border-collapse: collapse; }
.list th, .list td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13.5px; }
.list th { color: var(--muted); font-weight: 600; background: var(--panel-2); font-size: 12.5px; }
.list .num { font-variant-numeric: tabular-nums; }
.pay { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; }
.pay-offen { color: var(--warn); background: rgba(227, 163, 74, .13); }
.pay-teilweise { color: var(--err); background: rgba(224, 102, 102, .13); }
.pay-eingegangen { color: var(--ok); background: rgba(108, 194, 138, .13); }
.plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* Stencils */
.stencil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.stencil-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
.stencil-card.done { opacity: .6; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.stencil-meta, .stencil-actions { display: flex; justify-content: space-between; align-items: center; }

/* Login */
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login { width: 320px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }   /* Kopfleiste nie strecken */
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .inbox { grid-template-columns: minmax(0, 1fr); height: auto; }
  .conv-list { max-height: 40vh; }
}

/* ================================================================ v0.2 */
.page.wide { max-width: 1500px; }
.head-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted-id { color: var(--muted); font-weight: 500; font-size: 16px; }
.tag.warn { color: var(--warn); background: rgba(227, 163, 74, .14); }
.notice { padding: 10px 12px; border-radius: 8px; font-size: 13.5px; }
.notice.warn { background: rgba(227, 163, 74, .12); border: 1px solid rgba(227, 163, 74, .35); color: #f0c98a; }
.field-error { outline: 2px solid var(--err) !important; outline-offset: 2px; border-radius: 8px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input { width: auto; flex: 1; min-width: 90px; }
.check { display: flex; flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; }
.check input { width: auto; }
.check.small { font-size: 12px; color: var(--muted); }

/* Seitenleiste: Walk-in-Untermenü und Check-in */
.sidebar { overflow: visible; z-index: 30; }
.nav-item { background: none; border: 0; font: inherit; width: 100%; text-align: left; cursor: pointer; }
.nav-flyout-wrap { position: relative; }
.chev { margin-left: auto; color: var(--muted); }
.flyout {
  position: absolute; left: calc(100% + 10px); top: -4px; width: 260px; z-index: 60;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.flyout::before {
  content: ""; position: absolute; left: -6px; top: 18px; width: 10px; height: 10px; transform: rotate(45deg);
  background: var(--panel); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.flyout-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 8px; text-decoration: none; }
.flyout-item:hover { background: var(--panel-2); }
.flyout-item b { display: block; }
.flyout-item small { display: block; font-size: 12px; margin-top: 2px; }
.fi-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); color: var(--accent); font-size: 16px; flex: none; }
.team-today { margin-top: 18px; padding: 10px 6px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.tt-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 4px 6px; }
.tt-row {
  display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; align-items: center; width: 100%;
  background: none; border: 0; color: var(--muted); font: inherit; text-align: left; padding: 6px 4px; border-radius: 6px; cursor: pointer;
}
.tt-row:hover { background: var(--panel); }
.tt-row small { grid-column: 2; font-size: 11px; }
.tt-dot { width: 9px; height: 9px; border-radius: 50%; background: #4a4a55; }
.tt-row.in { color: var(--text); }
.tt-row.in .tt-dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(108, 194, 138, .18); }

/* Walk-in-Fenster */
.wi-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.wi-col { display: grid; gap: 18px; }
.sec-head { display: flex; align-items: center; gap: 10px; }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.card.locked { opacity: .45; pointer-events: none; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.span2 { grid-column: span 2; }
.big-select select { font-size: 16px; padding: 12px; font-weight: 600; }

.customer-pick { display: flex; gap: 10px; }
.search-wrap { position: relative; flex: 1; }
.search-wrap input { font-size: 15px; padding: 11px 12px; }
.dropdown {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  max-height: 320px; overflow-y: auto;
}
.dd-item {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left; background: none; border: 0;
  color: var(--text); font: inherit; padding: 9px 10px; border-radius: 7px; cursor: pointer;
}
.dd-item:hover { background: var(--panel-2); }
.dd-item span { color: var(--muted); font-size: 13px; }
.dd-item small { grid-column: 1 / -1; }
.dd-empty { padding: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.customer-card { display: flex; justify-content: space-between; align-items: center; background: var(--panel-2); border-radius: 10px; padding: 12px 14px; }
.cc-main { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.cc-name { font-weight: 700; font-size: 16px; }
.cc-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li { padding: 8px 10px 8px 34px; border-radius: 8px; background: var(--panel-2); position: relative; font-size: 13.5px; }
.checklist li::before { position: absolute; left: 11px; top: 8px; font-weight: 800; }
.checklist li.ok::before { content: "✓"; color: var(--ok); }
.checklist li.bad::before { content: "!"; color: var(--warn); }
.checklist li.neutral::before { content: "•"; color: var(--muted); }
.check-thumb { display: block; width: 70px; height: 70px; object-fit: contain; background: #fff; border-radius: 6px; margin-top: 6px; }

.artist-block { display: grid; gap: 8px; }
.artist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--muted); }
.artist-head small { text-align: right; }
.artist-list { display: grid; gap: 8px; }
.artist-opt {
  display: grid; grid-template-columns: 6px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font: inherit; padding: 10px 12px;
  border-radius: 10px; cursor: pointer;
}
.artist-opt:hover:not(:disabled) { border-color: #4a4a55; }
.artist-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.artist-opt:disabled { opacity: .45; cursor: not-allowed; }
.ao-color { width: 6px; align-self: stretch; border-radius: 4px; }
.ao-main { display: grid; gap: 3px; min-width: 0; }
.ao-name { font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ao-note { color: var(--muted); font-size: 12.5px; }
.ao-right { display: grid; justify-items: end; gap: 4px; }
.ao-status { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--panel); color: var(--muted); }
.st-frei .ao-status { color: var(--ok); background: rgba(108, 194, 138, .13); }
.st-belegt .ao-status { color: var(--warn); background: rgba(227, 163, 74, .13); }
.st-erwartet .ao-status { color: var(--mail); background: rgba(111, 168, 220, .13); }
.stars { font-size: 17px; letter-spacing: 1px; color: #4a4a55; white-space: nowrap; }
.stars .on { color: var(--accent); }
.stars-inline { color: var(--accent); letter-spacing: 1px; }
.week { display: flex; gap: 3px; margin-top: 2px; }
.week i { font-style: normal; font-size: 10px; width: 17px; height: 17px; border-radius: 4px; display: grid; place-items: center; background: var(--panel); color: #5a5a66; }
.week i.on { background: rgba(108, 194, 138, .16); color: var(--ok); }
.week i.sel { outline: 1px solid var(--accent); }
.size-badge { background: var(--panel-2); border-radius: 8px; padding: 6px 10px; display: grid; gap: 2px; align-self: stretch; align-content: center; }
.size-badge small { font-size: 11px; }

/* WhatsApp-Karte */
.wa-card { border-color: rgba(37, 211, 102, .35); }
.wa-head { display: flex; align-items: center; gap: 14px; }
.wa-head h2 { font-size: 20px; }
.wa-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.wa-explain { display: grid; gap: 12px; }
.wa-way { display: grid; grid-template-columns: 30px 1fr; gap: 12px; background: var(--panel-2); border-radius: 10px; padding: 12px; }
.wa-way p { margin: 4px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.wa-num { width: 30px; height: 30px; border-radius: 50%; background: rgba(37, 211, 102, .15); color: #25d366; display: grid; place-items: center; font-weight: 800; }
.btn.wa-btn { background: #25d366; border-color: #25d366; color: #062b14; padding: 10px 22px; font-size: 15px; }
.btn.wa-btn:disabled { background: #1c7a43; border-color: #1c7a43; color: #d9f7e5; opacity: 1; }
.timer { position: relative; width: 44px; height: 44px; }
.timer svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 3.5; }
.timer .t-bg { stroke: var(--line); }
.timer .t-fg { stroke: #25d366; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.wa-results { display: grid; gap: 6px; margin-top: 8px; }
.wa-result { display: grid; grid-template-columns: auto auto 1fr; gap: 2px 8px; align-items: baseline; text-align: left; background: var(--panel); border: 1px solid var(--line); color: var(--text); font: inherit; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.wa-result span { grid-column: 1 / -1; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-result:hover { border-color: #25d366; }
.wa-candidate { border: 1px solid #25d366; border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: rgba(37, 211, 102, .06); animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.wc-head small { color: var(--muted); }
.wc-question { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wc-question span { margin-right: auto; }
.wa-chat { background: #0f1a14; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.wa-chat.mini { max-height: 200px; }
.wm { max-width: 78%; display: grid; gap: 4px; background: #1f2c34; padding: 8px 10px; border-radius: 10px 10px 10px 2px; }
.wm.out { align-self: flex-end; background: #144d37; border-radius: 10px 10px 2px 10px; }
.wm small { color: #8aa39a; font-size: 11px; justify-self: end; }
.wm-text { white-space: pre-wrap; font-size: 14px; }
.wa-img { width: 180px; max-width: 100%; border-radius: 8px; cursor: context-menu; display: block; background: #fff; }
.wa-chat.mini .wa-img { width: 110px; }
.wa-chat-box { display: grid; gap: 8px; }
.wcb-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wcb-head small { color: var(--muted); }
.picked-images { display: flex; gap: 10px; flex-wrap: wrap; }
.picked-images figure { margin: 0; width: 120px; }
.picked-images img { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.picked-images figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.demo-btn { justify-self: start; border-style: dashed; }

/* Zahlung */
.money { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; align-items: stretch; }
.money.compact { grid-template-columns: repeat(3, 1fr); }
.money-box { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; align-content: center; }
.money-box b { font-size: 20px; font-variant-numeric: tabular-nums; }
.money-box.open b { color: var(--accent); }
.price-input { font-size: 13px; }
.euro-field { display: flex; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.euro-field input { border: 0; background: transparent; font-size: 18px; font-weight: 700; }
.euro-field input:focus { outline: none; }
.euro-field:focus-within { outline: 2px solid var(--accent); }
.euro-field span { padding: 0 12px; color: var(--muted); font-weight: 700; }
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pay-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--panel-2); border-radius: 8px; font-size: 13.5px; }
.pay-list li span:first-child { font-weight: 700; min-width: 80px; }
.pay-list li.new { border: 1px dashed var(--line); background: transparent; }
.pay-list .btn { margin-left: auto; }
.pay-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.pay-add .euro-field input { font-size: 15px; }
.plan-panel { border: 1px solid var(--accent); border-radius: 12px; padding: 14px; display: grid; gap: 12px; background: rgba(212, 163, 90, .05); }
.plan-head { display: flex; justify-content: space-between; align-items: center; }
.plan-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.plan-table th, .plan-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.plan-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.plan-table tfoot td { font-weight: 700; border-bottom: 0; }

/* Große Knöpfe unten rechts */
.wi-actions {
  position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: flex-end; align-items: center; gap: 14px;
  padding: 14px 0 6px; background: linear-gradient(180deg, transparent, var(--bg) 30%);
}
.wi-error { margin-right: auto; color: #ffb3b3; background: rgba(224, 102, 102, .12); border: 1px solid rgba(224, 102, 102, .4); padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.btn.big { font-size: 17px; padding: 16px 28px; border-radius: 12px; min-width: 250px; justify-content: center; transition: background .2s, box-shadow .2s, opacity .2s; }
.btn.big.qr { background: #2a2a31; border-color: #4a4a55; }
.btn.big.qr.done { border-color: var(--ok); color: var(--ok); }
.btn.big.qr.alarm { background: #c0392b; border-color: #ff6b5a; color: #fff; animation: glow 0.9s ease-in-out infinite alternate; }
@keyframes glow { from { box-shadow: 0 0 0 0 rgba(255, 80, 60, .7); } to { box-shadow: 0 0 22px 6px rgba(255, 80, 60, .55); } }
.btn.big.cooldown, .btn.big:disabled { background: #3a3a40 !important; border-color: #3a3a40 !important; color: #8a8a93 !important; cursor: wait; }

/* Dialog Kunde anlegen */
dialog.modal { width: min(860px, 94vw); max-height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); }
dialog.modal::backdrop { background: rgba(0, 0, 0, .65); }
.modal form { display: flex; flex-direction: column; max-height: 92vh; }
.modal-head, .modal-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-foot { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; gap: 10px; }
.modal-body { padding: 16px 18px; overflow-y: auto; display: grid; gap: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; }
legend { padding: 0 6px; font-weight: 650; }
legend small { font-weight: 400; }
.age-line { font-size: 13px; color: var(--ok); min-height: 18px; }
.age-line.warn { color: var(--warn); }

/* Historie */
.filters { display: flex; gap: 8px; }
.filters select { width: auto; }
.history { display: grid; gap: 12px; }
.h-row { display: grid; grid-template-columns: 220px 1fr 170px; gap: 18px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.h-row.fresh { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.h-date { font-weight: 700; }
.h-date span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.h-name { font-size: 16px; font-weight: 700; margin-top: 6px; }
.h-style { color: var(--accent); font-size: 13.5px; margin-top: 2px; }
.h-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.h-artist { font-size: 13px; margin-top: 6px; }
.h-images { display: grid; grid-template-columns: repeat(4, minmax(0, 120px)); gap: 10px; }
.h-images.big { grid-template-columns: repeat(5, minmax(0, 170px)); }
.h-img { margin: 0; }
.h-img img, .h-missing { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; background: #fff; }
.h-missing { display: grid; place-items: center; background: transparent; border-style: dashed; color: var(--muted); font-size: 12px; }
.h-img figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; text-align: center; }
.h-side { display: grid; gap: 8px; justify-items: end; }
.h-money { text-align: right; }
.h-money small { display: block; font-size: 11px; }
.h-money.open b { color: var(--accent); }

/* Termin-Akte */
.akte-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.akte-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.wide-seg { align-self: start; justify-self: start; }
.upload-form, .inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.upload-form select, .upload-form input[type=file] { width: auto; }
.inline-form input { flex: 1; min-width: 160px; }
.list form.inline select { width: auto; padding: 5px 8px; }

/* Team */
.jump { display: flex; gap: 12px; }
.jump a { color: var(--muted); font-size: 13.5px; }
.checkin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.checkin-card { display: flex; align-items: center; gap: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.checkin-card.in { border-color: rgba(108, 194, 138, .5); }
.checkin-card small { display: block; font-size: 12px; }
.checkin-card .btn { margin-left: auto; }
.sec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.table-scroll { overflow-x: auto; }
.stars-table, .plan-grid { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.stars-table th, .stars-table td, .plan-grid th, .plan-grid td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.stars-table thead th, .plan-grid thead th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-weight: 600; }
.stars-table .group-row th { background: var(--panel-2); color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.star-select { width: 110px; padding: 4px 6px; color: var(--accent); letter-spacing: 1px; }
.star-select.v0 { color: var(--muted); }
.plan-grid td { vertical-align: top; }
.plan-grid td input[type=time] { width: 96px; padding: 4px 6px; margin-top: 4px; display: block; }
.plan-grid td.on { background: rgba(108, 194, 138, .06); }
.sticky-save { position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(180deg, transparent, var(--panel) 40%); }
.absence-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.help { color: var(--muted); font-size: 13.5px; }
.help summary { cursor: pointer; color: var(--text); }
.help li { margin: 4px 0; }
.settings-form { display: grid; gap: 18px; }

@media (max-width: 1200px) {
  .wi-grid, .akte-grid, .akte-grid.two { grid-template-columns: minmax(0, 1fr); }
  .h-row { grid-template-columns: 1fr; }
  .h-side { justify-items: start; }
}

/* ================================================================ v0.3 */
.ico { vertical-align: -3px; flex: none; }
.accent { color: var(--accent); }
.good { color: var(--ok); }
.bad { color: var(--err); }
.field-msg { color: #ffb3b3; font-size: 12px; }
.grid-form.tight { gap: 8px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.muted { color: var(--muted); }

/* Seitenleiste: Team-Menü mit Untermenüs (Hover am Computer, Tippen am Handy) */
.nav-hover { position: relative; }
.nav-item-row { display: flex; align-items: center; border-radius: 8px; }
.nav-item-row .nav-item { flex: 1; }
.nav-item-row.active { background: var(--panel-2); }
.nav-item-row.active .nav-item { color: var(--text); }
.nav-sub-toggle { background: none; border: 0; color: var(--muted); font-size: 18px; padding: 4px 10px; cursor: pointer; border-radius: 6px; }
.nav-sub-toggle:hover { color: var(--text); background: var(--panel); }
.hover-flyout {
  display: none; position: absolute; left: calc(100% + 10px); top: -4px; width: 270px; z-index: 60;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.hover-flyout::after { content: ""; position: absolute; left: -14px; top: 0; width: 14px; height: 100%; }
.nav-hover.open > .hover-flyout { display: block; }
@media (hover: hover) { .nav-hover:hover > .hover-flyout, .nav-hover:focus-within > .hover-flyout { display: block; } }
.hf-row { position: relative; }
.hf-row > .flyout-item .chev { font-size: 18px; padding: 0 4px; }
.hover-sub {
  display: none; position: absolute; left: calc(100% + 6px); top: -6px; width: 250px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.hover-sub::before { content: ""; position: absolute; left: -10px; top: 0; width: 10px; height: 100%; }
.hf-row.open > .hover-sub { display: block; }
@media (hover: hover) { .hf-row:hover > .hover-sub, .hf-row:focus-within > .hover-sub { display: block; } }
.hf-row:hover > .flyout-item { background: var(--panel-2); }

/* Team-Übersicht */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fchip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.fchip b { color: var(--text); font-weight: 650; }
.fchip:hover { border-color: #4a4a55; color: var(--text); }
.fchip[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: rgba(212, 163, 90, .12); }
.fchip.f-present .ico { color: var(--ok); }
.fchip.f-absent .ico { color: #6a6a75; }
.fchip.ghost { background: transparent; border-style: dashed; }
.fsep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.create-menu { margin-left: auto; position: relative; }
.create-pop {
  position: absolute; right: 0; top: calc(100% + 6px); width: 300px; z-index: 40; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.create-pop a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 8px; text-decoration: none; }
.create-pop a:hover { background: var(--panel-2); }
.create-pop a .ico { color: var(--accent); width: 22px; height: 22px; }
.create-pop b { display: block; }
.create-pop small { display: block; font-size: 12px; margin-top: 2px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.team-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 14px 14px;
  display: grid; justify-items: center; text-align: center; gap: 5px; text-decoration: none; align-content: start;
}
.team-card:hover { border-color: #4a4a55; transform: translateY(-1px); }
.team-card.inactive { opacity: .5; }
.tc-photo { position: relative; margin-bottom: 6px; }
.team-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; border: 2px solid var(--line); }
.team-photo.initials { display: grid; place-items: center; font-weight: 800; font-size: 30px; color: #111;
  background: var(--c, var(--accent)); }
.team-photo.big { width: 120px; height: 120px; font-size: 38px; }
.tc-dot { position: absolute; right: 6px; bottom: 6px; width: 16px; height: 16px; border-radius: 50%; background: #4a4a55; border: 3px solid var(--panel); }
.tc-dot.on { background: var(--ok); }
.tc-name { font-weight: 750; font-size: 16.5px; }
.tc-full { font-size: 12.5px; color: var(--muted); min-height: 16px; }
.tc-roles { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin: 4px 0; }
.role-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; border-radius: 999px; padding: 3px 9px; background: var(--panel-2); color: var(--muted); }
.role-chip.r-artist { color: var(--accent); background: rgba(212, 163, 90, .13); }
.role-chip.r-piercer { color: #8ec5ff; background: rgba(111, 168, 220, .14); }
.role-chip.r-mitarbeiter { color: #c7c6cf; }
.role-chip.r-guest { color: #d9b8ff; background: rgba(142, 124, 195, .18); }
.tc-meta { font-size: 12.5px; color: var(--muted); }

/* Person anlegen */
.person-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.role-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.role-box { display: block; cursor: pointer; position: relative; }
.role-box input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; top: 0; left: 0; }
.role-box > span { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--text); text-align: center; }
.role-box > span small { font-size: 12px; }
.role-box > span .ico { color: var(--muted); }
.role-box input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: rgba(212, 163, 90, .08); }
.role-box input:checked + span .ico { color: var(--accent); }
.role-box input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.role-box input:focus-visible + span { outline: 2px solid var(--accent); }
.role-pick.field-error { outline-offset: 4px; }
.guest-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(142, 124, 195, .14); border: 1px solid rgba(142, 124, 195, .4); color: #e2d4ff; font-size: 13.5px; }
.person-top { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: start; }
.photo-pick { justify-items: center; text-align: center; cursor: pointer; }
.photo-pick input { font-size: 12px; padding: 6px; }
.photo-preview { width: 140px; height: 140px; border-radius: 50%; background: var(--panel-2); border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.week-edit { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.we-day { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 5px; }
.we-day.on { border-color: rgba(108, 194, 138, .45); background: rgba(108, 194, 138, .06); }
.we-day input[type=time] { padding: 5px 6px; font-size: 13px; }
.style-stars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.ss-group h4 { margin: 0 0 6px; font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.ss-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--text); padding: 3px 0; border-bottom: 1px solid var(--line); }
.chip-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { display: inline-flex; cursor: pointer; position: relative; }
.pick input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; top: 0; left: 0; }
.pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick span { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 12.5px; }
.pick input:checked + span, .pick.on span { border-color: #6fa8dc; color: #cfe5ff; background: rgba(111, 168, 220, .14); }

/* Profil */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ph-photo { position: relative; }
.ph-photo .tc-dot { right: 10px; bottom: 10px; width: 20px; height: 20px; border-color: var(--bg); }
.ph-main { flex: 1; min-width: 240px; display: grid; gap: 6px; }
.ph-main .tc-roles { justify-content: flex-start; }
.week-view { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wv { background: var(--panel-2); border-radius: 8px; padding: 6px; text-align: center; display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.wv.on { color: var(--text); background: rgba(108, 194, 138, .1); }
.star-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.star-list li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 4px 0; font-size: 13.5px; }
.msg-log { display: grid; gap: 8px; }
.msg-entry { background: var(--panel-2); border-radius: 10px; padding: 8px 10px; }
.msg-entry summary { cursor: pointer; font-size: 13px; }
.msg-text { white-space: pre-wrap; font-family: inherit; font-size: 13.5px; line-height: 1.5; margin: 8px 0 4px; }
.msg-stencil { width: 110px; height: 110px; object-fit: contain; background: #fff; border-radius: 8px; }
.appt-list a { text-decoration: none; }
.appt-list a:hover { color: var(--accent); }

/* Kasse */
.till-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.money.till-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.till-list th, .till-list td { padding: 9px 8px; }
.till-list td:nth-child(-n+3), .till-list td.num { white-space: nowrap; }
.till-list td.num small { display: block; color: var(--muted); }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.ledger td small { display: block; font-size: 11.5px; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger .sum td { font-weight: 750; border-top: 2px solid var(--line); border-bottom: 0; }
.list tr.struck td { text-decoration: line-through; opacity: .55; }
.list td.num small, .list td small { font-size: 11.5px; }
.count-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.count-cell { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; gap: 4px; text-align: center; color: var(--text); }
.count-cell span { font-weight: 700; font-size: 14px; }
.count-cell.note span { color: #b9e0c7; }
.count-cell.coin span { color: #f0d39c; }
.count-cell input { text-align: center; font-size: 16px; padding: 6px; }
.count-cell .cc-sum { font-size: 11px; min-height: 14px; }
.count-total { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.count-total > div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.count-total b { font-size: 19px; font-variant-numeric: tabular-nums; }
.payout-list { display: grid; gap: 10px; }
.payout { background: var(--panel-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.po-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.po-head small { color: var(--muted); }
.po-total { margin-left: auto; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.po-calc { font-size: 12.5px; color: var(--muted); }
.po-cash { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.po-label { font-size: 13.5px; }
.pieces { display: flex; gap: 5px; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; }
.piece { font-size: 12.5px; font-weight: 650; padding: 3px 9px; border-radius: 6px; background: #20302a; color: #bfe8cd; border: 1px solid #2c4a3a; }
.piece.bad { background: rgba(224, 102, 102, .14); color: #ffb3b3; border-color: rgba(224, 102, 102, .4); }
.po-other { font-size: 12.5px; color: #cfe5ff; }
.rest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rest-grid > div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.rest-grid b { font-size: 18px; }
.till-warnings { display: grid; gap: 6px; }
.euro-field.small input { font-size: 14px; width: 90px; }
.movement-list, .history-list { font-size: 13px; }
.checkout-card { border-color: rgba(212, 163, 90, .45); }
#checkout-form { display: grid; gap: 12px; }
.co-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.share-box { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; background: rgba(212, 163, 90, .06); border: 1px solid rgba(212, 163, 90, .3); border-radius: 12px; padding: 12px; }
.share-box > div { display: grid; gap: 2px; }
.share-box b { font-size: 18px; font-variant-numeric: tabular-nums; }
.checkout-card .btn.big { margin-left: auto; min-width: 200px; }

/* Marketing */
.budget-box { min-width: 280px; display: grid; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.bb-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bar { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; display: flex; }
.bar-spent { background: var(--accent); }
.bar-planned { background: rgba(212, 163, 90, .4); }
.kpi-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.kpi b { font-size: 19px; font-variant-numeric: tabular-nums; }
.kpi.accent b { color: var(--accent); }
.mk-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.approvals { display: grid; gap: 12px; }
.approval { display: grid; grid-template-columns: 150px 1fr; gap: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; animation: pop .25s ease-out; }
.approval.busy { opacity: .85; }
.ap-media { position: relative; display: grid; gap: 6px; align-content: start; }
.ap-media img, .ap-media video { width: 150px; max-height: 230px; object-fit: cover; border-radius: 8px; background: #000; display: block; }
.ap-wait { width: 150px; height: 150px; border-radius: 8px; border: 1px dashed var(--line); display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); text-align: center; padding: 8px; }
.ap-wait.bad { color: #ffb3b3; }
.ai-badge { position: absolute; top: 6px; left: 6px; background: #8e7cc3; color: #fff; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 6px; }
.ai-badge.inline { position: static; margin-left: 6px; }
.ap-body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.ap-kind { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.ap-summary { margin: 0; color: var(--muted); font-size: 13.5px; }
.approval blockquote { margin: 0; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 8px 8px 0; font-size: 13.5px; white-space: pre-wrap; }
.approval blockquote.caption { max-height: 110px; overflow: auto; }
.ap-msgs { font-size: 13px; }
.ap-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ap-cost { margin-right: auto; font-size: 13px; color: var(--muted); }
.mk-status { font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.mk-status.s-aktiv { color: var(--ok); background: rgba(108, 194, 138, .13); }
.mk-status.s-wartet { color: var(--warn); background: rgba(227, 163, 74, .13); }
.mk-status.s-pausiert { color: #8ec5ff; background: rgba(111, 168, 220, .13); }
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.lib-item { margin: 0; }
.lib-item img, .lib-item video, .lib-item .ap-wait { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; background: #000; display: block; }
.lib-item figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.lib-item figcaption small { width: 100%; }
.chat-card { border-color: rgba(212, 163, 90, .35); }
.mk-chat { display: flex; flex-direction: column; gap: 8px; max-height: 360px; min-height: 160px; overflow-y: auto; padding: 4px; }
.cm { max-width: 88%; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; font-size: 14px; line-height: 1.45; }
.cm.assistant { background: var(--panel-2); border-radius: 12px 12px 12px 3px; align-self: flex-start; }
.cm.user { background: #3a2f1c; border-radius: 12px 12px 3px 12px; align-self: flex-end; }
.cm.pending { opacity: .65; font-style: italic; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick .chip { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); cursor: pointer; text-align: left; }
.quick .chip:hover { color: var(--text); border-color: var(--accent); }
.chat-input { display: flex; gap: 8px; align-items: stretch; }
.chat-input textarea { flex: 1; resize: none; }
.auto-list { display: grid; gap: 8px; }
.auto { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: start; background: var(--panel-2); border-radius: 10px; padding: 10px; }
.auto-main { display: grid; gap: 2px; min-width: 0; }
.auto-main small { font-size: 12px; }
.auto-side { display: grid; gap: 6px; justify-items: end; }
.auto-opts summary { cursor: pointer; font-size: 12px; color: var(--accent); margin-top: 4px; }
.auto-opts .grid-form { margin-top: 8px; }
.status-list { list-style: none; padding: 0; font-size: 13.5px; }
.status-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-list form { margin-left: auto; }
.dotlive { width: 9px; height: 9px; border-radius: 50%; background: #4a4a55; flex: none; }
.dotlive.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(108, 194, 138, .18); }
.dotlive.demo { background: var(--warn); }
.task-list { font-size: 13px; }

/* Antwort-Assistent */
.assist { display: grid; gap: 8px; }
.assist-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.assist-stage { font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent); padding: 2px 9px; border-radius: 999px; }
.assist-variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.assist-variants:empty { display: none; }
.assist-chip { text-align: left; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 10px; font: inherit; cursor: pointer; display: grid; gap: 3px; }
.assist-chip span { font-size: 12px; color: var(--muted); }
.assist-chip.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.btn.assist-btn { border-color: rgba(212, 163, 90, .55); color: var(--accent); }
.wa-compose { display: grid; gap: 8px; }
.wa-compose .inline { justify-content: flex-end; }

@media (max-width: 1200px) {
  .till-grid, .mk-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .share-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hover-flyout { left: 0; top: 100%; }
  .hover-sub { position: static; width: auto; box-shadow: none; margin: 4px 0 4px 20px; }
  .count-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week-edit, .week-view { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .role-pick, .co-grid { grid-template-columns: minmax(0, 1fr); }
  .person-top { grid-template-columns: minmax(0, 1fr); }
  .approval { grid-template-columns: 1fr; }
  .kpi-row, .money.till-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .create-menu { margin-left: 0; }
}

/* ---------------------------------------------------------------- Handy: Menü als Leiste mit Knopf */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .sidebar { position: sticky; top: 0; z-index: 50; flex-direction: column; flex-wrap: nowrap; padding: 8px 12px; }
  .sidebar .brand { padding: 4px; }
  .sidebar:not(.open) > :not(.brand) { display: none !important; }
  .sidebar.open { max-height: 100vh; overflow-y: auto; padding-bottom: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55); }
  .menu-toggle {
    display: inline-grid; gap: 4px; align-content: center; margin-left: auto; width: 42px; height: 38px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; padding: 0 11px;
  }
  .menu-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s; }
  .sidebar.open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .sidebar.open .menu-toggle span:nth-child(2) { opacity: 0; }
  .sidebar.open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  /* Status-Umschalter: auf schmalen Bildschirmen umbrechen statt die Seite zu verbreitern */
  .page { padding: 16px 14px 32px; }
  .status-form.wide-seg { flex-wrap: wrap; max-width: 100%; }
  .page-head > *, .profile-head > * { min-width: 0; }
  .profile-head h1, .page-head h1 { overflow-wrap: anywhere; }
  /* Breite Tabellen scrollen innerhalb ihrer Karte statt die Seite zu verbreitern */
  .card table, .stars-table, .plan-grid { display: block; overflow-x: auto; max-width: 100%; }
  input, select, textarea { max-width: 100%; min-width: 0; }
  .grid-form .wide { grid-column: 1 / -1; }
  .status-form.wide-seg .seg { flex: 1 1 auto; border-bottom: 1px solid var(--line); }
  .page-head, .head-right { min-width: 0; max-width: 100%; }
  /* Untermenüs klappen im Menü auf statt seitlich daneben */
  .flyout, .hover-flyout, .hover-sub { position: static; width: auto; box-shadow: none; margin: 4px 0 6px 18px; }
  .flyout::before, .hover-flyout::after, .hover-sub::before { display: none; }
}
@media (max-width: 560px) {
  .week-edit, .week-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-way { grid-template-columns: 24px minmax(0, 1fr); gap: 8px; padding: 10px; }
}
input[type="color"] { height: 38px; padding: 4px; cursor: pointer; background: var(--panel-2); }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 6px; }

/* ---------------------------------------------------------------- v0.4: Anmeldung, Konten, Datenschutz */
.login.wide-auth { width: min(460px, calc(100vw - 32px)); }
.auth-title { font-size: 20px; margin: 0; }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 4px; }
.auth-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.qr-box { background: #fff; padding: 12px; border-radius: 10px; width: 220px; justify-self: center; }
.qr-box svg { width: 100%; height: auto; display: block; }
.secret-key { text-align: center; word-break: break-all; }
.codes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.codes code { font-size: 15px; }
.account-box { margin-top: auto; display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.account-link { display: grid; color: inherit; text-decoration: none; font-weight: 600; }
.account-link small { color: var(--muted); font-weight: 400; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.copy-field { width: 100%; font-family: ui-monospace, monospace; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.danger-zone { border-color: rgba(255, 107, 90, .45); }
.health-card .facts dd { white-space: pre-wrap; }
table.audit td { vertical-align: top; }
.ai-notice { margin: 0; font-size: 12px; color: var(--muted); border-left: 3px solid var(--accent); padding: 4px 8px; }

/* Einverständniserklärung (Tablet im Studio und Link auf dem Kunden-Handy) */
.consent-body { min-height: 100vh; }
.consent-page { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; display: grid; gap: 16px; }
.consent-head h1 { margin: 4px 0 12px; font-size: 26px; }
.consent-form { display: grid; gap: 16px; }
.consent-form h2 { margin: 0; font-size: 18px; }
.consent-form h3 { margin: 6px 0 0; font-size: 15px; }
.consent-form p { margin: 0; line-height: 1.55; }
.consent-form label { display: grid; gap: 6px; }
.consent-form label.check { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; cursor: pointer; }
.consent-form label.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.consent-form .question { border: 0; border-top: 1px solid var(--line); padding: 12px 0 0; margin: 0; display: grid; gap: 8px; }
.consent-form .question legend { padding: 0; line-height: 1.5; }
.consent-form .yesno { display: flex; gap: 22px; }
.consent-form .yesno label { display: flex; gap: 8px; align-items: center; font-size: 16px; }
.consent-form .yesno input { width: 22px; height: 22px; }
.sig-pad { position: relative; }
.sig-pad canvas { width: 100%; height: 190px; background: #fff; border-radius: 8px; touch-action: none; display: block; cursor: crosshair; }
.sig-pad .btn { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, .85); color: #222; border-color: #ccc; }
.btn.big { padding: 14px 20px; font-size: 17px; width: 100%; }
.consent-page [hidden] { display: none !important; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.sig-missing { color: var(--err); margin: 8px 0 0; font-weight: 600; }
.reminder-banner { display: block; margin: 0 0 14px; color: var(--text); text-decoration: none; }
.reminder-banner:hover { border-left-color: var(--accent); }
.thumb-locked { display: grid; place-items: center; width: 110px; height: 110px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; text-align: center; padding: 8px; }
.consent-qr { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.consent-qr .qr-box { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 8px; }
.consent-qr .qr-box svg { width: 100%; height: 100%; display: block; }
