:root {
  /* ── Backgrounds ── */
  --bg: #060a15;
  --bg-2: #070c1a;
  --panel: #0c1526;
  --panel-2: #0e1830;
  --panel-glass: rgba(18, 30, 54, 0.55);

  /* ── Electric blue accent (reference) ── */
  --blue: #3b82f6;
  --blue-bright: #4f9dff;
  --blue-deep: #1e5fd8;
  --ice: #81C3F4;
  --ice-soft: #B8DFF9;

  /* ── Secondary accents ── */
  --purple: #8b5cf6;
  --cyan: #38bdf8;

  /* ── Semantic ── */
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #f87171;

  /* ── Text ── */
  --text: #eaf2ff;
  --text-muted: #8595ad;
  --text-dim: #5b6b84;

  /* ── Borders ── */
  --border: rgba(90, 140, 210, 0.14);
  --border-strong: rgba(90, 150, 230, 0.32);

  /* ── Glows ── */
  --glow-blue: 0 0 24px rgba(59, 130, 246, 0.35);
  --glow-blue-strong: 0 0 34px rgba(59, 130, 246, 0.55);

  --sidebar-w: 262px;
  --topbar-h: 66px;
  --radius: 16px;
  --radius-sm: 11px;

  /* ── Responsive spacing scale ── */
  --space-page-y: 1.6rem;
  --space-page-x: 1.6rem;
  --space-page-bottom: 1.6rem;
  --space-stack: 1.1rem;
  --space-card: 1.3rem;
  --space-grid: 1.1rem;
  --space-hero: 1.9rem;
  --grid-shell-offset: 1rem;
  --grid-page-x: 1.2rem;
  --grid-inset-x: 1.4rem;
  --grid-inset-y: 0.8rem;
  --grid-inset-bottom: 0.85rem;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(1000px 620px at 78% -140px, rgba(47, 107, 255, 0.14), transparent 55%),
    radial-gradient(820px 520px at 108% 118%, rgba(139, 92, 246, 0.07), transparent 55%),
    radial-gradient(600px 400px at -5% 0%, rgba(56, 189, 248, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* ───── Layout ───── */
.layout { display: flex; min-height: 100vh; }

/* ───── Sidebar ───── */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, rgba(12, 21, 38, 0.92), rgba(8, 14, 26, 0.92));
  border-right: 1px solid var(--border);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.4rem 1.35rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo { height: 38px; width: auto; object-fit: contain; flex-shrink: 0; }

.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: color 0.2s ease, background 0.2s ease;
}
.sidebar-close:hover {
  color: var(--text);
  background: rgba(59, 130, 246, 0.1);
}
.sidebar-close svg { width: 20px; height: 20px; }

.sidebar-nav {
  padding: 1.1rem 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

/* Admin-Navigation nur für Admin-Session sichtbar */
.nav-admin-only {
  display: none !important;
}
.layout.is-admin .nav-item.nav-admin-only {
  display: flex !important;
}
.layout.is-admin .nav-section-label.nav-admin-only {
  display: block !important;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(59, 130, 246, 0.08);
}

.nav-item:hover .nav-icon { color: var(--blue-bright); }

.nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2f6bff 0%, #1e5fd8 100%);
  border-color: rgba(120, 175, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(120, 175, 255, 0.2), 0 10px 26px -8px rgba(47, 107, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: navPulse 3.6s ease-in-out infinite;
}

.nav-item.active .nav-icon { color: #ffffff; }

.nav-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

/* ───── Sidebar System Card (GRID AI Core) ───── */
.sidebar-bottom {
  padding: 0.85rem;
  border-top: 1px solid var(--border);
}

.sidebar-system-card {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.05));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
}

.ai-orb {
  position: absolute;
  top: -26px; right: -26px;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--blue-bright), var(--blue-deep) 55%, transparent 72%);
  filter: blur(2px);
  opacity: 0.55;
  animation: orbPulse 4s ease-in-out infinite;
  pointer-events: none;
}

.system-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}

.system-card-header strong { display: block; font-size: 0.84rem; color: var(--ice-soft); }
.system-subtitle { font-size: 0.72rem; color: var(--text-muted); }

.system-icon {
  width: 26px; height: 26px;
  color: var(--blue-bright);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(79, 157, 255, 0.6));
}

.btn-pipeline {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #1e5fd8);
  box-shadow: 0 8px 22px -8px rgba(47, 107, 255, 0.8);
  transition: box-shadow 0.25s ease, transform 0.15s ease;
  position: relative;
  z-index: 1;
  text-decoration: none;
}

.btn-pipeline:hover {
  box-shadow: 0 0 0 1px rgba(120, 175, 255, 0.5), 0 12px 30px -6px rgba(47, 107, 255, 1);
  transform: translateY(-1px);
}

.btn-pipeline:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-arrow { width: 16px; height: 16px; }

.pipeline-msg {
  font-size: 0.72rem;
  color: var(--ice-soft);
  margin: 0 0 0.65rem;
  text-align: left;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

.btn-grid-core {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(8, 145, 178, 0.85));
}

/* ───── Main ───── */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ───── Topbar ───── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(10, 17, 32, 0.72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
}

.topbar.topbar-grid-mode {
  justify-content: flex-end;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  max-width: 520px;
}

.topbar-search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.topbar-refresh-btn { flex-shrink: 0; }

.search-icon {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--text-muted);
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.search-spinner {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 15px;
  height: 15px;
  margin-top: -7.5px;
  border-radius: 50%;
  border: 2px solid rgba(147, 197, 253, 0.28);
  border-top-color: #93c5fd;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.topbar-search-field.is-loading .search-icon { opacity: 0; }
.topbar-search-field.is-loading .search-spinner {
  opacity: 1;
  animation: spin 0.75s linear infinite;
}
.topbar-search-field.is-loading input {
  border-color: rgba(79, 157, 255, 0.55);
  box-shadow: var(--glow-blue);
}

.topbar-search-field input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.6rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(6, 12, 24, 0.8);
  color: var(--text);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.25s;
}

.topbar-search-field input::placeholder { color: var(--text-dim); }
.topbar-search-field input:focus {
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue);
}

.leads-loading {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  min-height: 7.5rem;
}
.leads-loading-spinner {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid rgba(147, 197, 253, 0.25);
  border-top-color: #93c5fd;
  animation: spin 0.8s linear infinite;
}
.leads-loading strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}
.leads-loading p {
  margin: 0;
  font-size: 0.88rem;
}

.topbar-actions { display: flex; align-items: center; gap: 0.6rem; }

.topbar-btn,
.topbar-notification {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 12, 24, 0.6);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.25s;
  position: relative;
}

.topbar-btn:hover,
.topbar-notification:hover {
  color: var(--blue-bright);
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue);
}

.topbar-btn svg,
.topbar-notification svg { width: 18px; height: 18px; }

.notif-dot {
  position: absolute;
  top: 8px; right: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 8px 1px rgba(79, 157, 255, 0.9);
  animation: dotPulse 2s ease-in-out infinite;
}

