/* ═══════════════════════════════════════════════════════════
   PN VERTRIEB — Dark Premium Stylesheet
   Design: Linear.app × Vercel Dashboard
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Backgrounds */
  --bg-base:        #09090b;
  --bg-surface:     #111113;
  --bg-card:        #18181b;
  --bg-elevated:    #27272a;
  --bg-highlight:   #3f3f46;

  /* Text */
  --text-primary:   #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary:  #71717a;
  --text-muted:     #52525b;

  /* Borders */
  --border-subtle:  rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.18);

  /* Accent — Electric Blue */
  --accent:         #3b82f6;
  --accent-hover:   #60a5fa;
  --accent-dim:     rgba(59,130,246,0.12);
  --accent-border:  rgba(59,130,246,0.35);
  --accent-glow:    0 0 24px rgba(59,130,246,0.30);

  /* Semantic */
  --success:      #22c55e; --success-dim: rgba(34,197,94,0.12);
  --warning:      #f59e0b; --warning-dim: rgba(245,158,11,0.12);
  --danger:       #ef4444; --danger-dim:  rgba(239,68,68,0.12);
  --purple:       #a855f7; --purple-dim:  rgba(168,85,247,0.12);
  --amber:        #f59e0b; --amber-dim:   rgba(245,158,11,0.12);

  /* Layout */
  --sidebar-w:    240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h:     56px;
  --radius-sm:    5px;
  --radius-md:    9px;
  --radius-lg:    13px;
  --radius-xl:    18px;
  --radius-full:  9999px;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.7);
}

/* ── Reset & Basis ───────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.3px; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.2px; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }

a { color: var(--accent); text-decoration: none; transition: color 150ms ease; }
a:hover { color: var(--accent-hover); }

.label, .caption {
  font-size: 12px; font-weight: 500; letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.mono, .num { font-variant-numeric: tabular-nums; }

::selection { background: var(--accent-dim); color: var(--text-primary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-highlight); border-radius: 99px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Layout: Sidebar ─────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo { padding: 18px 16px 14px; }
.logo-link { display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.logo-link:hover { color: var(--text-primary); }
.logo-text { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; white-space: nowrap; }

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

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px; font-weight: 500;
  border-left: 2px solid transparent;
  transition: all 150ms ease;
  white-space: nowrap;
}
.nav-item i { font-size: 19px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-left-color: var(--accent);
}
.nav-badge {
  margin-left: auto;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600;
  min-width: 19px; height: 19px;
  border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px;
}
.nav-divider { height: 1px; background: var(--border-subtle); margin: 10px 8px; }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-link { font-size: 11.5px; color: var(--text-tertiary); }
.logout-link:hover { color: var(--danger); }

.sidebar-toggle {
  background: transparent; border: none; color: var(--text-tertiary);
  cursor: pointer; padding: 6px; border-radius: var(--radius-sm);
  font-size: 16px; transition: all 150ms;
}
.sidebar-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Collapsed sidebar */
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .logo-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .user-info { display: none; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 9px; }
body.sidebar-collapsed .main-wrapper { margin-left: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .sidebar-footer { flex-direction: column; }
body.sidebar-collapsed .sidebar-toggle i { transform: rotate(180deg); }

/* ── Layout: Main + Topbar ───────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  transition: margin-left 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar {
  height: var(--topbar-h);
  background: rgba(17,17,19,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.content { padding: 24px; min-height: calc(100vh - var(--topbar-h)); }

/* ── Karten ──────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 150ms ease, transform 150ms ease;
}
.card.hoverable:hover {
  border-color: var(--border-default);
  transform: translateY(-1px);
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--accent); font-size: 18px; }

/* ── Buttons ─────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-ghost, .btn-danger, .btn-success {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 14px; font-weight: 500; font-family: inherit;
  cursor: pointer; border: 1px solid transparent;
  transition: all 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--accent-glow); color: #fff; }
.btn-secondary { background: var(--bg-elevated); border-color: var(--border-default); color: var(--text-primary); }
.btn-secondary:hover { border-color: var(--border-strong); color: var(--text-primary); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); }
.btn-danger { background: var(--danger-dim); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,0.20); color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #4ade80; color: #fff; box-shadow: 0 0 24px rgba(34,197,94,0.3); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 7px; }
button:disabled, .btn-disabled { opacity: 0.5; cursor: not-allowed !important; pointer-events: none; }

/* ── Badges / Status-Pills ───────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.badge-neutral  { background: var(--bg-elevated); color: var(--text-secondary); }
.badge-accent   { background: var(--accent-dim); color: var(--accent); }
.badge-purple   { background: var(--purple-dim); color: var(--purple); }
.badge-amber    { background: var(--amber-dim); color: var(--amber); }
.badge-success  { background: var(--success-dim); color: var(--success); }
.badge-customer { background: rgba(34,197,94,0.20); color: #4ade80; }
.badge-danger   { background: var(--danger-dim); color: var(--danger); }
.badge-muted    { background: var(--danger-dim); color: var(--text-tertiary); }

/* ── Score-Kreis ─────────────────────────────── */
.score-circle {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 2px solid;
  flex-shrink: 0;
}
.score-high   { border-color: var(--success); color: var(--success); background: var(--success-dim); }
.score-mid    { border-color: var(--warning); color: var(--warning); background: var(--warning-dim); }
.score-low    { border-color: var(--danger); color: var(--danger); background: var(--danger-dim); }
.score-none   { border-color: var(--border-default); color: var(--text-muted); background: transparent; }

/* ── Formulare ───────────────────────────────── */
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="url"], input[type="tel"], input[type="search"],
select, textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  font-size: 14px; font-family: inherit;
  transition: all 150ms ease;
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2371717a' viewBox='0 0 256 256'%3E%3Cpath d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80A8 8 0 0 1 53.66 90.34L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
input[type="color"] { padding: 3px; height: 38px; width: 56px; cursor: pointer; background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); cursor: pointer; }
input[type="range"] { padding: 0; accent-color: var(--accent); border: 0; background: transparent; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.03em; color: var(--text-secondary); margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 5px; }

