/* ── Reset & Variablen ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ui-zoom:       1;    /* wird von appApplyUiZoom() gesetzt — Viewport-Einheiten muessen dadurch geteilt werden */
  --primary:       #35506f;
  --primary-dark:  #24384f;
  --primary-light: #4a6d94;
  --primary-pale:  #eef2f7;
  --text:          #1a2a3a;
  --text-muted:    #6b7f95;
  --border:        #e2e8f0;
  --bg:            #f8fafc;
  --white:         #ffffff;
  --danger:        #e74c3c;
  --success:       #27ae60;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 2px 12px rgba(0,0,0,.07);
  --nav-h:         100px;
}

/* ── Windows-Schrift: Segoe UI mit gezaehmten Gewichten ──────────────────────
   Auf dem Mac greift -apple-system (SF Pro), dort passen alle Gewichte.
   Segoe UI hat kein 800er-Gewicht: Chrome nimmt dann "Segoe UI Black" (900),
   dadurch wirken Zahlen und Titel gedrungen. Diese Zuordnung bildet 700–900
   auf das normale Fett ab, 600 auf Semibold, 500 auf Regular. */
@font-face {
  font-family: 'Schichtwerk UI';
  font-weight: 300 350;
  src: local('Segoe UI Light'), local('Segoe UI');
}
@font-face {
  font-family: 'Schichtwerk UI';
  font-weight: 400 599;
  src: local('Segoe UI');
}
@font-face {
  font-family: 'Schichtwerk UI';
  font-weight: 600 699;
  src: local('Segoe UI Semibold'), local('Segoe UI');
}
@font-face {
  font-family: 'Schichtwerk UI';
  font-weight: 700 900;
  src: local('Segoe UI Bold'), local('Segoe UI');
}

/* Datum-, Uhrzeit- und Zahlenfelder (Lars 11.10.2026): Chromium nimmt in diesen Feldern von sich aus eine
   Monospace-Schrift – die Null hat dann einen Strich. Hier die normale App-Schrift mit gleich breiten Ziffern. */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="number"] {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Schichtwerk UI', 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  height: calc(100dvh / var(--ui-zoom));
  overflow: hidden;
}

/* ── Utilities ─────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Splash-Screen ────────────────────────────────────── */
#screen-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a2d44;
  transition: opacity .5s ease, visibility .5s ease;
}
#screen-splash.splash-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  animation: splashFadeIn .6s ease both;
}

.splash-logo {
  width: 80px;
  height: auto;
  margin-bottom: 24px;
}

.splash-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
}

.splash-sub {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.splash-dots {
  display: flex;
  gap: 8px;
  margin-top: 36px;
}
.splash-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  animation: splashDot 1.2s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: .15s; }
.splash-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes splashDot {
  0%, 60%, 100% { opacity: .35; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.3); }
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Login-Screen ──────────────────────────────────────── */
#screen-login {
  min-height: calc(100dvh / var(--ui-zoom));
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a2a3a 0%, #2c4460 25%, #35506f 50%, #2a3f57 75%, #1e3048 100%);
  position: relative;
  overflow: hidden;
}

#screen-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 20% 20%, rgba(53,80,111,.4) 0%, transparent 70%),
    radial-gradient(ellipse 700px 500px at 80% 80%, rgba(26,42,58,.6) 0%, transparent 70%),
    radial-gradient(circle 400px at 60% 30%, rgba(255,255,255,.03) 0%, transparent 60%);
  pointer-events: none;
}

/* Animated background shapes */
.login-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: loginShapeFloat 20s ease-in-out infinite;
}

.login-shape--1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(53,80,111,.15) 0%, transparent 70%);
  top: -80px; left: -60px;
  animation-delay: 0s;
  animation-duration: 22s;
}
.login-shape--2 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(96,165,250,.08) 0%, transparent 70%);
  top: 30%; right: -40px;
  animation-delay: -4s;
  animation-duration: 18s;
}
.login-shape--3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,.04) 0%, transparent 70%);
  bottom: -60px; left: 20%;
  animation-delay: -8s;
  animation-duration: 25s;
}
.login-shape--4 {
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(53,80,111,.12) 0%, transparent 70%);
  top: 60%; right: 15%;
  animation-delay: -12s;
  animation-duration: 20s;
}
.login-shape--5 {
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(96,165,250,.06) 0%, transparent 70%);
  top: 15%; left: 35%;
  animation-delay: -6s;
  animation-duration: 24s;
}

@keyframes loginShapeFloat {
  0%   { opacity: 0; transform: translate(0, 0) scale(1); }
  20%  { opacity: 1; }
  50%  { transform: translate(30px, -20px) scale(1.1); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-20px, 30px) scale(0.95); }
}

/* Login wrapper for vertical layout */
.login-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  padding: 0 20px;
  animation: loginFadeIn .6s ease-out both;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Branding above the card */
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.login-brand-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Echtes Schichtwerk-Logo (09.10.2026) statt generischem Symbol */
.login-brand-icon img {
  display: block;
  width: 33px;
  height: 36px;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
}

.login-brand-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1.1;
}

.login-brand-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.login-card {
  background: var(--white);
  border-radius: 18px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25), 0 4px 12px rgba(0,0,0,.08);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.6);
  border-top: 1px solid rgba(255,255,255,.8);
}

.login-logo {
  margin-bottom: 28px;
}

.login-logo h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
}

.login-logo p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.login-card input[type="email"],
.login-card input[type="password"] {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  color: var(--text);
  background: var(--white);
}

.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(53,80,111,.08);
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 20px;
  -webkit-user-select: none;
  user-select: none;
}
.login-remember input[type="checkbox"] {
  display: none;
}
.login-remember .check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.login-remember .check-box svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity .15s;
  color: #fff;
}
.login-remember input:checked + .check-box {
  background: var(--primary);
  border-color: var(--primary);
}
.login-remember input:checked + .check-box svg {
  opacity: 1;
}

.login-card .btn-primary {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  border-radius: 12px;
}

.login-forgot {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  margin-top: 16px;
  opacity: .7;
  transition: opacity .15s;
}
.login-forgot:hover { opacity: 1; }

.login-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s;
}
.login-google:hover { border-color: var(--primary); }
.login-google:disabled { opacity: .5; cursor: not-allowed; }
/* Anmelden mit Apple (12.10.2026): schwarz nach Apples Vorgabe, gleiche Größe wie Google */
.login-apple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 13px 20px;
  border: 1.5px solid #000;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.login-apple:hover { background: #1d1d1f; }
.login-apple:disabled { opacity: .5; cursor: not-allowed; }
.login-apple:first-child { margin-top: 0; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-success {
  font-size: 13px;
  color: #166534;
  background: #dcfce7;
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  margin-top: 12px;
}

#login-error,
#reset-pw-error,
#verify-error {
  background: #fef2f2;
  color: var(--danger);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 18px;
}

/* ── Rechtliche Zustimmung ──────────────────────────── */
#screen-legal {
  min-height: calc(100dvh / var(--ui-zoom));
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a2a3a 0%, #2c4460 25%, #35506f 50%, #2a3f57 75%, #1e3048 100%);
  position: relative;
  overflow: hidden;
  z-index: 100;
}
#screen-legal::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 20% 20%, rgba(53,80,111,.4) 0%, transparent 70%),
    radial-gradient(ellipse 700px 500px at 80% 80%, rgba(26,42,58,.6) 0%, transparent 70%),
    radial-gradient(circle 400px at 60% 30%, rgba(255,255,255,.03) 0%, transparent 60%);
  pointer-events: none;
}
.legal-card {
  max-width: 480px;
}
.legal-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.legal-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.legal-item input[type="checkbox"] {
  display: none;
}
.legal-item .check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background .15s, border-color .15s;
}
.legal-item .check-box svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity .15s;
  color: #fff;
}
.legal-item input:checked + .check-box {
  background: var(--primary);
  border-color: var(--primary);
}
.legal-item input:checked + .check-box svg {
  opacity: 1;
}
.legal-item a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-item a:hover {
  color: var(--primary-light);
}
#legal-accept-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ── Verifizierungs-Code-Eingabe ──────────────────────────── */
#screen-verify {
  min-height: calc(100dvh / var(--ui-zoom));
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a2a3a 0%, #2c4460 25%, #35506f 50%, #2a3f57 75%, #1e3048 100%);
  position: relative;
  overflow: hidden;
  z-index: 100;
}
#screen-verify::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 20% 20%, rgba(53,80,111,.4) 0%, transparent 70%),
    radial-gradient(ellipse 700px 500px at 80% 80%, rgba(26,42,58,.6) 0%, transparent 70%),
    radial-gradient(circle 400px at 60% 30%, rgba(255,255,255,.03) 0%, transparent 60%);
  pointer-events: none;
}
.verify-code-inputs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.verify-digit {
  width: 48px;
  height: 56px;
  border: 2px solid var(--border);
  border-radius: 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
  caret-color: var(--primary);
}
.verify-digit:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-pale);
}
.verify-code-sep {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 2px;
}

/* ── Passwort-Reset-Screen ────────────────────────────── */
#screen-reset-pw {
  min-height: calc(100dvh / var(--ui-zoom));
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a2a3a 0%, #2c4460 25%, #35506f 50%, #2a3f57 75%, #1e3048 100%);
  position: relative;
  overflow: hidden;
}
#screen-reset-pw::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 20% 20%, rgba(53,80,111,.4) 0%, transparent 70%),
    radial-gradient(ellipse 700px 500px at 80% 80%, rgba(26,42,58,.6) 0%, transparent 70%),
    radial-gradient(circle 400px at 60% 30%, rgba(255,255,255,.03) 0%, transparent 60%);
  pointer-events: none;
}
#screen-reset-pw .login-card {
  position: relative;
  z-index: 1;
  animation: loginFadeIn .6s ease-out both;
}

/* ── App-Shell ─────────────────────────────────────────── */
#screen-app {
  height: calc(100dvh / var(--ui-zoom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header ────────────────────────────────────────────── */
.app-header {
  display: none;
}

.app-header-brand {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#app-admin-name {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Tab-Inhalt ────────────────────────────────────────── */
.app-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: linear-gradient(160deg, #eef3f7 0%, #dce5ed 100%);
}

.tab-pane {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  z-index: 1;
}

/* Tab-Panes: visibility statt display:none für flüssiges Umschalten */
#tab-dashboard.hidden,
#tab-kalender.hidden,
#tab-planung.hidden,
#tab-team.hidden,
#tab-terminal.hidden,
#tab-einstellungen.hidden {
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 0 !important;
}
#tab-dashboard.hidden    { display: block !important; }
#tab-kalender.hidden     { display: flex !important; }
#tab-planung.hidden      { display: block !important; }
#tab-team.hidden         { display: flex !important; }
#tab-terminal.hidden     { display: flex !important; }
#tab-einstellungen.hidden { display: flex !important; }

.tab-pane h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

/* ── Bottom Navigation ─────────────────────────────────── */
.app-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(1080px, calc(calc(100vw / var(--ui-zoom)) - 40px));
  height: auto;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 14px 36px rgba(24,39,75,.14);
  border-radius: 28px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  z-index: 200;
}

.app-nav-btn {
  border: none;
  background: none;
  border-radius: 22px;
  padding: 11px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: .18s ease;
  position: relative;
}

.app-nav-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-nav-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(53,80,111,.22);
}

.app-nav-btn.active svg {
  stroke-width: 2;
}

.app-nav-badge {
  /* oben rechts am Symbol, nicht am Rand des (breiten) Knopfs */
  position: absolute;
  top: 3px;
  left: calc(50% + 3px);
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ── Upgrade Hint ─────────────────────────────────────── */
.upgrade-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
}
.upgrade-hint-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-pale) 0%, #d5e2f0 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.upgrade-hint-icon svg { width: 25px; height: 25px; }
.upgrade-hint-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.upgrade-hint-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 320px;
  margin-bottom: 20px;
}
.upgrade-hint-btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 22px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
html.dark .upgrade-hint-icon { background: rgba(255,255,255,.1); color: var(--text); }

