/* ===================================================================
   LOCALION NAVIGATOR – SETTER APP
   Global Styles · Brand CI: Localion / Logiball
=================================================================== */

:root {
  /* ── Localion Brand Colors ── */
  --primary:        #1a2141;   /* Akzentfarbe 2 – Deep Navy */
  --primary-light:  #222c52;   /* etwas heller */
  --primary-lighter:#2b3766;   /* noch heller */
  --accent:         #dc143c;   /* Akzentfarbe 1 – Crimson */
  --accent-dark:    #b81032;   /* dunkler Crimson */
  --accent-hover:   #e03651;   /* Variation 1 – Hover-Rot */
  --accent-light:   #fce8ec;   /* sehr helles Rot-Tint */
  --accent-muted:   #656f8e;   /* Variation 2 – Grau-Blau */
  /* ── Semantic Colors ── */
  --success:        #10b981;
  --success-light:  #d1fae5;
  --warning:        #f59e0b;
  --warning-light:  #fef3c7;
  --danger:         #ef4444;
  --danger-light:   #fee2e2;
  --info:           #3b82f6;
  --info-light:     #dbeafe;
  /* ── Text ── */
  --text-primary:   #1a2141;   /* Navy statt Slate-900 */
  --text-secondary: #656f8e;   /* Variation 2 */
  --text-muted:     #9aa3be;
  /* ── Backgrounds ── */
  --bg:             #eef1f8;   /* Brand Background */
  --bg-card:        #ffffff;
  --border:         #d6daea;
  --border-light:   #eef1f8;
  /* ── Layout ── */
  --sidebar-width:  240px;
  --topbar-height:  70px;
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --shadow-sm:      0 1px 3px rgba(26,33,65,0.07);
  --shadow:         0 4px 14px rgba(26,33,65,0.09);
  --shadow-lg:      0 12px 36px rgba(26,33,65,0.14);
  --transition:     all 0.2s ease;
  --font:           'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===================== LOGIN PAGE ===================== */
.login-page {
  background: var(--primary);
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #0e1428 40%, #1a2141 100%);
}

.login-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-lg);
  border-top: 3px solid var(--accent);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.logo-icon {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  flex-shrink: 0;
}
.logo-icon img, .logo-icon svg { width: 100%; height: 100%; object-fit: contain; }

.logo-text { display: flex; flex-direction: column; }
.logo-main {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1;
}
.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.login-title { font-size: 26px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.login-subtitle { color: var(--text-secondary); font-size: 15px; margin-bottom: 32px; }

.login-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 500; color: var(--text-secondary); }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.input-wrapper input,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-primary);
  background: white;
  transition: var(--transition);
  outline: none;
}

.form-group input:not(.input-wrapper input),
.form-group select,
.form-group textarea {
  padding: 10px 12px;
}

.input-wrapper input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.12);
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
}

.login-error {
  background: var(--danger-light);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-login {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  margin-top: 8px;
}
.btn-login:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(220,20,60,0.35); }

.login-bg-decoration { position: absolute; inset: 0; pointer-events: none; }
.bg-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  opacity: 0.06;
}
.bg-circle-1 { width: 480px; height: 480px; top: -120px; right: -120px; }
.bg-circle-2 { width: 360px; height: 360px; bottom: -100px; left: -100px; }
.bg-circle-3 { width: 240px; height: 240px; top: 40%; left: 50%; opacity: 0.04; }

/* ===================== APP SHELL ===================== */
body.app-active { background: var(--bg); }
.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* ===================== SIDEBAR ===================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary);
  display: flex;
  flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  transition: width 0.25s ease;
  overflow: hidden;
  position: relative;
  z-index: 100;
}

.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-info { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 0 12px; }
.sidebar.collapsed .sidebar-logo { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar.collapsed .current-user { justify-content: center; }
.sidebar.collapsed .logout-btn { display: none; }

.sidebar-header {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(220,20,60,0.25);
  min-height: 64px;
}

.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon-sm {
  width: 32px;
  height: 32px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 2px;
}
.logo-icon-sm img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-logo-text {
  color: white;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 14px;
  transition: var(--transition);
}
.sidebar-toggle-btn:hover { color: white; background: rgba(255,255,255,0.08); }

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-item:hover { color: white; background: rgba(255,255,255,0.07); }
.nav-item.active { color: white; background: rgba(220, 20, 60, 0.18); }
.nav-item.active i { color: var(--accent); }

.nav-badge {
  margin-left: auto;
  background: var(--accent-hover);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

/* Profilbild (frontend-only): füllt den runden Avatar; Fallback bleibt der Buchstabe */
.avatar-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* Sidebar: Avatar als Klick-Ziel für Selbst-Upload + Kamera-Badge beim Hover */
.user-avatar-wrap { position: relative; display: inline-flex; cursor: pointer; flex-shrink: 0; }
.user-avatar-edit {
  position: absolute; right: -2px; bottom: -2px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; border: 1.5px solid var(--primary);
  opacity: 0; transition: var(--transition); pointer-events: none;
}
.user-avatar-wrap:hover .user-avatar-edit { opacity: 1; }
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { color: white; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: rgba(255,255,255,0.4); font-size: 11px; }

.logout-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 14px;
  transition: var(--transition);
  flex-shrink: 0;
}
.logout-btn:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* ===================== MAIN AREA ===================== */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}