.topbar-user { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.2rem; }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.76rem; font-weight: 700;
  color: #ffffff;
  border: 1px solid rgba(120, 175, 255, 0.4);
  box-shadow: 0 0 14px -2px rgba(47, 107, 255, 0.6);
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-avatar.has-image {
  background: transparent;
}
.avatar-upload-area {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
.account-avatar-preview {
  width: 72px;
  height: 72px;
  font-size: 1.1rem;
}
.avatar-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ───── Content ───── */
.content {
  padding: var(--space-page-y) var(--space-page-x) var(--space-page-bottom);
  flex: 1;
  min-height: 0;
}
.content.content-grid-mode {
  padding: var(--grid-shell-offset) var(--grid-page-x) 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.content.content-grid-mode:not(:has(.grid-chat-shell, .grid-boot-screen)) {
  display: block;
  padding-bottom: 1.2rem;
}
.content.content-grid-mode .grid-chat-shell {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  flex: 1;
  min-height: calc(100vh - var(--topbar-h) - var(--grid-shell-offset));
  min-height: calc(100dvh - var(--topbar-h) - var(--grid-shell-offset));
}

/* ───── Cards (glassmorphism + depth) ───── */
.card {
  background: linear-gradient(180deg, rgba(20, 32, 58, 0.5), rgba(11, 19, 37, 0.55));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-card);
  margin-bottom: var(--space-grid);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s, box-shadow 0.3s, transform 0.2s;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.grid { display: grid; gap: var(--space-grid); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.dash-two-col { grid-template-columns: 1fr 1fr; }
.account-grid { grid-template-columns: 1fr 1fr; }

/* ───── Stat Cards ───── */
.stat-card {
  background: linear-gradient(180deg, rgba(20, 32, 58, 0.5), rgba(11, 19, 37, 0.55));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-card);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s, box-shadow 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 157, 255, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.stat-card:hover::before { opacity: 1; }

.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(79, 157, 255, 0.25);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 12px rgba(79, 157, 255, 0.15);
}

.stat-card .stat-icon svg { width: 21px; height: 21px; color: var(--blue-bright); }

.stat-label { color: var(--text-muted); font-size: 0.82rem; font-weight: 500; }
.stat-value { font-size: 2.1rem; font-weight: 700; color: #ffffff; line-height: 1; letter-spacing: -0.01em; }
a.stat-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.stat-card-link:focus-visible {
  outline: 2px solid rgba(79, 157, 255, 0.7);
  outline-offset: 2px;
}
.lead-queue-explain {
  margin-bottom: var(--space-stack);
}
.lead-queue-explain-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}
.lead-queue-explain-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}
.lead-queue-explain-head a {
  font-size: 0.84rem;
  white-space: nowrap;
}
.lead-queue-explain > p {
  margin: 0 0 0.65rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}
.lead-queue-explain .plain-explain-list {
  margin: 0;
}

/* ───── Section title ───── */
.section-title { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.85rem; color: var(--text); }

/* ───── Tables ───── */
table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(180deg, rgba(20, 32, 58, 0.42), rgba(11, 19, 37, 0.5));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

th, td { text-align: left; padding: 0.8rem 1.05rem; border-bottom: 1px solid var(--border); font-size: 0.85rem; }

th {
  background: rgba(8, 14, 28, 0.6);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td { color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(59, 130, 246, 0.06); }
tr.clickable { cursor: pointer; transition: background 0.15s; }

/* ───── Badges ───── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.22rem 0.62rem;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-A { background: rgba(34, 197, 94, 0.14); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-B { background: rgba(59, 130, 246, 0.16); color: var(--blue-bright); border: 1px solid rgba(79, 157, 255, 0.35); box-shadow: 0 0 10px -2px rgba(59, 130, 246, 0.4); }
.badge-C { background: rgba(245, 158, 11, 0.14); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-D { background: rgba(133, 149, 173, 0.12); color: var(--text-muted); border: 1px solid rgba(133, 149, 173, 0.22); }

/* ───── Status dot ───── */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 0.45rem;
  vertical-align: middle;
}
.status-pending { background: var(--amber); box-shadow: 0 0 8px 1px rgba(245, 158, 11, 0.7); }
.status-accepted { background: var(--green); box-shadow: 0 0 8px 1px rgba(34, 197, 94, 0.7); }
.status-needs_manual, .status-pending { background: var(--amber); box-shadow: 0 0 8px 1px rgba(245, 158, 11, 0.7); }
.status-rejected, .status-blocked, .status-bad_evidence { background: var(--red); box-shadow: 0 0 8px 1px rgba(248, 113, 113, 0.7); }
.status-needs_more_data, .status-wrong_product_fit, .status-wrong_contact { background: var(--blue-bright); box-shadow: 0 0 8px 1px rgba(79, 157, 255, 0.7); }
.status-duplicate { background: var(--text-muted); }

/* ───── Review status text ───── */
.review-pending, .review-needs_manual { color: var(--amber); }
.review-accepted { color: var(--green); }
.review-rejected, .review-blocked, .review-bad_evidence { color: var(--red); }
.review-needs_more_data, .review-wrong_product_fit, .review-wrong_contact { color: var(--blue-bright); }
.review-duplicate { color: var(--text-muted); }

/* ───── Progress bars ───── */
.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--border);
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue-bright));
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.55);
  animation: barGrow 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar.bar-green > span { background: linear-gradient(90deg, #15803d, var(--green)); box-shadow: 0 0 12px rgba(34, 197, 94, 0.5); }
.bar.bar-amber > span { background: linear-gradient(90deg, #b45309, var(--amber)); box-shadow: 0 0 12px rgba(245, 158, 11, 0.5); }
.bar.bar-purple > span { background: linear-gradient(90deg, #6d28d9, var(--purple)); box-shadow: 0 0 12px rgba(139, 92, 246, 0.5); }
.bar.bar-muted > span { background: linear-gradient(90deg, #475569, #94a3b8); box-shadow: none; }

.bar-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.7rem; }
.bar-row .bar-label { min-width: 90px; font-size: 0.8rem; color: var(--text-muted); }
.bar-row .bar { flex: 1; }
.bar-row .bar-value { min-width: 42px; text-align: right; font-size: 0.82rem; font-weight: 600; color: var(--text); }

/* ───── Buttons ───── */
.btn {
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.15s, border-color 0.2s, color 0.2s;
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1e5fd8);
  color: #ffffff;
  box-shadow: 0 8px 22px -8px rgba(47, 107, 255, 0.8);
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(120, 175, 255, 0.5), 0 12px 30px -6px rgba(47, 107, 255, 1);
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid var(--border-strong);
  color: var(--ice-soft);
}
.btn-secondary:hover {
  border-color: rgba(120, 175, 255, 0.55);
  box-shadow: var(--glow-blue);
  transform: translateY(-1px);
}
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: rgba(6, 12, 24, 0.6);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--blue-bright); border-color: var(--border-strong); box-shadow: var(--glow-blue); text-decoration: none; }

.btn-warn {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}
.btn-warn:hover {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25), 0 10px 24px -10px rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  box-shadow: 0 8px 22px -8px rgba(239, 68, 68, 0.75);
}
.btn-danger:hover {
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.45), 0 12px 30px -6px rgba(239, 68, 68, 0.9);
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-block { width: 100%; justify-content: center; }

/* ───── Filters ───── */
.lead-search-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: var(--space-stack);
  padding: 0.85rem 1rem;
}
.lead-search-summary h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.lead-search-summary p {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.lead-search-summary a {
  font-size: 0.84rem;
  white-space: nowrap;
}

.filters { display: flex; flex-wrap: wrap; gap: var(--space-stack); margin-bottom: var(--space-stack); }

.filters input, .filters select {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 12, 24, 0.7);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.filters input::placeholder { color: var(--text-dim); }
.filters input:focus, .filters select:focus { border-color: var(--border-strong); box-shadow: var(--glow-blue); }
.filters select option { background: var(--panel); }

/* ───── Detail grid ───── */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 1.25rem; }
@media (max-width: 1024px) { .detail-grid { grid-template-columns: 1fr; } }

/* ───── Lead-Header ───── */
.lead-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
}
.lead-header-main { min-width: 0; }
.lead-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
  word-break: break-word;
}
.lead-sub { margin-top: 0.35rem; font-size: 0.86rem; }
.lead-sub a { color: var(--blue-bright); }
.lead-metrics { display: flex; gap: 0.75rem; flex-shrink: 0; }
.metric-box {
  min-width: 82px;
  text-align: center;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(59, 130, 246, 0.05);
}
.metric-box .metric-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.metric-box .metric-label {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.metric-score .metric-value {
  color: var(--ice);
  background: linear-gradient(180deg, var(--ice-soft), var(--blue-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric-prio.prio-A { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); }
.metric-prio.prio-A .metric-value { color: var(--green); }
.metric-prio.prio-B { background: rgba(79, 157, 255, 0.12); border-color: rgba(79, 157, 255, 0.4); box-shadow: 0 0 14px -4px rgba(79, 157, 255, 0.5); }
.metric-prio.prio-B .metric-value { color: var(--blue-bright); }
.metric-prio.prio-C { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); }
.metric-prio.prio-C .metric-value { color: var(--amber); }
.metric-prio.prio-D { background: rgba(133, 149, 173, 0.1); border-color: rgba(133, 149, 173, 0.25); }
.metric-prio.prio-D .metric-value { color: var(--text-muted); }
.lead-summary {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 1.15rem 0 0;
}
.lead-meta { margin-top: 0.85rem; }
@media (max-width: 640px) {
  .lead-header-top { flex-direction: column; }
  .lead-metrics { width: 100%; }
  .metric-box { flex: 1; }
}

/* ───── Claims / pages / product fit ───── */
.claim-item, .page-item, .correction-item {
  border-left: 3px solid var(--blue);
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.5rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0 9px 9px 0;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.claim-item a, .page-item a { color: var(--blue-bright); word-break: break-all; text-decoration: none; }
.claim-item a:hover, .page-item a:hover { text-decoration: underline; }

.page-type {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ice-soft);
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid var(--border);
  vertical-align: middle;
}

.product-fit {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  margin-bottom: 0.5rem;
  background: rgba(59, 130, 246, 0.04);
}
.product-fit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.product-fit-name { color: var(--ice-soft); font-size: 0.95rem; }
.fit-score {
  flex-shrink: 0;
  min-width: 42px;
  text-align: center;
  padding: 0.3rem 0.6rem;
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue-bright);
  background: rgba(79, 157, 255, 0.14);
  border: 1px solid rgba(79, 157, 255, 0.4);
  box-shadow: 0 0 12px -3px rgba(79, 157, 255, 0.45);
}
.claim-group { margin-bottom: 1rem; }

/* ───── Claim-Belege ───── */
.claim-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.4rem; }
.claim-text { display: block; }
.claim-excerpt { margin-top: 0.35rem; }
.claim-best {
  border-left-color: var(--green);
  background: rgba(34, 197, 94, 0.06);
  box-shadow: 0 0 16px -6px rgba(34, 197, 94, 0.4);
}
.claim-best-tag,
.claim-product {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.claim-best-tag { color: var(--green); background: rgba(34, 197, 94, 0.14); border: 1px solid rgba(34, 197, 94, 0.35); }
.claim-product { color: var(--ice); background: rgba(129, 195, 244, 0.12); border: 1px solid rgba(129, 195, 244, 0.3); }

/* ───── Aufklappbare Bereiche ───── */
.disclosure-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--blue-bright);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.25s;
}
.disclosure-toggle:hover { border-color: var(--border-strong); box-shadow: var(--glow-blue); }
.disclosure-toggle-title { margin-top: 0; background: transparent; border: none; padding: 0; color: var(--text); }
.disclosure-toggle-title:hover { box-shadow: none; }
.disclosure-toggle-title .disclosure-label { color: var(--text); }
.disclosure-chevron { flex-shrink: 0; transition: transform 0.3s ease; color: var(--blue-bright); }
.disclosure-toggle.open .disclosure-chevron { transform: rotate(180deg); }
.disclosure {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}
.disclosure.open { grid-template-rows: 1fr; }
.disclosure-inner { overflow: hidden; }
.disclosure.open .disclosure-inner { padding-top: 0.6rem; }

