/* Außendienst-Assistent – Mobile-First CSS */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --info: #3B82F6;
  --info-light: #EFF6FF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --nav-height: 64px;
  --bottom-nav-height: 68px;
}

/* Reset – v3 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: var(--bottom-nav-height);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

/* ── Navigation (oben) ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: white;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: var(--shadow-md);
}
.top-nav .app-title {
  font-weight: 700;
  font-size: 1.1rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-nav a { color: white; text-decoration: none; }
.top-nav .btn-nav-profile {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s;
}
.top-nav .btn-nav-profile:hover { background: rgba(255,255,255,0.3); }
.top-nav .btn-logout {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

/* ── Bottom Navigation (Mobile) ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
  border-top: 1px solid var(--gray-200);
  height: var(--bottom-nav-height);
  display: flex;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--gray-500);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 8px 4px;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a:active { background: var(--gray-100); }

/* ── Content ── */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}
.page-header {
  margin-bottom: 20px;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}
.page-header .subtitle {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-top: 2px;
}

/* ── Cards ── */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-header h2, .card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}
.card-body { padding: 16px; }
.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ── Kacheln / Stats-Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 4px;
}
.stat-card.danger .stat-value { color: var(--danger); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card-link { text-decoration: none; transition: box-shadow 0.15s, transform 0.15s; cursor: pointer; }
.stat-card-link:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card-link:active { transform: scale(0.97); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;  /* Touch-Target iOS */
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; min-height: 52px; border-radius: var(--radius); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; min-height: 36px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:active { transform: scale(0.97); }

/* Schnellbutton-Grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.quick-btn {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--gray-800);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 80px;
  justify-content: center;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.quick-btn svg { width: 28px; height: 28px; color: var(--primary); }
.quick-btn:active { background: var(--primary-light); border-color: var(--primary); }
.quick-btn.highlight { background: var(--primary); color: white; border-color: var(--primary); }
.quick-btn.highlight svg { color: white; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray-800);
  background: white;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-control.large { font-size: 1.1rem; padding: 14px; }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }

/* ── Listen ── */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  color: var(--gray-800);
  transition: background 0.1s;
  min-height: 60px;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover, .list-item:active { background: var(--gray-50); }
.list-item .item-main { flex: 1; min-width: 0; }
.list-item .item-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item .item-meta { font-size: 0.8rem; color: var(--gray-500); margin-top: 2px; }
.list-item .item-action { flex-shrink: 0; }

/* ── Badges / Tags ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-yellow { background: var(--warning-light); color: #B45309; }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ── Flash-Nachrichten ── */
.flash-container { padding: 0 16px; margin-top: 8px; }
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flash-success { background: var(--success-light); color: #065F46; border-left: 4px solid var(--success); }
.flash-error { background: var(--danger-light); color: #991B1B; border-left: 4px solid var(--danger); }
.flash-info { background: var(--info-light); color: #1E40AF; border-left: 4px solid var(--info); }
.flash-warning { background: var(--warning-light); color: #92400E; border-left: 4px solid var(--warning); }

/* ── KI-Hinweis-Banner ── */
.ai-banner {
  background: var(--warning-light);
  border: 1px solid #FCD34D;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #92400E;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.15s;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-badge {
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 99px;
  margin-left: 4px;
}
.tab-count {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  margin-left: 2px;
}
.tab.active .tab-count { background: var(--primary); color: #fff; }

/* ── Kategorie-Chips ── */
.cat-chip {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 99px;
  text-decoration: none;
  transition: all 0.15s;
}
.cat-chip.active {
  background: var(--chip, var(--primary));
  color: #fff;
  border-color: var(--chip, var(--primary));
}

/* ── "Besuch fällig"-Markierung in Kundenliste ── */
.due-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 5px;
  vertical-align: middle;
}
.cl-date-due { color: var(--danger) !important; font-weight: 700; }

/* ── Heute-Fokus-Banner ── */
.focus-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--danger-light);
  border: 1px solid var(--danger);
  text-decoration: none;
  color: var(--gray-800);
}
.focus-banner .focus-icon { font-size: 1.1rem; }
.focus-banner .focus-text { flex: 1; font-size: 0.9rem; }
.focus-banner .focus-text strong { color: var(--danger); }
.focus-banner .focus-chevron { width: 18px; height: 18px; color: var(--gray-400); }

/* ── Einklappbare Karten ── */
.collapse-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.collapse-card > summary::-webkit-details-marker { display: none; }
.collapse-arrow { color: var(--gray-400); font-size: 0.9rem; transition: transform 0.2s; }
.collapse-card[open] .collapse-arrow { transform: rotate(180deg); }

/* ── Bericht-Inhalt ── */
.report-content {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.7;
  font-family: inherit;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--gray-200);
}

/* ── Login-Seite ── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--primary);
}
.login-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.login-logo {
  text-align: center;
  margin-bottom: 24px;
}
.login-logo h1 { font-size: 1.4rem; color: var(--gray-900); font-weight: 700; }
.login-logo p { color: var(--gray-500); font-size: 0.9rem; }

/* ── Leerer Zustand ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-500);
}
.empty-state svg { width: 48px; height: 48px; color: var(--gray-300); margin-bottom: 12px; }
.empty-state h3 { font-size: 1rem; color: var(--gray-700); margin-bottom: 6px; }

/* ── AI-Spinner ── */
.ai-loading {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 0;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Kunden-Hero ── */
.customer-hero-card { border-left: 4px solid var(--primary); }
.customer-hero { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.customer-avatar {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--primary); color: #fff;
  font-size: 1.2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: 1px;
}
.customer-hero-info { flex: 1; min-width: 0; }
.customer-hero-name {
  font-size: 1.15rem; font-weight: 700; color: var(--gray-900);
  margin: 0 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.customer-hero-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.8rem; color: var(--gray-500); }
.icon-edit-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gray-100); color: var(--gray-600);
  flex-shrink: 0; text-decoration: none; transition: background 0.15s;
}
.icon-edit-btn:hover { background: var(--gray-200); }

/* ── Kunden-Aktionen (2-Button-Leiste) ── */
.customer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.customer-actions .btn {
  justify-content: center;
  font-size: 0.9rem;
}

/* ── Stats-Zeile ── */
.customer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.customer-stat {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}
.customer-stat-value {
  font-size: 1.75rem; font-weight: 700;
  color: var(--primary); line-height: 1;
}
.customer-stat-label {
  font-size: 0.72rem; color: var(--gray-500);
  margin-top: 4px; text-transform: uppercase; letter-spacing: 0.03em;
}

/* ── Kontakt-Info-Zeilen ── */
.contact-info-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem; color: var(--gray-800); text-decoration: none;
}
.contact-info-row:last-child { border-bottom: none; }
.contact-info-icon { font-size: 1.1rem; flex-shrink: 0; width: 24px; text-align: center; }
.contact-info-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-info-link { color: var(--primary); }
.contact-info-link:hover { background: var(--gray-50); }

/* ── Detail-Zeilen ── */
.detail-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 600; color: var(--gray-600); min-width: 130px; flex-shrink: 0; }
.detail-value { color: var(--gray-800); }