/* ===================== TOP BAR ===================== */
.top-bar {
  height: var(--topbar-height);
  background: white;
  border-bottom: 2px solid var(--bg);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
  flex-shrink: 0;
  z-index: 50;
  box-shadow: 0 1px 0 var(--border);
}
.top-bar-left { flex-shrink: 0; }
.top-bar-center { flex: 1; display: flex; justify-content: center; }
.top-bar-right { flex-shrink: 0; }

.page-title { font-size: 20px; font-weight: 700; color: var(--text-primary); }

/* CALL TIMER WIDGET */
.call-timer-widget {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--primary);
  padding: 8px 16px;
  border-radius: 40px;
  border: 1.5px solid var(--primary-lighter);
  transition: var(--transition);
}
.call-timer-widget.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-lighter));
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(220,20,60,0.2);
}
.timer-display {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  letter-spacing: 2px;
  min-width: 70px;
  text-align: center;
}
.call-timer-widget.active .timer-display { color: var(--accent); }

.timer-controls { display: flex; gap: 8px; }
.btn-timer-start {
  background: var(--success);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-timer-start:hover { background: #059669; transform: scale(1.02); }

.btn-timer-stop {
  background: var(--danger);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  animation: pulse-danger 2s infinite;
}
.btn-timer-stop:hover { background: #dc2626; }

@keyframes pulse-danger {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

.timer-context { font-size: 12px; color: rgba(255,255,255,0.6); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.call-timer-widget.active .timer-context { color: #fff; }

/* ===================== CONTENT AREA ===================== */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.view { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ===================== BUTTONS ===================== */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(220,20,60,0.32); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: white;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }


.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1.5px solid transparent;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-danger:hover { background: var(--danger); color: white; }

.btn-sm { padding: 6px 12px !important; font-size: 13px !important; }
.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: var(--transition);
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }

.btn-new-call {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
}
.btn-new-call:hover { opacity: 0.9; transform: translateY(-1px); }

.full-width { width: 100%; }

/* ===================== CARDS ===================== */
.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h3 { font-size: 16px; font-weight: 600; }
.card-link { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; }
.card-link:hover { text-decoration: underline; }

/* ===================== DASHBOARD ===================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card-primary { background: linear-gradient(135deg, var(--primary), var(--primary-lighter)); border-color: transparent; border-left: 3px solid var(--accent); }
.stat-card-primary .stat-icon { background: rgba(255,255,255,0.1); color: var(--accent); }
.stat-card-primary .stat-value { color: white; }
.stat-card-primary .stat-label { color: rgba(255,255,255,0.6); }

.stat-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
}
.stat-content { min-width: 0; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }

.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.recent-calls-list { display: flex; flex-direction: column; gap: 10px; }
.recent-call-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg);
  transition: var(--transition);
  cursor: pointer;
}
.recent-call-item:hover { border-color: var(--accent); background: var(--accent-light); }.rci-company { font-size: 14px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rci-meta { font-size: 12px; color: var(--text-muted); }
.rci-badge { flex-shrink: 0; }

.tasks-preview { display: flex; flex-direction: column; gap: 8px; }
.task-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--warning);
  background: var(--bg);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.task-preview-item:hover { background: var(--warning-light); }

.empty-state-sm {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  padding: 28px 20px;
}
.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  padding: 48px 24px;
}

/* ===================== CONTACTS TABLE ===================== */
.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 13px;
}
.search-box input {
  padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  width: 280px;
  outline: none;
  transition: var(--transition);
  background: white;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(220,20,60,0.1); }

.filter-select {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  background: white;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--accent); }

.table-wrapper {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table thead { background: var(--bg); }
.data-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  cursor: default;
}
.data-table th[data-sort] { cursor: pointer; }
.data-table th[data-sort]:hover { color: var(--accent); }
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--bg); }
.data-table tbody tr:last-child td { border-bottom: none; }
.actions-col { width: 110px; }

.table-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.table-empty i { font-size: 48px; margin-bottom: 16px; opacity: 0.3; display: block; }
.table-empty p { font-size: 16px; margin-bottom: 20px; }

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.page-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: var(--transition);
}
.page-btn:hover, .page-btn.active { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: white; }

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-info { background: var(--info-light); color: #1e40af; }
.badge-neutral { background: var(--border); color: var(--text-secondary); }
.badge-accent { background: var(--accent-light); color: var(--accent-dark); }

.bool-yes { color: var(--success); font-weight: 600; }
.bool-no { color: var(--danger); font-weight: 600; }

/* ===================== TELEPROMPTER ===================== */
.teleprompter-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  height: calc(100vh - var(--topbar-height) - 56px);
}

