/* ── Terminbuchung SaaS v10 – Design System ──────────────────────────────── */
/* Fonts: System-Stack — kein externes CDN nötig */

:root {
  --bg: #0f1117;
  --bg-2: #16191f;
  --bg-3: #1c2028;
  --border: #2a2d35;
  --border-2: #353840;
  --text: #e8eaed;
  --text-2: #9ca3af;
  --text-3: #6b7280;
  --primary: #6366f1;

  /* ── Status-Farben: einmal definiert, überall genutzt ─────────────── */
  --status-confirmed-bg:     #d1fae5;
  --status-confirmed-border: #6ee7b7;
  --status-confirmed-text:   #065f46;
  --status-confirmed-dot:    #10b981;

  --status-pending-bg:     #fef3c7;
  --status-pending-border: #fcd34d;
  --status-pending-text:   #92400e;
  --status-pending-dot:    #f59e0b;

  --status-cancelled-bg:     #fee2e2;
  --status-cancelled-border: #fca5a5;
  --status-cancelled-text:   #991b1b;
  --status-cancelled-dot:    #ef4444;

  --status-grey-bg:     #f3f4f6;
  --status-grey-border: #d1d5db;
  --status-grey-text:   #6b7280;
  --status-grey-dot:    #9ca3af;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99,102,241,0.12);
  --success: #10b981;
  --success-light: rgba(16,185,129,0.12);
  --warning: #f59e0b;
  --warning-light: rgba(245,158,11,0.12);
  --danger: #ef4444;
  --danger-light: rgba(239,68,68,0.12);
  --info: #3b82f6;
  --info-light: rgba(59,130,246,0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Mono', 'Consolas', monospace;
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg, #0f1117);
  color: var(--text, #e8eaed);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { color: var(--text-2); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }
code { font-family: var(--font-mono); background: var(--bg-3); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;    /* etwas mehr seitlich */
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-sm { padding: 16px; }
.card-lg { padding: 32px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius, 8px);
  font-family: var(--font, -apple-system, sans-serif); font-size: 0.9rem; font-weight: 500;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease,
              transform 0.1s ease, opacity 0.15s ease;
  text-decoration: none; white-space: nowrap; line-height: 1;
  min-height: 38px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative; /* für ::after Ripple-Vorbereitung */
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Primary */
.btn-primary {
  background: var(--primary, #6366f1); color: #fff; border-color: var(--primary, #6366f1);
  box-shadow: 0 1px 3px rgba(99,102,241,.3), 0 1px 2px rgba(0,0,0,.12);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover); border-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(99,102,241,.4), 0 2px 4px rgba(0,0,0,.15);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(99,102,241,.3);
}

/* Ghost */
.btn-ghost {
  background: transparent; color: var(--text-2); border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-3); color: var(--text); border-color: var(--border-2);
  transform: translateY(-1px);
}
.btn-ghost:active:not(:disabled) {
  transform: translateY(0);
  background: var(--bg-3);
}

/* Danger */
.btn-danger { background: var(--danger-light); color: var(--danger); border-color: transparent; }
.btn-danger:hover:not(:disabled) {
  background: var(--danger); color: #fff;
  box-shadow: 0 3px 10px rgba(239,68,68,.35);
  transform: translateY(-1px);
}
.btn-danger:active:not(:disabled) { transform: translateY(0); }

/* Success */
.btn-success { background: var(--success-light); color: var(--success); border-color: transparent; }
.btn-success:hover:not(:disabled) {
  background: var(--success); color: #fff;
  box-shadow: 0 3px 10px rgba(16,185,129,.35);
  transform: translateY(-1px);
}
.btn-success:active:not(:disabled) { transform: translateY(0); }

/* Warning */
.btn-warning { background: var(--warning-light); color: #92400e; border-color: transparent; }
.btn-warning:hover:not(:disabled) {
  background: var(--warning); color: #fff;
  box-shadow: 0 3px 10px rgba(245,158,11,.35);
  transform: translateY(-1px);
}
.btn-warning:active:not(:disabled) { transform: translateY(0); }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* ── Button-Hierarchie ────────────────────────────────────────────────────── */

/* btn-primary-lg: Die wichtigste Aktion auf der Seite — größer, stärker */
.btn-primary-lg {
  background: var(--primary); color: #fff; border-color: var(--primary);
  font-weight: 700; font-size: 0.95rem; padding: 11px 24px;
  box-shadow: 0 2px 8px rgba(99,102,241,.35), 0 1px 3px rgba(0,0,0,.15);
  letter-spacing: -0.01em;
}
.btn-primary-lg:hover:not(:disabled) {
  background: var(--primary-hover); border-color: var(--primary-hover);
  box-shadow: 0 6px 18px rgba(99,102,241,.45), 0 2px 6px rgba(0,0,0,.2);
  transform: translateY(-2px);
}
.btn-primary-lg:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}

/* btn-muted: Sekundäre Aktion — sichtbar aber zurückhaltend */
.btn-muted {
  background: transparent; color: var(--text-3);
  border-color: transparent; font-size: 0.85rem;
}
.btn-muted:hover:not(:disabled) {
  color: var(--text-2); background: var(--bg-3);
  border-color: var(--border);
}
.btn-muted:active:not(:disabled) { background: var(--bg-3); }

/* ── Form Elements ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 12px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font); font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  outline: none;
}
.form-input:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled),
.form-textarea:hover:not(:focus):not(:disabled) {
  border-color: var(--border-2);
  background: var(--bg-2);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
  background: var(--bg-2);
}
.form-input::placeholder { color: var(--text-3); transition: color 0.15s; }
.form-input:focus::placeholder { color: var(--text-2); opacity: 0.6; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-3); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-error { font-size: 0.82rem; color: var(--danger); margin-top: 4px; }
.form-help { font-size: 0.82rem; color: var(--text-3); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 500;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-neutral { background: var(--bg-3); color: var(--text-2); }
/* Status-specific semantic classes */
/* ── Status-Badges: ein einziges konsistentes System ─────────────────────── */
/* grün   = bestätigt  |  orange = Anfrage  |  rot = storniert  |  grau = sonstige */
/* ── Status-Badges: alle Farben über CSS-Variablen ─────────────────── */
.badge-status-confirmed { background: var(--status-confirmed-bg); color: var(--status-confirmed-text); border: 1px solid var(--status-confirmed-border); }
.badge-status-pending   { background: var(--status-pending-bg);   color: var(--status-pending-text);   border: 1px solid var(--status-pending-border); }
.badge-status-cancelled { background: var(--status-cancelled-bg); color: var(--status-cancelled-text); border: 1px solid var(--status-cancelled-border); }
.badge-status-completed { background: var(--status-grey-bg); color: var(--status-grey-text); border: 1px solid var(--status-grey-border); }
.badge-status-no_show   { background: var(--status-grey-bg); color: var(--status-grey-text); border: 1px solid var(--status-grey-border); }
.badge-status-blocked   { background: var(--status-grey-bg); color: var(--status-grey-text); border: 1px solid var(--status-grey-border); }

/* ── Kalender: Termin-Karten nach Status ───────────────────────────── */
.bk-status-confirmed { border-left-color: var(--status-confirmed-dot) !important; background: var(--status-confirmed-bg) !important; }
.bk-status-pending   { border-left-color: var(--status-pending-dot)   !important; background: var(--status-pending-bg)   !important; }
.bk-status-cancelled { border-left-color: var(--status-cancelled-dot) !important; opacity: 0.55; }
.bk-status-completed { border-left-color: var(--status-grey-dot)      !important; opacity: 0.7; }
.bk-status-blocked   { border-left-color: var(--status-grey-dot)      !important; background: var(--status-grey-bg) !important; }

/* ── Buchungstabelle: linker Rand je Zeile ─────────────────────────── */
tr.booking-row-confirmed td:first-child { border-left: 3px solid var(--status-confirmed-dot); }
tr.booking-row-pending   td:first-child { border-left: 3px solid var(--status-pending-dot); }
tr.booking-row-cancelled                { opacity: 0.6; }
tr.booking-row-completed                { opacity: 0.75; }

/* ── Dashboard-Terminkarten ────────────────────────────────────────── */
.dash-bk-confirmed { border-left-color: var(--status-confirmed-dot) !important; }
.dash-bk-pending   { border-left-color: var(--status-pending-dot) !important; }
.dash-bk-cancelled { border-left-color: var(--status-cancelled-dot) !important; opacity: 0.6; }

/* ── Slot-Buttons: frei grün, belegt grau ──────────────────────────── */
.slot-btn:not(:disabled) {
  border-color: var(--status-confirmed-border);
  background: var(--status-confirmed-bg);
  color: var(--status-confirmed-text);
}
.slot-btn:hover:not(:disabled) {
  border-color: var(--status-confirmed-dot);
  background: #bbf7d0;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16,185,129,.2);
}
.slot-btn.selected {
  background: var(--status-confirmed-dot);
  color: #fff;
  border-color: var(--status-confirmed-dot);
  box-shadow: 0 2px 8px rgba(16,185,129,.3);
}
.slot-btn:disabled {
  background: var(--status-grey-bg);
  border-color: var(--status-grey-border);
  color: var(--status-grey-text);
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-3); }
th { padding: 10px 14px; text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
td { padding: 11px 14px; font-size: 0.88rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: var(--bg-3); }
tr.booking-row { cursor: pointer; }
tr.booking-row:hover td { background: var(--bg-3); }
tr.booking-row:active td { background: var(--border); }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 0.88rem; display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-light); color: var(--success); border-color: rgba(16,185,129,0.2); }
.alert-error { background: var(--danger-light); color: var(--danger); border-color: rgba(239,68,68,0.2); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-color: rgba(245,158,11,0.2); }
.alert-info { background: var(--info-light); color: var(--info); border-color: rgba(59,130,246,0.2); }
.alert-hidden { display: none; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px; backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  width: 100%; max-width: 480px; max-height: 90vh;
  overflow-y: auto; position: relative;
  transform: translateY(16px); transition: transform var(--transition);
}
.modal-overlay.open .modal {
  transform: translateY(0);
  animation: fadeInUp 0.22s cubic-bezier(0.34,1.2,0.64,1) forwards;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-close { background: none; border: none; color: var(--text-3); cursor: pointer; padding: 4px; border-radius: 4px; transition: color var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; background: var(--bg-3); padding: 4px; border-radius: var(--radius); }
.tab-btn {
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  border: none; background: transparent; color: var(--text-2);
  transition: all var(--transition); white-space: nowrap;
}
.tab-btn.active { background: var(--bg-2); color: var(--text); box-shadow: var(--shadow); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--border) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Neue Keyframes */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  0%   { transform: scale(0.85); opacity: 0; }
  70%  { transform: scale(1.04); }
  100% { transform: scale(1);    opacity: 1; }
}
@keyframes successPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
@keyframes checkmark {
  0%   { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}

/* Animierbare Elemente */
.animate-fadeInUp  { animation: fadeInUp 0.22s ease forwards; }
.animate-popIn     { animation: popIn 0.28s cubic-bezier(0.34,1.56,0.64,1) forwards; }

/* Erfolgs-Pulse auf einem Element */
.success-pulse { animation: successPulse 0.6s ease-out; }

/* Neue Karte taucht auf */
.card-enter {
  animation: fadeInUp 0.2s ease forwards;
}
/* Staggered Listen-Items */
.list-item-enter {
  animation: fadeInUp 0.18s ease both;
}
.list-item-enter:nth-child(1) { animation-delay: 0ms; }
.list-item-enter:nth-child(2) { animation-delay: 40ms; }
.list-item-enter:nth-child(3) { animation-delay: 80ms; }
.list-item-enter:nth-child(4) { animation-delay: 120ms; }
.list-item-enter:nth-child(5) { animation-delay: 160ms; }
.list-item-enter:nth-child(n+6) { animation-delay: 200ms; }

/* ── Spinner (inline) ─────────────────────────────────────────────────────── */
.spinner-sm {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.spinner-sm.dark {
  border-color: rgba(0,0,0,.12);
  border-top-color: var(--text-2);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton-Varianten */
.skeleton-line {
  height: 14px; border-radius: 4px; margin-bottom: 6px;
}
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }

/* btn im Lade-Zustand */
.btn.loading {
  pointer-events: none;
  opacity: 0.75;
}
.btn.loading .btn-text { opacity: 0.7; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 13px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.88rem; font-weight: 500;
  background: var(--bg-2);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,.2), 0 2px 6px rgba(0,0,0,.1);
  animation: toastIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  max-width: 360px;
  display: flex; align-items: center; gap: 12px;
  pointer-events: all;
  position: relative; overflow: hidden;
}
/* Farbige linke Linie */
.toast::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
/* Icon-Kreis */
.toast-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  flex-shrink: 0;
}
.toast-msg { flex: 1; line-height: 1.4; }

/* Varianten */
.toast.success {
  border-color: var(--status-confirmed-border);
  color: var(--text);
}
.toast.success::before { background: var(--status-confirmed-dot); }
.toast.success .toast-icon {
  background: var(--status-confirmed-bg);
  color: var(--status-confirmed-dot);
}

.toast.error {
  border-color: var(--status-cancelled-border);
  color: var(--text);
}
.toast.error::before { background: var(--status-cancelled-dot); }
.toast.error .toast-icon {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-dot);
}