/* ── Tarif-Sperre: Schloss + Badge, Upgrade-Fenster (app.js appSchloss, 02.10.2026) ── */
.tarif-schloss {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 2px 7px 2px 5px;
  border-radius: 10px;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
  vertical-align: middle;
  white-space: nowrap;
  flex-shrink: 0;
}
span.tarif-schloss > svg { width: 11px; height: 11px; flex-shrink: 0; }  /* gegen .btn svg o. ä. */
.tarif-schloss[data-tarif="premium"] { background: #f3ead6; color: #7a5a14; }
html.dark .tarif-schloss { background: rgba(255,255,255,.1); color: var(--text); }
html.dark .tarif-schloss[data-tarif="premium"] { background: rgba(214,170,74,.18); color: #e7c675; }
.tarif-gesperrt { opacity: .75; cursor: pointer; }
/* Klick soll beim gesperrten Abschnitt landen, nicht am (deaktivierten) Schalter */
.tarif-gesperrt :is(input, select, textarea, button, .toggle-slider, .eins-toggle-track) { pointer-events: none; }
.app-nav-btn .tarif-schloss {
  position: absolute;
  top: 3px;
  right: 3px;
  margin: 0;
  padding: 1px 5px 1px 4px;
  font-size: 9.5px;
}
.app-nav-btn span.tarif-schloss > svg,
.ai-fab span.tarif-schloss > svg { width: 10px; height: 10px; }
.plan-swap-btn .tarif-schloss { margin-left: auto; }
.ai-fab .tarif-schloss {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  box-shadow: 0 2px 6px rgba(24,39,75,.18);
}
.eins-cat-title .tarif-schloss { margin-left: 8px; }
.eins-group-label .tarif-schloss { text-transform: none; letter-spacing: .01em; }
.msg-panel--tarif { justify-content: center; }
.tarif-fenster {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.tarif-fenster-box {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  max-width: 380px;
  width: calc(90vw / var(--ui-zoom, 1));
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.tarif-fenster-box .upgrade-hint { padding: 36px 24px 28px; }
.tarif-fenster-zu {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.tarif-fenster-zu:hover { background: var(--primary-pale); }

/* ── Abo: Hinweis-Leiste und Sperre (app.js appAboAnzeigen, 30.09.2026) ── */
.abo-hinweis {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 16px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #fde68a;
}
.abo-hinweis .btn-primary { padding: 6px 14px; font-size: 12px; text-decoration: none; }
html.dark .abo-hinweis {
  background: rgba(251, 191, 36, .12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, .25);
}
.abo-sperre {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
}
.abo-sperre-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  padding: 28px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.abo-sperre-titel { font-size: 20px; font-weight: 800; color: var(--text); }
.abo-sperre-text { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.abo-sperre-haupt { padding: 11px 18px; font-size: 14px; text-align: center; text-decoration: none; }
.abo-sperre-export { display: flex; gap: 8px; }
.abo-sperre-export .btn-secondary { flex: 1; font-size: 12px; }
.abo-sperre-abmelden {
  margin-top: 4px;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.abo-sperre-abmelden:hover { color: var(--primary); }
body.abo-gesperrt .ai-fab { display: none; }

/* ── VIP-Gratiszeit endet (js/vip-ende.js, 11.10.2026) ── */
.vip-ende-einst { display: flex; flex-direction: column; gap: 18px; }
.vip-ende-kopf { display: flex; flex-direction: column; gap: 4px; }
.vip-ende-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-light); }
.vip-ende-titel { font-size: 20px; font-weight: 800; line-height: 1.25; color: var(--text); text-wrap: balance; }
.vip-ende-text { font-size: 14px; color: var(--text-muted); }
.vip-ende-text b { color: var(--text); }
.vip-ende-zeit { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.vip-ende-balken { height: 8px; border-radius: 999px; background: var(--primary-pale); overflow: hidden; }
.vip-ende-balken span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary-light), var(--primary-dark)); }
.vip-ende-zeit-text { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vip-ende-weg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.vip-ende-weg span:not(.vip-ende-klein) { padding: 3px 10px; border-radius: 999px; background: var(--primary-pale); color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(107,127,149,.55); }
.vip-ende-einst .vip-ende-klein { text-align: left; }

.abo-sperre-box.vip-ende-sperre { max-width: 640px; max-height: 100%; overflow-y: auto; gap: 14px; padding: 32px 28px; }
.vip-ende-tarife { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; text-align: left; }
.vip-ende-tarif {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 14px 16px;
  font: inherit;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .15s, background .15s;
}
.vip-ende-tarif:hover { border-color: var(--primary-light); box-shadow: 0 6px 18px rgba(36, 56, 79, .10); transform: translateY(-1px); }
.vip-ende-tarif:focus-visible { outline: 3px solid var(--primary-pale); outline-offset: 1px; border-color: var(--primary); }
.vip-ende-tarif[aria-pressed="true"] { border-color: var(--primary); background: linear-gradient(180deg, var(--primary-pale), var(--white) 70%); box-shadow: 0 0 0 3px rgba(53, 80, 111, .14), 0 8px 22px rgba(36, 56, 79, .12); }
.vip-ende-tarif[aria-pressed="true"]::after {
  content: "\2713";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.vip-ende-fahne {
  align-self: flex-start;
  min-height: 20px;
  margin-bottom: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--primary-pale);
  box-shadow: inset 0 0 0 1px var(--border);
}
.vip-ende-fahne:empty, .vip-ende-fahne.leer { visibility: hidden; }
.vip-ende-fahne.mein { background: var(--primary); color: var(--white); }
.vip-ende-name { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.vip-ende-preis { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vip-ende-preis b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.vip-ende-tarif ul { margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); list-style: none; font-size: 12.5px; color: var(--text); display: flex; flex-direction: column; gap: 6px; }
.vip-ende-tarif li { display: flex; gap: 8px; line-height: 1.35; }
.vip-ende-tarif li::before { content: "\2713"; flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; background: var(--primary-pale); color: var(--primary); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.vip-ende-klein { font-size: 12px; color: var(--text-muted); }
.vip-ende-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.vip-ende-knoepfe .btn-primary { padding: 11px 22px; font-size: 14px; border-radius: 10px; }
.vip-ende-fehler { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--primary-pale); text-align: left; }
.vip-ende-fehler-text { font-size: 14px; line-height: 1.45; color: var(--text); }
.abo-sperre-box.vip-ende-sperre .abo-sperre-titel { font-size: 24px; letter-spacing: -.02em; text-wrap: balance; }
.abo-sperre-box.vip-ende-sperre .abo-sperre-haupt { padding: 13px 18px; font-size: 15px; border-radius: 10px; }
html.dark .vip-ende-tarif[aria-pressed="true"] { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02) 70%); box-shadow: 0 0 0 3px rgba(255, 255, 255, .10); }
html.dark .vip-ende-tarif:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
html.dark .vip-ende-balken span { background: linear-gradient(90deg, var(--text-muted), var(--primary)); }
@media (max-width: 520px) {
  .vip-ende-tarife { grid-template-columns: 1fr; }
  .abo-sperre-box.vip-ende-sperre { padding: 24px 16px; }
  .vip-ende-knoepfe .btn-primary { width: 100%; }
  .vip-ende-fehler .vip-ende-knoepfe .btn-secondary { width: 100%; }
  .vip-ende-titel { font-size: 18px; }
}

/* ── Zahlungsart hinterlegen (js/zahlungsart.js, 02.10.2026) ── */
.za-overlay { z-index: 9500; } /* über der Sperrseite (9000) */
.za-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 24px 24px; max-height: calc(80dvh / var(--ui-zoom, 1)); overflow-y: auto; }
.za-hinweis { font-size: 13px; color: var(--text-muted); }
.za-element { min-height: 120px; }
.za-adresse:empty { display: none; }
.za-ust { display: flex; flex-direction: column; gap: 6px; }
.za-ust label { font-size: 14px; color: var(--text); }
.za-ust input { padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: var(--text); font: inherit; font-size: 15px; text-transform: uppercase; }
.za-ust input::placeholder { text-transform: none; }
.za-ust input:focus { outline: none; border-color: #35506f; box-shadow: 0 0 0 3px rgba(53, 80, 111, .2); }
.za-fehler { font-size: 13px; color: var(--danger); }
.za-senden { width: 100%; padding: 11px 18px; font-size: 14px; }
.za-erfolg { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 24px 32px; }
.za-erfolg-titel { font-size: 17px; font-weight: 800; color: var(--text); }
.eins-abo-zeile { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.eins-abo-zeile span:first-child { color: var(--text-muted); }

/* ── Website / Besucherzähler (nur Schichtwerk-intern, js/website.js, 05.10.2026; neu gestaltet 06.10.2026) ──
   --web-leise: Nebentext mit ≥ 4,5:1 auch auf --primary-pale (--text-muted hat auf Weiß nur 4,3:1).
   --web-akzent: Linie/Balken (eine Reihe). --web-handy/-tablet/-pc: Geräte, mit dem dataviz-Prüfskript für beide
   Modi geprüft (Helligkeit, Buntheit, Farbsehschwäche, ≥ 3:1 zur Karte). --web-hoch/-runter: Text ≥ 4,5:1, immer mit ↑/↓. */
.web-bereich { --web-leise: #57687c; --web-akzent: #3a72b8; --web-akzent-hell: rgba(58,114,184,.12); --web-gitter: #edf1f5;
  --web-handy: #3a72b8; --web-tablet: #c96f1c; --web-pc: #1b9a73; --web-hoch: #1e7b45; --web-runter: #b83227;
  --web-hoch-bg: #e8f5ee; --web-runter-bg: #fbecea;
  container-type: inline-size; display: flex; flex-direction: column; gap: 16px; max-width: 1180px; }
html.dark .web-bereich { --web-leise: #a3a3a3; --web-akzent: #5b93e6; --web-akzent-hell: rgba(91,147,230,.16); --web-gitter: #2a2a2a;
  --web-handy: #5b93e6; --web-tablet: #d0732a; --web-pc: #22ad7f; --web-hoch: #34d399; --web-runter: #f87171;
  --web-hoch-bg: rgba(52,211,153,.12); --web-runter-bg: rgba(248,113,113,.12); }
.web-karte, .web-kennzahl { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.web-karte-titel { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.web-nur-vorlesen { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Kopf: Live groß, daneben Heute + 7 Tage */
.web-kopf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.web-live { grid-column: 1 / -1; position: relative; overflow: hidden; border-radius: var(--radius); padding: 18px 20px 20px; color: #fff;
  background: linear-gradient(135deg, #24384f 0%, #35506f 100%); box-shadow: 0 6px 20px rgba(36,56,79,.18); }
html.dark .web-live { background: linear-gradient(135deg, #1d2a38 0%, #262626 100%); border: 1px solid var(--border); box-shadow: none; }
.web-live::after { content: ''; position: absolute; right: -70px; bottom: -110px; width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 36px rgba(255,255,255,.03); pointer-events: none; }
.web-live-titel { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: #dfe7f0; }
.web-live-punkt { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #9aa9b9; flex: none; }
.web-live.is-aktiv .web-live-punkt { background: #4ade80; }
.web-live.is-aktiv .web-live-punkt::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #4ade80; animation: web-puls 2s ease-out infinite; }
@keyframes web-puls { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .web-live.is-aktiv .web-live-punkt::after { animation: none; display: none; } }
.web-live-zahl { font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -1.5px; color: #fff; margin-top: 10px; }
.web-kennzahl { display: flex; flex-direction: column; gap: 4px; }
.web-kennzahl-titel { font-size: 14px; font-weight: 600; color: var(--web-leise); }
.web-kennzahl-zahl { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; color: var(--text); }
.web-kennzahl-vergleich { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 24px; font-size: 13px; color: var(--web-leise); }
.web-kennzahl-leer { font-size: 13px; color: var(--web-leise); }
.web-trend { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.web-trend-hoch { color: var(--web-hoch); background: var(--web-hoch-bg); }
.web-trend-runter { color: var(--web-runter); background: var(--web-runter-bg); }
.web-trend-neu { color: var(--web-hoch); background: var(--web-hoch-bg); }
.web-trend-gleich { color: var(--web-leise); background: var(--primary-pale); }
.web-trend-bezug { min-width: 0; }

/* Umschalter (Zeitraum) und Reiter (Kennzahl mit Summe) */
.web-umschalter { display: flex; gap: 4px; background: var(--primary-pale); border-radius: 999px; padding: 4px; }
.web-umschalter-knopf { flex: 1; min-height: 44px; padding: 0 14px; border: none; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
.web-umschalter-knopf[aria-pressed="true"] { background: var(--white); color: var(--primary); font-weight: 800; box-shadow: 0 1px 4px rgba(53,80,111,.15); }
html.dark .web-umschalter-knopf[aria-pressed="true"] { background: #262626; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.web-umschalter-knopf:focus-visible, .web-verlauf-grafik:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.web-steuerung .web-umschalter { max-width: 420px; }
.web-reiter { background: transparent; padding: 0; gap: 8px; border-radius: 0; margin-bottom: 4px; }
.web-reiter .web-umschalter-knopf { flex: 0 1 auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  min-height: 60px; min-width: 120px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid transparent; text-align: left; }
.web-reiter .web-umschalter-knopf[aria-pressed="true"] { background: var(--primary-pale); border-color: var(--border); box-shadow: inset 0 -3px 0 var(--web-akzent); color: var(--text); }
html.dark .web-reiter .web-umschalter-knopf[aria-pressed="true"] { background: var(--primary-pale); }
.web-reiter .web-umschalter-text { font-size: 13px; font-weight: 600; color: var(--web-leise); }
.web-reiter .web-umschalter-zahl { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--text); }

/* Inhalt: beim Wechsel des Zeitraums bleibt das alte Bild halbtransparent stehen */
.web-inhalt { display: flex; flex-direction: column; gap: 16px; transition: opacity .2s; }
.web-inhalt.is-laedt { opacity: .5; }
.web-raster { display: grid; grid-template-columns: 1fr; gap: 16px; }
.web-leer { padding: 24px 12px; text-align: center; font-size: 15px; font-weight: 600; color: var(--web-leise); }

/* Verlauf */
.web-verlauf { padding: 12px 14px 10px; }
.web-verlauf-grafik { position: relative; border-radius: var(--radius-sm); }
.web-verlauf-detail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-height: 22px; margin: 10px 4px 2px; font-size: 14px; color: var(--web-leise); }
.web-verlauf-detail strong { color: var(--text); font-weight: 700; }
.web-verlauf-flaeche { position: relative; touch-action: pan-y; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.web-svg { display: block; overflow: visible; }
.web-gitter { stroke: var(--web-gitter); stroke-width: 1; }
.web-grundlinie { stroke: var(--border); stroke-width: 1; }
.web-achse-text { fill: var(--web-leise); font-size: 12px; font-variant-numeric: tabular-nums; }
.web-linie { fill: none; stroke: var(--web-akzent); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.web-flaeche-oben { stop-color: var(--web-akzent); stop-opacity: .22; }
.web-flaeche-unten { stop-color: var(--web-akzent); stop-opacity: 0; }
.web-punkt { fill: var(--web-akzent); stroke: var(--white); stroke-width: 2; }
.web-punkt-aktiv { fill: var(--web-akzent); stroke: var(--white); stroke-width: 2.5; }
.web-kreuz { stroke: var(--web-leise); stroke-width: 1; opacity: .45; }
.web-tooltip { position: absolute; left: 0; top: 0; z-index: 2; display: flex; flex-direction: column; padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--text); color: var(--white); font-size: 12px; line-height: 1.3; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: var(--shadow); }
.web-tooltip strong { font-size: 16px; font-weight: 800; }
.web-tooltip.is-sichtbar { opacity: 1; }

/* Horizontale Balken (Top-Seiten, Herkunft) */
.web-balken { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.web-balken-kopf { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 6px; }
.web-balken-name { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-balken-wert { flex: none; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.web-balken-anteil { flex: none; width: 44px; text-align: right; font-size: 13px; color: var(--web-leise); font-variant-numeric: tabular-nums; }
.web-balken-spur { height: 8px; border-radius: 4px; background: var(--primary-pale); overflow: hidden; }
.web-balken-fuell { height: 100%; border-radius: 4px; background: var(--web-akzent); }
.web-symbol { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-pale); color: var(--text); }
.web-symbol-kuerzel { font-size: 13px; font-weight: 800; letter-spacing: -.3px; }
.web-balken-kopf .web-symbol + .web-balken-name { margin-left: -2px; }
.web-karte .web-balken-zeile:has(.web-symbol) .web-balken-spur { margin-left: 38px; }

/* Geräte: Anteilsbalken + Legende */
.web-anteil-balken { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--primary-pale); }
.web-anteil-teil { flex: 1 1 0; min-width: 4px; }
.web-farbe-handy { background: var(--web-handy); }
.web-farbe-tablet { background: var(--web-tablet); }
.web-farbe-pc { background: var(--web-pc); }
.web-legende { list-style: none; display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.web-legende-eintrag { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 15px; color: var(--text); }
.web-legende-farbe { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.web-legende-name { flex: 1; min-width: 0; }
.web-legende-prozent { font-weight: 700; font-variant-numeric: tabular-nums; }
.web-legende-zahl { width: 56px; text-align: right; font-size: 13px; color: var(--web-leise); font-variant-numeric: tabular-nums; }

/* VIP-Kette als Trichter */
.web-trichter { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.web-trichter-kopf { display: flex; align-items: baseline; gap: 10px; font-size: 15px; margin-bottom: 6px; }
.web-trichter-name { flex: 1; min-width: 0; color: var(--text); }
.web-trichter-wert { color: var(--text); font-variant-numeric: tabular-nums; }
.web-trichter-prozent { width: 44px; text-align: right; font-size: 13px; font-weight: 700; color: var(--web-leise); font-variant-numeric: tabular-nums; }
.web-trichter-spur { display: flex; justify-content: center; height: 22px; border-radius: 6px; background: var(--primary-pale); overflow: hidden; }
.web-trichter-fuell { height: 100%; border-radius: 6px; background: var(--web-akzent); }
.web-trichter-stufe:nth-child(2) .web-trichter-fuell { opacity: .78; }
.web-trichter-stufe:nth-child(3) .web-trichter-fuell { opacity: .58; }

@container (min-width: 720px) {
  .web-kopf { grid-template-columns: 1.6fr 1fr 1fr; }
  .web-live { grid-column: auto; }
  .web-raster { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .web-live-zahl { font-size: 64px; }
  .web-kennzahl { padding: 14px; }
  .web-kennzahl-zahl { font-size: 30px; }
  .web-steuerung .web-umschalter { max-width: none; }
  .web-reiter .web-umschalter-knopf { flex: 1 1 0; min-width: 0; }
  .web-karte { padding: 14px; }
}

/* ── VIP-Karten (nur Schichtwerk-intern, js/vip-karten.js) ── */
.vip-form-zeile { display: flex; gap: 12px; flex-wrap: wrap; }
.vip-form-zeile > div { width: 110px; }
.vip-form-zeile > .vip-form-notiz { flex: 1; min-width: 160px; }
.vip-form-zeile > .vip-form-breit { width: 150px; }
.vip-vorschau { align-self: center; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.vip-hinweis { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--text-muted); max-width: 52ch; }
.vip-hinweis:empty { display: none; }
.vip-liste-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 10px; }
.vip-liste-kopf #vip-csv { margin-left: auto; }
.vip-haken { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.vip-haken input, .vip-wahl { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); cursor: pointer; flex: none; }
.vip-auswahl-leiste { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0 10px; }
.vip-row .vip-wahl, .vip-row .vip-wahl-platz { margin-right: 4px; }
.vip-wahl-platz { width: 18px; flex: none; }
.vip-auswahl-leiste .btn-danger:disabled { opacity: .4; cursor: default; }
.vip-row.is-ausgeblendet { opacity: .6; }
.vip-vorteil { font-weight: 600; color: var(--text); }
.vip-liste-kopf select { padding: 6px 10px; border: 1.5px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 14px; }
.vip-row { flex-wrap: wrap; }
.vip-row .eins-row-label { min-width: 150px; }
.vip-code { font-family: monospace; font-weight: 700; letter-spacing: .08em; }
.vip-status.is-frei { color: var(--success); font-weight: 600; }
.vip-status.is-eingeloest { color: var(--primary); font-weight: 600; }
.vip-status.is-gesperrt { color: var(--danger); font-weight: 600; }
.vip-status.is-abgelaufen { color: var(--text-muted); font-weight: 600; }
.pz-status { font-weight: 600; }
.pz-aktionen { margin-top: 8px; }
.pz-status.is-aktiv { color: var(--success); }
.pz-status.is-eingeladen { color: var(--primary); }
.pz-status.is-offen { color: var(--danger); }
.pz-status.is-gesperrt { color: var(--danger); }
.pz-aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.eins-abo-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.btn-primary:hover { background: var(--primary-light); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s;
}

.btn-secondary:hover { border-color: var(--primary); }

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  opacity: .9;
  transition: opacity .15s;
}
.btn-danger:hover { opacity: 1; }

.btn-danger-outline {
  background: none;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-danger-outline:hover {
  background: var(--danger);
  color: var(--white);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  opacity: .9;
  transition: opacity .15s;
}
.btn-success:hover { opacity: 1; }

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}

/* ── Karte ─────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

/* ── Ladeindikator ─────────────────────────────────────── */
.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 13px;
}

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 13px;
}

/* Login-Code abgelaufen: Hinweis oben in der App und in leeren Listen (auth.js) */
.verify-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 16px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #fde68a;
}
.verify-hint .btn-primary { padding: 6px 14px; font-size: 12px; }
.verify-hint--inline {
  margin: 16px 0;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
}
html.dark .verify-hint {
  background: rgba(251, 191, 36, .12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, .25);
}

/* ── Planung ───────────────────────────────────────────── */
.plan-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  container: plan-leiste / inline-size;   /* Knopfleiste richtet sich nach der Breite des Plans, nicht des Fensters */
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
}

/* Toolbar */
.plan-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 10px;
  flex-shrink: 0;
}

.plan-week-nav {
  display: grid;
  grid-template-columns: 36px minmax(180px, 1fr) 36px;
  width: 280px;
  height: 36px;
  padding: 3px;
  background: var(--primary-pale);
  border-radius: 999px;
  align-items: stretch;
  gap: 0;
}
.plan-week-nav .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--primary);
  font-size: 17px;
  line-height: 1;
  transition: background .14s, color .14s, box-shadow .14s;
  width: auto;
  height: auto;
  padding: 0;
}
.plan-week-nav .btn-icon:hover {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(53,80,111,.12);
}

#plan-week-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(53,80,111,.10);
  padding: 0 12px;
  color: var(--primary);
  letter-spacing: -.2px;
}
#plan-week-label:hover { background: var(--primary-pale); }

/* Kosten der Woche: kleine Marke in der Planungs-Leiste, Einzelheiten beim Anklicken (nimmt dem Plan keine Höhe) */
.plan-kosten { position: relative; flex-shrink: 0; }
.plan-kosten-knopf {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border: 0; border-radius: 999px; background: var(--primary-pale); color: var(--primary-dark);
  font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; position: relative;
}
.plan-kosten-knopf:hover, .plan-kosten-knopf[aria-expanded="true"] { background: var(--border); }
.plan-kosten-knopf:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.plan-kosten-kurz { font-size: 12px; font-weight: 600; color: var(--text-secondary, #6b7280); }
.plan-kosten-sym { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.plan-kosten-summe { font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-kosten-pop {
  position: fixed; z-index: 60; padding: 12px 14px; background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 28px rgba(15, 23, 42, .14); font-size: 13px; color: var(--text, #1f2937);
  display: flex; flex-direction: column; gap: 8px;
}
.plan-kosten-pop[hidden] { display: none; }
.plan-kosten-zeile { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan-kosten-label { color: var(--text-secondary, #6b7280); }
.plan-kosten-gross { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-kosten-zuschlag { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.plan-kosten-balken { height: 6px; border-radius: 999px; background: var(--primary-pale); overflow: hidden; }
.plan-kosten-balken i { display: block; height: 100%; border-radius: 999px; background: var(--primary-light); }
.plan-kosten-hinweis { display: flex; gap: 8px; font-size: 12px; line-height: 1.4; color: var(--text-secondary, #6b7280); }
.plan-kosten-hinweis::before { content: ''; flex: 0 0 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--text-secondary, #9ca3af); }
.plan-kosten-fuss { padding-top: 8px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted, #94a3b8); }

/* im Plan: Marke am Tageskopf und gestreiftes rotes Feld; Klicks gehen durch, nur die Pille ist anklickbar */
.plan-day-luecke {
  position: absolute; left: 4px; top: 4px; padding: 1px 7px; border-radius: 999px;
  background: rgba(231,76,60,.14); color: #b42318; font-size: 10px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.plan-gap {
  position: absolute; left: 0; right: 0; z-index: 45; pointer-events: none; box-sizing: border-box;
  border-top: 1px dashed rgba(231,76,60,.7); border-bottom: 1px dashed rgba(231,76,60,.7);
  background-image: repeating-linear-gradient(135deg, rgba(231,76,60,.16) 0 6px, rgba(231,76,60,.05) 6px 12px);
  overflow: hidden;
}
.plan-gap-pille {
  position: absolute; top: 2px; left: 2px; max-width: calc(100% - 4px); padding: 1px 7px; border: 0; border-radius: 999px;
  background: #e74c3c; color: #fff; font: inherit; font-size: 10px; font-weight: 700; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto;
}
button.plan-gap-pille { cursor: pointer; }
button.plan-gap-pille:hover { background: #c0392b; }
span.plan-gap-pille { pointer-events: none; }

/* Fenster „Schichten wiederholen“ (früher Schichtmuster), Schritt für Schritt – Lars 14.10.2026 */
.app-confirm-box.plan-muster-box { max-width: 600px; width: min(600px, calc(94vw / var(--ui-zoom))); max-height: 90vh; overflow-y: auto; }
.plan-muster-sub { margin: -4px 0 16px; font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.plan-muster-form { display: grid; gap: 16px; margin-bottom: 14px; }
.plan-muster-schritt { display: grid; gap: 9px; }
.plan-muster-schritt-kopf { display: flex; align-items: center; gap: 8px; }
.plan-muster-nr { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.plan-muster-schritt-titel { font-size: 14px; font-weight: 700; color: var(--text); }
.plan-muster-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.plan-muster-leute { display: flex; flex-wrap: wrap; gap: 6px; max-height: 128px; overflow-y: auto; padding: 2px; }
.plan-muster-person { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .14s, background .14s; }
.plan-muster-person:hover { border-color: var(--primary-light); }
.plan-muster-person.an { border: 2px solid var(--primary); background: var(--primary-pale); font-weight: 700; padding-left: 3px; }
.plan-muster-kreis { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-pale); color: var(--primary); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.plan-muster-person.an .plan-muster-kreis { background: var(--primary); color: var(--white); }
.plan-muster-arten { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-muster-art { display: grid; gap: 4px; text-align: left; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); color: var(--text-muted); font: inherit; font-size: 12.5px; line-height: 1.35; cursor: pointer; transition: border-color .14s, background .14s; }
.plan-muster-art b { color: var(--text); font-size: 13.5px; }
.plan-muster-art:hover { border-color: var(--primary-light); }
.plan-muster-art.an { border: 2px solid var(--primary); background: var(--primary-pale); padding: 11px; }
.plan-muster-bild { display: grid; gap: 3px; margin-top: 6px; }
.plan-muster-bild-reihe { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.plan-muster-bild i { height: 9px; border-radius: 3px; background: var(--border); }
.plan-muster-bild i.f { background: #f3c86b; }
.plan-muster-bild i.s { background: #7d8ee0; }
.plan-muster-bild i.a { background: var(--primary-light); }
.plan-muster-gruppe { display: grid; gap: 10px; }
.plan-muster-gruppe[hidden] { display: none; }
.plan-muster-tage { display: flex; gap: 5px; flex-wrap: wrap; }
.plan-muster-tag { width: 40px; height: 34px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.plan-muster-tag.an { background: var(--primary); border-color: var(--primary); color: var(--white); }
.plan-muster-zeit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-muster-zeit-name { display: inline-flex; align-items: center; gap: 7px; min-width: 52px; font-size: 13px; font-weight: 700; color: var(--text); }
.plan-muster-zeit-name::before { content: ''; width: 11px; height: 11px; border-radius: 3px; background: var(--primary-light); }
.plan-muster-zeit--frueh .plan-muster-zeit-name::before { background: #f3c86b; }
.plan-muster-zeit--spaet .plan-muster-zeit-name::before { background: #7d8ee0; }
.plan-muster-bis { font-size: 13px; color: var(--text-muted); }
.plan-muster-erste { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-muster-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--primary-pale); border-radius: 999px; }
.plan-muster-seg-knopf { height: 28px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.plan-muster-seg-knopf.an { background: var(--white); box-shadow: 0 1px 4px rgba(53,80,111,.14); color: var(--primary-dark); }
.plan-muster-satz { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--text); }
.plan-muster-satz input[type=number] { width: 64px; text-align: center; }
.plan-muster-satz input[type=date] { width: auto; }
.plan-muster-satz select { width: auto; min-width: 120px; }
.plan-muster-eingabe { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: var(--text); font: inherit; font-size: 14px; min-width: 0; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.plan-muster-zeit .plan-muster-eingabe { width: 124px; padding: 0 8px; }
.plan-muster-eingabe:focus-visible, .plan-muster-person:focus-visible, .plan-muster-art:focus-visible, .plan-muster-tag:focus-visible, .plan-muster-seg-knopf:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.plan-muster-vorschau { overflow-x: auto; margin-bottom: 10px; padding: 10px; border-radius: 12px; background: var(--bg); }
.plan-muster-tabelle { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 11px; table-layout: fixed; }
.plan-muster-tabelle th { font-weight: 700; color: var(--text-muted); text-align: center; }
.plan-muster-woche { font-size: 11px; color: var(--text-muted); white-space: nowrap; width: 64px; }
.plan-muster-zelle { text-align: center; padding: 6px 2px; border-radius: 6px; background: var(--white); color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-muster-zelle--neu { font-weight: 700; background: var(--primary-pale); color: var(--primary-dark); }
.plan-muster-zelle--neu-a { background: #fdf1d6; color: #7a5410; box-shadow: inset 0 0 0 1px #f3c86b; }
.plan-muster-zelle--neu-b { background: #e8ebfb; color: #2e3b8c; box-shadow: inset 0 0 0 1px #7d8ee0; }
.plan-muster-zelle--neu-an { background: var(--primary-pale); color: var(--primary-dark); box-shadow: inset 0 0 0 1px var(--primary-light); }
.plan-muster-zelle--da { background: transparent; border: 1px dashed var(--border); color: var(--text-muted); }
.plan-muster-zelle--urlaub { background: rgba(16,185,129,.13); color: #065f46; }
.plan-muster-zelle--zu { background: rgba(100,116,139,.12); color: var(--text-muted); }
.plan-muster-legende { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 11.5px; color: var(--text-muted); }
.plan-muster-leg { display: inline-flex; align-items: center; gap: 5px; }
.plan-muster-leg i { width: 10px; height: 10px; border-radius: 3px; }
.plan-muster-leg--frueh i { background: #f3c86b; }
.plan-muster-leg--spaet i { background: #7d8ee0; }
.plan-muster-leg--da i { border: 1px dashed var(--text-muted); }
.plan-muster-leg--urlaub i { background: rgba(16,185,129,.4); }
.plan-muster-hinweis { font-size: 13px; line-height: 1.45; color: var(--text-muted); margin-bottom: 16px; min-height: 38px; }
@media (max-width: 520px) { .plan-muster-arten { grid-template-columns: 1fr; } .plan-muster-tag { width: 36px; } }

/* Automatischer Plan (js/planung-auto.js): neue Schichten als normale Karten mit „neu“, darüber eine schmale Leiste */
.plan-auto-btn svg.sia-zeichen { fill: currentColor; stroke: none; width: 13px; height: 13px; }
.plan-auto-btn--entwurf { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-pale); }
.plan-shift.plan-shift--neu { border-style: dashed; border-color: var(--primary) !important; box-shadow: 0 0 0 1px var(--primary-pale); }
.plan-shift-neu {
  float: right; margin: 0 0 0 4px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 14px; letter-spacing: .02em; text-transform: uppercase;
}
.plan-shift--tiny .plan-shift-neu { order: 2; margin-left: auto; }
.plan-auto-leiste {
  flex-shrink: 0; margin: 0 0 10px; padding: 6px 8px 6px 12px; border: 1px solid var(--primary); border-radius: 10px;
  background: var(--primary-pale); color: var(--text); font-size: 13px;
}
.plan-auto-leiste-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 32px; }
.plan-auto-leiste-text { font-weight: 700; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.plan-auto-leiste-hinweis {
  padding: 2px 10px; min-height: 26px; border: 1px solid #f59e0b; border-radius: 999px; background: #fffbeb; color: #92400e;
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.plan-auto-leiste-hinweis[aria-expanded="true"] { background: #fef3c7; }
.plan-auto-leiste-knoepfe { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.plan-auto-leiste-knoepfe > button {
  min-height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--white);
  color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.plan-auto-leiste-knoepfe > button:disabled { opacity: .6; cursor: default; }
.plan-auto-leiste-knoepfe > .plan-auto-leiste-sia { border-color: var(--primary); color: var(--primary-dark); }
.plan-auto-leiste-knoepfe > .plan-auto-leiste-weg:hover { border-color: #e74c3c; color: #c0392b; }
.plan-auto-leiste-knoepfe > .plan-auto-leiste-fertig { border-color: var(--primary); background: var(--primary); color: #fff; }
.plan-auto-leiste-details { margin-top: 6px; max-height: calc(40dvh / var(--ui-zoom)); overflow-y: auto; }
.plan-auto-titel { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 8px 0 4px; }
.plan-auto-titel--fehlt { color: #b91c1c; }
.plan-auto-zeile { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.4; color: var(--text); }
.plan-auto-zeile small, .plan-auto-mehr { font-size: 12px; color: var(--text-muted); }
html.dark .plan-auto-leiste-hinweis { background: rgba(245,158,11,.15); color: #fcd34d; }
html.dark .plan-auto-leiste-knoepfe > button:not(.plan-auto-leiste-fertig) { background: transparent; }
@media (max-width: 720px) {
  .plan-auto-leiste-knoepfe { margin-left: 0; flex: 1 1 100%; }
  .plan-auto-leiste-knoepfe > button { flex: 1 1 auto; min-height: 40px; }
}

.plan-today-btn { display: none; }

.btn-icon {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s;
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }

/* Area filters */
.plan-area-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.plan-area-filters:empty { display: none; }

.plan-filter-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s;
}
.plan-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.plan-filter-btn:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Standort wechseln am PC (Variante C, js/standorte.js, 10.10.2026) ──────────────────────────────
   Nur ab 2 Standorten sichtbar (html.ort-mehrere). Runder Knopf unten links neben dem Menü, Gegenstück zum SIA-Knopf
   rechts (Lars, 10.10.: „A“ – der Knopf im Menü machte die Leiste schief). Das Menü bleibt wie mit einem Standort.
   Der Kreis zeigt das Kürzel; der Name erscheint rechts daneben nur beim Drüberfahren, mit der Tastatur und 2 Sek.
   nach jedem Wechsel (Lars 10.10.: kein Schild darüber, „Idee 1“). Das Fenster geht nach oben auf. Alles im Schichtwerk-Blau.
   Ebene wie das Menü (200): Startseite (900) und Dialoge liegen darüber. Lage folgt dem SIA-Knopf (siehe dort, @media 1260/480). */
.ort-leiste {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 200;
}
.ort-profil {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--white);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(24,39,75,.22), 0 2px 6px rgba(24,39,75,.14);
  transition: transform .2s, box-shadow .2s;
}
.ort-profil:hover, .ort-profil[aria-expanded="true"] { transform: translateY(-2px) scale(1.06); box-shadow: 0 16px 34px rgba(24,39,75,.28), 0 2px 6px rgba(24,39,75,.16); }
.ort-profil:active { transform: translateY(0) scale(1); }
.ort-profil:focus-visible, .ort-zeile:focus-visible, .ort-karte:focus-visible, .ort-weiter:focus-visible, .ort-link:focus-visible { outline: 3px solid rgba(74,109,148,.45); outline-offset: 2px; }
.ort-profil-name {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  max-width: 180px;
  padding: 5px 11px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 6px 16px rgba(24,39,75,.22);
  opacity: 0;
  transform: translate(-6px, -50%);
  transition: opacity .18s, transform .18s;
  pointer-events: none;
}
.ort-profil:hover .ort-profil-name, .ort-profil:focus-visible .ort-profil-name, .ort-leiste.ort-name-kurz .ort-profil-name {
  opacity: 1;
  transform: translate(0, -50%);
}
.ort-profil[aria-expanded="true"] .ort-profil-name { opacity: 0; }

/* Kreis je Standort */
.ort-kreis {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}
.ort-kreis--k { width: 40px; height: 40px; font-size: 18px; }
/* Eigenes Bild statt Kürzel (Einstellungen › Standorte › Bearbeiten); das Kürzel bleibt für Vorleser im Kreis */
.ort-kreis--bild { position: relative; overflow: hidden; color: transparent; }
.ort-kreis--bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ort-kreis--k.ort-kreis--lang { font-size: 14px; }
.ort-kreis--m { width: 32px; height: 32px; font-size: 14px; }
.ort-kreis--lang { font-size: 10.5px; letter-spacing: -.4px; }
.ort-kreis--m.ort-kreis--lang { font-size: 11.5px; }
.ort-kreis--l.ort-kreis--lang { font-size: 15px; }
.ort-kreis--l { width: 44px; height: 44px; font-size: 19px; }
/* „Alle“: drei Kreise übereinander (Lars 10.10.: die vier Quadrate glichen dem Dashboard-Zeichen); Ring in Farbe des Untergrunds */
.ort-kreis--alle { width: auto; padding: 0 2px; background: none; --ort-ring: var(--white); }
.ort-kreis--alle i { flex: none; width: 12px; height: 12px; margin-left: -5px; border-radius: 50%; box-shadow: 0 0 0 2px var(--ort-ring); background: var(--primary); }
.ort-kreis--alle i:first-child { margin-left: 0; background: #8aa3bf; }
.ort-kreis--alle i:nth-child(2) { background: var(--primary-light); }
.ort-kreis--k.ort-kreis--alle i { width: 14px; height: 14px; margin-left: -6px; }
.ort-kreis--k.ort-kreis--alle i:first-child { margin-left: 0; }
.ort-zeile:hover .ort-kreis--alle, .ort-zeile:focus .ort-kreis--alle, .ort-zeile--an .ort-kreis--alle { --ort-ring: var(--primary-pale); }
.ort-kreis--plus { background: var(--primary-pale, #eef2f7); color: var(--primary); border: 0; }
.ort-fenster kbd, .ort-start kbd { padding: 3px 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: #f1f4f8; color: #8193a7; font-family: inherit; font-size: 10.5px; font-weight: 700; line-height: 1; white-space: nowrap; }

/* Fenster mit den Standorten */
.ort-fenster {
  position: absolute;
  bottom: calc(100% + 18px);
  left: 0;
  width: 280px;
  max-height: calc(calc(100dvh / var(--ui-zoom)) - 140px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(24,39,75,.2), 0 2px 6px rgba(24,39,75,.06);
  transform-origin: bottom left;
  animation: ort-auf .16s ease-out;
}
@keyframes ort-auf { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.ort-zeile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: none; border-radius: 10px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ort-zeile:hover, .ort-zeile:focus { background: var(--primary-pale); outline: none; }
.ort-zeile--an { background: var(--primary-pale); }
.ort-zeile--alle, .ort-zeile--neu { margin-top: 5px; position: relative; }
.ort-zeile--alle::before, .ort-zeile--neu::before { content: ''; position: absolute; top: -3px; left: 8px; right: 8px; border-top: 1px solid var(--border); }
.ort-zeile-name { flex: 1; min-width: 0; overflow: hidden; font-size: 14.5px; color: var(--text); white-space: nowrap; text-overflow: ellipsis; }
.ort-zeile--neu .ort-zeile-name { font-weight: 700; color: var(--primary-light); }
.ort-zeile kbd { opacity: 0; transition: opacity .12s; }
.ort-zeile:hover kbd, .ort-zeile:focus kbd { opacity: 1; }
.ort-haken { flex: none; width: 18px; }
.ort-haken svg { width: 18px; height: 18px; fill: none; stroke: var(--primary); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.ort-marke { font-size: 12px; font-weight: 700; color: var(--danger); white-space: nowrap; }
.ort-marke:empty { display: none; }

/* Startseite nach dem App-Start */
.ort-start { position: fixed; inset: 0; z-index: 900; overflow-y: auto; background: linear-gradient(160deg, #eef3f7 0%, #dce5ed 100%); animation: ort-ein .2s ease-out; }
@keyframes ort-ein { from { opacity: 0; } }
.ort-start-innen { display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; min-height: 100%; max-width: 1040px; margin: 0 auto; padding: 48px 40px 8vh; }
.ort-start-datum { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); text-align: center; }
.ort-start h1 { margin: 0 0 32px; font-size: 32px; letter-spacing: -.8px; color: var(--text); text-align: center; }
/* Zeilen zu je 3 Karten, jede Zeile mittig: bei 2 oder 4 Standorten sitzen die Karten nicht links im Raster */
.ort-karten { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.ort-karten > .ort-karte { flex: 0 1 calc((100% - 32px) / 3); }
.ort-karte {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 18px;
  background: #fff;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(24,39,75,.08);
  transition: transform .15s, box-shadow .15s;
}
.ort-karte:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(24,39,75,.14); }
.ort-karte:has(.ort-karte-klick:focus-visible) { box-shadow: 0 0 0 2px var(--primary), 0 10px 30px rgba(24,39,75,.1); }
.ort-karte-klick { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 0; border: none; border-radius: inherit; background: none; cursor: pointer; }
.ort-karte-klick:focus { outline: none; }
.ort-karte--zuletzt { box-shadow: 0 0 0 2px var(--primary), 0 10px 30px rgba(24,39,75,.1); }
.ort-karte-kopf { display: flex; align-items: center; gap: 12px; width: 100%; }
.ort-karte--zuletzt .ort-karte-kopf { padding-right: 64px; }
.ort-karte-titel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ort-karte-titel b { overflow: hidden; font-size: 19px; letter-spacing: -.3px; white-space: nowrap; text-overflow: ellipsis; }
.ort-karte-titel small { overflow: hidden; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; text-overflow: ellipsis; }
.ort-karte-marke { position: absolute; top: 31px; right: 18px; padding: 4px 9px; border-radius: 999px; background: var(--primary-pale); color: var(--primary); font-size: 11.5px; font-weight: 800; }
.ort-karte-heute { display: flex; flex-direction: column; gap: 12px; width: 100%; padding-top: 16px; border-top: 1px solid #edf1f5; }
.ort-lage { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
/* Lars 10.10.2026: kein Rot/Grün – Farben wie im Plan-Reiter (Blau, Grau, offene Schicht gestrichelt) */
.ort-lage i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.ort-lage--zu { color: var(--text-muted); }
.ort-lage--zu i { background: #a3adb8; }
.ort-leute { display: block; min-width: 0; min-height: 18px; }
.ort-leute-text { display: block; overflow: hidden; font-size: 13px; color: var(--text-muted); white-space: nowrap; text-overflow: ellipsis; }
.ort-leute-text b { color: var(--text); font-weight: 700; }
.ort-stand { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; box-sizing: border-box; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted); text-align: left; }
.ort-stand--ok { padding-left: 0; }
.ort-stand--leer { padding-left: 0; }
.ort-stand--offen { position: relative; z-index: 2; border-style: dashed; border-color: #b9c6d4; background: transparent; color: var(--primary); font-weight: 700; cursor: pointer; }
.ort-stand--offen:hover { border-style: solid; background: var(--primary-pale); }
.ort-stand-pfeil { flex: none; width: 7px; height: 7px; margin-right: 2px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.ort-stand--offen b { font-weight: 800; }
.ort-start-fuss { display: flex; justify-content: center; margin-top: 24px; }
.ort-link { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border: none; border-radius: 999px; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--primary-light); cursor: pointer; }
.ort-link:hover { background: rgba(255,255,255,.6); }
.ort-link--zuletzt { background: #fff; box-shadow: 0 0 0 2px var(--primary); }
.ort-link .ort-karte-marke { position: static; }
body:has(#ort-start) .ai-fab { display: none; }

.app-content.ort-blende .tab-pane:not(.hidden) { animation: ort-blende .32s ease-out; }
@keyframes ort-blende { from { opacity: .25; transform: translateY(4px); } }

/* Dunkel */
html.dark .ort-profil, html.dark .ort-fenster { background: #1e1e1e; border-color: #2e2e2e; }
html.dark .ort-profil-name { background: #e4e4e4; color: #111111; }
html.dark .ort-kreis--alle { --ort-ring: #1e1e1e; }
html.dark .ort-kreis { color: #111111; }
html.dark .ort-kreis--plus { color: var(--text); }
html.dark .ort-kreis--alle i { background: #e4e4e4; }
html.dark .ort-kreis--alle i:first-child { background: #8a8a8a; }
html.dark .ort-kreis--alle i:nth-child(2) { background: #b8b8b8; }
html.dark .ort-fenster kbd, html.dark .ort-start kbd { background: #262626; color: #9a9a9a; }
html.dark .ort-start { background: linear-gradient(160deg, #111111 0%, #191919 100%); }
html.dark .ort-karte { background: #1e1e1e; border-color: #2e2e2e; }
html.dark .ort-karte-heute { border-color: #2e2e2e; }
html.dark .ort-lage i { background: #e4e4e4; }
html.dark .ort-lage--zu i { background: #5a5a5a; }
html.dark .ort-stand--offen { border-color: #4a4a4a; color: #e4e4e4; }
html.dark .ort-stand--offen:hover { background: #262626; }
html.dark .ort-link:hover { background: #1e1e1e; }
html.dark .ort-link--zuletzt { background: #1e1e1e; }
html.dark .ort-karte-marke { background: #2e2e2e; color: var(--text); }

/* Kleinere Fenster (Windows-App schmal gezogen) */
@media (max-width: 1100px) {
  .ort-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
}
@media (max-width: 1000px) {
  .ort-start-innen { padding: 24px 16px 40px; }
  .ort-start h1 { margin-bottom: 20px; font-size: 26px; }
}
@media (max-width: 600px) {
  /* Handy-Breite: Die Wörter passten schon vorher nicht ins Menü – nur Symbole zeigen, die Wörter bleiben für Screenreader */
  .app-nav { gap: 4px; padding: 6px; }
  .app-nav-btn { padding: 10px 2px; }
  .app-nav-btn > span:not(.tarif-schloss):not(.app-nav-badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Standortname auf Schichtblöcken (Ansicht „Alle“) und Springer-Marke an Personen */
.plan-shift-standort {
  font-size: 10px;
  font-weight: 600;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.standort-springer {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 6px;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

/* Toolbar actions */
.plan-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-icon-text {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  transition: border-color .15s, color .15s;
}
.btn-icon-text:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon-text svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Woche kopieren → Einfügen: Zwischenspeicher, Knopf wird hervorgehoben (Lars 11.10.2026) */
.btn-icon-text:disabled { opacity: .5; cursor: default; }
.btn-icon-text:disabled:hover { border-color: var(--border); color: var(--text-muted); }
.btn-icon-text.plan-kopie-bereit { background: var(--primary); border-color: var(--primary); color: var(--white); }
.btn-icon-text.plan-kopie-bereit:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }

.plan-publish-status { display: none; }

/* Kombinierter Publish-Button mit Status */
#plan-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  position: relative;
}
#plan-publish-btn:hover { opacity: .85; transform: translateY(-1px); }
#plan-publish-btn[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--text);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  pointer-events: none;
  z-index: 50;
  animation: pubTooltipIn .15s ease;
}
@keyframes pubTooltipIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
#plan-publish-btn .plan-pub-dot { display: none; }
#plan-publish-btn .plan-pub-label { display: none; }
#plan-publish-btn .plan-pub-status { display: none; }

/* Entwurf — blau ausgefüllt */
#plan-publish-btn.pub-draft {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Veröffentlicht — weiß mit blauem Rand */
#plan-publish-btn.pub-published {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
}

/* Änderungen offen — blau ausgefüllt */
#plan-publish-btn.pub-changes {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Main layout */
.plan-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* Sidebar */
.plan-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.plan-sidebar-head {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.plan-search {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.plan-search:focus { border-color: var(--primary); }

.plan-swap-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s;
  width: 100%;
}
.plan-swap-btn:hover, .plan-swap-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
}
.plan-swap-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Leere Seitenleiste: Grund + Ausweg statt nur „Keine Mitarbeiter" */
.plan-empty {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 12px 4px;
  padding: 16px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--white);
  text-align: left;
}
.plan-empty-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.plan-empty-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.plan-empty-btn {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
}
.plan-empty-btn:disabled { opacity: .6; cursor: default; }
.plan-empty-link {
  background: none;
  border: none;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-align: left;
  cursor: pointer;
}
.plan-empty-link:hover { text-decoration: underline; }

.plan-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Worker cards in sidebar */
.plan-worker-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: grab;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
  user-select: none;
}
.plan-worker-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-worker-card-top span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Verfuegbarkeits-Vorschau (1 Zelle pro Tag) */
.plan-avail-preview {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.plan-avail-cell {
  background: var(--border);
  border-radius: 3px;
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  line-height: 16px;
  color: var(--text-muted);
}
.plan-avail-cell.avail-yes {
  background: #d1fae5;
  color: #065f46;
}
.plan-avail-cell.avail-mix {
  background: #fef3c7;
  color: #92400e;
}
.plan-avail-cell.avail-no {
  background: #fee2e2;
  color: #991b1b;
}
.plan-worker-card:hover { border-color: var(--primary); }
.plan-worker-card:active { cursor: grabbing; }
.plan-worker-card.dragging { opacity: .4; }
.plan-worker-card--selected {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent);
}

.plan-worker-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Swap request cards */
.plan-swap-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--white);
  font-size: 12px;
}
.plan-swap-card-name { font-weight: 700; margin-bottom: 4px; }
.plan-swap-card-info { color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.plan-swap-card-actions { display: flex; gap: 6px; }
.plan-swap-card-actions button { flex: 1; padding: 5px; font-size: 11px; font-weight: 700; border-radius: 6px; border: none; cursor: pointer; }
.plan-swap-approve { background: #dcfce7; color: #166534; }
.plan-swap-reject  { background: #fee2e2; color: #991b1b; }

/* Schichttausch 2 (02.10.2026): Reiter Offen/Erledigt, Status, Prüfung, Verlauf */
.plan-swap-zahl {
  margin-left: auto;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.plan-tausch-reiter { display: flex; gap: 4px; margin-bottom: 8px; }
.plan-tausch-reiter-knopf {
  flex: 1;
  padding: 6px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.plan-tausch-reiter-knopf.aktiv { border-color: var(--primary); color: var(--primary); background: var(--primary-pale); }
.plan-tausch-karte { margin-bottom: 8px; }
.plan-tausch-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.plan-tausch-chip {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: #eef0f3;
  color: #4a5568;
}
.plan-tausch-chip--pending  { background: #fef3c7; color: #92400e; }
.plan-tausch-chip--open     { background: #e0f2fe; color: #075985; }
.plan-tausch-chip--approved { background: #dcfce7; color: #166534; }
.plan-tausch-chip--rejected,
.plan-tausch-chip--declined { background: #fee2e2; color: #991b1b; }
.plan-tausch-warnung {
  margin: -2px 0 8px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}
.plan-tausch-soll-zeile { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 8px; }
.plan-tausch-soll {
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 800;
}
html.dark .plan-tausch-soll { background: rgba(245, 158, 11, .15); color: #fbbf24; }
.plan-tausch-verlauf { margin-top: 8px; color: var(--text-muted); }
.plan-tausch-verlauf summary { cursor: pointer; font-weight: 700; font-size: 11px; }
.plan-tausch-verlauf ul { margin: 6px 0 0; padding-left: 14px; line-height: 1.5; font-size: 11px; }
.plan-tausch-vzeit { font-variant-numeric: tabular-nums; }
html.dark .plan-tausch-chip { background: rgba(255,255,255,.08); color: #cbd5e1; }
html.dark .plan-tausch-chip--pending  { background: rgba(245, 158, 11, .15); color: #fbbf24; }
html.dark .plan-tausch-chip--open     { background: rgba(56, 189, 248, .15); color: #7dd3fc; }
html.dark .plan-tausch-chip--approved { background: rgba(52, 211, 153, .15); color: #34d399; }
html.dark .plan-tausch-chip--rejected,
html.dark .plan-tausch-chip--declined,
html.dark .plan-tausch-warnung { background: rgba(248, 113, 113, .15); color: #f87171; }

/* Grid */
.plan-grid-wrap {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bg);
  position: relative;
}

.plan-grid-inner {
  display: flex;
  flex-direction: column;
  min-width: max-content;
}

/* Day headers */
.plan-day-headers {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.plan-gutter-header {
  width: 48px;
  flex-shrink: 0;
}

.plan-day-header {
  flex: 1;
  min-width: 100px;
  padding: 14px 6px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  border-left: 1px solid var(--border);
  position: relative;
}
.plan-day-clear {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s, color .15s;
}
.plan-day-header:hover .plan-day-clear { opacity: 1; }
.plan-day-clear:hover { color: var(--danger); }
.plan-day-clear svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.plan-day-header.today { color: var(--primary); }
.plan-day-header .day-name { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.plan-day-header .day-date { font-size: 14px; font-weight: 800; }
.plan-day-header--active {
  background: color-mix(in srgb, var(--primary) 12%, var(--white)) !important;
  box-shadow: inset 0 3px 0 var(--primary) !important;
}
.plan-day-header--active .day-name {
  color: var(--primary) !important;
}
.plan-day-header--active .day-date {
  color: var(--primary) !important;
}
.plan-day-header--active.today .day-date {
  background: var(--primary) !important;
  color: var(--white) !important;
}

/* Verfuegbarkeits-Farben auf Day-Headers */
.plan-day-header.avail-day-yes { background: #f0fdf4; }
.plan-day-header.avail-day-yes .day-name { color: #059669; }
.plan-day-header.avail-day-no { background: #fef2f2; }
.plan-day-header.avail-day-no .day-name { color: #dc2626; }
.plan-day-header.avail-day-mix { background: #fffbeb; }
.plan-day-header.avail-day-mix .day-name { color: #d97706; }

/* Wetter im Day-Header */
.plan-day-weather {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 3px;
  font-size: 11px;
  height: 22px;
  color: var(--text-muted);
}
.plan-weather-icon { display: inline-flex; align-items: center; color: var(--text-muted); }
.plan-weather-icon svg { display: block; }
.plan-weather-temp { font-weight: 700; font-size: 11px; color: var(--text-muted); }
.plan-weather-precip { font-size: 10px; color: var(--text-muted); opacity: .7; }

/* Wetter Detail-Popup */
.plan-weather-popup {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 12px 48px rgba(0,0,0,.18);
  z-index: 500;
  min-width: 260px;
  animation: kalFadeIn .12s ease;
}
/* Header */
.pwp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.pwp-header-icon svg { display: block; }
.pwp-header-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.pwp-header-temps { display: flex; gap: 8px; margin-top: 2px; }
.pwp-hi { font-size: 18px; font-weight: 800; color: var(--text); }
.pwp-lo { font-size: 18px; font-weight: 800; color: var(--text-muted); }
/* Stats */
.pwp-stats {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 0;
}
.pwp-stat {
  flex: 1;
  text-align: center;
}
.pwp-stat-val { font-size: 14px; font-weight: 800; color: var(--text); }
.pwp-stat-lbl { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
/* Stündlich */
.pwp-hourly {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 4px 0;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.pwp-hour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 32px;
  flex-shrink: 0;
}
.pwp-hour-time { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.pwp-hour-icon svg { display: block; }
.pwp-hour-temp { font-size: 11px; font-weight: 700; color: var(--text); }
.pwp-hour-rain { font-size: 9px; color: #3b82f6; font-weight: 600; }

/* Verfügbarkeits-Indikator im Grid-Header */
.plan-avail-strip {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 5px;
}

.plan-avail-box {
  width: 18px;
  height: 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.plan-avail-box.avail-green { background: #22c55e; }
.plan-avail-box.avail-red   { background: #ef4444; }
.plan-avail-box.avail-empty { background: var(--border); opacity: .5; }
.plan-day-header.today .day-date {
  background: var(--primary);
  color: var(--white);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

/* Time body */
.plan-time-body {
  display: flex;
  position: relative;
}

.plan-time-gutter {
  width: 48px;
  flex-shrink: 0;
  position: relative;
  background: var(--white);
}

.plan-hour-label {
  position: absolute;
  right: 6px;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
  letter-spacing: .3px;
}

/* Day columns */
.plan-day-col {
  flex: 1;
  min-width: 100px;
  border-left: 1px solid var(--border);
  position: relative;
  background: var(--white);
}
.plan-day-col.today { background: #f8faff; }


.plan-hour-row {
  height: var(--hour-h, 64px);
  position: relative;
}
.plan-hour-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--border);
}
.plan-hour-row:first-child::before { border-top: none; }
.plan-hour-row::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px dashed color-mix(in srgb, var(--border) 60%, transparent);
}

/* Shift blocks */
/* Verfügbarkeitsblöcke im Grid */
.plan-avail-block {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 8px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  border: 1.5px solid transparent;
}
.plan-avail-block.avail-yes {
  background: rgba(16, 185, 129, .12);
  border-color: rgba(16, 185, 129, .3);
}
.plan-avail-block.avail-no {
  background: rgba(239, 68, 68, .1);
  border-color: rgba(239, 68, 68, .25);
}

.plan-avail-block-label {
  font-size: 10px;
  font-weight: 700;
  padding: 5px 8px;
  letter-spacing: .3px;
}
.plan-avail-block.avail-yes .plan-avail-block-label { color: #047857; }
.plan-avail-block.avail-no .plan-avail-block-label { color: #b91c1c; }

/* Abwesenheitsblock im Planungsgrid */
.plan-leave-block {
  position: relative;
  margin: 2px 4px;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}
.plan-leave-block--approved {
  background: #fef3c7;
  color: #92400e;
  border-left: 3px solid #f59e0b;
}
.plan-leave-block--pending {
  background: #f3f4f6;
  color: #6b7280;
  border-left: 3px solid #9ca3af;
}

.plan-shift {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  z-index: 2;
  box-sizing: border-box;
  transition: opacity .15s, box-shadow .15s;
  z-index: 2;
  border: 1.5px solid transparent;
  line-height: 1.3;
}
.plan-shift:hover { box-shadow: 0 2px 8px rgba(0,0,0,.15); opacity: .9; }
.plan-shift--dimmed { opacity: .3; }
.plan-shift--highlight {
  box-shadow: 0 0 0 2px var(--primary), 0 2px 12px rgba(59,130,246,.35);
  animation: plan-shimmer 1.8s ease-in-out infinite;
}
@keyframes plan-shimmer {
  0%, 100% { box-shadow: 0 0 0 2px var(--primary), 0 2px 12px rgba(59,130,246,.25); }
  50%      { box-shadow: 0 0 0 2px var(--primary), 0 2px 20px rgba(59,130,246,.5); }
}
.plan-shift.dragging { opacity: .4; cursor: grabbing; }
.plan-dragging .plan-shift:not(.dragging) { pointer-events: none; }
.plan-dragging .plan-avail-block { pointer-events: none; }
.plan-dragging .plan-leave-block { pointer-events: none; }
.plan-shift.open-shift {
  border-style: dashed;
  background: transparent !important;
}
.plan-shift--tiny { padding: 0 6px; font-size: 10px; display: flex; align-items: center; }
.plan-shift--schmal { padding-left: 3px; padding-right: 3px; font-size: 10px; }   /* 3+ Schichten nebeneinander (A7) */
.plan-shift-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-shift-time { font-size: 10px; opacity: .8; }
.plan-shift-area { font-size: 10px; opacity: .7; }
.plan-shift-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: none;
  background: rgba(0,0,0,.2);
  color: inherit;
  border-radius: 50%;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.plan-shift:hover .plan-shift-del { opacity: 1; }
.plan-shift-del:hover { background: rgba(0,0,0,.4); }

/* Plan: + Schicht, Beschriftungen, Nachtschichten, ausgegraute Leute, Klick-Hinweis */
/* Knopfleiste kompakt: normal nur Symbole (Tooltip = title), Text erst bei breitem Plan. Alles bleibt in einer Zeile. */
.plan-toolbar-actions .btn-lbl { display: none; white-space: nowrap; }
.plan-toolbar-actions .plan-kosten-kurz { display: none; }
.plan-toolbar-actions .plan-kosten-knopf { padding: 0 11px; }
.plan-toolbar-actions .btn-icon-text { width: 36px; height: 36px; padding: 0; flex-shrink: 0; }
.plan-toolbar-actions .btn-icon-text svg { width: 16px; height: 16px; }
.plan-toolbar-actions #plan-publish-btn { flex-shrink: 0; white-space: nowrap; }
.plan-area-filters { flex-wrap: nowrap; overflow-x: auto; min-width: 0; justify-content: flex-start; scrollbar-width: none; }
.plan-area-filters::-webkit-scrollbar { display: none; }
.plan-area-filters > * { flex-shrink: 0; white-space: nowrap; }
.plan-area-filters > :first-child { margin-left: auto; }
.plan-area-filters > :last-child { margin-right: auto; }
@container plan-leiste (min-width: 1560px) {
  .plan-toolbar-actions .btn-lbl { display: inline; }
  .plan-toolbar-actions .plan-kosten-kurz { display: inline; }
  .plan-toolbar-actions .plan-kosten-knopf { padding: 0 14px; }
  .plan-toolbar-actions .btn-icon-text { width: auto; padding: 0 14px; }
  .plan-toolbar-actions .btn-icon-text svg { width: 14px; height: 14px; }
}
/* Mittlere Breite: Wochenwahl etwas schmaler, damit die Kosten-Marke noch in die Zeile passt */
@container plan-leiste (min-width: 721px) and (max-width: 860px) {
  .plan-week-nav { width: 262px; }
  .plan-toolbar-actions .plan-kosten-sym { display: none; }
  .plan-toolbar-actions .plan-kosten-knopf { padding: 0 10px; }
}
/* Schmaler Plan (Tablet hochkant, Handy): Wochenwahl oben, Filter in eigener Zeile zum Wischen, Knöpfe rechtsbündig darunter */
@container plan-leiste (max-width: 720px) {
  .plan-toolbar { flex-wrap: wrap; row-gap: 8px; }
  .plan-week-nav { width: 100%; }
  .plan-area-filters { order: 2; flex: 1 1 100%; }
  .plan-toolbar-actions { order: 3; flex: 1 1 100%; justify-content: flex-end; margin-left: 0; flex-wrap: wrap; row-gap: 8px; }
}
.shift-nacht-hinweis { margin: -4px 0 10px; font-size: 12px; font-weight: 600; color: var(--primary); }
.plan-shift--nacht { border-style: solid; border-right-width: 3px; }
.plan-shift--fort { border-top-style: dashed; opacity: .85; }
.plan-day-col--edit { cursor: cell; }
.plan-drop-ghost--hint { background: transparent; border-style: dashed; opacity: .55; }
.plan-worker-card--ohne { opacity: .55; }
.plan-worker-card--ohne:hover { opacity: 1; }
.plan-worker-ohne { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.plan-remind-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border-radius: var(--radius-sm); background: var(--primary-pale); font-size: 12px; font-weight: 600; color: var(--text); }
.plan-remind-row button { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; white-space: nowrap; }


/* Drop ghost */
.plan-drop-ghost {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 6px;
  background: var(--primary-pale);
  border: 1.5px dashed var(--primary);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  opacity: .7;
}

/* Kalender-Ereignisse im Planungsgrid */
.plan-cal-event {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 6px;
  border: 1.5px dashed var(--plan-cal-accent, #3b82f6);
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  padding: 3px 5px;
  box-sizing: border-box;
}
.plan-cal-event--allday {
  position: relative;
  margin: 2px 4px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1.5px dashed var(--plan-cal-accent, #3b82f6);
  pointer-events: none;
}
.plan-cal-event-title {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .2px;
}
.plan-cal-event-time {
  font-size: 9px;
  opacity: .8;
}
.plan-cal-event-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}
.btn-icon-text.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-icon-text.active:hover {
  background: #2c4460;
  border-color: #2c4460;
  color: #fff;
}
.plan-cal-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border-radius: 999px;
  pointer-events: none;
}
#plan-cal-toggle-btn {
  position: relative;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 12px 40px rgba(0,0,0,.16);
  overflow: hidden;
}

/* Breite Variante fuer die Import-Vorschau */
.modal-card--wide { max-width: 760px; }

/* ── Team-Import ── */
.team-import-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  padding: 4px 24px 0;
}

.team-import-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 24px 4px;
}

.team-import-file {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.team-import-hint {
  font-size: 13px;
  color: var(--danger);
  padding: 10px 24px 0;
  min-height: 18px;
}

.team-import-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 24px 12px;
}

.team-import-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.team-import-pill--neu    { background: #e8f5ee; border-color: #bfe3cd; color: #1d7a45; }
.team-import-pill--fehler { background: #fdeceb; border-color: #f5c6c2; color: #b3261e; }

.team-import-table-wrap {
  max-height: 340px;
  overflow: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.team-import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.team-import-table th {
  position: sticky;
  top: 0;
  background: var(--bg);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.team-import-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}
.team-import-table tr:last-child td { border-bottom: none; }
.team-import-row--da    td { color: var(--text-muted); }
.team-import-row--fehler td { background: #fdf3f2; }

.team-import-ok   { color: #1d7a45; font-weight: 600; }
.team-import-skip { color: var(--text-muted); }
.team-import-note { font-size: 11.5px; color: #9a6b12; margin-top: 3px; }

.team-import-okbox,
.team-import-fehlbox {
  margin: 20px 24px 4px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
}
.team-import-okbox   { background: #e8f5ee; color: #1d7a45; }
.team-import-fehlbox { background: #fdeceb; color: #b3261e; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
}
.modal-header h3 { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.3px; flex: 1; }

.modal-back {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  margin-right: 8px;
  flex-shrink: 0;
}
.modal-back:hover { background: var(--border); }

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.modal-close:hover { background: var(--border); }

.modal-card form { padding: 20px 24px 24px; }

.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-row input, .form-row select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: var(--bg);
  color: #475569;
}
.form-row input::placeholder { color: var(--text-muted); font-weight: 400; }
.form-row input:focus, .form-row select:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

/* Autocomplete Dropdown */
.eins-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
}
.eins-autocomplete-item {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
}
.eins-autocomplete-item:first-child { border-radius: 10px 10px 0 0; }
.eins-autocomplete-item:last-child { border-radius: 0 0 10px 10px; }
.eins-autocomplete-item:only-child { border-radius: 10px; }
.eins-autocomplete-item:hover,
.eins-autocomplete-item.is-active {
  background: var(--bg-subtle);
}
.eins-autocomplete-item + .eins-autocomplete-item {
  border-top: 1px solid var(--border);
}

/* Adressfeld mit Vorschlägen (js/adresse.js) — Einstellungen, Assistent, Wetter-Karte */
.adr { width: 100%; }
.adr-wrap { position: relative; }
.adr-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-size: 14px;
}
.adr-input:focus { outline: none; border-color: var(--primary); }
.adr-hint { font-size: 12px; line-height: 1.4; margin-top: 6px; color: var(--text-muted); }
.adr-hint:empty { display: none; }
.adr-hint--ok { color: #15803d; }
.adr-hint--warn { color: #b45309; }
.adr-hint--error { color: #b91c1c; }
.adr-note { font-size: 12px; line-height: 1.4; margin-top: 6px; color: var(--text-muted); }
.adr-nahe {
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.adr-nahe:disabled { opacity: .5; cursor: default; }

/* In der Dashboard-Karte darf nichts überstehen (die Karte schneidet ab):
   die Vorschläge stehen dort unter dem Feld statt darüber zu schweben. */
.adr-list--inline {
  position: static;
  margin-top: 6px;
  max-height: 132px;
  box-shadow: none;
}

/* Wetter-Karte ohne Adresse */
.dash-wetter-leer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.dash-wetter-leer-kopf {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dash-wetter-leer-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-pale);
  color: var(--primary);
}
.dash-wetter-leer-icon svg { width: 17px; height: 17px; }
.dash-wetter-leer-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}
.dash-wetter-leer .adr-input { padding: 8px 10px; font-size: 13px; }
.dash-wetter-leer .adr-hint,
.dash-wetter-leer .adr-nahe { font-size: 11px; margin-top: 4px; }
#dash-card-wetter .dash-card-body { overflow-y: auto; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-2 label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-row-2 input { width: 100%; }

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--text) !important;
  font-weight: 600 !important;
}
.checkbox-label input[type=checkbox] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  border-radius: 5px;
}

.optional { font-size: 10px; color: var(--text-muted); font-weight: 400; text-transform: lowercase; }

/* Shift Ende offen */
.shift-end-offen {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px dashed var(--primary);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--white));
  text-align: center;
}

/* Apple-Style Switch */
.switch-label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  cursor: pointer;
}
.shift-area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.apple-switch {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background .25s;
  flex-shrink: 0;
}
.apple-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .25s;
}
.apple-switch.active {
  background: #34c759;
}
.apple-switch.active .apple-switch-knob {
  transform: translateX(18px);
}

.shift-repeat-options {
  margin-top: 8px;
}
.shift-repeat-options select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
}

.modal-footer {
  display: flex;
  align-items: center;
  padding: 16px 20px 20px;
}
.modal-footer-right { display: flex; gap: 10px; margin-left: auto; }

.modal-footer .btn-secondary,
.modal-footer .btn-primary {
  height: 40px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}
.modal-footer .btn-danger {
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 auto 0 0;
}

/* Context menu */
.context-menu {
  position: fixed;
  z-index: 300;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 4px;
  min-width: 180px;
}
.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text);
  text-align: left;
}
.context-menu-item:hover { background: var(--primary-pale); color: var(--primary); }
.context-menu-item svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Tab pane override for planung */
#tab-planung.tab-pane {
  padding: 20px 24px;
  max-width: none;
  height: calc(calc(100dvh / var(--ui-zoom)) - var(--nav-h));
  overflow: hidden;
  background: linear-gradient(160deg, #eef3f7 0%, #dce5ed 100%);
  display: flex;
  flex-direction: column;
}

/* When planung tab is active, app-content must not scroll */
body.tab-planung-active .app-content {
}
body.tab-planung-active {
  background: #dce5ed;
}

/* ═══════════════════════════════════════════════════════════
   KALENDER
   ═══════════════════════════════════════════════════════════ */

/* Tab-Pane Override */
#tab-kalender.kal-pane {
  padding: 20px 24px;
  max-width: none;
  display: flex;
  flex-direction: column;
  height: calc(calc(100dvh / var(--ui-zoom)) - var(--nav-h));
  overflow: hidden;
  background: linear-gradient(160deg, #eef3f7 0%, #dce5ed 100%);
}

/* Großes weißes Panel */
.kal-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
}

/* ── Toolbar ─────────────────────────────────────────────── */
.kal-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 10px;
}

.kal-toolbar-spacer { flex: 1; }

.kal-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-pale);
  border-radius: 999px;
  padding: 3px 14px 3px 10px;
  height: 36px;
  transition: background .14s, box-shadow .14s;
  position: relative;
}
.kal-search-wrap:focus-within {
  background: var(--white);
  box-shadow: 0 1px 6px rgba(53,80,111,.15);
}

/* Dropdown */
.kal-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kal-search-dropdown.hidden { display: none; }

.kal-search-dropdown-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  padding: 0 4px;
}
.kal-search-dropdown-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.kal-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s, color .12s, box-shadow .12s;
  background: var(--primary-pale);
  color: var(--primary);
}
.kal-search-chip:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(53,80,111,.18);
}
.kal-search-chip.active {
  background: var(--primary);
  color: #fff;
}
.kal-search-dropdown-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px;
}
.kal-search-icon {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.kal-search {
  width: 140px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}
.kal-search::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}

/* Ansichts-Umschalter (Pill-Stil) */
.kal-view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--primary-pale);
  border-radius: 999px;
  padding: 3px;
}

.kal-view-btn {
  height: 30px;
  padding: 0 13px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: background .14s, color .14s, box-shadow .14s;
  white-space: nowrap;
}
.kal-view-btn + .kal-view-btn { border-left: none; }
.kal-view-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(53,80,111,.12);
}

/* Navigation (Pill-Stil) */
.kal-nav {
  display: grid;
  grid-template-columns: 36px minmax(180px, 1fr) 36px;
  width: 280px;
  height: 36px;
  padding: 3px;
  background: var(--primary-pale);
  border-radius: 999px;
  align-items: stretch;
  gap: 0;
}
.kal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--primary);
  font-size: 17px;
  line-height: 1;
  transition: background .14s, color .14s, box-shadow .14s;
}
.kal-nav-btn:hover {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(53,80,111,.12);
}
#kal-nav-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  min-width: 140px;
  text-align: center;
  color: var(--primary);
  letter-spacing: -.2px;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(53,80,111,.10);
  padding: 0 12px;
}
#kal-nav-label:hover { background: var(--primary-pale); }

/* + Neuer Eintrag Button (Gradient-Pill) */
.kal-add-btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(53,80,111,.18);
  white-space: nowrap;
  transition: opacity .15s, transform .15s;
}
.kal-add-btn:hover {
  opacity: .88;
  transform: translateY(-1px);
}

/* Schichten-Toggle */
.kal-shifts-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .12s, color .12s;
}
.kal-shifts-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.kal-shifts-toggle input[type=checkbox] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Typ-Filter */
.kal-type-filters,
.kal-area-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.kal-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

@keyframes kalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes kalFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.kal-fade-in  { }
.kal-fade-out { }

/* ══════════════════════════════════════════════════════════
   MONATSANSICHT
   ══════════════════════════════════════════════════════════ */

.kal-month {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* Wochentag-Kopf */
.kal-month-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.kal-month-head-cell {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
}

/* Wochen-Grid */
.kal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  flex: 1;
}

/* Tag-Zelle */
.kal-month-cell {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,.03);
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow .12s;
  min-height: 0;
}
.kal-month-cell:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.kal-month-cell.other-month {
  background: #f8fafb;
  opacity: .58;
}
.kal-month-cell.other-month .kal-cell-day { color: var(--text-muted); }

.kal-month-cell.today {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: 0 4px 16px rgba(53,80,111,.13);
}

.kal-month-cell.today .kal-cell-day-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 12px;
}

.kal-month-cell.today .kal-cell-day-badge {
  background: var(--primary);
  color: #fff;
  font-size: 9px;
}

.kal-cell-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.kal-cell-day-num {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.kal-cell-day-badge {
  font-size: 9px;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--primary-pale);
  border-radius: 999px;
  padding: 3px 6px;
  white-space: nowrap;
}

/* Abwesenheits-Chip im Kalender */
.kal-leave-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kal-leave-chip--urlaub  { background: #fef3c7; color: #92400e; }
.kal-leave-chip--krank   { background: #fee2e2; color: #991b1b; }
.kal-leave-chip--sonstiges { background: #f3f4f6; color: #4b5563; }
.kal-leave-chip--pending { opacity: .6; }

/* Ereignis-Chips in Monatsansicht */
.kal-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 2px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: opacity .1s;
  border: none;
  border-left: 3px solid var(--primary);
  background: var(--primary-pale);
  min-width: 0;
}
.kal-chip:hover { opacity: .8; }
.kal-chip-time {
  font-weight: 500;
  opacity: .8;
  flex-shrink: 0;
}
.kal-chip-title { overflow: hidden; text-overflow: ellipsis; }
.kal-chip-source { font-size: 8px; font-weight: 800; background: rgba(53,80,111,.15); color: var(--primary); border-radius: 3px; padding: 1px 4px; margin-left: auto; flex-shrink: 0; }

/* Terminal-Toggle im Modal */

/* "+X weitere" Link */
.kal-more-link {
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 3px;
  margin-top: 1px;
}
.kal-more-link:hover { background: var(--primary-pale); }

/* ══════════════════════════════════════════════════════════
   WOCHEN- und TAGESANSICHT
   ══════════════════════════════════════════════════════════ */

.kal-timeline {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.kal-timeline-head {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
  flex-shrink: 0;
}

.kal-timeline-gutter-head {
  width: 52px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}

.kal-timeline-day-head {
  flex: 1;
  min-width: 120px;
  padding: 6px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  border-left: 1px solid var(--border);
}
.kal-timeline-day-head .day-name { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.kal-timeline-day-head .day-date { font-size: 16px; font-weight: 800; }
.kal-timeline-day-head.today { color: var(--primary); }
.kal-timeline-day-head.today .day-date {
  background: var(--primary);
  color: var(--white);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 14px;
}

/* Ganztägig-Zeile unter der Kopfzeile (gleiche Spaltenbreiten wie Kopf/Tage) */
.kal-timeline-allday {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.kal-timeline-allday-gutter {
  width: 52px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 2px;
  box-sizing: border-box;
}
.kal-timeline-allday-cell {
  flex: 1;
  min-width: 120px;
  padding: 3px 4px 1px;
  border-left: 1px solid var(--border);
  box-sizing: border-box;
  overflow: hidden;
}
.kal-timeline-allday-cell.today { background: var(--primary-pale); }

/* Body: der sichtbare Zeitraum füllt immer exakt die Höhe — Mausrad zoomt */
.kal-timeline-body {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  overscroll-behavior: contain;
}
.kal-timeline-body-inner {
  display: flex;
  height: 100%;
}

/* Zeit-Gutter */
.kal-time-gutter {
  width: 52px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  left: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
}
.kal-hour-label {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  padding: 4px 6px 0;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

/* Tag-Spalten in Zeitachsen-Ansicht */
.kal-day-col {
  flex: 1;
  min-width: 120px;
  border-left: 1px solid var(--border);
  position: relative;
  background: var(--white);
  display: flex;
  flex-direction: column;
}
.kal-day-col.today { background: #fafbff; }

.kal-hour-row {
  flex: 1;
  min-height: 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background .1s;
}
.kal-hour-row:hover { background: var(--primary-pale); }
.kal-hour-row::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  border-bottom: 1px dashed rgba(0,0,0,.05);
  pointer-events: none;
}

/* Kalender-Ereignis-Blöcke in Zeitachse */
.kal-event-block {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: grab;
  overflow: hidden;
  z-index: 3;
  border: 1.5px solid transparent;
  line-height: 1.3;
  transition: opacity .12s, box-shadow .12s;
}
.kal-event-block:hover { box-shadow: 0 2px 8px rgba(0,0,0,.18); opacity: .9; }
.kal-event-block--tiny { padding: 0 5px; font-size: 10px; display: flex; align-items: center; }
.kal-event-block--tiny .kal-event-block-time { display: none; }
.kal-shift-block--tiny { padding: 0 5px; font-size: 9px; display: flex; align-items: center; }
.kal-shift-block--tiny .kal-shift-block-time { display: none; }
.kal-event-block-time { font-size: 10px; font-weight: 500; opacity: .8; }
.kal-event-block-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Now-Indicator */
.kal-now-indicator {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  z-index: 5;
  pointer-events: none;
}
.kal-now-indicator::before {
  content: '';
  position: absolute;
  left: -6px;
  top: -5px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--primary);
}

/* Schicht-Blöcke in Zeitachse (halb-transparent, klar unterscheidbar) */
.kal-shift-block {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  z-index: 2;
  border: 1.5px dashed;
  opacity: .55;
  pointer-events: none;
  line-height: 1.3;
}
.kal-shift-block-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-shift-block-time { font-size: 9px; opacity: .8; }

/* ══════════════════════════════════════════════════════════
   TAGESÜBERSICHT DRAWER
   ══════════════════════════════════════════════════════════ */

.kal-day-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  z-index: 150;
}

.kal-day-drawer {
  position: fixed;
  right: 0;
  top: 52px;
  bottom: var(--nav-h);
  width: 340px;
  max-width: calc(95vw / var(--ui-zoom));
  background: var(--white);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 20px rgba(0,0,0,.1);
  z-index: 160;
  display: flex;
  flex-direction: column;
}

.kal-day-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}

.kal-day-drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kal-day-shifts-btn {
  font-size: 11px;
  padding: 5px 10px;
}
.kal-day-shifts-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.kal-day-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Ereignis-Karten im Drawer */
.kal-drawer-entry {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.kal-drawer-entry:hover {
  border-color: var(--primary-light);
  background: var(--primary-pale);
}
.kal-drawer-entry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.kal-drawer-entry-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.kal-drawer-entry-type {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.kal-drawer-entry-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.kal-drawer-entry-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kal-drawer-entry-meta span { display: flex; align-items: center; gap: 3px; }
.kal-drawer-no-events {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 32px 0;
}

/* Schichten-Panel im Drawer */
.kal-day-shifts-panel {
  border-top: 1px solid var(--border);
  overflow-y: auto;
  padding: 10px 12px;
  max-height: 260px;
  flex-shrink: 0;
}
.kal-shifts-panel-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.kal-shifts-area-group {
  margin-bottom: 10px;
}
.kal-shifts-area-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}
.kal-shift-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}
.kal-shift-row:last-child { border-bottom: none; }
.kal-shift-row-time { color: var(--text-muted); font-size: 11px; flex-shrink: 0; min-width: 90px; }
.kal-shift-row-name { font-weight: 600; color: var(--text); }

/* ══════════════════════════════════════════════════════════
   EREIGNIS-MODAL
   ══════════════════════════════════════════════════════════ */

/* Kalender Detail-Ansicht */
.kal-detail-card {
  max-width: 440px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
}
.kal-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 0;
}
.kal-detail-type-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid transparent;
}
.kal-detail-edit-btn {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: border-color .15s, color .15s;
}
.kal-detail-edit-btn:hover { border-color: var(--primary); color: var(--primary); }
.kal-detail-edit-btn svg { width: 16px; height: 16px; }
.kal-detail-header .modal-close { flex-shrink: 0; }
.kal-detail-body {
  padding: 20px;
}
.kal-detail-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}
.kal-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary, #64748b);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.kal-detail-row:last-child { border-bottom: none; }
/* Anfrage von der Website bestätigen/ablehnen (14.10.2026, website-reservierungen.js) */
.wres-knoepfe { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.wres-knoepfe:not(:empty) { margin-top: 16px; }
.kal-detail-row-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--primary);
}
.kal-detail-row-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Kalender Drag & Drop */
.kal-dragging { opacity: .4; cursor: grabbing; }
.kal-event-block:active { cursor: grabbing; }
.kal-drop-ghost {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 6px;
  background: var(--primary-pale);
  border: 1.5px dashed var(--primary);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  opacity: .7;
}

.kal-modal-card {
  max-width: 560px;
  max-height: calc(90dvh / var(--ui-zoom));
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
}
.kal-modal-card form {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
}

/* Header */
.kal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 16px 10px;
}
.kal-modal-head-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--primary);
}
.kal-modal-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.kal-modal-close-btn:hover { background: var(--bg); }

/* Body */
.kal-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
  min-height: 0;
}

/* Titel-Input (groß, prominent, grauer Hintergrund) */
.kal-modal-title-input {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  outline: none;
  margin-bottom: 14px;
  background: var(--bg);
  transition: border-color .15s;
}
.kal-modal-title-input::placeholder { color: var(--text-muted); font-weight: 600; }
.kal-modal-title-input:focus { border-color: var(--primary); }

/* Typ-Chips */
.kal-modal-type-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  overflow-x: auto;
}
.kal-type-chip {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
  white-space: nowrap;
  flex-shrink: 0;
}
.kal-type-chip:hover { border-color: var(--primary); color: var(--primary); }
.kal-type-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Reservierung-Felder */
.kal-res-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.kal-res-field {
  flex: 1;
}
.kal-res-field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 5px;
}
.kal-res-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  outline: none;
  background: var(--white);
  transition: border-color .15s;
}
.kal-res-field input:focus { border-color: var(--primary); }

/* WANN-Fieldset (grauer Hintergrund + Border) */
.kal-modal-when {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 0 0 18px;
  background: var(--bg);
}
.kal-modal-when legend {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--primary);
  padding: 0 6px;
}
.kal-when-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.kal-when-row:first-of-type { margin-top: 6px; }
.kal-when-field {
  flex: 1;
}
.kal-when-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.kal-when-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  outline: none;
  transition: border-color .15s;
  background: var(--white);
  accent-color: var(--primary);
  color-scheme: light;
}
.kal-when-field input:focus { border-color: var(--primary); }
.kal-when-field input::-webkit-calendar-picker-indicator {
  filter: brightness(0) saturate(100%) invert(30%) sepia(20%) saturate(800%) hue-rotate(175deg);
}

/* Ganztägig */
.kal-when-allday {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  flex-shrink: 0;
}
.kal-when-allday-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Toggle-Switch */
.kal-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.kal-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.kal-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background .2s;
}
.kal-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform .2s;
}
.kal-toggle input:checked + .kal-toggle-track {
  background: var(--primary);
}
.kal-toggle input:checked + .kal-toggle-track::after {
  transform: translateX(20px);
}

/* Bereich + Details Labels */
.kal-modal-body .form-row label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.kal-modal-body .form-row .optional { display: none; }

/* Bereich Input */
.kal-modal-body .form-row input[type="text"] {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--white);
}
.kal-modal-body .form-row input[type="text"]:focus { border-color: var(--primary); }

/* Textarea */
.kal-modal-body .form-row textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color .15s;
  background: var(--bg);
  min-height: 80px;
  color: var(--text);
}
.kal-modal-body .form-row textarea:focus { border-color: var(--primary); }

/* Wiederholen-Card */
.kal-repeat-card {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 18px;
  background: var(--bg);
}
.kal-repeat-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kal-repeat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.kal-repeat-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.kal-repeat-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.kal-repeat-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.kal-repeat-options {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.kal-repeat-row {
  display: flex;
  gap: 12px;
}
.kal-repeat-field {
  flex: 1;
}
.kal-repeat-field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 4px;
}
.kal-repeat-field select,
.kal-repeat-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  outline: none;
  background: var(--white);
  transition: border-color .15s;
}
.kal-repeat-field select:focus,
.kal-repeat-field input:focus { border-color: var(--primary); }

/* Footer */
.kal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  padding: 14px 16px 22px;
  gap: 10px;
}
.kal-modal-footer-left { display: flex; gap: 8px; margin-right: auto; }
.kal-modal-footer-right { display: flex; gap: 10px; align-items: center; }
.kal-modal-btn-cancel {
  padding: 11px 20px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  border-radius: 999px;
  transition: background .12s;
}
.kal-modal-btn-cancel:hover { background: var(--bg); }
.kal-modal-btn-save {
  padding: 11px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(53,80,111,.18);
  transition: opacity .15s, transform .15s;
}
.kal-modal-btn-save:hover { opacity: .88; transform: translateY(-1px); }

/* ══════════════════════════════════════════════════════════
   EREIGNIS-TYP FARBEN
   ══════════════════════════════════════════════════════════ */

.kal-type-reservierung  { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.kal-type-veranstaltung { background: #dcfce7; color: #166534; border-color: #86efac; }
.kal-type-termin        { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.kal-type-intern        { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.kal-type-sonstiges     { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }

/* When kalender tab is active, override app-content scroll */
body.tab-kalender-active .app-content {
}
body.tab-kalender-active {
  background: #dce5ed;
}

/* ═══════════════════════════════════════════════════════════
   TEAM
   ═══════════════════════════════════════════════════════════ */

/* Tab-Pane Override */
#tab-team.team-pane {
  padding: 20px 24px;
  max-width: none;
  display: flex;
  flex-direction: column;
  height: calc(calc(100dvh / var(--ui-zoom)) - var(--nav-h));
  overflow: hidden;
  background: linear-gradient(160deg, #eef3f7 0%, #dce5ed 100%);
}

body.tab-team-active .app-content {
}
body.tab-team-active {
  background: #dce5ed;
}

/* Großes weißes Panel */
.team-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
}

/* ── Toolbar ─────────────────────────────────────────────── */
.team-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 10px;
  background: transparent;
  border-bottom: none;
  flex-shrink: 0;
  flex-wrap: wrap;
  z-index: 10;
}

.team-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-pale);
  border-radius: 999px;
  padding: 3px 14px 3px 10px;
  height: 36px;
  transition: background .14s, box-shadow .14s;
  flex-shrink: 0;
}
.team-search-wrap:focus-within {
  background: var(--white);
  box-shadow: 0 1px 6px rgba(53,80,111,.15);
}

.team-search-icon {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.team-search {
  width: 140px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}
.team-search::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}


.team-costs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
  flex-shrink: 0;
}
.team-costs-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-pale);
}
.team-costs-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* Zoll-Mappe (js/zoll-mappe.js) */
.app-confirm-box.zoll-box { max-width: 460px; width: min(460px, calc(94vw / var(--ui-zoom))); max-height: 90vh; overflow-y: auto; }
.zoll-sub { margin: -2px 0 14px; font-size: 13px; color: var(--text-secondary, #6b7280); line-height: 1.45; }
.zoll-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.zoll-chip { height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.zoll-chip:hover { border-color: var(--primary-light); background: var(--primary-pale); }
.zoll-chip--an { border-color: var(--primary); background: var(--primary-pale); color: var(--primary-dark); }
.zoll-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-bottom: 12px; }
.zoll-feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.zoll-feld--breit { grid-column: 1 / -1; }
.zoll-label { font-size: 12px; font-weight: 600; color: var(--text-secondary, #6b7280); }
.zoll-eingabe { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); color: var(--text); font: inherit; font-size: 14px; min-width: 0; width: 100%; box-sizing: border-box; }
.zoll-eingabe:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.zoll-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--text); cursor: pointer; margin-bottom: 10px; }
.zoll-check input { margin: 2px 0 0; flex-shrink: 0; }
.zoll-meldung { min-height: 20px; font-size: 13px; color: var(--text-secondary, #6b7280); margin-bottom: 12px; }
.zoll-meldung--fehler { color: var(--danger); font-weight: 600; }
.zoll-vorschau-fuss { align-items: center; gap: 10px; }
.zoll-vorschau-info { margin-right: auto; font-size: 13px; color: var(--text-secondary, #6b7280); }
.zoll-vorschau-info--rot { color: var(--danger); font-weight: 600; }
/* Betrieb löschen mit Sicherung (js/betrieb-loeschen.js, 17.10.2026) */
.app-confirm-box.bl-box { max-width: 480px; width: min(480px, calc(94vw / var(--ui-zoom))); max-height: 90vh; overflow-y: auto; }
.bl-warnung { background: rgba(231, 76, 60, .1); color: #b42318; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.45; margin-bottom: 12px; }
.bl-schritt { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.bl-schritt-titel { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.bl-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-knopf { min-height: 34px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.bl-knopf:hover { border-color: var(--primary-light); background: var(--primary-pale); }
.bl-knopf:disabled { opacity: .6; cursor: default; }
.bl-knopf--fertig::after { content: "\2713"; color: #1f7a45; font-weight: 700; }
.bl-meldung { min-height: 18px; font-size: 12px; color: var(--text-muted); }
.bl-meldung--fehler { color: var(--danger); font-weight: 600; }
.bl-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--text); cursor: pointer; }
.bl-check input { margin: 2px 0 0; flex-shrink: 0; }
.bl-eingabe { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); color: var(--text); font: inherit; font-size: 14px; width: 100%; box-sizing: border-box; }
.bl-eingabe:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
html.dark .bl-warnung { background: rgba(240, 138, 128, .14); color: #f08a80; }
html.dark .bl-knopf--fertig::after { color: #6fcf97; }
/* Arbeitszeit prüfen (js/arbeitszeit-pruefen.js, 17.10.2026) */
.app-confirm-box.azp-box { max-width: 480px; width: min(480px, calc(94vw / var(--ui-zoom))); max-height: 90vh; display: flex; flex-direction: column; }
.azp-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.azp-zahl { font-size: 12px; font-weight: 600; background: #fff3dc; color: #9a5b00; border-radius: 10px; padding: 1px 8px; }
.azp-sub { margin: -2px 0 12px; font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.azp-liste { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; margin-bottom: 14px; }
.azp-leer { font-size: 13px; color: var(--text-muted); padding: 8px 0; }
.azp-leer--fehler { color: var(--danger); font-weight: 600; }
.azp-eintrag { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font-size: 13px; }
.azp-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.azp-zeit { grid-column: 1; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.azp-grund { grid-column: 1 / -1; color: #9a5b00; }
.azp-grund--rot { color: #b42318; }
.azp-ansehen { grid-row: 1 / span 2; grid-column: 2; align-self: center; height: 28px; padding: 0 10px; border: 1px solid var(--primary); border-radius: 6px; background: var(--white); color: var(--primary); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.azp-ansehen:hover { background: var(--primary-pale); }
html.dark .azp-zahl { background: #33270f; color: #f2b45a; }
html.dark .azp-grund { color: #f2b45a; }
html.dark .azp-grund--rot { color: #f08a80; }
/* DATEV-Datei (js/datev-export.js, 14.10.2026): Fenster wie die Zoll-Mappe, mit Prüfliste und Vorschau */
.app-confirm-box.datev-box { max-width: 560px; width: min(560px, calc(94vw / var(--ui-zoom))); }
.datev-monat { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.datev-monat-text { min-width: 150px; text-align: center; font-weight: 700; font-size: 15px; }
.datev-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.datev-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--primary); text-decoration: underline; cursor: pointer; }
.datev-titel { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; margin: 4px 0 6px; }
.datev-pruef { margin-bottom: 12px; }
.datev-punkt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 6px; font-size: 13px; line-height: 1.4; }
.datev-punkt--rot { border-color: var(--danger); }
.datev-punkt-text { flex: 1; min-width: 0; }
.datev-punkt--rot .datev-punkt-text { color: var(--danger); font-weight: 600; }
.datev-punkt-knopf { flex-shrink: 0; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.datev-punkt-knopf:hover { border-color: var(--primary-light); background: var(--primary-pale); }
.datev-ok { font-size: 13px; font-weight: 600; color: var(--success); margin-bottom: 4px; }
.datev-vorschau { max-height: 260px; overflow: auto; margin-bottom: 12px; }
.datev-tabelle { width: 100%; border-collapse: collapse; font-size: 12px; }
.datev-tabelle th { text-align: left; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 4px 6px; position: sticky; top: 0; background: var(--white); }
.datev-tabelle td { padding: 4px 6px; border-bottom: 1px solid var(--border); }
.datev-tabelle .datev-zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.datev-hilfe { font-size: 13px; line-height: 1.45; margin-bottom: 12px; }
.datev-hilfe summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.datev-hilfe ol { margin: 8px 0; padding-left: 20px; }
.datev-hilfe-fuss { color: var(--text-muted); }
@media (max-width: 480px) { .datev-tabelle { font-size: 11px; } .datev-tabelle th, .datev-tabelle td { padding: 4px 3px; } }
@media (max-width: 520px) {
  .zoll-form { grid-template-columns: 1fr; }
  .zoll-vorschau-fuss { flex-wrap: wrap; }
  .zoll-vorschau-info { flex-basis: 100%; }
}

.team-archive-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin-bottom: 10px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}
.team-archive-back-btn {
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.team-archive-back-btn:hover {
  border-color: var(--primary);
  background: var(--primary-pale);
}

.team-archive-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.team-drawer-archive-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.team-drawer-archive-btn:hover {
  border-color: #f87171;
  color: #dc2626;
  background: #fef2f2;
}
.team-drawer-archive-btn--restore {
  border-color: #86efac;
  color: #16a34a;
  background: #f0fdf4;
}
.team-drawer-archive-btn--restore:hover {
  border-color: #4ade80;
  color: #15803d;
  background: #dcfce7;
}

.team-toolbar-right {
  margin-left: auto;
}

/* Add-Button */
.team-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(53,80,111,.18);
  white-space: nowrap;
  transition: opacity .15s, transform .15s;
}
.team-add-btn:hover {
  opacity: .88;
  transform: translateY(-1px);
}

/* Add-Modal */
.team-add-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
}
.team-add-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: calc(92vw / var(--ui-zoom));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.16);
  z-index: 310;
  overflow: hidden;
}
.team-add-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
}
.team-add-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.team-add-live {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 20px 18px;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: 14px;
}
.team-add-live-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  white-space: nowrap;
}
.team-add-live-info {
  flex: 1;
  min-width: 0;
}
.team-add-live-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.team-add-live-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-add-modal-body {
  padding: 0 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.team-add-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  text-align: left;
  width: 100%;
}
.team-add-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 12px rgba(53,80,111,.08);
  background: var(--bg);
}
.team-add-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-pale) 0%, #d0dfef 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.team-add-card-icon--requests {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
}
.team-add-card-text {
  flex: 1;
  min-width: 0;
}
.team-add-card-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.team-add-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.team-add-card-arrow {
  font-size: 20px;
  color: var(--text-muted);
  opacity: .4;
  flex-shrink: 0;
  transition: opacity .15s;
}
.team-add-card:hover .team-add-card-arrow {
  opacity: .7;
}
.team-add-req-count {
  background: var(--danger);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  line-height: 16px;
  min-width: 18px;
  text-align: center;
  margin-left: 6px;
}
.team-add-req-count:empty { display: none; }
.team-add-card--archive {
  margin-top: 4px;
  border-style: dashed;
  opacity: .75;
}
.team-add-card--archive:hover { opacity: 1; }
.team-add-archive-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ── Mitarbeiterliste ────────────────────────────────────── */
/* Offene Beitrittsanfragen über der Liste (12.10.2026) */
.team-anfragen-hinweis {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  flex-shrink: 0;
  margin: 2px 0 4px;
  padding: 12px 14px;
  border: 1.5px solid var(--primary-light);
  border-radius: var(--radius);
  background: var(--primary-pale);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.team-anfragen-hinweis:hover { border-color: var(--primary); }
.team-anfragen-zahl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.team-anfragen-text { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.team-anfragen-los { font-size: 13px; font-weight: 700; color: var(--primary); }
html.dark .team-anfragen-hinweis { background: rgba(255,255,255,.05); border-color: var(--border); }
html.dark .team-anfragen-los { color: var(--text); }

.team-list {
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: none;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.team-worker-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.team-worker-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 10px rgba(53,80,111,.08);
}

.team-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.team-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-pale) 0%, #d0dfef 100%);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-card-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--white);
}
.team-card-status.status--seen {
  background: #22c55e;
}
.team-card-status.status--unseen {
  background: #f59e0b;
}
.team-card-status.status--no-plan {
  background: #d1d5db;
}
.team-card-info {
  min-width: 0;
}
.team-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-card-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.team-card-pruefen {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  margin-top: 2px;
}
html.dark .team-card-pruefen { color: #fbbf24; }

.team-card-spacer {
  flex: 1;
}

.team-card-hours {
  text-align: right;
  flex-shrink: 0;
}

.team-card-hours-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.team-card-hours-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}
.team-card-hours-label {
  display: none;
}

.team-card-chevron {
  font-size: 18px;
  color: var(--text-muted);
  opacity: .3;
  flex-shrink: 0;
  line-height: 1;
  transition: opacity .15s;
}
.team-worker-card:hover .team-card-chevron {
  opacity: .6;
}

/* ── Drawer ──────────────────────────────────────────────── */
.team-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  animation: drawerFadeIn .15s ease-out both;
}

.team-drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 660px;
  max-width: calc(92vw / var(--ui-zoom));
  max-height: calc(calc(100dvh / var(--ui-zoom)) - 40px);
  height: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.16);
  z-index: 310;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawerSlideIn .2s ease-out both;
}

/* Mit Reitern (Mitarbeiter): feste Hoehe, damit der Rahmen beim Reiterwechsel
   nicht springt — nur der Body scrollt. Ohne Reiter (Betrieb) waechst er mit. */
.team-drawer:has(.team-drawer-tabs:not(.hidden)) {
  height: min(calc(calc(100dvh / var(--ui-zoom)) - 40px), 860px);
}

@keyframes drawerFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes drawerSlideIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.97); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.team-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  flex-shrink: 0;
  gap: 12px;
}

.team-drawer-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.team-drawer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-pale) 0%, #d0dfef 100%);
  color: var(--primary);
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-drawer-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-drawer-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.team-drawer-plan-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.plan-badge--seen {
  background: rgba(34, 197, 94, .12);
  color: #16a34a;
}
.plan-badge--unseen {
  background: rgba(245, 158, 11, .12);
  color: #d97706;
}
.plan-badge--no-plan {
  background: rgba(156, 163, 175, .12);
  color: #9ca3af;
}
.team-drawer-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Drawer Tabs */
.team-drawer-tabs {
  display: flex;
  gap: 6px;
  padding: 0 24px 14px;
  flex-shrink: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.team-drawer-tab {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.team-drawer-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.team-drawer-tab:hover:not(.active) {
  border-color: var(--primary-light);
  color: var(--text);
}

.team-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.team-drawer-body input,
.team-drawer-body select,
.team-drawer-body textarea {
  color: var(--primary);
  font-weight: 600;
}
.team-drawer-body input::placeholder,
.team-drawer-body textarea::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  opacity: .6;
}

/* ── Abrechnung Tab ──────────────────────────────────────── */

/* Stundenkonto-Karte */
.abr-account-card {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  color: #fff;
}
.abr-account-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.abr-account-item { flex: 1; }
.abr-account-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  opacity: .7;
  margin-bottom: 4px;
}
.abr-account-value {
  font-size: 17px;
  font-weight: 800;
}
.abr-account-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 10px 14px;
}
.abr-account-open-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  opacity: .8;
}
.abr-account-open-value {
  font-size: 20px;
  font-weight: 800;
}

/* Monatskarte */
.abr-month-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.abr-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.abr-month-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.abr-month-arrow {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: border-color .15s, color .15s;
}
.abr-month-arrow:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.abr-month-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.abr-month-stat {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}
.abr-month-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.abr-month-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-top: 2px;
}
.abr-target {
  padding: 12px 16px 0;
}
.abr-target-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.abr-target-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.abr-target-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}
.abr-target-pct--full {
  color: #16a34a;
}
.abr-target-bar {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.abr-target-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 99px;
  transition: width .4s ease;
}
.abr-target-fill--full {
  background: linear-gradient(90deg, #4ade80, #16a34a);
}
.abr-month-days {
  max-height: 180px;
  overflow-y: auto;
}

/* Section headings */
.team-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  margin: 16px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Per-day breakdown */
.team-abr-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 4px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.team-abr-day-row:last-child { border-bottom: none; }
.team-abr-day-label {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 80px;
}
.team-abr-day-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.team-abr-day-hours {
  font-size: 13px;
  color: var(--text-muted);
}
.team-abr-day-earned {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.team-abr-day-tips {
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
}

/* Auszahlung-Karte */
.abr-payout-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-top: 14px;
  margin-bottom: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.abr-payout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.abr-payout-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.abr-payout-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.abr-payout-tab {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.abr-payout-tab:hover:not(.active) {
  color: var(--text);
}
.abr-payout-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* Monat-Modus: Zusammenfassung */
.abr-payout-summary {
  background: var(--bg);
  border-radius: 12px;
  padding: 4px 0;
  margin-bottom: 14px;
}
.abr-payout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
}
.abr-payout-summary-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.abr-payout-summary-label {
  font-size: 13px;
  color: var(--text-muted);
}
.abr-payout-summary-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.abr-payout-summary-total {
  background: var(--primary-pale);
  border-radius: 0 0 12px 12px;
}
.abr-payout-summary-total .abr-payout-summary-label {
  font-weight: 700;
  color: var(--primary);
}
.abr-payout-summary-total .abr-payout-summary-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
}

/* Manuell-Modus */
.abr-payout-manual-grid {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}
.abr-payout-manual-field {
  flex: 1;
}
.abr-payout-manual-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.abr-payout-manual-field input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--bg);
  outline: none;
  transition: border-color .15s, background .15s;
}
.abr-payout-manual-field input:focus {
  border-color: var(--primary);
  background: var(--white);
}
.abr-payout-manual-divider {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 12px;
  flex-shrink: 0;
}
.abr-pay-manual-rate {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.abr-pay-manual-preview {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
  min-height: 18px;
}

/* Notiz + Button */
.abr-payout-note {
  margin-bottom: 14px;
}
.abr-payout-note input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  background: var(--bg);
  outline: none;
  transition: border-color .15s, background .15s;
  color: var(--text);
}
.abr-payout-note input:focus {
  border-color: var(--primary);
  background: var(--white);
}
.abr-payout-note input::placeholder {
  color: var(--text-muted);
}
.abr-payout-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(53,80,111,.18);
  transition: opacity .15s, transform .15s;
}
.abr-payout-submit:hover {
  opacity: .92;
  transform: translateY(-1px);
}

/* Payout history */
.team-payout-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.team-payout-entry {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.team-payout-entry-main {
  flex: 1;
  min-width: 0;
}
.team-payout-entry-top {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.team-payout-entry-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.team-payout-entry-delete {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.team-payout-entry-delete:hover { background: #fee2e2; color: var(--danger); }

/* ── Stammdaten Tab ──────────────────────────────────────── */
.team-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-form .form-row {
  margin-bottom: 0;
}
.team-form .form-row-2 {
  margin-bottom: 0;
  gap: 14px;
}

.team-form .form-row label,
.team-form .form-row-2 label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin-bottom: 6px;
}

.team-form .form-row input,
.team-form .form-row select,
.team-form .form-row-2 input,
.team-form .form-row-2 select {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--bg);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.team-form .form-row input:focus,
.team-form .form-row select:focus,
.team-form .form-row-2 input:focus,
.team-form .form-row-2 select:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(53,80,111,.08);
}

.team-form .form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color .15s, background .15s, box-shadow .15s;
  background: var(--bg);
}
.team-form .form-row textarea:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(53,80,111,.08);
}

.team-form-actions {
  margin-top: 0;
  display: flex;
  justify-content: flex-end;
}
.team-form-actions .btn-primary {
  border-radius: 10px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
  box-shadow: 0 4px 12px rgba(53,80,111,.18);
}
.team-drawer .btn-secondary {
  border-radius: 10px;
  padding: 9px 18px;
}

/* Bereich-Chips in Stammdaten */
.team-areas-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.team-chip-toggle {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.team-chip-toggle:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}
.team-chip-toggle--active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.team-chip-toggle--active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}
.team-chip-empty {
  font-size: 13px;
  color: var(--text-muted);
}

/* Dokumente */
.team-doc-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.team-doc-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s;
}
.team-doc-entry:hover { border-color: var(--primary-light); }

.team-doc-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.team-doc-info {
  flex: 1;
  min-width: 0;
}

.team-doc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-doc-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.team-doc-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.team-doc-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color .15s, color .15s;
}
.team-doc-btn:hover { border-color: var(--primary); color: var(--primary); }
.team-doc-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

.team-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Zeiten Tab ──────────────────────────────────────────── */
/* ── Badges (global) ─────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: .3px;
}

.badge--warning { background: #fef3c7; color: #92400e; }
.badge--success { background: #d1fae5; color: #065f46; }
.badge--danger  { background: #fee2e2; color: #991b1b; }
.badge--muted   { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* Zeiten: Monatskarte */
.zt-month-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.zt-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.zt-month-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.zt-month-stats {
  display: flex;
  gap: 8px;
}
.zt-month-stat {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.zt-month-stat-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.zt-month-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-top: 2px;
}

/* Zeiten: Aktionen */
.team-times-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.team-times-actions .btn-success,
.team-times-actions .btn-danger {
  border-radius: 10px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.team-times-actions .btn-success {
  background: linear-gradient(160deg, rgba(22,163,74,.15) 0%, rgba(74,222,128,.25) 100%);
  border: 2px solid #16a34a;
  color: #15803d;
  box-shadow: inset 0 1px 12px rgba(74,222,128,.3), 0 2px 8px rgba(22,163,74,.1);
}
.team-times-actions .btn-success:hover {
  background: linear-gradient(160deg, rgba(22,163,74,.25) 0%, rgba(74,222,128,.35) 100%);
}
.team-times-actions .btn-danger {
  background: linear-gradient(160deg, rgba(220,38,38,.15) 0%, rgba(248,113,113,.25) 100%);
  border: 2px solid #dc2626;
  color: #b91c1c;
  box-shadow: inset 0 1px 12px rgba(248,113,113,.3), 0 2px 8px rgba(220,38,38,.1);
  opacity: 1;
}
.team-times-actions .btn-danger:hover {
  background: linear-gradient(160deg, rgba(220,38,38,.25) 0%, rgba(248,113,113,.35) 100%);
}

/* Zeiten: Liste */
.team-times-list {
  display: flex;
  flex-direction: column;
}

.team-times-week {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 8px;
  margin-bottom: 2px;
  border-bottom: 1.5px solid var(--border);
}
.team-times-week:first-child { padding-top: 0; }
.team-times-week-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.team-times-week-sum {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.team-times-date-divider {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 12px 2px 6px;
}
.team-times-date-sum {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.team-times-kurz { margin-bottom: 6px; }
.team-times-kurz > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 8px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.team-times-kurz > summary::-webkit-details-marker { display: none; }
.team-times-kurz > summary span {
  font-weight: 500;
  color: var(--text-muted);
}
.team-times-kurz > summary::after {
  content: '\203A';
  margin-left: auto;
  font-size: 16px;
  line-height: 1;
  color: var(--text-muted);
  transition: transform .15s;
}
.team-times-kurz[open] > summary { margin-bottom: 6px; }
.team-times-kurz[open] > summary::after { transform: rotate(90deg); }

.team-times-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 6px;
  transition: border-color .15s;
}
.team-times-entry:hover {
  border-color: var(--primary-light);
}

.team-times-entry--manual {
  border-left: 3px solid var(--primary);
}

.team-times-entry-left {
  flex: 1;
  min-width: 0;
}

.team-times-entry-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.team-times-entry-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-style: italic;
}

.team-times-tips {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
  margin-top: 3px;
}

.team-times-entry-right {
  text-align: right;
  flex-shrink: 0;
}

.team-times-entry-dur {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.team-times-entry-manual {
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

/* Stempeln (Paket f): zu lange / außerplanmäßige Einträge, Korrekturanträge, PIN */
.team-times-entry--pruefen { border-color: #fca5a5; }
html.dark .team-times-entry--pruefen { border-color: #7f1d1d; }
.team-times-entry--form { display: block; }
.team-times-entry-pruefen {
  font-size: 11px;
  font-weight: 700;
  color: #b91c1c;
  margin-top: 2px;
}
html.dark .team-times-entry-pruefen { color: #f87171; }
.team-times-entry-ausser,
.team-times-entry-nachgetragen,
.team-times-entry-kopierbar,
.team-times-entry-offline {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  margin-top: 3px;
  margin-right: 4px;
}
.team-times-korr-btn { margin-top: 6px; }
.team-times-korr-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.team-times-korr-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.team-times-korr-form input {
  padding: 6px 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.team-times-korr-form .team-form-msg { flex-basis: 100%; }
.tz-korr-hinweis { flex-basis: 100%; font-size: 12px; color: var(--text-muted); }
.tz-korr {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-left: 3px solid #f59e0b;
  border-radius: 12px;
  background: var(--bg);
  margin-bottom: 6px;
}
.tz-korr-kopf {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.tz-korr-tag { color: var(--text-muted); font-weight: 600; }
.tz-korr-zeiten { font-size: 13px; font-weight: 700; color: var(--text); margin-top: 4px; }
.tz-korr-grund { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.tz-korr-knoepfe { display: flex; gap: 8px; margin-top: 8px; }

/* ── Notizen Tab ─────────────────────────────────────────── */
.team-notes-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-notes-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.team-notes-textarea {
  width: 100%;
  min-height: 200px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color .15s;
  background: var(--white);
  color: var(--text);
}
.team-notes-textarea:focus { border-color: var(--primary); }

.team-notes-actions {
  display: flex;
  justify-content: flex-end;
}

/* ── Kostenübersicht ─────────────────────────────────────── */
.team-costs { padding: 16px; flex: 1; overflow-y: auto; min-height: 0; }

/* Kompakter Header */
.costs-header-bar {
  display: grid;
  grid-template-columns: 1fr auto minmax(0, auto) auto 1fr;   /* Monat bleibt mittig, Export rechts */
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.costs-header-bar::before { content: ''; }
.costs-header-center {
  text-align: center;
  min-width: 0;
}
.costs-header-month {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.costs-header-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
  flex-wrap: wrap;
}
.costs-header-dot { opacity: .4; }
.costs-header-total {
  color: var(--primary);
  font-weight: 800;
}

/* Filter-Leiste */
.costs-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.costs-filter-tab {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.costs-filter-tab:hover:not(.active) {
  border-color: var(--primary-light);
  color: var(--text);
}
.costs-filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.costs-csv-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.costs-export {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
@media (max-width: 720px) {
  .costs-header-bar { grid-template-columns: auto 1fr auto; }
  .costs-header-bar::before { display: none; }
  .costs-export { grid-column: 1 / -1; }
}
.costs-export .costs-csv-btn { margin-left: 0; }
.costs-csv-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Worker-Karten */
.costs-worker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.costs-worker-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color .15s, box-shadow .15s;
}
.costs-worker-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 10px rgba(53,80,111,.06);
}
.costs-worker-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.costs-worker-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-pale) 0%, #d0dfef 100%);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.costs-worker-info { flex: 1; min-width: 0; }
.costs-worker-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.costs-worker-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.costs-worker-total {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}
.costs-worker-details {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.costs-worker-detail {
  flex: 1;
  min-width: 80px;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.costs-detail-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.costs-detail-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.costs-offen { color: var(--danger); }
.costs-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px 0;
}

/* ── Personalkostenquote (12.10.2026, js/personalquote-ui.js) ──────────────
   Ruhige Karte wie die Kostenübersicht. Farben nur aus den App-Variablen; das Gelb der Ampel hat keine App-Variable und
   steht deshalb nur hier (--quote-gelb, gleiches Gelb wie die Ampel des Arbeitszeit-Wächters). */
.costs-quote { margin-bottom: 12px; }
.pq-card {
  --quote-gelb: #b45309;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
html.dark .pq-card { --quote-gelb: #fbbf24; }
.pq-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pq-kopf-text { min-width: 0; }
.pq-titel { font-size: 15px; font-weight: 800; color: var(--text); }
.pq-unter { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pq-basis { display: inline-flex; gap: 4px; }
.pq-basis-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}
.pq-basis-btn:hover:not(.active) { border-color: var(--primary-light); color: var(--text); }
.pq-basis-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
html.dark .pq-basis-btn.active { color: var(--bg); }

.pq-monat { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pq-satz { font-size: 14px; color: var(--text); margin-top: 6px; }
.pq-satz-leer { margin-top: 14px; }
.pq-gross { font-size: 36px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.pq-monat-text { font-size: 13px; color: var(--text-muted); }
.pq-summen { font-size: 13px; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.pq-hinweis { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.pq-gruen { color: var(--success); }
.pq-gelb  { color: var(--quote-gelb); }
.pq-rot   { color: var(--danger); }
.pq-leer  { color: var(--text-muted); }
.pq-wert  { font-weight: 800; font-variant-numeric: tabular-nums; }
.pq-pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  border: 1.5px solid currentColor; font-size: 12px; font-weight: 700; white-space: nowrap;
}

.pq-tabelle { margin-top: 16px; font-size: 13px; }
.pq-zeile, .pq-wochenkopf {
  display: grid;
  grid-template-columns: minmax(64px, 1.1fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(48px, .7fr);
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
}
.pq-wochenkopf { grid-template-columns: minmax(0, 1fr) auto; }
.pq-r { text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }
.pq-kopfzeile { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--text-muted); }
.pq-wochenkopf { margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.pq-wochenname { font-weight: 700; }
.pq-tag { color: var(--text); white-space: nowrap; }
.pq-kosten { color: var(--text); }
.pq-umsatzfeld { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pq-input {
  width: 100%; max-width: 150px; box-sizing: border-box;
  padding: 5px 8px; text-align: right;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--white); color: var(--text);
  font: inherit; font-size: 13px; font-variant-numeric: tabular-nums;
}
.pq-input::placeholder { color: var(--text-muted); font-size: 12px; }
.pq-input:focus { outline: none; border-color: var(--primary-light); }
.pq-kurz { display: none; }
.pq-fest { font-variant-numeric: tabular-nums; }
.pq-fehlt { font-size: 11px; color: var(--text-muted); }
.pq-aeltere {
  display: block; width: 100%; margin-top: 8px; padding: 8px 10px;
  border: 1.5px solid var(--border); border-radius: 10px; background: var(--white);
  font: inherit; font-size: 13px; font-weight: 700; color: var(--text-muted); cursor: pointer;
}
.pq-aeltere:hover { border-color: var(--primary-light); color: var(--text); }
.pq-spielraum { margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--text); }
.pq-details-knopf {
  display: block; margin-top: 14px; padding: 4px 0;
  border: 0; background: none; font: inherit; font-size: 12px; font-weight: 700;
  color: var(--text-muted); cursor: pointer;
}
.pq-details-knopf:hover { color: var(--text); }
.pq-basis-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.pq-basis-label { font-size: 12px; color: var(--text-muted); }
.pq-fuss { margin-top: 10px; font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.pq-lade { font-size: 13px; color: var(--text-muted); padding: 6px 0; }
.pq-gesperrt .pq-titel { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 520px) {
  .pq-card { padding: 12px; }
  .pq-gross { font-size: 32px; }
  .pq-zeile, .pq-wochenkopf { gap: 6px; padding: 4px 2px; font-size: 12px; }
  /* 16 px: iOS zoomt sonst beim Antippen in die Seite; 40 px hoch zum Tippen mit dem Daumen */
  .pq-input { max-width: none; font-size: 16px; padding: 9px 10px; }
  .pq-input::placeholder { font-size: 14px; }
  .pq-lang { display: none; }
  .pq-kurz { display: inline; }
}
/* Handys: Lohnkosten-Spalte weglassen (die Karte sitzt dort in einem schmalen Bereich), damit der Umsatz ganz in sein Feld passt */
@media (max-width: 430px) {
  .pq-zeile { grid-template-columns: minmax(56px, 1fr) minmax(112px, 1.7fr) minmax(44px, .7fr); }
  .pq-zeile > :nth-child(2) { display: none; }
  .pq-input { padding: 9px 8px; }
}

/* ── Team-Chat ───────────────────────────────────────────── */


/* ── Team-Abwesenheiten ──────────────────────────────────── */
.team-leave-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.team-leave-empty {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}
.team-leave-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.team-leave-type {
  font-weight: 700;
  font-size: 13px;
}
.team-leave-dates {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.team-leave-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}
.team-leave-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.team-leave-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.team-leave-status--pending  { background: #fef9c3; color: #92400e; }
.team-leave-status--approved { background: #dcfce7; color: #166534; }
.team-leave-status--rejected { background: #fee2e2; color: #991b1b; }
.team-leave-actions {
  display: flex;
  gap: 6px;
}
/* Krankmeldung mit Foto (11.10.2026) */
.team-leave-au {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; margin-right: 6px;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface, #fff); color: var(--text);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.team-leave-au:hover { border-color: var(--primary); color: var(--primary); }
.team-leave-au--fehlt { border: none; background: none; padding: 0; color: var(--text-muted); font-weight: 500; cursor: default; }

/* ── Urlaubskonto (js/urlaub.js, 18.10.2026, Zweig urlaubskonto) ── */
.urlk-karte { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--white); display: flex; flex-direction: column; }
.urlk-karte--leer { flex-direction: row; align-items: center; gap: 12px; }
.urlk-leer-text { flex: 1; font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.urlk-kopf { display: flex; align-items: center; gap: 10px; }
.urlk-titel { flex: 1; text-align: center; font-weight: 700; font-size: 15px; }
.urlk-pfeil { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border); background: var(--white); color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.urlk-pfeil:hover { border-color: var(--primary); color: var(--primary); }
.urlk-balken { display: flex; height: 9px; border-radius: 999px; background: var(--border); overflow: hidden; margin: 12px 0 10px; }
.urlk-balken i { display: block; height: 100%; }
.urlk-b-gen { background: var(--primary); }
.urlk-b-gep { background: var(--primary-light); opacity: .55; }
.urlk-b-off { background: repeating-linear-gradient(45deg, #c9a227 0 4px, #f1df9a 4px 8px); }
.urlk-zeile { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.urlk-gross { display: flex; align-items: baseline; gap: 7px; }
.urlk-gross b { font-size: 28px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.urlk-gross span { color: var(--text-muted); font-weight: 600; font-size: 13px; }
.urlk-minus { color: var(--danger); }
.urlk-legende { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; font-size: 11.5px; color: var(--text-muted); }
.urlk-legende em { font-style: normal; display: inline-flex; align-items: center; gap: 5px; }
.urlk-legende em::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--primary); }
.urlk-legende .urlk-l-gep::before { background: var(--primary-light); opacity: .55; }
.urlk-legende .urlk-l-off::before { background: #d9b84a; }
.urlk-reihen { margin-top: 8px; }
.urlk-reihe { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.urlk-reihe small { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 1px; }
.urlk-wert { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.urlk-wert.urlk-leise { color: var(--text-muted); }
.urlk-wert.urlk-rot { color: var(--danger); }
.urlk-notiz { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 9px 11px; border-radius: 10px; background: var(--primary-pale); color: var(--primary-dark); font-size: 12.5px; line-height: 1.45; margin-top: 10px; }
.urlk-notiz--gelb { background: #fef3c7; color: #92400e; }
.urlk-notiz-text { flex: 1 1 260px; min-width: 0; }
.urlk-erinnern { flex: none; }
.urlk-antrag { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--primary-dark); background: var(--primary-pale); border-radius: 8px; padding: 5px 9px; align-self: flex-start; display: inline-block; }
.urlk-antrag--gelb { background: #fef3c7; color: #92400e; }
.urlk-sd { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 4px; }
.urlk-sd-titel { font-weight: 700; font-size: 14px; }
.urlk-sd-neu, .urlk-hinweis { font-size: 12px; margin-top: 4px; }
.urlk-tage { display: flex; gap: 6px; flex-wrap: wrap; }
.urlk-tage .team-chip-toggle { min-width: 40px; justify-content: center; }
.urlk-sd-anspruch { font-size: 13px; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.urlk-sd-anspruch .muted { font-size: 12px; }
.app-confirm-box.urlk-box { max-width: 1020px; width: min(1020px, calc(96vw / var(--ui-zoom))); max-height: 92vh; display: flex; flex-direction: column; }
.urlk-ue-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.urlk-ue-pfeile { display: flex; gap: 6px; }
.urlk-ue-sub { margin: -2px 0 12px; font-size: 13px; color: var(--text-muted); }
.urlk-ue-inhalt { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; overflow-y: auto; min-height: 120px; margin-bottom: 14px; align-items: start; }
@media (max-width: 860px) { .urlk-ue-inhalt { grid-template-columns: minmax(0, 1fr); } }
.urlk-ue-tabelle-wrap { overflow-x: auto; min-width: 0; }
.urlk-ue-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.urlk-ue-tabelle th { text-align: right; font-size: 11.5px; color: var(--text-muted); font-weight: 600; padding: 7px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.urlk-ue-tabelle td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.urlk-ue-tabelle th:first-child, .urlk-ue-tabelle td:first-child, .urlk-ue-tabelle .urlk-ue-links { text-align: left; }
.urlk-ue-tabelle td small { display: block; color: var(--text-muted); font-size: 11px; }
.urlk-ue-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.urlk-ue-link:hover { color: var(--primary); text-decoration: underline; }
.urlk-ue-marke { font-size: 10.5px; font-weight: 700; background: var(--primary-pale); color: var(--primary); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.urlk-ue-fett { font-weight: 700; }
.urlk-ue-leise, .urlk-ue-leer { color: var(--text-muted); }
.urlk-ue-fehler { color: var(--danger); font-weight: 600; }
.urlk-ue-gut { color: #1f7a45; font-weight: 600; }
.urlk-ue-mittel { color: var(--text-muted); font-weight: 600; }
.urlk-ue-gelb { color: #b45309; font-weight: 600; }
.urlk-ue-erinnern { display: block; margin-top: 5px; height: 26px; padding: 0 9px; border: 1px solid var(--primary); border-radius: 6px; background: var(--white); color: var(--primary); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.urlk-ue-erinnern:hover { background: var(--primary-pale); }
.urlk-regeln { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.urlk-regeln-titel { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.urlk-regel { display: flex; flex-direction: column; gap: 5px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; }
.urlk-regel:first-of-type { border-top: 0; }
.urlk-regel label { font-weight: 600; }
.urlk-regel small { color: var(--text-muted); font-size: 11.5px; line-height: 1.4; }
.urlk-regel input[type="number"] { height: 34px; width: 70px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; font: inherit; background: var(--white); color: var(--text); }
.urlk-regel-zeile { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.urlk-regel-zeile input[type="number"] { width: 58px; }
.urlk-regel-schalter { display: flex; gap: 8px; align-items: center; }
.urlk-regel-schalter input { width: auto; }
html.dark .urlk-karte, html.dark .urlk-pfeil, html.dark .urlk-ue-erinnern, html.dark .urlk-regel input[type="number"] { background: #1e1e1e; }
html.dark .urlk-notiz--gelb, html.dark .urlk-antrag--gelb { background: rgba(250, 204, 21, .14); color: #fbbf24; }
html.dark .urlk-ue-gut { color: #34d399; }
html.dark .urlk-ue-gelb { color: #fbbf24; }

/* ── Beitrittsanfragen-Modal ─────────────────────────────── */
.team-requests-card {
  max-width: 480px;
  max-height: calc(80dvh / var(--ui-zoom));
  display: flex;
  flex-direction: column;
}

.team-requests-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-request-entry {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.team-request-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.team-request-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.team-request-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.team-request-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* ── Form messages ───────────────────────────────────────── */
.team-form-msg {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin: 0 20px 4px;
}
.team-form-msg.success { background: #dcfce7; color: #166534; }
.team-form-msg.error   { background: #fee2e2; color: #991b1b; }

/* Mindestlohn-Hinweis unter Lohnfeldern (Gesamt-Check R3) */
.team-lohn-warnung {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.4;
  background: #fef3c7;
  color: #92400e;
}
.team-lohn-warnung.is-rot { background: #fee2e2; color: #991b1b; font-weight: 600; }
html.dark .team-lohn-warnung { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
html.dark .team-lohn-warnung.is-rot { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }

/* Einladungslink */
.team-link-body {
  padding: 16px 20px;
}

.team-link-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.team-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.team-link-url {
  flex: 1;
  font-size: 13px;
  font-family: monospace;
  color: var(--text);
  word-break: break-all;
}

.team-link-copy-btn {
  flex-shrink: 0;
}

.team-link-code-row {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.team-link-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  user-select: all;
}

.team-link-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.team-link-share-row .hidden,
.ob-app-actions .hidden { display: none; }

.team-link-whatsapp-btn { flex: 1 1 auto; }

.team-link-copied {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   EINSTELLUNGEN
   ═══════════════════════════════════════════════════════════ */

/* Tab-Pane Override */
#tab-einstellungen.eins-pane {
  padding: 20px 24px;
  max-width: none;
  display: flex;
  flex-direction: column;
  height: calc(calc(100dvh / var(--ui-zoom)) - var(--nav-h));
  overflow: hidden;
  background: linear-gradient(160deg, #eef3f7 0%, #dce5ed 100%);
}

body.tab-einstellungen-active .app-content {
}
body.tab-einstellungen-active {
  background: #dce5ed;
}

/* ── Übersicht ────────────────────────────────────────────── */
.eins-overview {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px 20px 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
}

/* Suchleiste (Kalender-Stil) */
.eins-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-pale);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 0;
  transition: background .14s, box-shadow .14s;
  position: relative;
  flex-shrink: 0;
}

/* Scrollbarer Bereich */
.eins-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 0 40px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 16px, black calc(100% - 16px), transparent);
  mask-image: linear-gradient(to bottom, transparent, black 16px, black calc(100% - 16px), transparent);
}

.eins-search-wrap:focus-within {
  background: var(--white);
  box-shadow: 0 1px 6px rgba(53,80,111,.15);
}

.eins-search-icon {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.eins-search {
  flex: 1;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  outline: none;
}

.eins-search::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}

.eins-search-clear {
  border: none;
  background: var(--text-muted);
  color: var(--white);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.eins-search-results {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  margin-bottom: 16px;
  overflow: hidden;
}

.eins-search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}

.eins-search-result-item:last-child { border-bottom: none; }
.eins-search-result-item:hover { background: var(--primary-pale); }

.eins-search-result-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.eins-search-result-cat {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.eins-search-no-result {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Sektionierte Liste ──────────────────────────────────── */
.eins-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eins-section-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--primary);
  padding: 0 4px;
  margin-bottom: 8px;
}

/* ── Sprachwahl: Zeile + Fenster mit Suche (js/sprachwahl.js, 15.10.2026) – gleich in Admin und Worker ── */
.swl-zeile { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--white); color: var(--text); font: inherit; text-align: start; cursor: pointer; }
.swl-zeile:hover { background: var(--primary-pale); }
.swl-zeile:disabled { opacity: .6; cursor: default; }
.swl-zeile:focus-visible, .swl-eintrag:focus-visible, .swl-zu:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.swl-marke { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg); color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: .4px; }
.swl-marke--an { background: var(--primary); color: var(--white); }
.swl-text { flex: 1; min-width: 0; display: grid; text-align: start; }
.swl-name { font-size: 16px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.swl-unter { font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
.swl-pfeil { flex-shrink: 0; font-size: 22px; line-height: 1; color: var(--text-muted); }
[dir="rtl"] .swl-pfeil { transform: scaleX(-1); }
.swl-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0); transition: background .25s ease; }
.swl-overlay--offen { background: rgba(0, 0, 0, .45); }
.swl-blatt { width: 100%; max-width: 480px; max-height: calc(86dvh / var(--ui-zoom, 1)); display: flex; flex-direction: column; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--white); box-shadow: 0 -8px 30px rgba(0, 0, 0, .15); transform: translateY(100%); transition: transform .28s ease, opacity .2s ease; }
.swl-overlay--offen .swl-blatt { transform: none; }
.swl-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.swl-titel { margin: 0; font-size: 20px; font-weight: 800; color: var(--text); }
.swl-zu { flex-shrink: 0; width: 34px; height: 34px; border: none; border-radius: 50%; background: var(--bg); color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.swl-suche { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px; background: var(--bg); margin-bottom: 6px; }
.swl-suche svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: var(--text-muted); stroke-width: 2; }
.swl-suche input { flex: 1; min-width: 0; padding: 11px 0; border: none; background: transparent; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.swl-liste { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.swl-gruppe { margin: 14px 4px 6px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); }
.swl-eintrag { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: none; border-radius: 12px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.swl-eintrag:hover, .swl-eintrag--an { background: var(--primary-pale); }
.swl-haken { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: var(--primary); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.swl-leer { padding: 18px 12px; color: var(--text-muted); }
@media (min-width: 700px) {
  .swl-overlay { align-items: center; }
  .swl-blatt { max-height: calc(80dvh / var(--ui-zoom, 1)); border-radius: 20px; opacity: 0; transform: translateY(16px); }
  .swl-overlay--offen .swl-blatt { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .swl-overlay, .swl-blatt { transition: none; } }

.eins-section-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
}

.eins-cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  transition: background .12s;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.eins-cat-card:last-child { border-bottom: none; }
.eins-cat-card:hover { background: var(--primary-pale); }

.eins-cat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eins-cat-icon svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eins-cat-body {
  flex: 1;
  min-width: 0;
}

.eins-cat-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.eins-cat-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1px;
}

.eins-cat-chevron {
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1;
  flex-shrink: 0;
  opacity: .5;
}

/* ── Detail-Panel ─────────────────────────────────────────── */
.eins-detail {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
  overflow: hidden;
}

.eins-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 5;
}

.eins-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background .12s;
  flex-shrink: 0;
}

.eins-back-btn:hover { background: var(--primary-pale); }

.eins-back-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eins-detail-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.eins-detail-body {
  padding: 24px;
  padding-bottom: 40px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

/* ── Profil-Header (Konto) ────────────────────────────────── */
.eins-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.eins-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .5px;
}

.eins-profile-info {
  flex: 1;
  min-width: 0;
}

.eins-profile-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1px;
}

.eins-profile-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.eins-profile-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 2px 8px;
  border-radius: 8px;
  background: #dbeafe;
  color: #1e40af;
}

/* ── Business-Avatar Upload ──────────────────────────────── */
.eins-biz-avatar-wrap {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.eins-biz-avatar-wrap .eins-profile-avatar {
  overflow: hidden;
}

.eins-biz-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .3s ease;
}
.eins-biz-avatar-img.loaded {
  opacity: 1;
}

.eins-biz-avatar-edit {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

.eins-biz-avatar-edit svg {
  width: 11px;
  height: 11px;
}

/* ── Logout-Button ───────────────────────────────────────── */
.eins-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  background: #fef2f2;
  color: var(--danger);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
  margin-top: 12px;
}
.eins-logout-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.eins-logout-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* ── Settings-Gruppen (iOS-Stil) ──────────────────────────── */
.eins-group {
  margin-bottom: 28px;
}

.eins-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  padding: 0 4px;
  margin-bottom: 6px;
}

.eins-group-hint {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 4px 0;
  line-height: 1.5;
}

.eins-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.eins-row {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  min-height: 54px;
}

.eins-row:last-child { border-bottom: none; }

.eins-row-label {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.eins-row-sublabel {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* Selectable rows (Nachrichten-Settings) */
.eins-row--selectable {
  cursor: pointer;
  transition: background .15s;
  border-radius: 10px;
  padding: 14px 16px;
}
.eins-row--selectable:hover {
  background: var(--primary-pale);
}
.eins-row--selectable .eins-row-check {
  display: none;
  flex-shrink: 0;
}
.eins-row--selected .eins-row-check {
  display: flex;
}
.eins-row--selected {
  background: var(--primary-pale);
}
.eins-row--selected .eins-row-label {
  font-weight: 700;
  color: var(--primary);
}

.eins-row-value {
  font-size: 14px;
  color: var(--text-muted);
  text-align: right;
}

.eins-row-chevron {
  font-size: 20px;
  color: var(--text-muted);
  margin-left: 4px;
}

.eins-row-btn {
  display: flex;
  align-items: center;
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  padding: 14px 18px;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  min-height: 54px;
  transition: background .12s;
}

.eins-row-btn:last-child { border-bottom: none; }
.eins-row-btn:hover { background: var(--primary-pale); }

.eins-row-btn .eins-row-label { pointer-events: none; color: var(--primary); }

.eins-row-btn.danger .eins-row-label { color: var(--danger); }

/* Hilfe & Info: Reiter Rundgang / Hilfe / Feedback (05.10.2026) — gleiche Klassen in der Worker-App */
.hilfe-reiter {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.hilfe-reiter-knopf {
  flex: 1;
  min-height: 38px;
  border: none;
  border-radius: 9px;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.hilfe-reiter-knopf.is-aktiv {
  background: var(--white);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.hilfe-tour-liste {
  margin: 0;
  padding: 14px 18px 14px 38px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}
.hilfe-fragen {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.hilfe-frage + .hilfe-frage { border-top: 1px solid var(--border); }
.hilfe-inhalt a.eins-row-btn { text-decoration: none; }
.hilfe-inhalt > .eins-hilfe-hero { margin-bottom: 24px; }
.hilfe-frage summary {
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.hilfe-frage summary::-webkit-details-marker { display: none; }
.hilfe-frage summary::after { content: '›'; color: var(--text-muted); transition: transform .15s; }
.hilfe-frage[open] summary::after { transform: rotate(90deg); }
.hilfe-frage p {
  margin: 0;
  padding: 0 16px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Feedback-Formular (js/feedback.js, gleiche Klassen in Admin und Worker) */
.fb {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fb-arten {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.fb-art {
  flex: 1;
  min-height: 40px;
  border: none;
  border-radius: 9px;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.fb-art.is-aktiv {
  background: var(--white);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.fb-sterne-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.fb-sterne-label { font-size: 13px; color: var(--text-muted); }
.fb-sterne { display: flex; gap: 2px; }
.fb-stern {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--border);
  cursor: pointer;
  transition: transform .12s;
}
.fb-stern.is-an { color: #f5b301; }
.fb-stern:active { transform: scale(.88); }
.fb-text {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}
.fb-text:focus { border-color: var(--primary); background: var(--white); }
.fb-bild-knopf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
}
.fb-bild-knopf:hover { border-color: var(--primary); color: var(--primary); }
.fb-vorschau { position: relative; display: inline-block; }
.fb-vorschau img {
  display: block;
  max-width: 160px;
  max-height: 120px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.fb-bild-weg {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--text);
  color: var(--white);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.fb-senden { width: 100%; }
.fb-meldung { font-size: 13px; color: var(--text-muted); min-height: 0; }
.fb-meldung:empty { display: none; }
.fb-meldung--fehler { color: var(--danger); }
.fb--danke { align-items: center; text-align: center; padding-top: 28px; padding-bottom: 28px; gap: 6px; }
.fb-danke-haken {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success, #16a34a);
  color: #fff;
  font-size: 26px;
  line-height: 48px;
  margin-bottom: 6px;
}
.fb-danke-titel { font-size: 18px; font-weight: 700; color: var(--text); }
.fb-danke-text { font-size: 14px; color: var(--text-muted); }
.fb-nochmal {
  margin-top: 10px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

/* Hilfe-Seite: Karten-Grid */
/* Hilfe-Seite: der Rundgang als breite Zeile ganz oben */
.eins-hilfe-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .12s;
}
.eins-hilfe-hero:hover { border-color: var(--primary); box-shadow: 0 3px 12px rgba(0,0,0,.07); }

.eins-hilfe-hero-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.eins-hilfe-hero-icon svg { width: 22px; height: 22px; stroke: currentColor; }

.eins-hilfe-hero-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eins-hilfe-hero-title { font-size: 15px; font-weight: 700; color: var(--text); }
.eins-hilfe-hero-desc  { font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.eins-hilfe-hero-go    { flex-shrink: 0; font-size: 22px; line-height: 1; color: var(--text-muted); }

/* Support: der Blickfang der Seite */
.eins-hilfe-section--kontakt {
  border: 1.5px solid var(--primary);
  box-shadow: 0 6px 22px rgba(53,80,111,.13);
}
.eins-hilfe-section--kontakt .eins-hilfe-section-header {
  background: var(--primary-pale);
  padding: 16px 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.eins-hilfe-section--kontakt .eins-hilfe-section-title { font-size: 16px; }

/* Hilfe-Seite: Sections mit Header */
.eins-hilfe-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}
.eins-hilfe-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 0;
}
.eins-hilfe-section-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.eins-hilfe-section-icon svg {
  width: 20px; height: 20px;
  stroke: #fff;
}
.eins-hilfe-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.eins-hilfe-section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Inline Formular innerhalb einer Gruppe */
.eins-inline-form {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.eins-inline-form .form-row { margin-bottom: 16px; }
.eins-inline-form .form-row:last-of-type { margin-bottom: 0; }

.eins-inline-form .form-row input,
.eins-inline-form .form-row select,
.eins-inline-form .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.eins-inline-form .form-row input:focus,
.eins-inline-form .form-row select:focus,
.eins-inline-form .form-row textarea:focus { border-color: var(--primary); background: var(--white); }

.eins-inline-form .form-row input[readonly] {
  background: var(--bg);
  color: var(--text-muted);
  cursor: not-allowed;
}

.eins-inline-form .form-row label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.eins-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.eins-msg {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

.eins-msg.success { background: #dcfce7; color: #166534; }
.eins-msg.error   { background: #fee2e2; color: #991b1b; }
.eins-msg.info    { background: var(--primary-pale); color: var(--primary); }

/* ── Toggle-Schalter (reines CSS) ─────────────────────────── */
.eins-toggle-wrap {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.eins-toggle-wrap input[type=checkbox] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.eins-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: background .2s;
}

.eins-toggle-wrap input:checked + .eins-toggle-track {
  background: var(--primary);
}

.eins-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s;
}

.eins-toggle-wrap input:checked + .eins-toggle-track::after {
  transform: translateX(20px);
}

/* ── Zahlen-Input mit Label ───────────────────────────────── */
.eins-number-row {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  min-height: 54px;
}

.eins-number-row:last-child { border-bottom: none; }

/* Schichtzeiten-Einstellungen */
.eins-shift-time-row {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  min-height: 54px;
}

.eins-shift-time-row:last-child { border-bottom: none; }

.eins-shift-time-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.eins-time-input {
  width: 100px;
  padding: 8px 10px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--primary);
  background: var(--primary-pale, #eef2f7);
  text-align: center;
  outline: none;
  transition: box-shadow .15s;
  -webkit-appearance: none;
}

.eins-time-input:focus { box-shadow: 0 0 0 2px rgba(53,80,111,.18); }

.eins-time-sep {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Erinnerungen */
.eins-reminder-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.eins-reminder-row:last-child { border-bottom: none; }
.eins-reminder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eins-reminder-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 10px;
}
.eins-reminder-config {
  display: flex;
  align-items: center;
  gap: 10px;
}
.eins-reminder-select {
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}
.eins-reminder-at {
  font-size: 14px;
  color: var(--text-muted);
}
.eins-reminder-time {
  width: 112px;   /* Platz für „15:00“ plus Uhr-Symbol (vorher 90px: „15:0“ abgeschnitten) */
  padding: 8px 8px 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  text-align: center;
}
.eins-reminder-number {
  width: 68px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  text-align: center;
}

.eins-number-label {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.eins-number-input {
  width: 76px;
  padding: 8px 10px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-align: center;
  outline: none;
  transition: box-shadow .15s;
  background: var(--primary-pale, #eef2f7);
  color: var(--primary);
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.eins-number-input:focus { box-shadow: 0 0 0 2px rgba(53,80,111,.18); }
/* Ruhezeit-Auswahl: Texte wie „11 Stunden“ brauchen mehr Platz als eine Zahl */
.eins-number-input.eins-ruhe-select { width: auto; min-width: 120px; max-width: 220px; flex-shrink: 0; text-overflow: ellipsis; }

/* ── Bereiche-Liste ───────────────────────────────────────── */
.eins-area-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.eins-area-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}

.eins-area-row:last-child { border-bottom: none; }

.eins-area-sort-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.eins-area-sort-btn {
  width: 22px;
  height: 18px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s, color .1s;
}

.eins-area-sort-btn:hover { background: var(--primary-pale); color: var(--primary); }
.eins-area-sort-btn:disabled { opacity: .3; cursor: default; }
.eins-area-sort-btn:disabled:hover { background: none; color: var(--text-muted); }

.eins-area-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  outline: none;
  background: transparent;
  cursor: text;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}

.eins-area-name:focus {
  border-color: var(--primary);
  background: var(--bg);
}

.eins-area-toggle {
  flex-shrink: 0;
}

.eins-area-del-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s, color .12s;
}

.eins-area-del-btn:hover { background: #fee2e2; color: var(--danger); }

.eins-area-add-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 18px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

.eins-area-add-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  background: var(--white);
  color: var(--text);
  transition: border-color .15s;
  font-family: inherit;
}

.eins-area-add-input:focus { border-color: var(--primary); background: var(--white); }

.eins-area-add-btn { padding: 10px 16px; font-size: 14px; flex-shrink: 0; }

/* ── Einladungslink-Box ───────────────────────────────────── */
.eins-invite-code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.eins-invite-code {
  flex: 1;
  font-size: 14px;
  font-family: monospace;
  color: var(--text);
  word-break: break-all;
  font-weight: 600;
}

/* ── Terminals (Stempeln im Betrieb) ───────────────────────── */
.eins-terminal-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.eins-terminal-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.eins-terminal-name.is-editierbar { cursor: text; }
.eins-terminal-name.is-editierbar:hover { color: var(--primary); }
.eins-terminal-name-input { max-width: 240px; padding: 6px 10px; }
.eins-terminal-status.is-online   { color: var(--success); font-weight: 600; }
.eins-terminal-status.is-gesperrt { color: var(--danger); font-weight: 600; }
.eins-terminal-status.is-wartet   { color: #b45309; font-weight: 600; }
.eins-terminal-offline { color: #b45309; font-weight: 600; }
html.dark .eins-terminal-offline { color: #fbbf24; }
.eins-toggle-wrap.is-gesperrt { opacity: .55; cursor: not-allowed; }
.eins-terminal-aktionen {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.eins-terminal-leer {
  color: var(--text-muted);
  font-size: 14px;
}
.eins-terminal-code-row {
  background: var(--bg);
}
.eins-terminal-code-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}
.eins-terminal-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--primary);
}
.eins-terminal-code-hint {
  font-size: 13px;
  color: var(--text-muted);
}
.eins-terminal-neu {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.eins-terminal-upgrade { margin-top: 10px; }
.eins-terminal-direkt { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border, rgba(127,127,127,.2)); }
.eins-terminal-direkt .eins-group-hint { margin-top: 8px; }

/* NFC-Chips je Terminal (eingerückt unter dem Terminal) */
.eins-chip-row,
.eins-chip-unter { padding-left: 74px; background: var(--bg); }
.eins-chip-row { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
.eins-chip-icon { width: 32px; height: 32px; border-radius: 10px; }
.eins-chip-icon svg { width: 16px; height: 16px; }
.eins-chip-name { font-size: 14px; }
.eins-chip-typ-text.is-einfach,
.eins-chip-warnung { color: #b45309; font-weight: 600; }
html.dark .eins-chip-typ-text.is-einfach,
html.dark .eins-chip-warnung { color: #fbbf24; }
.eins-chip-row.is-einfach { box-shadow: inset 3px 0 0 #b45309; }
html.dark .eins-chip-row.is-einfach { box-shadow: inset 3px 0 0 #fbbf24; }
.eins-chip-unter { min-height: 0; padding-top: 8px; padding-bottom: 8px; }
.eins-chip-add {
  background: none;
  border: none;
  padding: 4px 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}
.eins-chip-add:hover { text-decoration: underline; }
.eins-chip-form,
.eins-chip-neu {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}
.eins-chip-warnung { font-size: 13px; }
.eins-chip-typwahl { display: flex; flex-wrap: wrap; gap: 6px; }
.eins-chip-typ {
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.eins-chip-typ.is-aktiv { border-color: var(--primary); background: var(--primary-pale); color: var(--primary); }
.eins-chip-schluessel { display: flex; flex-wrap: wrap; gap: 8px; }
.eins-chip-hex { flex: 1 1 220px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.eins-chip-form-knoepfe { display: flex; gap: 8px; justify-content: flex-end; }
.eins-chip-wert { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eins-chip-wert-label { font-size: 12px; color: var(--text-muted); font-weight: 600; min-width: 84px; }
.eins-chip-wert-text {
  flex: 1 1 200px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--text);
}
.eins-chip-qr { align-self: flex-start; background: #fff; padding: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.eins-chip-qr:empty { display: none; }
.eins-chip-qr img, .eins-chip-qr canvas { display: block; }
.eins-chip-hinweis { font-size: 13px; color: var(--text-muted); }
.eins-chip-schritte { margin: 0; padding-left: 20px; font-size: 13px; color: var(--text); line-height: 1.6; }
.eins-chip-schritte code { font-size: 12px; word-break: break-all; }
.eins-chip-neu > .btn-sm { align-self: flex-end; }
@media (max-width: 600px) {
  .eins-terminal-row { flex-wrap: wrap; }
  .eins-terminal-aktionen { width: 100%; justify-content: flex-end; }
  .eins-chip-row { flex-wrap: wrap; }
  .eins-chip-row, .eins-chip-unter { padding-left: 18px; }
}

/* ── Admin-Zugänge ───────────────────────────────────────── */
.eins-admin-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eins-admin-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.eins-admin-remove:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, .1);
}

.eins-admin-add-form {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
}

.eins-admin-add-input {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--primary-pale, #eef2f7);
  outline: none;
  transition: box-shadow .15s;
}
.eins-admin-add-input:focus {
  box-shadow: 0 0 0 2px rgba(53,80,111,.18);
}
.eins-admin-add-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.eins-admin-add-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Admin hinzufügen Button ──────── */
.eins-admin-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  margin: 14px 0 0;
  border-radius: 12px;
  background: var(--primary-pale, #eef2f7);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.eins-admin-add-btn:hover {
  background: rgba(53,80,111,.15);
}

/* ── Admin-Berechtigungs-Modal ──────── */
.eins-perm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(20,20,30,.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.eins-perm-overlay.visible { opacity: 1; }
.eins-perm-overlay.visible .epm-modal {
  transform: scale(1);
  opacity: 1;
}

.epm-modal {
  background: var(--white);
  border-radius: 20px;
  width: 94%;
  max-width: 640px;
  max-height: calc(85vh / var(--ui-zoom));
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.05);
  transform: scale(.95);
  opacity: 0;
  transition: transform .25s cubic-bezier(.32,.72,0,1), opacity .2s;
}
.epm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.epm-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.epm-close {
  background: rgba(0,0,0,.06);
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.epm-close:hover { background: rgba(0,0,0,.1); }
.epm-save {
  background: var(--primary);
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 10px;
  transition: opacity .15s;
}
.epm-save:hover { opacity: .9; }
.epm-save:disabled { opacity: .4; cursor: default; }

.epm-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  flex: 1;
}

/* Profil-Header (Bearbeiten) */
.epm-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.epm-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.epm-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.epm-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Inputs (Hinzufügen) */
.epm-inputs {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.epm-input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.epm-input:focus { border-color: var(--primary); }

/* Section Label */
.epm-section-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
}

/* Perm Groups */
.epm-group {
  background: var(--bg, #f8f9fb);
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 12px;
}
.epm-group-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 12px 0 4px;
}

/* Perm Row */
.epm-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,.05);
}
.epm-perm-row:first-of-type { border-top: none; }
.epm-perm-label {
  font-size: 14px;
  color: var(--text);
}

/* Apple-style Toggle */
.epm-toggle {
  position: relative;
  display: inline-block;
  cursor: pointer;
  flex-shrink: 0;
}
.epm-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.epm-toggle-track {
  display: block;
  width: 46px;
  height: 28px;
  border-radius: 14px;
  background: #d1d5db;
  transition: background .25s;
  position: relative;
}
.epm-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.epm-toggle input:checked + .epm-toggle-track {
  background: #34c759;
}
.epm-toggle input:checked + .epm-toggle-track .epm-toggle-thumb {
  transform: translateX(18px);
}

/* Footer */
.epm-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Dark Mode */
html.dark .epm-modal { background: #1c1c1e; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
html.dark .epm-header { border-bottom-color: #333; }
html.dark .epm-close { background: rgba(255,255,255,.08); }
html.dark .epm-close:hover { background: rgba(255,255,255,.14); }
html.dark .epm-group { background: #262626; }
html.dark .epm-perm-row { border-top-color: rgba(255,255,255,.06); }
html.dark .epm-toggle-track { background: #3a3a3c; }
html.dark .epm-input { background: #2c2c2e; border-color: #3a3a3c; color: #fff; }
html.dark .epm-footer { border-top-color: #333; }
html.dark .epm-profile { border-bottom-color: #333; }
html.dark .epm-inputs { border-bottom-color: #333; }
html.dark .eins-admin-add-btn { background: #262626; color: #8ab4f8; }

/* ── Darstellung – Erscheinungsbild Auswahl ───────────────── */
.eins-appearance-group {
  display: flex;
  gap: 10px;
}

.eins-appearance-option {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  cursor: pointer;
  background: var(--white);
  text-align: center;
  transition: border-color .15s;
}

.eins-appearance-option.active {
  border-color: var(--primary);
  background: var(--primary-pale);
}

.eins-appearance-preview {
  width: 48px;
  height: 34px;
  border-radius: 8px;
  margin: 0 auto 8px;
  border: 1.5px solid var(--border);
}

.eins-appearance-preview.light { background: #f8fafc; }
.eins-appearance-preview.dark  { background: #1a1f2e; }
.eins-appearance-preview.auto  {
  background: linear-gradient(135deg, #f8fafc 50%, #1a1f2e 50%);
}

.eins-appearance-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ── Rollen-Karten ────────────────────────────────────────── */
.eins-role-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.eins-role-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.eins-role-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.eins-role-badge.admin  { background: #dbeafe; color: #1e40af; }
.eins-role-badge.worker { background: #dcfce7; color: #166534; }

.eins-role-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.eins-role-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.eins-role-card ul {
  margin: 10px 0 0 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 2;
}

/* ── Bestätigungs-Modal Body ──────────────────────────────── */
.eins-confirm-body {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.eins-confirm-body input,
.eins-confirm-body select {
  width: 100%;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
  background: var(--white);
  color: var(--text);
  font-family: inherit;
}

.eins-confirm-body input:focus { border-color: var(--danger); }

/* ═══════════════════════════════════════════════════════════
   NACHRICHTEN (WhatsApp-Style)
   ═══════════════════════════════════════════════════════════ */

/* Tab-Pane Override */
#tab-terminal.term-pane {
  padding: 20px 24px;
  max-width: none;
  display: flex;
  flex-direction: column;
  height: calc(calc(100dvh / var(--ui-zoom)) - var(--nav-h));
  overflow: hidden;
  background: linear-gradient(160deg, #eef3f7 0%, #dce5ed 100%);
}

body.tab-terminal-active .app-content {
}
body.tab-terminal-active {
  background: #dce5ed;
}

/* Weißes Panel */
.msg-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
}

/* Container: Split-Layout */
.msg-container {
  display: flex;
  height: 100%;
}

/* ── Konversationsliste (links) ──────────────────────────── */
.msg-list-panel {
  width: 360px;
  min-width: 360px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 24px 0 0 24px;
  overflow: hidden;
}

.msg-list-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Neue-Gruppe-Button */
.msg-new-group-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .12s;
}
.msg-new-group-btn:hover { opacity: .85; }

.msg-list-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  flex-shrink: 0;
}

/* Suchleiste */
.msg-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-pale);
  border-radius: 999px;
  padding: 3px 14px 3px 10px;
  height: 36px;
  transition: background .14s, box-shadow .14s;
  flex: 1;
}
.msg-search-wrap:focus-within {
  background: var(--white);
  box-shadow: 0 1px 6px rgba(53,80,111,.15);
}
.msg-search-icon {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.msg-search {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}
.msg-search::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}

/* Archiv-Header */
.msg-archive-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--primary-pale);
}
.msg-archive-back {
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}
.msg-archive-back:hover { background: var(--white); }

/* Archiv-Link */
.msg-archive-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: background .12s, color .12s;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.msg-archive-link:hover {
  background: var(--primary-pale);
  color: var(--primary);
}
.msg-archive-link svg {
  flex-shrink: 0;
}

.msg-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Konversations-Eintrag (Karten-Layout) */
.msg-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.msg-conv-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 16px;
  cursor: pointer;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
}
.msg-conv-item:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 10px rgba(53, 80, 111, .08);
}
.msg-conv-item--active {
  border-color: var(--primary);
  background: var(--primary-pale);
}
.msg-conv-item--unread {
  border-color: var(--primary-light);
}
.msg-conv-item--unread .msg-conv-name {
  font-weight: 700;
}
.msg-conv-item--unread .msg-conv-preview {
  color: var(--text);
  font-weight: 600;
}

/* Avatar */
.msg-conv-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: .3px;
}

/* Body: Name + Preview gestapelt */
.msg-conv-body {
  flex: 1;
  min-width: 0;
}
.msg-conv-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.msg-conv-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-conv-time {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 600;
}
.msg-conv-item--unread .msg-conv-time {
  color: var(--primary);
  font-weight: 700;
}
.msg-conv-row-bottom {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  min-width: 0;
}
.msg-conv-preview {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.msg-conv-no-msg {
  font-style: italic;
  opacity: .5;
}
.msg-mute-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: .5;
}
.msg-conv-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex-shrink: 0;
}

/* Pin-Icon */
.msg-pin-icon {
  color: var(--text-muted);
  opacity: .5;
  flex-shrink: 0;
  margin-right: 2px;
}

/* Gruppen-Avatar */
.msg-conv-avatar--group {
  border-radius: 12px;
}

/* Kontextmenü auf Konversations-Items */
.msg-conv-menu-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .1s;
  flex-shrink: 0;
}
.msg-conv-menu-btn:hover { background: var(--primary-pale); color: var(--primary); }
.msg-conv-dropdown {
  position: absolute;
  top: 100%;
  right: 8px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 50;
  min-width: 170px;
  overflow: hidden;
}
.msg-conv-dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  width: 100%;
  text-align: left;
}
.msg-conv-dropdown-option:hover { background: var(--primary-pale); }
.msg-conv-dropdown-option--danger { color: var(--danger); }

/* Gruppen-Modal */
.msg-modal--group { max-width: 560px; width: calc(95vw / var(--ui-zoom)); }
.msg-modal--group .msg-modal-body { padding: 0; }

.msg-gm-name-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 24px 20px;
}
.msg-gm-group-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msg-gm-name-input {
  flex: 1;
  padding: 12px 0;
  border: none;
  border-bottom: 2px solid var(--border);
  font-size: 18px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  background: transparent;
  color: var(--text);
  transition: border-color .15s;
}
.msg-gm-name-input:focus { border-color: var(--primary); }
.msg-gm-name-input::placeholder { color: var(--text-muted); font-weight: 500; }

.msg-gm-selected {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 14px;
}
.msg-gm-selected--visible { display: flex; }
.msg-gm-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
}

.msg-gm-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 24px;
  padding: 10px 14px;
  background: var(--primary-pale);
  border-radius: 10px;
  color: var(--text-muted);
}
.msg-gm-search {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  color: var(--text);
}
.msg-gm-search::placeholder { color: var(--text-muted); }

.msg-gm-list {
  min-height: calc(40vh / var(--ui-zoom));
  max-height: calc(50vh / var(--ui-zoom));
  overflow-y: auto;
  margin-top: 10px;
}
.msg-gm-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background .1s;
}
.msg-gm-row:hover { background: var(--primary-pale); }
.msg-gm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.msg-gm-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.msg-gm-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s, border-color .12s;
}
.msg-gm-check input { display: none; }
.msg-gm-checkmark { display: none; }
.msg-gm-row--checked .msg-gm-check {
  background: var(--primary);
  border-color: var(--primary);
}
.msg-gm-row--checked .msg-gm-checkmark {
  display: block;
}

/* ── Chat-Panel (rechts) ─────────────────────────────────── */
.msg-chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;
  height: 100%;
  min-width: 0;
}
.msg-chat-panel--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg-chat-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.msg-chat-placeholder p {
  margin-top: 16px;
}
.msg-chat-error {
  padding: 40px;
  text-align: center;
  color: var(--danger);
}

/* Chat-Header */
.msg-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.msg-chat-back {
  display: none;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
}
.msg-chat-back:hover { background: var(--primary-pale); }
.msg-chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.msg-chat-header-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Drei-Punkte-Menü */
.msg-menu-wrap {
  margin-left: auto;
  position: relative;
}
.msg-menu-btn {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.msg-menu-btn:hover {
  background: var(--primary-pale);
  color: var(--text);
}
.msg-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  min-width: 170px;
  z-index: 100;
  overflow: hidden;
}
.msg-menu-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background .1s;
}
.msg-menu-option:hover {
  background: var(--primary-pale);
}
.msg-menu-option--danger {
  color: var(--danger);
}
.msg-menu-option--danger:hover {
  background: rgba(231, 76, 60, .08);
}

/* Melden/Blockieren Modal */
.msg-modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  overflow: hidden;
}
.msg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
}
.msg-modal-body {
  padding: 20px;
}
.msg-modal-text {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.msg-modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.msg-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 5px;
}
.msg-modal-select,
.msg-modal-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: var(--white);
  color: var(--text);
}
.msg-modal-select:focus,
.msg-modal-textarea:focus {
  border-color: var(--primary);
}
.msg-modal-textarea {
  resize: vertical;
}
.msg-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.msg-modal-danger-btn {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
}
.msg-modal-danger-btn:hover {
  opacity: .9;
}

/* Mute-Dauer-Optionen */
.msg-mute-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.msg-mute-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s, background .12s;
  text-align: left;
}
.msg-mute-option:hover {
  border-color: var(--primary);
  background: var(--primary-pale);
}
.msg-mute-option svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Toast */
/* Globaler App-Toast */
.app-toast {
  position: fixed;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  max-width: calc(90vw / var(--ui-zoom));
  text-align: center;
}
.app-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.app-toast--info { background: var(--text); color: var(--white); }
.app-toast--success { background: var(--primary); color: var(--white); }
.app-toast--error { background: #991b1b; color: var(--white); }

/* Globales Bestätigungs-Modal */
.app-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity .2s;
}
.app-confirm--visible { opacity: 1; }
.app-confirm-box {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 28px 20px;
  max-width: 380px;
  width: calc(90vw / var(--ui-zoom));
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.app-confirm-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 24px;
}
.app-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.app-confirm-cancel {
  height: 38px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.app-confirm-cancel:hover { background: var(--bg); }
.app-confirm-ok {
  height: 38px;
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.app-confirm-ok:hover { opacity: .9; }
.app-confirm-ok:disabled { opacity: .45; cursor: default; }
.app-confirm-ok--gefahr { background: var(--danger); }
.app-confirm-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.app-confirm-input {
  width: 100%;
  box-sizing: border-box;
  margin: -8px 0 20px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.app-confirm-input:focus { outline: none; border-color: var(--primary); }

/* ── Crop-Modal (Bildpositionierung) ─────────────────────── */
.crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
}
.crop-overlay--visible { opacity: 1; }
.crop-container {
  background: var(--white);
  border-radius: 18px;
  padding: 24px;
  width: 340px;
  max-width: calc(92vw / var(--ui-zoom));
  box-shadow: 0 12px 48px rgba(0,0,0,.3);
}
.crop-title {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text);
}
.crop-viewport {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  cursor: grab;
  background: #111;
  border-radius: 12px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.crop-viewport:active { cursor: grabbing; }
.crop-img {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}
.crop-mask {
  position: absolute;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
  border: 2px solid rgba(255,255,255,.5);
}
.crop-mask--circle { border-radius: 50%; }
.crop-mask--square { border-radius: 14px; }
.crop-zoom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 4px 20px;
}
.crop-zoom svg {
  flex-shrink: 0;
  opacity: .45;
}
.crop-zoom input[type=range] {
  flex: 1;
  height: 4px;
  accent-color: var(--primary);
}
.crop-actions {
  display: flex;
  gap: 10px;
}
.crop-actions button {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.crop-cancel-btn {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
}
.crop-cancel-btn:hover { background: var(--bg); }
.crop-confirm-btn {
  border: none;
  background: var(--primary);
  color: #fff;
}
.crop-confirm-btn:hover { opacity: .9; }

/* PDF-Vorschau-Modal */
.pdf-preview-box {
  background: var(--white);
  border-radius: 16px;
  width: calc(90vw / var(--ui-zoom));
  max-width: 900px;
  height: calc(85vh / var(--ui-zoom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.pdf-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.pdf-preview-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.pdf-preview-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdf-preview-close:hover { background: var(--bg); }
.pdf-preview-frame {
  flex: 1;
  border: none;
  background: var(--bg);
}
.pdf-preview-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.pdf-preview-download {
  height: 38px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* Upload-Fortschritt */
.msg-upload-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary-pale);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.msg-upload-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.msg-upload-info svg { color: var(--primary); flex-shrink: 0; }
.msg-upload-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.msg-upload-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  animation: msg-upload-anim 1.5s ease-in-out infinite;
  width: 40%;
}
@keyframes msg-upload-anim {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Aktive Mute-Option */
.msg-mute-option--active {
  background: var(--primary-pale);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.msg-toast {
  position: fixed;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--text);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 9999;
  pointer-events: none;
}
.msg-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Nachrichten-Bereich */
.msg-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-chat-empty {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}
.msg-chat-empty p:first-child {
  font-size: 15px;
  font-weight: 600;
}
.msg-chat-empty-sub {
  font-size: 13px;
  margin-top: 6px;
  opacity: .7;
}

/* Datumstrenner */
.msg-date-divider {
  text-align: center;
  padding: 12px 0 8px;
}
.msg-date-divider span {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* Sprechblasen */
.msg-bubble {
  max-width: 70%;
  padding: 8px 12px 6px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  position: relative;
}
.msg-bubble--mine {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}
.msg-bubble--theirs {
  align-self: flex-start;
  background: var(--white);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.msg-bubble-content {
  white-space: pre-wrap;
}
.msg-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
}
.msg-bubble-time {
  font-size: 10px;
  opacity: .65;
}
.msg-bubble-status {
  font-size: 10px;
  opacity: .65;
  letter-spacing: -2px;
}
.msg-bubble--mine .msg-bubble-status {
  color: rgba(255,255,255,.8);
}

/* Gelöschte Nachricht, Zitat, Menü — gleiche Klassen wie in der Worker-App (js/chat-gesten.js) */
.msg-bubble--deleted { opacity: .65; }
.chat-geloescht {
  display: flex;
  align-items: center;
  gap: 6px;
  font-style: italic;
  font-size: 13px;
}
.msg-bubble--mine .chat-geloescht { color: rgba(255,255,255,.85); }
.chat-zitat {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: rgba(0,0,0,.06);
  border: none;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.3;
}
.msg-bubble--mine .chat-zitat { background: rgba(255,255,255,.15); border-left-color: rgba(255,255,255,.5); }
.chat-zitat-name { font-weight: 700; display: block; margin-bottom: 2px; }
.chat-zitat-name:empty { display: none; }
.chat-zitat-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .8;
}
.chat-menue {
  position: fixed;
  z-index: 10001;
  min-width: 160px;
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}
.chat-menue-knopf {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.chat-menue-knopf:hover, .chat-menue-knopf:focus-visible { background: var(--primary-pale); outline: none; }
.chat-menue-knopf--gefahr { color: var(--danger); }

/* Datei-Anhang in Blase */
.msg-file-attachment { margin-bottom: 4px; }
.msg-file-image {
  max-width: 100%;
  max-height: 280px;
  border-radius: 10px;
  display: block;
  cursor: pointer;
}
.msg-file-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,.06);
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
}
.msg-bubble--mine .msg-file-doc { background: rgba(255,255,255,.15); }
.msg-file-info { min-width: 0; }
.msg-file-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-file-size {
  display: block;
  font-size: 11px;
  opacity: .7;
  margin-top: 1px;
}

/* Nachrichten-Aktionen (Antworten / Löschen) */
.msg-bubble-actions {
  position: absolute;
  top: 4px;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity .15s;
}
.msg-bubble:hover .msg-bubble-actions { opacity: 1; }
.msg-bubble--mine .msg-bubble-actions { left: -56px; }
.msg-bubble--theirs .msg-bubble-actions { right: -56px; }
.msg-bubble-action {
  width: 26px;
  height: 26px;
  border: none;
  background: var(--white);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  transition: background .1s;
}
.msg-bubble-action:hover { background: var(--primary-pale); color: var(--primary); }
.msg-bubble-action--delete:hover { color: var(--danger); }

/* Aufleuchten beim Sprung zum Zitat; Zurückschnappen nach dem Wischen */
.msg-bubble.chat-blink {
  animation: chat-blink 1.2s ease;
}
@keyframes chat-blink {
  0%, 100% { box-shadow: none; }
  25%, 60% { box-shadow: 0 0 0 3px var(--primary-light); }
}
.msg-bubble { transition: transform .2s ease; }
.msg-bubble.chat-wischt { transition: none; }

/* Reply-Bar über Input */
.msg-reply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: var(--primary-pale);
  border-top: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  flex-shrink: 0;
}
.msg-reply-bar.hidden { display: none; }
.msg-reply-bar-content { flex: 1; min-width: 0; }
.msg-reply-bar-sender { font-size: 12px; font-weight: 700; color: var(--primary); display: block; }
.msg-reply-bar-text { font-size: 12px; color: var(--text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-reply-bar-close {
  width: 26px; height: 26px; border: none; background: transparent; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
}
.msg-reply-bar-close:hover { background: rgba(0,0,0,.06); }

/* Datei-Anhang Button */
.msg-attach-btn {
  width: 40px; height: 40px; border: none; background: transparent; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  flex-shrink: 0; transition: color .1s;
}
.msg-attach-btn:hover { color: var(--primary); }

/* Chat-Suchleiste */
.msg-chat-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.msg-chat-search-bar.hidden { display: none; }
.msg-chat-search-bar > svg { color: var(--text-muted); flex-shrink: 0; }
.msg-chat-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  color: var(--text);
}
.msg-chat-search-input::placeholder { color: var(--text-muted); }
.msg-chat-search-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.msg-chat-search-nav,
.msg-chat-search-close {
  width: 26px; height: 26px; border: none; background: transparent; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-muted);
}
.msg-chat-search-nav:hover,
.msg-chat-search-close:hover { background: var(--primary-pale); color: var(--primary); }
.msg-bubble--search-hit { box-shadow: 0 0 0 2px var(--primary); }

/* Such-Button im Header */
.msg-search-chat-btn {
  width: 32px; height: 32px; border: none; background: transparent; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  flex-shrink: 0;
}
.msg-search-chat-btn:hover { background: var(--primary-pale); color: var(--primary); }

/* Klickbarer Avatar/Name im Header */
.msg-chat-header-clickable { cursor: pointer; }
.msg-chat-header-clickable:hover { opacity: .7; }

/* Profil-Modal (read-only) */
.msg-modal--profile { max-width: 400px; width: calc(90vw / var(--ui-zoom)); }
.msg-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 24px 20px;
  position: relative;
}
.msg-profile-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-pale); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.msg-profile-name { font-size: 20px; font-weight: 700; color: var(--text); flex: 1; }
.msg-profile-header .msg-modal-close { position: absolute; top: 16px; right: 16px; }
.msg-profile-body { padding: 0 24px 24px; }
.msg-profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.msg-profile-field:last-child { border-bottom: none; }
.msg-profile-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.msg-profile-value { font-size: 14px; color: var(--text); font-weight: 600; text-align: right; }

/* Input-Leiste */
.msg-chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 20px;
  background: var(--white);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.msg-chat-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: none;
  max-height: 120px;
  line-height: 1.4;
  background: var(--white);
  color: var(--text);
}
.msg-chat-input:focus {
  border-color: var(--primary);
}
.msg-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .12s;
}
.msg-chat-send:hover { opacity: .85; }

/* Blockiert-Leiste */
.msg-chat-blocked-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(231, 76, 60, .06);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.msg-chat-blocked-bar svg {
  color: var(--danger);
  flex-shrink: 0;
}
.msg-unblock-btn {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  margin-left: 6px;
  transition: background .12s;
}
.msg-unblock-btn:hover {
  background: var(--primary-pale);
}

/* ── Responsive: Mobil ───────────────────────────────────── */
@media (max-width: 700px) {
  .msg-list-panel {
    width: 100%;
    min-width: 0;
    border-right: none;
  }
  .msg-chat-panel {
    display: none;
  }
  .msg-chat-panel--empty {
    display: none;
  }

  /* Wenn Chat offen: Liste verstecken, Chat zeigen */
  .msg-chat-open .msg-list-panel {
    display: none;
  }
  .msg-chat-open .msg-chat-panel {
    display: flex;
  }
  .msg-chat-open .msg-chat-back {
    display: block;
  }

  /* Zurück-Button auf Mobil immer zeigen */
  .msg-chat-back {
    display: block;
  }

  .msg-bubble {
    max-width: 85%;
  }
}

/* ── Dark Mode ────────────────────────────────────────────── */
html.dark {
  --bg:            #141414;
  --white:         #1e1e1e;
  --text:          #e4e4e4;
  --text-muted:    #9a9a9a;
  --border:        #2e2e2e;
  --primary:       #e4e4e4;
  --primary-light: #ffffff;
  --primary-pale:  rgba(255, 255, 255, .08);
  --danger:        #f87171;
  --success:       #34d399;
  --shadow:        0 2px 12px rgba(0,0,0,.3);
}

/* Inputs & Selects */
html.dark input,
html.dark select,
html.dark textarea {
  background: #262626;
  color: var(--text);
  border-color: var(--border);
}
html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #6a6a6a;
}
html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus {
  border-color: var(--primary);
}

/* Login / Verify / Reset-PW: immer helles Erscheinungsbild */
html.dark #screen-login,
html.dark #screen-verify,
html.dark #screen-reset-pw,
html.dark #screen-legal {
  --bg:            #f8fafc;
  --white:         #ffffff;
  --text:          #1a2a3a;
  --text-muted:    #6b7f95;
  --border:        #e2e8f0;
  --primary:       #35506f;
  --primary-light: #4a6d94;
  --primary-pale:  #eef2f7;
  --danger:        #e74c3c;
  --success:       #27ae60;
  --shadow:        0 2px 12px rgba(0,0,0,.07);
}
html.dark #screen-login input,
html.dark #screen-verify input,
html.dark #screen-reset-pw input,
html.dark #screen-legal input {
  background: #fff;
  color: #1a2a3a;
  border-color: #e2e8f0;
}
html.dark #screen-login input::placeholder,
html.dark #screen-verify input::placeholder,
html.dark #screen-reset-pw input::placeholder,
html.dark #screen-legal input::placeholder {
  color: #6b7f95;
}
html.dark #screen-login input:focus,
html.dark #screen-verify input:focus,
html.dark #screen-reset-pw input:focus,
html.dark #screen-legal input:focus {
  border-color: #35506f;
  box-shadow: 0 0 0 3px #eef2f7;
}

/* Planung Container */
html.dark #tab-planung.tab-pane      { background: linear-gradient(160deg, #141414 0%, #1a1a1a 100%); }
html.dark.tab-planung-active         { background: #141414; }

/* Modal overlays & drawers */
html.dark .modal-overlay     { background: rgba(0,0,0,.65); }
html.dark .plan-sidebar-overlay,
html.dark .kal-sidebar-overlay,
html.dark .team-overlay      { background: rgba(0,0,0,.5); }
html.dark .team-add-live     { background: #262626; border-color: var(--border); }
html.dark .team-add-card-icon,
html.dark .team-add-card-icon--requests { background: #fff; color: #1a1a1a; }
html.dark .team-add-card-icon svg { stroke: #1a1a1a; }
html.dark .team-card-avatar { background: #fff; color: #1a1a1a; }

/* Shadows on drawers */
html.dark .plan-sidebar,
html.dark .kal-sidebar,
html.dark .team-drawer       { box-shadow: -4px 0 24px rgba(0,0,0,.4); }

/* Planung Container + Grid */
html.dark .plan-container    { background: rgba(30, 30, 30, .92); border-color: #2e2e2e; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
html.dark .plan-day-headers  { background: var(--white); }

/* Verfügbarkeit in Sidebar (Worker-Card) */
html.dark .plan-avail-cell.avail-yes { background: #e4e4e4; color: #141414; }
html.dark .plan-avail-cell.avail-mix { background: #6a6a6a; color: #e4e4e4; }
html.dark .plan-avail-cell.avail-no  { background: #333333; color: #8a8a8a; }

/* Verfügbarkeit im Grid */
html.dark .plan-avail-block.avail-yes { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); }
html.dark .plan-avail-block.avail-no  { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .12); }
html.dark .plan-avail-block.avail-yes .plan-avail-block-label { color: #e4e4e4; }
html.dark .plan-avail-block.avail-no .plan-avail-block-label  { color: #6a6a6a; }

/* Verfügbarkeit in Day-Headers */
html.dark .plan-avail-box.avail-green { background: #e4e4e4; }
html.dark .plan-avail-box.avail-red   { background: #333333; }

/* Today-Spalten */
html.dark .plan-day-col.today,
html.dark .kal-day-col.today { background: #262626; }

/* Publish-Status Badges */
html.dark #plan-publish-btn.pub-draft     { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: none; }
html.dark #plan-publish-btn.pub-published { background: transparent; border-color: var(--primary); color: var(--primary); box-shadow: none; }
html.dark #plan-publish-btn.pub-changes   { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: none; }

/* Swap-Buttons */
html.dark .plan-swap-approve { background: rgba(52, 211, 153, .15); color: #34d399; }
html.dark .plan-swap-reject  { background: rgba(248, 113, 113, .15); color: #f87171; }

/* Leave-Bloecke in Planung */
html.dark .plan-leave-block--approved { background: rgba(245, 158, 11, .15); color: #fbbf24; border-left-color: #f59e0b; }
html.dark .plan-leave-block--pending  { background: rgba(156, 163, 175, .15); color: #9ca3af; border-left-color: #6b7280; }

/* Kalender-Ereignisse im Plan (Dark) */
html.dark .btn-icon-text.active { background: var(--primary); color: #141414; border-color: var(--primary); }
html.dark .btn-icon-text.active:hover { background: #cccccc; border-color: #cccccc; color: #141414; }
html.dark .plan-cal-badge { background: #e4e4e4; color: #141414; }
html.dark .plan-cal-event,
html.dark .plan-cal-event--allday { color: rgba(255,255,255,.7) !important; }

/* Kalender Leave-Chips */
html.dark .kal-leave-chip--urlaub    { background: rgba(245, 158, 11, .15); color: #fbbf24; }
html.dark .kal-leave-chip--krank     { background: rgba(248, 113, 113, .15); color: #f87171; }
html.dark .kal-leave-chip--sonstiges { background: rgba(156, 163, 175, .15); color: #9ca3af; }

/* Kalender Ereignis-Typ Farben */
html.dark .kal-detail-row { border-bottom-color: rgba(255,255,255,.08); color: #9a9a9a; }
html.dark .kal-detail-edit-btn { background: #1e1e1e; border-color: #2e2e2e; color: #9a9a9a; }
html.dark .kal-type-reservierung  { background: rgba(255, 255, 255, .08); color: #cccccc; border-color: rgba(255, 255, 255, .15); }
html.dark .kal-type-veranstaltung { background: rgba(52, 211, 153, .15); color: #34d399; border-color: rgba(52, 211, 153, .3); }
html.dark .kal-type-termin        { background: rgba(245, 158, 11, .15); color: #fbbf24; border-color: rgba(245, 158, 11, .3); }
html.dark .kal-type-intern        { background: rgba(139, 92, 246, .15); color: #a78bfa; border-color: rgba(139, 92, 246, .3); }
html.dark .kal-type-sonstiges     { background: rgba(148, 163, 184, .15); color: #94a3b8; border-color: rgba(148, 163, 184, .3); }

/* Kalender Container + Panel */
html.dark #tab-kalender.kal-pane     { background: linear-gradient(160deg, #141414 0%, #1a1a1a 100%); }
html.dark .kal-panel                 { background: rgba(30, 30, 30, .92); border-color: #2e2e2e; box-shadow: 0 8px 32px rgba(0,0,0,.3); }

/* Kalender Monatsansicht */
html.dark .kal-month-cell            { background: #1e1e1e; border-color: #2e2e2e; box-shadow: none; }
html.dark .kal-month-cell:hover      { box-shadow: 0 4px 16px rgba(0,0,0,.3); }
html.dark .kal-month-cell.other-month { background: #1a1a1a; opacity: .5; }
html.dark .kal-month-cell.today      { border-color: var(--primary); box-shadow: 0 4px 16px rgba(255,255,255,.1); }
html.dark .kal-month-cell.today .kal-cell-day-num   { background: #ffffff; color: #141414; }
html.dark .kal-month-cell.today .kal-cell-day-badge { background: #ffffff; color: #141414; }
html.dark .kal-view-btn.active       { background: #262626; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
html.dark .kal-nav-btn:hover         { background: #262626; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
html.dark .kal-search-wrap:focus-within { background: #262626; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
html.dark .kal-search-dropdown       { background: var(--white); border-color: var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
html.dark .kal-weekday-header        { color: #8a8a8a; }
html.dark .kal-add-btn               { background: #ffffff; color: #141414; box-shadow: 0 4px 12px rgba(0,0,0,.2); }

/* Team Badges */
html.dark .badge--warning { background: rgba(245, 158, 11, .15); color: #fbbf24; }
html.dark .badge--success { background: rgba(52, 211, 153, .15); color: #34d399; }
html.dark .badge--danger  { background: rgba(248, 113, 113, .15); color: #f87171; }

/* Team Leave-Status */
html.dark .team-leave-status--pending  { background: rgba(250, 204, 21, .15); color: #fbbf24; }
html.dark .team-leave-status--approved { background: rgba(52, 211, 153, .15); color: #34d399; }
html.dark .team-leave-status--rejected { background: rgba(248, 113, 113, .15); color: #f87171; }

/* Form Messages */
html.dark .team-form-msg.success,
html.dark .eins-msg.success { background: rgba(52, 211, 153, .15); color: #34d399; }
html.dark .team-form-msg.error,
html.dark .eins-msg.error   { background: rgba(248, 113, 113, .15); color: #f87171; }

/* Payout delete */
html.dark .team-payout-entry-delete:hover { background: rgba(248, 113, 113, .12); }

/* Rollen-Badges */
html.dark .eins-role-badge.admin  { background: rgba(255, 255, 255, .08); color: #cccccc; }
html.dark .eins-role-badge.worker { background: rgba(52, 211, 153, .15); color: #34d399; }

/* Einstellungen Toggle */
html.dark .eins-toggle-track { background: #4b5563; }
html.dark .eins-area-name    { color: var(--text); }
html.dark .eins-area-del-btn:hover { background: rgba(248, 113, 113, .12); }
html.dark .eins-logout-btn { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .25); }
html.dark .eins-logout-btn:hover { background: rgba(239, 68, 68, .18); border-color: rgba(239, 68, 68, .4); }

html.dark .app-content              { background: linear-gradient(160deg, #111111 0%, #191919 100%); }

/* Team Container */
html.dark #tab-team.team-pane       { background: linear-gradient(160deg, #141414 0%, #1a1a1a 100%); }
html.dark.tab-team-active           { background: #141414; }

/* Einstellungen Container */
html.dark #tab-einstellungen.eins-pane { background: linear-gradient(160deg, #141414 0%, #1a1a1a 100%); }
html.dark.tab-einstellungen-active     { background: #141414; }

/* Dashboard */
html.dark .dash-pane                { background: linear-gradient(160deg, #111111 0%, #191919 100%); }
html.dark .dash-greeting            { background: #ffffff; color: #141414; }
html.dark .dash-panel               { background: rgba(30, 30, 30, .92); box-shadow: 0 8px 32px rgba(0,0,0,.3); }
html.dark .dash-todo-check:hover    { background: rgba(52, 211, 153, .12); border-color: var(--primary); }
html.dark .dash-todo-badge--overdue { background: var(--primary-pale); color: var(--primary); border-color: var(--border); }
html.dark .dash-todo-badge--today   { background: transparent; color: var(--text-muted); border-color: var(--border); }
html.dark .dash-morgen-row--warn    { color: #fbbf24; }
html.dark .dash-heute-row--warn     { color: var(--primary); }

/* Nachrichten */
html.dark #tab-terminal.term-pane {
  background: linear-gradient(160deg, #141414 0%, #1a1a1a 100%);
}
html.dark.tab-terminal-active {
  background: #141414;
}
html.dark .msg-panel {
  background: rgba(30, 30, 30, .92);
  box-shadow: -4px 0 24px rgba(0,0,0,.4);
}
html.dark .msg-bubble--theirs {
  background: #262626;
  border-color: var(--border);
}
html.dark .msg-date-divider span {
  background: #262626;
  border-color: var(--border);
}
html.dark .msg-conv-item {
  background: #262626;
  border-color: var(--border);
}
html.dark .msg-conv-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
html.dark .msg-conv-item--active {
  background: rgba(255, 255, 255, .08);
  border-color: var(--primary);
}
html.dark .msg-menu-dropdown {
  background: #262626;
  border-color: var(--border);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
html.dark .msg-menu-option:hover {
  background: rgba(255, 255, 255, .08);
}
html.dark .msg-conv-dropdown {
  background: #262626;
  border-color: var(--border);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
html.dark .msg-conv-dropdown-option:hover {
  background: rgba(255, 255, 255, .08);
}
html.dark .msg-menu-option--danger:hover {
  background: rgba(248, 113, 113, .12);
}
html.dark .chat-zitat { background: rgba(255,255,255,.08); }
html.dark .msg-file-doc { background: rgba(255,255,255,.08); }
html.dark .msg-bubble-action { background: #262626; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
html.dark .msg-reply-bar { background: rgba(255, 255, 255, .06); }
html.dark .msg-reply-bar-close:hover { background: rgba(255,255,255,.08); }
html.dark .msg-modal {
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
html.dark .msg-archive-header {
  background: rgba(255, 255, 255, .06);
}
html.dark .msg-archive-back:hover {
  background: rgba(255, 255, 255, .08);
}
html.dark .msg-archive-link:hover {
  background: rgba(255, 255, 255, .06);
}
html.dark .msg-new-group-btn { background: #ffffff; color: #141414; }
html.dark .msg-conv-avatar,
html.dark .msg-chat-header-avatar,
html.dark .msg-gm-avatar,
html.dark .msg-profile-avatar { background: #fff; color: #1a1a1a; }
html.dark .msg-chat-send { background: #fff; color: #1a1a1a; }
html.dark .msg-chat-send svg { stroke: #1a1a1a; }
html.dark .msg-bubble--mine { background: #fff; color: #1a1a1a; }
html.dark .msg-bubble--mine .msg-bubble-status { color: rgba(0,0,0,.45); }
html.dark .msg-bubble--mine .chat-zitat { background: rgba(0,0,0,.06); border-left-color: rgba(0,0,0,.3); }
html.dark .msg-bubble--mine .msg-file-doc { background: rgba(0,0,0,.06); }
html.dark .msg-bubble--mine .chat-geloescht { color: rgba(0,0,0,.5); }
html.dark .chat-menue { box-shadow: 0 8px 24px rgba(0,0,0,.5); }

/* Toggles + Switches */
html.dark .toggle-slider::before { background: #e4e4e4; }
html.dark .apple-switch.active   { background: #e4e4e4; }
html.dark .apple-switch.active .apple-switch-knob { background: #141414; }

/* Löschen-Button */
html.dark .btn-danger { background: #e4e4e4; color: #141414; }
html.dark .btn-danger:hover { background: #cccccc; }

/* Scrollbars */
html.dark ::-webkit-scrollbar-track { background: var(--bg); }
html.dark ::-webkit-scrollbar-thumb { background: #374151; border-radius: 4px; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* Bottom Nav */
html.dark .app-nav {
  background: rgba(20, 20, 20, .88);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 -4px 32px rgba(0,0,0,.4);
}
html.dark .app-nav-btn       { color: #8a8a8a; }
html.dark .app-nav-btn:hover { color: #9a9a9a; background: rgba(255,255,255,.05); }
html.dark .app-nav-btn.active {
  background: var(--primary);
  color: #141414;
  box-shadow: 0 6px 18px rgba(255, 255, 255, .12);
}

/* Header */
html.dark .app-header {
  background: rgba(15, 25, 35, .92);
  border-bottom-color: var(--border);
}

/* Darstellung: Appearance-Karten */
html.dark .eins-appearance-option {
  background: #262626;
}
html.dark .eins-appearance-preview {
  border-color: #3a3a3a;
}
html.dark .eins-appearance-preview.light {
  background: #d1d5db;
}

/* Einstellungen: Panels */
html.dark .eins-overview     { background: rgba(30, 30, 30, .92); border-color: #2e2e2e; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
html.dark .eins-detail       { background: rgba(30, 30, 30, .92); border-color: #2e2e2e; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
html.dark .eins-detail-header { background: rgba(30, 30, 30, .92); border-bottom-color: #2e2e2e; }

/* Einstellungen: allgemein */
html.dark .eins-group       { border-color: var(--border); }
html.dark .eins-row          { border-bottom-color: rgba(255,255,255,.06); }
html.dark .eins-row-sublabel { color: #8a8a8a; }
html.dark .eins-cat-card     { background: #262626; border-color: var(--border); }
html.dark .eins-cat-card:hover { background: #2e2e2e; border-color: #404040; }
html.dark .eins-cat-icon     { background: #fff !important; }
html.dark .eins-cat-icon svg { stroke: #1a1a1a; }
html.dark .eins-hilfe-section-icon { background: #e4e4e4 !important; }
html.dark .eins-hilfe-section-icon svg { stroke: #141414; }
html.dark .eins-hilfe-hero   { background: #262626; border-color: var(--border); }
html.dark .eins-hilfe-hero:hover { border-color: #5b7fa8; box-shadow: 0 3px 12px rgba(0,0,0,.3); }
html.dark .eins-hilfe-hero-icon { background: rgba(255,255,255,.1); color: #cfe0f5; }
html.dark .eins-hilfe-section--kontakt { border-color: #5b7fa8; box-shadow: 0 6px 22px rgba(0,0,0,.35); }
html.dark .eins-hilfe-section--kontakt .eins-hilfe-section-header { background: #2f3a47; border-bottom-color: var(--border); }
html.dark .eins-hilfe-section { background: #262626; border-color: var(--border); }
html.dark .fb-arten { background: #1f1f1f; }
html.dark .hilfe-reiter { background: #1f1f1f; }
html.dark .hilfe-reiter-knopf.is-aktiv { background: #383838; color: #f5f5f5; }
html.dark .fb-art.is-aktiv { background: #383838; color: #f5f5f5; }
html.dark .fb-stern { color: #444; }
html.dark .fb-stern.is-an { color: #f5b301; }

/* Dashboard */
html.dark .dash-card {
  background: rgba(30, 30, 30, .85);
  border-color: var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
html.dark .dash-card-header  { border-bottom-color: rgba(255,255,255,.06); }
html.dark .dash-week {
  background: rgba(30, 30, 30, .85);
  border-color: var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
html.dark .dash-team-stat    { background: rgba(255, 255, 255, .06); }
html.dark .dash-week-day     { background: #262626; border: 1px solid #333333; }
html.dark .dash-week-day.today { background: #ffffff; color: #141414; box-shadow: 0 4px 14px rgba(255,255,255,.15); }
html.dark .dash-week-day.today .dash-week-name,
html.dark .dash-week-day.today .dash-week-num,
html.dark .dash-week-day.today .dash-week-tag,
html.dark .dash-week-day.today .dash-week-tag-more,
html.dark .dash-week-day.today .dash-week-shifts,
html.dark .dash-week-day.today .dash-week-open { color: #141414; }
html.dark .dash-week-day.today .dash-week-name { color: rgba(20, 20, 20, .6); }
html.dark .dash-week-day.today .dash-week-tag  { background: rgba(0, 0, 0, .12); }
html.dark .dash-week-day.today .dash-week-dot  { background: #141414; }
html.dark .dash-week-day.today .dash-week-dot--open { background: transparent; border-color: #141414; }
html.dark .dash-week-day:hover { box-shadow: 0 3px 10px rgba(0,0,0,.25); }
html.dark .dash-week-tag       { background: rgba(255, 255, 255, .12); color: #cccccc; }
html.dark .dash-heute-row    { border-bottom-color: rgba(255,255,255,.06); }
html.dark .dash-todo-check   { border-color: #3a3a3a; }
html.dark .dash-todo-row     { border-bottom-color: rgba(255,255,255,.06); }
html.dark .dash-todo-input   { color: var(--text); }
html.dark .dash-todo-input::placeholder { color: #8a8a8a; }
html.dark .dash-live-modal-overlay { background: rgba(0,0,0,.65); }
html.dark .dash-live-modal   { background: var(--white); border-color: var(--border); box-shadow: 0 16px 48px rgba(0,0,0,.5); }
html.dark .dash-live-stat    { background: rgba(255, 255, 255, .05); border-color: var(--border); }

/* Team Panel + Worker-Card */
html.dark .team-add-btn      { background: #ffffff; color: #141414; }
html.dark .team-panel        { background: rgba(30, 30, 30, .92); border-color: #2e2e2e; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
html.dark .team-worker-card  { background: #262626; border-color: var(--border); }
html.dark .team-worker-card:hover { background: #2e2e2e; }
html.dark .team-toolbar      { background: #1e1e1e; border-color: var(--border); }

/* Onboarding Tour */
html.dark .onb-tooltip       { background: var(--white); border-color: var(--border); box-shadow: 0 8px 32px rgba(0,0,0,.5); }

/* ── Compact Mode ─────────────────────────────────────────── */
html.compact {
  font-size: 13px;
}

html.compact .eins-row,
html.compact .eins-row-btn,
html.compact .eins-number-row,
html.compact .eins-shift-time-row { padding: 10px 14px; min-height: 44px; }

html.compact .eins-cat-card { padding: 10px 14px; }
html.compact .eins-cat-icon { width: 34px; height: 34px; border-radius: 10px; }
html.compact .eins-cat-icon svg { width: 16px; height: 16px; }
html.compact .eins-cat-title { font-size: 13px; }
html.compact .eins-cat-desc { font-size: 11px; }

html.compact .team-worker-card { padding: 8px 14px; }
/* plan-hour-row/label Hoehe wird jetzt dynamisch per --hour-h gesetzt */

/* ══════════════════════════════════════════════════════════
   Dashboard
   ══════════════════════════════════════════════════════════ */

/* Pane: Kalender-Style Gradient */
.dash-pane {
  background: linear-gradient(160deg, #eef3f7 0%, #dce5ed 100%);
  height: calc(calc(100dvh / var(--ui-zoom)) - var(--nav-h));
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  max-width: none;
  overflow: hidden;
}

body.tab-dashboard-active { background: #dce5ed; }
body.tab-dashboard-active .app-content { }

/* Panel: weisses Container-Panel */
.dash-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
  padding: 18px;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────── */
.dash-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.dash-greeting {
  display: inline-flex;
  align-items: center;
  height: 36px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.2px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 0 18px;
  border-radius: 999px;
  white-space: nowrap;
}

.dash-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ── Erste Schritte (nur beim ersten Start) ── */
.dash-first {
  margin-bottom: 14px;
  background: linear-gradient(135deg, #2c4460 0%, #35506f 55%, #24384f 100%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 16px 18px 14px;
  box-shadow: 0 6px 22px rgba(26,42,58,.18);
}

.dash-first-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dash-first-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.2px;
}

.dash-first-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,.66);
  line-height: 1.5;
  margin-top: 3px;
  max-width: 560px;
}

.dash-first-count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 5px 11px;
}

.dash-first-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.dash-first-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dash-first-item:hover {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.24);
}

.dash-first-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.35);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-first-check svg { width: 13px; height: 13px; }

.dash-first-item.is-done .dash-first-check {
  background: #fff;
  border-color: #fff;
  color: var(--primary);
}

.dash-first-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-first-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.dash-first-item.is-done .dash-first-label {
  color: rgba(255,255,255,.55);
  text-decoration: line-through;
}

.dash-first-hint {
  font-size: 11.5px;
  color: rgba(255,255,255,.55);
  line-height: 1.4;
}
.dash-first-item.is-done .dash-first-hint { color: rgba(255,255,255,.35); }

.dash-first-go {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  color: rgba(255,255,255,.4);
}

@media (max-width: 720px) {
  .dash-first-list { grid-template-columns: 1fr; }
}

/* ── Krank gemeldet (js/krank.js, 13.10.2026) ──────────── */
.dash-krank {
  margin-bottom: 14px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.5);
  border-left: 4px solid var(--primary);
  border-radius: 18px;
  padding: 14px 18px 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.dash-krank-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.dash-krank-sub { font-size: 12.5px; color: var(--text-muted); }
.dash-krank-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-top: 1px solid rgba(0,0,0,.06);
}
.dash-krank-row:first-child { border-top: 0; }
.dash-krank-info { min-width: 0; }
.dash-krank-name { font-size: 14px; font-weight: 700; color: var(--text); }
.dash-krank-zeit { font-size: 13px; color: var(--text-muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.dash-krank-aktion { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dash-krank-status { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.dash-krank-btn {
  border: 0; border-radius: 10px; padding: 8px 14px;
  background: var(--primary); color: var(--white);   /* wie .btn-primary: im Dunkelmodus dunkle Schrift auf Hellgrau */
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.dash-krank-btn:hover { background: var(--primary-light); }
.dash-krank-btn:disabled { opacity: .55; cursor: default; }
.dash-krank-btn--nochmal { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.dash-krank-btn--nochmal:hover { background: rgba(53,80,111,.08); }
html.dark .dash-krank { background: rgba(30, 30, 30, .85); border-color: var(--border); border-left-color: #4a6d94; }
html.dark .dash-krank-row { border-top-color: rgba(255,255,255,.08); }
html.dark .dash-krank-btn--nochmal { color: #c7d6e6; border-color: #4a6d94; }
@media (max-width: 720px) {
  .dash-krank-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ── Wochenuebersicht ──────────────────────────────────── */
.dash-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.dash-week-day {
  background: var(--primary-pale, #eef2f7);
  border-radius: 14px;
  padding: 10px 6px 8px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform .12s, box-shadow .12s;
  min-height: 68px;
}

.dash-week-day:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

.dash-week-day.today {
  background: var(--primary);
  box-shadow: 0 4px 14px rgba(53,80,111,.25);
}

.dash-week-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.dash-week-day.today .dash-week-name {
  color: rgba(255,255,255,.8);
}

.dash-week-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.dash-week-day.today .dash-week-num {
  color: #fff;
  font-size: 20px;
}
.dash-week-day.today .dash-week-tag {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.dash-week-day.today .dash-week-tag-more {
  color: rgba(255,255,255,.7);
}
.dash-week-day.today .dash-week-shifts {
  color: rgba(255,255,255,.75);
}
.dash-week-day.today .dash-week-dot {
  background: #fff;
}
.dash-week-day.today .dash-week-dot--open {
  background: transparent;
  border-color: #fff;
}
.dash-week-day.today .dash-week-open {
  color: #fff;
}

.dash-week-tags {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin-top: 2px;
}

.dash-week-tag {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.3;
  text-align: center;
  background: rgba(53, 80, 111, .12);
  color: var(--primary);
}
.dash-week-tag-more {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.dash-week-shifts {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: auto;
}

.dash-week-shifts-label { line-height: 1; }

.dash-week-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
/* Offene Schicht: leerer Ring statt Rot – gleiche Sprache wie „Fehlt noch“ im Terminal */
.dash-week-dot--open { background: transparent; border: 1.5px solid var(--primary); box-sizing: border-box; width: 6px; height: 6px; }

.dash-week-open {
  color: var(--primary);
  font-weight: 700;
}

.dash-divider {
  height: 0;
  margin: 0 0 16px;
}

/* ── Live Badge ────────────────────────────────────────── */
.dash-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.dash-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: dash-pulse 2s ease-in-out infinite;
}

@keyframes dash-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 35%, transparent); }
  50% { opacity: .7; box-shadow: 0 0 0 4px transparent; }
}

/* Wetter-Symbole auf dem Dashboard ohne Gelb und Hellblau: Sonne und Regen im Blau der App */
#dash-card-wetter svg [fill="#FBBF24"], #dash-card-wetter svg [fill="#60A5FA"] { fill: var(--primary-light); }
#dash-card-wetter svg [fill="#FDE68A"] { fill: color-mix(in srgb, var(--primary-light) 45%, transparent); }
#dash-card-wetter svg [stroke="#F59E0B"], #dash-card-wetter svg [stroke="#FBBF24"], #dash-card-wetter svg [stroke="#60A5FA"] { stroke: var(--primary-light); }

/* ── Content-Grid ──────────────────────────────────────── */
/* Vier gleich große Bereiche (2×2) füllen den Platz unter der Wochenleiste und stehen still;
   was nicht hineinpasst, scrollt nur innerhalb des jeweiligen Bereichs. */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  flex: 1 1 0;
  min-height: 400px;   /* nur auf sehr kleinen Fenstern scrollt das ganze Panel */
}
.dash-grid .dash-card-body { padding: 12px 18px 14px; }
/* Niedrige Fenster: Wochenleiste und Kacheln etwas knapper, damit alles ohne Scrollen passt */
@media (min-width: 721px) and (max-height: 900px) {
  .dash-panel { padding: 14px; }
  .dash-panel .dash-header { margin-bottom: 8px; }
  .dash-panel .dash-week { padding: 10px; margin-bottom: 10px; }
  .dash-panel .dash-week-day { padding: 7px 6px 6px; gap: 3px; }
  .dash-panel .dash-divider { margin-bottom: 10px; }
  .dash-panel .dash-grid { gap: 12px; }
  .dash-panel .dash-card-header { padding: 10px 18px; }
  .dash-panel .dash-team-stats { gap: 6px; }
  .dash-panel .dash-team-stat { padding: 6px; gap: 1px; }
  .dash-panel .dash-team-stat-sub + .dash-team-stat-sub { display: none; }
  .dash-panel .dash-wetter-hero { padding-bottom: 8px; margin-bottom: 8px; }
  .dash-panel .dash-wetter-fc { padding: 6px; gap: 3px; }
}
/* Sehr niedrige Fenster: Termin-Namen stehen schon in „Termine“, die Woche zeigt nur noch Tag und Schichten */
@media (min-width: 721px) and (max-height: 760px) {
  .dash-panel .dash-week-tags { display: none; }
  .dash-panel .dash-week-day { min-height: 0; }
  .dash-panel .dash-grid .dash-card-body { padding: 10px 18px; }
}

.dash-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.dash-card .dash-card-body {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.18) transparent;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Wetter im Dashboard */

/* Hero-Zeile: Icon + Temp + Info */
.dash-wetter-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  margin-bottom: 12px;
}
.dash-wetter-hero-icon {
  line-height: 1;
  flex-shrink: 0;
}
.dash-wetter-hero-icon svg { display: block; }
.dash-wetter-hero-temp {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  flex-shrink: 0;
}
.dash-wetter-hero-info {
  min-width: 0;
}
.dash-wetter-hero-desc {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.dash-wetter-hero-range {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Stündliche Vorhersage */
.dash-wetter-forecast {
  display: flex;
  gap: 0;
}
.dash-wetter-fc {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 12px;
  transition: background .15s;
}
.dash-wetter-fc--now {
  background: var(--primary-pale, #eef2f7);
}
.dash-wetter-fc--now .dash-wetter-fc-temp {
  color: var(--primary);
  font-weight: 800;
}
.dash-wetter-fc-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.dash-wetter-fc--now .dash-wetter-fc-time {
  color: var(--primary);
  font-weight: 700;
}
.dash-wetter-fc-icon {
  line-height: 1;
}
.dash-wetter-fc-icon svg { display: block; }
.dash-wetter-fc-temp {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.dash-wetter-fc-rain {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: center;
}


/* Termin-Sektionen */
.dash-termine-section {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 8px 0 4px;
}
.dash-termine-section:first-child {
  padding-top: 0;
}

/* ── Karten ─────────────────────────────────────────────── */
/* ── Karten-Header ──────────────────────────────────────── */
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.dash-card-body {
  padding: 16px 20px 20px;
}

.dash-card-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--primary);
}

/* ── Leere Zustaende ─────────────────────────────────────── */
.dash-empty-note {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0 6px;
}

/* ── Team Stats ─────────────────────────────────────────── */
.dash-team-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;   /* Reihen so hoch wie ihr Inhalt, freier Platz wird gleich verteilt */
  gap: 8px;
  flex: 1;
}

/* Mitarbeiter-Karte: Kacheln fuellen die Karte, Aktionszeilen nehmen nur ihren Platz */
#dash-card-team .dash-card-body { overflow-y: auto; }
#dash-card-team .dash-heute-list {
  flex: 0 0 auto;
  margin-top: 10px;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}
#dash-card-team .dash-heute-row { padding: 7px 0; font-size: 12px; }

/* Schlanke Scrollbars fuer die Dashboard-Scrollbereiche (Windows zeigt sonst breite Systemleisten) */
.dash-grid,
#dash-card-team .dash-card-body { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.18) transparent; }
.dash-grid::-webkit-scrollbar,
#dash-card-team .dash-card-body::-webkit-scrollbar { width: 6px; }
.dash-grid::-webkit-scrollbar-track,
#dash-card-team .dash-card-body::-webkit-scrollbar-track { background: transparent; }
.dash-grid::-webkit-scrollbar-thumb,
#dash-card-team .dash-card-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 3px; }

.dash-team-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
  background: var(--primary-pale, #eef2f7);
  border-radius: 14px;
  overflow: hidden;
}

.dash-team-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.dash-team-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-team-stat-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Live-Kachel: Stand der Checklisten von heute */
.dash-team-stat-cl {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 1px;
}

.dash-team-stat--clickable {
  cursor: pointer;
  transition: box-shadow .14s, transform .14s;
}
.dash-team-stat--clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,0,0,.1);
}

/* ── Live Detail Modal ─────────────────────────────────── */
.dash-live-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
}
.dash-live-modal-overlay.visible { opacity: 1; }

.dash-live-modal {
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  width: 720px;
  max-width: calc(94vw / var(--ui-zoom));
  max-height: calc(85vh / var(--ui-zoom));
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(.97);
  transition: transform .25s ease;
}
.dash-live-modal-overlay.visible .dash-live-modal { transform: translateY(0) scale(1); }

.dlm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border);
}

.dlm-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.dlm-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.dash-live-modal-close {
  background: var(--primary-pale);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.dash-live-modal-close:hover { background: var(--border); }

.dlm-body {
  padding: 22px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Stats-Leiste */
.dlm-stats {
  display: flex;
  gap: 8px;
}

.dlm-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  background: var(--primary-pale, #eef2f7);
  border-radius: 12px;
}

.dlm-stat-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.dlm-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* Sektionen */
.dlm-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 10px;
}
.dlm-section-label svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dlm-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 0;
}

/* Kalendereinträge im Modal */
.dlm-cal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dlm-cal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--primary-pale, #eef2f7);
  border-radius: 10px;
}
.dlm-cal-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}
.dlm-cal-tag--reservierung {
  background: rgba(53, 80, 111, .12);
  color: var(--primary);
}
.dlm-cal-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dlm-cal-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Anträge-Liste im Modal */
.dlm-req-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dlm-req-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--primary-pale, #eef2f7);
  border-radius: 12px;
  transition: background .12s;
}
.dlm-req-row:hover {
  background: var(--border);
}
.dlm-req-info {
  flex: 1;
  min-width: 0;
}
.dlm-req-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.dlm-req-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
}
.dlm-req-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}
.dlm-req-tag--leave {
  background: var(--primary-pale);
  color: var(--primary);
}
.dlm-req-tag--swap {
  background: rgba(53, 80, 111, .1);
  color: var(--primary);
}
.dlm-req-tag--join {
  background: var(--primary-pale);
  color: var(--primary);
}
.dlm-req-tag--avail-done {
  background: var(--primary-pale);
  color: var(--primary);
}
.dlm-req-tag--avail-missing {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-muted);
}

/* Eröffnung */
.dlm-opening {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--primary-pale, #eef2f7);
  border-radius: 14px;
}

.dlm-opening-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dlm-opening-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.dlm-opening-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Nachricht-Button */
.dlm-msg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s, transform .12s;
  flex-shrink: 0;
}
.dlm-msg-btn:hover { background: var(--primary-dark); transform: scale(1.03); }
.dlm-msg-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dlm-msg-btn--sm {
  padding: 5px 8px;
  background: transparent;
  color: var(--text-muted);
}
.dlm-msg-btn--sm:hover { background: var(--primary-pale); color: var(--primary); transform: none; }

/* Live-Liste */
.dlm-live-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dlm-live-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--primary-pale);
  border-radius: 12px;
}

.dlm-live-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.dlm-live-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
}

.dlm-live-info { flex: 1; min-width: 0; }

.dlm-live-pulse {
  display: flex;
  align-items: center;
}

/* Tages-Timeline */
.dlm-timeline {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.dlm-tl-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--primary-pale, #eef2f7);
}

.dlm-tl-label-spacer {
  width: 70px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}

.dlm-tl-hours {
  flex: 1;
  position: relative;
  height: 28px;
  min-width: 0;
}

.dlm-tl-hour {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  border-left: 1px solid rgba(0,0,0,.08);
}
.dlm-tl-hour span {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  padding-left: 4px;
  white-space: nowrap;
}

/* Now-Marker */
.dlm-tl-now {
  position: absolute;
  top: 0;
  bottom: -200px;
  z-index: 5;
  pointer-events: none;
}
.dlm-tl-now-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  top: -1px;
  left: -4px;
}
.dlm-tl-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--primary);
}

/* Zeilen */
.dlm-tl-body {
  display: flex;
  flex-direction: column;
}

.dlm-tl-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 40px;
}
.dlm-tl-row:last-child { border-bottom: none; }

.dlm-tl-label {
  width: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,.5);
}

.dlm-tl-track {
  flex: 1;
  position: relative;
  min-height: 40px;
}

/* Schicht-Block */
.dlm-tl-block {
  position: absolute;
  top: 5px;
  bottom: 5px;
  border-radius: 6px;
  background: rgba(53, 80, 111, .2);
  border: 1px solid rgba(53, 80, 111, .3);
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  min-width: 2px;
}

.dlm-tl-block-text {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dlm-tl-block--live {
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
}
.dlm-tl-block--live .dlm-tl-block-text { color: var(--primary); }

.dlm-tl-block--open {
  background: transparent;
  border: 1px dashed color-mix(in srgb, var(--primary) 45%, transparent);
}
.dlm-tl-block--open .dlm-tl-block-text { color: var(--primary); }

.dlm-tl-block--past {
  background: rgba(53, 80, 111, .08);
  border-color: rgba(53, 80, 111, .12);
}
.dlm-tl-block--past .dlm-tl-block-text { color: var(--text-muted); }

/* ── Wer arbeitet gerade ───────────────────────────────── */
.dash-worker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.dash-worker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-worker-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -.5px;
}

.dash-worker-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-worker-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.dash-worker-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.dash-next-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-next-hint svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.dash-next-hint--warn {
  color: var(--primary);
  font-weight: 700;
}

/* ── Heute-Karte ───────────────────────────────────────── */
.dash-heute-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 16px), transparent);
  mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 16px), transparent);
}

.dash-heute-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.dash-heute-row:last-child {
  border-bottom: none;
}

.dash-heute-row[data-tab] {
  cursor: pointer;
  transition: color .12s;
}

.dash-heute-row[data-tab]:hover {
  color: var(--primary);
}

.dash-heute-row--warn {
  color: var(--primary);
  font-weight: 700;
}

.dash-heute-row--ok {
  color: var(--text-muted);
}

.dash-heute-ok-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.dash-heute-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  min-width: 38px;
}

.dash-heute-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.dash-heute-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-heute-type {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.dash-heute-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
}

/* ── Morgen ─────────────────────────────────────────────── */
.dash-morgen-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-morgen-row {
  font-size: 13px;
  color: var(--text);
  padding: 2px 0;
}

.dash-morgen-row--warn {
  color: #b45309;
  font-weight: 600;
}

/* ── Todos (Apple Reminders Style) ──────────────────────── */
.dash-todo-count {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.dash-todo-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 16px), transparent);
  mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 16px), transparent);
}

.dash-todo-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
}

.dash-todo-row--done {
  opacity: 0;
  transform: scale(.96);
}

.dash-todo-row--high .dash-todo-check {
  border-color: var(--primary);
}

.dash-todo-check {
  width: 22px;
  height: 22px;
  border: 2px solid #c7ced6;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .15s, background .15s;
  margin-top: 1px;
}

.dash-todo-check--high {
  border-color: var(--primary);
}

.dash-todo-check:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.dash-todo-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dash-todo-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.dash-todo-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.dash-todo-meta--overdue {
  color: var(--primary);
  font-weight: 700;
}

.dash-todo-meta--today {
  color: var(--text-secondary);
}

/* Todo Items */
.dash-todo-item { border-bottom: 1px solid var(--border); }
.dash-todo-item:last-child { border-bottom: none; }

/* ── Todo Detail Modal ─────────────────────────────────── */
.dash-todo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(4px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.dash-todo-modal-overlay.visible { opacity: 1; }

.dash-todo-modal {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: scale(.95);
  transition: transform .2s;
}
.dash-todo-modal-overlay.visible .dash-todo-modal { transform: scale(1); }

.dash-todo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
}

.dash-todo-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.dash-todo-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-todo-modal-close:hover { background: var(--border); }

.dash-todo-modal-body {
  padding: 0 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-todo-modal-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.dash-todo-modal-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  background: var(--white);
  outline: none;
  transition: border-color .15s;
}
.dash-todo-modal-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.dash-todo-modal-prio {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.dtm-prio {
  flex: 1;
  border: none;
  background: var(--white);
  padding: 9px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .12s, color .12s;
  text-align: center;
}

.dtm-prio + .dtm-prio { border-left: 1.5px solid var(--border); }

.dtm-prio.active {
  background: var(--primary);
  color: #fff;
}

.dtm-prio[data-val="high"].active {
  background: var(--danger);
}

.dash-todo-modal-footer {
  display: flex;
  align-items: center;
  padding: 0 22px 18px;
}

.dtm-delete {
  border: none;
  background: none;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.dtm-delete:hover { opacity: .7; }

.dtm-save {
  margin-left: auto;
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 9px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.dtm-save:hover { opacity: .9; }

.dash-todo-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-todo-add-inline {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .12s;
}
.dash-todo-add-inline:hover { opacity: .8; }

.dash-todo-input--hidden {
  display: none !important;
}

.dash-todo-add-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 0;
  flex-shrink: 0;
  padding-bottom: 1px;
}

.dash-todo-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--primary-pale, #eef2f7);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(53,80,111,.08);
  transition: box-shadow .15s;
}
.dash-todo-input:focus {
  box-shadow: 0 0 0 2px rgba(53,80,111,.18);
}

.dash-todo-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 720px) {
  .dash-pane {
    padding: 12px;
  }

  .dash-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .dash-header {
    padding: 18px 20px;
  }

  .dash-greeting {
    font-size: 18px;
  }

  .dash-week {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }

  .dash-week-day {
    padding: 6px 4px;
    border-radius: 12px;
    min-height: 64px;
  }

  .dash-week-num {
    font-size: 15px;
  }

  .dash-week-shifts {
    font-size: 9px;
  }

  .dash-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: minmax(220px, auto);
    flex: 0 0 auto;
    min-height: 0;
  }
}

/* ═══════════════════════════════════════════════════════════
   ONBOARDING
   ═══════════════════════════════════════════════════════════ */

#screen-onboarding {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--white);
}

.ob-page {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

/* ── Welcome ── */
/* Dunkler Marken-Hero, damit die Begrüßung optisch am Login anschliesst.
   Der Setup-Assistent danach ist wieder hell. */
#ob-welcome {
  align-items: flex-start;
  background: linear-gradient(135deg, #1a2a3a 0%, #2c4460 25%, #35506f 50%, #2a3f57 75%, #1e3048 100%);
}

.ob-hero-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ob-hero-shape {
  position: absolute;
  border-radius: 50%;
  animation: ob-hero-float 24s ease-in-out infinite;
}
.ob-hero-shape--1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(96,165,250,.10) 0%, transparent 70%);
  top: -140px; left: -120px;
}
.ob-hero-shape--2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 70%);
  top: 20%; right: -110px;
  animation-delay: -6s;
}
.ob-hero-shape--3 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(53,80,111,.35) 0%, transparent 70%);
  bottom: -160px; left: 25%;
  animation-delay: -12s;
}
.ob-hero-shape--4 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(96,165,250,.07) 0%, transparent 70%);
  top: 55%; left: 8%;
  animation-delay: -18s;
}

@keyframes ob-hero-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(26px, -22px) scale(1.08); }
}

.ob-welcome-inner {
  position: relative;
  max-width: 860px;
  width: 100%;
  margin: auto;            /* zentriert, klappt bei zu wenig Höhe nach oben */
  padding: 48px 28px 56px;
  text-align: center;
  animation: ob-welcome-in .5s ease both;
}

@keyframes ob-welcome-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.ob-welcome-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.ob-welcome-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-welcome-brand-text {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.ob-welcome-brand-text i {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.ob-welcome-title {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -.8px;
}

.ob-welcome-sub {
  font-size: 16px;
  color: rgba(255,255,255,.72);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 38px;
}

.ob-welcome-visual { margin-bottom: 38px; }

.ob-welcome-btn {
  width: 100%;
  max-width: 280px;
  padding: 16px;
  font-size: 16px;
}

.ob-welcome-hint {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin-top: 14px;
}

/* ── Die drei Rollen (Willkommen + Intro-Karte der Tour) ── */
.ob-roles-title,
.ob-cycle-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.ob-roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.ob-role {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px 16px;
  background: var(--white);
  text-align: center;
}
.ob-role--you {
  border-color: var(--primary);
  background: var(--primary-pale);
}

.ob-role-fig {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(26,42,58,.16);
}
.ob-role-fig svg { display: block; width: 100%; height: 100%; }

.ob-role-who {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--primary);
}

.ob-role-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin: 4px 0 6px;
}

.ob-role-what {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Wochenablauf ── */
.ob-cycle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.ob-cycle-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px 7px 7px;
}

.ob-cycle-num {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ob-cycle-arrow {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
}

/* In der Tour nur Figur + Name: die Beschreibungen standen schon auf der Begrüßung */
.ob-tour-card .ob-role-what { display: none; }

/* Dieselben Bausteine auf dem dunklen Hero */
#ob-welcome .ob-roles-title,
#ob-welcome .ob-cycle-title { color: rgba(255,255,255,.45); }

#ob-welcome .ob-role {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}
#ob-welcome .ob-role--you {
  background: rgba(96,165,250,.14);
  border-color: rgba(122,178,255,.45);
}
#ob-welcome .ob-role-who   { color: #9dc2f0; }
#ob-welcome .ob-role-name  { color: #fff; }
#ob-welcome .ob-role-what  { color: rgba(255,255,255,.62); }

#ob-welcome .ob-cycle-step {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.88);
}
#ob-welcome .ob-cycle-num  { background: #5b8cc4; }
#ob-welcome .ob-cycle-arrow { color: rgba(255,255,255,.35); }

@media (max-width: 720px) {
  .ob-welcome-title { font-size: 30px; }
  .ob-roles { grid-template-columns: 1fr; gap: 10px; }
  .ob-role {
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-areas: 'fig who' 'fig name' 'fig what';
    column-gap: 14px;
    text-align: left;
    align-items: center;
  }
  .ob-role-fig  { grid-area: fig; width: 56px; height: 56px; margin: 0; }
  .ob-role-who  { grid-area: who; }
  .ob-role-name { grid-area: name; margin: 2px 0 4px; }
  .ob-role-what { grid-area: what; }
}

/* ── Setup Wizard ── */
.ob-brand-sm {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.4px;
}

.ob-setup-inner {
  max-width: 520px;
  width: 100%;
  padding: 32px 32px 24px;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh / var(--ui-zoom));
}

.ob-setup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.ob-progress-wrap {
  flex: 1;
}

.ob-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.ob-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width .35s ease;
}

.ob-progress-label {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

/* ── Step ── */
.ob-step {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ob-step-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--primary-pale);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.ob-step-icon svg { width: 24px; height: 24px; }

.ob-step-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -.4px;
}

.ob-step-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.ob-step-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

.ob-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Logo Upload im Onboarding */
.ob-logo-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ob-logo-upload:hover {
  border-color: var(--primary);
  background: var(--primary-pale, #eef2f7);
}
.ob-logo-preview {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--primary-pale, #eef2f7);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.ob-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ob-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ob-logo-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.ob-logo-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Toggles ── */
.ob-toggles {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 16px;
}

.ob-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  transition: background .15s;
}
.ob-toggle-row:last-child { border-bottom: none; }
.ob-toggle-row:hover { background: var(--bg); }

.ob-toggle-primary {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ob-toggle-info { flex: 1; }
.ob-toggle-label { font-size: 14px; font-weight: 600; color: var(--text); }
.ob-toggle-desc  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Bereiche Step ── */
.ob-areas-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ob-area-chip {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.ob-area-chip:hover { border-color: var(--primary); color: var(--primary); }
.ob-area-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.ob-areas-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.ob-area-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.ob-area-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.ob-area-remove:hover { color: var(--danger); }

.ob-area-add-row {
  display: flex;
  gap: 8px;
}

.ob-area-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--white);
}
.ob-area-input:focus { outline: none; border-color: var(--primary); }

/* ── Einladen Step ── */
.ob-invite-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
}

.ob-invite-tab {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.ob-invite-tab.active {
  background: var(--white);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.ob-invite-panel { display: flex; flex-direction: column; gap: 0; }

.ob-inv-msg {
  font-size: 12px;
  padding: 8px 0;
}
.ob-inv-msg.success { color: var(--success); }
.ob-inv-msg.error   { color: var(--danger);  }

.ob-inv-list { margin-top: 12px; }
.ob-inv-list-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.ob-inv-list-item  { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.ob-inv-list-item span { color: var(--text-muted); }

.ob-link-box {
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: monospace;
  word-break: break-all;
  margin-bottom: 10px;
}

.ob-link-copied { font-size: 12px; color: var(--success); margin-top: 6px; }

/* ── Setup Footer ── */
/* Wo das Team die App bekommt (Einrichtung, Schritt 5) */
.ob-app-box {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--primary-pale);
  padding: 14px 16px;
}

.ob-app-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.ob-app-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.ob-app-text strong { color: var(--text); }

.ob-app-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}

.ob-app-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ob-app-copied {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}
.ob-app-copied.hidden { display: none; }

.ob-setup-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

/* ── Summary ── */
.ob-summary-inner {
  max-width: 480px;
  width: 100%;
  padding: 48px 32px;
  text-align: center;
}

.ob-check-icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  box-shadow: 0 6px 20px rgba(39,174,96,.28);
}
.ob-check-icon svg { width: 30px; height: 30px; }

.ob-summary-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -.4px;
}

.ob-summary-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 26px;
}

.ob-summary-next {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--primary-pale);
  padding: 14px 16px;
  text-align: left;
  margin-bottom: 22px;
}
.ob-summary-next-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}
.ob-summary-next-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.ob-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-align: left;
  margin-bottom: 28px;
}

.ob-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.ob-summary-item:last-child { border-bottom: none; }

.ob-summary-item-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 100px;
}

.ob-summary-item-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.ob-summary-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-bottom: 10px;
}

.ob-skip-tour-btn {
  width: 100%;
  padding: 11px;
}

/* ── Tour ── */
body.ob-tour-active .tab-pane { overflow: hidden; }

.ob-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10003;
  pointer-events: none;
}

.ob-tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: auto;
}
.ob-tour-backdrop.visible { opacity: 1; }

/* ── Übersichts-Karte (zentriert) ── */
.ob-tour-card {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: calc(calc(100vw / var(--ui-zoom)) - 32px);
  max-height: calc(calc(100dvh / var(--ui-zoom)) - 32px);
  overflow-y: auto;
  background: var(--white);
  border-radius: 20px;
  padding: 36px 32px 28px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  pointer-events: auto;
  z-index: 10002;
  animation: ob-card-in .3s ease;
}
@keyframes ob-card-in {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.ob-tour-card.hidden { display: none; }
.ob-tour-card-badge {
  font-size: 12px; font-weight: 700; color: var(--primary);
  background: var(--primary-pale); display: inline-block;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 20px;
}
.ob-tour-card-icon { font-size: 48px; margin-bottom: 16px; }
.ob-tour-card-title {
  font-size: 24px; font-weight: 800; color: var(--text);
  margin-bottom: 12px; letter-spacing: -.3px;
}
.ob-tour-card-text {
  font-size: 15px; color: var(--text-muted); line-height: 1.65; margin-bottom: 28px;
}
/* Knopf-Reihenfolge: "Genauer ansehen" auf eigener Zeile, darunter Zurueck
   still links und "Weiter" fest unten rechts — dort steht es auf jeder Karte,
   egal ob die beiden anderen Knoepfe da sind. */
.ob-tour-card-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ob-tour-row { display: flex; align-items: center; gap: 10px; }
.ob-tour-back-btn {
  background: none; border: none; padding: 0 4px;
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: color .15s;
}
.ob-tour-back-btn:hover { color: var(--text); }
.ob-tour-detail-btn {
  width: 100%; height: 44px; padding: 0 20px; border: 1.5px solid var(--border);
  border-radius: 12px; background: var(--white); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.ob-tour-detail-btn:hover { border-color: var(--primary); color: var(--primary); }
.ob-tour-next-btn {
  height: 44px; padding: 0 24px; border-radius: 12px;
  font-size: 14px; font-weight: 600; min-width: 100px;
  margin-left: auto;
}
.ob-tour-skip-link {
  display: block; margin: 16px auto 0; background: none; border: none;
  font-size: 13px; color: var(--text-muted); cursor: pointer; padding: 0;
  opacity: .7; transition: opacity .15s;
}
.ob-tour-skip-link:hover { opacity: 1; }

/* ── Detail-Spotlight ── */
.ob-tour-highlight {
  background: transparent;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.52);
  z-index: 10001;
}

/* ── Detail-Tooltip (positioniert) ── */
.ob-tour-tooltip {
  position: fixed;
  width: 320px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  z-index: 10002;
  transition: top .25s ease, left .25s ease;
}
.ob-tour-tooltip.hidden { display: none; }

.ob-tour-step-badge {
  font-size: 11px; font-weight: 700; color: var(--primary);
  background: var(--primary-pale); display: inline-block;
  padding: 3px 10px; border-radius: 12px; margin-bottom: 10px;
}
.ob-tour-title { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.ob-tour-text { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-bottom: 16px; }
.ob-tour-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ob-tour-skip { background: none; border: none; font-size: 13px; color: var(--text-muted); cursor: pointer; padding: 0; }
.ob-tour-skip:hover { color: var(--text); }
.ob-tour-next { min-width: 90px; }

/* ── Tour: Einstiegskarte (Zusammenspiel der Apps + Wochenablauf) ── */
.ob-tour-card--wide { width: 600px; }
.ob-tour-card-kicker {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); margin-bottom: 6px;
}
.ob-tour-card-kicker.hidden { display: none; }
.ob-tour-points {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ob-tour-points.hidden { display: none; }
.ob-tour-points li {
  position: relative;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  padding-left: 22px;
}
.ob-tour-points li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.ob-next {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.ob-next-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--white);
}
.ob-next-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-next-body { display: flex; flex-direction: column; gap: 2px; }
.ob-next-title { font-size: 14px; font-weight: 800; color: var(--text); }
.ob-next-text  { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

.ob-tour-card-visual { margin: 0 0 24px; }
.ob-tour-card-visual.hidden { display: none; }
.ob-tour-demo {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 10002; pointer-events: none; white-space: nowrap;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--primary);
  padding: 6px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.ob-tour-demo.hidden { display: none; }

/* KI-Button waehrend Setup/Zusammenfassung ausblenden (in der Tour ist er ein eigener Schritt) */
#screen-onboarding:not(.hidden) ~ .ai-fab { display: none; }

/* ── Setup: Schichtzeiten, Abrechnung, Einladungshinweis ── */
.ob-form-section {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-muted); margin: 18px 0 8px; padding-left: 2px;
}
.ob-shift-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.ob-shift-row:last-of-type { border-bottom: none; }
.ob-shift-label { font-size: 14px; font-weight: 600; color: var(--text); min-width: 110px; }
.ob-shift-times { display: flex; align-items: center; gap: 8px; }
.ob-shift-times input[type="time"] {
  padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: inherit; background: var(--bg);
  color: var(--text); outline: none; width: 110px;
}
.ob-shift-times input[type="time"]:focus { border-color: var(--primary); }
.ob-shift-sep { color: var(--text-muted); font-size: 16px; }
.ob-link-hint {
  margin-top: 14px; font-size: 13px; color: var(--text-muted); line-height: 1.55; text-align: left;
}
.ob-link-hint strong { color: var(--text); }
.ob-link-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; color: var(--primary); }

/* ── Responsive ── */
@media (max-width: 540px) {
  .ob-setup-inner, .ob-welcome-inner, .ob-summary-inner {
    padding: 24px 20px 20px;
  }
  .ob-welcome-title { font-size: 28px; }
  .ob-tour-tooltip  { width: calc(calc(100vw / var(--ui-zoom)) - 24px); left: 12px !important; }
  .ob-tour-card { padding: 28px 20px 22px; }
  .ob-tour-card-title { font-size: 20px; }
  .ob-tour-demo { font-size: 10px; padding: 4px 10px; }
  .ob-shift-label { min-width: 90px; font-size: 13px; }
  .ob-shift-times input[type="time"] { width: 95px; font-size: 13px; padding: 7px 8px; }
}

/* ═══════════════════════════════════════════════════════════
   Checklisten — Einstellungen
   ═══════════════════════════════════════════════════════════ */
.eins-checklist-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.eins-checklist-empty {
  padding: 18px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.eins-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  transition: background .15s;
}
.eins-checklist-item:hover {
  background: var(--bg-hover, rgba(0,0,0,.03));
}
.eins-checklist-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 22px;
}
.eins-checklist-text {
  flex: 1;
  font-size: 15px;
  color: var(--text);
}
.eins-checklist-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s;
}
.eins-checklist-item:hover .eins-checklist-actions {
  opacity: 1;
}
.eins-checklist-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.eins-checklist-btn:hover {
  background: rgba(0,0,0,.06);
  color: var(--text);
}
.eins-checklist-btn:disabled {
  opacity: .25;
  pointer-events: none;
}
.eins-checklist-btn svg {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.eins-cl-del:hover {
  color: var(--danger, #e74c3c);
}
.eins-checklist-add {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.eins-checklist-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.eins-checklist-input:focus {
  border-color: var(--primary);
}
.eins-checklist-add-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.eins-checklist-add-btn:hover {
  opacity: .85;
}

/* ═══════════════════════════════════════════════════════════
   Checklisten — Detail-Modal
   ═══════════════════════════════════════════════════════════ */
.dlm-cl-spalten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px;
}
.dlm-cl-spalte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dlm-cl-kopf {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding: 0 10px 4px;
}
.dlm-cl-zahl { color: var(--text-muted); font-weight: 600; }
.dash-cl-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  transition: background .15s;
}
.dash-cl-item:hover { background: rgba(0,0,0,.02); }
.dash-cl-item-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.dash-cl-item--done .dash-cl-item-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.dash-cl-item--done .dash-cl-item-check svg {
  stroke: #fff;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash-cl-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-cl-item-text {
  font-size: 13.5px;
  color: var(--text);
}
.dash-cl-item--done .dash-cl-item-text {
  text-decoration: line-through;
  opacity: .55;
}
.dash-cl-item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}
/* Dark Mode */
html.dark .eins-checklist-item { background: rgba(255,255,255,.04); }
html.dark .eins-checklist-item:hover { background: rgba(255,255,255,.08); }
html.dark .eins-checklist-btn:hover { background: rgba(255,255,255,.1); }
html.dark .eins-checklist-input { background: var(--white); border-color: var(--border); }

/* ═══════════════════════════════════════════════════════════════
   Google Bewertungen – Einstellungen
   ═══════════════════════════════════════════════════════════════ */

/* Suche */
.eins-google-search-row {
  display: flex;
  gap: 8px;
}
.eins-google-search-row input { flex: 1; }
.eins-google-search-row .btn { flex-shrink: 0; white-space: nowrap; }

/* Suchergebnisse */
.eins-google-candidates {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.eins-google-candidate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.eins-google-candidate:last-child { border-bottom: none; }
.eins-google-candidate:hover { background: var(--primary-pale); }
.eins-google-candidate-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.eins-google-candidate-addr {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.eins-google-candidate-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.eins-google-candidate-count {
  font-weight: 400;
  color: var(--text-muted);
}
.eins-google-candidate-select {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}
.eins-google-no-result {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Verbundener Header */
.eins-google-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.eins-google-header-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.eins-google-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #4285f4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.eins-google-header-icon svg { width: 20px; height: 20px; }
.eins-google-header-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.eins-google-header-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Bewertungs-Übersicht */
.eins-google-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.eins-google-summary-rating {
  font-size: 42px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.eins-google-summary-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}
.eins-google-summary-count {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sterne */
.eins-star {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.eins-star--full { fill: #facc15; }
.eins-star--empty { fill: #d1d5db; }
.eins-google-candidate-rating .eins-star { width: 14px; height: 14px; }
.eins-google-review-stars .eins-star { width: 15px; height: 15px; }

/* Einzelne Rezensionen */
.eins-google-review-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.eins-google-review {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.eins-google-review:last-child { border-bottom: none; }
.eins-google-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.eins-google-review-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.eins-google-review-time {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.eins-google-review-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 8px;
}
.eins-google-review-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
}

/* Dark Mode */
html.dark .eins-google-candidate:hover { background: rgba(255,255,255,.06); }
html.dark .eins-star--empty { fill: #4b5563; }

/* ═══════════════════════════════════════════════════════════════
   Team – Betrieb-Karte
   ═══════════════════════════════════════════════════════════════ */

.team-betrieb-card {
  border-bottom: 2px solid var(--primary) !important;
  margin-bottom: 4px;
}
.team-betrieb-avatar {
  background: linear-gradient(135deg, #4285f4, #1a73e8) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-betrieb-avatar svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}
.team-betrieb-avatar--logo {
  background: var(--bg) !important;
  overflow: hidden;
}
.team-betrieb-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.team-betrieb-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.team-betrieb-rating .eins-star { width: 14px; height: 14px; }
.team-betrieb-rating-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-left: 2px;
}
.team-betrieb-rating-loading {
  font-size: 12px;
  color: var(--text-muted);
}

/* Betrieb-Drawer Inhalt */
.team-betrieb-section {
  margin-bottom: 24px;
}
.team-betrieb-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  margin-bottom: 10px;
}
.team-betrieb-info-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.team-betrieb-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.team-betrieb-info-row:last-child { border-bottom: none; }
.team-betrieb-info-label {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.team-betrieb-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.team-betrieb-no-reviews {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.team-betrieb-settings-link {
  text-align: center;
  padding-top: 8px;
}

/* ── KI-Assistent ────────────────────────────────────────────────────────── */

.ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--primary-light) 0%, var(--primary) 60%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(24,39,75,.28), 0 2px 6px rgba(24,39,75,.18);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
}
.ai-fab:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 16px 34px rgba(24,39,75,.34), 0 2px 6px rgba(24,39,75,.2); }
.ai-fab:active { transform: translateY(0) scale(1); }
.ai-fab svg { width: 28px; height: 28px; }
.ai-fab-close { display: none; }
.ai-fab--open .ai-fab-icon { display: none; }
.ai-fab--open .ai-fab-close { display: block; }

.ai-panel {
  --ai-w: 440px;
  --ai-h: 640px;
  position: fixed;
  /* Unterkante buendig mit dem weissen Reiter-Panel: Nav-Hoehe + Pane-Padding */
  bottom: calc(var(--nav-h) + 20px);
  right: 24px;
  width: min(var(--ai-w), calc(calc(100vw / var(--ui-zoom)) - 48px));
  height: min(var(--ai-h), calc(calc(100vh / var(--ui-zoom)) - var(--nav-h) - 44px));
  min-width: 320px;
  min-height: 320px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(24,39,75,.20), 0 2px 8px rgba(24,39,75,.08);
  z-index: 9997;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px) scale(.96);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.ai-panel--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.ai-panel--resizing { transition: none; user-select: none; }

/* Resize-Griff: linke Kante, obere Kante, Ecke oben links */
.ai-resize {
  position: absolute;
  z-index: 2;
  touch-action: none;
}
.ai-resize--l { top: 12px; bottom: 12px; left: -4px; width: 10px; cursor: ew-resize; }
.ai-resize--t { left: 12px; right: 12px; top: -4px; height: 10px; cursor: ns-resize; }
.ai-resize--tl { top: -4px; left: -4px; width: 26px; height: 26px; cursor: nwse-resize; }
/* Griff nur andeuten: taucht auf, wenn die Maus ueber dem Fenster ist */
.ai-resize--tl::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 10px;
  width: 15px;
  height: 15px;
  border-left: 2.5px solid var(--text-muted);
  border-top: 2.5px solid var(--text-muted);
  border-radius: 8px 0 0 0;
  opacity: 0;
  transition: opacity .15s;
}
.ai-panel:hover .ai-resize--tl::after { opacity: .45; }
.ai-resize--tl:hover::after { opacity: .9; }

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 12px 18px;
  border-bottom: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  background: var(--white);
  color: var(--text);
  flex-shrink: 0;
}
.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.ai-panel-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-pale) 0%, #d5e2f0 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-panel-avatar svg { width: 19px; height: 19px; }
.ai-panel-name {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  min-width: 0;
}
.ai-panel-name small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-panel-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.ai-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  transition: background .15s, color .15s;
}
.ai-panel-close svg { width: 16px; height: 16px; }
.ai-panel-close:hover { background: var(--primary-pale); color: var(--text); }

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  scrollbar-width: thin;
}
.ai-msg ul {
  margin: 4px 0 2px;
  padding-left: 18px;
}
.ai-msg li { margin: 2px 0; }
.ai-msg p { margin: 0 0 6px; }
.ai-msg p:last-child { margin-bottom: 0; }

.ai-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  animation: aiMsgIn .18s ease-out both;
}
.ai-msg--user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(24,39,75,.16);
}
.ai-msg--assistant {
  align-self: flex-start;
  background: var(--primary-pale);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

/* Rückfrage vor Ändern/Löschen: SIA führt das nicht selbst aus */
.ai-confirm {
  align-self: stretch;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: aiMsgIn .18s ease-out both;
}
.ai-confirm-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  word-break: break-word;
}
.ai-confirm-actions {
  display: flex;
  gap: 8px;
}
.ai-confirm-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ai-confirm-btn--ok {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
@keyframes aiMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ai-typing {
  display: flex;
  padding: 0 16px 10px;
  flex-shrink: 0;
}
.ai-typing-bubble {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 11px 14px;
  border-radius: 18px 18px 18px 6px;
  background: var(--primary-pale);
}
.ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: .4;
  animation: aiBounce .6s infinite alternate;
}
.ai-typing span:nth-child(2) { animation-delay: .15s; }
.ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aiBounce {
  to { opacity: 1; transform: translateY(-4px); }
}

.ai-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ai-input::placeholder { color: var(--text-muted); }
.ai-input:focus {
  border-color: var(--primary-light);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--primary-pale);
}
.ai-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, transform .15s;
}
.ai-send:hover { background: var(--primary-dark); transform: scale(1.06); }
.ai-send:active { transform: scale(.96); }
.ai-send svg { width: 17px; height: 17px; }

/* Dark Mode: --primary ist hier hell, deshalb dunkle Schrift auf hellen Flaechen */
html.dark .ai-panel { box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4); }
html.dark .ai-fab {
  background: linear-gradient(150deg, #ffffff 0%, #d5d5d5 100%);
  color: #141414;
  box-shadow: 0 10px 26px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.35);
}
html.dark .ai-fab:hover { box-shadow: 0 16px 34px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.4); }
html.dark .ai-panel-avatar { background: rgba(255,255,255,.1); color: var(--text); }
html.dark .ai-msg--user { color: #141414; box-shadow: none; }
html.dark .ai-send { color: #141414; }
html.dark .ai-send:hover { background: var(--primary-light); }

/* Schmale Fenster: die schwebende Menüleiste reicht fast bis zum Rand und läge unter dem SIA-Knopf
   (verdeckte „Einstellungen“). Knopf und Panel rücken über das Menü, der Standort-Knopf links genauso (Spiegelbild).
   Grenze 1260: Menü 1080 + je Seite 24 Rand + 56 Knopf + 8 Luft (vorher 1120, da lag SIA bis 1256 px auf dem Menü). */
@media (max-width: 1260px) {
  .ai-fab, .ort-leiste { bottom: calc(var(--nav-h) + 8px); }
  .ai-panel {
    bottom: calc(var(--nav-h) + 76px);
    height: min(var(--ai-h), calc(calc(100vh / var(--ui-zoom)) - var(--nav-h) - 112px));
  }
}
@media (max-width: 480px) {
  .ai-panel {
    top: auto;
    right: 8px;
    left: 8px;
    bottom: calc(var(--nav-h) + 76px);
    width: auto;
    max-width: none;
    height: min(calc(70vh / var(--ui-zoom)), calc(calc(100vh / var(--ui-zoom)) - var(--nav-h) - 112px));
    min-width: 0;
  }
  .ai-resize { display: none; }
  .ai-fab { bottom: calc(var(--nav-h) + 8px); right: 16px; }
  .ort-leiste { left: 16px; }
}

/* ── Betrieb-Hinweise (Chat-Tab) ────────────────────────────── */

.msg-hints-card {
  margin: 0 0 6px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.msg-hints-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.msg-hints-header:hover {
  background: var(--primary-pale);
}
.msg-hints-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.msg-hints-icon {
  color: var(--primary);
  flex-shrink: 0;
}
.msg-hints-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.msg-hints-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.msg-hints-chevron {
  color: var(--text-muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.msg-hints-chevron--open {
  transform: rotate(180deg);
}
.msg-hints-body {
  border-top: 1px solid var(--border);
  padding: 6px 0;
  max-height: 320px;
  overflow-y: auto;
}
.msg-hints-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 16px;
  transition: background .1s;
}
.msg-hints-item:hover {
  background: var(--bg);
}
.msg-hints-item--done {
  opacity: .5;
}
.msg-hints-check-label {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}
.msg-hints-check-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.msg-hints-checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.msg-hints-check-label input:checked + .msg-hints-checkmark {
  background: var(--primary);
  border-color: var(--primary);
}
.msg-hints-check-label input:checked + .msg-hints-checkmark::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -1px;
}
.msg-hints-item-body {
  flex: 1;
  min-width: 0;
}
.msg-hints-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.msg-hints-prio {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.msg-hints-cat {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.msg-hints-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}
.msg-hints-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.msg-hints-item--done .msg-hints-item-title {
  text-decoration: line-through;
}
.msg-hints-item-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
  line-height: 1.35;
}
.msg-hints-item-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
  line-height: 1.35;
}

/* Dark Mode */
html.dark .msg-hints-card {
  background: var(--card-bg, #1e293b);
  border-color: var(--border);
}
html.dark .msg-hints-header:hover {
  background: rgba(255,255,255,.05);
}
html.dark .msg-hints-item:hover {
  background: rgba(255,255,255,.03);
}
html.dark .msg-hints-checkmark {
  border-color: var(--border);
}
.pz-vip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.vip-ersteller { font-style: italic; }

/* Einladungslink-Dialog: persönlicher Weg oben, Betriebs-Code darunter */
.team-link-sub { margin: 18px 0 6px; font-size: 14px; font-weight: 600; color: var(--text-secondary, inherit); }
#team-link-persoenlich { width: 100%; margin-bottom: 6px; }
/* Betriebs-Link neu erzeugen / sperren: alter Code gilt danach sofort nicht mehr */
.team-link-sperre { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.team-link-sperre-row { display: flex; flex-wrap: wrap; gap: 8px; }
.team-link-sperre-row > button { flex: 1 1 160px; }
.team-link-sperre-row .hidden { display: none; }
.team-link-sperren-btn { color: var(--danger); }
.team-link-copy-btn:disabled { opacity: .45; cursor: default; }
.team-link-meldung { margin-top: 10px; font-size: 13px; font-weight: 600; text-align: center; }
.team-link-meldung.is-ok { color: var(--success); }
.team-link-meldung.is-fehler { color: var(--danger); }
.team-link-url.is-gesperrt { color: var(--text-secondary, inherit); font-style: italic; user-select: none; }

/* Dialog offen (js/dialog-overlay.js): untere Leiste, Standort-Knopf und runder Knopf rutschen UNTER den
   Dialog-Hintergrund und werden dadurch genauso unscharf wie der Rest. Früher filter: brightness – das hebt
   die eigene Unschärfe der Leiste (backdrop-filter) auf, sie wurde flächig grau (Lars 11.10.2026). */
body.dialog-offen .app-nav,
body.dialog-offen .ai-fab,
body.dialog-offen .ort-leiste {
  z-index: 0;
  pointer-events: none;
}

/* Zoom erlaubt (Viewport ohne user-scalable=no): iOS zoomt beim Antippen eines Feldes mit Schrift unter 16px
   ungewollt hinein. Nur auf Touch-Geräten, nur Felder, in die man tippt. */
@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="button"]):not([type="submit"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Öffnungstage / geschlossene Tage (Einstellungen › Betrieb, Paket z) */
.eins-oeff-select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  max-width: 55%;
}
.eins-oeff-liste { margin-bottom: 12px; }
.eins-oeff-leer { padding: 8px 0; color: var(--text-muted); font-size: 15px; }
.eins-oeff-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.eins-oeff-zeile:first-child { border-top: none; }
.eins-oeff-text { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.eins-oeff-badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--border);
  color: var(--text-muted);
}
.eins-oeff-badge--offen { background: var(--primary-pale); color: var(--primary); }
.eins-oeff-del {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  font-size: 18px;
}
.eins-oeff-del:disabled { opacity: .3; cursor: default; }
/* Standorte (Einstellungen › Standorte) */
.eins-standort-adresse { display: block; font-size: 13px; font-weight: 400; color: var(--text-muted); }
.eins-standort--aus .eins-oeff-text { color: var(--text-muted); }
/* Fenster „Standort bearbeiten“: Felder untereinander, Zeichen-Block, Aktiv als Schalter */
.eins-st-form { display: flex; flex-direction: column; gap: 14px; }
.eins-st-feld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.eins-confirm-body .eins-st-feld input { margin-top: 0; font-size: 14px; }
.eins-st-zeichen { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--primary-pale); }
.eins-st-zeichen .ort-kreis { flex: none; width: 60px; height: 60px; font-size: 22px; box-shadow: 0 0 0 3px var(--white), 0 2px 8px rgba(0,0,0,.12); }
.eins-st-zeichen .ort-kreis--lang { font-size: 17px; }
.eins-st-zeichen-rechts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.eins-st-titel { font-size: 13px; font-weight: 600; color: var(--text); }
.eins-st-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eins-confirm-body #eins-standort-kuerzel { width: 76px; margin-top: 0; padding: 7px 10px; text-align: center; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.eins-confirm-body #eins-standort-kuerzel::placeholder { font-weight: 600; color: var(--text-muted); opacity: .6; }
.eins-confirm-body #eins-standort-kuerzel:focus { border-color: var(--primary-light); }
.eins-st-weg { border: none; background: none; padding: 6px 4px; font: inherit; font-size: 13px; color: var(--text-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.eins-st-weg:hover { color: var(--danger); }
.eins-st-klein, .eins-st-aktiv small { font-size: 12px; font-weight: 400; line-height: 1.45; color: var(--text-muted); }
.eins-st-aktiv { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 2px 0; cursor: pointer; }
.eins-st-aktiv--haupt { cursor: default; }
.eins-st-aktiv > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eins-st-aktiv b { font-size: 14px; font-weight: 600; color: var(--text); }
/* Der Haken liegt unsichtbar über dem ganzen Schalter (klickbar, auch für die Prüfung) */
.eins-confirm-body .eins-st-aktiv .eins-toggle-wrap input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.eins-oeff-neu { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.eins-oeff-neu select,
.eins-oeff-neu input {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  min-width: 0;
}
.eins-oeff-grund { flex: 1 1 180px; }
.eins-oeff-add { padding: 10px 16px; font-size: 14px; flex-shrink: 0; }

/* Planung: geschlossene Tage (Ruhetag, Feiertag, Betriebsurlaub) – nur grau, nichts gesperrt */
.plan-day-header--zu { background: var(--border); }
.plan-day-header--zu .day-date { color: var(--text-muted); }
.plan-day-zu { margin-top: 2px; font-size: 10px; font-weight: 700; color: var(--text-muted); line-height: 1.2; overflow-wrap: anywhere; }
.plan-day-col--zu { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(100,116,139,.12) 8px 9px); background-color: rgba(100,116,139,.07); }

/* Ruhetage im Kalender (Paket 5): nur grau, nie gesperrt */
.kal-month-cell.kal-zu { background-color: rgba(100,116,139,.09); background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(100,116,139,.12) 8px 9px); }
.kal-timeline-day-head.kal-zu { background: var(--border); }
.kal-day-col.kal-zu { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(100,116,139,.12) 8px 9px); background-color: rgba(100,116,139,.07); }
.kal-zu-text { font-size: 10px; font-weight: 700; color: var(--text-muted); line-height: 1.2; overflow-wrap: anywhere; }
.kal-cell-day .kal-zu-text { margin-left: auto; text-align: right; }
.dash-zu-hinweis { font-weight: 700; color: var(--text-muted); }

/* Reiter Terminal: live im Betrieb, Einrichtung eingeklappt */
/* Terminal-Reiter im Dashboard-Look (dash-panel/dash-card, 11.10.2026).
   Ruhig (12.10.2026): eine Farbe (Marine = --primary) und eine Warnfarbe nur für „braucht dich“
   (fehlt noch, Stempelung ohne Netz, dringender Hinweis). Wenig Text: Ringe, Gesichter, Symbole;
   Details als Tooltip. Oben rechts: Wechsel zwischen den Terminals mit Online-Punkten. Checkliste zum Hineinschreiben. */
#tab-terminal { --term-warn: var(--primary); --term-warn-punkt: var(--primary); --term-linie: rgba(0,0,0,.06); --term-flaeche: rgba(53,80,111,.09); --term-flaeche-2: rgba(53,80,111,.16); --term-haken: #c3cbd6; --term-auf-primary: #fff; }
html.dark #tab-terminal { --term-warn: var(--primary); --term-warn-punkt: var(--primary); --term-linie: rgba(255,255,255,.08); --term-flaeche: rgba(255,255,255,.08); --term-flaeche-2: rgba(255,255,255,.15); --term-haken: #5b6b7d; --term-auf-primary: #141414; }
.term-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); grid-auto-rows: auto; align-items: stretch; min-height: 460px; }
.term-grid > .loading { grid-column: 1 / -1; }
.term-spalte { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 0; }
.term-spalte > .dash-card { flex: 1 1 0; min-height: 0; margin: 0; }
.term-spalte > #term-hinweise { flex-grow: 1.7; }
.term-koerper { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; border-top: 1px solid var(--term-linie); }
@media (max-width: 860px) {
  .term-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; flex: 0 0 auto; min-height: 0; }
  .term-spalte > .dash-card { flex: 0 0 auto; }
  .term-koerper { max-height: none; overflow: visible; }
  #term-hinweise .msg-hints-body { max-height: none; overflow: visible; }
}
/* Wechsel zwischen den Terminals */
.term-wechsler { position: relative; margin-left: auto; }
.term-wechsler:empty { display: none; }
.term-wechsler-knopf { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 5px; border: 0; border-radius: 999px; background: var(--term-flaeche); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.term-wechsler-knopf:hover { background: var(--term-flaeche-2); }
.term-wechsler-pfeil, .term-wechsler-haken { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.term-wechsler-pfeil { color: var(--text-muted); transition: transform .15s; }
.term-wechsler-knopf[aria-expanded="true"] .term-wechsler-pfeil { transform: rotate(180deg); }
.term-wechsler-liste { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; min-width: 230px; padding: 6px; border-radius: 16px; background: var(--card-bg, #fff); box-shadow: 0 12px 32px rgba(0,0,0,.16), 0 0 0 1px var(--term-linie); }
html.dark .term-wechsler-liste { background: #1f1f1f; }
.term-wechsler-eintrag { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-align: left; }
.term-wechsler-eintrag:hover { background: var(--term-flaeche); }
.term-wechsler-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-wechsler-haken { color: var(--primary); flex-shrink: 0; }
.term-status { display: inline-flex; align-items: center; gap: 4px; padding-left: 2px; }
.term-status-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.term-status-punkt--aus { background: none; box-shadow: inset 0 0 0 1.5px var(--text-muted); }
.term-status-zahl { font-size: 12px; font-weight: 800; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.term-wechsler-verwalten { margin-top: 4px; border-top: 1px solid var(--term-linie); border-radius: 0 0 12px 12px; color: var(--text-muted); }
.term-wechsler-verwalten:hover { color: var(--text); }
.term-geraet { position: relative; width: 30px; height: 30px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: var(--term-auf-primary); font-size: 13px; font-weight: 800; }
.term-geraet--alle { background: var(--term-flaeche-2); color: var(--primary); }
.term-geraet--alle svg { fill: currentColor; }
.term-geraet--alle svg.term-strich { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.term-geraet-punkt { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 2px var(--card-bg, #fff); }
.term-geraet .term-geraet-punkt { background: #fff; box-shadow: 0 0 0 2px var(--primary); }
.term-geraet .term-geraet-punkt--aus { background: var(--term-haken); }
/* Karten-Kopf: Ring links, Titel, Pfeil rechts */
.term-live-card { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.term-live-kopf { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 10px 14px 10px 20px; }
.term-live-kopf--ring { padding-top: 16px; padding-bottom: 14px; }
.term-live-titel, #term-hinweise .msg-hints-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; letter-spacing: -.1px; color: var(--text); }
.term-pfeil { width: 32px; height: 32px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: var(--text-muted); cursor: pointer; }
.term-pfeil:hover { background: var(--term-flaeche); color: var(--primary); }
.term-pfeil svg, .term-strich { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.term-ring { position: relative; width: 60px; height: 60px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.term-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.term-ring-spur, .term-ring-fuell { fill: none; stroke-width: 7; }
.term-ring-spur { stroke: var(--term-flaeche); }
.term-ring-fuell { stroke: var(--primary); stroke-linecap: round; }
.term-ring-mitte { position: relative; font-size: 15px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.term-live-leer { padding: 16px 20px; font-size: 13px; color: var(--text-muted); }
/* Leute als Gesichter */
.term-leute { display: flex; flex-wrap: wrap; gap: 14px 10px; padding: 14px 20px; }
.term-person { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.term-avatar { width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: var(--term-auf-primary); font-size: 14px; font-weight: 800; letter-spacing: .3px; }
.term-person-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--text); }
.term-person--fehlt .term-avatar { background: none; box-shadow: inset 0 0 0 2px var(--term-warn-punkt); color: var(--term-warn); }
.term-person-unten { margin-top: -3px; font-size: 11px; font-weight: 700; color: var(--term-warn); font-variant-numeric: tabular-nums; }
.term-person--weg .term-avatar { background: var(--term-flaeche); color: var(--text-muted); }
.term-person--weg .term-person-name, .term-person--weg .term-person-unten { color: var(--text-muted); }
.term-warn { color: var(--term-warn); }
.term-abschnitt { padding: 12px 20px 0; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); border-top: 1px solid var(--term-linie); }
.term-abschnitt.term-warn { color: var(--term-warn); }
.term-live-offline { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: calc(100% - 40px); margin: 4px 20px 16px; padding: 11px 14px; border: 0; border-radius: 12px; background: var(--term-flaeche); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; flex-shrink: 0; }
.term-live-offline > span:first-child::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--term-warn-punkt); }
.term-live-offline:hover { background: var(--term-flaeche-2); }
/* Listenzeilen (Reservierungen) */
.term-live-liste { display: flex; flex-direction: column; padding: 8px 0; }
.term-live-zeile { display: flex; align-items: center; gap: 12px; padding: 7px 20px; font-size: 14px; }
.term-live-name { font-weight: 700; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-link { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; padding: 12px 20px; border: 0; border-top: 1px solid var(--term-linie); background: none; color: var(--primary); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; }
.term-link:hover { background: var(--term-flaeche); }
/* Hinweise: die alte Karte aus dem Chat verliert Rand und Rahmen, die dash-card ist der Rahmen */
#term-hinweise .msg-hints-card { margin: 0; border: 0; border-radius: 0; background: none; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
#term-hinweise .msg-hints-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px 14px; cursor: default; border-bottom: 0; }
#term-hinweise .msg-hints-header:hover { background: none; }
#term-hinweise .msg-hints-body { border-top: 1px solid var(--term-linie); padding: 6px 0; max-height: none; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
#term-hinweise .msg-hints-item { align-items: center; padding: 9px 14px 9px 20px; }
#term-hinweise .msg-hints-check-label { margin-top: 0; }
#term-hinweise .msg-hints-checkmark { border-color: var(--term-haken); border-radius: 50%; width: 20px; height: 20px; }
#term-hinweise .msg-hints-item-title { font-size: 14px; font-weight: 700; }
/* Wer hat's gesehen (Idee C, 16.10.2026): unter Team-Notizen */
#term-hinweise .term-hinweis-gesehen { margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--primary); overflow-wrap: anywhere; }
#term-hinweise .msg-hints-item--done .term-hinweis-gesehen { color: var(--text-muted); }
#term-hinweise .term-hinweis-foto { display: block; width: 72px; height: 72px; margin-top: 8px; border-radius: 10px; overflow: hidden; background: var(--bg, #f2f4f7); }
#term-hinweise .term-hinweis-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.term-dringend { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--term-warn-punkt); vertical-align: 1px; }
.term-hinweise-leer { padding: 16px 20px; font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--term-linie); }
/* Checkliste */
.term-cl-liste { display: flex; flex-direction: column; padding: 6px 0 10px; }
.term-cl-zeile { display: flex; align-items: center; gap: 12px; padding: 6px 20px; font-size: 14px; }
.term-cl-haken { width: 20px; height: 20px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--term-haken); border-radius: 50%; color: var(--term-auf-primary); }
.term-cl-haken svg { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.term-cl-zeile--fertig .term-cl-haken { background: var(--primary); border-color: var(--primary); }
.term-cl-text { flex: 1; min-width: 0; padding: 3px 0; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 700; outline: none; text-overflow: ellipsis; }
.term-cl-text:focus { border-bottom-color: var(--term-linie); }
html.dark #tab-terminal .term-cl-text { background: none; border-color: transparent; }
html.dark #tab-terminal .term-cl-text:focus { border-bottom-color: var(--term-linie); }
.term-cl-text::placeholder { color: var(--text-muted); font-weight: 600; opacity: 1; }
.term-cl-zeile { cursor: text; }
.term-cl-weg { flex-shrink: 0; width: 22px; height: 22px; margin-right: 2px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--text-muted) 16%, transparent); color: var(--text-muted); cursor: pointer; opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s, background .15s, color .15s; }
/* Das Symbol ist so groß wie der Kreis – so landen beide auf denselben Pixeln und das × sitzt genau in der Mitte */
.term-cl-weg svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.term-cl-zeile:hover .term-cl-weg, .term-cl-zeile:focus-within .term-cl-weg { opacity: 1; transform: none; }
.term-cl-weg:hover { background: color-mix(in srgb, var(--text-muted) 30%, transparent); color: var(--text); }
.term-cl-weg:active { transform: scale(.9); }
@media (hover: none) { .term-cl-weg { opacity: 1; transform: none; } }
.term-cl-plus { border-style: dashed; color: var(--text-muted); }
.term-cl-plus svg { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
/* Plus-Zeile: leiser Plus-Kreis immer; „Neuer Punkt“ erst beim Drüberfahren (Handy: immer) und bei leerer Gruppe */
.term-cl-zeile--plus .term-cl-plus { opacity: .55; transition: opacity .12s; }
.term-cl-zeile--plus .term-cl-text::placeholder { color: transparent; transition: color .12s; }
.term-cl-karte:hover .term-cl-zeile--plus .term-cl-plus, .term-cl-zeile--plus:focus-within .term-cl-plus, .term-cl-zeile--plus.is-sichtbar .term-cl-plus { opacity: 1; }
.term-cl-karte:hover .term-cl-zeile--plus .term-cl-text::placeholder, .term-cl-zeile--plus.is-sichtbar .term-cl-text::placeholder { color: var(--text-muted); }
.term-cl-zeile--plus:focus-within .term-cl-text::placeholder { color: transparent; }
@media (hover: none) { .term-cl-zeile--plus .term-cl-plus { opacity: 1; } .term-cl-zeile--plus .term-cl-text::placeholder { color: var(--text-muted); } }
.term-cl-zeile--fertig .term-cl-text { color: var(--text-muted); font-weight: 600; text-decoration: line-through; text-decoration-thickness: 1px; }
/* Reservierungen */
.term-res-zeit { min-width: 44px; font-size: 14px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.term-res-tag, .term-res-pers { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.term-res-tag svg, .term-res-pers svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-height: 800px) and (min-width: 861px) {
  .term-ring { width: 52px; height: 52px; }
  .term-live-kopf--ring, #term-hinweise .msg-hints-header { padding-top: 12px; padding-bottom: 10px; }
  .term-leute { padding-top: 10px; padding-bottom: 10px; }
  .term-avatar { width: 40px; height: 40px; }
  .term-cl-zeile { padding-top: 4px; padding-bottom: 4px; }
  #term-hinweise .msg-hints-item { padding-top: 7px; padding-bottom: 7px; }
}
/* Einstellungen › Planung › Mindestbesetzung: eine Karte je Regel */
.eins-bes-liste { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.eins-bes-zeile { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }
.eins-bes-oben { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eins-bes-oben .eins-oeff-select { max-width: none; flex: 1 1 140px; min-width: 0; }
.eins-bes-tage { display: flex; gap: 4px; flex-wrap: wrap; }
.eins-bes-tag { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; cursor: pointer; }
.eins-bes-tag:has(input:checked) { background: var(--primary-pale); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }
.eins-bes-tag input { margin: 0; }
.eins-bes-unten { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.eins-bes-wort { color: var(--text-secondary, #6b7280); font-size: 13px; }
.eins-bes-unten .eins-number-input { width: 70px; }

.vip-ende-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.vip-ende-einst .vip-ende-text { font-size: 14px; color: var(--text); text-align: left; }

/* ── Mac App Store: Hinweis statt Abo-Wahl (js/store-modus.js, 11.10.2026) ── */
.eins-hinweis { margin-top: 12px; font-size: 14px; color: var(--text-muted); }

/* ── Alten Plan übernehmen (Foto / Excel) ───────────────────────────────────── */
/* Fenster „Alten Plan übernehmen“ muss auch in der Einrichtung (Vollbild, z-index 9000) oben liegen */
.umzug-overlay { z-index: 9100; }
.umzug-card.modal-card--wide { max-width: 900px; }
.umzug-card { display: flex; flex-direction: column; max-height: calc(100vh / var(--ui-zoom) - 40px); }
.umzug-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px 8px; }
.umzug-kopf h3 { margin: 0; font-size: 18px; color: var(--text); text-wrap: balance; }
.umzug-inhalt { padding: 4px 24px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.umzug-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text); }
.umzug-klein { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.umzug-hinweis { font-size: 13px; color: var(--danger); min-height: 0; }
.umzug-hinweis:empty { display: none; }
.umzug-wahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.umzug-knopf { display: flex; flex-direction: column; gap: 3px; padding: 16px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--white); cursor: pointer; transition: border-color .15s, background .15s; }
.umzug-knopf:hover, .umzug-knopf:focus-within { border-color: var(--primary); }
.umzug-knopf--haupt { background: var(--primary); border-color: var(--primary); color: #fff; }
.umzug-knopf--haupt:hover { background: var(--primary-light); }
.umzug-knopf-titel { font-weight: 700; font-size: 15px; }
.umzug-knopf-text { font-size: 12.5px; opacity: .8; }
.umzug-fuss { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.umzug-fuss-rechts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.umzug-laden { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 0; color: var(--text-muted); font-size: 14px; }
.umzug-laden p { margin: 0; text-align: center; }
.umzug-spinner { width: 30px; height: 30px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: umzug-dreh .8s linear infinite; }
@keyframes umzug-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .umzug-spinner { animation-duration: 3s; } }

.umzug-hinweise { margin: 0; padding: 10px 14px 10px 30px; background: var(--primary-pale); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; color: var(--text); }
.umzug-woche { display: flex; flex-direction: column; gap: 6px; }
.umzug-abschnitt { display: flex; flex-direction: column; gap: 8px; }
.umzug-abschnitt h4 { margin: 0; font-size: 14px; color: var(--text); }
.umzug-anzahl { color: var(--text-muted); font-weight: 500; }
.umzug-liste { display: flex; flex-direction: column; gap: 8px; }
.umzug-zeile { display: grid; gap: 8px 10px; align-items: end; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); }
.umzug-zeile--ma { grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 104px 32px; }
.umzug-zeile--sch { grid-template-columns: minmax(0, 1.4fr) 152px 122px 122px minmax(0, 1fr) 32px; }
.umzug-zeile--ma .umzug-weg { grid-column: 4; grid-row: 1; }
.umzug-zeile--sch .umzug-weg { grid-column: 6; grid-row: 1; }
.umzug-zeile > .umzug-marken { grid-column: 1 / -1; grid-row: 2; }
.umzug-zeile > .umzug-marken:empty { display: none; }
.umzug-zeile--da { background: var(--bg); }
.umzug-zeile--da input, .umzug-zeile--da select { color: var(--text-muted); }
.umzug-feld { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.umzug-feld > span { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
.umzug-feld input, .umzug-feld select { width: 100%; box-sizing: border-box; min-width: 0; padding: 7px 8px; border: 1.5px solid var(--border); border-radius: 7px;
  font: inherit; font-size: 14px; color: var(--text); background: var(--white); }
.umzug-feld input:focus, .umzug-feld select:focus { outline: none; border-color: var(--primary); }
.umzug-marken { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.umzug-marke { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; background: var(--bg); color: var(--text-muted); }
.umzug-marke--ok { background: rgba(39,174,96,.12); color: #1f8a4c; }
.umzug-marke--warn { background: #fff4e0; color: #9a5b00; }
.umzug-marke--fehler { background: rgba(231,76,60,.12); color: #c0392b; }
.umzug-marke--da { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.umzug-weg { width: 32px; height: 32px; border: none; border-radius: 999px; background: var(--bg); color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.umzug-weg:hover { background: var(--border); color: var(--danger); }
.umzug-plus { align-self: flex-start; border: 1.5px dashed var(--border); background: transparent; color: var(--primary); font: inherit; font-weight: 600; font-size: 13.5px;
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; }
.umzug-plus:hover { border-color: var(--primary); }
.umzug-tarif { font-size: 12.5px; color: var(--text-muted); padding: 8px 12px; border-radius: var(--radius-sm); background: var(--primary-pale); }
.umzug-summe { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--text); padding: 12px 14px; border-radius: var(--radius-sm); background: var(--primary-pale); }
.umzug-summe span { font-size: 12.5px; color: var(--text-muted); }

.umzug-kacheln { display: flex; gap: 10px; flex-wrap: wrap; }
.umzug-kacheln > div { flex: 1 1 110px; min-width: 0; background: var(--primary-pale); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.umzug-kacheln b { display: block; font-size: 24px; color: var(--text); font-variant-numeric: tabular-nums; }
.umzug-kacheln span { font-size: 12px; color: var(--text-muted); }
.umzug-karte { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.umzug-karte > div:first-child { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; min-width: 0; }
.umzug-karte span { font-size: 12.5px; color: var(--text-muted); }
.umzug-karte-aktion { display: flex; gap: 8px; align-items: center; }
.umzug-karte-aktion select { padding: 8px; border: 1.5px solid var(--border); border-radius: 7px; font: inherit; font-size: 14px; background: var(--white); color: var(--text); }
.umzug-rueck { background: none; border: none; padding: 8px 0; color: var(--text-muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.umzug-rueck:hover { color: var(--danger); }
.umzug-fehlbox { padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(231,76,60,.1); color: #a93226; font-size: 13.5px; line-height: 1.5; }

/* Einrichtung: Schritt „Alten Plan übernehmen“ + Liste der übernommenen Mitarbeiter im Einladen-Schritt */
.ob-umzug-wahl { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.ob-umzug-opt { display: flex; flex-direction: column; gap: 3px; width: 100%; box-sizing: border-box; padding: 16px; text-align: left;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--text);
  font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.ob-umzug-opt:hover, .ob-umzug-opt:focus-within, .ob-umzug-opt:focus-visible { border-color: var(--primary); }
.ob-umzug-opt--haupt { background: var(--primary); border-color: var(--primary); color: #fff; }
.ob-umzug-opt--haupt:hover { background: var(--primary-light); }
.ob-umzug-opt-titel { font-weight: 700; font-size: 15px; }
.ob-umzug-opt-text { font-size: 12.5px; opacity: .8; line-height: 1.45; }
.ob-umzug-opt.ob-gesperrt { opacity: .55; pointer-events: none; }
.ob-importiert { margin-bottom: 16px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--primary-pale); }
.ob-importiert-titel { font-weight: 700; font-size: 14px; color: var(--text); }
.ob-importiert-text { margin: 4px 0 10px; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.ob-importiert-liste { display: flex; flex-direction: column; gap: 8px; }
.ob-imp-zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.ob-imp-name { font-size: 13.5px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.ob-imp-zeile input { width: 100%; box-sizing: border-box; min-width: 0; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 7px;
  font: inherit; font-size: 14px; background: var(--white); color: var(--text); }
.ob-imp-zeile .ob-imp-ok { grid-column: 2 / 4; font-size: 12.5px; color: var(--text-muted); }
.ob-imp-zeile.ob-imp-fertig .ob-imp-ok { color: #1e8449; }
@media (max-width: 640px) {
  .ob-imp-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .ob-imp-name { grid-column: 1 / 3; }
  .ob-imp-zeile .ob-imp-ok { grid-column: 1 / 3; }
}

/* Wechsel von anderem Programm (js/wechsel.js, nutzt das Umzug-Fenster) */
.wechsel-progs { display: flex; flex-wrap: wrap; gap: 8px; }
.wechsel-prog { border: 1.5px solid var(--border); background: var(--white); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 9px 14px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.wechsel-prog:hover { border-color: var(--primary); }
.wechsel-prog--an { border-color: var(--primary); background: var(--primary-pale); color: var(--primary); }
.wechsel-hilfe { font-size: 13px; line-height: 1.55; color: var(--text-muted); padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg); }
.wechsel-hilfe--an { color: var(--text); background: var(--primary-pale); display: flex; flex-direction: column; gap: 4px; }
.wechsel-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px 14px; }
.wechsel-kopfzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.wechsel-liste { gap: 6px; }
.wechsel-ma { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); min-width: 0; }
.wechsel-ma--aus { background: var(--bg); }
.wechsel-ma-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; cursor: pointer; }
.wechsel-ma-kopf input { width: 18px; height: 18px; flex: none; }
.wechsel-ma-kopf--einl { cursor: default; justify-content: space-between; }
.wechsel-ma-name { font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.wechsel-ma-zeile { font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; padding-left: 28px; }
.wechsel-ma-kopf--einl + .wechsel-ma-zeile, .wechsel-ma-kopf--einl + .wechsel-ma-hinweis { padding-left: 0; }
.wechsel-ma-hinweis { font-size: 12px; color: #9a5b00; padding-left: 28px; }

@media (max-width: 640px) {
  .umzug-kopf { padding: 16px 16px 6px; }
  .umzug-inhalt { padding: 4px 16px 18px; }
  .umzug-zeile { position: relative; align-items: start; }
  .umzug-zeile--ma, .umzug-zeile--sch { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .umzug-zeile .umzug-weg { position: absolute; top: 8px; right: 8px; grid-column: auto; grid-row: auto; }
  .umzug-zeile .umzug-feld--name { grid-column: 1 / -1; padding-right: 40px; }
  .umzug-zeile--sch > .umzug-feld:nth-child(2), .umzug-zeile--sch > .umzug-feld:nth-child(5) { grid-column: 1 / -1; }
  .umzug-zeile > .umzug-marken { grid-column: 1 / -1; grid-row: auto; }
  .umzug-feld input, .umzug-feld select { font-size: 16px; }
  .umzug-fuss-rechts { width: 100%; margin-left: 0; }
  .umzug-fuss-rechts .btn-primary { flex: 1; }
  .wechsel-prog { flex: 1 1 calc(50% - 8px); text-align: center; }
  #wechsel-undo { min-height: 36px; }
}

/* ── Plan-Leiste aufgeräumt (14.10.2026, Lars wählte Variante A): Werkzeuge als Kapsel wie die Wochenwahl ── */
.plan-werkzeuge { display: inline-flex; align-items: center; flex-shrink: 0; }
.plan-wz { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: var(--primary); font: inherit; cursor: pointer; }
.plan-wz svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.plan-wz-lbl { display: none; }
.plan-wz:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.plan-wz:disabled { opacity: .5; cursor: default; }

.plan-werkzeuge { height: 36px; padding: 3px; gap: 2px; background: var(--primary-pale); border-radius: 999px; }
.plan-werkzeuge .plan-wz { width: 34px; height: 30px; border-radius: 999px; transition: background .14s, box-shadow .14s, color .14s; }
.plan-werkzeuge .plan-wz:hover,
.plan-werkzeuge .plan-wz.active { background: var(--white); box-shadow: 0 1px 4px rgba(53,80,111,.14); }
.plan-werkzeuge .plan-wz--neu { background: var(--primary); color: var(--white); }
.plan-werkzeuge .plan-wz--neu:hover { background: var(--primary-dark); color: var(--white); }
.plan-werkzeuge .plan-wz.plan-kopie-bereit { background: var(--primary); color: var(--white); }
/* Schloss (Tarif) in der Kapsel: nur das Zeichen, klein oben rechts – der Tarifname steht im title */
.plan-wz { position: relative; }
.plan-wz > .tarif-schloss { position: absolute; top: -3px; right: -3px; margin: 0; padding: 2px; border-radius: 50%; font-size: 0; gap: 0; box-shadow: 0 0 0 2px var(--primary-pale); }
.plan-wz > .tarif-schloss > svg { width: 9px; height: 9px; }



/* „Automatisch planen“: Text ab mittlerer Breite (vorher erst ab 1560 px) */
.plan-toolbar-actions .plan-auto-lbl { display: none; white-space: nowrap; }
@container plan-leiste (min-width: 1100px) {
  .plan-toolbar-actions .plan-auto-btn { width: auto; padding: 0 14px; gap: 7px; }
  .plan-toolbar-actions .plan-auto-lbl { display: inline; }
}
/* Schmal (Handy): Zeile 1 Kosten, Veröffentlichen – Zeile 2 Werkzeuge und Automatisch planen */
@container plan-leiste (max-width: 720px) {
  .plan-toolbar-actions { justify-content: flex-start; column-gap: 6px; }
  .plan-toolbar-actions .plan-kosten { order: 1; }
  .plan-toolbar-actions #plan-publish-btn { order: 2; margin-left: auto; }
  .plan-toolbar-actions .plan-werkzeuge { order: 3; }
  .plan-toolbar-actions .plan-auto-btn { order: 4; margin-left: auto; }
  .plan-toolbar-actions .plan-kosten-sym { display: none; }
}

/* Nach dem Veröffentlichen: PDF und WhatsApp (planFertigFenster) */
.app-confirm-box.plan-fertig-box { max-width: 420px; width: min(420px, calc(92vw / var(--ui-zoom))); }
.plan-fertig-haken { width: 44px; height: 44px; margin-bottom: 12px; border-radius: 50%; background: rgba(39,174,96,.13); display: grid; place-items: center; }
.plan-fertig-haken svg { width: 22px; height: 22px; stroke: var(--success); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.plan-fertig-text { margin-bottom: 18px; font-size: 14px; line-height: 1.45; color: var(--text-muted); }
.plan-fertig-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.plan-fertig-knopf { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--primary-dark); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .14s, background .14s; }
.plan-fertig-knopf:hover { border-color: var(--primary); background: var(--primary-pale); }
.plan-fertig-knopf:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.plan-fertig-knopf svg { width: 24px; height: 24px; stroke: var(--primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Einstellungen › Reservierungen auf deiner Website (js/website-reservierungen.js, 14.10.2026) ── */
.wres-text { margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: var(--text); }
.wres-text:last-child { margin-bottom: 0; }
.wres-klein { font-size: 13px; color: var(--text); margin-top: 12px; } /* --text-muted hat auf Weiß nur ~4:1 */
.wres-mail { display: inline-block; text-decoration: none; }
.wres-form .form-row-2 { margin-bottom: 16px; }
.wres-form .form-row-2 > div { min-width: 0; }
.wres-form .form-row-2 label { margin-bottom: 6px; }
.eins-inline-form .form-row input[type="color"] { padding: 4px; height: 46px; cursor: pointer; }
.wres-wahl { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.wres-wahl legend { padding: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--text-muted); margin-bottom: 6px; }
.eins-inline-form .wres-wahl label { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 400; text-transform: none; letter-spacing: 0; min-height: 40px; margin: 0; color: var(--text); cursor: pointer; }
.eins-inline-form .wres-wahl input[type="radio"] { width: 18px; height: 18px; padding: 0; margin: 0; accent-color: var(--primary); flex: none; }
.wres-link .eins-chip-wert-text { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 420px) { .wres-form .form-row-2 { grid-template-columns: 1fr; } }

/* ─── Rechts nach links (Arabisch, 15.10.2026 admin-sprachen-uebersetzt): Telefon, E-Mail, Zahlen, Datum und Uhrzeit
   bleiben links nach rechts (sonst wird „+49…“ zu „…49+“). Greift nur mit dir="rtl" – Deutsch unverändert. ─── */
[dir="rtl"] input[type="tel"], [dir="rtl"] input[type="email"], [dir="rtl"] input[type="number"], [dir="rtl"] input[type="url"],
[dir="rtl"] input[type="date"], [dir="rtl"] input[type="time"], [dir="rtl"] input[type="datetime-local"] {
  direction: ltr;
  text-align: right;
}

/* ─── Schichtwerk Handwerk (Branchen-Schalter, 16.10.2026, js/branche.js) ───
   Greift nur bei <html data-branche="handwerk"> — Gastro hat das Attribut nie und bleibt unverändert.
   Dunkelmodus bleibt wie bisher (dort ist --primary ohnehin neutral). */
html[data-branche="handwerk"]:not(.dark) {
  /* Werte kommen aus BRANCHEN_LISTE (js/branche.js, marke.farben) als --branche-*; Farbe nur dort tauschen */
  --primary:       var(--branche-primary);
  --primary-dark:  var(--branche-tief);
  --primary-light: var(--branche-hell);
  --primary-pale:  var(--branche-blass);
}

/* Handwerk: keine Reservierungen (Einstellungen-Karte, Kalender-Typ), eigene Bereichs-Vorschläge im Onboarding */
html[data-branche="handwerk"] .eins-cat-card[data-cat="reservierungen"],
html[data-branche="handwerk"] .kal-type-chip[data-type="reservierung"],
html[data-branche="handwerk"] #ob-areas-suggestions,
html:not([data-branche="handwerk"]) #ob-areas-suggestions-hw { display: none !important; }

/* Onboarding Schritt 1: Auswahl der Branche (wie die Bereichs-Vorschläge) */
.ob-branche-wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-branche-chip {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.ob-branche-chip:hover { border-color: var(--primary); color: var(--primary); }
.ob-branche-chip.active { background: var(--primary); border-color: var(--primary); color: white; }

/* Handwerk: dunkle Flächen in Anthrazit statt Blau (Karte „Erste Schritte“, Willkommen im Onboarding, Website-Karte) */
html[data-branche="handwerk"] .dash-first { background: linear-gradient(135deg, #1f2226 0%, #2a2d31 55%, #3a3f45 100%); }
html[data-branche="handwerk"] #ob-welcome { background: linear-gradient(135deg, #1a1c1f 0%, #2a2d31 45%, #3a3f45 75%, var(--branche-nacht-dunkel) 100%); }
html[data-branche="handwerk"] .web-live { background: linear-gradient(135deg, #2a2d31 0%, var(--branche-tief) 100%); }

/* Ladebildschirm je Branche (18.10.2026): Farbe aus BRANCHEN_LISTE (--branche-splash), Logo und Name setzt das
   kleine Skript am Ladebildschirm in index.html (gemerkte Branche vom letzten Start). Gastro unverändert. */
html[data-branche="handwerk"] #screen-splash { background: var(--branche-splash); }
.eins-stempeluhr { flex: 1; min-width: 0; cursor: default; }   /* Handwerk: Schalter Stempeluhr (js/einstellungen.js) */
/* Handwerk (18.10.2026): Anmelde-Seiten wie Willkommen im Onboarding (Anthrazit mit Ton der Branchenfarbe) statt Gastro-Blau;
   die gemerkte Branche liegt schon vor dem Anmelden an (index.html). Kürzel-Kacheln ohne den blauen Verlauf. */
html[data-branche="handwerk"] #screen-login,
html[data-branche="handwerk"] #screen-legal,
html[data-branche="handwerk"] #screen-verify,
html[data-branche="handwerk"] #screen-reset-pw { background: linear-gradient(135deg, #1a1c1f 0%, #2a2d31 45%, #3a3f45 75%, var(--branche-nacht-dunkel) 100%); }
html[data-branche="handwerk"]:not(.dark) .team-add-card-icon,
html[data-branche="handwerk"]:not(.dark) .team-card-avatar,
html[data-branche="handwerk"]:not(.dark) .team-drawer-avatar,
html[data-branche="handwerk"]:not(.dark) .costs-worker-avatar { background: var(--primary-pale); }
/* Handwerk Anthrazit (18.10.2026): kleiner Orange-Akzent nur für „heute“ in Planung und Kalender (Orange als Fläche mit
   weißer Schrift nur in --branche-akzent-text, 5,21:1); Gastro und Dunkelmodus unverändert */
html[data-branche="handwerk"]:not(.dark) .plan-day-header.today .day-date,
html[data-branche="handwerk"]:not(.dark) .kal-timeline-day-head.today .day-date,
html[data-branche="handwerk"]:not(.dark) .kal-month-cell.today .kal-cell-day-num { background: var(--branche-akzent-text); color: #fff; }
html[data-branche="handwerk"]:not(.dark) .kal-month-cell.today { border-color: var(--branche-akzent); }