.teleprompter-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.current-contact-card .no-contact-msg {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px 8px;
}
.current-contact-card .no-contact-msg i { font-size: 28px; margin-bottom: 10px; display: block; }
.current-contact-card .no-contact-msg p { margin-bottom: 12px; }

.contact-card-info { display: flex; flex-direction: column; gap: 5px; }
.cci-company { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.cci-person { font-size: 13px; color: var(--text-secondary); }
.cci-meta { font-size: 12px; color: var(--text-muted); }

.script-progress { display: flex; flex-direction: column; gap: 0; }
.progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}
.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 28px;
  width: 2px;
  height: 16px;
  background: var(--border);
}
.progress-step.active:not(:last-child)::after { background: var(--accent); }
.step-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  flex-shrink: 0;
  transition: var(--transition);
}
.progress-step.active .step-dot { border-color: var(--accent); background: var(--accent); }

.progress-step.done .step-dot { border-color: var(--success); background: var(--success); }
.progress-step.active { color: var(--text-primary); font-weight: 600; }
.progress-step.done { color: var(--success); }

.tracking-card .tracking-display { display: flex; flex-direction: column; gap: 7px; }
.tracking-item { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.tracking-label { color: var(--text-muted); }
.tracking-value { font-weight: 600; color: var(--text-primary); max-width: 130px; text-align: right; font-size: 12px; }

.quick-ref { display: flex; flex-direction: column; gap: 6px; }
.qr-item { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.qr-item strong { color: var(--text-primary); }

/* TELEPROMPTER MAIN */
.teleprompter-main {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.teleprompter-nav-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  background: var(--bg);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.teleprompter-nav-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }


.teleprompter-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* Teleprompter Text Styles */
.tp-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.tp-section-badge {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tp-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Checklist */
.tp-checklist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.tp-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  font-size: 15px;
}
.tp-check-item:hover { border-color: var(--success); background: var(--success-light); }
.tp-check-item.checked { border-color: var(--success); background: var(--success-light); color: #065f46; }
.tp-check-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--success); cursor: pointer; }

/* Variant cards */
.tp-variants { display: flex; flex-direction: column; gap: 14px; }
.tp-variant-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}
.tp-variant-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(220,20,60,0.08); }
.tp-variant-card.selected { border-color: var(--accent); background: linear-gradient(135deg, rgba(220,20,60,0.02), rgba(220,20,60,0.05)); }