.toast.info {
  border-color: var(--border-2);
  color: var(--text);
}
.toast.info::before { background: var(--primary); }
.toast.info .toast-icon {
  background: var(--primary-light);
  color: var(--primary);
}

/* Einblend-Animation: etwas überschießend für "Wertigkeit" */
@keyframes toastIn {
  from { transform: translateX(calc(100% + 20px)); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
/* Ausblend */
.toast.leaving {
  animation: toastOut 0.22s ease forwards;
}
@keyframes toastOut {
  to { transform: translateX(calc(100% + 20px)); opacity: 0; }
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.78rem; }
.text-muted { color: var(--text-3); }
.text-center { text-align: center; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.06) 0%, transparent 50%),
              var(--bg);
}
.auth-box { width: 100%; max-width: 420px; }
.auth-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 32px; justify-content: center;
}
.auth-logo-mark {
  width: 40px; height: 40px; background: var(--primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.auth-logo-text { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.03em; }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--text-3); font-size: 0.9rem; margin-bottom: 24px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-3); }

/* ── Dashboard layout ────────────────────────────────────────────────────── */
.dashboard {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; display: flex; flex-direction: column;
}
.sidebar-logo { padding: 0 20px 20px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.sidebar-logo-inner { display: flex; align-items: center; gap: 10px; }
.sidebar-logo-mark { width: 34px; height: 34px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.nav-section { padding: 8px 12px; }
.nav-section-label { font-size: 0.7rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; padding: 0 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: all var(--transition);
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-3); color: var(--text); transform: translateX(2px); }
.nav-item:active { transform: translateX(0); background: var(--border); }
.nav-item.active { background: var(--primary-light); color: var(--primary); }
.nav-item .icon { width: 18px; text-align: center; flex-shrink: 0; }
.main-content { padding: 28px 28px 40px; overflow-y: auto; }
.page-header { margin-bottom: 28px; }
.page-header h1 { margin-bottom: 4px; }

/* ── Stats Cards ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { padding: 20px 24px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.stat-card .label { font-size: 0.78rem; font-weight: 500; color: var(--text-3); margin-bottom: 6px; }
.stat-card .value { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em; }
.stat-card .change { font-size: 0.78rem; color: var(--text-3); margin-top: 4px; }

/* ── Booking Calendar ────────────────────────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-day-header { padding: 6px; text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--text-3); }
.cal-day {
  aspect-ratio: 1; padding: 6px;
  background: var(--bg-3); border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition);
  display: flex; flex-direction: column; align-items: center;
  font-size: 0.82rem;
}
.cal-day:hover { background: var(--border); transform: scale(1.08); z-index: 1; }
.cal-day:active { transform: scale(0.96); }
.cal-day.today { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.cal-day.other-month { opacity: 0.3; }
.cal-day.has-bookings::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--primary); margin-top: 2px;
}
.cal-day.selected { background: var(--primary); color: #fff; }
.cal-day.blocked { background: var(--danger-light); color: var(--danger); }

/* ── Day Schedule View ───────────────────────────────────────────────────── */
.schedule-timeline { position: relative; }
.time-slot {
  display: grid; grid-template-columns: 50px 1fr;
  min-height: 60px; border-bottom: 1px solid var(--border);
}
.time-label { font-size: 0.75rem; color: var(--text-3); padding-top: 8px; }
.booking-block {
  margin: 2px 4px; padding: 6px 10px;
  border-radius: var(--radius-sm); font-size: 0.82rem;
  border-left: 3px solid; cursor: pointer;
  transition: opacity var(--transition);
}
.booking-block:hover { opacity: 0.85; transform: translateX(2px); }

/* ── Booking page ────────────────────────────────────────────────────────── */
.booking-page {
  min-height: 100vh;
  background: var(--bg);
  padding: 24px 16px 48px;
}
.booking-container { max-width: 640px; margin: 0 auto; }
.step-indicator {
  display: flex; align-items: center; gap: 0; margin-bottom: 32px;
}
.step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-3); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600; color: var(--text-3);
  flex-shrink: 0; transition: all var(--transition); position: relative; z-index: 1;
}
.step-dot.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-dot.done { background: var(--success); border-color: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); }
.step-line.done { background: var(--success); }