/* Toggle-Switch */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--bg-highlight); border-radius: 99px; transition: 200ms;
}
.switch-slider:before {
  content: ""; position: absolute; height: 16px; width: 16px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 200ms;
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider:before { transform: translateX(16px); }

/* ── Tabellen ────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--bg-card); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; padding: 11px 16px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface);
  white-space: nowrap;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.data-table tbody tr { transition: background 120ms; }
.data-table tbody tr:hover { background: var(--bg-elevated); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tr.clickable { cursor: pointer; }

/* ── KPI-Karten ──────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 18px 20px;
  transition: all 150ms ease; position: relative; overflow: hidden;
}
.kpi-card:hover { border-color: var(--border-default); transform: translateY(-1px); }
.kpi-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent); opacity: 0; transition: opacity 200ms;
}
.kpi-card:hover::after { opacity: 1; }
.kpi-label { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--text-tertiary); text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.kpi-label i { font-size: 15px; color: var(--accent); }
.kpi-value { font-size: 28px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.kpi-sub { font-size: 12.5px; color: var(--text-tertiary); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* ── Toasts ──────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px;
}
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  animation: toastIn 250ms cubic-bezier(0.21, 1.02, 0.73, 1);
}
.toast.removing { animation: toastOut 200ms ease forwards; }
.toast i { font-size: 19px; flex-shrink: 0; margin-top: 1px; }
.toast-success { border-left: 3px solid var(--success); } .toast-success i { color: var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }  .toast-error i   { color: var(--danger); }
.toast-info    { border-left: 3px solid var(--accent); }  .toast-info i    { color: var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* ── Modal ───────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 180ms ease;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  max-width: 560px; width: 100%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 220ms cubic-bezier(0.21, 1.02, 0.73, 1);
}
.modal-lg { max-width: 760px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; background: var(--bg-card); z-index: 1;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { background: transparent; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 20px; padding: 4px; border-radius: var(--radius-sm); transition: all 150ms; }
.modal-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border-subtle); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } }

/* ── Skeleton Loader ─────────────────────────── */
.skeleton {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ── Empty States ────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 64px 24px; gap: 8px;
}
.empty-state i { font-size: 64px; color: var(--text-tertiary); margin-bottom: 8px; }
.empty-state h2, .empty-state h3 { color: var(--text-primary); }
.empty-state p { color: var(--text-tertiary); max-width: 380px; margin-bottom: 12px; }

/* ── Kanban ──────────────────────────────────── */
.kanban-board {
  display: flex; gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
  min-height: calc(100vh - 180px);
}
.kanban-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  min-width: 290px; width: 290px;
  flex-shrink: 0;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 160px);
}
.kanban-header {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0;
}
.kanban-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.kanban-title { font-size: 13px; font-weight: 600; }
.kanban-count { font-size: 12px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.kanban-sum { margin-left: auto; font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.kanban-add { background: transparent; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 16px; padding: 2px 4px; border-radius: var(--radius-sm); }
.kanban-add:hover { background: var(--bg-elevated); color: var(--accent); }
.kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 60px; }

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  cursor: grab;
  transition: all 150ms ease;
  position: relative;
}
.contact-card:hover { border-color: var(--border-default); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.contact-card.sortable-ghost { opacity: 0.35; border: 1px dashed var(--accent); }
.contact-card.sortable-drag { cursor: grabbing; box-shadow: var(--shadow-lg); }
.cc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cc-name { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.cc-name a { color: var(--text-primary); }
.cc-name a:hover { color: var(--accent); }
.cc-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; flex-wrap: wrap; }
.cc-city { font-size: 12px; color: var(--text-tertiary); display: flex; align-items: center; gap: 3px; }
.cc-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.cc-time { font-size: 11.5px; color: var(--text-muted); }
.cc-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 150ms; }
.contact-card:hover .cc-actions { opacity: 1; }
.cc-action {
  width: 25px; height: 25px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); color: var(--text-secondary);
  border: none; cursor: pointer; font-size: 13px; transition: all 120ms;
}
.cc-action:hover { background: var(--accent-dim); color: var(--accent); }

