/* ============================================================
   Team Wachsbleiche – Design System
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --clr-bg:            #F2F2F7;
  --clr-surface:       #FFFFFF;
  --clr-surface-2:     #F2F2F7;
  --clr-primary:       #1A1A1E;
  --clr-primary-hover: #2A2A2E;
  --clr-accent:        #D4AF37;
  --clr-accent-light:  #F0E090;
  --clr-accent-dark:   #B09020;
  --clr-text:          #1A1A1E;
  --clr-text-muted:    #6B7280;
  --clr-text-light:    #9CA3AF;
  --clr-border:        rgba(60,60,67,0.12);
  --clr-section-label: #6B7280;
  --clr-sidebar-bg:    #111112;
  --clr-sidebar-text:  #8B9EAF;
  --clr-sidebar-active:#D4AF37;
  --clr-gruen:         #22C55E;
  --clr-gruen-bg:      #DCFCE7;
  --clr-gelb:          #EAB308;
  --clr-gelb-bg:       #FEF9C3;
  --clr-rot:           #EF4444;
  --clr-rot-bg:        #FEE2E2;

  --sp-xs:   4px;
  --sp-sm:   8px;
  --sp-md:   16px;
  --sp-lg:   24px;
  --sp-xl:   32px;
  --sp-2xl:  48px;

  --radius-sm:   10px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-full: 9999px;

  --shadow-sm:         0 1px 3px rgba(0,0,0,0.07);
  --shadow-card:       0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.13), 0 2px 6px rgba(0,0,0,0.07);
  --shadow-modal:      0 24px 64px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-top:        0 -2px 12px rgba(0,0,0,0.25);
  --shadow-accent:     0 4px 16px rgba(212,175,55,0.28);

  --bg-main:           #050505;
  --bg-card:           #0B0B0B;
  --bg-soft:           #111111;
  --gold:              #D4AF37;
  --gold-soft:         rgba(212,175,55,0.1);
  --danger:            #FF3B30;
  --danger-soft:       rgba(255,59,48,0.1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --sidebar-w: 230px;
  --bottom-nav-h: 68px;
  --top-bar-h: 60px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

/* Fokus-Ring global unterdrücken – aktive Zustände übernehmen visuelles Feedback */
*:focus        { outline: none; }
*:focus-visible { outline: none; }

body {
  font-family: var(--font-sans);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.5;
  letter-spacing: -0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior: none;
  position: relative;
  width: 100%;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }
.hidden { display: none !important; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted   { color: var(--clr-text-muted); }
.text-accent  { color: var(--clr-accent); }
.text-gruen   { color: var(--clr-gruen); }
.text-gelb    { color: var(--clr-gelb); }
.text-rot     { color: var(--clr-rot); }
.text-sm      { font-size: 0.8125rem; }
.text-xs      { font-size: 0.75rem; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--clr-sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  padding: var(--sp-lg) 0 var(--sp-md);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0 var(--sp-md) var(--sp-xl);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.nav-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--sp-sm);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px var(--sp-md);
  border-radius: var(--radius-sm);
  color: var(--clr-sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  position: relative;
}
.nav-link:hover {
  background: rgba(255,255,255,0.10);
  color: #FFFFFF;
  transform: translateX(3px);
}
.nav-link.active {
  background: rgba(212,175,55,0.18);
  color: var(--clr-sidebar-active);
  font-weight: 600;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--clr-accent);
  border-radius: 3px 0 0 3px;
}
.nav-link svg { flex-shrink: 0; opacity: 0.65; transition: opacity var(--transition); }
.nav-link:hover svg { opacity: 0.9; }
.nav-link.active svg { opacity: 1; }

.sidebar-footer {
  display: flex;
  align-items: center;
  padding: var(--sp-md);
  border-top: 1px solid rgba(255,255,255,0.10);
  margin-top: var(--sp-md);
  gap: var(--sp-sm);
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
  margin: var(--sp-sm);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex: 1;
  min-width: 0;
}
.sidebar-user-info { min-width: 0; }
.sidebar-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-rolle {
  font-size: 0.70rem;
  color: var(--clr-sidebar-text);
}

.btn-logout {
  color: var(--clr-sidebar-text);
  padding: var(--sp-xs);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.btn-logout:hover { color: var(--clr-rot); background: rgba(239,68,68,0.1); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  padding-top: var(--top-bar-h);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
  height: var(--top-bar-h);
  background: rgba(242,242,247,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-xl);
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  z-index: 100;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.kw-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-text-muted);
  transition: background var(--transition), color var(--transition);
}
.kw-btn:hover { background: var(--clr-surface-2); color: var(--clr-text); }

.kw-display { text-align: center; min-width: 110px; }
.kw-label { font-weight: 700; font-size: 1rem; display: block; letter-spacing: -0.03em; }
.kw-dates { font-size: 0.70rem; color: var(--clr-text-muted); display: block; }

.kw-today-btn {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  background: var(--clr-surface);
  transition: border-color var(--transition), color var(--transition);
}
.kw-today-btn:hover { border-color: var(--clr-accent); color: var(--clr-accent); }

.topbar-greeting {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text-muted);
}

/* ============================================================
   VIEW CONTAINER
   ============================================================ */
.view-container {
  flex: 1;
  padding: var(--sp-xl);
  max-width: 1400px;
  min-width: 0;
  overflow-x: hidden;
}

/* ============================================================
   BOTTOM NAV (Mobile) – iOS Glassmorphismus
   ============================================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: rgba(245,244,241,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,0.07);
  z-index: 100;
  box-shadow: none;
  touch-action: none;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Pill deaktiviert – Active-State nur via Farbe + Icon-Scale */
.bottom-nav-pill { display: none; }

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  color: rgba(26, 26, 30, 0.38);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 6px 10px;
  position: relative;
  z-index: 1;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item.active {
  color: #D4AF37;
  font-weight: 600;
}
/* Live-Hover während Swipe */
.bottom-nav-item.is-swipe-hover {
  color: var(--clr-accent);
}
.bottom-nav-item svg {
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.2s ease;
}
.bottom-nav-item.active svg {
  transform: scale(1.18) translateY(-1px);
  opacity: 1;
}
.bottom-nav-item.is-swipe-hover svg {
  transform: scale(1.08) translateY(-1px);
}
.bottom-nav-item:active svg {
  transform: scale(0.88);
  transition: transform 0.1s ease;
}

/* Mehr-Button: Button-Reset damit es wie ein Nav-Item aussieht */
#btn-mehr {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* ============================================================
   MEHR-SHEET (iOS-style Premium Bottom Sheet)
   ============================================================ */
.mehr-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.mehr-sheet-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.mehr-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  /* theme-aware frosted glass – passt sich Hell/Dunkel an */
  background: rgba(248, 247, 244, 0.96);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border-radius: 24px 24px 0 0;
  border-top: 0.5px solid rgba(0, 0, 0, 0.09);
  padding: 10px 16px 36px;
  z-index: 300;
  transform: translateY(110%);
  /* closing: schnell raus (beschleunigend) */
  transition: transform .24s cubic-bezier(0.32, 0, 0.67, 0);
  box-shadow: 0 -4px 48px rgba(0, 0, 0, 0.12);
}
.mehr-sheet.open {
  transform: translateY(0);
  /* opening: iOS-Spring-Einfeder */
  transition: transform .42s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Drag-Handle */
.mehr-sheet-handle {
  width: 36px; height: 4px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* Header: Titel + X-Button */
.mehr-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
.mehr-sheet-title {
  font-size: .68rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
  letter-spacing: .09em;
}
.mehr-sheet-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.50);
  transition: background .15s, color .15s;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.mehr-sheet-close:hover  { background: rgba(0,0,0,0.10); color: rgba(0,0,0,0.80); }
.mehr-sheet-close:active { transform: scale(.88); }

/* Item-Grid */
.mehr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mehr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 20px 12px 18px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  transition: background .12s ease, transform .1s ease;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.01em;
}
.mehr-item:hover  { background: rgba(0,0,0,0.07); }
.mehr-item:active { background: rgba(0,0,0,0.11); transform: scale(.96); }

/* Accent-Item (Schnellrechner) */
.mehr-item--accent {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.32);
  color: #D4AF37;
}
.mehr-item--accent:hover  { background: rgba(212,175,55,0.24); }
.mehr-item--accent:active { background: rgba(212,175,55,0.30); }

.mehr-item svg { flex-shrink: 0; opacity: 0.85; }
.mehr-item--accent svg { opacity: 1; }

/* Settings-Zeile (z.B. "Mein Stil") – full-width, horizontal */
.mehr-item--settings {
  grid-column: span 2;
  flex-direction: row;
  justify-content: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-top: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px;
  font-size: .875rem;
  font-weight: 500;
  color: rgba(0,0,0,0.55);
  margin-top: 4px;
}
.mehr-item--settings svg { opacity: 0.6; flex-shrink: 0; }
.mehr-item--settings .mehr-settings-chevron {
  margin-left: auto;
  opacity: 0.35;
}
.mehr-item--settings:hover  { color: rgba(0,0,0,0.80); }
.mehr-item--settings:hover svg { opacity: 0.8; }

/* iOS-style Toggle (Dashboard-Einstellungen) */
.dash-toggle {
  width: 48px; height: 28px;
  border-radius: 14px;
  background: var(--clr-border);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background .22s;
  flex-shrink: 0;
}
.dash-toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: left .22s;
}
.dash-toggle--on { background: var(--clr-accent); }
.dash-toggle--on::after { left: calc(100% - 25px); }

