:root {
  --brand-950: #060a0f;
  --brand-900: #0c1219;
  --brand-800: #111a24;
  --brand-700: #172030;
  --surface: #141c27;
  --surface-raised: #1a2433;
  --border: #243044;
  --accent: #38bdf8;
  --text: #e2e8f0;
  --muted: #94a3b8;
}

*, *::before, *::after { box-sizing: border-box; }

/* —— Scrollbars (Tools Portal) —— */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.42) rgba(6, 10, 15, 0.55);
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track {
  background: rgba(6, 10, 15, 0.45);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.55), rgba(14, 165, 233, 0.38));
  border-radius: 999px;
  border: 1px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.78), rgba(56, 189, 248, 0.55));
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

html, body { margin: 0; min-height: 100%; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--brand-950);
  color: var(--text);
  color-scheme: dark;
}

a { color: inherit; text-decoration: none; }

.app-bg {
  background-color: var(--brand-950);
  background-image:
    radial-gradient(at 20% 0%, rgba(56, 189, 248, 0.06) 0, transparent 45%),
    radial-gradient(at 80% 100%, rgba(14, 165, 233, 0.04) 0, transparent 45%);
}

.login-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 165, 233, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(56, 189, 248, 0.08), transparent),
    linear-gradient(160deg, #060a0f 0%, #0c1219 50%, #111a24 100%);
}

.card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.2);
}

.card-elevated {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.4);
}

.card-pad { padding: 1.5rem; }

.input-field, .select-field, .textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--brand-900);
  color: var(--text);
  padding: 0.625rem 1rem;
  font: inherit;
}

.input-field:focus, .select-field:focus, .textarea:focus {
  outline: none;
  border-color: rgba(14, 165, 233, 0.6);
  background: var(--brand-800);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

select option { background: var(--surface); color: var(--text); }

.btn-primary, .btn-secondary, .btn-ghost, .btn-danger-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  font: inherit;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: #0ea5e9;
  color: var(--brand-950);
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  box-shadow: 0 10px 15px -3px rgba(14,165,233,.2);
}

.btn-primary:hover { background: #38bdf8; }

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: #cbd5e1;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
}

.btn-secondary:hover {
  border-color: #64748b;
  background: var(--brand-700);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: #94a3b8;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-ghost:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }

.btn-full { width: 100%; padding: 0.75rem; }

.page-title {
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f9;
  margin: 0;
}

.page-subtitle { margin: 0.25rem 0 0; color: var(--muted); }

.field-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
}

.required { color: var(--accent); }

.alert-error {
  border-radius: 0.75rem;
  border: 1px solid rgba(239,68,68,.3);
  background: rgba(239,68,68,.1);
  color: #f87171;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  position: relative;
  overflow: hidden;
}

.login-glow {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 9999px;
  filter: blur(64px);
  pointer-events: none;
}

.login-glow-tl { top: -8rem; left: -8rem; background: rgba(14,165,233,.08); }
.login-glow-br { bottom: -8rem; right: -8rem; background: rgba(56,189,248,.06); }
.login-glow-mid {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32rem;
  height: 32rem;
  background: rgba(14, 165, 233, 0.04);
}

.login-card-wrap { position: relative; width: 100%; max-width: 440px; }
.login-card {
  overflow: hidden;
  animation: login-rise 0.5s ease-out;
}

@keyframes login-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-banner {
  position: relative;
  border-bottom: 1px solid var(--border);
  background: #0f172a;
  aspect-ratio: 3 / 1;
  overflow: hidden;
}

.login-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login-banner-overlay,
.portal-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 10, 15, 0.55) 100%);
  pointer-events: none;
}

.login-banner-tag,
.portal-banner-tag {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(8px);
}

.login-body { padding: 1.75rem 1.75rem 2rem; }

.login-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.login-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

.login-logo svg { width: 1.35rem; height: 1.35rem; }

.login-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.25;
}

.login-sub { margin: 0.35rem 0 0; font-size: 0.875rem; color: #64748b; line-height: 1.45; }

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.login-submit svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.15s;
}

.login-submit:hover svg { transform: translateX(3px); }

.login-footer { margin-top: 1.25rem; text-align: center; font-size: 0.75rem; color: #475569; }
.form-stack { display: grid; gap: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* App shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  display: none;
  width: 16rem;
  flex-shrink: 0;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--brand-900);
}

@media (min-width: 1024px) {
  .sidebar { display: flex; }
}

.sidebar-brand { border-bottom: 1px solid var(--border); padding: 1.5rem; }
.sidebar-nav {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-content: flex-start;
  overflow-y: auto;
}
.sidebar-footer { border-top: 1px solid var(--border); padding: 1rem; margin-top: auto; }

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-left: 2.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.nav-group-open .nav-sub {
  display: flex;
}

.nav-sublink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: #64748b;
  text-decoration: none;
}

.nav-sublink:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.nav-sublink-active {
  background: rgba(14, 165, 233, 0.1);
  color: #38bdf8;
  font-weight: 600;
}