/* ───── Audit-Log (Admin) ───── */
.audit-category-card { margin-bottom: 1rem; }
.audit-category-title { display: flex; align-items: center; gap: 0.5rem; }
.audit-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  font-weight: 600;
}
.audit-table-wrap { margin-top: 0.75rem; }
.audit-table { width: 100%; }
.audit-disclosure-toggle { margin-top: 0.5rem; }
.audit-row {
  cursor: pointer;
  transition: background 0.15s ease;
}
.audit-row:hover,
.audit-row:focus-visible {
  background: rgba(59, 130, 246, 0.08);
  outline: none;
}
.audit-action-link {
  color: var(--blue-bright);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(96, 165, 250, 0.35);
  text-underline-offset: 2px;
}
.audit-detail-overlay .audit-detail-modal {
  width: min(720px, 100%);
  padding: 1.25rem 1.35rem 1.1rem;
}
.audit-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.audit-detail-time { margin-bottom: 0.25rem; }
.audit-detail-context {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 12, 24, 0.45);
  margin-bottom: 1rem;
}
.audit-detail-section { margin-bottom: 1rem; }
.audit-detail-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}
.audit-detail-status-change {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.audit-detail-arrow { color: var(--text-muted); }
.audit-detail-note {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.audit-detail-hint { margin-top: 0.55rem; }
.audit-detail-empty { color: var(--text-muted); font-style: italic; }
.audit-detail-dl {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) 1fr;
  gap: 0.35rem 0.85rem;
  margin: 0;
}
.audit-detail-dl dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.audit-detail-dl dd { margin: 0; font-size: 0.9rem; word-break: break-word; }
.audit-detail-dl-compact { gap: 0.25rem 0.75rem; }
.audit-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.audit-detail-table th,
.audit-detail-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.audit-detail-table th {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.audit-detail-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.audit-detail-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue-bright);
  font-size: 0.82rem;
  text-decoration: none;
}
.audit-detail-chip:hover { background: rgba(59, 130, 246, 0.16); }
.audit-detail-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.activity-filters { margin-bottom: 1rem; }
.activity-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem 1rem;
  align-items: end;
}
.activity-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.activity-filter-grid select {
  width: 100%;
}
.activity-live-toggle {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
}
.activity-table-wrap { margin-top: 0.25rem; }
.activity-table { width: 100%; }
.activity-table th,
.activity-table td {
  vertical-align: top;
  padding: 0.55rem 0.65rem;
}
.activity-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.12);
  white-space: nowrap;
}
.activity-type-page_view { border-color: rgba(59, 130, 246, 0.35); background: rgba(59, 130, 246, 0.1); color: var(--blue-bright); }
.activity-type-click { border-color: rgba(190, 242, 100, 0.45); background: rgba(190, 242, 100, 0.12); color: #4d7c0f; }
.activity-type-dwell { border-color: rgba(168, 85, 247, 0.35); background: rgba(168, 85, 247, 0.1); color: #7e22ce; }
.activity-type-scroll { border-color: rgba(14, 165, 233, 0.35); background: rgba(14, 165, 233, 0.1); color: #0369a1; }
.activity-type-api_call { border-color: rgba(100, 116, 139, 0.35); background: rgba(100, 116, 139, 0.1); color: #475569; }
.activity-type-filter_change { border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.1); color: #b45309; }
.activity-type-lead_viewed { border-color: rgba(59, 130, 246, 0.35); background: rgba(59, 130, 246, 0.1); color: var(--blue-bright); }
.activity-type-lead_reviewed { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.1); color: #15803d; }
.activity-type-mail_opened,
.activity-type-mail_preview,
.activity-type-mail_edited,
.activity-type-mail_generated { border-color: rgba(14, 165, 233, 0.35); background: rgba(14, 165, 233, 0.1); color: #0369a1; }
.activity-type-mail_sent { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.1); color: #15803d; }
.activity-type-grid_opened,
.activity-type-grid_message { border-color: rgba(168, 85, 247, 0.35); background: rgba(168, 85, 247, 0.1); color: #7e22ce; }
.activity-type-grid_deleted { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.1); color: #b91c1c; }

.activity-timeline-card { padding: 0.5rem 0; }
.activity-session-group {
  border-bottom: 1px solid var(--border);
}
.activity-session-group:last-child { border-bottom: none; }
.activity-session-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  background: rgba(59, 130, 246, 0.04);
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
  transition: background 0.15s ease;
}
.activity-session-toggle:hover,
.activity-session-toggle:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}
.activity-session-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1.4;
}
.activity-session-user {
  font-weight: 600;
  font-size: 0.98rem;
}
.activity-session-date,
.activity-session-meta {
  font-size: 0.92rem;
  color: var(--text-muted);
}
.activity-session-chevron {
  flex-shrink: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.activity-session-toggle.open .activity-session-chevron {
  transform: rotate(180deg);
}
.activity-session-items .activity-timeline-item {
  padding-left: 1.5rem;
  background: transparent;
}
.activity-session-items .activity-inline-link,
.activity-session-items .activity-inline-link-btn {
  color: var(--blue-bright);
}
.activity-timeline { display: flex; flex-direction: column; }
.activity-timeline-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.activity-timeline-item:last-child { border-bottom: none; }
.activity-timeline-time {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.activity-timeline-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}
.activity-timeline-user {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.activity-timeline-summary {
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--text);
}
.activity-timeline-context { margin-top: 0.25rem; }
.activity-timeline-item[role="button"] {
  cursor: pointer;
}
.activity-timeline-item[role="button"]:hover,
.activity-timeline-item[role="button"]:focus-visible {
  background: rgba(59, 130, 246, 0.08);
}
.activity-timeline-actions {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.activity-inline-link,
.activity-inline-link-btn {
  font-size: 0.82rem;
  color: var(--blue-bright);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.activity-inline-link:hover,
.activity-inline-link-btn:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .activity-timeline-item { grid-template-columns: 1fr; gap: 0.35rem; }
}

.lead-source { margin-top: 1.25rem; text-align: center; opacity: 0.7; }

/* ───── Verständliche Bewertung ───── */
.plain-explain-card { margin-bottom: 1rem; }
.plain-explain-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}
.plain-explain-list li::marker {
  color: var(--ice-soft);
}

/* ───── KI-Bewertung ───── */
.ai-eval-card { margin-bottom: 1rem; }
.ai-eval-summary {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ice-soft);
  line-height: 1.45;
}
.ai-eval-rationale {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  white-space: normal;
}
.ai-eval-exclude {
  margin-top: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.22);
  font-size: 0.84rem;
  color: var(--text);
}
.ai-eval-claim-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.84rem;
}
.ai-eval-claim-list li { margin-bottom: 0.35rem; }

/* ───── Auto-Review Erklärung ───── */
.auto-review-card { margin-bottom: 1rem; }
.auto-review-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.auto-review-check {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.55rem;
  align-items: start;
}
.auto-review-check-mark {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 0.1rem;
}
.auto-review-check.is-pass .auto-review-check-mark {
  background: rgba(52, 211, 153, 0.16);
  color: var(--green);
}
.auto-review-check.is-fail .auto-review-check-mark {
  background: rgba(248, 113, 113, 0.16);
  color: var(--red);
}
.auto-review-check-label {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.score-dim-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.score-dim-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr 3.2rem;
  gap: 0.55rem;
  align-items: center;
}
.score-dim-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.score-dim-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}
.score-dim-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-bright), var(--ice-soft));
}
.score-dim-value {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ───── Review panel ───── */
.review-panel { position: static; }

.review-panel > label.small,
.review-panel label.small.muted {
  display: block;
  margin-bottom: 0.25rem;
}

.review-panel select,
.review-panel textarea,
.review-panel input[type="text"] {
  width: 100%;
  margin-bottom: 0.6rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(6, 12, 24, 0.7);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
  resize: vertical;
}
.review-panel select option { background: var(--panel); }
.review-panel select:focus, .review-panel textarea:focus, .review-panel input:focus {
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.section-head .section-title {
  margin-bottom: 0;
}
.btn-icon-ghost {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(6, 12, 24, 0.65);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.25s;
}
.btn-icon-ghost svg {
  width: 16px;
  height: 16px;
}
.btn-icon-ghost:hover {
  border-color: var(--border-strong);
  color: var(--blue-bright);
  box-shadow: var(--glow-blue);
}

.company-inline-form {
  margin-top: 0.2rem;
}
.company-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}
.company-profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}
.company-profile-field span {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.company-profile-field input,
.company-profile-field textarea {
  margin-bottom: 0;
}
.company-profile-field-full {
  grid-column: 1 / -1;
}
.company-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.25rem;
}
@media (max-width: 900px) {
  .company-inline-grid {
    grid-template-columns: 1fr;
  }
  .company-inline-actions {
    justify-content: stretch;
  }
  .company-inline-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ───── Helpers ───── */
.muted { color: var(--text-muted); }
.small { font-size: 0.8rem; }
.empty { text-align: center; padding: 3rem; color: var(--text-muted); }

.back-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-bottom: 1.25rem;
  color: var(--blue-bright);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--ice-soft); }

a { color: var(--blue-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ───── Priority grid ───── */
.priority-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-top: 0.5rem; }
.priority-cell {
  text-align: center;
  padding: 0.7rem 0.5rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(59, 130, 246, 0.04);
  transition: border-color 0.2s, box-shadow 0.25s;
}
.priority-cell:hover { border-color: var(--border-strong); box-shadow: var(--glow-blue); }
.priority-cell .prio-label { font-size: 0.75rem; color: var(--text-muted); }
.priority-cell .prio-value { font-size: 1.35rem; font-weight: 700; margin-top: 0.2rem; }

/* ───── Hero ───── */
.hero-card {
  background:
    radial-gradient(600px 300px at 92% -40%, rgba(59, 130, 246, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(15, 24, 48, 0.5) 60%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-hero);
  margin-bottom: var(--space-stack);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: #ffffff; letter-spacing: -0.01em; }
.hero-desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1.15rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

#dashboard-welcome-title {
  font-size: clamp(2rem, 3.4vw, 2.55rem);
  line-height: 1.12;
}

#dashboard-welcome-desc {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.45;
  max-width: 72ch;
}

.dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}

.dashboard-stack > .hero-card,
.dashboard-stack > .card,
.dashboard-stack > .grid,
.dashboard-stack > .next-steps {
  margin: 0;
}

.dashboard-stack .grid > .card {
  margin-bottom: 0;
}

.search-admin-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}

.search-admin-stack > .hero-card,
.search-admin-stack > .card,
.search-admin-stack > .grid {
  margin: 0;
}

.search-admin-stack .grid > .card {
  margin-bottom: 0;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

/* ───── Next steps ───── */
.next-steps {
  background: linear-gradient(180deg, rgba(20, 32, 58, 0.42), rgba(11, 19, 37, 0.5));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-card);
  backdrop-filter: blur(12px);
}
.next-steps p { color: var(--text-muted); font-size: 0.86rem; line-height: 1.55; }
.next-steps a { color: var(--blue-bright); font-weight: 600; }

/* ───── GRID Chat ───── */
.grid-chat-shell {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 0;
  min-height: 100%;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 17, 32, 0.88), rgba(6, 10, 20, 0.92));
  box-shadow:
    0 24px 60px -28px rgba(3, 8, 18, 0.95),
    0 0 0 1px rgba(120, 175, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  animation: gridBoot 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.grid-chat-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(59, 130, 246, 0.08), transparent),
    radial-gradient(ellipse 500px 350px at 80% 60%, rgba(139, 92, 246, 0.06), transparent);
  pointer-events: none;
}
.grid-chat-left,
.grid-chat-main {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}
.grid-chat-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
  overflow: hidden;
  background: rgba(7, 12, 26, 0.72);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(24px);
  padding: 1.2rem 0.95rem;
  animation: gridSlideLeft 0.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.grid-chat-left-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  justify-content: center;
}
/* GRID Orb – Hero-Block, zentriert im linken Panel */
.grid-orb-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding: 0.6rem 0 0.5rem;
  animation: gridFadeUp 0.5s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.grid-orb-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rotierender Außenring – futuristischer Rahmen um den Orb */
.grid-orb-wrap::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  padding: 1px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(79, 157, 255, 0.75) 70deg,
    transparent 150deg,
    transparent 210deg,
    rgba(139, 92, 246, 0.75) 290deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: gridOrbRing 9s linear infinite;
  opacity: 0.55;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

/* Animierbare Intensitäts-Variablen – erlauben weiche Übergänge zwischen den Zuständen */
@property --orb-amp {
  syntax: "<number>";
  inherits: true;
  initial-value: 0.03;
}
@property --orb-glow {
  syntax: "<number>";
  inherits: true;
  initial-value: 0.45;
}
@property --wave {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

/* GRID Orb – ZERKOM Markenfarben (blau / violett auf dunklem Kern) */
.orb-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 50%;
  rotate: 90deg;
  cursor: pointer;
  --orb-amp: 0.03;
  --orb-glow: 0.45;
  transition: --orb-amp 0.7s ease, --orb-glow 0.7s ease;
  animation: orbBreath 4.5s ease-in-out infinite;
}
.orb-container:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 4px;
}

.orb {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg);
  filter: blur(20px);
  transition: width 0.35s ease;
}
.orb-container:hover .orb { width: 110%; }

.orb-inner {
  position: absolute;
  left: -120%;
  top: -25%;
  width: 160%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--blue-bright);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  animation: gridOrbSpin 10s linear infinite;
  transition: width 0.35s ease;
}

.orb-inner:nth-child(2) {
  left: auto;
  right: -120%;
  top: auto;
  bottom: -25%;
  background: var(--purple);
  animation-duration: 13s;
  clip-path: polygon(
    20% 0%,
    0% 20%,
    30% 50%,
    0% 80%,
    20% 100%,
    50% 70%,
    80% 100%,
    100% 80%,
    70% 50%,
    100% 20%,
    80% 0%,
    50% 30%
  );
}

.orb-container:hover .orb-inner { width: 170%; }

/* ── Zustände: nur Intensität ändern → weich per Variablen-Transition ── */
.orb-container[data-state="speaking"] { --orb-amp: 0.12; --orb-glow: 0.9; }
.orb-container[data-state="searching"] { --orb-amp: 0.15; --orb-glow: 1; }
.orb-container[data-state="audio"] { --orb-amp: 0.035; --orb-glow: 0.58; }