/* Dashboard Cols – single column wenn Highlights deaktiviert */
.dashboard-cols--single { grid-template-columns: 1fr !important; }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--clr-accent) 0%, var(--clr-accent-dark) 100%);
  color: #FFFFFF;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(212,175,55,0.25);
}
.avatar--sm  { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar--md  { width: 40px; height: 40px; font-size: 0.875rem; box-shadow: 0 2px 8px rgba(212,175,55,0.25); }
.avatar--lg  { width: 52px; height: 52px; font-size: 1.1rem;  box-shadow: 0 3px 12px rgba(212,175,55,0.3); }
.avatar--xl  { width: 64px; height: 64px; font-size: 1.3rem;  box-shadow: 0 4px 16px rgba(212,175,55,0.35); }

/* ── Dashboard Section Label ─────────────────────────────── */
.dashboard-section-label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-bottom: 10px;
  margin-top: 4px;
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

.card-kpi {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--clr-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
  border-color: rgba(212,175,55,0.2);
}

/* Accent-Variante (Einheiten – wichtigste Karte) */
.card-kpi--accent {
  background: linear-gradient(135deg, rgba(212,175,55,0.10) 0%, rgba(212,175,55,0.18) 100%);
  border-color: rgba(212,175,55,0.30);
  color: #1A1A1E;
  box-shadow: 0 4px 16px rgba(212,175,55,0.12), 0 1px 4px rgba(0,0,0,0.05);
}
.card-kpi--accent::before {
  background: linear-gradient(135deg, rgba(212,175,55,0.12) 0%, transparent 60%);
}
.card-kpi--accent .card-kpi__label { color: rgba(26,26,30,0.55); }
.card-kpi--accent .card-kpi__value { color: #D4AF37; font-size: clamp(0.78rem, 3.8vw, 2rem); }
.card-kpi--accent .card-kpi__unit  { color: rgba(180,145,30,0.80); }
.card-kpi--accent .card-kpi__sub   { color: rgba(26,26,30,0.50); }
.card-kpi--accent .card-kpi__accent-bar { background: var(--clr-accent); }
.card-kpi--accent:hover {
  box-shadow: 0 8px 24px rgba(212,175,55,0.20), 0 2px 6px rgba(0,0,0,0.06);
  border-color: rgba(212,175,55,0.50);
  transform: translateY(-5px);
}

.card-kpi__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-section-label);
  margin-bottom: 10px;
  opacity: 1;
}
/* nowrap-Container für Wert + Einheit */
.card-kpi__value-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
  min-width: 0;
}
.card-kpi__value {
  font-size: clamp(0.85rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--clr-text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.card-kpi__unit {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.card-kpi__sub {
  font-size: 0.725rem;
  color: var(--clr-text-muted);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-kpi__ampel {
  position: absolute;
  top: var(--sp-md); right: var(--sp-md);
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.8);
}
.card-kpi__ampel--gruen { background: var(--clr-gruen); }
.card-kpi__ampel--gelb  { background: var(--clr-gelb); }
.card-kpi__ampel--rot   { background: var(--clr-rot); }
.card-kpi__accent-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent) 0%, #e8c96a 50%, var(--clr-accent-light) 100%);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  opacity: 0.9;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-sm);
  margin-top: var(--sp-lg);
  padding-bottom: 0;
  border-bottom: none;
}
.section-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-section-label);
}
.section-sub {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  margin-top: 2px;
  font-weight: 500;
}

/* ============================================================
   APPOINTMENT CARDS
   ============================================================ */
.appointment-list { display: flex; flex-direction: column; gap: var(--sp-sm); }

.appointment-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-md) var(--sp-lg);
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 0 var(--sp-md);
  align-items: center;
  transition: box-shadow var(--transition), border-color var(--transition);
  cursor: default;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}
.appointment-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  filter: brightness(0.97);
}
.ac-swipe-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center;
  font-weight: 600; font-size: .85rem;
  color: #fff; pointer-events: none;
  opacity: 0; transition: opacity .12s;
}
.ac-swipe-overlay--delete { background: #EF4444; padding-left: 20px; }
.ac-swipe-overlay--edit   { background: #3B82F6; padding-right: 20px; justify-content: flex-end; }
.ac-swipe-overlay--visible { opacity: 1; }

.appointment-card__bar {
  height: 100%;
  min-height: 40px;
  border-radius: 2px;
  background: var(--clr-accent);
  align-self: stretch;
  position: relative; z-index: 2;
}
.appointment-card__body { position: relative; z-index: 2; }
.appointment-card__actions { position: relative; z-index: 2; }
.appointment-card__bar--ffg      { background: var(--clr-accent); }
.appointment-card__bar--erst     { background: #4A7C59; }
.appointment-card__bar--nach     { background: #4A4A55; }
.appointment-card__bar--service  { background: #7B6B8D; }
.appointment-card__bar--karriere { background: #C47B5A; }
.appointment-card__bar--kontakt  { background: #8D9DB0; }
.appointment-card__bar--sonst    { background: #9CA3AF; }
.appointment-card__bar--empf     { background: #D4AF37; }

.appointment-card__body { min-width: 0; }
.appointment-card__kunde {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.appointment-card__meta {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.appointment-card__meta span { display: flex; align-items: center; gap: 3px; }

.appointment-card__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

.status-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  border: none;
}
.status-badge--geplant      { background: rgba(99,102,241,0.10);  color: #4338CA; }
.status-badge--erledigt     { background: rgba(34,197,94,0.12);   color: #15803D; }
.status-badge--durchgefuhrt { background: rgba(34,197,94,0.12);   color: #15803D; }
.status-badge--verschoben   { background: rgba(234,179,8,0.12);   color: #92400E; }
.status-badge--abgesagt     { background: rgba(239,68,68,0.10);   color: #B91C1C; }

.btn-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-text-muted);
  transition: background var(--transition), color var(--transition);
}
.btn-icon:hover { background: var(--clr-surface-2); color: var(--clr-text); }
.btn-icon--danger:hover { background: var(--clr-rot-bg); color: var(--clr-rot); }

/* Abgesagt: gedämpft */
.appointment-card.is-abgesagt { opacity: 0.45; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn:active  { transform: scale(0.97); }

.btn--primary {
  background: var(--clr-primary);
  color: #FFFFFF;
  border-color: var(--clr-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
}
.btn--primary:hover {
  background: var(--clr-primary-hover);
  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}

.btn--accent {
  background: linear-gradient(135deg, var(--clr-accent) 0%, var(--clr-accent-dark) 100%);
  color: #FFFFFF;
  border-color: var(--clr-accent-dark);
  box-shadow: 0 2px 8px rgba(212,175,55,0.35), 0 1px 2px rgba(212,175,55,0.2);
  font-weight: 700;
}
.btn--accent:hover {
  background: linear-gradient(135deg, #d4b055 0%, var(--clr-accent) 100%);
  box-shadow: 0 6px 20px rgba(212,175,55,0.45), 0 2px 6px rgba(212,175,55,0.2);
  transform: translateY(-1px);
}
.btn--accent:active { transform: scale(0.97); }

.btn--outline {
  background: transparent;
  color: var(--clr-text);
  border-color: var(--clr-border);
}
.btn--outline:hover {
  background: var(--clr-surface-2);
  border-color: rgba(212,175,55,0.4);
  color: var(--clr-accent-dark);
}

.btn--danger {
  background: var(--clr-rot-bg);
  color: var(--clr-rot);
  border-color: #FCA5A5;
}
.btn--danger:hover {
  background: var(--clr-rot);
  color: #FFF;
  border-color: var(--clr-rot);
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.btn--sm { padding: 6px 14px; font-size: 0.8125rem; }

/* ============================================================
   TEAM COCKPIT CARDS
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-md);
}

.partner-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  border-left-width: 4px;
  position: relative;
  overflow: hidden;
}
.partner-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.8) 50%, transparent 100%);
  pointer-events: none;
}
.partner-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.partner-card--gruen { border-left-color: var(--clr-gruen); }
.partner-card--gelb  { border-left-color: var(--clr-gelb); }
.partner-card--rot   { border-left-color: var(--clr-rot); }

.partner-card__header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}
.partner-card__name { font-weight: 700; font-size: 1rem; }
.partner-card__rolle { font-size: 0.75rem; color: var(--clr-text-muted); }

.partner-card__kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-sm);
  text-align: center;
  margin-bottom: var(--sp-md);
}
.partner-card__kpi-value { font-size: 1.5rem; font-weight: 700; }
.partner-card__kpi-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--clr-text-muted); }

.partner-card__progress {
  height: 6px;
  background: var(--clr-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--sp-sm);
}
.partner-card__progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  background: var(--clr-accent);
}
.partner-card__progress-bar--gruen { background: var(--clr-gruen); }
.partner-card__progress-bar--gelb  { background: var(--clr-gelb); }
.partner-card__progress-bar--rot   { background: var(--clr-rot); }

.ampel-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.ampel-badge--gruen { background: var(--clr-gruen-bg); color: #15803D; border-color: #86EFAC; }
.ampel-badge--gelb  { background: var(--clr-gelb-bg);  color: #A16207; border-color: #FCD34D; }
.ampel-badge--rot   { background: var(--clr-rot-bg);   color: #B91C1C; border-color: #FCA5A5; }

/* ============================================================
   MONAT / CHARTS
   ============================================================ */
.chart-wrap {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* Monat-Tabelle */
.monat-table {
  width: 100%;
  border-collapse: collapse;
}
.monat-table th, .monat-table td {
  padding: var(--sp-sm) var(--sp-md);
  text-align: left;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--clr-border);
}
.monat-table th {
  font-weight: 600;
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-text-muted);
  background: var(--clr-bg);
}
.monat-table tr:last-child td { border-bottom: none; font-weight: 700; }

/* ============================================================
   HIGHLIGHTS
   ============================================================ */
.highlights-list { display: flex; flex-direction: column; gap: var(--sp-sm); }
.highlight-card {
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  transition: all var(--transition);
  box-shadow: 0 1px 4px rgba(212,175,55,0.08);
}
.highlight-card:hover {
  background: rgba(212,175,55,0.09);
  border-color: rgba(212,175,55,0.35);
  box-shadow: 0 4px 12px rgba(212,175,55,0.12);
  transform: translateY(-1px);
}
.highlight-card__dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: var(--clr-accent);
  margin-top: 6px;
  flex-shrink: 0;
}
.highlight-card__thema { font-weight: 600; font-size: 0.875rem; }
.highlight-card__meta  { font-size: 0.75rem; color: var(--clr-text-muted); }

/* ============================================================
   AKTIVITÄTEN
   ============================================================ */
.aktivitaet-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}
.aktivitaet-chip {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 7px var(--sp-md);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.aktivitaet-chip:hover {
  border-color: rgba(212,175,55,0.4);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
  background: rgba(212,175,55,0.04);
}
.aktivitaet-chip__count { font-weight: 700; color: var(--clr-accent); }
.aktivitaet-chip__add { color: var(--clr-accent); font-weight: 700; font-size: 1rem; }
.aktivitaet-chip--readonly { cursor: default; pointer-events: none; }
.aktivitaet-chip--readonly .aktivitaet-chip__add { display: none; }
.aktivitaet-chip--auto { cursor: default; pointer-events: none; }
.aktivitaet-chip__auto-badge { font-size: 10px; color: var(--text-muted); font-style: italic; margin-left: 4px; }

/* ============================================================
   PARTNER-VERWALTUNG TABLE
   ============================================================ */
.partner-list { display: flex; flex-direction: column; gap: var(--sp-sm); }
.partner-row {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  transition: box-shadow var(--transition);
}
.partner-row:hover { box-shadow: var(--shadow-card); }
.partner-row__info { flex: 1; min-width: 0; }
.partner-row__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partner-row__meta { font-size: 0.75rem; color: var(--clr-text-muted); }
.partner-row__actions { display: flex; gap: var(--sp-sm); flex-shrink: 0; }
.partner-row.is-inaktiv { opacity: 0.5; }

/* Inaktiv-Toggle */
.toggle {
  position: relative;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--clr-border);
  border-radius: 11px;
  transition: background var(--transition);
  cursor: pointer;
}
.toggle-track::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: #FFF;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-track { background: var(--clr-gruen); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }

/* ============================================================
   FORMS
   ============================================================ */
.form { display: flex; flex-direction: column; gap: var(--sp-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--clr-text);
}
.form-input,
.form-select,
.form-textarea {
  padding: 10px var(--sp-md);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  background: var(--clr-surface);
  color: var(--clr-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-sm);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--clr-border);
  margin-top: var(--sp-sm);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease-out;
}
.modal {
  position: relative;
  z-index: 1;
  background: var(--clr-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg) var(--sp-xl) var(--sp-md);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  background: var(--clr-surface);
  z-index: 1;
}
.modal-title { font-size: 1.0625rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-text-muted);
  transition: background var(--transition);
}
.modal-close:hover { background: var(--clr-surface-2); }
.modal-body { padding: var(--sp-xl); }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  position: fixed;
  inset: 0;
  background: var(--clr-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: var(--sp-md);
  overflow-y: auto;
}
.login-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  padding: var(--sp-2xl);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--clr-border);
}
.login-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}
.login-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.login-sub { font-size: 0.8125rem; color: var(--clr-text-muted); }

.login-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-md);
}

.berater-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: var(--sp-sm);
}
.berater-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-sm);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.berater-chip:hover { background: var(--clr-bg); border-color: var(--clr-accent-light); }
.berater-chip__name { font-size: 0.65rem; font-weight: 600; text-align: center; line-height: 1.2; }

.skeleton-avatar {
  width: 90px; height: 80px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--clr-border) 25%, var(--clr-bg) 50%, var(--clr-border) 75%);
  background-size: 200%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

.login-user-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}
.login-username { font-weight: 700; font-size: 1.1rem; }

.pin-display {
  display: flex;
  justify-content: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}
.pin-dot {
  width: 14px; height: 14px;
  border-radius: var(--radius-full);
  border: 2px solid var(--clr-border);
  background: transparent;
  transition: background var(--transition), border-color var(--transition);
}
.pin-dot.filled { background: var(--clr-primary); border-color: var(--clr-primary); }

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-sm);
}
.pin-btn {
  height: 52px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--clr-bg);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  transition: background var(--transition), transform var(--transition);
}
.pin-btn:hover { background: var(--clr-accent-light); }
.pin-btn:active { transform: scale(0.95); }
.pin-btn--clear { font-size: 0.9rem; color: var(--clr-text-muted); }
.pin-btn--back  { font-size: 0.7rem; color: var(--clr-text-muted); }

