/* ═══════════════════════════════════════════════════════════
   Allianz CRM – Apple / iOS Design Language
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Apple Color Palette */
  --ios-bg:        #F2F2F7;
  --ios-surface:   #FFFFFF;
  --ios-blue:      #007AFF;
  --ios-blue-bg:   #EBF4FF;
  --ios-green:     #34C759;
  --ios-green-bg:  #E8FAF0;
  --ios-orange:    #FF9500;
  --ios-orange-bg: #FFF3E0;
  --ios-red:       #FF3B30;
  --ios-red-bg:    #FFEBEA;
  --ios-yellow:    #FFCC00;
  --ios-divider:   #E5E5EA;
  --ios-text:      #1C1C1E;
  --ios-text2:     #3A3A3C;
  --ios-muted:     #8E8E93;
  --ios-muted2:    #AEAEB2;
  --ios-radius:    16px;
  --ios-radius-sm: 10px;
  --ios-shadow:    0 2px 8px rgba(0,0,0,.08), 0 0 1px rgba(0,0,0,.04);
  --ios-shadow-lg: 0 8px 30px rgba(0,0,0,.12);

  /* Legacy aliases used in old components */
  --allianz-blue:  #007AFF;
  --allianz-light: #3395FF;
  --bg:            #F2F2F7;
  --surface:       #FFFFFF;
  --border:        #E5E5EA;
  --text-main:     #1C1C1E;
  --text-muted:    #8E8E93;
  --green:         #34C759;
  --green-bg:      #E8FAF0;
  --orange:        #FF9500;
  --orange-bg:     #FFF3E0;
  --blue:          #007AFF;
  --blue-bg:       #EBF4FF;
  --gray-bg:       #F2F2F7;
  --red:           #FF3B30;
  --radius:        10px;
  --shadow:        0 2px 8px rgba(0,0,0,.08);
}

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

body {
  font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  background: var(--ios-bg);
  color: var(--ios-text);
  display: flex;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C7C7CC; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #AEAEB2; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */

.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--ios-surface);
  border-right: 1px solid var(--ios-divider);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--ios-divider);
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: var(--ios-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ios-text);
  letter-spacing: -.2px;
}

.brand-sub {
  font-size: 11px;
  color: var(--ios-muted);
  margin-top: 2px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--ios-radius-sm);
  color: var(--ios-text2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item:hover  { background: var(--ios-bg); color: var(--ios-text); }
.nav-item.active { background: var(--ios-blue-bg); color: var(--ios-blue); font-weight: 600; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

/* Sidebar legacy classes */
.sidebar-logo { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; border-bottom: 1px solid var(--ios-divider); }
.logo-title { font-weight: 700; color: var(--ios-text); font-size: 15px; }
.logo-sub   { font-size: 11px; color: var(--ios-muted); margin-top: 2px; }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--ios-divider); }
.agent-avatar { width: 34px; height: 34px; background: var(--ios-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.agent-name { font-size: 13px; font-weight: 600; color: var(--ios-text); }
.agent-role { font-size: 11px; color: var(--ios-muted); }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--ios-divider);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--ios-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 600; color: var(--ios-text); }
.user-role { font-size: 11px; color: var(--ios-muted); margin-top: 1px; }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */

.main, .main-content {
  flex: 1;
  overflow-y: auto;
  background: var(--ios-bg);
  display: flex;
  flex-direction: column;
}

/* ── PAGES ── */
.page        { display: none; padding: 24px 28px; }
.page.active { display: block; }

/* ── PAGE HEADER ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ios-text);
  letter-spacing: -.4px;
}

.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════
   STATS GRID
   ═══════════════════════════════════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--ios-surface);
  border-radius: var(--ios-radius);
  padding: 20px;
  box-shadow: var(--ios-shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  border-right: 1px solid #DDE2EA;
  overflow: hidden;
}
.stat-card.stat-blue   { border-top: 3px solid var(--ios-blue); }
.stat-card.stat-orange { border-top: 3px solid var(--ios-orange); }
.stat-card.stat-green  { border-top: 3px solid var(--ios-green); }

.stat-label { font-size: 12px; font-weight: 600; color: var(--ios-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 32px; font-weight: 700; color: var(--ios-text); letter-spacing: -.5px; }
.stat-icon  { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 30px; opacity: .08; }

/* ═══════════════════════════════════════════════════════════
   CARD
   ═══════════════════════════════════════════════════════════ */

.card {
  background: var(--ios-surface);
  border-radius: var(--ios-radius);
  box-shadow: var(--ios-shadow);
  overflow: hidden;
}

.card-header {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ios-text);
  border-bottom: 1px solid var(--ios-divider);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--ios-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s, background .15s;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn:disabled { opacity: .4; cursor: default; }