/* Audio-Sprechmodus: dezente, aber klar sichtbare Sprechanimation */
.orb-container.orb-voice-active {
  --orb-amp: 0.05;
  --orb-glow: 0.7;
  animation: orbSpeakBreath 2.6s ease-in-out infinite;
}
.orb-container.orb-voice-active .orb-inner {
  animation-duration: 7s;
}
.orb-container.orb-voice-active .orb-inner:nth-child(2) {
  animation-duration: 9s;
}

.grid-orb-wrap.orb-voice-active::before {
  opacity: 0.9;
}
.grid-orb-wrap.orb-voice-active::after {
  opacity: 0;
}

/* Sanfter, sichtbarer Puls-Ring als Sprech-Indikator */
.orb-voice-ripples {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.grid-orb-wrap.orb-voice-active .orb-voice-ripples {
  opacity: 1;
}
.orb-voice-ripples span {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1.5px solid rgba(79, 157, 255, 0.4);
  animation: orbVoiceRipple 2.6s ease-out infinite;
}
.orb-voice-ripples span:nth-child(2) {
  border-color: rgba(139, 92, 246, 0.32);
  animation-delay: 1.3s;
}

.grid-orb-wrap:has(.orb-container[data-state="speaking"])::before,
.grid-orb-wrap:has(.orb-container[data-state="searching"])::before {
  opacity: 1;
}

/* Speaking-Welle: läuft dauerhaft, wird nur über --wave weich ein-/ausgeblendet */
.grid-orb-wrap::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid var(--blue-bright);
  animation: orbWave 1.5s ease-out infinite;
  pointer-events: none;
}
.grid-orb-wrap { --wave: 0; transition: --wave 0.5s ease; }
.grid-orb-wrap:has(.orb-container[data-state="speaking"]) { --wave: 1; }
.grid-orb-wrap:has(.orb-container[data-state="searching"]) { --wave: 1; }
.grid-orb-wrap:has(.orb-container[data-state="searching"])::after { border-color: var(--purple); animation-duration: 1s; }

/* Sprechanimation: sichtbares, weiches Pulsieren im Sprechrhythmus */
@keyframes orbSpeakBreath {
  0%, 100% {
    transform: scale(0.985);
    filter:
      drop-shadow(0 0 8px rgba(79, 157, 255, 0.35))
      drop-shadow(0 0 6px rgba(139, 92, 246, 0.28));
  }
  50% {
    transform: scale(1.04);
    filter:
      drop-shadow(0 0 16px rgba(79, 157, 255, 0.6))
      drop-shadow(0 0 12px rgba(139, 92, 246, 0.45));
  }
}

@keyframes orbVoiceRipple {
  0%   { transform: scale(0.85); opacity: 0.55; }
  70%  { opacity: 0.12; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes orbWave {
  0%   { transform: scale(0.8); opacity: calc(var(--wave) * 0.55); }
  70%  { opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes gridOrbSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes gridOrbRing {
  to { transform: rotate(360deg); }
}

/* Einzige Puls-Animation – läuft konstant, Amplitude & Glow kommen aus den Variablen */
@keyframes orbBreath {
  0%, 100% {
    transform: scale(1);
    filter:
      drop-shadow(0 0 calc(4px + var(--orb-glow) * 6px) rgba(79, 157, 255, calc(var(--orb-glow) * 0.75)))
      drop-shadow(0 0 calc(4px + var(--orb-glow) * 5px) rgba(139, 92, 246, calc(var(--orb-glow) * 0.7)));
  }
  50% {
    transform: scale(calc(1 + var(--orb-amp)));
    filter:
      drop-shadow(0 0 calc(8px + var(--orb-glow) * 16px) rgba(79, 157, 255, calc(0.4 + var(--orb-glow) * 0.55)))
      drop-shadow(0 0 calc(7px + var(--orb-glow) * 13px) rgba(139, 92, 246, calc(0.35 + var(--orb-glow) * 0.5)));
  }
}

/* Status-Label unter dem Orb */
.grid-orb-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.grid-orb-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 0 0 transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.grid-orb-hero[data-state="idle"] .grid-orb-status::before {
  background: var(--blue-bright);
  box-shadow: 0 0 8px 1px rgba(79, 157, 255, 0.7);
}
.grid-orb-hero[data-state="speaking"] .grid-orb-status {
  color: var(--ice-soft);
}
.grid-orb-hero[data-state="speaking"] .grid-orb-status::before,
.grid-orb-hero[data-state="searching"] .grid-orb-status::before {
  background: var(--blue-bright);
  animation: gridStatusPulse 1s ease-in-out infinite;
}
.grid-orb-hero[data-state="audio"] .grid-orb-status,
.grid-orb-hero:has(.orb-voice-active) .grid-orb-status {
  color: var(--ice-soft);
}
.grid-orb-hero[data-state="audio"] .grid-orb-status::before,
.grid-orb-hero:has(.orb-voice-active) .grid-orb-status::before {
  background: var(--blue-bright);
  animation: gridStatusPulseSlow 3.4s ease-in-out infinite;
}
.grid-orb-hero[data-state="searching"] .grid-orb-status { color: var(--purple); }
.grid-orb-hero[data-state="searching"] .grid-orb-status::before { background: var(--purple); }

/* Mobile-only ORB start screen elements – hidden on desktop */
.grid-orb-tagline,
.grid-start-prompts {
  display: none;
}

.grid-audio-controls {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, rgba(79, 157, 255, 0.16), transparent 58%),
    radial-gradient(circle at 50% 74%, rgba(139, 92, 246, 0.14), transparent 60%),
    rgba(4, 8, 18, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 0 0 1px rgba(120, 170, 255, 0.14),
    inset 0 0 28px rgba(79, 157, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.grid-audio-controls.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.grid-audio-controls[hidden] {
  display: none !important;
}
.grid-orb-hero[data-audio-controls="open"] .grid-orb-wrap::before {
  opacity: 0.95;
}
.grid-audio-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.14rem 0.22rem;
  align-items: center;
  justify-items: center;
}
/* Dreieck-Anordnung: Play oben mittig, Pause/Stop darunter → bleibt kompakt im Orb */
.grid-audio-btn:nth-child(1) { grid-column: 1 / 3; margin-bottom: -0.05rem; }
.grid-audio-btn {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: rgba(214, 235, 255, 0.95);
  cursor: pointer;
  opacity: 0;
  transform: translateY(7px) scale(0.78);
  transition:
    color 0.22s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease;
}
.grid-audio-btn-core {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(79, 157, 255, 0.22), transparent 58%),
    radial-gradient(circle at 68% 72%, rgba(139, 92, 246, 0.18), transparent 62%),
    rgba(6, 12, 24, 0.42);
  box-shadow:
    inset 0 0 14px rgba(79, 157, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.22s ease, background 0.22s ease, transform 0.22s ease;
}
.grid-audio-btn-core::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  padding: 1px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(79, 157, 255, 0.55) 80deg,
    transparent 160deg,
    transparent 220deg,
    rgba(139, 92, 246, 0.55) 300deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: gridOrbRing 7s linear infinite;
  opacity: 0.75;
}
.grid-audio-btn:nth-child(2) .grid-audio-btn-core::before { animation-delay: -2.3s; }
.grid-audio-btn:nth-child(3) .grid-audio-btn-core::before { animation-delay: -4.6s; }
.grid-audio-controls.is-visible .grid-audio-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.grid-audio-controls.is-visible .grid-audio-btn:nth-child(2) { transition-delay: 0.06s; }
.grid-audio-controls.is-visible .grid-audio-btn:nth-child(3) { transition-delay: 0.12s; }
.grid-audio-btn svg {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 0 4px rgba(79, 157, 255, 0.45));
}
.grid-audio-btn:hover:not(:disabled) {
  color: #ffffff;
  transform: translateY(0) scale(1.1);
}
.grid-audio-btn:hover:not(:disabled) .grid-audio-btn-core {
  background:
    radial-gradient(circle at 35% 28%, rgba(120, 185, 255, 0.34), transparent 58%),
    radial-gradient(circle at 68% 72%, rgba(167, 130, 255, 0.28), transparent 62%),
    rgba(10, 18, 36, 0.55);
  box-shadow:
    inset 0 0 18px rgba(79, 157, 255, 0.28),
    0 0 14px rgba(79, 157, 255, 0.35),
    0 0 18px rgba(139, 92, 246, 0.22);
}
.grid-audio-btn:hover:not(:disabled) .grid-audio-btn-core::before {
  opacity: 1;
}
.grid-audio-btn:focus-visible {
  outline: none;
}
.grid-audio-btn:focus-visible .grid-audio-btn-core {
  box-shadow:
    inset 0 0 18px rgba(79, 157, 255, 0.28),
    0 0 0 2px rgba(79, 157, 255, 0.65);
}
.grid-audio-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.92);
}
.grid-audio-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}
.grid-audio-controls.is-visible .grid-audio-btn:disabled {
  opacity: 0.28;
}
.grid-audio-btn:disabled .grid-audio-btn-core::before {
  opacity: 0.35;
}

@keyframes gridStatusPulseSlow {
  0%, 100% { box-shadow: 0 0 4px 0 rgba(79, 157, 255, 0.4); }
  50% { box-shadow: 0 0 9px 2px rgba(79, 157, 255, 0.75); }
}

@keyframes gridStatusPulse {
  0%, 100% { box-shadow: 0 0 4px 0 rgba(79, 157, 255, 0.5); }
  50% { box-shadow: 0 0 12px 3px rgba(79, 157, 255, 0.95); }
}

/* GRID boot screen */
.grid-boot-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  gap: 1.2rem;
  animation: gridBoot 0.6s ease both;
}
.grid-boot-screen p {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.grid-boot-orb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, var(--blue-bright), var(--blue-deep) 70%);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
  animation: orbBreath 2s ease-in-out infinite;
}