.login-error {
  text-align: center;
  color: var(--clr-rot);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--sp-md);
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--sp-lg));
  left: 50%;
  transform: translateX(-50%);
  background: var(--clr-primary);
  color: #FFFFFF;
  padding: 10px var(--sp-xl);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
  animation: toastIn 0.25s ease;
  white-space: nowrap;
}
.toast--success { background: var(--clr-gruen); }
.toast--error   { background: var(--clr-rot); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ============================================================
   HOME DASHBOARD SPECIFIC
   ============================================================ */

/* Hero-Karte */
.dashboard-hero {
  background: linear-gradient(135deg, #FFFCF0 0%, #FDF8E3 100%);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-xl);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(212,175,55,0.12), 0 1px 4px rgba(0,0,0,0.06);
}
/* Gold-Linie oben */
.dashboard-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--clr-accent) 35%, #e8c96a 65%, transparent 100%);
  pointer-events: none;
}
/* Dezente Leucht-Kugel oben rechts */
.dashboard-hero::after {
  content: '';
  position: absolute;
  top: -70px; right: -70px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.09) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-hero__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-md);
  position: relative; z-index: 1;
}

.dashboard-hero__settings {
  background: rgba(0,0,0,0.07);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 9px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(26,26,30,0.60);
  transition: background .15s;
  flex-shrink: 0;
}
.dashboard-hero__settings:active { background: rgba(0,0,0,0.13); }
.dashboard-hero__greeting {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1A1A1E;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.dashboard-hero__date {
  font-size: 0.8125rem;
  color: rgba(26,26,30,0.52);
  margin-top: 4px;
}
.dashboard-hero__bar {
  height: 3px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative; z-index: 1;
}
.dashboard-hero__bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
  min-width: 0;
}

.dashboard-cols {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-xl);
}

.meeting-banner {
  background: linear-gradient(135deg, rgba(212,175,55,0.10) 0%, rgba(212,175,55,0.18) 65%, rgba(212,175,55,0.10) 100%);
  color: #1A1A1E;
  border-radius: var(--radius-md);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,0.30);
  box-shadow: 0 2px 12px rgba(212,175,55,0.12);
}
.meeting-banner::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--clr-accent);
  border-radius: 0 2px 2px 0;
}
.meeting-banner__icon { font-size: 1.4rem; flex-shrink: 0; }
.meeting-banner__title { font-weight: 700; font-size: 0.9375rem; }
.meeting-banner__sub   { font-size: 0.8125rem; color: rgba(26,26,30,0.55); margin-top: 2px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: var(--sp-2xl);
  color: var(--clr-text-muted);
}
.empty-state__icon { font-size: 3rem; margin-bottom: var(--sp-md); }
.empty-state__text { font-size: 0.9375rem; }

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--clr-border) 25%, var(--clr-bg) 50%, var(--clr-border) 75%);
  background-size: 200%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card { height: 120px; border-radius: var(--radius-md); }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line--short { width: 60%; }

/* ============================================================
   MEINE WOCHE – 2-Spalten-Layout (Desktop: 1fr + 300px)
   ============================================================ */
.meine-woche-cols {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

/* ============================================================
   STAGGERED CARD ENTRANCE ANIMATIONS
   ============================================================ */
.card-kpi {
  animation: fadeInUp 0.4s ease-out both;
}
.card-kpi:nth-child(1) { animation-delay: 0.00s; }
.card-kpi:nth-child(2) { animation-delay: 0.06s; }
.card-kpi:nth-child(3) { animation-delay: 0.12s; }
.card-kpi:nth-child(4) { animation-delay: 0.18s; }
.card-kpi:nth-child(n+5) { animation-delay: 0.24s; }

.appointment-card {
  animation: fadeInUp 0.35s ease-out both;
}
.appointment-card:nth-child(1) { animation-delay: 0.05s; }
.appointment-card:nth-child(2) { animation-delay: 0.10s; }
.appointment-card:nth-child(3) { animation-delay: 0.15s; }
.appointment-card:nth-child(4) { animation-delay: 0.20s; }
.appointment-card:nth-child(n+5) { animation-delay: 0.25s; }

.partner-card {
  animation: fadeInUp 0.4s ease-out both;
}
.partner-card:nth-child(1) { animation-delay: 0.04s; }
.partner-card:nth-child(2) { animation-delay: 0.10s; }
.partner-card:nth-child(3) { animation-delay: 0.16s; }
.partner-card:nth-child(n+4) { animation-delay: 0.22s; }

/* ============================================================
   RESPONSIVE: MOBILE  ≤ 900px
   ============================================================ */
@media (max-width: 900px) {
  /* Layout */
  .sidebar { display: none; }
  .main-content {
    margin-left: 0;
    padding-top: var(--top-bar-h);
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + var(--sp-md));
  }

  /* Top-Bar: fixed statt sticky (sticky bricht unter overflow-x:hidden auf iOS) */
  .top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  /* Bottom-Nav: floating pill – safe area per bottom-offset, nicht per padding */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    min-height: var(--bottom-nav-h);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 100;
  }
  .view-container { padding: var(--sp-md); }

  /* Dashboard */
  .dashboard-hero { padding: var(--sp-lg); }
  .dashboard-hero__greeting { font-size: 1.5rem; }
  .dashboard-hero__num { font-size: 2rem; }
  .dashboard-cols { grid-template-columns: 1fr; }

  /* Formulare */
  .form-row, .form-row--3 { grid-template-columns: 1fr; }

  /* Modal */
  .modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85vh;
  }

  /* KPI-Grid – 2 Spalten, kein overflow */
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-kpi { padding: 14px; }
  .card-kpi__value-row { min-width: 0; }
  .card-kpi__sub { font-size: 0.68rem; white-space: normal; }

  /* Toast – safe-area + floating-nav offset */
  .toast { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + var(--sp-sm)); }

  /* Mehr-Sheet: oberhalb der Bottom-Nav enden, damit Nav sichtbar bleibt */
  .mehr-sheet-backdrop {
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  }
  .mehr-sheet {
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
    padding-bottom: 20px;
    /* geschlossen: weit genug nach unten schieben, sodass auch der obere Rand versteckt ist */
    transform: translateY(calc(100% + var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 40px));
  }

  /* Appointment-Card */
  .appointment-card {
    grid-template-columns: 4px 1fr auto;
    cursor: pointer;
    padding: 10px var(--sp-md);
  }
  .appointment-card__actions .status-badge { display: none; }

  /* Top-Bar */
  .top-bar { padding: 0 var(--sp-md); }

  /* Section-Header darf umbrechen */
  .section-header { flex-wrap: wrap; gap: var(--sp-sm); }

  /* Meine-Woche: Spalten stapeln */
  .meine-woche-cols { grid-template-columns: 1fr !important; }

  /* Team-Cockpit: 1 Spalte */
  .team-grid { grid-template-columns: 1fr; }

  /* Partner-Verwaltung Row */
  .partner-row { flex-wrap: wrap; gap: var(--sp-sm); }
  .partner-row__actions { width: 100%; justify-content: flex-end; }
}

@media (min-width: 901px) {
  .modal {
    align-self: center;
    border-radius: var(--radius-lg);
    max-height: 90vh;
  }
  .modal-overlay { align-items: center; }
  .toast { bottom: var(--sp-xl); }
}

/* ============================================================
   RESPONSIVE: SEHR KLEINE SCREENS ≤ 480px
   ============================================================ */
@media (max-width: 480px) {
  /* KPI-Grid – weniger Padding */
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-kpi { padding: 10px 12px; }
  .card-kpi__label { font-size: 0.6rem; }

  /* Top-Bar kompakter */
  .kw-display { min-width: 88px; }
  .topbar-greeting { display: none; }

  /* Login */
  .login-card { padding: var(--sp-xl) var(--sp-lg); }
}

/* ============================================================
   STABILITÄTSKARTE
   ============================================================ */
.stability-card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  padding: var(--sp-md) var(--sp-lg);
  margin-top: var(--sp-md);
  margin-bottom: var(--sp-md);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left-width: 4px;
  transition: box-shadow var(--transition);
}
.stability-card:hover { box-shadow: var(--shadow-card); }
.stability-card--gruen { border-left-color: var(--clr-gruen); }
.stability-card--gelb  { border-left-color: var(--clr-gelb); }
.stability-card--rot   { border-left-color: var(--clr-rot); }