.btn-primary       { background: var(--ios-blue); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-secondary     { background: var(--ios-bg); color: var(--ios-text); }
.btn-secondary:hover { background: var(--ios-divider); }
.btn-success       { background: var(--ios-green); color: #fff; }
.btn-success:hover { opacity: .88; }
.btn-danger        { background: var(--ios-red); color: #fff; }
.btn-danger:hover  { opacity: .88; }
.btn-danger-outline{ background: transparent; color: var(--ios-red); border: 1.5px solid var(--ios-red); }
.btn-danger-outline:hover { background: var(--ios-red-bg); }
.btn-ghost         { background: transparent; color: var(--ios-muted); }
.btn-ghost:hover   { background: var(--ios-bg); }
.btn-full          { width: 100%; justify-content: center; }
.btn-sm            { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-stop          { background: #C7C7CC; color: #fff; cursor: not-allowed; }
.btn-stop.active   { background: var(--ios-red); cursor: pointer; }
.btn-stop.active:hover { opacity: .88; }

/* ═══════════════════════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════════════════════ */

.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
  padding: 9px 14px;
  border-radius: var(--ios-radius-sm);
  border: 1.5px solid var(--ios-divider);
  font-size: 14px;
  background: var(--ios-surface);
  color: var(--ios-text);
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.filter-bar input:focus,
.filter-bar select:focus { border-color: var(--ios-blue); }
.filter-bar input { flex: 1; min-width: 220px; }

/* ═══════════════════════════════════════════════════════════
   TABLE (general)
   ═══════════════════════════════════════════════════════════ */

.table-wrapper { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--ios-surface);
  border-radius: var(--ios-radius);
  box-shadow: var(--ios-shadow);
  overflow: hidden;
}

.data-table th {
  background: var(--ios-bg);
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  color: var(--ios-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--ios-divider);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--ios-bg);
  vertical-align: middle;
  color: var(--ios-text);
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #FAFAFE; }
.data-table tbody tr.status-positiv { background: var(--ios-green-bg); }
.data-table tbody tr.status-positiv:hover { background: #D4F5E2; }

.col-check { width: 36px; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--ios-blue); }

.empty-state {
  text-align: center;
  color: var(--ios-muted);
  padding: 48px;
  font-size: 14px;
}

/* ── STATUS BADGES ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
}
.status-badge:hover { opacity: .8; }

.status-nicht   { background: var(--ios-bg);        color: var(--ios-muted);   }
.status-angesch { background: var(--ios-blue-bg);   color: var(--ios-blue);   }
.status-geantw  { background: var(--ios-orange-bg); color: var(--ios-orange); }
.status-positiv { background: var(--ios-green-bg);  color: var(--ios-green);  font-weight: 700; }

/* ── PAGINATION (general) ── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--ios-divider);
  background: var(--ios-surface);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  color: var(--ios-text);
  font-family: inherit;
}
.page-btn:hover  { border-color: var(--ios-blue); color: var(--ios-blue); }
.page-btn.active { background: var(--ios-blue); color: #fff; border-color: var(--ios-blue); }

/* ═══════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════ */

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ios-text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius-sm);
  font-size: 14px;
  color: var(--ios-text);
  background: var(--ios-surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--ios-blue);
  box-shadow: 0 0 0 3px rgba(0,122,255,.12);
}

.hint { font-size: 12px; color: var(--ios-muted); margin-top: 4px; display: block; line-height: 1.5; }
.hint a { color: var(--ios-blue); }

.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.two-col       { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two-col-small { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ═══════════════════════════════════════════════════════════
   SCRAPER
   ═══════════════════════════════════════════════════════════ */

.scraper-log, .log-box {
  background: #1C1C1E;
  color: #A8D8A8;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  padding: 14px;
  border-radius: var(--ios-radius-sm);
  min-height: 180px;
  max-height: 340px;
  overflow-y: auto;
  line-height: 1.7;
}

.log-info  { color: #93C5FD; }
.log-warn  { color: #FCD34D; }
.log-error { color: #FCA5A5; }
.log-ok    { color: #6EE7B7; }

.progress-bar {
  height: 6px;
  background: var(--ios-divider);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--ios-blue);
  border-radius: 3px;
  transition: width .3s;
  width: 0%;
}

.progress-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  margin-bottom: 12px;
  color: var(--ios-muted);
}
.progress-stats strong { color: var(--ios-text); }

.live-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  margin-bottom: 12px;
  color: var(--ios-muted);
}
.live-stats strong { color: var(--ios-text); }

/* ═══════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════ */

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

.modal {
  background: var(--ios-surface);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  animation: slideUp .22s ease;
}
.modal-lg { max-width: 680px; }

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--ios-divider);
}

.modal-header h2 { font-size: 17px; font-weight: 700; color: var(--ios-text); letter-spacing: -.3px; }

.modal-close {
  background: var(--ios-bg);
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--ios-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.modal-close:hover { background: var(--ios-divider); }

.modal-body { padding: 20px 24px 24px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

/* ═══════════════════════════════════════════════════════════
   EMAIL TEMPLATES
   ═══════════════════════════════════════════════════════════ */

.templates-list { display: flex; flex-direction: column; gap: 10px; }

.template-card {
  background: var(--ios-surface);
  border-radius: var(--ios-radius-sm);
  box-shadow: var(--ios-shadow);
  padding: 16px 20px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
}
.template-card:hover  { border-color: var(--ios-blue); }
.template-card.active { border-color: var(--ios-blue); }

.template-card-name    { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: var(--ios-text); }
.template-card-subject { font-size: 13px; color: var(--ios-muted); }
.template-card-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ═══════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ios-bg);
  color: var(--ios-muted);
}
.badge-green  { background: var(--ios-green-bg);  color: var(--ios-green);  }
.badge-blue   { background: var(--ios-blue-bg);   color: var(--ios-blue);   }
.badge-orange { background: var(--ios-orange-bg); color: var(--ios-orange); }
.badge-red    { background: var(--ios-red-bg);    color: var(--ios-red);    }
.badge-gray   { background: var(--ios-bg);        color: var(--ios-muted);  }

/* ═══════════════════════════════════════════════════════════
   JOB LIST
   ═══════════════════════════════════════════════════════════ */

.job-list { padding: 8px 0; }
.job-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--ios-bg);
  font-size: 13px;
}
.job-item:last-child { border-bottom: none; }
.job-source { font-weight: 600; color: var(--ios-blue); width: 120px; }
.job-term   { flex: 1; color: var(--ios-muted); }
.job-stats  { display: flex; gap: 12px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════
   SOURCE BARS
   ═══════════════════════════════════════════════════════════ */

.source-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 13px;
}
.source-bar-name  { width: 140px; font-weight: 500; color: var(--ios-text); }
.source-bar-track { flex: 1; height: 8px; background: var(--ios-divider); border-radius: 4px; overflow: hidden; }
.source-bar-fill  { height: 100%; background: var(--ios-blue); border-radius: 4px; transition: width .6s; }
.source-bar-count { width: 40px; text-align: right; font-weight: 600; color: var(--ios-muted); }

/* ═══════════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════════ */

.settings-msg {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--ios-radius-sm);
  font-size: 13px;
  font-weight: 500;
}
.settings-msg.ok  { background: var(--ios-green-bg);  color: var(--ios-green); }
.settings-msg.err { background: var(--ios-red-bg);    color: var(--ios-red);   }

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.toast {
  padding: 13px 20px;
  border-radius: var(--ios-radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  animation: fadeIn .2s ease;
  max-width: 340px;
}
.toast-ok    { background: var(--ios-green); color: #fff; }
.toast-error { background: var(--ios-red);   color: #fff; }
.toast-info  { background: var(--ios-blue);  color: #fff; }

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

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col    { grid-template-columns: 1fr; }
  .main, .main-content { padding: 0; }
}

@media (max-width: 600px) {
  .sidebar     { display: none; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   SCHEDULER
   ═══════════════════════════════════════════════════════════ */

.nav-badge {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--ios-green);
  border-radius: 50%;
  margin-left: 4px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

.scheduler-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-radius: var(--ios-radius);
  box-shadow: var(--ios-shadow);
  gap: 20px;
  flex-wrap: wrap;
}
.scheduler-banner-stopped { background: var(--ios-surface); border: 1.5px solid var(--ios-divider); }
.scheduler-banner-running { background: var(--ios-green-bg); border: 1.5px solid var(--ios-green); }
.scheduler-banner-waiting { background: #FFFBEB; border: 1.5px solid #FCD34D; }

.banner-left  { display: flex; align-items: center; gap: 16px; }
.banner-icon  { font-size: 36px; }
.banner-title { font-size: 18px; font-weight: 700; color: var(--ios-text); }
.banner-sub   { font-size: 13px; color: var(--ios-muted); margin-top: 3px; }
.banner-right { display: flex; gap: 28px; }

.banner-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.banner-stat span  { font-size: 28px; font-weight: 800; color: var(--ios-text); line-height: 1; }
.banner-stat small { font-size: 11px; color: var(--ios-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }

.scheduler-rules { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rule-item {
  font-size: 13px;
  color: var(--ios-text);
  padding: 7px 12px;
  background: var(--ios-bg);
  border-radius: 8px;
  border-left: 3px solid var(--ios-blue);
}

.next-send-box {
  margin-top: 20px;
  background: var(--ios-blue-bg);
  border: 1px solid rgba(0,122,255,.2);
  border-radius: var(--ios-radius-sm);
  padding: 16px;
  text-align: center;
}
.next-send-label     { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ios-blue); font-weight: 600; }
.next-send-time      { font-size: 26px; font-weight: 800; color: var(--ios-blue); margin: 4px 0; }
.next-send-countdown { font-size: 13px; color: var(--ios-muted); }

.weekly-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--ios-bg);
  font-size: 13px;
}
.weekly-row:last-child { border-bottom: none; }
.weekly-date { width: 90px; color: var(--ios-muted); }
.weekly-bar  { flex: 1; height: 6px; background: var(--ios-divider); border-radius: 3px; overflow: hidden; }
.weekly-fill { height: 100%; background: var(--ios-green); border-radius: 3px; }
.weekly-num  { width: 30px; text-align: right; font-weight: 600; color: var(--ios-text); }

.log-status-sent  { color: var(--ios-green); font-weight: 600; }
.log-status-error { color: var(--ios-red);   font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   MISC
   ═══════════════════════════════════════════════════════════ */

hr { border: none; border-top: 1px solid var(--ios-divider); margin: 16px 0; }
a  { color: var(--ios-blue); }

.text-truncate {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

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

/* ═══════════════════════════════════════════════════════════
   DASHBOARD / LANDING PAGE
   ═══════════════════════════════════════════════════════════ */

.dash-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  box-sizing: border-box;
  background: #fff;
  font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  overflow-y: auto;
}

/* ── Shared section layout ── */
.lp-section {
  padding: 80px 32px;
}
.lp-section-light { background: #fff; }
.lp-section-gray  { background: var(--ios-bg); }
.lp-section-dark  { background: #1C1C1E; }

.lp-section-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.lp-section-narrow { max-width: 760px; }

.lp-section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--ios-blue);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lp-eyebrow-light { color: rgba(255,255,255,.5); }

.lp-section-h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--ios-text);
  letter-spacing: -.7px;
  margin-bottom: 48px;
  line-height: 1.15;
}
.lp-h2-light { color: #fff; }

/* ── Shared buttons ── */
.lp-btn-primary {
  background: var(--ios-blue);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 15px 36px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(0,122,255,.4);
  transition: transform .15s, box-shadow .15s;
}
.lp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,122,255,.5); }

.lp-btn-ghost {
  background: transparent;
  color: var(--ios-text);
  border: 1.5px solid var(--ios-divider);
  border-radius: 14px;
  padding: 15px 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s;
}
.lp-btn-ghost:hover { border-color: #AEAEB2; }

.lp-btn-ghost-light {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 14px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.lp-btn-ghost-light:hover { background: rgba(255,255,255,0.1); }

.lp-btn-large { padding: 18px 44px; font-size: 17px; }

/* ── ① HERO ── */
.lp-hero {
  background: linear-gradient(145deg, #0a0a12 0%, #111827 50%, #0d1b2a 100%);
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  position: relative;
  overflow: hidden;
}
.lp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(0,122,255,.18) 0%, transparent 70%);
  pointer-events: none;
}
.lp-hero-inner {
  max-width: 720px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}
.lp-hero-eyebrow {
  display: inline-block;
  background: rgba(0,122,255,.15);
  border: 1px solid rgba(0,122,255,.35);
  color: #60A5FA;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 28px;
}
.lp-hero-h1 {
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.lp-hero-accent {
  background: linear-gradient(90deg, #60A5FA, #38BDF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lp-hero-sub {
  color: rgba(255,255,255,.6);
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.lp-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
.lp-hero-badge {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.8);
  border-radius: 20px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(6px);
}
.lp-hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.lp-hero-counter {
  color: rgba(255,255,255,.35);
  font-size: 13px;
}
.lp-hero-counter strong { color: rgba(255,255,255,.6); }

/* ── ② STEPS ── */
.lp-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.lp-step {
  flex: 1;
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--ios-shadow);
  transition: box-shadow .2s;
}
.lp-step:hover { box-shadow: var(--ios-shadow-lg); }

.lp-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ios-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
}
.lp-step-icon { font-size: 36px; margin-bottom: 16px; line-height: 1; }
.lp-step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ios-text);
  margin-bottom: 12px;
  letter-spacing: -.2px;
}
.lp-step-desc {
  font-size: 14px;
  color: var(--ios-muted);
  line-height: 1.65;
}
.lp-step-arrow {
  flex-shrink: 0;
  font-size: 24px;
  color: var(--ios-muted2);
  align-self: center;
  padding: 0 12px;
  margin-top: -24px;
}

/* ── ③ STATS ── */
.lp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.lp-stat-card {
  text-align: center;
  padding: 36px 20px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--ios-radius);
  background: rgba(255,255,255,.04);
}
.lp-stat-num {
  font-size: 44px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 12px;
}
.lp-stat-label {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  line-height: 1.4;
}

/* ── ④ COMPARE ── */
.lp-compare-wrap {
  overflow-x: auto;
  border-radius: var(--ios-radius);
  box-shadow: var(--ios-shadow);
}
.lp-compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--ios-surface);
  border-radius: var(--ios-radius);
  overflow: hidden;
}
.lp-compare thead th {
  padding: 16px 24px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--ios-bg);
}
.lp-cmp-feature { text-align: left; color: var(--ios-muted); }
.lp-cmp-old     { text-align: center; color: var(--ios-muted); }
.lp-cmp-new     { text-align: center; color: var(--ios-blue); }