/* ── Color Picker ────────────────────────────────────────────────────────── */
.color-options { display: flex; flex-wrap: wrap; gap: 8px; }
.color-opt {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform var(--transition), border-color var(--transition);
}
.color-opt:hover, .color-opt.selected { transform: scale(1.15); border-color: var(--text); }

/* ── Switch ──────────────────────────────────────────────────────────────── */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 22px; transition: background var(--transition);
}
.switch-slider::before {
  content: ''; position: absolute; height: 16px; width: 16px;
  left: 2px; bottom: 2px; background: var(--text-3);
  border-radius: 50%; transition: transform var(--transition), background var(--transition);
}
.switch input:checked + .switch-slider { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); background: #fff; }

/* ── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px; text-align: center;
  color: var(--text-3);
}
.empty-state .empty-icon { font-size: 2.8rem; margin-bottom: 12px; opacity: 0.7; }
.empty-state h3 { font-size: 1rem; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.empty-state p  { font-size: 0.88rem; margin-bottom: 20px; max-width: 300px; }

/* ── Form help improvements ──────────────────────────────────────────────────── */
.field-error {
  font-size: 0.8rem; color: var(--danger);
  margin-top: 4px; display: none; align-items: center; gap: 4px;
}
.field-error.visible { display: flex; }
.form-input.error, .form-select.error, .form-textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-light);
}
.required-mark { color: var(--danger); margin-left: 2px; }