/* Header-Zeile: Pill + Zähler */
.stability-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

/* Status-Pill */
.stability-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.stability-card__pill--gruen { background: var(--clr-gruen-bg); color: #15803D; }
.stability-card__pill--gelb  { background: var(--clr-gelb-bg);  color: #A16207; }
.stability-card__pill--rot   { background: var(--clr-rot-bg);   color: #B91C1C; }
.stability-card__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Zähler rechts */
.stability-card__counters {
  display: flex;
  gap: var(--sp-md);
  font-size: .75rem;
  color: var(--clr-text-muted);
  flex-shrink: 0;
}
.stability-card__counters .ok { color: var(--clr-gruen); font-weight: 600; }

/* Problemtext */
.stability-card__problem {
  font-size: .875rem;
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.35;
}

/* Handlungsempfehlung */
.stability-card__aktion {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--clr-accent-dark);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Klumpenwarnung */
.stability-card__warn {
  font-size: .75rem;
  color: var(--clr-gelb);
  font-weight: 500;
}

/* Legacy-Kompatibilität (wird in Monat-Karte direkt genutzt) */
.stability-card__body { flex: 1; }
.stability-card__label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--clr-text-muted);
  margin-bottom: 4px;
}
.stability-card__hinweis { font-weight: 600; font-size: .9375rem; margin-top: 2px; }
.stability-card__stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  font-size: .75rem;
  color: var(--clr-text-muted);
  flex-shrink: 0;
}

/* Fortschrittsbalken Monat */
.progress-bar-wrap {
  background: var(--clr-border);
  border-radius: var(--radius-full);
  height: 6px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--clr-accent);
  transition: width .4s ease;
}
.progress-bar-fill--gruen { background: var(--clr-gruen); }
.progress-bar-fill--rot   { background: var(--clr-rot); }

/* ============================================================
   PARTNER-CARD: DIAGNOSE + SCORE
   ============================================================ */
.partner-card__diagnose {
  border-top: 1px solid var(--clr-border);
  padding-top: 8px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.partner-card__diagnose-row {
  display: flex;
  gap: 6px;
  font-size: .75rem;
  color: var(--clr-text-muted);
  align-items: baseline;
  line-height: 1.3;
}
.partner-card__diagnose-row--aktion {
  color: var(--clr-accent);
  font-weight: 600;
}
.partner-card__diagnose-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--clr-text-muted);
  flex-shrink: 0;
  min-width: 44px;
  padding-top: 1px;
}
.score-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
}
.score-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--clr-border);
  overflow: hidden;
}
.score-bar__fill {
  height: 100%;
  border-radius: 2px;
  background: var(--clr-accent);
  transition: width .4s ease;
}
.score-bar__fill--gruen { background: var(--clr-gruen); }
.score-bar__fill--rot   { background: var(--clr-rot); }
.score-bar__label {
  font-size: .7rem;
  color: var(--clr-text-muted);
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
}

/* ============================================================
   DANGER ZONE (Admin-Reset)
   ============================================================ */