.lp-compare tbody td {
  padding: 14px 24px;
  font-size: 14px;
  border-top: 1px solid var(--ios-divider);
}
.lp-compare tbody td:first-child { font-weight: 500; color: var(--ios-text); }
.lp-no  { text-align: center; color: var(--ios-muted); }
.lp-yes { text-align: center; color: var(--ios-green); font-weight: 600; }
.lp-compare tbody tr:hover td { background: var(--ios-bg); }

/* ── ⑤ PERSONAS ── */
.lp-personas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.lp-persona {
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius);
  padding: 36px 28px;
  box-shadow: var(--ios-shadow);
  transition: box-shadow .2s;
}
.lp-persona:hover { box-shadow: var(--ios-shadow-lg); }
.lp-persona-icon { font-size: 40px; margin-bottom: 16px; line-height: 1; }
.lp-persona-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ios-text);
  margin-bottom: 10px;
  letter-spacing: -.3px;
}
.lp-persona-desc {
  font-size: 14px;
  color: var(--ios-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}
.lp-persona-plan {
  display: inline-block;
  background: var(--ios-blue-bg);
  color: var(--ios-blue);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: .3px;
}

/* ── ⑥ TESTIMONIALS ── */
.lp-testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.lp-testi {
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius);
  padding: 32px 28px;
  box-shadow: var(--ios-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lp-testi-stars {
  color: var(--ios-orange);
  font-size: 18px;
  letter-spacing: 2px;
}
.lp-testi-text {
  font-size: 14px;
  color: var(--ios-text2);
  line-height: 1.7;
  flex: 1;
  font-style: italic;
}
.lp-testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lp-testi-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ios-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.lp-testi-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ios-text);
}
.lp-testi-role {
  font-size: 12px;
  color: var(--ios-muted);
  margin-top: 2px;
}

/* ── ⑦ PRICING (reuse dash-* classes, wraps in lp-section) ── */
.lp-section .dash-pricing {
  margin-bottom: 0;
}

/* Billing Toggle */
.pricing-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}
.pricing-toggle {
  display: inline-flex;
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
  box-shadow: var(--ios-shadow);
}
.ptog-btn {
  border: none;
  background: transparent;
  border-radius: 9px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ios-muted);
  cursor: pointer;
  font-family: inherit;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.ptog-btn.ptog-active {
  background: var(--ios-blue);
  color: #fff;
  font-weight: 600;
}
.ptog-save {
  font-size: 11px;
  font-weight: 700;
  color: inherit;
  opacity: .85;
}

/* Yearly total line below price */
.dash-yearly-total {
  font-size: 12px;
  color: var(--ios-muted);
  margin-top: -14px;
  letter-spacing: .1px;
}

/* Savings badge on card (top-right) */
.dash-save-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--ios-green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
}

/* Billing radio section in register modal */
.reg-billing-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reg-billing-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--ios-divider);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.reg-billing-opt input[type="radio"] { flex-shrink: 0; accent-color: var(--ios-blue); width: 16px; height: 16px; cursor: pointer; }
.reg-billing-opt:hover { border-color: var(--ios-blue); background: var(--ios-blue-bg); }
.reg-billing-opt-active { border-color: var(--ios-blue) !important; background: var(--ios-blue-bg) !important; }
.reg-billing-info { display: flex; flex-direction: column; gap: 2px; }
.reg-billing-title { font-size: 14px; font-weight: 600; color: var(--ios-text); }
.reg-billing-price { font-size: 12px; color: var(--ios-muted); }
.reg-billing-save {
  display: inline-block;
  background: var(--ios-green-bg);
  color: var(--ios-green);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: .3px;
  vertical-align: middle;
}

/* ── ⑧ FAQ ACCORDION ── */
.lp-faq {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--ios-radius);
  overflow: hidden;
  border: 1.5px solid var(--ios-divider);
  background: var(--ios-surface);
  box-shadow: var(--ios-shadow);
}
.lp-faq-item {
  border-bottom: 1px solid var(--ios-divider);
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.lp-faq-item:last-child { border-bottom: none; }
.lp-faq-item:hover { background: var(--ios-bg); }
.lp-faq-item.open { background: var(--ios-bg); }
.lp-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ios-text);
  gap: 16px;
}
.lp-faq-chevron {
  font-size: 20px;
  color: var(--ios-muted);
  transition: transform .25s;
  flex-shrink: 0;
  line-height: 1;
}
.lp-faq-item.open .lp-faq-chevron {
  transform: rotate(90deg);
}
.lp-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  font-size: 14px;
  color: var(--ios-muted);
  line-height: 1.7;
  padding: 0 24px;
}
.lp-faq-item.open .lp-faq-a {
  max-height: 300px;
  padding: 0 24px 20px;
}

/* ── ⑨ FINAL CTA ── */
.lp-final-cta {
  background: linear-gradient(145deg, #0a0a12 0%, #111827 100%);
  padding: 100px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lp-final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, rgba(0,122,255,.2) 0%, transparent 70%);
  pointer-events: none;
}
.lp-final-cta .lp-section-inner { position: relative; z-index: 1; }
.lp-cta-badge {
  display: inline-block;
  background: rgba(0,122,255,.2);
  border: 1px solid rgba(0,122,255,.4);
  color: #60A5FA;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 28px;
  letter-spacing: .3px;
}
.lp-cta-h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.15;
}
.lp-cta-sub {
  font-size: 18px;
  color: rgba(255,255,255,.55);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.lp-cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.lp-cta-note {
  font-size: 13px;
  color: rgba(255,255,255,.3);
  letter-spacing: .2px;
}

/* ── Fade-in scroll animation ── */
.lp-fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.lp-fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ── Pricing Grid (shared) ── */
.dash-pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 64px;
}

.dash-card {
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  border-right: 1px solid #DDE2EA;
  box-shadow: var(--ios-shadow);
  transition: box-shadow .2s, border-color .2s;
}
.dash-card:hover {
  box-shadow: var(--ios-shadow-lg);
  border-color: #C7C7CC;
}

.dash-card-featured {
  border-color: var(--ios-blue);
  border-width: 2px;
}
.dash-card-featured:hover { border-color: var(--ios-blue); }

.dash-card-agency {
  border-color: var(--ios-orange);
  border-width: 2px;
}

.dash-popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ios-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.dash-tier {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--ios-green);
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 4px;
}
.dash-tier-blue { color: var(--ios-blue); }
.dash-tier-gold { color: var(--ios-orange); }