.nav-sub-count {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.nav-sublink-active .nav-sub-count {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-link-active { background: rgba(14,165,233,.15); color: #38bdf8; }
.nav-link-inactive { color: #64748b; }
.nav-link-inactive:hover { background: rgba(255,255,255,.05); color: #cbd5e1; }
.nav-button { width: 100%; background: none; border: none; font: inherit; cursor: pointer; text-align: left; }

.icon { width: 1.25rem; height: 1.25rem; }

.main-column { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.main-content { flex: 1; padding: 1.5rem 1rem; }
@media (min-width: 640px) { .main-content { padding: 2rem 1.5rem; } }
@media (min-width: 1024px) { .main-content { padding: 2rem 2.5rem; } }

.container { max-width: 72rem; margin: 0 auto; }

.mobile-header {
  border-bottom: 1px solid var(--border);
  background: rgba(12,18,25,.8);
  backdrop-filter: blur(12px);
}

@media (min-width: 1024px) { .mobile-header { display: none; } }

.mobile-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.mobile-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0 1rem 0.75rem;
}

.mobile-tab {
  flex-shrink: 0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
}

.mobile-tab:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.mobile-tab-active {
  background: rgba(14,165,233,.2);
  color: #38bdf8;
  box-shadow: inset 0 0 0 1px rgba(14,165,233,.3);
}

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-icon {
  width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.75rem;
  background: rgba(14,165,233,.15);
  color: #38bdf8;
}
.brand-icon svg { width: 1.25rem; height: 1.25rem; }
.brand-name { margin: 0; font-weight: 700; color: #f1f5f9; }
.brand-sub { margin: 0; font-size: 0.75rem; color: #64748b; }
.brand-light .brand-name-sm { margin: 0; font-weight: 700; font-size: 0.875rem; color: #f1f5f9; }
.brand-icon-sm { width: 2rem; height: 2rem; }

.stack-lg { display: grid; gap: 2rem; }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; }

.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.stat-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.stat-label { margin: 0; font-size: 0.875rem; color: #64748b; }
.stat-value { margin: 0.5rem 0 0; font-size: 1.875rem; font-weight: 700; color: #f1f5f9; }
.stat-icon {
  width: 2.75rem; height: 2.75rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.75rem;
  font-size: 1.125rem;
}
.stat-icon-sky { background: linear-gradient(135deg, rgba(56,189,248,.8), rgba(2,132,199,.8)); color: #bae6fd; }
.stat-icon-amber { background: linear-gradient(135deg, rgba(251,191,36,.8), rgba(217,119,6,.8)); color: #fde68a; }
.stat-icon-violet { background: linear-gradient(135deg, rgba(167,139,250,.8), rgba(124,58,237,.8)); color: #ddd6fe; }
.stat-icon-emerald { background: linear-gradient(135deg, rgba(52,211,153,.8), rgba(5,150,105,.8)); color: #a7f3d0; }

.grid-2 {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.section-title { margin: 0 0 1.25rem; font-size: 1.125rem; font-weight: 700; color: #f1f5f9; }
.muted { color: #64748b; font-size: 0.875rem; }

.progress-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.375rem; font-size: 0.875rem; }
.progress-link { color: #cbd5e1; font-weight: 500; }
.progress-link:hover { color: #38bdf8; }
.badge-count {
  border-radius: 9999px;
  background: var(--brand-700);
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
}
.progress-bar { height: 0.375rem; border-radius: 9999px; background: var(--brand-900); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 9999px; background: linear-gradient(90deg, #0ea5e9, #38bdf8); }

.status-chips { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--brand-900);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}
.status-chip:hover { border-color: rgba(14,165,233,.4); background: rgba(14,165,233,.1); }
.status-chip-count {
  border-radius: 9999px;
  background: var(--surface-raised);
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
}

.actions-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.filter-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .filter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .filter-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr auto; } }

.filter-reset { display: inline-block; margin-top: 0.75rem; font-size: 0.875rem; font-weight: 500; color: #38bdf8; }
.filter-reset:hover { color: #7dd3fc; }
.filter-submit { display: none; }
@media (max-width: 1023px) { .filter-submit { display: inline-flex; } }

.lead-count { font-size: 0.875rem; font-weight: 500; color: #64748b; margin: 0; }

.table-wrap { overflow: hidden; display: none; }
@media (min-width: 768px) { .table-wrap { display: block; } }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; text-align: left; }
.data-table thead tr { border-bottom: 1px solid var(--border); background: rgba(12,18,25,.5); }
.data-table th {
  padding: 0.875rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.data-table td { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.data-table tbody tr:hover { background: rgba(14,165,233,.05); }

.lead-name { margin: 0; font-weight: 600; color: #f1f5f9; }
.lead-sub { margin: 0.125rem 0 0; font-size: 0.75rem; color: #64748b; }
.text-right { text-align: right; }

.link-action, .link-danger {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.link-action { color: #38bdf8; }
.link-action:hover { background: rgba(14,165,233,.1); }
.link-danger { color: #f87171; }
.link-danger:hover { background: rgba(239,68,68,.1); }
.inline-form { display: inline; }

.status-pill {
  display: inline-flex;
  border-radius: 9999px;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-neu { background: rgba(14,165,233,.15); color: #38bdf8; box-shadow: inset 0 0 0 1px rgba(14,165,233,.3); }
.status-kontaktiert { background: rgba(245,158,11,.15); color: #fbbf24; box-shadow: inset 0 0 0 1px rgba(245,158,11,.3); }
.status-interessiert { background: rgba(139,92,246,.15); color: #a78bfa; box-shadow: inset 0 0 0 1px rgba(139,92,246,.3); }
.status-kunde { background: rgba(16,185,129,.15); color: #34d399; box-shadow: inset 0 0 0 1px rgba(16,185,129,.3); }
.status-abgelehnt { background: rgba(100,116,139,.15); color: #94a3b8; box-shadow: inset 0 0 0 1px rgba(100,116,139,.3); }

.mobile-cards { display: grid; gap: 0.75rem; }
@media (min-width: 768px) { .mobile-cards { display: none; } }

.mobile-card-head { display: flex; justify-content: space-between; gap: 0.75rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tag { border-radius: 0.5rem; background: var(--brand-700); padding: 0.25rem 0.5rem; font-size: 0.75rem; color: #64748b; }
.mobile-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.btn-flex { flex: 1; text-align: center; }
.btn-danger-outline {
  border: 1px solid rgba(239,68,68,.3);
  background: transparent;
  color: #f87171;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.btn-danger-outline:hover { background: rgba(239,68,68,.1); }

.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
}
.empty-title { margin: 0 0 0.25rem; font-weight: 600; color: #e2e8f0; }
.empty-state .btn-primary { margin-top: 1.25rem; }

.form-sections { display: grid; gap: 2rem; }
.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.step-badge {
  display: inline-flex;
  width: 1.5rem; height: 1.5rem;
  align-items: center; justify-content: center;
  border-radius: 0.375rem;
  font-size: 0.75rem;
}
.step-sky { background: rgba(14,165,233,.15); color: #38bdf8; }
.step-emerald { background: rgba(16,185,129,.15); color: #34d399; }
.step-violet { background: rgba(139,92,246,.15); color: #a78bfa; }

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
.col-span-2 { grid-column: 1 / -1; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Firmensuche */
.search-hero {
  border-color: rgba(14, 165, 233, 0.35);
  background: linear-gradient(160deg, rgba(14, 165, 233, 0.1) 0%, var(--surface) 42%, var(--surface) 100%);
}

.search-hero-top {
  margin-bottom: 1.25rem;
}

.search-hero-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.search-hero-intro {
  flex: 1;
  min-width: 0;
}

.search-hero-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.5rem;
}

.search-hero-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(14, 165, 233, 0.15);
  font-size: 1.625rem;
  flex-shrink: 0;
}

.search-hero-title {
  margin: 0 0 0.35rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
}

.search-hero-lead {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 42rem;
}

.search-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border);
}

.search-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #cbd5e1;
}

.search-step-num {
  width: 1.375rem;
  height: 1.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.search-step-line {
  width: 1.25rem;
  height: 1px;
  background: rgba(100, 116, 139, 0.5);
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .search-step-line { display: none; }
  .search-steps { gap: 0.5rem; }
}

.search-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.search-sources-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-right: 0.25rem;
}

.search-source-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border);
  color: #94a3b8;
}

.search-source-tag-accent {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.25);
  color: #7dd3fc;
}

.search-panel {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.search-panel:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.search-panel-head {
  margin-bottom: 1rem;
}

.search-panel-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-panel-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 800;
}

.search-panel-desc {
  margin: 0;
  font-size: 0.8125rem;
}

.quick-chip-group {
  margin-bottom: 1rem;
}

.quick-chip-group[hidden] {
  display: none !important;
}

.akquise-theme-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
}

.theme-filter-chip {
  border: 1px solid var(--border);
  background: var(--brand-900);
  color: #94a3b8;
  border-radius: 9999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.theme-filter-chip:hover {
  border-color: rgba(14, 165, 233, 0.45);
  color: #cbd5e1;
}

.theme-filter-chip-active {
  border-color: rgba(14, 165, 233, 0.6);
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
}

.quick-chip-group:last-of-type {
  margin-bottom: 1.25rem;
}

.search-filter-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

.search-filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-preset-chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.filter-preset-chip:hover {
  border-color: rgba(14, 165, 233, 0.45);
}

.filter-preset-chip-active,
.filter-preset-chip.filter-preset-chip-active {
  border-color: rgba(14, 165, 233, 0.65);
  background: rgba(14, 165, 233, 0.12);
}

.filter-preset-chip-hot {
  border-color: rgba(251, 146, 60, 0.35);
}

.search-filter-advanced {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin: 0.75rem 0 1rem;
}

@media (min-width: 640px) {
  .search-filter-advanced {
    grid-template-columns: repeat(2, 1fr);
  }
}

.search-filter-grid-options {
  margin-top: 0.25rem;
}

.results-live-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.results-live-filter-label {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-right: 0.25rem;
}

.results-filter-chip {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
  color: var(--text);
  font-size: 0.75rem;
  cursor: pointer;
}

.results-filter-chip-active {
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.1);
}

.results-visible-count {
  font-size: 0.75rem;
  margin-left: auto;
}

.badge-web-unverified {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

@media (min-width: 640px) {
  .search-filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-filter-card-wide {
    grid-column: span 2;
  }
}

.search-filter-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.search-filter-card:hover {
  border-color: rgba(14, 165, 233, 0.35);
}

.search-filter-card-active {
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.08);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.15);
}

.search-filter-card input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: #0ea5e9;
}

.search-filter-icon {
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.search-filter-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.search-filter-body strong {
  color: #e2e8f0;
  font-weight: 600;
}

.search-cta {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.search-preview {
  flex: 1;
  min-width: min(100%, 18rem);
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
}

.search-preview-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.search-preview-text {
  font-size: 0.875rem;
  color: #e2e8f0;
  line-height: 1.45;
}

.search-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.search-submit {
  min-width: 14rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
}

.search-submit-icon {
  font-size: 0.75rem;
  opacity: 0.9;
}

.input-field-lg {
  font-size: 1.0625rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
}

.search-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}

.search-form-grid-extended {
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .search-form-grid { grid-template-columns: repeat(2, 1fr); }
  .search-field-span2 { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .search-form-grid-extended { grid-template-columns: repeat(3, 1fr); }
  .search-field-span2 { grid-column: span 2; }
}

.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

.search-hint {
  margin: 0;
  font-size: 0.8125rem;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.quick-chips-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.quick-chip,
.location-chip {
  border: 1px solid var(--border);
  background: var(--brand-900);
  color: #cbd5e1;
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-chip:hover,
.location-chip:hover {
  border-color: rgba(14, 165, 233, 0.5);
  background: rgba(14, 165, 233, 0.1);
  color: #38bdf8;
}

.quick-chip-active {
  border-color: rgba(14, 165, 233, 0.65);
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  font-weight: 600;
}

.external-search-links {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.35);
}

.quick-chip-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.search-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 12, 18, 0.82);
  backdrop-filter: blur(4px);
}

.search-progress-overlay[hidden] {
  display: none !important;
}

body.search-loading {
  overflow: hidden;
}

.search-progress-card {
  width: min(24rem, 100%);
  padding: 1.75rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(14, 165, 233, 0.35);
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.search-progress-spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  border: 3px solid rgba(14, 165, 233, 0.2);
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: search-spin 0.9s linear infinite;
}

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

.search-progress-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #f1f5f9;
}

.search-progress-message {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
  min-height: 1.25rem;
}

.search-progress-bar {
  height: 0.625rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.search-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0284c7, #0ea5e9, #38bdf8);
  transition: width 0.45s ease;
  min-width: 2%;
}

.search-progress-percent {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #38bdf8;
}

.search-progress-hint {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.search-background-banner {
  margin-bottom: 1.25rem;
}

.search-background-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.search-background-banner-text {
  flex: 1 1 12rem;
}

.conversion-funnel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.conversion-step {
  text-align: center;
  min-width: 4.5rem;
}

.conversion-step-highlight .conversion-num {
  color: #34d399;
}

.conversion-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #38bdf8;
}

.conversion-label {
  font-size: 0.75rem;
  color: #94a3b8;
}

.conversion-arrow {
  color: #64748b;
  font-size: 1.25rem;
}

.follow-up-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.follow-up-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.follow-up-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

.saved-searches {
  margin-bottom: 1.25rem;
}

.saved-search-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.saved-search-delete-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.saved-search-delete-btn:hover {
  color: #f87171;
}

.search-source-tag-muted {
  opacity: 0.65;
}

.activity-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.45);
  border-left: 3px solid #64748b;
}

.activity-item.activity-email { border-left-color: #38bdf8; }
.activity-item.activity-call { border-left-color: #fbbf24; }
.activity-item.activity-status { border-left-color: #a78bfa; }

.activity-date {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.activity-notes {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
}

.search-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.search-progress-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.search-cancel-btn {
  min-width: 10rem;
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.results-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.stat-pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
}

.stat-pill-hot {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.stat-pill-muted {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
}

.results-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.badge-distance {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.badge-source {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  font-size: 0.625rem;
  padding: 0.2rem 0.45rem;
  border-radius: 9999px;
}

.input-muted::placeholder {
  color: #64748b;
}

.email-outreach {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, var(--surface) 50%);
}

.email-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .email-form-grid { grid-template-columns: repeat(2, 1fr); }
  .email-field-span2 { grid-column: span 2; }
}

.email-to-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.email-to-row .input-field {
  flex: 1;
  min-width: 12rem;
}

.email-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
}

.email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.badge-email {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.stat-pill-email {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}

.lead-email {
  color: #c4b5fd;
}

.lead-actions {
  white-space: nowrap;
}

.priority-hot {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.12);
}

.priority-warm {
  border-color: rgba(245, 158, 11, 0.35);
}

.priority-cold {
  opacity: 0.85;
}

.badge-akquise {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.badge-web-status {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.badge-web-none,
.badge-web-social_only,
.badge-web-unverified,
.badge-web-unreachable,
.badge-web-outdated,
.badge-web-weak {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-web-ok {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
}

.badge-web-unknown {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.stat-pill-top {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  font-weight: 600;
}

.web-issues {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.75rem;
  color: #fbbf24;
}

.web-issues li {
  margin-bottom: 0.15rem;
}

.lead-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 0.25rem;
}

.lead-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #94a3b8;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.lead-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.lead-tab-active {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
  color: #38bdf8;
}

.lead-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
}

.lead-tab-active .lead-tab-count {
  background: rgba(14, 165, 233, 0.25);
  color: #7dd3fc;
}

.lead-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0 0.5rem;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--brand-900);
  color: #cbd5e1;
  font-size: 0.875rem;
  text-decoration: none;
}

.pagination-btn:hover:not(.pagination-btn-disabled) {
  border-color: rgba(14, 165, 233, 0.4);
  color: #38bdf8;
}

.pagination-btn-disabled {
  opacity: 0.4;
  cursor: default;
}

.pagination-pages {
  display: flex;
  gap: 0.25rem;
}

.pagination-page {
  min-width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  color: #94a3b8;
  font-size: 0.875rem;
  text-decoration: none;
}

.pagination-page-active {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
  color: #38bdf8;
  font-weight: 700;
}

.link-success {
  color: #34d399;
}

.link-success:hover {
  color: #6ee7b7;
}

.firm-results {
  display: grid;
  gap: 0.75rem;
}

.firm-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--brand-900);
  transition: border-color 0.2s, background 0.2s;
}

.firm-result:hover {
  border-color: rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.05);
}

.firm-name {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.firm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.tag-source {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-exists {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.alert-info {
  border-radius: 0.75rem;
  border: 1px solid rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.1);
  color: #7dd3fc;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.mt-4 { margin-top: 1rem; }

.badge-hot {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-warm {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.badge-phone {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.firm-result-hot {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.firm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.firm-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #cbd5e1;
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 0.2rem;
  accent-color: #0ea5e9;
}

.results-head {
  margin-bottom: 1rem;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-small {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
}

.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.tag-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.csv-import-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.csv-import-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.activity-feed {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.activity-feed-item {
  font-size: 0.9rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.2);
}

.activity-feed-item:last-child {
  border-bottom: none;
}

/* ===== Sidebar Divider ===== */
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0.5rem;
  opacity: 0.6;
}

/* ===== Page Header ===== */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stats-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
}

.stats-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.stats-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.stats-card-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-section {
  margin-bottom: 2rem;
}

.stats-section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

/* ===== Status Bars ===== */
.status-chart {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.status-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-bar-label {
  width: 130px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #cbd5e1;
  flex-shrink: 0;
}

.status-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(100, 116, 139, 0.2);
  border-radius: 9999px;
  overflow: hidden;
}

.status-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease;
}

.status-bar-count {
  width: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: right;
  flex-shrink: 0;
}

/* ===== Branchen / Orte List ===== */
.branchen-list {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.branche-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.branche-name {
  width: 160px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #cbd5e1;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.branche-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(100, 116, 139, 0.2);
  border-radius: 9999px;
  overflow: hidden;
}

.branche-bar-fill {
  height: 100%;
  background: rgba(14, 165, 233, 0.5);
  border-radius: 9999px;
  transition: width 0.5s ease;
}

.branche-count {
  width: 50px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: right;
  flex-shrink: 0;
}

/* ===== Stats Back Link ===== */
.stats-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.875rem;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: color 0.15s, background 0.15s;
}

.stats-back-link:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
}

.stats-back-link .icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* ===== Saved Searches List ===== */
.saved-searches-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.saved-search-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.saved-search-info {
  flex: 1;
  min-width: 250px;
}

.saved-search-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.375rem 0;
}

.saved-search-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.saved-search-keyword {
  font-weight: 500;
  color: #38bdf8;
}

.saved-search-location {
  color: #cbd5e1;
}

.saved-search-filter-badge {
  background: rgba(14, 165, 233, 0.1);
  color: #7dd3fc;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.saved-search-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

/* ===== Email Templates ===== */
.email-templates-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.email-template-card summary {
  list-style: none;
  cursor: pointer;
}

.email-template-card summary::-webkit-details-marker {
  display: none;
}

.email-template-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.email-template-header strong {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.email-template-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.email-template-body h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  margin: 0 0 0.375rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.template-preview {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.template-preview-body {
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
}

/* ===== Settings Table ===== */
.settings-table {
  width: 100%;
  border-collapse: collapse;
}

.settings-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.15);
  font-size: 0.875rem;
}

.settings-table td:first-child {
  width: 200px;
  font-weight: 500;
  color: #94a3b8;
}

.settings-table td:last-child {
  color: #cbd5e1;
}

.settings-table tr:last-child td {
  border-bottom: none;
}

.text-green { color: #34d399; font-weight: 600; }
.text-red { color: #f87171; font-weight: 600; }
.text-orange { color: #fb923c; font-weight: 600; }

/* ===== btn-danger ===== */
.btn-danger {
  color: #fca5a5 !important;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
}

.top-leads-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.top-lead-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Portal */
.portal-bg .portal-wrap {
  max-width: 1060px;
  width: 100%;
  padding: 1.5rem 1rem 3rem;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  align-content: flex-start;
  min-height: 100vh;
}

.portal-header {
  width: 100%;
  margin-bottom: 2rem;
  animation: login-rise 0.45s ease-out;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(56, 189, 248, 0.06);
  background: linear-gradient(180deg, rgba(20, 28, 39, 0.98) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.portal-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8 45%, #818cf8);
}

.portal-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.5rem 1.5rem;
}

.portal-intro-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.15rem;
}

.portal-header-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.portal-intro-text { flex: 1; min-width: 0; }

.portal-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.85rem;
}

.portal-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(36, 48, 68, 0.9);
}

.portal-stat-live {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(16, 185, 129, 0.08);
}

.portal-stat-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.65);
}

.portal-brand,
.login-brand {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
}

.portal-title {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.portal-sub {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: #94a3b8;
}

.portal-sub strong { color: #e2e8f0; font-weight: 600; }

.portal-logout { margin: 0; flex-shrink: 0; align-self: flex-start; }

.portal-logout-btn {
  white-space: nowrap;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.45rem 0.85rem;
}

.portal-logout-btn:hover {
  border-color: rgba(100, 116, 139, 0.6);
  background: rgba(255, 255, 255, 0.04);
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
}

@media (min-width: 640px) {
  .portal-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
  }

  .portal-grid-server {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.portal-tile {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.75);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
  animation: login-rise 0.5s ease-out backwards;
  position: relative;
  overflow: hidden;
}

.portal-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  border-radius: 1rem 0 0 1rem;
  transition: background 0.2s;
}

.portal-tile-active:hover::before,
.portal-tile-active:focus-visible::before {
  background: var(--accent);
}

.portal-tile-active:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.45);
  outline-offset: 2px;
}

.portal-tile-active:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(56, 189, 248, 0.08);
  background: rgba(15, 23, 42, 0.95);
}

.portal-tile-leads .portal-tile-icon {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(56, 189, 248, 0.08));
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.portal-tile-leads.portal-tile-active:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

.portal-tile-leads.portal-tile-active:hover::before { background: #38bdf8; }

.portal-tile-discord .portal-tile-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(129, 140, 248, 0.08));
  border-color: rgba(129, 140, 248, 0.3);
  color: #818cf8;
}

.portal-tile-discord.portal-tile-active:hover {
  border-color: rgba(129, 140, 248, 0.45);
}

.portal-tile-discord.portal-tile-active:hover::before { background: #818cf8; }

.portal-tile-discord .portal-tile-cta { color: #a5b4fc; }

.portal-tile-twitch .portal-tile-icon {
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.22), rgba(191, 148, 255, 0.08));
  border-color: rgba(191, 148, 255, 0.3);
  color: #bf94ff;
}

.portal-tile-twitch.portal-tile-active:hover {
  border-color: rgba(191, 148, 255, 0.45);
}

.portal-tile-twitch.portal-tile-active:hover::before { background: #9146ff; }

.portal-tile-twitch .portal-tile-cta { color: #d8b4fe; }

.portal-tile-ssl .portal-tile-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(52, 211, 153, 0.08));
  border-color: rgba(52, 211, 153, 0.3);
  color: #34d399;
}

.portal-tile-rechnung .portal-tile-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.08));
  border-color: rgba(251, 191, 36, 0.28);
  color: #fbbf24;
}

.portal-tile-external:hover .portal-tile-cta { color: #34d399; }

.portal-tile-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.portal-tile-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
}

.portal-tile-icon svg { width: 1.5rem; height: 1.5rem; }

.portal-tile-content {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.portal-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.portal-tile-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
}

.portal-tile-desc {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #94a3b8;
}

.portal-tile-cta {
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #38bdf8;
}

.portal-badge {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
}

.portal-badge-live {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.portal-badge-external {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.portal-badge-local {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.portal-badge-planned {
  background: rgba(129, 140, 248, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.22);
}

.portal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 1060px;
  width: 100%;
  margin-top: 2rem;
}

.portal-footer-dot { color: #334155; }

.portal-section {
  width: 100%;
  margin-bottom: 1.85rem;
  animation: login-rise 0.5s ease-out backwards;
}

.portal-section:nth-of-type(2) { animation-delay: 0.06s; }
.portal-section:nth-of-type(3) { animation-delay: 0.12s; }
.portal-section:nth-of-type(4) { animation-delay: 0.18s; }

.portal-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.portal-section-title {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
}

.portal-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.portal-section-count {
  flex-shrink: 0;
  min-width: 1.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-align: center;
  color: #64748b;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
}

.portal-section .portal-grid {
  margin-top: 0;
}

@media (max-width: 639px) {
  .portal-bg .portal-wrap {
    padding: 1rem 0.75rem 2.5rem;
  }

  .portal-intro {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-logout {
    width: 100%;
  }

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

.portal-grid-sub {
  margin-top: 0;
}

/* Portal tool subpages (Discord Bot, etc.) */
.portal-tool-wrap {
  max-width: 720px;
}

.dc-bot-wrap {
  max-width: 980px;
}

.dc-ref-link {
  color: #818cf8;
  text-decoration: none;
  font-weight: 600;
}

.dc-ref-link:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

.dc-hero-card {
  margin-bottom: 0.25rem;
}

.dc-phase-section {
  margin-bottom: 1.5rem;
}

.dc-phase-head {
  margin-bottom: 0.85rem;
}

.dc-module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .dc-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .dc-module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dc-module-card {
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s, background 0.2s;
}

.dc-module-card:hover {
  border-color: rgba(129, 140, 248, 0.35);
  background: rgba(15, 23, 42, 0.92);
}

.dc-module-title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #e2e8f0;
}

.dc-module-desc {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #94a3b8;
}

.dc-module-features {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.dc-module-gaming { border-top: 2px solid rgba(192, 132, 252, 0.45); }
.dc-module-tickets { border-top: 2px solid rgba(56, 189, 248, 0.45); }
.dc-module-business { border-top: 2px solid rgba(251, 191, 36, 0.4); }

.portal-tool-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.92);
  animation: login-rise 0.45s ease-out;
}

.portal-tool-header-main {
  flex: 1;
  min-width: 0;
}

.portal-tool-back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #38bdf8;
  text-decoration: none;
}

.portal-tool-back:hover {
  color: #7dd3fc;
}

.portal-tool-title-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.portal-tile-icon-lg {
  width: 3.25rem;
  height: 3.25rem;
}

.portal-tile-icon-lg svg {
  width: 1.65rem;
  height: 1.65rem;
}

.portal-tool-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.portal-tool-card {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.75);
  animation: login-rise 0.5s ease-out backwards;
}

.portal-tool-card:nth-child(2) { animation-delay: 0.08s; }

.portal-tool-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.portal-tool-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #f1f5f9;
}

.portal-tool-card-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #94a3b8;
}

.portal-tool-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: #94a3b8;
  line-height: 1.75;
  font-size: 0.9375rem;
}

.portal-tool-note {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(14, 165, 233, 0.08);
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1.55;
  animation: login-rise 0.5s ease-out 0.16s backwards;
}

.portal-tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.15rem;
}

.portal-tool-tag {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.22);
}

.portal-tool-roadmap {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 0.75rem;
}

.portal-tool-roadmap-phase {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #e2e8f0;
}

.portal-tool-list-compact {
  margin-top: 0.35rem;
  font-size: 0.875rem;
}

.portal-tool-steps {
  list-style: decimal;
  padding-left: 1.35rem;
}

.portal-tool-steps code,
.portal-tool-card code {
  font-size: 0.8125rem;
  padding: 0.12rem 0.4rem;
  border-radius: 0.35rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  color: #e2e8f0;
}

.portal-tool-link {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
}

.portal-tool-link:hover {
  color: #7dd3fc;
}

.portal-tool-note-muted {
  border-color: rgba(100, 116, 139, 0.35);
  background: rgba(15, 23, 42, 0.6);
  color: #94a3b8;
}

.portal-tool-note-muted strong {
  color: #cbd5e1;
}

.portal-tile-rechnung.portal-tile-active:hover {
  border-color: rgba(251, 191, 36, 0.35);
}

.portal-tile-rechnung .portal-tile-cta {
  color: #fbbf24;
}

.portal-tile-seo .portal-tile-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(52, 211, 153, 0.08));
  border-color: rgba(52, 211, 153, 0.3);
  color: #34d399;
}

.portal-tile-seo.portal-tile-active:hover {
  border-color: rgba(52, 211, 153, 0.4);
}

/* Game Server / AMP */
.gs-wrap { max-width: 820px; }

.portal-tile-games .portal-tile-icon {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.08));
  border-color: rgba(192, 132, 252, 0.3);
  color: #c084fc;
}

.portal-tile-games.portal-tile-active:hover {
  border-color: rgba(192, 132, 252, 0.4);
}

.portal-tile-games .portal-tile-cta { color: #c084fc; }

.gs-header { margin-bottom: 1.25rem; }

.gs-amp-link {
  color: #38bdf8;
  text-decoration: none;
}

.gs-amp-link:hover { color: #7dd3fc; }

.gs-hero {
  position: relative;
  padding: 2rem 1.75rem;
  margin-bottom: 1.25rem;
  text-align: center;
  animation: login-rise 0.5s ease-out;
}

.gs-hero-badge {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a5b4fc;
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.gs-hero-badge-live {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
}

.gs-hero-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #f1f5f9;
}

.gs-hero-desc {
  margin: 0 auto 1.35rem;
  max-width: 32rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #94a3b8;
}

.gs-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.gs-open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.45);
  color: #fff;
}

.gs-open-btn-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.gs-hero-url {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  word-break: break-all;
}

.gs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

/* SEO Check UI → assets/css/seo-check.css */

/* AhOh Status */
.ahoh-status-wrap { max-width: 920px; }

.ahoh-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.35rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.ahoh-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ahoh-tab:hover:not(:disabled) {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.08);
}

.ahoh-tab.is-active {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.ahoh-tab:disabled,
.ahoh-tab.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ahoh-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(100, 116, 139, 0.28);
  color: #cbd5e1;
}

.ahoh-tab.is-active .ahoh-tab-badge {
  background: rgba(56, 189, 248, 0.22);
  color: #bae6fd;
}

.ahoh-tab-badge-ok {
  background: rgba(12, 206, 107, 0.18);
  color: #4ade80;
}

.ahoh-tab-badge-warn {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.ahoh-tab-panel[hidden] { display: none !important; }
.ahoh-tab-panel.is-active { display: block; }

.ahoh-overview-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.ahoh-overview-chip {
  padding: 0.95rem 1rem;
  text-align: center;
}

.ahoh-overview-lab {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.ahoh-overview-chip strong {
  font-size: 1.35rem;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.ahoh-last-user-card {
  margin-top: 0.85rem;
  padding: 1.15rem 1.25rem;
}

.ahoh-last-user-nick {
  margin: 0.15rem 0 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.ahoh-recent-users-card {
  margin-top: 1rem;
  padding: 1.25rem 1.35rem 1.1rem;
}

.ahoh-recent-users-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.35rem;
}

.ahoh-recent-users-table th,
.ahoh-recent-users-table td {
  padding: 0.65rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ahoh-recent-users-table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ahoh-recent-users-table tr:last-child td { border-bottom: 0; }

.ahoh-recent-nick {
  display: block;
  font-weight: 600;
  color: #f1f5f9;
}

.ahoh-recent-uin {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.ahoh-recent-when {
  font-size: 0.85rem;
  color: #94a3b8;
  white-space: nowrap;
  text-align: right;
  width: 8.5rem;
}

.ahoh-invite-card {
  margin-top: 0.85rem;
  padding: 1.15rem 1.25rem;
}

.ahoh-invite-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.65rem;
}

.ahoh-invite-table th,
.ahoh-invite-table td {
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  text-align: left;
  vertical-align: top;
}

.ahoh-invite-table th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ahoh-invite-table tr:last-child td { border-bottom: 0; }

.ahoh-invite-nick {
  display: block;
  color: #f1f5f9;
  font-weight: 600;
}

.ahoh-invite-uin {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.ahoh-invite-n,
.ahoh-invite-when {
  white-space: nowrap;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.ahoh-invite-n {
  font-weight: 700;
  color: #7dd3fc;
  text-align: right;
}

.portal-tile-ahoh .portal-tile-icon,
.portal-tile-ahoh.portal-tile-icon-lg {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.08));
  border-color: rgba(56, 189, 248, 0.32);
  color: #38bdf8;
}

.portal-tile-ahoh.portal-tile-active:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

.portal-tile-ahoh .portal-tile-cta { color: #7dd3fc; }

.ahoh-status-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.ahoh-status-error { text-align: left; }

.ahoh-status-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ahoh-status-number {
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: #f8fafc;
  letter-spacing: -0.03em;
}

.ahoh-kpi-value {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.1;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.ahoh-status-meta {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: #94a3b8;
}

.ahoh-status-meta strong { color: #e2e8f0; }

.ahoh-status-updated {
  margin: 0.25rem 0 0;
  text-align: right;
}

.ahoh-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.ahoh-kpi-card { padding: 1.25rem 1.2rem 1.15rem; }
.ahoh-kpi-hero { grid-column: 1 / -1; text-align: center; padding: 1.6rem 1.25rem; }

.ahoh-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.ahoh-stat-card {
  padding: 1rem 1rem 0.95rem;
  text-align: left;
}

.ahoh-stat-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ahoh-stat-value {
  margin: 0.4rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.ahoh-stat-sub {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.ahoh-presence-card { margin-top: 0.85rem; padding: 1.15rem 1.25rem; }

.ahoh-presence-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1rem;
}

.ahoh-presence-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.9rem;
}

.ahoh-presence-list li:nth-last-child(-n+2) { border-bottom: 0; }

.ahoh-presence-name { color: #cbd5e1; }
.ahoh-presence-n { color: #f8fafc; font-weight: 600; }

.ahoh-traffic-card {
  margin-top: 0.85rem;
  padding: 1.15rem 1.25rem 1.1rem;
}

.ahoh-traffic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.35rem;
}

.ahoh-traffic-title {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
}

.ahoh-traffic-title span {
  font-weight: 500;
  color: #64748b;
}

.ahoh-traffic-big {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ahoh-traffic-plus {
  margin: 0 0.15rem;
  color: #64748b;
  font-weight: 500;
}

.ahoh-traffic-block .ahoh-status-meta { margin-top: 0.55rem; }

.ahoh-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.ahoh-chart-card { padding: 1.15rem 1.2rem 1rem; }
.ahoh-chart-wide { grid-column: 1 / -1; }

.ahoh-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.ahoh-chart-head .ahoh-status-label { margin: 0; }
.ahoh-chart-sum {
  font-size: 0.8125rem;
  color: #94a3b8;
  white-space: nowrap;
}

.ahoh-chart-wrap {
  width: 100%;
  margin-top: 0.25rem;
}
.ahoh-chart-wrap.is-compact { margin-top: 0; }

.ahoh-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: visible;
}

.ahoh-chart-grid {
  stroke: rgba(148, 163, 184, 0.14);
  stroke-width: 1;
}

.ahoh-chart-axis {
  fill: #64748b;
  font-size: 10px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.ahoh-chart-x { fill: #94a3b8; }

.ahoh-bar {
  transition: opacity 0.15s ease;
}
.ahoh-bar:hover { opacity: 0.85; }
.ahoh-bar-peak { filter: brightness(1.15); }

.ahoh-bar-val {
  fill: #e2e8f0;
  font-size: 10px;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, sans-serif;
  pointer-events: none;
}

.ahoh-area-line {
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ahoh-area-dot {
  fill: #0f172a;
  stroke: #a78bfa;
  stroke-width: 2;
}
.ahoh-area-dot:hover {
  r: 5;
  fill: #a78bfa;
}

.ahoh-presence-bars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.55rem;
}
.ahoh-presence-bar-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) 2.25rem;
  gap: 0.65rem;
  align-items: center;
}
.ahoh-presence-bar-lab {
  font-size: 0.8125rem;
  color: #cbd5e1;
}
.ahoh-presence-bar-track {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}
.ahoh-presence-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  min-width: 0;
}
.ahoh-presence-bar-n {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #f8fafc;
  text-align: right;
}

.ahoh-spark {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.ahoh-spark-area {
  fill: rgba(56, 189, 248, 0.14);
}

.ahoh-spark-line {
  stroke: #38bdf8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ahoh-systems-card {
  padding: 1.25rem 1.35rem 1.1rem;
}

.ahoh-systems-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.35rem;
}

.ahoh-systems-table th,
.ahoh-systems-table td {
  padding: 0.7rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ahoh-systems-table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ahoh-systems-table tr:last-child td { border-bottom: 0; }

.ahoh-systems-table td:last-child {
  width: 7.5rem;
  white-space: nowrap;
  text-align: right;
}

.ahoh-sys-name {
  display: block;
  color: #e2e8f0;
  font-size: 0.9375rem;
  font-weight: 500;
}

.ahoh-sys-detail {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.35;
}

.ahoh-sys-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.ahoh-sys-badge-ok { color: #0cce6b; }
.ahoh-sys-badge-fail { color: #ef4444; }

.ahoh-sys-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.ahoh-sys-dot-ok { background: #0cce6b; box-shadow: 0 0 0 3px rgba(12, 206, 107, 0.16); }
.ahoh-sys-dot-fail { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16); }

.ahoh-systems-checked { margin-top: 0.75rem; }

.ahoh-sys-detail.is-ok { color: #7c8ba1; }

/* --- Health-Kopfzeile --- */
.ahoh-health {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1rem;
  border-left: 3px solid #0cce6b;
}

.ahoh-health.is-fail { border-left-color: #ef4444; }

.ahoh-health-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.ahoh-health-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: #0cce6b;
  box-shadow: 0 0 0 5px rgba(12, 206, 107, 0.15);
}

.ahoh-health.is-fail .ahoh-health-dot {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.15);
}

.ahoh-health-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #e2e8f0;
}

.ahoh-health-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
}

.ahoh-health-facts dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.ahoh-health-facts dd {
  margin: 0.15rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

/* --- Backup-Karte --- */
.ahoh-backup-card {
  margin-top: 1rem;
  padding: 1.15rem 1.35rem 1.1rem;
  border-left: 3px solid #0cce6b;
}

.ahoh-backup-card.is-fail { border-left-color: #ef4444; }

.ahoh-backup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ahoh-backup-head .ahoh-status-label { margin: 0; }

.ahoh-backup-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0.9rem 0 0.75rem;
}

.ahoh-backup-facts dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.ahoh-backup-facts dd {
  margin: 0.15rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

/* --- Unbehandelte Fehler --- */
.ahoh-crash-card {
  margin-top: 1rem;
  padding: 1.15rem 1.35rem 1.1rem;
  border-left: 3px solid #f59e0b;
}

.ahoh-crash-list {
  list-style: none;
  margin: 0.65rem 0 0.75rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.ahoh-crash-list li {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ahoh-crash-list li:last-child { border-bottom: 0; padding-bottom: 0; }

.ahoh-crash-when {
  font-size: 0.8125rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  margin-right: 0.6rem;
}

.ahoh-crash-kind {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 0.35rem;
  padding: 0.1rem 0.45rem;
}

.ahoh-crash-msg {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9375rem;
  color: #e2e8f0;
  word-break: break-word;
}

.ahoh-crash-stack {
  margin: 0.45rem 0 0;
  padding: 0.6rem 0.75rem;
  overflow-x: auto;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 0.5rem;
  white-space: pre;
}

/* --- Audit-Log --- */
.ahoh-audit-card { padding: 1.25rem 1.35rem 1.1rem; }

.ahoh-audit-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.ahoh-audit-table th,
.ahoh-audit-table td {
  padding: 0.6rem 0.75rem 0.6rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ahoh-audit-table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ahoh-audit-table tr:last-child td { border-bottom: 0; }
.ahoh-audit-table tr.is-warn td { background: rgba(245, 158, 11, 0.06); }

.ahoh-audit-when {
  white-space: nowrap;
  color: #94a3b8;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.ahoh-audit-action {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 0.35rem;
  padding: 0.12rem 0.5rem;
}

.ahoh-audit-ban { color: #ef4444; background: rgba(239, 68, 68, 0.12); }
.ahoh-audit-unban { color: #0cce6b; background: rgba(12, 206, 107, 0.12); }
.ahoh-audit-password-reset { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }

.ahoh-audit-detail {
  color: #94a3b8;
  font-size: 0.875rem;
  word-break: break-word;
}

@media (max-width: 640px) {
  .ahoh-health { gap: 0.9rem; }
  .ahoh-health-facts,
  .ahoh-backup-facts { gap: 1rem 1.25rem; }
  .ahoh-audit-table th:nth-child(4),
  .ahoh-audit-table td:nth-child(4) { display: none; }
}

.ahoh-user-search-card {
  margin-top: 1rem;
  padding: 1.35rem 1.4rem 1.2rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 60% at 100% 100%, rgba(14, 165, 233, 0.08), transparent 50%),
    linear-gradient(165deg, rgba(20, 28, 39, 0.98), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.16);
}

.ahoh-user-search-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8 35%, #0ea5e9 65%, transparent);
  opacity: 0.85;
  pointer-events: none;
}

.ahoh-user-search-card .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ahoh-user-search-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.95rem;
}

.ahoh-user-search-head .ahoh-status-label {
  margin: 0;
}

.ahoh-user-search-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.85rem;
  flex-shrink: 0;
  color: #7dd3fc;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.28), rgba(14, 165, 233, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.ahoh-user-search-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.ahoh-user-search-sub {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.3;
}

.ahoh-user-search-form {
  margin: 0;
}

.ahoh-user-search-shell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 3.15rem;
  padding: 0.35rem 0.35rem 0.35rem 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(6, 10, 15, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 28px rgba(2, 8, 23, 0.35);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ahoh-user-search-shell:focus-within {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(56, 189, 248, 0.16),
    0 12px 30px rgba(2, 8, 23, 0.4);
}

.ahoh-user-search-shell-icon {
  display: grid;
  place-items: center;
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.18s ease;
}

.ahoh-user-search-shell:focus-within .ahoh-user-search-shell-icon {
  color: #38bdf8;
}

.ahoh-user-search-shell-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.ahoh-user-search-input {
  flex: 1;
  min-width: 0;
  height: 2.4rem;
  padding: 0 0.55rem;
  border: 0;
  background: transparent;
  color: #f1f5f9;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.ahoh-user-search-input::placeholder { color: #64748b; }

.ahoh-user-search-input:focus {
  outline: none;
}

.ahoh-user-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.ahoh-user-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.45rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  color: #041018;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8 45%, #0ea5e9);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.ahoh-user-search-btn svg {
  width: 1rem;
  height: 1rem;
}

.ahoh-user-search-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.36);
}

.ahoh-user-search-btn:active {
  transform: translateY(1px);
}

.ahoh-user-search-btn:disabled {
  opacity: 0.65;
  cursor: wait;
  filter: none;
}

.ahoh-user-search-hint { margin-top: 0.7rem; }

.ahoh-user-search-results {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.ahoh-user-search-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.ahoh-user-search-table {
  width: 100%;
  border-collapse: collapse;
}

.ahoh-user-search-table th,
.ahoh-user-search-table td {
  padding: 0.75rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ahoh-user-search-table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ahoh-user-search-table tr:last-child td { border-bottom: 0; }

.ahoh-user-search-nick {
  display: block;
  font-weight: 600;
  color: #f1f5f9;
}

.ahoh-user-search-uin {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.ahoh-user-search-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
}

.ahoh-user-presence {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.ahoh-user-online { color: #0cce6b; }
.ahoh-user-offline { color: #64748b; }
.ahoh-user-banned { color: #f87171; }

.ahoh-user-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.ahoh-user-row:hover,
.ahoh-user-row:focus {
  background: rgba(56, 189, 248, 0.08);
  outline: none;
}

.ahoh-admin-detail-card {
  margin-top: 1rem;
  padding: 1.25rem 1.35rem 1.2rem;
  border: 1px solid rgba(248, 113, 113, 0.18);
  background:
    radial-gradient(ellipse 60% 70% at 100% 0%, rgba(248, 113, 113, 0.08), transparent 55%),
    linear-gradient(165deg, rgba(20, 28, 39, 0.98), rgba(15, 23, 42, 0.92));
}

.ahoh-admin-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.ahoh-admin-detail-nick {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.ahoh-admin-badge {
  display: inline-flex;
  align-items: center;
  height: 1.7rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ahoh-admin-badge-ban {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.ahoh-admin-badge-ok {
  color: #bbf7d0;
  background: rgba(12, 206, 107, 0.16);
  border: 1px solid rgba(12, 206, 107, 0.35);
}

.ahoh-admin-badge[hidden] {
  display: none !important;
}

.ahoh-admin-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
}

.ahoh-admin-facts > div {
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  background: rgba(6, 10, 15, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.ahoh-admin-facts dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ahoh-admin-facts dd {
  margin: 0.2rem 0 0;
  color: #e2e8f0;
  font-size: 0.9rem;
  word-break: break-word;
}

.ahoh-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* .btn-ghost setzt display:inline-flex und sticht sonst das HTML-hidden aus —
   deshalb war „Entsperren“ auch bei aktiven Konten zu sehen. */
.ahoh-status-wrap [hidden] {
  display: none !important;
}

.ahoh-admin-reset-box {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.ahoh-admin-reset-link {
  width: 100%;
  margin-top: 0.4rem;
  height: 2.4rem;
  padding: 0 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(6, 10, 15, 0.7);
  color: #7dd3fc;
  font: inherit;
  font-size: 0.85rem;
}

.ahoh-admin-action-msg {
  margin-top: 0.75rem;
  color: #86efac;
}

.ahoh-admin-action-msg.is-error {
  color: #fca5a5;
}

@media (max-width: 640px) {
  .ahoh-admin-facts { grid-template-columns: 1fr; }
  .ahoh-admin-actions .btn { flex: 1 1 auto; }
}

.ahoh-user-search-when {
  font-size: 0.85rem;
  color: #94a3b8;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .ahoh-user-search-shell {
    flex-wrap: wrap;
    padding: 0.55rem;
    border-radius: 0.9rem;
  }

  .ahoh-user-search-shell-icon {
    margin-left: 0.35rem;
  }

  .ahoh-user-search-input {
    width: calc(100% - 2.2rem);
    flex: 1 1 auto;
  }

  .ahoh-user-search-btn {
    width: 100%;
    margin-top: 0.15rem;
  }

  .ahoh-user-search-table th:nth-child(3),
  .ahoh-user-search-table td:nth-child(3) { display: none; }
}

.ahoh-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

@media (max-width: 720px) {
  .ahoh-kpi-grid,
  .ahoh-charts-grid,
  .ahoh-presence-list,
  .ahoh-traffic-grid,
  .ahoh-overview-strip {
    grid-template-columns: 1fr;
  }

  .ahoh-tabs-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ahoh-tab {
    flex: 0 0 auto;
  }

  .ahoh-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ahoh-presence-list li:nth-last-child(-n+2) {
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  }

  .ahoh-presence-list li:last-child { border-bottom: 0; }
}

@media (max-width: 420px) {
  .ahoh-stat-grid { grid-template-columns: 1fr; }
}

/* --- Akquise: Zustand der Datenquellen --- */
.source-health {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(148, 163, 184, 0.08);
    cursor: help;
}
.source-health strong { font-weight: 600; }
.source-health-text { opacity: 0.8; }
.source-health-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #94a3b8; flex: none; }
.source-health-ok .source-health-dot { background: #22c55e; }
.source-health-ok { border-color: rgba(34, 197, 94, 0.35); }
.source-health-empty .source-health-dot { background: #eab308; }
.source-health-error .source-health-dot { background: #ef4444; }
.source-health-error { border-color: rgba(239, 68, 68, 0.45); }
.source-health-blocked { opacity: 0.6; }
.source-health-blocked strong { text-decoration: line-through; }
.source-health-blocked .source-health-dot { background: #64748b; }

/* Akquise: Bewertung Bedarf/Passung/Erreichbarkeit */
.badge-score-part { display: inline-block; font-size: .72rem; padding: 2px 7px; border-radius: 999px; background: rgba(99,102,241,.12); color: inherit; border: 1px solid rgba(99,102,241,.25); cursor: help; }
.badge-web-unknown { background: rgba(148,163,184,.18); }
.web-summary { font-size: .78rem; margin: .35rem 0 0; }
.score-details { margin: .4rem 0 0; font-size: .82rem; }
.score-details summary { cursor: pointer; color: var(--accent, #6366f1); }
.score-details dl { margin: .35rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; }
.score-details dt { font-weight: 600; white-space: nowrap; }
.score-details dd { margin: 0; }
@media (max-width: 640px) { .score-details dl { grid-template-columns: 1fr; } .score-details dd { margin-bottom: .3rem; } }

/* Akquise 8/9: Rechtliches */
.legal-hint { font-size: .85rem; margin-bottom: .75rem; }
.block-lead-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.block-lead-form .input-field { flex: 1 1 16rem; }
.btn-danger-soft { color: #fca5a5; border-color: rgba(248,113,113,.5); }
.email-legal-hint { margin: .75rem 0; }
.email-legal-hint[hidden] { display: none; }
.email-legal-hint a { text-decoration: underline; }
.sperr-table-wrap { overflow-x: auto; }
.search-blocked-note { font-size: .85rem; }

/* Akquise 9/9: Status-Ablauf */
.contact-mark-form { display: inline-flex; gap: .35rem; align-items: center; }
.select-mini { padding: .15rem 1.6rem .15rem .4rem; font-size: .8rem; min-height: 0; width: auto; }
.mobile-card-actions .contact-mark-form { flex-wrap: nowrap; }

/* Spiele-Kacheln mit Titelbild (Versandhelden, Blobbel Volley) */
.portal-tile:has(.portal-tile-bild) { flex-wrap: wrap; }
.portal-tile-bild { display: block; flex: 0 0 100%; width: 100%; margin: 0 0 10px; }
.portal-tile-bild img { display: block; width: 100%; height: auto; aspect-ratio: 400 / 167; object-fit: cover; border-radius: 8px; }