/* GRID entrance animations */
@keyframes gridBoot {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes gridSlideLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes gridFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gridMsgIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .orb-inner,
  .orb-container,
  .grid-orb-wrap::before,
  .grid-orb-wrap::after,
  .orb-voice-ripples span,
  .grid-audio-btn-core::before,
  .grid-orb-status::before,
  .grid-chat-shell,
  .grid-chat-left,
  .grid-chat-main,
  .grid-orb-hero,
  .grid-message,
  .grid-empty {
    animation: none !important;
  }
}
.grid-chat-left h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  margin: 0.5rem 0 0;
  background: linear-gradient(120deg, var(--ice-soft), var(--blue-bright) 45%, var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grid-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.42rem 0.8rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.06);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.grid-new-btn:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: var(--border-strong);
  color: var(--text);
}
.grid-new-btn svg { flex-shrink: 0; }
.grid-chat-history {
  margin-top: auto;
  border: 1px solid rgba(90, 140, 210, 0.22);
  border-radius: 12px;
  background: rgba(6, 12, 24, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.grid-history-toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  font-size: 0.64rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}
.grid-history-toggle:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text);
}
.grid-history-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.grid-chat-history.is-open .grid-history-toggle svg {
  transform: rotate(180deg);
}
.grid-conversation-wrap {
  border-top: 1px solid rgba(90, 140, 210, 0.18);
  max-height: 230px;
}
.grid-conversation-list {
  margin-top: 0.2rem;
  overflow-y: auto;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.2rem;
}
.grid-conversation-item {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 0.32rem 0.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.grid-conversation-item:hover { background: rgba(59, 130, 246, 0.1); }
.grid-conversation-item > div { min-width: 0; flex: 1; }
.grid-conversation-item strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grid-conversation-item span {
  font-size: 0.58rem;
  color: var(--text-dim);
  line-height: 1;
}
.grid-conversation-item.active {
  background: rgba(59, 130, 246, 0.14);
}
.grid-conversation-item.active::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 3px;
  background: var(--blue-bright);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(79, 157, 255, 0.6);
}
.grid-conversation-delete {
  color: var(--text-dim) !important;
  font-size: 0.9rem !important;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.grid-conversation-item:hover .grid-conversation-delete { opacity: 1; }
.grid-conversation-item:hover .grid-conversation-delete:hover { color: #fca5a5 !important; }

/* ── Chat Main ── */
.grid-chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: rgba(4, 10, 20, 0.28);
  border: none;
  padding: 0;
  animation: gridFadeUp 0.5s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative;
}
.grid-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: var(--grid-inset-y) var(--grid-inset-x);
  border-bottom: 1px solid var(--border);
  background: rgba(7, 12, 26, 0.6);
  backdrop-filter: blur(16px);
}
.grid-chat-header strong {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.grid-messages {
  flex: 1;
  min-height: 320px;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
  padding: var(--grid-inset-y) var(--grid-inset-x);
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 157, 255, 0.2) transparent;
}

/* Floating chat bubbles with entrance animation */
.grid-message {
  border-radius: 18px;
  padding: 0.8rem 1rem;
  max-width: min(780px, 88%);
  position: relative;
  animation: gridMsgIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.grid-message.grid-message-static {
  animation: none;
}

/* User messages – right-aligned, blue glow */
.grid-message-user {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 95, 216, 0.14));
  border: 1px solid rgba(79, 157, 255, 0.3);
  box-shadow:
    0 2px 12px -4px rgba(59, 130, 246, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Assistant messages – left-aligned, glass card */
.grid-message-assistant {
  margin-right: auto;
  background: rgba(10, 18, 36, 0.7);
  border: 1px solid rgba(90, 140, 210, 0.12);
  box-shadow:
    0 4px 20px -6px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
}
.grid-message-assistant::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 157, 255, 0.25) 30%, rgba(139, 92, 246, 0.2) 70%, transparent);
}

.grid-message-role {
  font-size: 0.64rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.grid-message-user .grid-message-role { color: var(--blue-bright); }
.grid-message-assistant .grid-message-role { color: var(--purple); }

.grid-message-content {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}
.grid-message-content p { margin: 0 0 0.5rem; }
.grid-message-content p:last-child { margin-bottom: 0; }
.grid-message-content h1,
.grid-message-content h2,
.grid-message-content h3,
.grid-message-content h4,
.grid-message-content h5,
.grid-message-content h6 {
  margin: 0.2rem 0 0.55rem;
  line-height: 1.3;
  font-weight: 700;
}
.grid-message-content h1 { font-size: 1.2rem; }
.grid-message-content h2 { font-size: 1.1rem; }
.grid-message-content h3 { font-size: 1rem; }
.grid-message-content h4 { font-size: 0.95rem; }
.grid-message-content h5 { font-size: 0.9rem; }
.grid-message-content h6 { font-size: 0.86rem; }
.grid-message-content ul,
.grid-message-content ol { margin: 0.2rem 0 0.55rem 1.1rem; }
.grid-message-content li { margin: 0.15rem 0; }
.grid-message-content code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 0.8em;
  padding: 0.1rem 0.28rem;
  border-radius: 5px;
  background: rgba(6, 12, 24, 0.85);
  border: 1px solid rgba(120, 175, 255, 0.15);
}
.grid-message-content pre {
  margin: 0.35rem 0 0.55rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(3, 7, 16, 0.92);
  border: 1px solid rgba(120, 175, 255, 0.15);
  overflow: auto;
}
.grid-message-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.82rem;
}
.grid-message-content blockquote {
  margin: 0.3rem 0 0.55rem;
  padding: 0.35rem 0.65rem;
  border-left: 2px solid rgba(139, 92, 246, 0.6);
  color: var(--ice-soft);
  background: rgba(139, 92, 246, 0.06);
  border-radius: 0 7px 7px 0;
}
.grid-message-content hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 175, 255, 0.3), transparent);
  margin: 0.6rem 0 0.7rem;
}
.grid-message-meta {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.5rem;
}

/* Search hint pulsing */
.grid-search-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.grid-search-hint::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  animation: gridStatusPulse 0.8s ease-in-out infinite;
}

/* Empty state – futuristic welcome */
.grid-empty {
  border: none;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.08), transparent 65%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin: auto;
  animation: gridFadeUp 0.5s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.grid-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(79, 157, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.2);
  margin-bottom: 0.3rem;
}
.grid-empty-icon svg { width: 24px; height: 24px; color: var(--blue-bright); }
.grid-empty p:first-of-type {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.grid-empty .grid-empty-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.5;
}
.grid-empty-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.grid-empty-chip {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.2s ease, color 0.15s ease;
}
.grid-empty-chip:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--blue-bright);
  color: var(--text);
}

/* Input bar – futuristic, bottom-pinned */
.grid-input-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding: var(--grid-inset-y) var(--grid-inset-x) var(--grid-inset-bottom);
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(7, 12, 26, 0.7);
  backdrop-filter: blur(16px);
  position: relative;
}
.grid-input-wrap::before {
  content: "";
  position: absolute;
  top: -1px;
  left: var(--grid-inset-x);
  right: var(--grid-inset-x);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 157, 255, 0.2), rgba(139, 92, 246, 0.15), transparent);
}
.grid-input-wrap textarea {
  flex: 1;
  border: 1px solid rgba(90, 140, 210, 0.18);
  border-radius: 14px;
  background: rgba(6, 12, 24, 0.6);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  resize: none;
  min-height: 46px;
  max-height: 180px;
  font: inherit;
  font-size: 0.88rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.grid-input-wrap textarea:focus {
  outline: none;
  border-color: rgba(79, 157, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 0 20px -4px rgba(59, 130, 246, 0.2);
}
.grid-input-wrap textarea::placeholder { color: var(--text-dim); }

/* Send button – glowing icon */
.grid-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(79, 157, 255, 0.35);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 95, 216, 0.15));
  color: var(--blue-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.grid-send-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(30, 95, 216, 0.25));
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}
.grid-send-btn:active { transform: scale(0.95); }
.grid-send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.grid-send-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}
.grid-send-btn:hover svg { transform: translateX(1px); }

/* ───── GRID Admin ───── */
.grid-admin-form {
  display: grid;
  gap: var(--space-stack);
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}
.grid-admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.grid-admin-form input,
.grid-admin-form textarea {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(6, 12, 24, 0.75);
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font: inherit;
  width: 100%;
  min-width: 0;
}
.grid-admin-form textarea {
  resize: vertical;
}
.grid-admin-form-full {
  grid-column: 1 / -1;
}
.grid-admin-form button {
  width: fit-content;
}
.grid-admin-detail {
  margin-top: 0.9rem;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}
.grid-admin-message-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 520px;
  overflow-y: auto;
}
.grid-admin-message {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: rgba(6, 12, 24, 0.58);
}
.grid-admin-message header {
  margin-bottom: 0.35rem;
}
.grid-admin-detail h3 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
  word-break: break-word;
}
.grid-admin-row-deleted {
  opacity: 0.82;
}
.grid-admin-row-deleted td {
  background: rgba(239, 68, 68, 0.04);
}
.grid-admin-status-deleted {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.grid-admin-status-active {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.grid-admin-message > div {
  overflow-wrap: anywhere;
}

/* ───── Search Admin ───── */
.search-live-card {
  margin-bottom: 0;
}
.search-live-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 1rem;
}
.search-live-meta {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
}
.search-live-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.search-live-message {
  font-weight: 600;
  color: var(--text);
}
.search-live-progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
}
.search-live-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(59,130,246,0.8), rgba(34,211,238,0.85));
  transition: width 0.25s ease;
}
.search-live-stats {
  line-height: 1.45;
}
.search-step-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.search-step-item {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(6, 12, 24, 0.58);
}
.search-step-running {
  border-color: rgba(59,130,246,0.45);
  color: #93c5fd;
}
.search-step-done {
  border-color: rgba(34,197,94,0.45);
  color: #86efac;
}
.search-step-error {
  border-color: rgba(239,68,68,0.45);
  color: #fda4af;
}
.search-kpi-grid .stat-card .stat-value {
  font-size: 1.55rem;
}
.search-kpi-grid .stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.search-events {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.search-event {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 12, 24, 0.58);
  padding: 0.6rem 0.75rem;
}
.search-event-head {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.2rem;
}
.search-event-msg {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.search-event-warn {
  border-color: rgba(245, 158, 11, 0.35);
}
.search-event-error {
  border-color: rgba(239, 68, 68, 0.45);
}
.btn-mini {
  min-height: 30px;
  font-size: 0.74rem;
  padding: 0.3rem 0.55rem;
}
.search-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.45rem 1rem;
  margin-bottom: 0.8rem;
}
.search-settings-keywords {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 0.75rem;
}
.search-settings-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: rgba(6, 12, 24, 0.58);
}
.search-settings-block h4 {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--text);
}
.search-settings-block ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.search-run-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.search-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.search-detail-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 12, 24, 0.58);
  padding: 0.6rem 0.7rem;
  line-height: 1.45;
}
.search-detail-card .section-title {
  margin-bottom: 0.45rem;
}
.search-detail-kv {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--text-muted);
}
.search-detail-kv + .search-detail-kv {
  margin-top: 0.28rem;
}
.search-detail-kv strong {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}
.search-funnel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 0.5rem;
}
.search-funnel-item {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.45rem 0.55rem;
  background: rgba(2, 10, 26, 0.45);
}
.search-funnel-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.search-funnel-value {
  margin-top: 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.search-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.search-detail-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.search-detail-list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.run-results-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.run-results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}