.dash-price-wrap { display: flex; align-items: baseline; gap: 2px; }
.dash-price    { font-size: 48px; font-weight: 800; color: var(--ios-text); line-height: 1; letter-spacing: -2px; }
.dash-currency { font-size: 20px; font-weight: 700; color: var(--ios-muted); }
.dash-period   { font-size: 13px; color: var(--ios-muted); margin-left: 4px; }

.dash-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.df-on, .df-off {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.df-on::before  { content: '✓'; color: var(--ios-green); font-weight: 700; flex-shrink: 0; }
.df-off::before { content: '–'; color: var(--ios-muted2); flex-shrink: 0; }
.df-on  { color: var(--ios-text); }
.df-off { color: var(--ios-muted2); }

.dash-btn {
  border: none;
  border-radius: var(--ios-radius-sm);
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
  width: 100%;
  font-family: inherit;
}
.dash-btn:hover { opacity: .85; }

.dash-btn-ghost {
  background: var(--ios-bg);
  border: 1.5px solid var(--ios-divider);
  color: var(--ios-text2);
}
.dash-btn-primary {
  background: var(--ios-blue);
  color: #fff;
}
.dash-btn-gold {
  background: var(--ios-orange);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   FIRMEN PAGE
   ═══════════════════════════════════════════════════════════ */

.fp-page {
  margin: 0;
  padding: 28px 32px 48px;
  min-height: 100vh;
  box-sizing: border-box;
  background: var(--ios-bg);
}

/* ── Header ── */
.fp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.fp-eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--ios-blue);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.fp-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ios-text);
  letter-spacing: -.5px;
  margin: 0;
  line-height: 1.15;
}

.fp-title-accent {
  color: var(--ios-blue);
}

/* ── Stats row ── */
.fp-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fp-stat {
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius-sm);
  padding: 12px 20px;
  text-align: center;
  min-width: 80px;
  box-shadow: var(--ios-shadow);
}

.fp-stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--ios-text);
  line-height: 1;
  letter-spacing: -.5px;
}
.fp-col-cyan  { color: var(--ios-blue);   }
.fp-col-green { color: var(--ios-green);  }
.fp-col-gold  { color: var(--ios-orange); }

.fp-stat-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ios-muted);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ── Toolbar ── */
.fp-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.fp-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius-sm);
  padding: 0 14px;
  flex: 1;
  min-width: 200px;
  color: var(--ios-muted);
  transition: border-color .15s;
  box-shadow: var(--ios-shadow);
}
.fp-search-box:focus-within {
  border-color: var(--ios-blue);
  box-shadow: 0 0 0 3px rgba(0,122,255,.1);
}

.fp-search {
  background: none;
  border: none;
  outline: none;
  color: var(--ios-text);
  font-size: 14px;
  padding: 11px 0;
  width: 100%;
  font-family: inherit;
}
.fp-search::placeholder { color: var(--ios-muted2); }

.fp-select {
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius-sm);
  color: var(--ios-text);
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--ios-shadow);
  transition: border-color .15s;
}
.fp-select:focus { border-color: var(--ios-blue); }

.fp-add-btn {
  background: var(--ios-blue);
  border: none;
  border-radius: var(--ios-radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: opacity .15s;
}
.fp-add-btn:hover { opacity: .88; }

/* ── Table ── */
.fp-table-wrap {
  background: var(--ios-surface);
  border-radius: var(--ios-radius);
  overflow: hidden;
  overflow-x: auto;
  box-shadow: var(--ios-shadow);
}

.fp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.fp-table thead tr {
  background: var(--ios-bg);
  border-bottom: 1px solid var(--ios-divider);
}

.fp-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ios-muted);
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.fp-table td {
  padding: 0 16px;
  height: 56px;
  color: var(--ios-muted);
  border-bottom: 1px solid var(--ios-bg);
  vertical-align: middle;
}
.fp-table tbody tr:last-child td { border-bottom: none; }
.fp-table tbody tr { transition: background .12s; }
.fp-table tbody tr:hover { background: #F7F9FF; }

.fp-row-name  { font-weight: 700; color: var(--ios-text); font-size: 14px; max-width: 200px; }
.fp-row-tel   { color: var(--ios-blue); text-decoration: none; font-size: 13px; white-space: nowrap; font-weight: 500; }
.fp-row-null  { color: var(--ios-muted2); }
.fp-row-small { font-size: 13px; color: var(--ios-muted); }

.fp-assigned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 3px;
  font-weight: 600;
}
.fp-assigned-yes {
  background: var(--ios-blue-bg);
  color: var(--ios-blue);
}
.fp-assigned-no {
  background: var(--ios-bg);
  color: var(--ios-muted2);
}

.fp-empty {
  text-align: center;
  padding: 56px;
  color: var(--ios-muted);
  font-size: 14px;
}

/* ── Status Cell ── */
.fp-status-cell {
  display: inline-block;
  position: relative;
  border-right: 1px solid #DDE2EA;
}

/* ── Custom Status Dropdown ── */
.fp-status-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 500;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.05);
  padding: 6px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fp-status-opt {
  padding: 5px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .1s;
}
.fp-status-opt:hover       { background: var(--ios-bg); }
.fp-status-opt-active      { background: var(--ios-bg); }

.fp-table td:last-child { width: 40px; text-align: center; }
.fp-table th:last-child { width: 40px; }
.fp-trash-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 8px;
  opacity: 0.5;
  transition: opacity .15s, background .15s;
  line-height: 1;
}
.fp-trash-btn:hover {
  opacity: 1;
  background: rgba(255,59,48,.1);
}

/* Legacy selects (kept for safety, no longer generated) */
.fp-status-sel {
  background: var(--ios-bg);
  border: 1.5px solid var(--ios-divider);
  border-radius: 20px;
  color: var(--ios-text);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}
.fp-st-nicht_angerufen    { background: var(--ios-bg);        border-color: var(--ios-divider);  color: var(--ios-muted);   }
.fp-st-nicht_erreicht     { background: var(--ios-orange-bg); border-color: var(--ios-orange);   color: var(--ios-orange);  }
.fp-st-interessiert       { background: var(--ios-green-bg);  border-color: var(--ios-green);    color: var(--ios-green);   }
.fp-st-nicht_interessiert { background: var(--ios-red-bg);    border-color: var(--ios-red);      color: var(--ios-red);     }
.fp-st-termin             { background: var(--ios-blue-bg);   border-color: var(--ios-blue);     color: var(--ios-blue);    }

/* ── Note Input ── */
.fp-note {
  background: var(--ios-bg);
  border: 1.5px solid var(--ios-divider);
  border-radius: 8px;
  color: var(--ios-text);
  font-size: 13px;
  padding: 6px 10px;
  width: 170px;
  height: 32px;
  min-height: 32px;
  outline: none;
  font-family: inherit;
  resize: none;
  overflow: hidden;
  display: block;
  transition: height .2s, width .2s, border-color .15s, box-shadow .15s;
  line-height: 1.4;
  white-space: nowrap;
}
.fp-note::placeholder { color: var(--ios-muted2); }
.fp-note:focus {
  border-color: var(--ios-blue);
  box-shadow: 0 0 0 3px rgba(0,122,255,.1);
  background: var(--ios-surface);
  height: 120px;
  min-height: 120px;
  width: 250px;
  resize: vertical;
  overflow: auto;
  white-space: normal;
  position: relative;
  border-right: 1px solid #DDE2EA;
  z-index: 10;
}