/* ── Day booking block color variants ────────────────────────────────────────── */
.booking-block-pending   { background: var(--warning-light); border-left-color: var(--warning); }
.booking-block-confirmed { background: var(--success-light); border-left-color: var(--success); }
.booking-block-cancelled { background: var(--bg-3); border-left-color: var(--text-3); opacity: 0.6; }

/* ── Mobile action bar (bottom) ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-action-bar {
    display: flex; gap: 8px; padding: 12px 16px;
    background: var(--bg-2); border-top: 1px solid var(--border);
    position: sticky; bottom: 0; z-index: 40;
  }
  .mobile-action-bar .btn { flex: 1; justify-content: center; }
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dashboard { grid-template-columns: 1fr; }
  .sidebar {
    display: none; position: fixed; z-index: 100;
    width: 260px; height: 100vh; top: 0; left: 0;
  }
  .sidebar.open { display: flex; box-shadow: var(--shadow-lg); }
  .mobile-nav-bar {
    display: flex !important;
    align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
  }
  .sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 99;
  }
  .sidebar-backdrop.open { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .main-content { padding: 12px; padding-top: 0; }
  .modal { padding: 18px; max-width: 100%; margin: 10px; }
  .table-wrap { font-size: 0.82rem; }
  th, td { padding: 8px 10px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-header .btn { width: 100%; justify-content: center; }
  .cal-grid > * { font-size: 0.75rem; }
}

@media (min-width: 769px) {
  .mobile-nav-bar { display: none !important; }
  .sidebar-backdrop { display: none !important; }
}


/* ── UX-Verbesserungen ───────────────────────────────────────────────────── */
/* Status-Aliase */
.status-confirmed { background: var(--status-confirmed-bg); color: var(--status-confirmed-text); }
.status-pending   { background: var(--status-pending-bg);   color: var(--status-pending-text); }
.status-cancelled { background: var(--status-cancelled-bg); color: var(--status-cancelled-text); }
.status-completed { background: var(--status-grey-bg); color: var(--status-grey-text); }
.status-no_show   { background: var(--status-grey-bg); color: var(--status-grey-text); }