/* ── Lead-Suche ──────────────────────────────── */
.leads-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.filter-panel { position: sticky; top: calc(var(--topbar-h) + 24px); }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.lead-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 16px;
  transition: all 150ms ease;
}
.lead-card:hover { border-color: var(--border-default); transform: translateY(-1px); }
.lead-card.imported { border-color: rgba(34,197,94,0.3); }
.lead-name { font-size: 15px; font-weight: 600; }
.lead-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-secondary); margin-top: 5px; }
.lead-row i { font-size: 14px; color: var(--text-tertiary); flex-shrink: 0; }
.stars { color: var(--amber); letter-spacing: 1px; font-size: 12px; }

.web-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.web-ok { color: var(--success); }
.web-warn { color: var(--warning); }
.web-none { color: var(--text-muted); }

/* ── Detailseite ─────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.detail-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-name { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 20px; overflow-x: auto; }
.tab {
  padding: 10px 16px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-tertiary);
  border: none; background: transparent; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 150ms; white-space: nowrap;
  font-family: inherit;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.info-field { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 10px 14px; }
.info-field-label { font-size: 11px; font-weight: 500; letter-spacing: 0.04em; color: var(--text-tertiary); text-transform: uppercase; }
.info-field-value { font-size: 13.5px; margin-top: 3px; word-break: break-word; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 1.5px; background: var(--border-default); }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-icon {
  position: absolute; left: -28px; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--accent);
}
.timeline-title { font-size: 13.5px; font-weight: 500; }
.timeline-body { font-size: 13px; color: var(--text-secondary); margin-top: 3px; white-space: pre-line; }
.timeline-time { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full); padding: 3px 10px;
  font-size: 12px; color: var(--text-secondary);
}
.tag button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 12px; padding: 0; line-height: 1; }
.tag button:hover { color: var(--danger); }

/* ── Angebots-Builder ────────────────────────── */
.builder-layout { display: grid; grid-template-columns: minmax(440px, 1fr) 1fr; gap: 20px; align-items: start; }
.package-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.package-card {
  background: var(--bg-surface); border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 16px 14px;
  cursor: pointer; text-align: center;
  transition: all 150ms ease; position: relative;
}
.package-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.package-card.selected { border-color: var(--accent); background: var(--accent-dim); box-shadow: var(--accent-glow); }
.pkg-name { font-size: 16px; font-weight: 700; }
.pkg-tagline { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; min-height: 30px; }
.pkg-price { font-size: 21px; font-weight: 700; margin: 8px 0 8px; font-variant-numeric: tabular-nums; }
.pkg-highlights { font-size: 11.5px; color: var(--text-secondary); text-align: left; padding-left: 4px; }
.pkg-highlights li { list-style: none; padding: 2px 0; display: flex; gap: 6px; align-items: baseline; }
.pkg-highlights li::before { content: "✓"; color: var(--success); font-weight: 700; }