/* ── Schnell-Maske ── */
.quick-form {
  max-width: 600px;
  margin: 0 auto;
}
.quick-form .form-control.large { font-size: 1.1rem; }

/* ── Suche ── */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-bar .form-control { flex: 1; }

/* ── Suche mit Icon (Kundenliste) ── */
.search-wrap { margin-bottom: 12px; }
.search-input-wrap { position: relative; }
.search-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--gray-400); pointer-events: none;
}
.search-input { padding-left: 42px !important; }

/* ── Kundenliste ── */
.customer-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  color: var(--gray-800);
  transition: background 0.12s;
  min-height: 64px;
}
.customer-list-item:last-child { border-bottom: none; }
.customer-list-item:hover, .customer-list-item:active { background: var(--gray-50); }

.cl-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  font-size: 0.88rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: 0.5px;
}
.cl-avatar-blue   { background: #DBEAFE; color: #1D4ED8; }
.cl-avatar-orange { background: #FFF7ED; color: #C2410C; }
.cl-avatar-gray   { background: var(--gray-100); color: var(--gray-500); }
.cl-avatar-red    { background: #FEE2E2; color: #DC2626; }

.cl-info { flex: 1; min-width: 0; }
.cl-name {
  font-size: 0.95rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--gray-900);
}
.cl-meta {
  font-size: 0.78rem; color: var(--gray-500);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cl-phone { color: var(--gray-400); }

.cl-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 4px; flex-shrink: 0;
}
.cl-date { font-size: 0.72rem; color: var(--gray-400); white-space: nowrap; }
.cl-chevron { width: 16px; height: 16px; color: var(--gray-300); }

/* ── Responsive (Desktop ab 640px) ── */
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .bottom-nav { display: none; }
  body { padding-bottom: 0; padding-top: 0; }
  .page-content { padding: 24px; }

  /* Desktop-Sidebar würde hier als Erweiterung kommen */
}

@media (min-width: 768px) {
  .page-header h1 { font-size: 1.8rem; }
}

/* ── Dashboard Aktionen ── */
.dash-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
  min-height: 80px;
  -webkit-tap-highlight-color: transparent;
}
.dash-action svg { width: 26px; height: 26px; }
.dash-action-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.dash-action-primary:active { background: var(--primary-dark); transform: scale(0.97); }
.dash-action-secondary {
  background: white;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.dash-action-secondary:active { background: var(--gray-50); transform: scale(0.97); }

.dash-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  padding: 0 4px;
  vertical-align: middle;
  margin-left: 2px;
}