/* ── Wiedervorlage Button ── */
.fp-followup-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #FF9500;
  background: #fff;
  color: #E65100;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s;
  font-family: inherit;
}
.fp-followup-btn:hover { background: #FFF3E0; }

/* Already-set button — filled orange */
.fp-followup-btn-set {
  background: #FFF3E0;
  font-weight: 600;
}
.fp-followup-btn-set:hover { background: #FFE0B2; }

/* ── Wiedervorlage Modal Inputs ── */
.wv-company-name {
  font-size: 13px;
  color: var(--ios-muted);
  margin-bottom: 16px;
  font-weight: 500;
}
.wv-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #E5E5EA;
  background: var(--ios-surface);
  font-size: 15px;
  font-family: inherit;
  color: var(--ios-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.wv-input:focus {
  border-color: var(--ios-blue);
  box-shadow: 0 0 0 3px rgba(0,122,255,.12);
}

/* ── Pagination ── */
.fp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.fp-pg-btn {
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius-sm);
  color: var(--ios-blue);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  font-family: inherit;
  box-shadow: var(--ios-shadow);
}
.fp-pg-btn:hover:not(:disabled) { background: var(--ios-blue-bg); border-color: var(--ios-blue); }
.fp-pg-btn:disabled { opacity: .3; cursor: default; }

.fp-page-info {
  font-size: 13px;
  color: var(--ios-muted);
  font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════
   KALENDER – OUTLOOK/GOOGLE CALENDAR STYLE
   ═══════════════════════════════════════════════════════════ */

.kal-page {
  margin: 0;
  padding: 28px 32px 48px;
  min-height: 100vh;
  background: #F5F7FA;
}
.kal-wrap { max-width: 1300px; margin: 0 auto; }

/* ── Header ── */
.kal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.kal-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #D9DDE4;
  background: #fff;
  color: #333;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, border-color .12s, color .12s;
  line-height: 1;
}
.kal-nav-btn:hover { background: #EBF4FF; border-color: #007AFF; color: #007AFF; }
.kal-today-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #D9DDE4;
  background: #fff;
  color: #444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.kal-today-btn:hover { background: #EBF4FF; border-color: #007AFF; color: #007AFF; }
.kal-month-label {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin-left: 10px;
  letter-spacing: -.02em;
}
.kal-add-btn {
  padding: 9px 20px;
  border-radius: 10px;
  border: none;
  background: #007AFF;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, transform .1s;
  box-shadow: 0 2px 8px rgba(0,122,255,.25);
}
.kal-add-btn:hover { background: #0066D6; transform: translateY(-1px); }
.kal-add-btn:active { transform: translateY(0); }

/* ── Weekday Header ── */
.kal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid #DDE2EA;
  border-bottom: 1px solid #DDE2EA;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: #F8F9FB;
}
.kal-weekdays > div {
  padding: 11px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  color: #777;
  border-right: 1px solid #DDE2EA;
}
.kal-weekdays > div:last-child { border-right: none; }
.kal-weekend { color: #D04040 !important; }

/* ── Calendar Grid ── */
.kal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid #DDE2EA;
  border-top: 1px solid #DDE2EA;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  background: #DDE2EA;
  row-gap: 1px;
  column-gap: 0;
}
.kal-cell {
  background: #fff;
  height: 120px;
  overflow: hidden;
  padding: 6px 7px 8px;
  cursor: pointer;
  transition: background .1s;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  border-right: 1px solid #DDE2EA;
}
.kal-cell:hover { background: #F7F9FF; }
.kal-cell-empty {
  background: #FAFBFC;
  cursor: default;
  height: 120px;
  overflow: hidden;
  border-right: 1px solid #DDE2EA;
}
.kal-cell-empty:hover { background: #FAFBFC; }
.kal-grid > div:nth-child(7n) { border-right: none; }
.kal-cell-today { background: #F0F6FF; }
.kal-cell-today:hover { background: #E8F0FF; }

/* ── Day Number ── */
.kal-cell-num-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 3px;
  flex-shrink: 0;
}
.kal-cell-num {
  font-size: 13px;
  font-weight: 500;
  color: #555;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.kal-num-today {
  background: #007AFF;
  color: #fff !important;
  font-weight: 700;
}

/* ── Termin Badge ── */
.kal-badge {
  display: block;
  background: #EBF4FF;
  color: #007AFF;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background .1s, color .1s;
  max-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}
.kal-badge:hover { background: #BFDBFF; color: #005CC5; }

/* Wiedervorlage-Termine — orange */
.kal-badge-wv {
  background: #FFF3E0;
  color: #E65100;
}
.kal-badge-wv:hover { background: #FFE0B2; color: #BF360C; }

/* ── More Indicator ── */
.kal-more {
  display: block;
  font-size: 11px;
  color: #999;
  font-weight: 500;
  padding: 1px 6px;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  box-sizing: border-box;
}
.kal-more:hover { color: #007AFF; background: #F0F6FF; }

/* ── Termin Popup (floating card) ── */
.kal-popup {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: transparent;
  pointer-events: none;
}
.kal-popup-card {
  position: absolute;
  background: #fff;
  border: 1px solid #E0E5EB;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  padding: 18px 20px 16px;
  min-width: 240px;
  max-width: 280px;
  pointer-events: all;
  z-index: 901;
}
.kal-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 16px;
  color: #aaa;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 5px;
  line-height: 1;
}
.kal-popup-close:hover { background: #F5F5F5; color: #333; }
.kal-popup-time {
  font-size: 12px;
  color: #007AFF;
  font-weight: 600;
  margin-bottom: 5px;
}
.kal-popup-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin-bottom: 18px;
  line-height: 1.3;
  padding-right: 22px;
  word-break: break-word;
}
.kal-popup-actions { display: flex; justify-content: flex-end; gap: 8px; }
.kal-popup-edit {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #C5D9FF;
  background: #EBF4FF;
  color: #007AFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .1s;
}
.kal-popup-edit:hover { background: #BFDBFF; border-color: #007AFF; }
.kal-popup-delete {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #FFD0D0;
  background: #FFF5F5;
  color: #E53E3E;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .1s;
}
.kal-popup-delete:hover { background: #FFE5E5; border-color: #FC8181; }

/* ── Delete Termin Modal ── */
.modal-delete { max-width: 400px; }
.delete-modal-desc {
  color: #666;
  font-size: 14px;
  margin: 0 0 14px;
  line-height: 1.5;
}
.delete-modal-info {
  background: #F7F9FF;
  border: 1px solid #DCE8FF;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 22px;
}
.delete-modal-time {
  font-size: 12px;
  color: #007AFF;
  font-weight: 600;
  margin-bottom: 4px;
}
.delete-modal-title { font-size: 16px; font-weight: 700; color: #111; }

/* ── Buttons ── */
.btn-danger {
  background: #E53E3E;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s;
}
.btn-danger:hover { background: #C53030; }


/* ═══════════════════════════════════════════════════════════
   TOP BAR — sticky global header
   ═══════════════════════════════════════════════════════════ */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  background: var(--ios-surface);
  border-bottom: 1px solid var(--ios-divider);
  position: sticky;
  top: 0;
  z-index: 200;
  flex-shrink: 0;
  gap: 16px;
}

/* ── Logo (left) ── */
.tb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.tb-logo-mark { font-size: 22px; line-height: 1; }
.tb-logo-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ios-text);
  letter-spacing: -0.3px;
}
.tb-logo-sub {
  font-size: 11px;
  color: var(--ios-muted);
  margin-top: 1px;
}

/* ── Stats (center) ── */
.tb-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.tb-stat {
  text-align: center;
}
.tb-stat-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--ios-text);
  line-height: 1;
  letter-spacing: -0.5px;
}
.tb-stat-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--ios-muted);
  letter-spacing: 0.5px;
  margin-top: 3px;
  text-transform: uppercase;
}
.tb-col-green { color: var(--ios-green); }
.tb-col-cyan  { color: #32ADE6; }
.tb-col-gold  { color: #FF9F0A; }

/* ── Auth area (right) ── */
#top-bar-auth { flex-shrink: 0; }

.tb-auth-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tb-btn-ghost {
  background: none;
  color: var(--ios-blue);
  border: 1.5px solid var(--ios-blue);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.tb-btn-ghost:hover { background: var(--ios-blue-bg); }

.tb-btn-primary {
  background: var(--ios-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.tb-btn-primary:hover { opacity: .85; }

/* ── User avatar + dropdown ── */
.tb-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .15s;
  user-select: none;
  position: relative;
  border-right: 1px solid #DDE2EA;
}
.tb-user:hover { background: var(--ios-bg); }

.tb-avatar {
  width: 32px;
  height: 32px;
  background: var(--ios-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.tb-name  { font-size: 13px; font-weight: 600; color: var(--ios-text); }
.tb-caret { font-size: 11px; color: var(--ios-muted); }

.tb-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--ios-surface);
  border: 1px solid var(--ios-divider);
  border-radius: var(--ios-radius-sm);
  box-shadow: var(--ios-shadow-lg);
  min-width: 160px;
  z-index: 300;
  overflow: hidden;
}
.tb-dd-item {
  padding: 11px 16px;
  font-size: 13px;
  color: var(--ios-text);
  cursor: pointer;
  transition: background .12s;
}
.tb-dd-item:hover { background: var(--ios-bg); }

/* ═══════════════════════════════════════════════════════════
   AUTH MODALS
   ═══════════════════════════════════════════════════════════ */

/* Narrower card for auth modals */
.auth-modal { max-width: 400px; }

.auth-error {
  background: var(--ios-red-bg);
  color: var(--ios-red);
  border-radius: var(--ios-radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.auth-switch-link {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ios-muted);
}
.auth-switch-link a {
  color: var(--ios-blue);
  text-decoration: none;
  font-weight: 600;
}
.auth-switch-link a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   STATISTIKEN – iOS/Apple Style
   ═══════════════════════════════════════════════════════════ */

.stat-page {
  margin: 0;
  padding: 32px 36px 56px;
  min-height: 100vh;
  background: #F2F2F7;
}
.stat-wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Seitentitel ── */
.stat-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 4px;
}
.stat-page-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #8E8E93;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.stat-page-title {
  font-size: 28px;
  font-weight: 700;
  color: #1C1C1E;
  letter-spacing: -.02em;
  margin: 0;
}
.stat-period-label {
  font-size: 13px;
  font-weight: 600;
  color: #007AFF;
  background: #EBF4FF;
  border-radius: 20px;
  padding: 6px 14px;
  margin-bottom: 2px;
}

/* ── 4 KPI-Kacheln ── */
.stat-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .stat-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .stat-kpi-grid { grid-template-columns: 1fr; }
}

.stat-kpi-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  position: relative;
  border-right: 1px solid #DDE2EA;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.stat-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.10), 0 8px 32px rgba(0,0,0,.06);
}
.stat-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}
.stat-kpi-blue::before   { background: #007AFF; }
.stat-kpi-green::before  { background: #34C759; }
.stat-kpi-orange::before { background: #FF9500; }
.stat-kpi-purple::before { background: #AF52DE; }

.stat-kpi-icon {
  font-size: 22px;
  margin-bottom: 10px;
  display: block;
}
.stat-kpi-val {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-kpi-blue   .stat-kpi-val { color: #007AFF; }
.stat-kpi-green  .stat-kpi-val { color: #34C759; }
.stat-kpi-orange .stat-kpi-val { color: #FF9500; }
.stat-kpi-purple .stat-kpi-val { color: #AF52DE; }

.stat-kpi-label {
  font-size: 14px;
  font-weight: 600;
  color: #1C1C1E;
  margin-bottom: 3px;
}
.stat-kpi-sub {
  font-size: 12px;
  color: #8E8E93;
}

/* ── Mitte: 2 Spalten ── */
.stat-mid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 800px) {
  .stat-mid-grid { grid-template-columns: 1fr; }
}

/* ── Weiße Karten ── */
.stat-card-white {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
}
.stat-card-full { grid-column: 1 / -1; }
.stat-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1C1C1E;
  margin-bottom: 20px;
  letter-spacing: -.01em;
}

/* ── Balkendiagramm ── */
.stat-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding: 0 4px;
}
.stat-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}
.stat-bar-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: #C5D9FF;
  min-height: 4px;
  transition: background .15s;
  position: relative;
  border-right: 1px solid #DDE2EA;
  cursor: default;
}
.stat-bar-bar.stat-bar-today { background: #007AFF; }
.stat-bar-bar.stat-bar-empty { background: #E8E8ED; }

.stat-bar-bar:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1C1C1E;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}
.stat-bar-day {
  font-size: 11px;
  font-weight: 600;
  color: #8E8E93;
}
.stat-bar-day.stat-bar-today-label { color: #007AFF; }
.stat-bar-num {
  font-size: 11px;
  font-weight: 700;
  color: #8E8E93;
}
.stat-bar-num.stat-bar-today-num { color: #007AFF; }

/* ── Statusverteilung (Donut-ähnlich) ── */
.stat-donut-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-dist-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat-dist-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stat-dist-label {
  font-size: 13px;
  color: #3A3A3C;
  flex: 1;
  font-weight: 500;
}
.stat-dist-count {
  font-size: 14px;
  font-weight: 700;
  color: #1C1C1E;
  min-width: 28px;
  text-align: right;
}
.stat-dist-bar-wrap {
  width: 120px;
  height: 6px;
  background: #E5E5EA;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.stat-dist-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}
.stat-dist-total-row {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #E5E5EA;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-dist-total-label { font-size: 12px; color: #8E8E93; font-weight: 600; }
.stat-dist-total-val   { font-size: 15px; font-weight: 700; color: #1C1C1E; }

/* ── Aktivitäts-Tabelle ── */
.stat-activity-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}
.stat-activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.stat-activity-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  color: #8E8E93;
  padding: 0 12px 10px;
  border-bottom: 1px solid #E5E5EA;
}
.stat-activity-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #F2F2F7;
  color: #1C1C1E;
  vertical-align: middle;
}
.stat-activity-table tr:last-child td { border-bottom: none; }
.stat-activity-table tr:hover td { background: #FAFAFA; }
.stat-empty {
  text-align: center;
  color: #8E8E93;
  padding: 32px !important;
  font-size: 13px;
}

/* .call-status-badge no longer needed — getStatusBadge() uses pure inline styles */

/* ── Status-Badges (Statistiken-Tabelle, legacy – kept for any remaining references) ── */
.stat-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.ssb-nicht_angerufen    { background: #F2F2F7; color: #8E8E93; border: 1px solid #E5E5EA; }
.ssb-nicht_erreicht     { background: #FFF3E0; color: #E65100; border: 1px solid #FF9500; }
.ssb-interessiert       { background: #E8F5E9; color: #1B5E20; border: 1px solid #34C759; }
.ssb-termin             { background: #E3F2FD; color: #0D47A1; border: 1px solid #007AFF; }
.ssb-nicht_interessiert { background: #FFEBEE; color: #B71C1C; border: 1px solid #FF3B30; }

/* ── Loading ── */
.stat-bar-loading {
  color: #8E8E93;
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   ADMIN BEREICH
   ═══════════════════════════════════════════════════════════ */

/* Sidebar separator + admin nav item */
.sidebar-admin-sep {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 8px 16px;
}
.nav-item-admin {
  color: #FF6B6B !important;
}
.nav-item-admin:hover,
.nav-item-admin.active {
  background: rgba(255,59,48,0.15) !important;
  color: #FF3B30 !important;
}

/* Page layout */
.adm-page {
  background: var(--ios-bg);
  min-height: 100vh;
  font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
}
.adm-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 32px 64px;
}

/* Header */
.adm-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.adm-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #FF3B30;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.adm-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--ios-text);
  letter-spacing: -0.5px;
}

/* Tabs */
.adm-tabs {
  display: flex;
  gap: 4px;
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius);
  padding: 6px;
  margin-bottom: 24px;
  width: fit-content;
}
.adm-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ios-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.adm-tab:hover { background: var(--ios-bg); color: var(--ios-text2); }
.adm-tab.active {
  background: #FF3B30;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,59,48,.35);
}

/* Cards */
.adm-card {
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius);
  padding: 24px;
  box-shadow: var(--ios-shadow);
  margin-bottom: 20px;
}
.adm-card-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.adm-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ios-text);
  letter-spacing: -.2px;
  margin-bottom: 16px;
}

/* Mini KPIs */
.adm-card-kpis { display: flex; gap: 12px; }
.adm-mini-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--ios-bg);
  border-radius: var(--ios-radius-sm);
  padding: 10px 20px;
  min-width: 80px;
}
.adm-mini-kpi.adm-kpi-green .adm-kpi-num { color: var(--ios-green); }
.adm-kpi-num { font-size: 26px; font-weight: 800; color: var(--ios-text); line-height: 1; }
.adm-kpi-label { font-size: 10px; font-weight: 600; color: var(--ios-muted); letter-spacing: .8px; margin-top: 4px; text-transform: uppercase; }

/* Table */
.adm-table-wrap { overflow-x: auto; }
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.adm-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--ios-muted);
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1.5px solid var(--ios-divider);
  white-space: nowrap;
}
.adm-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--ios-divider);
  color: var(--ios-text2);
  vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: var(--ios-bg); }
.adm-sortable { cursor: pointer; }
.adm-sortable:hover { color: var(--ios-text); }
.adm-empty {
  text-align: center;
  color: var(--ios-muted);
  padding: 32px;
  font-size: 14px;
}

/* Plan badge */
.adm-plan-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.adm-plan-starter { background: #F2F2F7; color: #636366; }
.adm-plan-pro     { background: #EBF4FF; color: #007AFF; }
.adm-plan-agency  { background: #FFF3E0; color: #FF6D00; }

/* Plan select inline */
.adm-plan-select {
  border: 1.5px solid var(--ios-divider);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  background: var(--ios-bg);
  color: var(--ios-text);
  cursor: pointer;
}

/* Delete button in table */
.adm-del-btn {
  background: var(--ios-red-bg);
  color: var(--ios-red);
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.adm-del-btn:hover { background: var(--ios-red); color: #fff; }

/* Datenbank tab */
.adm-db-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.adm-db-stat-card { text-align: center; }
.adm-db-stat-card-lock { border-color: var(--ios-orange) !important; }
.adm-db-stat-icon { font-size: 22px; margin-bottom: 4px; }
.adm-db-stat-hint { font-size: 11px; color: var(--ios-muted); margin-top: 6px; line-height: 1.4; }
.adm-db-stat-num {
  font-size: 48px;
  font-weight: 800;
  color: var(--ios-text);
  line-height: 1;
  margin-bottom: 6px;
}
.adm-db-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ios-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
}
.adm-col-red    { color: var(--ios-red); }
.adm-col-green  { color: var(--ios-green); }
.adm-col-orange { color: var(--ios-orange); }

.adm-db-actions-card { display: flex; flex-direction: column; gap: 16px; }
.adm-db-last-job {
  font-size: 13px;
  color: var(--ios-muted);
  background: var(--ios-bg);
  border-radius: var(--ios-radius-sm);
  padding: 10px 14px;
}
.adm-db-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.adm-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.adm-btn:hover { opacity: .85; transform: translateY(-1px); }
.adm-btn-blue  { background: var(--ios-blue);  color: #fff; box-shadow: 0 4px 12px rgba(0,122,255,.3); }
.adm-btn-green { background: var(--ios-green); color: #fff; box-shadow: 0 4px 12px rgba(52,199,89,.3); }
.adm-btn-red   { background: var(--ios-red);   color: #fff; box-shadow: 0 4px 12px rgba(255,59,48,.3); }

/* Einstellungen */
.adm-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.adm-form-group { margin-bottom: 14px; }
.adm-label { display: block; font-size: 12px; font-weight: 600; color: var(--ios-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.adm-input {
  width: 100%;
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ios-text);
  background: var(--ios-bg);
  outline: none;
  transition: border-color .15s;
}
.adm-input:focus { border-color: var(--ios-blue); background: #fff; }

.adm-prices-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Erfolgsquote badge in activity */
.adm-quote-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.adm-quote-good { background: #E8F9EE; color: #1D7A3A; }
.adm-quote-mid  { background: #FFF3E0; color: #FF6D00; }
.adm-quote-low  { background: #F2F2F7; color: #636366; }

/* ═══════════════════════════════════════════════════════════
   BRANCHEN-SEITE
   ═══════════════════════════════════════════════════════════ */

.brn-page {
  background: var(--ios-bg);
  min-height: 100vh;
  font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
}

.brn-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 32px 64px;
}

/* Header */
.brn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.brn-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ios-blue);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.brn-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--ios-text);
  letter-spacing: -0.5px;
}
.brn-title-accent { color: var(--ios-blue); }

/* Suchfeld */
.brn-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius-sm);
  padding: 10px 16px;
  min-width: 260px;
  color: var(--ios-muted);
  box-shadow: var(--ios-shadow);
}
.brn-search {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--ios-text);
  width: 100%;
}
.brn-search::placeholder { color: var(--ios-muted2); }

/* Alphabet-Filter */
.brn-alpha-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 20px;
}
.brn-alpha-btn {
  padding: 5px 11px;
  border: 1.5px solid var(--ios-divider);
  border-radius: 8px;
  background: var(--ios-surface);
  color: var(--ios-text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  min-width: 36px;
  text-align: center;
}
.brn-alpha-btn:hover {
  background: var(--ios-blue-bg);
  color: var(--ios-blue);
  border-color: var(--ios-blue);
}
.brn-alpha-btn.active {
  background: var(--ios-blue);
  color: #fff;
  border-color: var(--ios-blue);
}

/* Ergebnis-Info */
.brn-result-info {
  font-size: 13px;
  color: var(--ios-muted);
  margin-bottom: 16px;
  min-height: 20px;
}

/* Karten-Grid */
.brn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .brn-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .brn-grid { grid-template-columns: 1fr; } }

/* Karte */
.brn-card {
  background: var(--ios-surface);
  border-radius: var(--ios-radius);
  border: 1.5px solid var(--ios-divider);
  overflow: hidden;
  box-shadow: var(--ios-shadow);
  transition: transform .15s, box-shadow .15s;
}
.brn-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ios-shadow-lg);
}

/* Farbiger Streifen oben */
.brn-card-stripe {
  height: 5px;
  width: 100%;
}

.brn-card-body {
  padding: 20px;
}

.brn-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.brn-cat-icon {
  font-size: 24px;
  line-height: 1;
}
.brn-cat-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ios-text);
  letter-spacing: -0.2px;
}

/* Unterbranchenliste */
.brn-sub-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brn-sub-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ios-text2);
  cursor: pointer;
  transition: background .1s, color .1s;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
}
.brn-sub-item:hover {
  background: var(--ios-bg);
  color: var(--ios-blue);
}
.brn-sub-item.brn-hidden { display: none; }
.brn-sub-item::before {
  content: '›';
  color: var(--ios-muted2);
  font-size: 14px;
  font-weight: 700;
}

/* Karte ausgeblendet wenn keine Treffer */
.brn-card.brn-card-hidden { display: none; }

/* Täglicher Zuweisung-Banner */
.fp-assign-banner {
  background: linear-gradient(135deg, #e8f9ee 0%, #d4f4e0 100%);
  border: 1.5px solid #b7eac9;
  border-radius: var(--ios-radius-sm);
  padding: 10px 16px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1a7a42;
}

/* Banner in Firmen-Seite */
.branchen-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--ios-blue-bg);
  border: 1.5px solid #C5D9FF;
  border-radius: var(--ios-radius-sm);
  padding: 10px 16px;
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ios-blue);
}
.branchen-filter-clear {
  border: 1.5px solid var(--ios-blue);
  background: transparent;
  color: var(--ios-blue);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .1s, color .1s;
}
.branchen-filter-clear:hover {
  background: var(--ios-blue);
  color: #fff;
}

/* ── Locked Sidebar Nav Item (Branchen – nur Agency) ── */
.nav-item-locked {
  opacity: 0.45;
  cursor: not-allowed;
  position: relative;
  border-right: 1px solid #DDE2EA;
}
.nav-item-locked:hover {
  background: transparent !important;
  color: inherit !important;
}
.nav-item-locked .nav-lock-badge {
  font-size: 10px;
  background: var(--ios-orange, #FF9500);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: auto;
  font-weight: 700;
  letter-spacing: .3px;
}
/* Tooltip */
.nav-item-locked::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #1c1c1e;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 200;
}
.nav-item-locked:hover::after {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   DOKUMENTE
   ═══════════════════════════════════════════════════════════ */

.dok-page {
  overflow-y: auto;
  padding: 0;
}

.dok-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px 48px;
}

/* ── Header ── */
.dok-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.dok-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ios-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.dok-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--ios-text);
  letter-spacing: -.5px;
}
.dok-header-count {
  font-size: 13px;
  color: var(--ios-muted);
  font-weight: 500;
}

/* ── Filter-Tabs ── */
.dok-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dok-tab {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--ios-divider);
  background: var(--ios-surface);
  color: var(--ios-text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.dok-tab:hover  { border-color: var(--ios-blue); color: var(--ios-blue); }
.dok-tab.active { background: var(--ios-blue); border-color: var(--ios-blue); color: #fff; font-weight: 600; }

/* ── Suchfeld ── */
.dok-search-row { margin-bottom: 16px; }
.dok-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ios-surface);
  border: 1.5px solid var(--ios-divider);
  border-radius: var(--ios-radius-sm);
  padding: 0 14px;
  max-width: 380px;
  color: var(--ios-muted);
}
.dok-search {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 10px 0;
  width: 100%;
  color: var(--ios-text);
}

/* ── Drop-Zone ── */
.dok-drop-zone {
  border: 2.5px dashed var(--ios-divider);
  border-radius: var(--ios-radius);
  background: var(--ios-surface);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-bottom: 28px;
  position: relative;
  border-right: 1px solid #DDE2EA;
}
.dok-drop-zone:hover, .dok-drop-zone.dok-drop-active {
  border-color: var(--ios-blue);
  background: var(--ios-blue-bg);
}
.dok-drop-icon { font-size: 32px; margin-bottom: 8px; }
.dok-drop-text { font-size: 15px; font-weight: 500; color: var(--ios-text2); }
.dok-drop-link { color: var(--ios-blue); text-decoration: underline; }
.dok-drop-sub  { font-size: 12px; color: var(--ios-muted); margin-top: 6px; }
.dok-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; pointer-events: none; }