.run-results-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.run-results-filter {
  border: 1px solid var(--border);
  background: rgba(6, 12, 24, 0.45);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  cursor: pointer;
}
.run-results-filter.active {
  color: var(--blue-bright);
  border-color: rgba(79, 157, 255, 0.55);
  background: rgba(79, 157, 255, 0.12);
}
.run-outcome-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.run-outcome-created { background: rgba(34, 197, 94, 0.16); color: #86efac; }
.run-outcome-merged { background: rgba(79, 157, 255, 0.16); color: #93c5fd; }
.run-outcome-rediscovered { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }
.run-outcome-excluded { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.run-outcome-error { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }
.run-outcome-crawling,
.run-outcome-pending,
.run-outcome-unfinished { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
.run-result-detail-row td {
  background: rgba(6, 12, 24, 0.35);
  border-top: none;
  padding-top: 0;
}
.run-result-detail-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  margin: 0.2rem 0 0.55rem;
}
.run-result-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
}
.run-result-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.run-result-edit-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.run-result-edit-grid input,
.run-result-edit-grid select {
  width: 100%;
}
.run-result-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.run-result-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.info-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: help;
  user-select: none;
  flex-shrink: 0;
  background: rgba(6, 12, 24, 0.65);
  padding: 0;
}
.info-chip:hover,
.info-chip:focus {
  color: var(--blue-bright);
  border-color: rgba(79, 157, 255, 0.5);
  outline: none;
}
.info-tooltip {
  position: fixed;
  z-index: 4000;
  max-width: 320px;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(79, 157, 255, 0.45);
  background: rgba(6, 12, 24, 0.95);
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.4;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* ───── Mobile toggle ───── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 15px; left: 15px;
  z-index: 200;
  width: 44px; height: 44px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center; justify-content: center;
  padding: 0;
}
.mobile-toggle svg { width: 22px; height: 22px; }

/* ───── Mobile overlay backdrop ───── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(4, 8, 18, 0.6);
  backdrop-filter: blur(4px);
}
.sidebar-backdrop.visible { display: block; }

/* ───── Table scroll wrapper for mobile ───── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}
.table-wrap table {
  min-width: 640px;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE: TABLET (≤1024px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root {
    --space-page-y: 1.25rem;
    --space-page-x: 1.25rem;
    --space-page-bottom: 1.25rem;
    --space-stack: 1rem;
    --space-card: 1.15rem;
    --space-grid: 1rem;
    --space-hero: 1.5rem;
    --grid-shell-offset: 0.85rem;
    --grid-page-x: 0.85rem;
  }
  .content.content-grid-mode .grid-chat-shell {
    min-height: calc(100vh - var(--topbar-h) - var(--grid-shell-offset));
    min-height: calc(100dvh - var(--topbar-h) - var(--grid-shell-offset));
  }
  .grid-chat-shell { grid-template-columns: minmax(220px, 270px) minmax(0, 1fr); border-radius: 18px; }
  .grid-chat-left .grid-orb-wrap { width: 94px; height: 94px; }
  .grid-chat-left .orb { filter: blur(12px); }
  .grid-chat-left { padding: 0.95rem 0.75rem; }
  .hero-title { font-size: 1.3rem; }
  .reveal-lead-grid { gap: 0.7rem; }
  .stat-value { font-size: 1.85rem; }
  .search-settings-keywords { grid-template-columns: 1fr 1fr; }
  .search-detail-grid { grid-template-columns: 1fr; }
  .run-result-detail-grid,
  .run-result-edit-grid { grid-template-columns: 1fr; }
  .grid-admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE: SMALL TABLET (≤900px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root {
    --grid-shell-offset: 0px;
    --grid-page-x: 0px;
  }
  .content.content-grid-mode { padding: 0; }
  .content.content-grid-mode .grid-chat-shell {
    min-height: calc(100vh - var(--topbar-h));
    min-height: calc(100dvh - var(--topbar-h));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .grid-chat-shell {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--topbar-h));
    min-height: calc(100dvh - var(--topbar-h));
  }
  .grid-chat-left {
    order: 0;
    border-right: none;
    border-top: none;
    padding: 0.8rem;
    gap: 0.65rem;
    flex: 0 0 auto;
  }
  .grid-chat-main {
    order: 1;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .grid-chat-left-main { flex: 0 0 auto; justify-content: center; }
  .grid-chat-left .grid-orb-wrap { width: 86px; height: 86px; }
  .grid-chat-left h2 { font-size: 0.98rem; letter-spacing: 0.22em; }
  .grid-chat-left .grid-orb-status { font-size: 0.6rem; }
  .grid-conversation-wrap { max-height: 190px; }
  .grid-conversation-list { max-height: 180px; }
  .grid-messages {
    flex: 1;
    min-height: 0;
    max-height: none;
    padding: var(--grid-inset-y) var(--grid-inset-x);
  }

  /* ── GRID ORB Startbildschirm (mobil) ── */
  .grid-chat-shell.grid-orb-start {
    background: linear-gradient(180deg, rgba(6, 10, 20, 0.98), rgba(4, 8, 16, 0.99));
  }
  .grid-chat-shell.grid-orb-start .grid-chat-left {
    flex: 1;
    justify-content: center;
    padding: 1.25rem 1rem 0.5rem;
    border: none;
  }
  .grid-chat-shell.grid-orb-start .grid-chat-left-main {
    flex: 1;
    justify-content: center;
  }
  .grid-chat-shell.grid-orb-start .grid-orb-hero {
    flex: 1;
    justify-content: center;
    gap: 0.65rem;
    padding: 1rem 0 0.5rem;
  }
  .grid-chat-shell.grid-orb-start .grid-orb-wrap {
    width: min(196px, 48vw);
    height: min(196px, 48vw);
  }
  .grid-chat-shell.grid-orb-start .grid-orb-tagline {
    display: block;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.45;
    max-width: 280px;
    margin: 0.15rem 0 0;
  }
  .grid-chat-shell.grid-orb-start .grid-start-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin-top: 0.5rem;
    max-width: 320px;
  }
  .grid-chat-shell.grid-orb-start .grid-start-prompts .grid-empty-chip {
    min-height: 36px;
    padding: 0.45rem 0.9rem;
  }
  .grid-chat-shell.grid-orb-start .grid-new-btn,
  .grid-chat-shell.grid-orb-start .grid-chat-history {
    display: none;
  }
  .grid-chat-shell.grid-orb-start .grid-chat-main {
    flex: 0 0 auto;
    background: transparent;
  }
  .grid-chat-shell.grid-orb-start .grid-chat-header,
  .grid-chat-shell.grid-orb-start .grid-messages {
    display: none;
  }
  .grid-chat-shell.grid-orb-start .grid-input-wrap {
    border-top: 1px solid var(--border);
    padding: var(--grid-inset-y) var(--grid-inset-x);
    padding-bottom: var(--grid-inset-bottom);
    background: rgba(7, 12, 26, 0.92);
  }
  .grid-chat-shell.grid-orb-start .grid-input-wrap textarea {
    min-height: 48px;
    font-size: 1rem;
  }

  /* ── GRID Chat-Modus nach erster Eingabe ── */
  .grid-chat-shell.grid-chat-started .grid-chat-left {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 12, 26, 0.88);
  }
  .grid-chat-shell.grid-chat-started .grid-chat-left-main,
  .grid-chat-shell.grid-chat-started .grid-orb-tagline,
  .grid-chat-shell.grid-chat-started .grid-start-prompts {
    display: none;
  }
  .grid-chat-shell.grid-chat-started .grid-new-btn {
    width: 100%;
    min-height: 40px;
  }
  .grid-chat-shell.grid-chat-started .grid-chat-history {
    width: 100%;
    margin-top: 0;
  }
  .grid-chat-shell.grid-chat-started .grid-chat-main {
    flex: 1;
    min-height: 0;
  }
  .grid-chat-shell.grid-chat-started .grid-messages {
    flex: 1;
    min-height: 0;
    max-height: none;
  }
  .grid-chat-shell.grid-chat-started .grid-input-wrap {
    padding-bottom: var(--grid-inset-bottom);
  }

  .detail-grid { grid-template-columns: 1fr !important; }

  .dash-two-col { grid-template-columns: 1fr !important; }
  .account-grid { grid-template-columns: 1fr !important; }
  .search-settings-grid { grid-template-columns: 1fr; }
  .search-settings-keywords { grid-template-columns: 1fr; }

  .user-meta { display: none; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE: MOBILE (≤768px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --topbar-h: 56px;
    --space-page-y: 1rem;
    --space-page-x: 0.75rem;
    --space-page-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    --space-stack: 0.85rem;
    --space-card: 1rem;
    --space-grid: 0.85rem;
    --space-hero: 1.25rem;
    --grid-inset-x: 1rem;
    --grid-inset-y: 0.75rem;
    --grid-inset-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    z-index: 250;
  }
  .sidebar-close {
    display: flex;
  }
  body.sidebar-open .mobile-toggle {
    visibility: hidden;
    pointer-events: none;
  }
  .main { margin-left: 0; }
  .mobile-toggle:not([hidden]) { display: flex; }

  .topbar {
    justify-content: flex-end;
    padding: 0 0.75rem;
    padding-top: env(safe-area-inset-top, 0px);
    gap: 0.5rem;
  }
  .topbar-search { display: none !important; }
  .topbar-refresh-btn { display: none !important; }

  .topbar-actions {
    margin-left: auto;
    gap: 0.35rem;
  }
  .topbar-user {
    gap: 0;
    margin-left: 0;
  }
  .user-meta,
  .user-avatar,
  .account-menu-toggle {
    display: none !important;
  }
  .mobile-account-btn {
    display: flex !important;
  }

  .topbar-btn,
  .topbar-notification {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
  }
  .mobile-account-btn svg { width: 20px; height: 20px; }

  .content.content-grid-mode { padding: 0; }
  .content.content-grid-mode .grid-chat-shell {
    min-height: calc(100vh - var(--topbar-h));
    min-height: calc(100dvh - var(--topbar-h));
    border-radius: 0;
  }

  .grid-4 { grid-template-columns: 1fr 1fr; }
  .priority-grid { grid-template-columns: repeat(2, 1fr); }

  .hero-title { font-size: 1.2rem; }
  .hero-desc { font-size: 0.84rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .grid-admin-form { grid-template-columns: 1fr; }
  .search-live-grid { grid-template-columns: 1fr; }

  .filters {
    flex-direction: column;
    gap: 0.5rem;
  }
  .filters input, .filters select {
    width: 100%;
  }

  .stat-value { font-size: 1.7rem; }
  .stat-label { font-size: 0.78rem; }
  .stat-card .stat-icon { width: 38px; height: 38px; }
  .stat-card .stat-icon svg { width: 18px; height: 18px; }

  .card { border-radius: 12px; }
  .section-title { font-size: 0.88rem; }

  .btn { padding: 0.65rem 1rem; font-size: 0.84rem; min-height: 44px; }
  .btn-block { min-height: 48px; }

  .lead-title { font-size: 1.2rem; }
  .lead-summary { font-size: 0.84rem; }
  .lead-actions { flex-direction: column; }
  .lead-actions .btn { width: 100%; justify-content: center; }

  .grid-input-wrap textarea { min-height: 48px; font-size: 1rem; }
  .grid-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
  }
  .grid-send-btn svg { width: 20px; height: 20px; }
  .grid-history-toggle { font-size: 0.6rem; letter-spacing: 0.12em; min-height: 40px; }
  .grid-empty { padding: 1.5rem 1rem; }
  .grid-empty-actions { gap: 0.4rem; }
  .grid-empty-chip { min-height: 40px; padding: 0.45rem 0.85rem; }
  .grid-message { max-width: 94%; }

  .reveal-overlay { padding: 0.75rem; }
  .reveal-modal { max-height: 92vh; }
  .reveal-results { padding: 1.25rem; }
  .reveal-lead-grid { grid-template-columns: 1fr; }
  .reveal-results-foot { flex-direction: column; }
  .reveal-results-foot .btn { width: 100%; justify-content: center; }

  .mail-panel-actions { flex-direction: column; }
  .mail-panel-actions .btn { width: 100%; min-width: auto; }

  .preview-controls { flex-direction: column; align-items: stretch; }
  .preview-presets { justify-content: center; }
  .preview-hint { margin-left: 0; text-align: center; }
  .mail-preview { height: min(55vh, 420px); }

  .rte-toolbar { gap: 0.15rem; }
  .rte-btn { min-width: 32px; min-height: 36px; padding: 0.35rem 0.45rem; }
  .editor-head { flex-direction: column; align-items: stretch; }
  .rte-area { min-height: 200px; max-height: 320px; }

  .admin-table-actions { flex-direction: column; }
  .admin-table-actions button { width: 100%; }

  .auth-card { padding: 1.5rem 1.25rem; }
  .auth-form input,
  .auth-form select { padding: 0.7rem 0.85rem; font-size: 0.92rem; min-height: 44px; }

  .spotlight-content { flex-direction: column; align-items: stretch; }
  .btn-spotlight { width: 100%; justify-content: center; }

  .next-steps { padding: 1rem; }

  .nav-item { padding: 0.8rem 1rem; font-size: 0.92rem; }
  .sidebar-nav { padding: 1rem 0.75rem; gap: 4px; }
  .sidebar { width: min(88vw, 300px); }
  .sidebar-bottom { padding-bottom: max(0.85rem, env(safe-area-inset-bottom, 0px)); }

  .mobile-toggle {
    top: max(12px, env(safe-area-inset-top, 12px));
    left: max(12px, env(safe-area-inset-left, 12px));
  }
  .topbar {
    padding: 0 0.65rem;
    padding-top: env(safe-area-inset-top, 0px);
    gap: 0.5rem;
  }

  .account-menu {
    position: fixed;
    right: 0.65rem;
    top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 4px);
    left: auto;
    min-width: min(280px, calc(100vw - 1.3rem));
    z-index: 120;
  }

  .account-menu-user {
    display: flex;
  }
  #btn-refresh-menu {
    display: flex;
  }
  .account-menu a,
  .account-menu button,
  .account-menu-action {
    min-height: 48px;
    padding: 0.8rem 0.95rem;
  }

  #dashboard-welcome-title { font-size: clamp(1.15rem, 5vw, 1.5rem); }
  .product-fit-head { flex-direction: column; align-items: flex-start; }
  .claim-tags { gap: 0.3rem; }
  .bar-row { flex-wrap: wrap; }
  .bar-row .bar-label { min-width: 64px; }
  .timeline-item { padding-bottom: 0.85rem; }
  .mail-editor-layout .mail-preview-col { margin-top: 0.75rem; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE: SMALL MOBILE (≤480px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  :root {
    --space-page-y: 0.75rem;
    --space-page-x: 0.6rem;
    --space-page-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    --space-stack: 0.75rem;
    --space-card: 0.85rem;
    --space-grid: 0.75rem;
    --space-hero: 1rem;
  }
  .grid-4 { grid-template-columns: 1fr; }
  .priority-grid { grid-template-columns: 1fr; }
  .search-funnel-grid { grid-template-columns: 1fr; }
  .search-detail-kv { flex-direction: column; gap: 0.15rem; }
  .search-detail-kv strong { text-align: left; }
  .topbar-actions { gap: 0.25rem; }

  .content.content-grid-mode { padding: 0; }
  .content.content-grid-mode .grid-chat-shell {
    border-radius: 0;
    min-height: calc(100vh - var(--topbar-h));
    min-height: calc(100dvh - var(--topbar-h));
  }

  .hero-title { font-size: 1.1rem; }

  .stat-value { font-size: 1.5rem; }

  .lead-header-top { flex-direction: column; }
  .lead-metrics { width: 100%; }
  .metric-box { flex: 1; }

  .grid-message { max-width: 96%; padding: 0.6rem 0.7rem; }
  .grid-message-content { font-size: 0.84rem; }
  .grid-chat-shell.grid-orb-start .grid-orb-wrap {
    width: min(168px, 44vw);
    height: min(168px, 44vw);
  }
  .grid-chat-shell.grid-orb-start .grid-orb-tagline { font-size: 0.86rem; }

  .bar-row .bar-label { min-width: 70px; font-size: 0.74rem; }

  .reveal-results { padding: 1rem 0.75rem; }
  .reveal-lead-card { padding: 0.9rem; }
  .reveal-lead-name { font-size: 0.92rem; }

  .topbar-search-field input { font-size: 0.82rem; }

  table th, table td { padding: 0.6rem 0.7rem; font-size: 0.78rem; }
  .table-wrap table { min-width: 520px; }

  .auth-card { padding: 1.25rem 1rem; }
  .auth-brand h1 { font-size: 1.1rem; }
}

/* ───── Scrollbar ───── */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2c4a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-deep); }