/* Klarerer Fokus-Ring für Barrierefreiheit */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Setup-Karten Hover-Feedback */
.setup-step-done { border-color: var(--success) !important; background: var(--success-light) !important; }

/* Booking-Seite: Service-Karte mit Preis übersichtlicher */
.service-price-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.service-price-tag.free {
  background: var(--success-light);
  color: var(--success);
}

/* Leere Zustände */
.empty-state-inline {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}
.empty-state-inline .empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state-inline h3 { color: var(--text-2); margin-bottom: 6px; }
.empty-state-inline p  { font-size: 0.88rem; margin-bottom: 20px; }

/* Bestätigter Termin in Tagesansicht: grüner linker Rand */
.bk-confirmed { border-left-color: var(--success) !important; }
.bk-pending   { border-left-color: var(--warning) !important; }
.bk-cancelled { border-left-color: var(--text-3)  !important; opacity: 0.6; }

/* Loading-State für Buttons */
button[disabled]:not(.slot-btn):not(.mini-cal-day) {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Slot-Buttons: verbesserter Hover und Selektion */
.slot-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(99,102,241,.15);
}

/* Mobile: Einstellungsseite Cards untereinander */
@media (max-width: 640px) {
  #section-branding > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  #section-overview > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .setup-banner-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Buchungszeilen Hintergrundfarbe nach Status */
tr.booking-row-confirmed td { border-left: 3px solid #10b981; }
tr.booking-row-pending   td:first-child { border-left: 3px solid #f59e0b; }
tr.booking-row-cancelled { opacity: 0.55; }
tr.booking-row-completed { opacity: 0.7; }
/* ── Leere Zustände: konsistentes Design ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}
.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}
.empty-state h3 {
  margin-bottom: 6px;
  color: var(--text-2);
  font-size: 1rem;
}
.empty-state p {
  font-size: 0.88rem;
  margin-bottom: 20px;
  line-height: 1.5;
}
/* Primäre Aktions-Buttons: stärker hervorheben */
.btn-primary {
  font-weight: 600;
  letter-spacing: -0.01em;
}
/* Wichtige CTAs im leeren Zustand */
.empty-state .btn-primary {
  padding: 10px 24px;
  font-size: 0.92rem;
}

/* ════════════════════════════════════════════════════════════════════════════
   MOBILE-OPTIMIERUNGEN — sauber konsolidiert
   Breakpoints:
     ≤768px  = Tablet + Handy  (Sidebar, Modals, Kalender)
     ≤640px  = Handy           (Formulare, Buchungsseite, Slots)
     ≤480px  = kleines Handy   (extra Verdichtung)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 1. TOUCH-TARGETS: alle Elemente ≥44px ────────────────────────────────── */
@media (max-width: 768px) {

  button, .btn, a.btn,
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="number"], input[type="password"], input[type="date"],
  input[type="time"], select, textarea {
    min-height: 44px;
  }
  input[type="checkbox"] { width: 22px; height: 22px; min-height: unset; }
  input[type="radio"]    { width: 22px; height: 22px; min-height: unset; }

  /* Inputs: 16px verhindert iOS-Auto-Zoom */
  .form-input, .form-select, .form-textarea {
    font-size: 16px !important;
    padding: 13px 14px;
    border-radius: var(--radius);
  }
  .form-textarea { min-height: 100px; }

  /* Buttons: größere Tap-Fläche */
  .btn:not(.btn-icon):not(.btn-sm) { padding: 12px 20px; font-size: 0.95rem; }
  .btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.85rem; }
  .btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.05rem; }
  .btn-icon { min-height: 44px; min-width: 44px; }

  /* Switch-Toggle: größer */
  .switch .switch-slider { width: 46px; height: 26px; }
  .switch .switch-slider::before { width: 20px; height: 20px; top: 3px; left: 3px; }
  input:checked + .switch-slider::before { transform: translateX(20px); }
}