/* ── Card Grid ── */
.dok-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 1000px) { .dok-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .dok-grid { grid-template-columns: 1fr; } }

.dok-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ios-muted);
  font-size: 15px;
  padding: 48px 0;
}

/* ── Karte ── */
.dok-card {
  background: var(--ios-surface);
  border-radius: 16px;
  box-shadow: var(--ios-shadow);
  padding: 18px;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dok-card:hover {
  box-shadow: var(--ios-shadow-lg);
  transform: translateY(-2px);
}

.dok-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dok-file-icon {
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.dok-card-meta { flex: 1; min-width: 0; }
.dok-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ios-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.dok-card-firma {
  font-size: 12px;
  color: var(--ios-blue);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dok-card-firma:hover { text-decoration: underline; }

.dok-card-desc {
  font-size: 12px;
  color: var(--ios-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dok-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dok-card-date, .dok-card-size {
  font-size: 11px;
  color: var(--ios-muted2);
}

.dok-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--ios-divider);
}
.dok-btn-dl {
  flex: 1;
  padding: 7px;
  text-align: center;
  border-radius: 8px;
  background: var(--ios-blue-bg);
  color: var(--ios-blue);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background .15s;
}
.dok-btn-dl:hover { background: #d4e9ff; }

.dok-btn-del {
  flex: 1;
  padding: 7px;
  text-align: center;
  border-radius: 8px;
  background: var(--ios-red-bg);
  color: var(--ios-red);
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .15s;
}
.dok-btn-del:hover { background: #ffdcda; }

/* ── Typ-Badge ── */
.dok-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.dok-badge-vertrag   { background: #EBF4FF; color: #007AFF; }
.dok-badge-angebot   { background: #FFF3E0; color: #FF9500; }
.dok-badge-rechnung  { background: #E8FAF0; color: #34C759; }
.dok-badge-sonstiges { background: #F2F2F7; color: #8E8E93; }

/* ── Upload Modal – Datei-Info ── */
.dok-upload-file-info { margin-bottom: 12px; }
.dok-upload-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ios-bg);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ios-text2);
}

/* ── Firmen-Tabelle: 📄 Button ── */
.fp-dok-cell { width: 56px; text-align: center; }
.fp-dok-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background .15s, opacity .15s;
  position: relative;
  border-right: 1px solid #DDE2EA;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .4;
}
.fp-dok-btn:hover { background: var(--ios-bg); opacity: .65; }
.fp-dok-btn-has { opacity: 1; color: var(--ios-blue); }
.fp-dok-btn-has:hover { background: var(--ios-blue-bg); }
.fp-dok-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--ios-blue);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
  border: 1.5px solid #fff;
}

/* ── Firma-Dokumente Popup Modal ── */
.modal-firma-dok { max-width: 480px; }
.firma-dok-list { display: flex; flex-direction: column; gap: 10px; }
.firma-dok-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ios-bg);
  border-radius: 12px;
  padding: 10px 14px;
}
.firma-dok-info { flex: 1; min-width: 0; }
.firma-dok-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ios-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

/* ── Branchenauswahl-Chips ─────────────────────────────── */
.brn-pref-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border-color, #3a3a3c);
  background: var(--ios-bg, #1c1c1e);
  color: var(--ios-text, #f5f5f7);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: left;
}
.brn-pref-chip:hover {
  border-color: #007aff;
  color: #007aff;
}
.brn-pref-chip-active {
  background: #007aff !important;
  border-color: #007aff !important;
  color: #fff !important;
}

/* ── Profil Branchenpräferenzen Tiles ───────────────────── */
.profil-branch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.profil-branch-tile {
  background: var(--ios-surface, #F2F2F7);
  border: 2px solid var(--border-color, #E5E5EA);
  border-radius: 14px;
  padding: 16px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  color: var(--ios-secondary-text, #8E8E93);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  user-select: none;
  font-family: inherit;
}
.profil-branch-tile:hover {
  border-color: var(--ios-blue, #007AFF);
  color: var(--ios-text, #1C1C1E);
  background: rgba(0,122,255,0.05);
}
.profil-branch-tile .profil-tile-icon { font-size: 28px; line-height: 1; }
.profil-branch-tile.profil-tile-active {
  background: rgba(0,122,255,0.08);
  border-color: var(--ios-blue, #007AFF);
  color: var(--ios-blue, #007AFF);
  box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}
.profil-branch-tile.profil-tile-egal {
  grid-column: 1 / -1;
  flex-direction: row;
  padding: 12px 20px;
  font-size: 14px;
  justify-content: center;
  gap: 10px;
}
@media (max-width: 600px) {
  .profil-branch-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Firmen Branch-Filter optgroup ─────────────────────── */
#firmen-branch-filter optgroup { font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   MOBILE / RESPONSIVE  (≤ 768px)
   ═══════════════════════════════════════════════════════════ */

/* ── Hamburger Button (nur Mobile) ── */
.tb-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
  transition: background .15s;
}
.tb-hamburger:hover { background: var(--ios-bg); }
.tb-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ios-text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ── Sidebar Drawer + Backdrop ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 299;
}
.sidebar-backdrop-visible { display: block; }

@media (max-width: 768px) {
  /* Layout */
  body { overflow-x: hidden; }

  /* Sidebar als Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: 260px;
    min-width: unset;
    box-shadow: var(--ios-shadow-lg);
  }
  .sidebar-mobile-open {
    transform: translateX(0);
  }

  /* Hamburger einblenden */
  .tb-hamburger { display: flex; }

  /* Top-Bar kompakter */
  .top-bar {
    padding: 0 14px;
    height: 56px;
    gap: 10px;
  }
  .tb-logo-sub { display: none; }

  /* Stats in Top-Bar ausblenden – zu eng */
  .tb-stats { display: none; }

  /* Main-Content ohne Sidebar-Offset */
  .main-content { width: 100%; }

  /* Seiten-Padding reduzieren */
  .page { padding: 16px 14px; }

  /* Firmen-Toolbar stacken */
  .fp-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .fp-search-box { min-width: unset; width: 100%; }
  .fp-select     { width: 100%; }
  .fp-add-btn    { width: 100%; justify-content: center; }

  /* FP-Header */
  .fp-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Dashboard Stats Grid 2-spaltig */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Modals auf fast-Vollbild */
  .modal-card {
    max-width: 100% !important;
    margin: 0 10px;
    border-radius: 16px;
  }

  /* Kalender: schmaler */
  .kal-wrap { padding: 0; }
  .kal-grid { gap: 2px; }
  .kal-cell { min-height: 56px; font-size: 12px; }

  /* Admin-Tabelle scrollbar */
  .adm-table-wrap { overflow-x: auto; }

  /* Branchen-Grid */
  .brn-wrap { padding: 16px 14px 48px; }

  /* Statistiken-KPI 2-spaltig */
  .stat-kpi-grid { grid-template-columns: repeat(2, 1fr); }

  /* Nav-Items touch-freundlicher (44px min) */
  .nav-item {
    padding: 12px 14px;
    min-height: 44px;
  }

  /* Landing Page Hero */
  .lp-hero { padding: 60px 20px 40px; }
  .lp-hero-h1 { font-size: clamp(28px, 8vw, 56px); }
  .lp-hero-sub { font-size: 16px; }
  .lp-hero-actions { flex-direction: column; gap: 10px; }
  .lp-btn-primary, .lp-btn-ghost-light { width: 100%; text-align: center; }

  /* Landing Page Sections */
  .lp-section-inner { padding: 0 16px; }
  .lp-price-grid { grid-template-columns: 1fr !important; gap: 16px; }
  .lp-how-grid  { grid-template-columns: 1fr !important; gap: 16px; }
  .lp-feat-grid { grid-template-columns: 1fr !important; gap: 12px; }

  /* Profil-Karte */
  .prof-wrap { padding: 16px 14px; }

  /* Landing Page: Section Padding reduzieren */
  .lp-section { padding: 44px 20px; }
  .lp-section-h2 { font-size: 26px; margin-bottom: 28px; }
  .lp-section-inner { padding: 0; }

  /* Steps: horizontal → vertikal */
  .lp-steps { flex-direction: column; gap: 16px; }
  .lp-step-arrow { display: none; }
  .lp-step { padding: 24px 20px; }

  /* Stats: 4-spaltig → 2-spaltig */
  .lp-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .lp-stat-num { font-size: 32px; }
  .lp-stat-card { padding: 24px 14px; }

  /* Personas + Testimonials: 3 → 1 Spalte */
  .lp-personas { grid-template-columns: 1fr; gap: 14px; }
  .lp-testimonials { grid-template-columns: 1fr; gap: 14px; }

  /* Final CTA */
  .lp-final-cta { padding: 60px 20px; }

  /* Compare-Tabelle scrollbar */
  .lp-compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