/* ───── Animations ───── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes navPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(120, 175, 255, 0.2), 0 10px 26px -8px rgba(47, 107, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
  50% { box-shadow: 0 0 0 1px rgba(120, 175, 255, 0.4), 0 12px 34px -6px rgba(47, 107, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.08); }
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px 1px rgba(79, 157, 255, 0.9); }
  50% { opacity: 0.55; box-shadow: 0 0 4px 0 rgba(79, 157, 255, 0.5); }
}

@keyframes barGrow {
  from { width: 0 !important; }
}

.content > * { animation: fadeInUp 0.35s ease; }

/* ───── Mail Add-On ───── */
.nav-section-label {
  padding: 1rem 1.35rem 0.4rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.mail-status {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
}
.mail-status-draft { background: rgba(79, 157, 255, 0.14); color: var(--blue-bright); border: 1px solid rgba(79, 157, 255, 0.3); }
.mail-status-sending { background: rgba(245, 158, 11, 0.14); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.mail-status-sent { background: rgba(34, 197, 94, 0.14); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.3); }
.mail-status-failed { background: rgba(248, 113, 113, 0.14); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.3); }

.mail-warn { color: var(--amber); }
.mail-warn-card {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.06);
  color: var(--amber);
  font-size: 0.85rem;
}
.mail-warn-card code { color: var(--text); background: rgba(6, 12, 24, 0.6); padding: 0.1rem 0.35rem; border-radius: 5px; }

.mail-edited-tag {
  font-size: 0.68rem; font-weight: 600; color: var(--amber);
  background: rgba(245, 158, 11, 0.12); border-radius: 5px; padding: 0.05rem 0.35rem;
}
.mail-open-tag {
  font-size: 0.72rem; font-weight: 700; color: var(--green);
  background: rgba(34, 197, 94, 0.12); border-radius: 5px; padding: 0.05rem 0.4rem;
}

.mail-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0.35rem 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card input[type="email"],
.card input[type="text"],
.card textarea {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(6, 12, 24, 0.7);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
  resize: vertical;
}
.card input:focus, .card textarea:focus {
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue);
}
.card select {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(6, 12, 24, 0.7);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
}
.card select:focus {
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue);
}

.mail-send-zone {
  margin-top: 1.15rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(59, 130, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.mail-send-zone-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ice-soft);
  margin-bottom: 0.2rem;
}
.mail-send-zone-copy {
  min-width: 220px;
  flex: 1;
}
.mail-send-confirm-modal {
  max-width: 460px;
  text-align: left;
}
.mail-send-confirm-list {
  margin: 0.85rem 0 1rem;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.mail-send-confirm-list li + li { margin-top: 0.3rem; }
.mail-send-confirm-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 1.15rem;
}