/* ── 2. LAYOUT & NAVIGATION ───────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Dashboard-Raster → 1-Spalte */
  .dashboard { grid-template-columns: 1fr; }

  /* Main-Content: kein seitliches Padding-Problem */
  .main-content { padding: 12px; padding-top: 0; }

  /* Sidebar: Overlay */
  .sidebar {
    display: none; position: fixed; z-index: 100;
    width: 280px; height: 100vh; top: 0; left: 0;
    overflow-y: auto;
  }
  .sidebar.open { display: flex; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99; }
  .sidebar-backdrop.open { display: block; }

  /* Sidebar Nav-Items: große Touch-Targets */
  .sidebar .nav-item { min-height: 52px; font-size: 1rem; padding: 14px 16px; }
  .sidebar .icon { font-size: 1.15rem; }

  /* Mobile-Nav-Bar */
  .mobile-nav-bar {
    display: flex !important;
    align-items: center; justify-content: space-between;
    padding: 10px 16px; min-height: 56px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
  }
  .mobile-nav-bar > button:first-child { min-height: 44px; min-width: 44px; font-size: 1.3rem; }

  /* Page-Header: Stack auf Mobile */
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-header > .btn,
  .page-header > div + .btn { width: 100%; justify-content: center; }

  /* Cards: kompakteres Padding */
  .card { padding: 16px !important; }
  .card-sm { padding: 12px !important; }

  /* Form-Rows: immer einspaltig */
  .form-row { grid-template-columns: 1fr !important; }
}

@media (min-width: 769px) {
  .mobile-nav-bar { display: none !important; }
  .sidebar-backdrop { display: none !important; }
}

/* ── 3. MODALS: Bottom-Sheet auf Mobile ───────────────────────────────────── */
@media (max-width: 768px) {

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    border-radius: 18px 18px 0 0;
    max-width: 100% !important;
    max-height: 88vh;
    overflow-y: auto;
    margin: 0 !important;
    padding: 20px 20px 32px;
    /* Safe-area für iPhone mit Home-Indicator */
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
  /* Drag-Handle Indikator */
  .modal::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    background: var(--border-2);
    border-radius: 2px;
    margin: 0 auto 20px;
  }
  .modal-footer {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }
  .modal-footer .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  /* Primärer Button zuerst */
  .modal-footer .btn-primary { order: 1; }
  .modal-footer .btn-ghost   { order: 2; }
}

/* ── 4. DASHBOARD ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* 2-Spalten → 1-Spalte */
  #section-overview > div[style*="grid-template-columns:1fr 1fr"],
  #section-overview > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Pending-Zeilen: Stack auf sehr schmalem Screen */
  .dash-pending-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 12px 8px !important;
  }
  .dash-pending-row > div:last-child {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .dash-pending-row .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ── 5. BUCHUNGSTABELLE ───────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Spalten ausblenden */
  .bookings-table-hide-mobile { display: none !important; }
  .table-wrap { font-size: 0.84rem; border-radius: var(--radius); }
  th, td { padding: 10px 10px; }

  /* Aktionsbuttons: Stack */
  .table-wrap td:last-child > div { flex-direction: column; gap: 6px; }
  .table-wrap td:last-child .btn { width: 100%; justify-content: center; min-height: 40px; }
}