.danger-zone {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.danger-zone__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-border);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--clr-text-muted);
}
.danger-zone__block {
  padding: var(--sp-lg);
  border-bottom: 1px solid var(--clr-border);
}
.danger-zone__block:last-child { border-bottom: none; }
.danger-zone__block--soft { background: #FFFBEB; }
.danger-zone__block--hard { background: #FFF5F5; }

.danger-zone__title {
  font-weight: 700;
  font-size: .9375rem;
  margin-bottom: 6px;
}
.danger-zone__block--soft .danger-zone__title { color: #92400E; }
.danger-zone__block--hard .danger-zone__title { color: #991B1B; }

.danger-zone__desc {
  font-size: .8125rem;
  color: var(--clr-text-muted);
  line-height: 1.5;
  margin-bottom: var(--sp-md);
}

.danger-zone__btn--soft {
  background: #D97706;
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 3px rgba(217,119,6,0.25);
}
.danger-zone__btn--soft:hover {
  background: #B45309;
  box-shadow: 0 4px 12px rgba(217,119,6,0.35);
}

.danger-zone__btn--hard {
  background: var(--clr-rot);
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 3px rgba(239,68,68,0.25);
}
.danger-zone__btn--hard:hover {
  background: #DC2626;
  box-shadow: 0 4px 12px rgba(239,68,68,0.35);
}
.danger-zone__btn--hard:disabled {
  background: #FCA5A5;
  box-shadow: none;
  cursor: not-allowed;
}

/* Modal-Warnbox */
.danger-zone__modal-warn {
  display: flex;
  gap: var(--sp-md);
  align-items: flex-start;
  padding: var(--sp-md);
  border-radius: var(--radius-sm);
}
.danger-zone__modal-warn--soft {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  color: #92400E;
}
.danger-zone__modal-warn--hard {
  background: #FFF5F5;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}
.danger-zone__modal-warn svg { flex-shrink: 0; margin-top: 2px; }

/* ============================================================
   LOGOUT-BUTTON (nur Mobile – in Top-Bar)
   ============================================================ */
.btn-logout-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--clr-text-muted);
  flex-shrink: 0;
  transition: color var(--transition), background var(--transition);
}
.btn-logout-mobile:hover { color: var(--clr-rot); background: rgba(239,68,68,0.1); }

@media (max-width: 900px) {
  .btn-logout-mobile { display: flex; }
}

/* ============================================================
   VIEW TRANSITIONS
   ============================================================ */
.view-container {
  transition: opacity 0.15s ease, transform 0.18s ease;
}
.view-container.view--leaving {
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
}

/* ============================================================
   PULL-TO-REFRESH
   ============================================================ */
.ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  width: 38px;
  height: 38px;
  background: var(--clr-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 110;
  transition: transform 0.2s ease;
  border: 1px solid var(--clr-border);
}
.ptr-indicator.ptr--visible {
  transform: translateX(-50%) translateY(calc(var(--top-bar-h) + 12px));
}
.ptr-indicator svg {
  color: var(--clr-accent);
  transition: transform 0.3s ease;
}
.ptr-indicator.ptr--ready svg {
  transform: rotate(180deg);
}
@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}
.ptr-indicator.ptr--loading svg {
  animation: ptr-spin 0.7s linear infinite;
}

/* ============================================================
   MODAL GRAB-BAR (Swipe-to-Dismiss)
   ============================================================ */
.modal-grab {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  cursor: grab;
  touch-action: none;
}
.modal-grab:active { cursor: grabbing; }
.modal-grab__bar {
  width: 36px;
  height: 4px;
  background: var(--clr-border);
  border-radius: var(--radius-full);
}

/* ============================================================
   OFFLINE BANNER
   ============================================================ */
.offline-banner {
  position: fixed;
  top: calc(var(--top-bar-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0B0B0B;
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 150;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  animation: fadeInDown 0.3s ease;
  white-space: nowrap;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: #050505;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s;
}
.splash-screen.splash--hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  animation: splashIn .6s cubic-bezier(0.34,1.56,0.64,1) both;
}
.splash-title { color: #F8F7F4; font-size: 1.4rem; font-weight: 700; }
.splash-sub { color: #D4AF37; font-size: .85rem; letter-spacing: .08em; }
@keyframes splashIn {
  from { opacity: 0; transform: scale(0.8) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.btn-theme {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: transparent; border: none; cursor: pointer;
  color: var(--clr-sidebar-text);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.btn-theme:hover { color: var(--clr-accent); background: rgba(212,175,55,0.1); }
.btn-theme .icon-sun  { display: none; }
.btn-theme .icon-moon { display: block; }
html.dark .btn-theme .icon-sun  { display: block; }
html.dark .btn-theme .icon-moon { display: none; }

.btn-theme-mobile {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: transparent; border: none; cursor: pointer;
  color: var(--clr-text-muted);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.btn-theme-mobile:hover { color: var(--clr-accent); background: rgba(212,175,55,0.1); }
.btn-theme-mobile .icon-sun  { display: none; }
.btn-theme-mobile .icon-moon { display: block; }
html.dark .btn-theme-mobile .icon-sun  { display: block; }
html.dark .btn-theme-mobile .icon-moon { display: none; }
@media (max-width: 900px) { .btn-theme-mobile { display: flex; } }

/* ── SW Update-Bar ──────────────────────────────────────── */
.update-ready-bar {
  position: fixed; bottom: 70px; left: 0; right: 0; z-index: 491;
  background: var(--accent, #D4AF37); color: #000;
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem;
  transform: translateY(100%); opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}
.update-ready-bar--visible { transform: translateY(0); opacity: 1; }
.update-ready-bar__text { flex: 1; font-size: .85rem; font-weight: 600; }
.update-ready-bar__btn {
  background: #000; color: #fff; border: none; cursor: pointer;
  padding: .35rem .85rem; border-radius: 6px;
  font-size: .82rem; font-weight: 700;
}
.update-ready-bar__close {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; color: #000; padding: .2rem .4rem; opacity: .6;
}

/* ── Install-Banner ─────────────────────────────────────── */
.install-banner {
  position: fixed; bottom: 70px; left: 1rem; right: 1rem; z-index: 490;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  border: 1px solid rgba(180,144,60,0.3);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.install-banner--visible {
  opacity: 1; transform: translateY(0); pointer-events: all;
}
.install-banner__inner {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1rem;
}
.install-banner__icon { font-size: 1.5rem; flex-shrink: 0; }
.install-banner__text {
  flex: 1; display: flex; flex-direction: column; gap: .15rem;
}
.install-banner__text strong { font-size: .9rem; color: var(--text-primary); }
.install-banner__text span   { font-size: .78rem; color: var(--text-secondary); }
.install-banner__btn  { flex-shrink: 0; padding: .45rem .9rem; font-size: .82rem; }
.install-banner__close {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 1rem;
  padding: .25rem; flex-shrink: 0;
}
html.dark .install-banner { background: #0B0B0B; }

/* ── Update-Banner ─────────────────────────────────────── */
.update-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.update-overlay--visible {
  opacity: 1; pointer-events: all;
}
.update-sheet {
  width: 100%; max-height: 90vh; overflow-y: auto;
  background: #ffffff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 2rem 1.5rem 2.5rem;
  transform: translateY(40px);
  transition: transform .35s cubic-bezier(.22,.68,0,1.2);
}
.update-overlay--visible .update-sheet {
  transform: translateY(0);
}
.update-sheet__badge {
  display: inline-block;
  background: var(--accent);
  color: #fff; font-size: .75rem; font-weight: 700;
  padding: .25rem .75rem; border-radius: 999px;
  margin-bottom: 1rem;
}
.update-sheet__title {
  font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 1.25rem;
}
.update-sheet__list {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  display: flex; flex-direction: column; gap: .9rem;
}
.update-sheet__item {
  display: flex; gap: .9rem; align-items: flex-start;
}
.update-sheet__icon {
  font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem;
}
.update-sheet__item strong {
  display: block; font-size: .95rem;
  color: var(--text-primary); margin-bottom: .2rem;
}
.update-sheet__item p {
  font-size: .82rem; color: var(--text-secondary);
  margin: 0; line-height: 1.4;
}
.update-sheet__cta {
  width: 100%; padding: .9rem;
  font-size: 1rem; font-weight: 700;
}

/* ============================================================
   DARK MODE  (html.dark — manuell oder via System-Preference)
   ============================================================ */
/* Basis-Palette Dark: reines Schwarz-Gold-System, kein Blau */
html.dark {
  --clr-bg:            #050505;
  --clr-surface:       #0B0B0B;
  --clr-surface-2:     #111111;
  --clr-text:          #EAEAEA;
  --clr-text-muted:    #9CA3AF;
  --clr-text-light:    #6B7280;
  --clr-border:        rgba(255,255,255,0.05);
  --clr-section-label: #9CA3AF;
  --clr-sidebar-bg:    #030303;
  --clr-accent:        #D4AF37;
  --clr-accent-light:  rgba(212,175,55,0.12);
  --clr-accent-dark:   #B09020;
  --clr-sidebar-active:#D4AF37;
  --clr-rot:           #FF3B30;
  --clr-rot-bg:        rgba(255,59,48,0.1);
  --shadow-sm:         0 1px 3px rgba(0,0,0,.7), 0 1px 2px rgba(0,0,0,.5);
  --shadow-card:       0 4px 16px rgba(0,0,0,.6), 0 1px 3px rgba(0,0,0,.4);
  --shadow-modal:      0 24px 64px rgba(0,0,0,.85), 0 8px 20px rgba(0,0,0,.6);
  --shadow-accent:     0 4px 16px rgba(212,175,55,0.2);
}
html.dark body                    { background: #050505; }
html.dark .top-bar                { background: rgba(5,5,5,0.96); }

/* Sidebar */
html.dark .sidebar                { background: #030303; border-right: 1px solid rgba(255,255,255,0.05); }
html.dark .sidebar-name           { color: #EDEDED; }
html.dark .sidebar-rolle          { color: #9CA3AF; }
html.dark .nav-link               { color: #9CA3AF; }
html.dark .nav-link:hover         { color: #EDEDED; background: rgba(255,255,255,0.05); }
html.dark .nav-link.active        { color: #D4AF37; background: rgba(212,175,55,0.1); }
html.dark .sidebar-logo span      { color: #EDEDED; }

/* Top-Bar */
html.dark .top-bar                { background: rgba(5,5,5,0.96); border-bottom: 1px solid rgba(255,255,255,0.05); }
html.dark .kw-label               { color: #EDEDED; }
html.dark .kw-dates               { color: #9CA3AF; }
html.dark .kw-btn                 { color: #9CA3AF; }
html.dark .kw-btn:hover           { background: rgba(255,255,255,0.07); }
html.dark .kw-today-btn           { background: rgba(255,255,255,0.07); color: #EDEDED; border-color: transparent; }

/* Bottom-Nav – solide, kein Blur, klare Linie */
html.dark .bottom-nav             { background: #0B0B0B; backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 1px solid rgba(255,255,255,0.06); box-shadow: none; }
html.dark .bottom-nav-item        { color: rgba(255,255,255,0.35); }
html.dark .bottom-nav-item.active { color: #D4AF37; }
html.dark .bottom-nav-pill        { display: none; }
html.dark #btn-mehr               { color: #6B7280; }

/* Mehr-Sheet */
html.dark .mehr-sheet            { background: #0B0B0B; border-top: 1px solid rgba(255,255,255,0.06); box-shadow: 0 -8px 48px rgba(0,0,0,0.7); backdrop-filter: none; -webkit-backdrop-filter: none; }
html.dark .update-sheet          { background: #111111; }
html.dark .mehr-sheet-handle     { background: rgba(255,255,255,0.18); }
html.dark .mehr-sheet-title      { color: rgba(255,255,255,0.35); }
html.dark .mehr-sheet-close      { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
html.dark .mehr-sheet-close:hover { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.85); }
html.dark .mehr-item             { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.07); color: #EDEDED; }
html.dark .mehr-item:hover       { background: rgba(255,255,255,0.09); }
html.dark .mehr-item:active      { background: rgba(255,255,255,0.13); }
html.dark .mehr-item--settings   { color: rgba(255,255,255,0.55); border-top-color: rgba(255,255,255,0.06); }
html.dark .mehr-item--settings:hover { color: #EDEDED; }

/* Dashboard-Hero */
html.dark .dashboard-hero          { background: linear-gradient(135deg,#030303 0%,#0B0B0B 100%); box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
html.dark .dashboard-hero__greeting { color: #EDEDED; }
html.dark .dashboard-hero__date    { color: rgba(255,255,255,0.38); }
html.dark .dashboard-hero__settings { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }
html.dark .dashboard-hero__settings:active { background: rgba(255,255,255,0.18); }
html.dark .dashboard-hero__bar     { background: rgba(255,255,255,0.07); }

/* Meeting-Banner */
html.dark .meeting-banner          { background: linear-gradient(135deg,#12100a 0%,#2a2200 65%,#12100a 100%); color: #EDEDED; border-color: rgba(212,175,55,0.16); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
html.dark .meeting-banner__sub     { color: rgba(255,255,255,0.5); }

/* Cards */
html.dark .card                   { background: #0B0B0B; border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
html.dark .card-kpi               { background: #0B0B0B; border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 4px 12px rgba(0,0,0,0.45); opacity: .95; }
html.dark .card-kpi:hover         { box-shadow: 0 8px 20px rgba(0,0,0,0.4); opacity: 1; }
html.dark .card-kpi__label        { color: #9CA3AF; }
html.dark .card-kpi__value        { color: #EAEAEA; }
html.dark .card-kpi__sub          { color: #6B7280; }
html.dark .card-kpi--accent       { background: linear-gradient(135deg,#0B0900 0%,#141100 100%); border-color: rgba(212,175,55,0.22); color: #EAEAEA; box-shadow: 0 4px 14px rgba(0,0,0,0.5); opacity: 1; }
html.dark .card-kpi--accent .card-kpi__label { color: rgba(255,255,255,0.45); }
html.dark .card-kpi--accent .card-kpi__value { color: #D4AF37; }
html.dark .card-kpi--accent .card-kpi__unit  { color: rgba(212,175,55,0.65); }
html.dark .card-kpi--accent .card-kpi__sub   { color: rgba(255,255,255,0.40); }
html.dark .card-kpi--accent:hover            { box-shadow: 0 10px 28px rgba(0,0,0,0.55); border-color: rgba(212,175,55,0.38); }

/* Appointment Cards */
html.dark .appointment-card__kunde { color: #EDEDED; }
html.dark .appointment-card__meta  { color: #9CA3AF; }

/* Stability, Partner */
html.dark .stability-card         { background: #0B0B0B; border-color: rgba(255,255,255,0.05); }
html.dark .partner-card           { background: #0B0B0B; border-color: rgba(255,255,255,0.05); }
html.dark .partner-card__name     { color: #EDEDED; }
html.dark .partner-card__rolle    { color: #9CA3AF; }

/* Aktivitäten-Chip */
html.dark .aktivitaet-chip        { background: #111111; border-color: rgba(255,255,255,0.07); color: #EDEDED; }

/* Termin-Zentrale */
html.dark .tz-search       { background: #1C1C1E; border-color: rgba(255,255,255,0.1); color: #EDEDED; }
html.dark .tz-chip         { background: #1C1C1E; border-color: rgba(255,255,255,0.1); color: #98989E; }
html.dark .tz-chip--active { background: var(--clr-accent); color: #fff; border-color: var(--clr-accent); }
html.dark .tz-filter-select{ background: #1C1C1E; border-color: rgba(255,255,255,0.1); color: #EDEDED; }
html.dark .tz-date-header  { color: #636366; border-color: rgba(255,255,255,0.08); }
html.dark .tz-date-header--today { color: var(--clr-accent); border-color: var(--clr-accent); }

/* Formulare */
html.dark input,
html.dark select,
html.dark textarea                { background: #1A1A1A; color: #F5F5F7; border-color: rgba(255,255,255,0.12); }
html.dark .form-label             { color: #98989E; }

/* Buttons */
html.dark .btn--outline           { border-color: rgba(255,255,255,0.18); color: #F5F5F7; background: transparent; }
html.dark .btn--outline:hover     { background: rgba(255,255,255,0.07); }

/* Modal */
html.dark .modal                  { background: #111111; }
html.dark .modal-header           { border-bottom-color: rgba(255,255,255,0.08); }
html.dark .modal-title            { color: #F5F5F7; }
html.dark .modal-body             { color: #F5F5F7; }
html.dark .modal-close            { color: #98989E; }
html.dark .modal-grab__bar        { background: rgba(255,255,255,0.18); }

/* Login */
html.dark .login-screen           { background: #050505; }
html.dark .login-card             { background: #0B0B0B; border-color: rgba(255,255,255,0.07); box-shadow: 0 20px 60px rgba(0,0,0,.75); }
html.dark .login-brand            { color: #F5F5F7; }
html.dark .login-sub              { color: #98989E; }
html.dark .login-label            { color: #98989E; }
html.dark .pin-btn                { background: #1A1A1A; color: #F5F5F7; border-color: rgba(255,255,255,0.08); }
html.dark .pin-btn:hover          { background: #252525; }
html.dark .pin-dot                { border-color: #636366; }
html.dark .pin-dot.filled         { background: var(--clr-accent); border-color: var(--clr-accent); }

/* Section-Titles */
html.dark .section-title          { color: #F5F5F7; }
html.dark .section-sub            { color: #98989E; }

/* ============================================================
   TERMINSERIE TOGGLE (Event-Formular)
   ============================================================ */
.serie-toggle-row {
  padding: 14px 0 4px;
  border-top: 1px solid var(--clr-border);
  margin-top: 4px;
}
.serie-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: .9375rem;
  color: var(--clr-text);
  user-select: none;
}
.serie-toggle-label input[type=checkbox] {
  width: 17px; height: 17px;
  accent-color: var(--clr-accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================================
   NÄCHSTER TERMIN BANNER
   ============================================================ */
.next-termin-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 14px 16px 14px 20px;
  margin-bottom: var(--sp-xl);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.next-termin-banner:hover  { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.next-termin-banner:active { transform: scale(.99); }

.next-termin-banner__bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--nt-bar, var(--clr-accent));
  border-radius: 0;
}
.next-termin-banner__content { flex: 1; min-width: 0; }
.next-termin-banner__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.next-termin-banner__label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.next-termin-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--clr-gruen);
  display: inline-block;
  flex-shrink: 0;
  animation: nt-pulse 2.2s ease-in-out infinite;
}
@keyframes nt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.75); }
}
.nt-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(26,26,30,0.07);
  color: var(--clr-text-muted);
}
.nt-badge--neu {
  background: rgba(212,175,55,0.16);
  color: var(--clr-accent-dark);
  border: 1px solid rgba(212,175,55,0.32);
}
.next-termin-banner__kunde {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-termin-banner__typ {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  margin-top: 2px;
}
.next-termin-banner__arrow {
  color: var(--clr-text-muted);
  flex-shrink: 0;
  opacity: 0.4;
}

/* Dark mode */
html.dark .next-termin-banner        { background: #0B0B0B; border-color: rgba(255,255,255,0.06); }
html.dark .next-termin-banner:hover  { box-shadow: 0 4px 20px rgba(0,0,0,0.35); }
html.dark .next-termin-banner__kunde { color: #F5F5F7; }
html.dark .next-termin-banner__typ   { color: #98989E; }
html.dark .nt-badge                  { background: rgba(255,255,255,0.09); color: #98989E; }

/* Sonstiges */
html.dark .ptr-indicator          { background: #111111; border-color: rgba(255,255,255,0.08); }
html.dark .offline-banner         { background: #111111; border: 1px solid rgba(255,255,255,0.08); }
html.dark .danger-zone__block--soft { background: #1C1400; }
html.dark .danger-zone__block--hard { background: #1C0000; }
html.dark .empty-state__text      { color: #636366; }
html.dark details summary         { color: #98989E; }

/* ── Termin-Zentrale ────────────────────────────────────── */
.tz-header { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--sp-md) 8px; }
.tz-title  { font-size: 1.25rem; font-weight: 700; color: var(--clr-text); }
.tz-filters { padding: 0 var(--sp-md) 4px; display: flex; flex-direction: column; gap: 8px; }
.tz-search-wrap { position: relative; }
.tz-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--clr-text-muted); pointer-events: none; }
.tz-search {
  width: 100%; padding: 8px 12px 8px 34px;
  border: 1px solid var(--clr-border); border-radius: var(--radius-sm);
  background: var(--clr-surface); color: var(--clr-text); font-size: .9rem;
  box-sizing: border-box;
}
.tz-search:focus { outline: none; border-color: var(--clr-accent); }
.tz-filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tz-chips { display: flex; gap: 4px; }
.tz-chip {
  padding: 5px 12px; border-radius: 20px; font-size: .8rem; font-weight: 500; cursor: pointer;
  border: 1px solid var(--clr-border); background: var(--clr-surface); color: var(--clr-text-muted);
  transition: background .15s, color .15s, border-color .15s;
}
.tz-chip--active { background: var(--clr-accent); color: #fff; border-color: var(--clr-accent); }
.tz-filter-select {
  padding: 5px 10px; border-radius: var(--radius-sm); font-size: .8rem; cursor: pointer;
  border: 1px solid var(--clr-border); background: var(--clr-surface); color: var(--clr-text);
  max-width: 160px;
}
.tz-count { padding: 4px var(--sp-md) 2px; font-size: .8rem; color: var(--clr-text-muted); }
.tz-list  { padding: 0 var(--sp-md) 120px; display: flex; flex-direction: column; gap: 0; }
.tz-empty { padding: 40px 0; text-align: center; color: var(--clr-text-muted); font-size: .9rem; }
.tz-date-group { margin-bottom: 4px; }
.tz-date-header {
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--clr-text-muted); padding: 10px 0 4px; border-bottom: 1px solid var(--clr-border);
  margin-bottom: 6px;
}
.tz-date-header--today { color: var(--clr-accent); border-color: var(--clr-accent); }
.tz-card {
  display: flex; align-items: center; gap: 0;
  border-left: 3px solid transparent; border-radius: var(--radius-sm);
  margin-bottom: 6px; cursor: pointer; overflow: hidden;
  transition: filter .15s;
  position: relative;
}
.tz-card::before {
  content: '🗑 Löschen';
  position: absolute; inset: 0;
  background: #EF4444; color: #fff;
  font-weight: 600; font-size: .85rem;
  display: flex; align-items: center; padding-left: 20px;
  opacity: 0; transition: opacity .15s;
  pointer-events: none; z-index: 3;
}
.tz-card.swipe--left::before { opacity: 1; }
.tz-card::after {
  content: '✏️ Bearbeiten';
  position: absolute; inset: 0;
  background: #3B82F6; color: #fff;
  font-weight: 600; font-size: .85rem;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 20px;
  opacity: 0; transition: opacity .15s;
  pointer-events: none; z-index: 3;
}
.tz-card.swipe--right::after { opacity: 1; }
.tz-card:hover { filter: brightness(.97); }
.tz-card__body { flex: 1; min-width: 0; padding: 10px 10px 10px 12px; }
.tz-card__top  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.tz-card__kunde { font-weight: 600; font-size: .9rem; color: var(--clr-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.tz-card__berater {
  font-size: .72rem; font-weight: 600; padding: 1px 6px; border-radius: 10px;
  border: 1px solid; white-space: nowrap;
}
.tz-card__meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .78rem; color: var(--clr-text-muted); }
.tz-card__eco  { font-size: .78rem; color: var(--clr-text-muted); }
.tz-card__eco--ok { color: var(--clr-gruen); font-weight: 600; }
.tz-card__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 8px 8px 8px 4px; flex-shrink: 0; }

/* ── Kalender Filter-Pills ──────────────────────────────── */
.cal-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: var(--sp-md);
  scrollbar-width: none;
}
.cal-filter-bar::-webkit-scrollbar { display: none; }

.cal-filter-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text-muted);
  font-size: .8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.cal-filter-pill--active {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #fff;
  font-weight: 600;
}

/* Source-Badge */
.source-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
}

/* Vergangenheits-Trenner */
.cal-past-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--clr-text-muted);
  margin: 20px 0 8px;
}

/* Kalenderquellen-Grid */
.sources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.source-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 14px;
}

html.dark .cal-filter-pill           { background: #1A1A1A; border-color: rgba(255,255,255,0.1); color: #98989E; }
html.dark .cal-filter-pill--active   { background: var(--clr-accent); border-color: var(--clr-accent); color: #fff; }
html.dark .source-card               { background: #111111; border-color: rgba(255,255,255,0.08); }

/* ── TEAL THEME (html.dark.teal) ────────────────────────── */
html.teal {
  --clr-accent:        #06B6D4;
  --clr-accent-light:  rgba(6,182,212,0.18);
  --clr-accent-dark:   #0891B2;
  --clr-sidebar-active:#06B6D4;
  --shadow-accent:     0 4px 16px rgba(6,182,212,0.3);
}

/* Teal: Bottom-Nav Pill */
html.teal .bottom-nav-pill           { background: rgba(6,182,212,0.15); box-shadow: none; }
html.teal .bottom-nav-item.active    { color: #0891B2; }
html.teal .bottom-nav-item.is-swipe-hover { color: #06B6D4; }

/* Teal: Sidebar aktiver Link */
html.teal .nav-link.active           { color: #06B6D4; background: rgba(6,182,212,0.12); }

/* Teal: Theme-Button Hover */
html.teal .btn-theme:hover,
html.teal .btn-theme-mobile:hover    { color: #06B6D4; background: rgba(6,182,212,0.1); }

/* ── Stil-Modal ──────────────────────────────────────────── */
.stil-section { margin-bottom: var(--sp-lg); }
.stil-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--clr-text-muted);
  margin-bottom: 10px;
}
.stil-row { display: flex; gap: 8px; }

.style-preset-btn {
  flex: 1;
  padding: 10px 8px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  background: var(--clr-surface);
  color: var(--clr-text);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
}
.style-preset-btn:hover { border-color: var(--clr-accent); }
.style-preset-btn--active {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  font-weight: 700;
  background: var(--clr-accent-light);
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  outline: none;
}
.swatch:hover { transform: scale(1.15); }
.swatch--active {
  border-color: #fff;
  box-shadow: 0 0 0 2.5px var(--clr-accent), 0 2px 8px rgba(0,0,0,0.2);
  transform: scale(1.1);
}

.stil-custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  color: var(--clr-text-muted);
}
.stil-custom-row input[type="color"] {
  width: 40px;
  height: 32px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 2px;
  background: var(--clr-surface);
}

/* ── Termin-Karte: Wirtschaftliche Zeilen ────────────────── */
.appt-economic {
  font-size: .78rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  margin-top: 5px;
}
.appt-economic--ok    { color: var(--clr-accent); }
.appt-economic--muted { color: var(--clr-text-light); font-weight: 500; }
.appt-produkt {
  font-size: .72rem;
  color: var(--clr-text-muted);
  margin-top: 2px;
}

/* ── Priority Badges ─────────────────────────────────────── */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.priority-badge--hot  { background: rgba(239,68,68,0.13);  color: #DC2626; }
.priority-badge--warm { background: rgba(234,179,8,0.15);  color: #B45309; }
.priority-badge--cold { background: rgba(59,130,246,0.13); color: #1D4ED8; }

/* ── Nächster Schritt (Termin-Karte) ─────────────────────── */
.appt-nextstep {
  font-size: .74rem;
  color: var(--clr-text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ── Wochen-Kontrolle (Kommandozentrale) ─────────────────── */
.wochen-kontrolle {
  background: #1A1A1A;
  border-radius: var(--radius-md);
  padding: 20px 18px 16px;
  margin-bottom: 12px;
  color: #fff;
}
.wochen-kontrolle__header {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}
.wochen-kontrolle__main {
  display: flex;
  gap: 28px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.wochen-kontrolle__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wochen-kontrolle__num {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  letter-spacing: normal;
  white-space: nowrap;
}
.wochen-kontrolle__unit {
  font-size: .72rem;
  color: rgba(255,255,255,0.45);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.wochen-kontrolle__warn {
  font-size: .82rem;
  color: #FCA5A5;
  font-weight: 600;
  margin-top: 4px;
  padding: 6px 10px;
  background: rgba(239,68,68,0.18);
  border-radius: var(--radius-sm);
  border-left: 3px solid #EF4444;
}

/* ── Druck-Warning (🚨 KRITISCH) ────────────────────────── */
.druck-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(239,68,68,0.22);
  border: 2px solid #EF4444;
  border-radius: var(--radius-sm);
}
.druck-warning__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}
.druck-warning__title {
  font-size: .95rem;
  font-weight: 900;
  color: #FCA5A5;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.druck-warning__text {
  font-size: .82rem;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
  font-weight: 500;
}

/* ── Fokus diese Woche ───────────────────────────────────── */
.fokus-woche {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.fokus-woche__title {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--clr-text-muted);
  margin-bottom: 12px;
}
.fokus-row {
  font-size: .95rem;
  font-weight: 600;
  color: var(--clr-text);
  padding: 8px 0;
  border-bottom: 1px solid var(--clr-border);
  line-height: 1.35;
}
.fokus-row:last-child { border-bottom: none; }
.fokus-row--done {
  color: #16A34A;
  font-weight: 700;
}

/* ── Heute Priorität ─────────────────────────────────────── */
.heute-prioritaet {
  background: rgba(212,175,55,0.1);
  border: 1.5px solid rgba(212,175,55,0.4);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: box-shadow .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.heute-prioritaet:active {
  background: rgba(212,175,55,0.18);
}
.heute-prioritaet__header {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--clr-accent);
  margin-bottom: 7px;
}
.heute-prioritaet__kunde {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--clr-text);
  margin-bottom: 5px;
  line-height: 1.2;
}
.heute-prioritaet__step {
  font-size: .85rem;
  color: var(--clr-text-muted);
  font-weight: 500;
}

/* ── Termin-Wertigkeit (Tier-System) ─────────────────────── */
/* Hintergrundfarbe + Border werden per Inline-Style in JS gesetzt (barColor + Alpha).
   CSS-Klassen steuern nur Layout und Schrift-Behandlung. */

/* Abschluss: breiterer Bar + größere Verdienst-Schrift */
.appointment-card--abschluss {
  grid-template-columns: 6px 1fr auto;
}
.appointment-card--abschluss .appt-economic--ok { font-size: .82rem; }

/* Kontakt: gedämpft */
.appointment-card--kontakt {
  opacity: 0.82;
}
.appointment-card--kontakt .appointment-card__kunde {
  font-weight: 500;
}

/* Stern-Icon (gold, inline vor Kundename) */
.appt-kat-icon {
  color: var(--clr-accent);
  vertical-align: middle;
  margin-right: 5px;
  flex-shrink: 0;
  display: inline-block;
  position: relative;
  top: -1px;
}

/* ── Dark Mode: Führungssystem-Blöcke ──────────────────── */
html.dark .wochen-kontrolle        { background: #050505; }
html.dark .fokus-woche             { background: #111111; border-color: rgba(255,255,255,0.07); }
html.dark .fokus-woche__title      { color: #636366; }
html.dark .fokus-row               { color: #E5E5EA; border-color: rgba(255,255,255,0.07); }
html.dark .fokus-row--done         { color: #4ADE80; }
html.dark .heute-prioritaet        { background: rgba(212,175,55,0.07); border-color: rgba(212,175,55,0.25); }
html.dark .heute-prioritaet__kunde { color: #F5F5F7; }
html.dark .heute-prioritaet__step  { color: #98989E; }
html.dark .priority-badge--hot     { background: rgba(239,68,68,0.2);  color: #F87171; }
html.dark .priority-badge--warm    { background: rgba(234,179,8,0.18); color: #FCD34D; }
html.dark .priority-badge--cold    { background: rgba(59,130,246,0.18);color: #93C5FD; }
html.dark .appt-nextstep           { color: #636366; }
/* Druck-Block dark */
html.dark .druck-block                   { background: rgba(239,68,68,0.09); border-color: rgba(239,68,68,0.3); }
html.dark .druck-block--ok               { background: rgba(22,163,74,0.1); border-color: rgba(22,163,74,0.25); }
html.dark .druck-block--kritisch         { background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.5); }
html.dark .druck-block__header           { color: #F87171; }
html.dark .druck-block__ok-inner         { color: #4ADE80; }
html.dark .druck-block__warn             { border-color: rgba(239,68,68,0.12); }
html.dark .druck-block__warn-main        { color: #F5F5F7; }
html.dark .druck-block__warn-detail      { color: #9CA3AF; }
html.dark .druck-block__action           { color: #FCD34D; }
html.dark .druck-block__badge-kritisch   { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.4); color: #FCA5A5; }
/* Fokus Progress dark */
html.dark .fokus-progress-bar            { background: rgba(255,255,255,0.08); }
html.dark .fokus-progress-row--gruen .fokus-progress-row__count { color: #4ADE80; }
html.dark .fokus-progress-row--gelb  .fokus-progress-row__count { color: #FCD34D; }
html.dark .fokus-progress-row--rot   .fokus-progress-row__count { color: #F87171; }
html.dark .fokus-progress-bar__fill--gruen { background: #4ADE80; }
html.dark .fokus-progress-bar__fill--gelb  { background: #FCD34D; }
html.dark .fokus-progress-bar__fill--rot   { background: #F87171; }
html.dark .fokus-woche__selektor { background: #0B0B0B; border-color: rgba(255,255,255,0.1); }
html.dark .zeitdruck-warn           { background: rgba(234,179,8,0.08);  border-color: rgba(234,179,8,0.25);  color: #FCD34D; }
html.dark .zeitdruck-warn--warn     { background: rgba(234,179,8,0.1);   border-color: rgba(234,179,8,0.3);   color: #FCD34D; }
html.dark .zeitdruck-warn--kritisch { background: rgba(239,68,68,0.1);   border-color: rgba(239,68,68,0.3);   color: #F87171; }
/* Handlungs-Box dark */
html.dark .handlungs-box              { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.4); }
html.dark .handlungs-box--ok          { background: rgba(22,163,74,0.1); border-color: rgba(22,163,74,0.28); }
html.dark .handlungs-box--kritisch    { border-color: rgba(239,68,68,0.65); }
html.dark .handlungs-box__label       { color: #F87171; }
html.dark .handlungs-box__msg         { color: #F5F5F7; }
html.dark .handlungs-box__cta         { color: #FCD34D; }
html.dark .handlungs-box__ok          { color: #4ADE80; }
/* Heute Machen dark */
html.dark .heute-machen               { background: #0B0B0B; border-color: rgba(255,255,255,0.07); }
html.dark .heute-machen__label        { border-color: rgba(255,255,255,0.06); }
html.dark .heute-machen__item         { border-color: rgba(255,255,255,0.06); }
html.dark .heute-machen__item:active  { background: rgba(255,255,255,0.04); }
html.dark .heute-machen__item-text    { color: #F5F5F7; }
html.dark .heute-machen__item-hint    { color: #6B7280; }
html.dark .heute-machen__cta          { background: #D4AF37; color: #000; }
html.dark .heute-machen__empty        { color: #4ADE80; }
html.dark .heute-machen__bar          { background: rgba(255,255,255,0.08); }
html.dark .heute-machen__bar-fill--done { background: #4ADE80; }
html.dark .heute-machen__track-btn    { background: #D4AF37; color: #000; }
html.dark .heute-machen__progress--done { color: #4ADE80; }
html.dark .heute-machen__done-badge   { color: #4ADE80; }

/* ── Fokus-Button in Top-Bar ──────────────────────────────── */
.btn-heute-modus {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: transparent;
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  flex-shrink: 0;
}
.btn-heute-modus:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}
.btn-heute-modus.active {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #000;
}
.btn-heute-modus svg { flex-shrink: 0; }

/* ── Heute-Modus Overlay ─────────────────────────────────── */
.heute-modus-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #030303;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.heute-modus-overlay.active { display: flex; }

.heute-modus__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: max(env(safe-area-inset-top), 16px) 20px max(env(safe-area-inset-bottom), 20px);
  box-sizing: border-box;
  gap: 12px;
}

.heute-modus__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 4px;
  flex-shrink: 0;
}
.heute-modus__modusname {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #D4AF37;
}
.heute-modus__close {
  background: rgba(255,255,255,0.07);
  border: none;
  color: #9CA3AF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.heute-modus__close:hover { background: rgba(255,255,255,0.13); }

.heute-modus__loading {
  margin: auto;
  color: #D4AF37;
  font-size: 1rem;
  font-weight: 600;
}

.heute-modus__block {
  background: #0B0B0B;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.heute-modus__fokus-block {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.heute-modus__block-label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #D4AF37;
  margin-bottom: 14px;
}

.heute-modus__numbers {
  display: flex;
  gap: 32px;
  margin-bottom: 10px;
}
.heute-modus__number-item { display: flex; flex-direction: column; }
.heute-modus__big-num {
  font-size: 2.6rem;
  font-weight: 800;
  color: #EDEDED;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.heute-modus__num-label {
  font-size: .7rem;
  color: #6B7280;
  margin-top: 5px;
  font-weight: 500;
}
.heute-modus__warn {
  font-size: .82rem;
  color: #FCD34D;
  padding: 5px 0 1px;
  font-weight: 600;
}
.heute-modus__kritisch {
  font-size: .88rem;
  color: #F87171;
  font-weight: 700;
  padding: 8px 0 2px;
}

.heute-modus__fokus-kunde {
  font-size: 1.45rem;
  font-weight: 700;
  color: #EDEDED;
  margin-bottom: 8px;
  line-height: 1.2;
}
.heute-modus__fokus-step {
  font-size: 1rem;
  color: #9CA3AF;
  margin-top: 6px;
  line-height: 1.4;
}
.heute-modus__fokus-empty {
  font-size: 1rem;
  color: #4B5563;
  font-style: italic;
  margin-top: 4px;
}

.heute-modus__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.heute-modus__btn-primary {
  width: 100%;
  padding: 16px 20px;
  background: #D4AF37;
  color: #000;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  transition: opacity .15s;
}
.heute-modus__btn-primary:active { opacity: .85; }
.heute-modus__btn-secondary {
  width: 100%;
  padding: 13px 20px;
  background: rgba(255,255,255,0.05);
  color: #6B7280;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.heute-modus__btn-secondary:active { background: rgba(255,255,255,0.09); }

/* ── Druck-Block (Wochenkontrolle) ───────────────────────── */
.druck-block {
  background: rgba(239,68,68,0.07);
  border: 1.5px solid rgba(239,68,68,0.35);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.druck-block--ok {
  background: rgba(22,163,74,0.07);
  border-color: rgba(22,163,74,0.3);
  padding: 12px 18px;
}
.druck-block--kritisch {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.6);
  animation: druckPulse 2.5s ease-in-out infinite;
}
@keyframes druckPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50%       { box-shadow: 0 0 0 4px rgba(239,68,68,0.15); }
}
.druck-block__header {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #DC2626;
  margin-bottom: 10px;
}
.druck-block__ok-inner {
  font-size: .9rem;
  font-weight: 700;
  color: #16A34A;
}
.druck-block__warn {
  padding: 8px 0;
  border-bottom: 1px solid rgba(239,68,68,0.15);
}
.druck-block__warn:last-of-type { border-bottom: none; }
.druck-block__warn--minor { opacity: .7; }
.druck-block__warn-main {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 3px;
}
.druck-block__warn-detail {
  font-size: .78rem;
  color: var(--clr-text-muted);
}
.druck-block__action {
  font-size: .78rem;
  font-weight: 700;
  color: #D97706;
  margin-top: 5px;
  letter-spacing: .01em;
}
.druck-block__badge-kritisch {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 700;
  color: #DC2626;
}

/* ── Fokus Progress Rows ──────────────────────────────────── */
.fokus-progress-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--clr-border);
}
.fokus-progress-row:last-child { border-bottom: none; }
.fokus-progress-row__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.fokus-progress-row__label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--clr-text);
}
.fokus-progress-row__count {
  font-size: .82rem;
  font-weight: 700;
  color: var(--clr-text-muted);
}
.fokus-progress-row--gruen .fokus-progress-row__count { color: #16A34A; }
.fokus-progress-row--gelb  .fokus-progress-row__count { color: #D97706; }
.fokus-progress-row--rot   .fokus-progress-row__count { color: #DC2626; }
.fokus-progress-bar {
  height: 4px;
  background: var(--clr-border);
  border-radius: 2px;
  overflow: hidden;
}
.fokus-progress-bar__fill {
  height: 100%;
  border-radius: 2px;
  transition: width .4s ease;
}
.fokus-progress-bar__fill--gruen { background: #16A34A; }
.fokus-progress-bar__fill--gelb  { background: #D97706; }
.fokus-progress-bar__fill--rot   { background: #DC2626; }
.fokus-woche__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.fokus-woche__title { margin-bottom: 0; }
.fokus-woche__selektor {
  font-size: .75rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text);
  cursor: pointer;
  max-width: 160px;
}

/* ── Handlungs-Box (Zone 1) ──────────────────────────────── */
.handlungs-box {
  background: rgba(239,68,68,0.08);
  border: 2px solid rgba(239,68,68,0.35);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.handlungs-box:active { background: rgba(239,68,68,0.13); }
.handlungs-box--ok {
  background: rgba(22,163,74,0.07);
  border-color: rgba(22,163,74,0.3);
  cursor: default;
  padding: 14px 18px;
}
.handlungs-box--ok:active { background: rgba(22,163,74,0.07); }
.handlungs-box--kritisch {
  border-color: rgba(239,68,68,0.65);
  animation: druckPulse 2.5s ease-in-out infinite;
}
.handlungs-box__label {
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #DC2626;
  margin-bottom: 10px;
}
.handlungs-box__msg {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-text);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -.01em;
}
.handlungs-box__cta {
  font-size: .88rem;
  font-weight: 700;
  color: #D97706;
}
.handlungs-box__ok {
  font-size: .9rem;
  font-weight: 700;
  color: #16A34A;
}

/* ── Heute Machen (Zone 3) ───────────────────────────────── */
.heute-machen {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.heute-machen__label {
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  padding: 13px 18px 11px;
  border-bottom: 1px solid var(--clr-border);
}
.heute-machen__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--clr-border);
  cursor: pointer;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
}
.heute-machen__item:active { background: var(--clr-surface-2); }
.heute-machen__item-left {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
  min-width: 0;
}
.heute-machen__icon { font-size: 1.25rem; flex-shrink: 0; }
.heute-machen__item-text {
  font-size: .96rem;
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1.3;
}
.heute-machen__item-hint {
  font-size: .73rem;
  color: var(--clr-text-muted);
  margin-top: 2px;
}
.heute-machen__arrow { color: var(--clr-text-light); flex-shrink: 0; }
.heute-machen__cta {
  display: block;
  width: 100%;
  padding: 17px 20px;
  background: var(--clr-accent);
  color: #000;
  border: none;
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .15s;
}
.heute-machen__cta:active { opacity: .85; }
.heute-machen__empty {
  padding: 16px 18px;
  font-size: .9rem;
  font-weight: 600;
  color: #16A34A;
}
.heute-machen__item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}
.heute-machen__progress {
  margin-left: auto;
  font-size: .82rem;
  font-weight: 800;
  color: var(--clr-text-muted);
  flex-shrink: 0;
}
.heute-machen__progress--done { color: #16A34A; }
.heute-machen__bar {
  height: 4px;
  background: var(--clr-border);
  border-radius: 2px;
  overflow: hidden;
  margin: 5px 0 9px;
}
.heute-machen__bar-fill {
  height: 100%;
  background: var(--clr-accent);
  border-radius: 2px;
  transition: width .4s ease;
}
.heute-machen__bar-fill--done { background: #16A34A; }
.heute-machen__track-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  background: var(--clr-accent);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.heute-machen__track-btn:active { opacity: .75; }
.heute-machen__item--done {
  opacity: .55;
  pointer-events: none;
}
.heute-machen__done-badge {
  font-size: .78rem;
  font-weight: 700;
  color: #16A34A;
  display: inline-block;
}

/* ── Monat Drill-Down ────────────────────────────────────── */
.modal-kw-header {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  padding: 14px 0 6px;
}

/* ── Single Focus Engine ─────────────────────────────────── */
.hm-focus {
  padding: 18px 18px 14px;
}
.hm-focus__icon { font-size: 2rem; margin-bottom: 8px; line-height: 1; }
.hm-focus__task { font-size: 1.15rem; font-weight: 800; color: var(--clr-text); margin-bottom: 4px; line-height: 1.25; }
.hm-focus__hint { font-size: .78rem; color: var(--clr-text-muted); margin-bottom: 14px; }
.hm-focus__progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.hm-focus__count { font-size: 1.05rem; font-weight: 800; color: var(--clr-text); }
.hm-focus__pct { font-size: .78rem; font-weight: 700; color: var(--clr-text-muted); }
.hm-focus__bar {
  height: 8px;
  background: var(--clr-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.hm-focus__bar-fill {
  height: 100%;
  background: var(--clr-accent);
  border-radius: 4px;
  transition: width .4s ease;
}
.hm-focus__btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--clr-accent);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .03em;
  transition: opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.hm-focus__btn:active { opacity: .8; }
.hm-focus__next {
  font-size: .75rem;
  color: var(--clr-text-muted);
  margin-top: 11px;
  text-align: center;
}

/* All-Done State */
.hm-all-done {
  text-align: center;
  padding: 30px 20px 24px;
  background: rgba(22,163,74,0.07);
  border: 1.5px solid rgba(22,163,74,0.3);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.hm-all-done__icon { font-size: 2.2rem; margin-bottom: 10px; line-height: 1; }
.hm-all-done__title { font-size: 1.1rem; font-weight: 800; color: #16A34A; margin-bottom: 5px; }
.hm-all-done__sub { font-size: .85rem; color: var(--clr-text-muted); margin-bottom: 16px; }
.hm-all-done__btn {
  padding: 10px 22px;
  background: transparent;
  border: 1.5px solid #16A34A;
  color: #16A34A;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.hm-all-done__btn:active { opacity: .75; }

/* Desktop mini-overview */
.hm-overview { display: none; }
@media (min-width: 768px) {
  .hm-overview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 18px 14px;
    border-top: 1px solid var(--clr-border);
    padding-top: 12px;
    margin-top: 0;
  }
  .hm-overview__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--clr-text-muted);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
  }
  .hm-overview__item--active {
    color: var(--clr-text);
    font-weight: 700;
    background: rgba(212,175,55,0.1);
  }
  .hm-overview__item--done { opacity: .4; }
  .hm-overview__count { margin-left: auto; font-weight: 700; }
}

/* ── Zeitdruck-Warnung ───────────────────────────────────── */
.zeitdruck-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.4);
  color: #D97706;
}
.zeitdruck-warn--warn {
  background: rgba(234,179,8,0.12);
  border-color: rgba(234,179,8,0.5);
  color: #B45309;
}
.zeitdruck-warn--kritisch {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.4);
  color: #DC2626;
}

/* ── Progress Story ──────────────────────────────────────── */
.hm-focus__story {
  font-size: .75rem;
  color: var(--clr-text-muted);
  text-align: center;
  margin-bottom: 12px;
}

/* ── Monatsplan / Quota Engine ───────────────────────────── */
.monatsplan {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.monatsplan--empty {
  text-align: center;
  padding: 20px 18px;
}
.monatsplan--warn { padding: 16px 18px; }
.monatsplan__label {
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-bottom: 10px;
}
.monatsplan__prompt {
  font-size: .85rem;
  color: var(--clr-text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.monatsplan__warn-text {
  font-size: .85rem;
  color: #D97706;
  font-weight: 600;
}
.monatsplan__set-btn {
  padding: 10px 22px;
  background: var(--clr-accent);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s;
}
.monatsplan__set-btn:active { opacity: .8; }
.monatsplan__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.monatsplan__goal-ref {
  font-size: .78rem;
  color: var(--clr-text-muted);
  margin-bottom: 12px;
}
.monatsplan__edit-btn {
  background: none;
  border: none;
  font-size: .8rem;
  font-weight: 700;
  color: var(--clr-accent);
  cursor: pointer;
  padding: 0;
}
.monatsplan__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
.monatsplan__section-title {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin-bottom: 8px;
}
.monatsplan__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .84rem;
  padding: 4px 0;
  border-bottom: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
}
.monatsplan__row:last-child { border-bottom: none; }
.monatsplan__row strong {
  color: var(--clr-text);
  font-weight: 800;
  font-size: .9rem;
}
.monatsplan__today {
  font-size: .82rem;
  font-weight: 700;
  color: var(--clr-text-muted);
  margin-bottom: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--clr-border);
}
.monatsplan__cta {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1.5px solid var(--clr-accent);
  color: var(--clr-accent);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s, color .15s;
  letter-spacing: .02em;
}
.monatsplan__cta:active { background: var(--clr-accent); color: #000; }

/* Dark overrides – Monatsplan */
html.dark .monatsplan__set-btn { background: #D4AF37; color: #000; }
html.dark .monatsplan__cta { border-color: #D4AF37; color: #D4AF37; }
html.dark .monatsplan__cta:active { background: #D4AF37; color: #000; }

/* Dark overrides – Single Focus Engine */
html.dark .hm-focus__bar { background: rgba(255,255,255,0.08); }
html.dark .hm-all-done { background: rgba(22,163,74,0.1); border-color: rgba(22,163,74,0.25); }
html.dark .hm-all-done__title { color: #4ADE80; }
html.dark .hm-all-done__btn { border-color: #4ADE80; color: #4ADE80; }
html.dark .hm-overview__item--active { background: rgba(212,175,55,0.12); }

/* ---------- Language Switcher ---------- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 4px;
}
.lang-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--clr-text-muted);
  cursor: pointer;
  padding: 4px 5px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.lang-btn:hover { color: var(--clr-text); }
.lang-btn.is-active {
  color: var(--clr-accent);
  font-weight: 700;
}
.lang-sep {
  font-size: 0.7rem;
  color: var(--clr-text-muted);
  opacity: .5;
  user-select: none;
}
html.dark .lang-btn { color: var(--clr-text-muted); }
html.dark .lang-btn:hover { color: var(--clr-text); }
html.dark .lang-btn.is-active { color: var(--clr-accent); }