.price-summary { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 16px; }
.price-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.price-line.total { border-top: 1px solid var(--border-default); margin-top: 8px; padding-top: 12px; font-size: 17px; font-weight: 700; color: var(--accent); }

.preview-frame {
  width: 100%; height: calc(100vh - 160px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: #fff;
}

.extra-row { display: grid; grid-template-columns: 1fr 120px 36px; gap: 8px; margin-bottom: 8px; align-items: center; }

/* ── Demo-Manager ────────────────────────────── */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.demo-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; transition: all 150ms; }
.demo-card:hover { border-color: var(--border-default); transform: translateY(-1px); }
.demo-thumb {
  height: 150px; background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--text-muted);
  background-size: cover; background-position: center top;
  position: relative;
}
.demo-body { padding: 14px 16px; }
.demo-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-tertiary); margin-top: 6px; flex-wrap: wrap; }
.demo-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ── OCR-Dropzone ────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-xl);
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 200ms ease;
  background: var(--bg-surface);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.dropzone i { font-size: 52px; color: var(--text-tertiary); }
.dropzone.dragover i { color: var(--accent); }

.ocr-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-top: 20px; }
.ocr-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.ocr-thumb { width: 100%; height: 140px; object-fit: cover; background: var(--bg-elevated); }
.confidence-bar { height: 5px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.confidence-fill { height: 100%; border-radius: 99px; transition: width 500ms ease; }

/* ── Alerts ──────────────────────────────────── */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-lg); font-size: 13.5px; margin-bottom: 18px; }
.alert i { font-size: 19px; flex-shrink: 0; margin-top: 1px; }
.alert-warning { background: var(--warning-dim); border: 1px solid rgba(245,158,11,0.3); color: #fbbf24; }
.alert-success { background: var(--success-dim); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }
.alert-danger  { background: var(--danger-dim); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-info    { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent-hover); }

/* ── Login ───────────────────────────────────── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg-base); padding: 24px;
  background-image: radial-gradient(ellipse 60% 40% at 50% -10%, rgba(59,130,246,0.10), transparent);
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); padding: 36px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 350ms cubic-bezier(0.21, 1.02, 0.73, 1);
}
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo .name { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; margin-top: 12px; }
.login-logo .name span { color: var(--accent); }

/* ── Admin ───────────────────────────────────── */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.admin-tile {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 18px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: all 150ms; color: var(--text-primary);
}
.admin-tile:hover { border-color: var(--accent-border); transform: translateY(-1px); color: var(--text-primary); }
.admin-tile i { font-size: 26px; color: var(--accent); }
.admin-tile-title { font-weight: 600; font-size: 14px; }
.admin-tile-desc { font-size: 12.5px; color: var(--text-tertiary); margin-top: 2px; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-ok { background: var(--success); box-shadow: 0 0 8px rgba(34,197,94,0.6); }
.status-fail { background: var(--danger); box-shadow: 0 0 8px rgba(239,68,68,0.6); }

/* Feature-Editor (Pakete) */
.feature-row { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; }
.feature-row .drag-handle { cursor: grab; color: var(--text-muted); font-size: 15px; }
.feature-row.sortable-ghost { opacity: 0.4; }

/* ── Utilities ───────────────────────────────── */
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-secondary { color: var(--text-secondary); } .text-tertiary { color: var(--text-tertiary); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); }
.text-sm { font-size: 12.5px; } .text-xs { font-size: 11.5px; }
.w-full { width: 100%; }
.fade-in { animation: fadeUp 350ms ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* Spinner */
.spinner {
  width: 17px; height: 17px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1100px) {
  .detail-layout, .builder-layout, .leads-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --sidebar-w: 64px; }
  .logo-text, .nav-label, .nav-badge, .user-info { display: none; }
  .nav-item { justify-content: center; padding: 9px; }
  .content { padding: 16px; }
  .form-row, .info-grid, .package-cards { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