@media (max-width: 480px) {
  /* Tabelle auf kleinem Handy: Karten-Ansicht */
  .table-wrap table { display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: block; }
  .table-wrap tr.booking-row {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 12px 14px;
    background: var(--bg-2);
    gap: 4px;
  }
  .table-wrap tr.booking-row td {
    display: block;
    padding: 0;
    border: none;
  }
  /* Datum + Zeit inline */
  .table-wrap tr.booking-row td:nth-child(1),
  .table-wrap tr.booking-row td:nth-child(2) {
    display: inline;
    font-size: 0.78rem;
    color: var(--text-3);
    font-weight: 600;
  }
  .table-wrap tr.booking-row td:nth-child(2)::before { content: ' · '; }
  /* Kundenname: groß */
  .table-wrap tr.booking-row td:nth-child(3) {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 4px 0 2px;
  }
  /* Aktionen: volle Breite */
  .table-wrap tr.booking-row td:last-child { margin-top: 8px; }
}

/* ── 6. KALENDER ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* 2-Spalten → 1-Spalte: Mini-Kal oben, Tage unten */
  #section-calendar > div[style*="grid-template-columns:280px"],
  #section-calendar > div[style*="grid-template-columns: 280px"],
  #section-calendar > div[style*="grid-template-columns:320px"],
  #section-calendar > div[style*="grid-template-columns: 320px"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Kalender-Tage: größer für Touch */
  .cal-day {
    min-height: 40px !important;
    font-size: 0.85rem;
  }
  .cal-day-header { font-size: 0.75rem; padding: 4px 0; }

  /* Staff-Chips: horizontal scrollbar statt umbrechen */
  #staffChips {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px !important;
    padding-bottom: 2px;
  }
  #staffChips::-webkit-scrollbar { display: none; }

  /* Terminblöcke: etwas größer */
  .day-booking { padding: 13px 14px; }
  .day-booking .bk-name { font-size: 1rem; }
  .day-booking .bk-time { font-size: 0.82rem; }
}

/* ── 7. BUCHUNGSSEITE (Kundensicht) ───────────────────────────────────────── */
@media (max-width: 640px) {

  /* Schritt-Indikator */
  .step-indicator { gap: 4px; margin-bottom: 24px !important; }
  .step-dot { width: 30px !important; height: 30px !important; font-size: 0.8rem !important; }

  /* Service-Karten */
  .service-card { padding: 14px 16px; }
  .service-card:active { transform: scale(0.98); }

  /* Mitarbeiter-Auswahl: einspaltig */
  #staffList { grid-template-columns: 1fr !important; gap: 8px !important; }
  .staff-card-pick { padding: 14px 16px; min-height: 56px; }

  /* Kalender + Slots: Stack */
  #step2 > div[style*="grid-template-columns:1fr 1fr"],
  #step2 > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Slot-Buttons: 3-spaltig, groß */
  #slotsGrid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .slot-btn {
    min-height: 52px !important;
    padding: 10px 6px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
  }
  /* Aktiver Slot: deutlicheres Feedback */
  .slot-btn.selected { transform: scale(1.04); }

  /* Kontaktformular: volle Breite, Stack */
  #step3 .form-row { grid-template-columns: 1fr !important; }
  #custName, #custEmail, #custPhone { min-height: 52px; font-size: 16px; }

  /* Submit-Button: volle Breite, groß */
  #submitBtn { width: 100%; min-height: 56px; font-size: 1.05rem; font-weight: 700; }

  /* Buchungslink-Box */
  .ob-link-box { flex-direction: column; gap: 10px; }
  .ob-link-box code { width: 100%; }
  .ob-link-box .btn { width: 100%; justify-content: center; }
}

/* ── 8. ONBOARDING ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {

  .ob-wrap { padding: 16px 12px 80px; }
  .ob-card { padding: 20px 16px; border-radius: 14px; }

  /* Aktions-Buttons: Stack, primärer oben */
  .ob-actions { flex-direction: column-reverse; gap: 10px; }
  .ob-actions .btn { width: 100%; min-height: 52px; justify-content: center; font-size: 1rem; }

  /* Öffnungszeiten-Reihen: umbrechen */
  #ob-hours-editor > div { flex-wrap: wrap; gap: 8px; }
  #ob-hours-editor select { min-width: 130px; }
  #ob-hours-editor input[type="time"] { min-width: 100px; }
}