.tp-variant-header {
  padding: 12px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.tp-variant-card.selected .tp-variant-header { background: var(--accent-light); border-bottom-color: var(--accent); }

.tp-variant-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.tp-variant-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.tp-variant-card.selected .tp-variant-name { color: var(--accent-dark); }
.tp-variant-tracked {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.tp-variant-body { padding: 18px 20px; }

/* Teleprompter script text - the CORE style */
.tp-script-text {
  font-size: 26px;
  line-height: 1.5;
  color: var(--primary);
  font-weight: 500;
  letter-spacing: -0.1px;
}
.tp-script-text .tp-speaker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 6px;
}
.tp-script-text .tp-highlight {
  background: linear-gradient(180deg, transparent 55%, rgba(220,20,60,0.18) 55%);
  font-weight: 700;
}
.tp-script-hint {
  margin-top: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fff8f9, #fce8ec);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent-dark);
}
.tp-script-hint i { margin-right: 6px; }

/* Qualification questions */
.tp-questions { display: flex; flex-direction: column; gap: 14px; }
.tp-question-card {
  padding: 18px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.tp-question-card:hover { border-color: var(--accent); background: var(--accent-light); }
.tp-question-card.asked { border-color: var(--success); background: var(--success-light); opacity: 0.7; }
.tp-q-category { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.tp-q-text { font-size: 20px; font-weight: 500; color: var(--primary); line-height: 1.5; }
.tp-q-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; font-style: italic; }

/* Objection cards */
.tp-objections { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tp-objection-card {
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.tp-objection-card:hover { border-color: var(--accent); background: var(--accent-light); }
.tp-objection-card.tracked { border-color: var(--accent); background: var(--accent-light); }
.tp-obj-name { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.tp-obj-response { font-size: 15px; color: var(--text-secondary); line-height: 1.5; }

/* Result buttons */
.tp-result-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.tp-result-btn {
  flex: 1;
  min-width: 180px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}
.tp-result-btn:hover { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.tp-result-btn.selected { border-color: var(--accent); background: var(--accent); color: white; }

.tp-result-btn.result-success:hover, .tp-result-btn.result-success.selected { border-color: var(--success); background: var(--success); color: white; }
.tp-result-btn.result-warning:hover, .tp-result-btn.result-warning.selected { border-color: var(--warning); background: var(--warning); color: white; }
.tp-result-btn.result-danger:hover, .tp-result-btn.result-danger.selected { border-color: var(--danger); background: var(--danger); color: white; }

/* ── Erfassungs-Blöcke (Klick-Tracking, visuell getrennt vom Sprech-Skript) ── */
.tp-capture {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.tp-capture-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--accent); margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.tp-capture-current { font-size: 13px; font-weight: 600; color: var(--success); align-self: center; }
/* ausgewählter Erfassungs-Button (Status festgehalten) */
.btn-secondary.tp-on { border-color: var(--accent); background: var(--accent); color: white; }
.btn-secondary.tp-on i { color: white !important; }
/* Techniker-Schnellauswahl */
.tp-tech-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tp-tech-quick button {
  padding: 8px 14px; border: 2px solid var(--border); border-radius: var(--radius);
  background: white; cursor: pointer; font-size: 14px; font-weight: 600; transition: var(--transition);
}
.tp-tech-quick button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.tp-tech-quick button.tp-on { border-color: var(--accent); background: var(--accent); color: white; }
.tp-tech-quick input[type="number"] {
  width: 96px; padding: 8px 10px; border: 2px solid var(--border); border-radius: var(--radius); font-size: 14px;
}
.tp-tech-quick input[type="number"]:focus { outline: none; border-color: var(--accent); }
/* Inline-Datumsfelder (Termin / Follow-up) */
.tp-date-input {
  padding: 8px 12px; border: 2px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; background: white;
}
.tp-date-input:focus { outline: none; border-color: var(--accent); }

/* ── Lead-Picker (Typeahead) im Kontakt-Dialog ── */
.cf-lead-picker { position: relative; }
.cf-lead-picker > label { color: var(--accent); }
#cf-lead-search { width: 100%; }
.lead-typeahead {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14); max-height: 240px; overflow-y: auto;
  margin-top: 4px; display: none;
}
.lead-typeahead.show { display: block; }
.lead-typeahead .lt-item { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #eef1f8; }
.lead-typeahead .lt-item:last-child { border-bottom: none; }
.lead-typeahead .lt-item:hover { background: var(--accent-light); }
.lead-typeahead .lt-company { font-weight: 600; font-size: 14px; }
.lead-typeahead .lt-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.lead-typeahead .lt-empty { padding: 10px 12px; color: var(--text-muted); font-size: 13px; }

.teleprompter-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  background: var(--bg);
  flex-shrink: 0;
}

/* ===================== TASKS ===================== */
.tab-filter-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.tab-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.tab-filter-btn.active { background: var(--accent); border-color: var(--accent); color: white; }


.tasks-grid { display: flex; flex-direction: column; gap: 10px; }

.task-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.task-card:hover { box-shadow: var(--shadow); border-color: var(--border); transform: translateY(-1px); }
.task-card.overdue { border-left: 3px solid var(--danger); }
.task-card.done { opacity: 0.6; }

.task-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.task-type-icon.followup    { background: var(--accent-light); color: var(--accent); }
.task-type-icon.wiedervorlage { background: var(--warning-light); color: #92400e; }
.task-type-icon.calendly    { background: var(--info-light); color: #1e40af; }
.task-type-icon.other       { background: var(--border); color: var(--text-secondary); }

.task-content { flex: 1; min-width: 0; }
.task-title { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 12px; }

.task-status-select {
  padding: 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg);
  cursor: pointer;
  outline: none;
}

.task-actions { display: flex; gap: 6px; }

/* ===================== KPI DASHBOARD ===================== */
.kpi-header { margin-bottom: 20px; display: flex; justify-content: flex-end; }
.kpi-filters { display: flex; gap: 10px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi-stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.kpi-stat-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-stat-value { font-size: 32px; font-weight: 800; color: var(--primary); margin: 8px 0 4px; }

.kpi-benchmark { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 10px; display: inline-block; }
.kpi-bench-weak { background: var(--danger-light); color: var(--danger); }
.kpi-bench-avg { background: var(--warning-light); color: #92400e; }
.kpi-bench-good { background: var(--accent-light); color: var(--accent-dark); }
.kpi-bench-exc { background: var(--success-light); color: #065f46; }

.kpi-charts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.kpi-chart-card { min-height: 240px; }
.kpi-chart-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }

/* Funnel Chart */
.funnel-chart { display: flex; flex-direction: column; gap: 6px; }
.funnel-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.funnel-bar-wrap { flex: 1; background: var(--bg); border-radius: 4px; height: 28px; overflow: hidden; }
.funnel-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 4px;
  min-width: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  transition: width 0.8s ease;
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.funnel-step-label { width: 130px; font-size: 12px; color: var(--text-secondary); }
.funnel-step-count { width: 30px; font-size: 12px; font-weight: 700; text-align: right; }

/* Bar Chart */
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-chart-item { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.bar-chart-label { width: 110px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-chart-bar-wrap { flex: 1; background: var(--bg); border-radius: 4px; height: 22px; overflow: hidden; }
.bar-chart-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--accent-muted), var(--primary-light));
  border-radius: 4px;
  min-width: 4px;
  transition: width 0.6s ease;
}
.bar-chart-bar.accent-bar { background: linear-gradient(90deg, var(--accent), var(--accent-hover)); }

.bar-chart-val { width: 30px; font-weight: 700; text-align: right; }

/* Benchmark Table */
.benchmark-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.benchmark-table th, .benchmark-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-light); }
.benchmark-table th { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.bench-col { text-align: center !important; }
.bench-weak { color: var(--danger); }
.bench-avg { color: var(--warning); }
.bench-good { color: var(--accent-dark); }
.bench-exc { color: var(--success); }
.bench-you { font-weight: 700; color: var(--primary); }
.bench-you-val { font-weight: 800; font-size: 14px; }

/* ===================== MODALS ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.2s ease;
}
.modal-large { max-width: 800px; }

/* Basis für die dynamisch injizierten Lead-/Enrichment-Modals (.modal-box) –
   analog zu .modal: begrenzte Höhe + scrollbarer Body, damit nichts abgeschnitten wird. */
.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.2s ease;
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
}
.modal-close:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.modal-divider::before, .modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Form Grid */
.form-grid { display: flex; flex-direction: column; gap: 24px; }
.form-section {}
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group textarea { padding: 10px 12px !important; resize: vertical; min-height: 80px; }

/* Select Contact List */
.select-contact-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.select-contact-item {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.select-contact-item:hover { border-color: var(--accent); background: var(--accent-light); }
.sci-company { font-size: 14px; font-weight: 600; }
.sci-meta { font-size: 12px; color: var(--text-muted); }

/* Detail Modal */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-field { display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.detail-value { font-size: 14px; color: var(--text-primary); }
.detail-notes { grid-column: 1 / -1; padding: 14px; background: var(--bg); border-radius: var(--radius-sm); font-size: 14px; line-height: 1.6; }

/* ===================== TOAST NOTIFICATIONS ===================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}
.toast {
  background: white;
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  font-size: 14px;
  border-left: 4px solid var(--primary);
  animation: slideInRight 0.3s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast i { font-size: 16px; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast-msg { flex: 1; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 2px; }

@keyframes slideInRight { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(60px); } }
.toast.removing { animation: fadeOut 0.3s ease forwards; }

/* ===================== UTILITIES ===================== */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.fw-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===================================================================
   LEADS MODULE STYLES
=================================================================== */

/* Page Layout */
.leads-page { display: flex; flex-direction: column; gap: 20px; }

/* Header */
.leads-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.leads-title-area { display: flex; flex-direction: column; gap: 4px; }
.leads-title { font-size: 24px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
.leads-title i { color: var(--accent); }
.leads-count { font-size: 13px; color: var(--text-muted); }
.leads-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Filter Bar */
.leads-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  flex: 1;
  min-width: 200px;
}
.filter-search i { color: var(--text-muted); font-size: 13px; }
.filter-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  width: 100%;
  font-family: var(--font);
  color: var(--text-primary);
}
.filter-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  background: white;
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

/* KPI Row */
.leads-kpi-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lead-kpi-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1.5px solid;
  min-width: 80px;
  flex: 1;
}
.kpi-num { font-size: 22px; font-weight: 800; line-height: 1; }
.kpi-lbl { font-size: 11px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

/* Table */
.leads-table-wrapper {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}
.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.leads-table thead th {
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
.leads-table th.sortable { cursor: pointer; user-select: none; }
.leads-table th.sortable:hover { color: var(--accent); }
.leads-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.leads-table tbody tr:last-child td { border-bottom: none; }
.lead-row { cursor: pointer; transition: background 0.15s; }
.lead-row:hover { background: var(--bg); }
.lead-row.overdue { border-left: 3px solid var(--danger); }
.overdue-date { color: var(--danger); font-weight: 600; }

.company-cell { max-width: 240px; }
.company-cell strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-badge {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  background: var(--accent-light);
  color: var(--accent);
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 600;
}
.contact-info { display: flex; flex-direction: column; gap: 2px; }
.salutation { font-size: 11px; color: var(--text-muted); }
.phone-link { color: var(--accent); text-decoration: none; font-size: 13px; white-space: nowrap; }
.phone-link:hover { text-decoration: underline; }
.phone-link i { margin-right: 4px; }

/* ── AP0: Verstellbare Spaltenbreite (Excel-artig) ──────────────────────── */
.leads-table--resizable { table-layout: fixed; }
.leads-table--resizable th,
.leads-table--resizable td { overflow: hidden; }
.leads-table--resizable .company-cell { max-width: none; }
.leads-table--resizable .company-cell strong,
.leads-table--resizable .contact-info > span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.col-resize-handle {
  position: absolute; top: 0; right: -3px; width: 7px; height: 100%;
  cursor: col-resize; z-index: 3; user-select: none;
}
.col-resize-handle:hover { background: var(--accent); opacity: 0.4; }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }

/* ── AP0: Call-Briefing im Call-Modus (wiederverwendetes renderBriefing) ─── */
.call-briefing-toggle {
  cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.call-briefing-toggle .fa-chevron-up,
.call-briefing-toggle .fa-chevron-down { font-size: 12px; color: var(--text-muted); }
.call-briefing-body { font-size: 13px; }
.call-briefing-body .detail-section {
  padding: 0; margin: 0 0 12px 0; border: none; background: none; box-shadow: none;
}
.call-briefing-body .detail-section:last-child { margin-bottom: 0; }
.call-briefing-body .detail-section h3 { font-size: 13px; margin-bottom: 8px; }
.call-briefing-body .briefing-grid { grid-template-columns: 1fr; }

/* Status & Priority Badges */
.status-badge, .priority-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.priority-badge { border: none; }

/* Actions */
.actions-cell { white-space: nowrap; }
.btn-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
  margin-right: 4px;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-icon.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

/* Empty State */
.table-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 2;
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 16px; }
.page-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: white; font-weight: 700; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Lead Detail Modal ── */
.lead-detail-modal { max-width: 800px; }
.lead-edit-modal { max-width: 780px; }
.modal-badges { display: flex; gap: 8px; margin-top: 6px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-section { background: var(--bg); border-radius: var(--radius); padding: 16px; }
.detail-section.full-width { grid-column: 1 / -1; }
.detail-section h3 { font-size: 13px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.detail-section h3 i { color: var(--accent); }
.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-table td { padding: 5px 0; }
.detail-table td:first-child { color: var(--text-muted); min-width: 130px; }
.detail-table td a { color: var(--accent); text-decoration: none; }
.detail-table td a:hover { text-decoration: underline; }
.detail-notes { font-size: 14px; line-height: 1.7; color: var(--text-primary); }
.detail-date { font-size: 15px; font-weight: 600; color: var(--text-primary); }

/* ── Lead Edit Form ── */
.lead-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-form .form-group.full { grid-column: 1 / -1; }
.lead-form .form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.lead-form .form-group input,
.lead-form .form-group select,
.lead-form .form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-primary);
  background: white;
  transition: var(--transition);
}
.lead-form .form-group input:focus,
.lead-form .form-group select:focus,
.lead-form .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.lead-form textarea { resize: vertical; min-height: 90px; }

/* ── Import Modal ── */
.import-modal { max-width: 680px; }
.import-info {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}
.import-info code.field-list {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--accent);
  word-break: break-all;
  line-height: 1.8;
}
.import-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}
.import-dropzone i { color: var(--accent); margin-bottom: 12px; display: block; }
.import-dropzone p { margin-bottom: 12px; font-size: 14px; }
.import-dropzone.dragover { border-color: var(--accent); background: var(--accent-light); }
.import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
}
.import-count { font-weight: 700; color: var(--accent); }
.import-table-wrap { overflow-x: auto; }
.import-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
.import-preview-table th { background: var(--bg); padding: 8px 10px; text-align: left; font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; }
.import-preview-table td { padding: 7px 10px; border-bottom: 1px solid var(--border-light); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); font-family: var(--font); text-decoration: none; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: white; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }

/* ===================================================================
   LEAD BRIEFING PANEL – Call-Briefing im Lead-Detail-Modal
   Markenkonform, im Stil der .detail-section-Cards.
=================================================================== */
.lead-briefing {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 16px;
}

/* Hervorgehobenes Callout (Gesprächs-Hook) */
.briefing-hook {
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.briefing-hook-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 6px;
}

/* Kennzahlen-Kacheln */
.briefing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.briefing-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.bs-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.bs-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

/* Trigger-Events */
.briefing-trigger { margin-top: 16px; }
.briefing-trigger-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.briefing-trigger-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}

/* ===================================================================
   RESPONSIVE-SICHERUNG (Tablet / kleinere Desktops)
=================================================================== */
@media (max-width: 1280px) {
  .leads-table-wrapper,
  .contacts-table-wrapper { overflow-x: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .modal, .modal-box { width: 92vw; }
}

/* ===================================================================
   LEAD-MEHRFACHAUSWAHL + SAMMEL-AKTIONSLEISTE (Bulk)
   Markup in js/leads.js. Nur vorhandene Design-Tokens verwendet.
=================================================================== */

/* Schmale Checkbox-Spalte in der Leads-Tabelle (th & td) */
.leads-check-col {
  width: 40px;
  text-align: center;
  white-space: nowrap;
}

/* Sichtbar vergrößerte Checkbox in CI-Crimson */
.lead-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
}

/* Hervorhebung der ausgewählten Zeilen – zarte Akzent-Tönung,
   harmoniert mit .lead-row:hover (var(--bg)) und sticht dezent hervor */
.lead-row.row-selected { background: var(--accent-light); }
.lead-row.row-selected:hover { background: var(--accent-light); }

/* Sammel-Aktionsleiste: zarte Akzent-Tönung mit Akzent-Kante,
   damit weiße .btn-outline-Buttons darauf gut lesbar bleiben */
.leads-bulk-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 18px;
  margin-bottom: 16px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* "X ausgewählt" – fett, Akzentfarbe, gut lesbar auf hellem Tint */
.bulk-count {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.bulk-count i { color: var(--accent); }

/* Container der Aktions-Buttons/Selects */
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Kompaktes Select in der Bar – angelehnt an .filter-select, schmaler */
.bulk-select {
  min-width: 150px;
  padding: 7px 10px;
  font-size: 13px;
}

/* ===================== ENRICHMENT & EINSTELLUNGEN (v1.5) ===================== */
.muted-hint { font-size: 12px; color: var(--text-muted); }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* Enrichment-Seite */
.enrich-page { padding: 4px 2px; }
.enrich-funnel {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin: 14px 0;
}
.funnel-step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.funnel-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}
.funnel-sep { color: var(--text-muted); font-size: 11px; margin: 0 4px; }

.enrich-toolbar { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.enrich-tool { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.enrich-hint { font-size: 12px; color: var(--text-secondary); background: var(--info-light); border: 1px solid #bfdbfe; padding: 7px 12px; border-radius: var(--radius-sm); }
.enrich-hint.ok { background: var(--success-light); border-color: #a7f3d0; color: var(--success); }
.enrich-icp-summary { font-size: 13px; color: var(--text-secondary); background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; }
.enrich-reason { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Score-Badge */
.score-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 4px 8px; border-radius: var(--radius-sm); font-weight: 800; font-size: 14px; }
.score-badge-lg { min-width: 64px; font-size: 26px; padding: 10px 14px; border-radius: var(--radius); }
.score-badge-lg small { font-size: 12px; font-weight: 600; opacity: .65; margin-left: 2px; }

/* Enrichment-Status-Chips */
.enrich-chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.enrich-chip-none { background: #eef1f8; color: var(--text-muted); }
.enrich-chip-hoch { background: var(--success-light); color: var(--success); }
.enrich-chip-mittel { background: var(--warning-light); color: var(--warning); }
.enrich-chip-niedrig { background: var(--info-light); color: var(--info); }
.enrich-chip-unbekannt { background: #eef1f8; color: var(--text-secondary); }

/* Enrichment-Panel im Lead-Detail */
.lead-enrichment-panel { background: linear-gradient(180deg, #fbfcff 0%, #f4f6fd 100%); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
.enrich-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.enrich-meta { display: flex; flex-direction: column; gap: 4px; }
.enrich-source { font-size: 12px; color: var(--text-muted); }
.enrich-summary { font-size: 14px; color: var(--text-primary); line-height: 1.5; margin: 6px 0; }
.enrich-why { margin: 8px 0; font-size: 13px; }
.enrich-why summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.enrich-why p { margin-top: 6px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.enrich-cites { margin-top: 10px; font-size: 13px; }
.enrich-cites ul { margin: 4px 0 0 18px; }
.enrich-cites a { color: var(--accent); }

/* Einstellungen-Seite */
.settings-page { padding: 4px 2px; }
.settings-head { margin-bottom: 16px; }
.settings-head .leads-count { display: block; margin-top: 4px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; align-items: start; }

/* Brand-Panel */
.brand-logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand-logo-preview { width: 64px; height: 64px; border: 1px dashed var(--border); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; text-align: center; padding: 4px; }
.brand-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-note { font-size: 12px; color: var(--text-muted); margin-top: 14px; line-height: 1.5; }
input[type="color"] { width: 100%; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }

/* Team / Mitarbeiter-Panel */
.team-card { grid-column: 1 / -1; margin-top: 20px; }   /* gleicher Abstand wie das Spalten-gap darüber */
.team-table-wrap { overflow-x: auto; }
.team-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.team-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.team-table td { padding: 10px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.team-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; overflow: hidden; }
/* Team-Panel: Avatar als Klick-Ziel für Profilbild-Upload (Admin) + Kamera-Badge beim Hover */
.team-avatar-wrap { position: relative; display: inline-flex; cursor: pointer; }
.team-avatar-edit {
  position: absolute; right: -2px; bottom: -2px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; border: 1.5px solid #fff;
  opacity: 0; transition: var(--transition); pointer-events: none;
}
.team-avatar-wrap:hover .team-avatar-edit { opacity: 1; }
.team-role { min-width: 110px; padding: 5px 8px; font-size: 13px; }
.team-add-title { margin: 20px 0 12px; font-size: 14px; font-weight: 700; color: var(--text-secondary); }
.role-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.role-admin { background: var(--accent-light); color: var(--accent-dark); }
.role-setter { background: var(--info-light); color: var(--info); }

/* ===================== ONBOARDING / SCHULUNG ===================== */
.ob-page { max-width: 960px; }
.ob-empty { padding: 40px; text-align: center; color: var(--text-muted); background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--radius); }

/* Dashboard-Banner */
.ob-banner { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-lighter) 100%); color: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow); border-left: 3px solid var(--accent); }
.ob-banner-icon { font-size: 24px; opacity: .9; }
.ob-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ob-banner-text span { font-size: 13px; opacity: .85; }
.ob-banner-dismiss { background: transparent; border: none; color: #fff; opacity: .65; cursor: pointer; padding: 4px; font-size: 15px; }
.ob-banner-dismiss:hover { opacity: 1; }

/* Gesamt-Fortschritt */
.ob-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.ob-progress-bar { flex: 1; height: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.ob-progress-fill { height: 100%; background: var(--success); border-radius: 999px; transition: width .4s cubic-bezier(.22,1,.36,1); }
.ob-progress-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.ob-cert-badge { font-size: 13px; }

/* Modul-Liste */
.ob-module-list { display: flex; flex-direction: column; gap: 12px; }
.ob-module-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: var(--transition); }
.ob-module-card:hover { border-color: var(--accent-muted); }
.ob-module-card.ob-status-passed { border-color: var(--success); }
.ob-module-num { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 800; background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.ob-status-passed .ob-module-num { background: var(--success); color: #fff; border-color: var(--success); }
.ob-module-body { flex: 1; min-width: 0; }
.ob-module-title { font-weight: 600; color: var(--text-primary); }
.ob-module-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.ob-module-status { flex-shrink: 0; }

/* Lektion */
.ob-lesson .card-header h3 { font-size: 15px; }
.ob-lesson-title { font-size: 19px; font-weight: 700; color: var(--text-primary); margin: 4px 0 10px; }
.ob-lesson-body { font-size: 15px; line-height: 1.65; color: var(--text-primary); white-space: pre-wrap; padding: 2px 0 14px; }
.ob-takeaway { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin: 2px 0 6px;
  background: var(--accent-light); border: 1px solid #f3c9d3; border-radius: var(--radius-sm); color: var(--accent-dark); font-size: 14px; }
.ob-takeaway i { margin-top: 3px; }

/* Quiz */
.quiz-progress { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.quiz-question { padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.quiz-question:last-of-type { border-bottom: none; }
.quiz-q-text { font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option { text-align: left; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); cursor: pointer; font-size: 14px; font-family: var(--font); color: var(--text-primary); transition: var(--transition); }
.quiz-option:hover { border-color: var(--accent); background: var(--accent-light); }
.quiz-option.selected { border-color: var(--accent); background: var(--accent-light); font-weight: 600; }
.quiz-option.correct { border-color: var(--success); background: var(--success-light); color: #065f46; cursor: default; }
.quiz-option.wrong { border-color: var(--danger); background: var(--danger-light); color: #991b1b; cursor: default; }
.quiz-explanation { margin-top: 10px; padding: 10px 12px; background: var(--info-light); color: #1e40af; border-radius: var(--radius-sm); font-size: 13px; }

/* Result */
.ob-result { text-align: center; }
.ob-result-icon { font-size: 52px; margin: 8px 0; }
.ob-result-pass { color: var(--success); }
.ob-result-fail { color: var(--danger); }
.ob-result-score { font-size: 26px; font-weight: 800; color: var(--text-primary); }
.ob-result-headline { color: var(--text-secondary); margin: 6px 0 14px; }
.ob-cert-celebrate { display: inline-flex; gap: 8px; align-items: center; padding: 10px 18px; margin-bottom: 14px;
  background: var(--success-light); color: #065f46; border-radius: 999px; font-weight: 700; }

/* ===================== ONBOARDING-EDITOR (Settings-Panel) ===================== */
.onboarding-card { margin-top: 20px; }
.onb-modules { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 4px; }
.onb-module { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-card); }
.onb-module-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg); }
.onb-toggle { flex: 1; display: flex; align-items: center; gap: 8px; background: transparent; border: none; cursor: pointer;
  text-align: left; font-family: var(--font); font-size: 14px; color: var(--text-primary); min-width: 0; }
.onb-toggle i { color: var(--accent-muted); width: 12px; }
.onb-toggle .muted-hint { margin-left: auto; flex-shrink: 0; }
.onb-module-body { padding: 10px 14px 14px; }
.onb-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 700; margin: 10px 0 6px; }
.onb-list { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.onb-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--bg); border-radius: var(--radius-sm); }
.onb-item-title { flex: 1; min-width: 0; font-size: 13px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onb-empty-row { color: var(--text-muted); font-size: 12px; font-style: italic; background: transparent !important; }
.onb-row-actions { display: inline-flex; gap: 4px; flex-shrink: 0; }
.btn-icon.danger:hover { border-color: var(--danger); color: var(--danger); }
.onb-edit-modal { max-width: 600px; }
.onb-option-row { display: flex; align-items: center; gap: 10px; }
.onb-option-row input[type="text"] { flex: 1; }
.onb-correct { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.onb-options-wrap { display: flex; flex-direction: column; gap: 8px; }

/* ===================== TELEPROMPTER-COACHING (Sidebar) ===================== */
#tpCoachingCard:empty { display: none; }
.tp-coaching-head { font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tp-coaching-key { font-size: 13px; color: var(--text-primary); background: var(--accent-light); padding: 8px 10px; border-radius: var(--radius-sm); margin-bottom: 8px; }
.tp-coaching-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 700; margin: 8px 0 4px; }
.tp-coaching-list { margin: 0 0 6px; padding-left: 18px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.tp-coaching-list.tp-coaching-fail { color: var(--text-muted); }
.tp-coaching .btn { margin-top: 6px; }