/* ── Stats mit Icon ── */
.stat-icon { font-size: 1.3rem; margin-bottom: 4px; line-height: 1; }

/* ── Verwaltungs-Grid ── */
.dash-mgmt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: white;
  text-decoration: none;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.1s;
}
.dash-mgmt-item:hover, .dash-mgmt-item:active { background: var(--gray-50); }
.dash-mgmt-item svg { width: 18px; height: 18px; color: var(--gray-400); flex-shrink: 0; }

/* ── Google Maps Import ── */
.maps-import-card { border: 2px dashed var(--primary); background: var(--primary-light); }
.maps-import-card .card-header h3 { color: var(--primary); font-size: 1rem; }

.maps-tab {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--gray-600);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all .15s;
}
.maps-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 600;
}

.maps-status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.maps-status-success { background: var(--success-light); color: #065f46; }
.maps-status-error   { background: var(--danger-light);  color: #991b1b; }
.maps-status-info    { background: var(--info-light);    color: #1e40af; }

.maps-result-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 6px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.maps-result-item:hover { border-color: var(--primary); background: var(--primary-light); }
.maps-result-item strong { font-size: 0.9rem; color: var(--gray-800); }
.maps-result-item span   { font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Dunkelmodus ── */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50:  #0F172A;
    --gray-100: #1E293B;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748B;
    --gray-500: #94A3B8;
    --gray-600: #CBD5E1;
    --gray-700: #E2E8F0;
    --gray-800: #F1F5F9;
    --gray-900: #F8FAFC;
    --primary-light: #1e3a5f;
    --success-light: #052e16;
    --warning-light: #2d1b00;
    --danger-light:  #2d0a0a;
    --info-light:    #1e3a5f;
    --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
  }
  body { background: #0F172A; color: #F1F5F9; }

  /* Karten & Panels */
  .card { background: #1E293B; border-color: #334155; }
  .card-header { border-bottom-color: #334155; }
  .card-footer { background: #0F172A; border-top-color: #334155; }
  .stat-card { background: #1E293B; }
  .customer-stat { background: #1E293B; }
  .empty-state { background: transparent; }

  /* Navigation */
  .bottom-nav { background: #1E293B; border-top-color: #334155; }

  /* Formulare */
  .form-control { background: #1E293B; color: #F1F5F9; border-color: #475569; }
  .form-control:focus { background: #1E293B; }
  input[type="file"].form-control { color: #CBD5E1; }
  select.form-control option { background: #1E293B; }

  /* Listen */
  .list-item { border-bottom-color: #334155; color: #F1F5F9; }
  .list-item:hover, .list-item:active { background: #334155; }
  .customer-list-item { color: #F1F5F9; border-bottom-color: #334155; }
  .customer-list-item:hover, .customer-list-item:active { background: #334155; }

  /* Dashboard-Aktionsbuttons */
  .dash-action-secondary {
    background: #1E293B;
    color: #E2E8F0;
    border-color: #475569;
  }
  .dash-action-secondary:hover { background: #334155; }

  /* Dashboard-Verwaltung */
  .dash-mgmt-item {
    background: #1E293B;
    color: #CBD5E1;
    border-bottom: 1px solid #334155;
  }
  .dash-mgmt-item:hover, .dash-mgmt-item:active { background: #334155; }

  /* Quick-Buttons */
  .quick-btn {
    background: #1E293B;
    color: #E2E8F0;
    border-color: #475569;
  }
  .quick-btn:active { background: #1e3a5f; border-color: var(--primary); }
  .quick-btn svg { color: #60A5FA; }

  /* Badges */
  .badge-gray { background: #334155; color: #CBD5E1; }
  .badge-blue { background: #1e3a5f; color: #93C5FD; }
  .badge-green { background: #052e16; color: #6EE7B7; }
  .badge-yellow { background: #2d1b00; color: #FCD34D; }
  .badge-red { background: #2d0a0a; color: #FCA5A5; }

  /* Berichte */
  .report-content { background: #0F172A; border-color: #334155; color: #E2E8F0; }
  pre.report-content { background: #0F172A; border-color: #334155; color: #E2E8F0; }

  /* Maps */
  .maps-result-item { background: #1E293B; border-color: #475569; }
  .maps-result-item:hover { background: #1e3a5f; border-color: var(--primary); }
  .maps-result-item strong { color: #F1F5F9; }
  .maps-tab { background: #1E293B; color: #CBD5E1; border-color: #475569; }

  /* Tabellen */
  table tr { border-bottom-color: #334155; }
  table th, table td { color: #E2E8F0; }
  thead tr { background: #334155 !important; }
  tbody tr:hover { background: #334155 !important; }

  /* Kontakt & Detail-Zeilen */
  .contact-info-row { border-bottom-color: #334155; color: #E2E8F0; }
  .detail-row { border-bottom-color: #334155; }

  /* Kundenliste Avatar-Farben im Dark Mode */
  .cl-avatar-blue   { background: #1e3a5f; color: #93C5FD; }
  .cl-avatar-orange { background: #2d1500; color: #FDBA74; }
  .cl-avatar-gray   { background: #334155; color: #94A3B8; }
  .cl-avatar-red    { background: #2d0a0a; color: #FCA5A5; }

  /* Login */
  .login-card { background: #1E293B; }
  .login-logo h1 { color: #F8FAFC; }

  /* Tab-Zähler & Kategorie-Chips */
  .tab-count { background: #334155; color: #CBD5E1; }
  .tab.active .tab-count { background: var(--primary); color: #fff; }
  .cat-chip { background: #1E293B; color: #CBD5E1; border-color: #475569; }
  .cat-chip.active { background: var(--chip, var(--primary)); color: #fff; border-color: var(--chip, var(--primary)); }
}