/* ── 9. ADMIN-FORMULARE ───────────────────────────────────────────────────── */
@media (max-width: 640px) {

  /* Settings-Tabs: horizontal scroll */
  #section-branding > div[style*="border-bottom"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
  }
  #section-branding > div[style*="border-bottom"]::-webkit-scrollbar { display: none; }

  /* Settings-Cards: einspaltig */
  #stab-branding > div[style*="grid"],
  #section-branding > div[style*="grid"] { grid-template-columns: 1fr !important; }
  #stab-buchung .card { max-width: 100% !important; }

  /* Details/Summary: großer Tap-Bereich */
  details summary { padding: 14px 0; font-size: 0.92rem; }

  /* Staff-Modal: Farb-Picker umbrechen */
  #staffColorOptions,
  #ob-color-picker { flex-wrap: wrap !important; gap: 10px !important; }
}

/* ── 10. KLEINSTES HANDY (≤380px) ────────────────────────────────────────── */
@media (max-width: 380px) {

  .main-content { padding: 8px; }
  .card { padding: 12px !important; }
  .btn:not(.btn-icon) { font-size: 0.88rem; }
  .modal { padding: 16px 14px 28px; }

  /* Slot-Grid: 2 Spalten statt 3 */
  #slotsGrid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Überschriften kleiner */
  h1 { font-size: 1.3rem !important; }
  .ob-title { font-size: 1.15rem !important; }
}

/* ── 11. iOS SAFE-AREA (Notch / Home-Indicator) ───────────────────────────── */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .main-content {
      padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
    .mobile-nav-bar {
      padding-top: max(10px, env(safe-area-inset-top));
    }
  }
}

/* ── 12. AUTH-SEITEN MOBILE ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-page { padding: 12px; align-items: flex-start; padding-top: 24px; }
  .auth-box { max-width: 100%; }
  .auth-logo { margin-bottom: 20px; }
  .card.card-lg { padding: 20px 16px !important; }
  .auth-title { font-size: 1.3rem; }

  /* iOS-Zoom verhindern: alle Inputs auf 16px */
  .auth-page input[type="email"],
  .auth-page input[type="password"],
  .auth-page input[type="text"] {
    font-size: 16px !important;
    min-height: 48px;
  }

  /* Submit-Button: volle Breite, groß */
  .auth-page .btn-full { min-height: 52px; font-size: 1rem; }
}

/* ── 13. KALENDER TAGANSICHT MOBILE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Day-nav Buttons: ausreichend groß für Touch */
  .btn.btn-ghost.btn-icon.btn-sm {
    min-height: 44px !important;
    min-width: 44px !important;
    font-size: 1.2rem !important;
  }

  /* Staff-Legend: umbrechend unter Navigation statt rechts */
  #dayViewHeader {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  #staffLegend {
    justify-content: flex-start !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    max-width: 100%;
    padding-bottom: 2px;
  }
  #staffLegend::-webkit-scrollbar { display: none; }
}

/* ── 14. BOOKING.HTML MOBILE: iOS-Zoom-Schutz ──────────────────────────────── */
@media (max-width: 640px) {
  .booking-container input[type="text"],
  .booking-container input[type="email"],
  .booking-container input[type="tel"],
  .booking-container input[type="date"],
  .booking-container select,
  .booking-container textarea {
    font-size: 16px !important;
    min-height: 48px;
  }
  .booking-container textarea { min-height: 80px; }

  /* Buchungs-Header: Logo kleiner */
  .booking-header { padding: 12px 16px; }
  .booking-logo { height: 32px; max-height: 32px; }

  /* Erfolgs-Screen: zentriert */
  #stepSuccess { padding: 24px 16px; }
}

/* ── 15. TABELLEN-FILTER MOBILE ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Filter-Zeile über Buchungstabelle: Stack */
  #section-bookings .page-header + div,
  .table-filters {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .table-filters select,
  .table-filters input[type="date"] {
    width: 100% !important;
    font-size: 16px !important;
    min-height: 44px;
  }
}

/* ── Weißraum-System ─────────────────────────────────────────────────────── */
.section-gap   { margin-bottom: 24px; }
.section-gap-lg { margin-bottom: 32px; }

/* Heading-Hierarchie: h1 > h2 > h3 */
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 0.95rem; font-weight: 700; }

/* Dezente Labels / Metainfo */
.meta-text {
  font-size: 0.74rem;
  color: var(--text-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Primäre Info in Karten */
.card-primary {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

/* Sekundäre Info / Hilfstext */
.card-secondary {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 2px;
}

/* ── Einheitliches Abstands-System ──────────────────────────────────────── */
/* Formulare: konsistente Abstände */
.form-group { margin-bottom: 18px; }  /* vereinheitlicht von 16px */

/* Karten-Inhalts-Gap */
.card-body-gap { display: flex; flex-direction: column; gap: 16px; }

/* Grid-Abstände standardisiert */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