.mail-blacklist-suggest-row {
  margin-bottom: 0.75rem;
}
.mail-blacklist-suggest-row .mail-label {
  margin-top: 0;
}
.mail-blacklist-suggest-row select {
  margin-bottom: 0;
}
.mail-blacklist-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px auto;
  gap: 0.55rem;
  align-items: center;
}
.mail-blacklist-form input,
.mail-blacklist-form select {
  margin-bottom: 0;
}
.mail-bl-source-chip {
  display: inline-flex;
  margin-top: 0.55rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.mail-bl-source-chip-manual {
  color: var(--ice-soft);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.mail-bl-source-chip-suggestion {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.mail-bl-origin {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}
.mail-bl-origin-manual {
  color: var(--ice-soft);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.mail-bl-origin-suggestion {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.mail-bl-row-suggestion td:first-child {
  box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.7);
}
.mail-blacklist-table {
  margin-top: 0.75rem;
}
.mail-blacklist-table code {
  color: var(--ice-soft);
  background: rgba(6, 12, 24, 0.62);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}
.btn-inline {
  padding: 0.28rem 0.55rem;
  font-size: 0.74rem;
}

.mail-draft-delete-col {
  width: 2.75rem;
  text-align: center;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}

.mail-draft-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(248, 113, 113, 0.72);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.mail-draft-delete:hover {
  color: var(--red);
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
}

tr.clickable:hover .mail-draft-delete {
  color: var(--red);
}

@media (max-width: 900px) {
  .mail-blacklist-form {
    grid-template-columns: 1fr;
  }
  .mail-send-zone {
    align-items: stretch;
  }
  .mail-send-zone .btn {
    width: 100%;
    justify-content: center;
  }
}

.mail-panel-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }
.mail-panel-actions .btn { flex: 1; min-width: 120px; justify-content: center; }
.mail-panel-actions .btn.is-loading { opacity: 0.8; pointer-events: none; }
.mail-regen-state {
  margin-top: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 9px;
  border: 1px solid rgba(79, 157, 255, 0.4);
  background: rgba(30, 95, 216, 0.15);
  color: var(--ice-soft);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.mail-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(191, 219, 254, 0.45);
  border-top-color: #93c5fd;
  animation: spin 0.85s linear infinite;
}

/* ── Editor-Layout mit ziehbarem Trenner ── */
.mail-editor-layout {
  --preview-w: 560px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 14px var(--preview-w);
  align-items: start;
  gap: 0;
}
.mail-editor-col { min-width: 0; }
.mail-preview-col { min-width: 0; }
.mail-split {
  align-self: stretch;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: col-resize;
  margin: 0 4px;
}
.mail-split span {
  display: block;
  width: 4px;
  height: 46px;
  border-radius: 99px;
  background: var(--border-strong);
  transition: background 0.15s, height 0.15s;
}
.mail-split:hover span { background: var(--blue-bright); height: 70px; }
body.resizing-x { cursor: col-resize; user-select: none; }
body.resizing-x iframe { pointer-events: none; }
@media (max-width: 1024px) {
  .mail-editor-layout { grid-template-columns: 1fr; }
  .mail-split { display: none; }
  .mail-preview { height: 520px; }
}
@media (max-width: 768px) {
  .mail-preview { height: 420px; }
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.preview-presets { display: inline-flex; gap: 0.3rem; }
.preview-preset {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(6, 12, 24, 0.6);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.preview-preset:hover { color: var(--text); border-color: var(--border-strong); }
.preview-hint { margin-left: auto; }

.mail-preview-wrap {
  padding: 4px;
  background: rgba(6, 12, 24, 0.35);
  border-radius: 10px;
}
.mail-preview {
  width: 100%;
  height: 680px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f1f5f9;
  display: block;
}

/* ── Rich-Text-Editor ── */
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.rte-toolbar { display: inline-flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.rte-btn {
  min-width: 30px;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(6, 12, 24, 0.6);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: all 0.15s;
}
.rte-btn:hover { border-color: var(--border-strong); background: rgba(59, 130, 246, 0.12); }
.rte-sep { width: 1px; height: 18px; background: var(--border); margin: 0 0.25rem; }

.editor-tabs { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.editor-tab {
  padding: 0.3rem 0.8rem;
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.editor-tab.active { background: var(--blue); color: #fff; }

.rte-area {
  min-height: 260px;
  max-height: 460px;
  overflow-y: auto;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(6, 12, 24, 0.7);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
  outline: none;
  margin-bottom: 0.5rem;
}
.rte-area:focus { border-color: var(--border-strong); box-shadow: var(--glow-blue); }
.rte-area p { margin: 0 0 0.7rem; }
.rte-area a { color: var(--blue-bright); }
.rte-area ul { margin: 0 0 0.7rem; padding-left: 1.3rem; }
.rte-code {
  width: 100%;
  min-height: 300px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(6, 12, 24, 0.7);
  color: var(--ice-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  outline: none;
  resize: vertical;
  margin-bottom: 0.5rem;
}
.rte-code:focus { border-color: var(--border-strong); box-shadow: var(--glow-blue); }

/* ── Mail-Verlauf (Timeline) ── */
.mail-timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  position: relative;
  display: flex;
  gap: 0.7rem;
  padding: 0 0 1rem 0.1rem;
}
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-top: 3px;
  background: var(--text-dim);
  box-shadow: 0 0 0 3px rgba(6, 12, 24, 0.6);
  position: relative;
  z-index: 1;
}
.timeline-item.ev-gen .timeline-dot { background: var(--blue-bright); }
.timeline-item.ev-edit .timeline-dot { background: var(--amber); }
.timeline-item.ev-sent .timeline-dot { background: var(--green); }
.timeline-item.ev-fail .timeline-dot { background: var(--red); }
.timeline-item.ev-open .timeline-dot { background: var(--cyan); }
.timeline-item.ev-optout .timeline-dot { background: var(--text-muted); }
.timeline-body { display: flex; flex-direction: column; gap: 0.1rem; }
.timeline-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.timeline-time { font-size: 0.72rem; color: var(--text-muted); }
.timeline-detail { font-size: 0.76rem; color: var(--amber); margin-top: 0.2rem; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Auth / Login ── */
.layout.auth-hidden .sidebar,
.layout.auth-hidden .topbar {
  display: none !important;
}
.layout.auth-hidden ~ .mobile-toggle {
  display: none !important;
}
.layout.auth-hidden .main {
  margin-left: 0;
  width: 100%;
}
.layout.auth-hidden .content {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(12, 21, 38, 0.96), rgba(8, 14, 26, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-brand img {
  height: 42px;
  margin-bottom: 0.75rem;
}
.auth-brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.auth-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.auth-form input,
.auth-form select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(6, 12, 24, 0.7);
  color: var(--text);
  font-size: 0.9rem;
}
.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue);
}
.auth-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  padding: 0.65rem 0.85rem;
  border-radius: 9px;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}
.auth-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  padding: 0.65rem 0.85rem;
  border-radius: 9px;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}
.auth-links a {
  color: var(--blue-bright);
  text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }
.auth-privacy {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.auth-privacy a { color: var(--blue-bright); }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  position: relative;
}
.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.user-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}
.user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.account-menu-toggle { margin-left: 0.1rem; width: 32px; height: 32px; }
.mobile-account-btn { display: none; }
.account-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 220px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(12, 21, 38, 0.98), rgba(8, 14, 26, 0.98));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  z-index: 1000;
}
.account-menu-user {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0.95rem 0.8rem;
  border-bottom: 1px solid var(--border);
  background: rgba(59, 130, 246, 0.06);
}
.account-menu-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(120, 175, 255, 0.4);
  flex-shrink: 0;
  overflow: hidden;
}
.account-menu-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.account-menu-avatar.has-image {
  background: transparent;
}
.account-menu-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.account-menu-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-menu-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#btn-refresh-menu {
  display: none;
}
.account-menu a,
.account-menu button,
.account-menu-action {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  padding: 0.72rem 0.9rem;
  font-size: 0.84rem;
  cursor: pointer;
  font-family: inherit;
}
.account-menu a:hover,
.account-menu button:hover,
.account-menu-action:hover {
  background: rgba(59, 130, 246, 0.13);
}
.account-menu svg {
  width: 16px;
  height: 16px;
  color: var(--blue-bright);
  flex-shrink: 0;
}

.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.admin-table-actions button {
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
}
.status-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
}
.status-pill.active { background: rgba(34,197,94,0.15); color: #86efac; }
.status-pill.disabled { background: rgba(248,113,113,0.15); color: #fca5a5; }
.status-pill.running { background: rgba(59,130,246,0.18); color: #93c5fd; }
.status-pill.done { background: rgba(34,197,94,0.15); color: #86efac; }
.status-pill.failed { background: rgba(239,68,68,0.16); color: #fda4af; }

.mfa-qr {
  display: block;
  margin: 0.75rem auto;
  max-width: 180px;
  border-radius: 8px;
}
.backup-codes {
  background: rgba(6, 12, 24, 0.7);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.75rem;
  font-family: monospace;
  font-size: 0.85rem;
  margin: 0.75rem 0;
}

/* ───── Lead Spotlight (Ein-Klick-Reveal) ───── */
.spotlight-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  border-color: var(--border-strong);
  background: linear-gradient(140deg, rgba(59, 130, 246, 0.16), rgba(139, 92, 246, 0.06) 55%, rgba(12, 21, 38, 0.96));
}
.spotlight-glow {
  position: absolute;
  top: -80px; right: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(79, 157, 255, 0.45), transparent 70%);
  filter: blur(8px);
  opacity: 0.6;
  animation: orbPulse 4.5s ease-in-out infinite;
  pointer-events: none;
}
.spotlight-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.spotlight-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: 0.5rem;
}
.spotlight-title {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.spotlight-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.55;
}
.btn-spotlight {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1e5fd8);
  box-shadow: 0 12px 32px -10px rgba(47, 107, 255, 0.95);
  transition: box-shadow 0.25s, transform 0.15s;
}
.btn-spotlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(120, 175, 255, 0.5), 0 16px 40px -8px rgba(47, 107, 255, 1);
}
.btn-spotlight:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.spotlight-icon { width: 20px; height: 20px; }

.demo-badge-new {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.12rem 0.5rem;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.2);
  color: var(--ice-soft);
  border: 1px solid rgba(120, 175, 255, 0.35);
  vertical-align: middle;
}
.demo-row-new { background: rgba(59, 130, 246, 0.06); }

/* ───── Reveal-Fenster ───── */
body.modal-open { overflow: hidden; }
.reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(4, 8, 18, 0.82);
  backdrop-filter: blur(10px);
  animation: revealFade 0.25s ease;
}
.reveal-modal {
  width: min(880px, 100%);
  max-height: 88vh;
  overflow-y: auto;
}
.reveal-loading {
  width: min(440px, 100%);
  text-align: center;
  padding: 2.5rem 1.75rem;
}
.reveal-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.reveal-step {
  color: var(--text-muted);
  font-size: 0.92rem;
  min-height: 2.8em;
  margin-bottom: 1.2rem;
}
.reveal-progress {
  height: 5px;
  border-radius: 99px;
  background: rgba(59, 130, 246, 0.15);
  overflow: hidden;
}
.reveal-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  animation: revealBar 5.2s ease-out forwards;
}
.draft-gen-progress span {
  animation: none;
  transition: width 0.35s ease;
}
.draft-gen-modal { width: min(480px, 100%); }
.draft-gen-counter {
  min-height: 1.2em;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--ice-soft);
}
.reveal-radar {
  position: relative;
  width: 96px; height: 96px;
  margin: 0 auto 1.4rem;
}
.reveal-radar span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(79, 157, 255, 0.5);
  animation: revealPing 2.1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.reveal-radar span:nth-child(2) { animation-delay: 0.7s; }
.reveal-radar span:nth-child(3) { animation-delay: 1.4s; }
.reveal-radar::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 16px rgba(79, 157, 255, 0.9);
}
.reveal-error { text-align: center; padding: 2.5rem 1.75rem; }
.reveal-error .btn { margin-top: 1rem; }
.reveal-results { padding: 1.75rem; }
.reveal-results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.reveal-close-x {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(6, 12, 24, 0.6);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.reveal-close-x:hover { color: var(--text); border-color: var(--border-strong); }
.reveal-close-x svg { width: 18px; height: 18px; }
.reveal-lead-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
.reveal-lead-card {
  text-align: left;
  padding: 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8, 14, 26, 0.7);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.15s;
  opacity: 0;
  transform: translateY(10px);
  animation: revealCardIn 0.4s ease forwards;
}
.reveal-lead-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--glow-blue);
  transform: translateY(-2px);
}
.reveal-lead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}
.reveal-lead-match { display: flex; flex-direction: column; }
.reveal-match-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue-bright);
  line-height: 1;
}
.reveal-match-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.reveal-lead-product {
  flex-shrink: 0;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.15);
  color: var(--ice-soft);
  border: 1px solid rgba(120, 175, 255, 0.3);
}
.reveal-lead-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.reveal-lead-domain { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.6rem; }
.reveal-lead-claim {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reveal-results-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.4rem;
}
@keyframes revealFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes revealBar { to { width: 100%; } }
@keyframes revealCardIn { to { opacity: 1; transform: translateY(0); } }
@keyframes revealPing {
  0% { transform: scale(0.35); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0; }
}
@media (max-width: 640px) {
  .reveal-lead-grid { grid-template-columns: 1fr; }
  .spotlight-content { flex-direction: column; align-items: flex-start; }
  .btn-spotlight { width: 100%; justify-content: center; }
}

/* ───── Touch-friendly tap targets ───── */
@media (pointer: coarse) {
  .nav-item { min-height: 44px; }
  .btn { min-height: 44px; }
  .topbar-btn, .topbar-notification { min-width: 44px; min-height: 44px; }
  .mobile-account-btn { min-width: 44px; min-height: 44px; }
  .account-menu-toggle { min-width: 44px; min-height: 44px; }
  .grid-conversation-item { min-height: 48px; padding: 0.65rem 0.75rem; }
  .grid-conversation-delete { opacity: 1 !important; min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
  .grid-send-btn { width: 48px; height: 48px; }
  .grid-empty-chip { min-height: 44px; }
  .grid-audio-btn { width: 38px; height: 38px; }
  .grid-audio-btn svg { width: 16px; height: 16px; }
  .grid-new-btn { min-height: 44px; }
  .grid-history-toggle { min-height: 44px; }
  .orb-container { min-width: 48px; min-height: 48px; }
  .filters input, .filters select { min-height: 44px; }
  .preview-preset { min-height: 40px; padding: 0.45rem 0.85rem; }
  tr.clickable td { padding: 0.85rem 1.05rem; }
  .mail-draft-delete { min-width: 40px; min-height: 40px; }
  .rte-btn { min-height: 40px; }
  .editor-tab { min-height: 40px; padding: 0.45rem 0.9rem; }
}
