/* ==========================================================================
   Design Tokens  (Tailwind-like palette, light B2B SaaS)
   ========================================================================== */
:root {
  /* --- Colors: Slate scale --- */
  --color-slate-50:  #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;

  /* --- Colors: Blue accent --- */
  --color-blue-50:  #eff6ff;
  --color-blue-100: #dbeafe;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-blue-700: #1d4ed8;

  /* --- Colors: Semantic --- */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error:   #ef4444;
  --color-error-bg:#fef2f2;

  /* --- Typography --- */
  --font-sans: 'Inter', sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;

  /* --- Spacing (4px base) --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* --- Radii --- */
  --radius-sm: 6px;
  --radius:    8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* --- Shadows --- */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow:    0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);

  /* --- Sidebar --- */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 76px;
  --sidebar-bg: #ffffff;
  --sidebar-border: var(--color-slate-200);
  --sidebar-shadow: 2px 0 8px 0 rgb(0 0 0 / 0.06);

  /* --- Transitions --- */
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-slate-800);
  background-color: var(--color-slate-50);
  -webkit-font-smoothing: antialiased;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

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

/* ==========================================================================
   Animation Keyframes (adapted from glassmorphism design reference)
   ========================================================================== */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    filter: blur(3px);
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes slideRightIn {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
  }
}

@keyframes testimonialIn {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

/* Staggered entrance */
.animate-element {
  opacity: 0;
  animation: fadeSlideIn 0.52s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.animate-delay-100  { animation-delay: 0.08s; }
.animate-delay-200  { animation-delay: 0.16s; }
.animate-delay-300  { animation-delay: 0.24s; }
.animate-delay-400  { animation-delay: 0.32s; }
.animate-delay-500  { animation-delay: 0.40s; }
.animate-delay-600  { animation-delay: 0.48s; }
.animate-delay-700  { animation-delay: 0.56s; }

.animate-slide-right {
  opacity: 0;
  animation: slideRightIn 0.72s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.auth-name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

/* ==========================================================================
   Auth Layout — Glassmorphism Split (40/60)
   ========================================================================== */

/* Full-page LIGHT gradient background */
.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 48%, #93c5fd 100%);
  padding: var(--space-6);
  overflow: hidden;
  position: relative;
}

.auth-page::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: '';
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.22), transparent 34%),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.055) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.04) 0 1px, transparent 1px 68px);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 78%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 78%);
}

/* Decorative blur orbs — pastel palette for light bg */
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
}
.auth-bg-orb-1 {
  width: 500px; height: 500px;
  background: rgba(147, 197, 253, 0.40);
  top: -150px; right: -90px;
}
.auth-bg-orb-2 {
  width: 420px; height: 420px;
  background: rgba(196, 181, 253, 0.28);
  bottom: -120px; left: -80px;
}
.auth-bg-orb-3 {
  width: 260px; height: 260px;
  background: rgba(165, 243, 252, 0.24);
  top: 40%; left: 33%;
}

/* Two-column card */
.auth-split-card {
  display: grid;
  grid-template-columns: 2fr 3fr;
  width: 100%;
  max-width: 980px;
  min-height: 620px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow:
    0 32px 72px -12px rgba(37, 99, 235, 0.20),
    0 0 0 1px rgba(255, 255, 255, 0.72);
}

/* Left column — light frosted glass */
.auth-split-left {
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-right: 1px solid rgba(255, 255, 255, 0.60);
  padding: var(--space-10) var(--space-8);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.auth-form-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Logo */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.auth-logo-image {
  width: min(170px, 100%);
  height: auto;
  display: block;
}

.auth-logo-text {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-slate-900);
  letter-spacing: 0;
}

/* Heading — dark text on light glass */
.auth-glass-title {
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--color-slate-900);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: var(--space-2);
}

.auth-glass-desc {
  font-size: var(--text-sm);
  color: var(--color-slate-500);
  margin-bottom: var(--space-6);
  line-height: 1.55;
}

/* Tabs — light mode */
.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius);
  padding: 5px;
  margin-bottom: var(--space-5);
  gap: 2px;
}

.auth-tab {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-slate-500);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  font-family: var(--font-sans);
}
.auth-tab:hover { color: var(--color-slate-700); }
.auth-tab.is-active {
  background: #ffffff;
  color: var(--color-slate-900);
  box-shadow: var(--shadow-xs);
}

/* Alert banners — standard light colours */
.glass-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}
.glass-alert-error {
  background: var(--color-error-bg);
  border: 1px solid #fecaca;
  color: #991b1b;
}
.glass-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Form fields */
.glass-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.glass-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-slate-600);
}

.glass-input-wrap {
  border-radius: 12px;
  background: #ffffff;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.glass-input-wrap:focus-within {
  border-color: var(--color-blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.glass-input-wrap--has-btn .glass-input {
  padding-right: 46px;
}

.glass-input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: transparent;
  border: none;
  outline: none;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--color-slate-900);
  border-radius: 12px;
}
.glass-input::placeholder { color: var(--color-slate-400); }

/* Password eye-toggle button */
.pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-slate-400);
  padding: 0;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.pass-toggle:hover { color: var(--color-slate-700); }

.pass-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

/* Remember-me row */
.glass-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  gap: var(--space-3);
}

.glass-checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-slate-700);
  user-select: none;
}

.glass-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--color-slate-300);
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition), background var(--transition);
}
.glass-checkbox:checked {
  background: var(--color-blue-600);
  border-color: var(--color-blue-600);
}
.glass-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: 2px solid #ffffff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.glass-link {
  font-size: var(--text-sm);
  color: var(--color-blue-600);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}
.glass-link:hover { color: var(--color-blue-700); text-decoration: none; }

.auth-oauth {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.auth-oauth-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  padding: 0 44px;
  border: none;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--color-slate-800);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: box-shadow var(--transition), background var(--transition), transform var(--transition);
}

.auth-oauth-button:hover {
  background: #f1f5f9;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.10), 0 12px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.auth-oauth-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.auth-oauth-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.auth-oauth-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.auth-oauth-spinner {
  display: none;
  position: absolute;
  right: 16px;
}

.auth-oauth-button[data-loading="true"] .auth-oauth-spinner {
  display: inline-block;
}

.auth-oauth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  color: var(--color-slate-400);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.auth-oauth-divider::before,
.auth-oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.45);
}

.auth-legal-consent {
  align-items: flex-start;
  margin: 0 0 var(--space-5);
  line-height: 1.45;
}

.auth-legal-consent a {
  color: var(--color-blue-600);
  font-weight: 800;
  text-decoration: none;
}

.auth-legal-consent a:hover {
  color: var(--color-blue-700);
  text-decoration: underline;
}

/* Primary button */
.glass-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  height: 44px;
  padding: 0 var(--space-6);
  background: var(--color-blue-600);
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
}
.glass-btn-primary:hover {
  background: var(--color-blue-700);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.50);
}
.glass-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.glass-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  height: 44px;
  padding: 0 var(--space-6);
  background: #ffffff;
  color: var(--color-slate-700);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-sans);
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.glass-btn-secondary:hover {
  background: #f8fafc;
  border-color: rgba(100, 116, 139, 0.55);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.auth-signup-success {
  display: flex;
  flex-flow: column;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(255, 255, 255, 0.94) 100%);
  color: var(--color-slate-900);
}

.auth-signup-success:focus {
  outline: none;
}

.auth-signup-success__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.26);
}

.auth-signup-success__icon svg {
  width: 26px;
  height: 26px;
}

.auth-signup-success__copy {
  display: grid;
  gap: var(--space-2);
}

.auth-signup-success__title {
  margin: 0;
  color: var(--color-slate-900);
  font-size: var(--text-xl);
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
}

.auth-signup-success__text,
.auth-signup-success__hint {
  margin: 0;
  color: var(--color-slate-600);
  font-size: var(--text-sm);
  line-height: 1.55;
  text-align: center;
}

.auth-signup-success__hint {
  color: #15803d;
  font-weight: 700;
}

.auth-signup-success__actions {
  display: grid;
  gap: var(--space-3);
}

/* Right column — product screenshots + testimonial centred */
.auth-split-right {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #07152f;
}

.auth-callback-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: var(--space-10) var(--space-8);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 32px 72px -12px rgba(37, 99, 235, 0.20),
    0 0 0 1px rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  text-align: center;
}

.auth-callback-logo {
  width: min(150px, 100%);
  height: auto;
  margin: 0 auto var(--space-6);
}

.auth-callback-title {
  color: var(--color-slate-900);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.auth-callback-desc {
  color: var(--color-slate-500);
  font-size: var(--text-sm);
  line-height: 1.55;
  margin-bottom: var(--space-5);
}

.auth-callback-actions {
  margin-top: var(--space-5);
}

.auth-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(96, 165, 250, 0.34), transparent 34%),
    radial-gradient(circle at 78% 28%, rgba(20, 184, 166, 0.18), transparent 30%),
    linear-gradient(145deg, #07152f 0%, #0f2a5b 52%, #1550a8 100%);
  opacity: 1;
  transition: opacity 0.26s ease;
}
.auth-hero-bg.is-switching { opacity: 0.45; }

.auth-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: none;
  pointer-events: none;
}

.auth-product-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: stretch;
  pointer-events: none;
}

.auth-product-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #f4f7ff;
  border: none;
  box-shadow: none;
}

.auth-product-screen {
  display: block;
  width: 100%;
  height: auto;
  min-height: 620px;
  object-fit: contain;
  object-position: top center;
  transition: opacity 0.24s ease, transform 0.38s ease;
}

.auth-product-screen.is-switching {
  opacity: 0;
  transform: scale(1.012);
}

.auth-product-shadow {
  display: none;
}

.auth-support-link{margin-top: 10px}

.testimonial-slider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  width: min(510px, calc(100% - 36px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin: 0 auto;
}

.testimonial-track {
  position: relative;
  width: 100%;
  min-height: 158px;
}

.testimonial-card {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.50) 48%, rgba(255, 255, 255, 0.36)),
    rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px) saturate(1.85);
  -webkit-backdrop-filter: blur(34px) saturate(1.85);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  padding: var(--space-4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -20px 34px rgba(255, 255, 255, 0.20),
    0 18px 46px -18px rgba(15, 23, 42, 0.34),
    0 0 0 1px rgba(15, 23, 42, 0.05);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  height: 100%;
}

.testimonial-card::before,
.testimonial-card::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.testimonial-card::before {
  inset: 1px;
  border-radius: 19px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.82), transparent 38%),
    radial-gradient(circle at 90% 22%, rgba(219, 234, 254, 0.42), transparent 36%);
  opacity: 0.94;
}

.testimonial-card::after {
  left: 16px;
  right: 16px;
  top: 1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), transparent);
}
.testimonial-card.is-active {
  opacity: 1;
  pointer-events: auto;
}

.testimonial-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testimonial-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 5px 14px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.testimonial-meta {
  min-width: 0;
}

.testimonial-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-slate-950, #020617);
  margin-bottom: 1px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}
.testimonial-handle {
  font-size: 11px;
  color: rgba(30, 41, 59, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}
.testimonial-text {
  width: 100%;
  font-size: 13.5px;
  color: rgba(15, 23, 42, 0.88);
  line-height: 1.48;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.36);
}

/* Dot indicators */
.testimonial-dots {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.testimonial-dot {
  width: 6px; height: 6px;
  padding: 0;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.22);
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.testimonial-dot:hover { background: rgba(15, 23, 42, 0.40); }
.testimonial-dot.is-active {
  background: rgba(15, 23, 42, 0.72);
  width: 20px;
}

/* Responsive */
@media (max-width: 720px) {
  .auth-split-card {
    grid-template-columns: 1fr;
    max-width: 440px;
    height: auto;
    min-height: unset;
  }
  .auth-split-right { display: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--color-blue-600);
  color: #ffffff;
  border-color: var(--color-blue-600);
}

.btn-primary:hover {
  background: var(--color-blue-700);
  border-color: var(--color-blue-700);
  text-decoration: none;
}

.btn-secondary {
  background: #ffffff;
  color: var(--color-slate-700);
  border-color: var(--color-slate-300);
}

.btn-secondary:hover {
  background: var(--color-slate-50);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-slate-600);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--color-slate-100);
  text-decoration: none;
}

.btn-sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}

/* --- Loading spinner inside button --- */
.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

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

/* ==========================================================================
   Alerts & Feedback
   ========================================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.alert-error {
  background: var(--color-error-bg);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ==========================================================================
   App Shell Layout (index.html)
   ========================================================================== */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  max-width: 100vw;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: var(--sidebar-shadow);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 10;
  padding: 20px 0 40px 20px;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-close-button {
  display: none;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-5) var(--space-4);
  padding-left: 20px;
  margin-bottom: 15px;
}

.sidebar-logo {
  width: min(180px, calc(100% - 16px));
  height: auto;
  display: block;
}

.sidebar-logo-compact {
  display: none;
}

.sidebar-brand {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-slate-900);
  letter-spacing: 0;
}

.sidebar-toggle-button {
  display: none;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-slate-400);
  padding: var(--space-3) var(--space-2) var(--space-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-slate-600);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  text-decoration: none;
  font-family: var(--font-sans);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item:hover {
  background: var(--color-slate-100);
  color: var(--color-slate-800);
  text-decoration: none;
}

.nav-item.is-active {
  background: var(--color-blue-50);
  color: var(--color-blue-700);
  font-weight: 500;
  /*
   * Box-shadow hack: рисует левую «полоску» активного пункта меню
   * без border-left (который сдвигает layout) и без псевдоэлементов.
   * inset 3px  = сдвиг вправо 3px — полоса прижата к левому краю.
   */
  box-shadow: inset 3px 0 0 var(--color-blue-600);
}

.nav-item.is-active svg { opacity: 1; }

#nav-admin{margin-top: 5px;}

/* --- Main content area --- */
.main-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 50px;
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: var(--space-4);
  margin-bottom: 40px;
}

.topbar-heading { flex: 1; display: flex; flex-direction: column; gap: 1px; }

.topbar-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #2b3674;
  letter-spacing: -0.01em;
}

.topbar-subtitle {
  color: var(--text-gray);
  font-size: 15px;
  font-weight: 400;
}

.page-body {
  flex: 1;
  padding: var(--space-6) var(--space-8);
  width: 100%;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: #ffffff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.card-body { padding: var(--space-6); }

.card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-slate-100);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.card-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-slate-900);
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-slate-200);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

thead { background: var(--color-slate-50); }

th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  color: var(--color-slate-600);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-slate-200);
  white-space: nowrap;
}

td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-slate-100);
  color: var(--color-slate-700);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-slate-50); }

/* ==========================================================================
   Status Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: 99px;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

.badge-pending  { background: var(--color-slate-100); color: var(--color-slate-600); }
.badge-processing { background: #eff6ff; color: var(--color-blue-700); }
.badge-completed  { background: #f0fdf4; color: #15803d; }
.badge-error      { background: #fef2f2; color: #b91c1c; }

/* ==========================================================================
   Dividers
   ========================================================================== */
.divider {
  height: 1px;
  background: var(--color-slate-200);
  margin: var(--space-6) 0;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.hidden  { display: none !important; }

.app-bootstrap {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f8fafc;
}

.app-bootstrap-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 360px;
  text-align: center;
  color: var(--color-slate-600);
}

.app-bootstrap-logo {
  width: 112px;
  height: auto;
}

.app-bootstrap-card strong {
  color: #1d4ed8;
  font-size: 1.05rem;
  font-weight: 700;
}

.app-bootstrap-card span {
  font-size: 0.94rem;
  line-height: 1.5;
}

.app-bootstrap-card::after {
  content: "";
  width: 34px;
  height: 34px;
  border: 3px solid rgba(29, 78, 216, 0.18);
  border-top-color: #1d4ed8;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

.app-bootstrap-card[role="alert"]::after {
  display: none;
}

.app-bootstrap-retry {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: #1d4ed8;
  color: #fff;
  font: 700 0.92rem/1 var(--font-base);
  cursor: pointer;
}

.is-auth-booting .app-layout {
  visibility: hidden;
}

/* ==========================================================================
   Screens
   ========================================================================== */
.screen { width: 100%; }

/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-16) var(--space-8);
  text-align: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--color-slate-300);
}

.empty-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-slate-700);
}

.empty-subtitle {
  font-size: var(--text-sm);
  color: var(--color-slate-400);
  max-width: 360px;
  line-height: 1.6;
}

/* ==========================================================================
   Admin Grid
   ========================================================================== */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-5);
}

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

.admin-toolbar-card {
  overflow: hidden;
}

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
}

.admin-toolbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.admin-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--color-slate-200);
}

.admin-quality-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
}

.admin-alert-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
}

.admin-alert-badge {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.admin-alert-badge.is-critical {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.admin-alert-badge strong,
.admin-alert-badge span {
  display: block;
}

.admin-alert-badge strong {
  font-size: 13px;
  font-weight: 900;
}

.admin-alert-badge span {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}

.admin-alert-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.admin-provider-balances {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.admin-provider-balances-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-provider-balances-head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  color: var(--color-slate-900);
}

.admin-provider-balances-meta {
  font-size: 12px;
  font-weight: 750;
  color: var(--color-slate-500);
  white-space: nowrap;
}

.admin-provider-balance-error {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 750;
}

.admin-provider-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.admin-provider-balance-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 102px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.admin-provider-balance-item span {
  font-size: 12px;
  font-weight: 850;
  color: var(--color-slate-600);
}

.admin-provider-balance-item strong {
  font-size: 22px;
  line-height: 1.12;
  color: var(--color-slate-950);
}

.admin-provider-balance-item small {
  font-size: 12px;
  line-height: 1.35;
  color: var(--color-slate-500);
}

.admin-provider-balance-item.is-warning {
  border-color: #fbbf24;
  background: #fffbeb;
}

.admin-provider-balance-item.is-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.admin-provider-balance-item.is-error strong,
.admin-provider-balance-item.is-error small {
  color: #991b1b;
}

.admin-quality-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.admin-quality-chip strong {
  font-size: 28px;
  line-height: 1;
  color: var(--color-slate-900);
}

.admin-quality-chip span {
  font-size: 13px;
  color: var(--color-slate-500);
}

.admin-quality-chip-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-slate-600);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 1.05fr);
  gap: var(--space-6);
}

.admin-panel-card {
  min-width: 0;
}

.admin-session-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-session-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-session-card.is-selected {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.08);
}

.admin-session-card:has(.admin-session-card-note) {
  border-color: rgba(15, 118, 110, 0.28);
}

.admin-session-card-main {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 18px 20px 14px;
  cursor: pointer;
}

.admin-session-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-session-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-slate-900);
}

.admin-session-card-subtitle {
  margin-top: 4px;
  font-size: 14px;
  color: var(--color-slate-500);
}

.admin-session-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-slate-500);
}

.admin-session-card-note {
  display: inline-flex;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.admin-session-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.admin-mini-metric {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
}

.admin-mini-metric strong {
  color: #0f172a;
}

.admin-session-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 18px;
}

.admin-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-detail-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  color: var(--color-slate-900);
}

.admin-detail-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--color-slate-500);
}

.admin-detail-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-terminal-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}

.admin-terminal-notice-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.admin-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.admin-inline-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.admin-inline-metric span {
  font-size: 12px;
  color: var(--color-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-inline-metric strong {
  font-size: 22px;
  color: var(--color-slate-900);
}

.admin-reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.admin-reason-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 13px;
  color: var(--color-slate-600);
}

.admin-reason-pill strong {
  color: #0f172a;
}

.admin-stage-log-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.admin-stage-log-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #ffffff;
}

.admin-stage-log-main {
  min-width: 0;
}

.admin-stage-log-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-slate-900);
}

.admin-stage-log-meta {
  margin-top: 5px;
  font-size: 13px;
  color: var(--color-slate-500);
}

.admin-stage-log-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-stage-log-duration {
  font-size: 12px;
  color: var(--color-slate-500);
}

.admin-empty-inline,
.admin-placeholder-text {
  font-size: 14px;
  color: var(--color-slate-500);
}

.admin-empty-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 240px;
  text-align: center;
}

.admin-empty-panel-icon,
.admin-stat-icon {
  width: 18px;
  height: 18px;
  color: var(--color-blue-600);
}

.admin-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-slate-900);
}

.admin-empty-subtitle {
  max-width: 460px;
  font-size: 14px;
  color: var(--color-slate-500);
}

.admin-table-wrapper a {
  color: #2563eb;
  text-decoration: none;
}

.admin-table-wrapper a:hover {
  text-decoration: underline;
}

.admin-company-name {
  font-weight: 700;
  color: var(--color-slate-900);
}

.admin-company-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-slate-500);
}

@media (max-width: 1080px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .admin-toolbar,
  .admin-detail-head,
  .admin-stage-log-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar-actions,
  .admin-stage-log-side,
  .admin-detail-badges {
    justify-content: flex-start;
  }

  .admin-filter-group {
    width: 100%;
    justify-content: space-between;
  }

  .admin-quality-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Admin Cockpit
   ========================================================================== */
.admin-cockpit {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
  color: #0f172a;
}

.admin-hero,
.admin-panel,
.admin-kpi-card,
.admin-provider-card,
.admin-queue-card,
.admin-error-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.admin-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-radius: 18px;
}

.admin-hero-copy,
.admin-section-head > div,
.admin-panel-head > div,
.admin-detail-header > div,
.admin-provider-card,
.admin-queue-card,
.admin-error-card {
  min-width: 0;
}

.admin-hero-copy h1 {
  margin: 4px 0 8px;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: 0;
}

.admin-hero-copy p,
.admin-panel-head p,
.admin-section-head p,
.admin-provider-card p,
.admin-queue-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.admin-eyebrow {
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-hero-controls,
.admin-detail-actions,
.admin-row-actions,
.admin-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-period-toggle,
.admin-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.admin-tabs {
  width: fit-content;
  max-width: 100%;
}

.admin-segment,
.admin-tab,
.admin-chip,
.admin-icon-button,
.admin-mini-button,
.admin-plain-button,
.admin-link-button,
.admin-search-form button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  color: #475569;
  background: transparent;
}

.admin-segment,
.admin-tab,
.admin-chip {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.admin-segment.is-active,
.admin-tab.is-active,
.admin-chip.is-active {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.admin-icon-button,
.admin-plain-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
}

.admin-plain-button {
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-plain-button.is-danger,
.admin-mini-button.is-danger {
  background: #fef2f2;
  color: #b91c1c;
}

.admin-button-icon,
.admin-kpi-icon,
.admin-empty-icon {
  width: 17px;
  height: 17px;
}

.admin-system-status {
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
}

.admin-system-status.is-ok {
  background: #ecfdf5;
  color: #047857;
}

.admin-system-status.is-warning,
.admin-system-status.is-loading {
  background: #fffbeb;
  color: #b45309;
}

.admin-system-status.is-critical,
.admin-system-status.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.admin-last-updated {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.admin-error-banner {
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 800;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.admin-kpi-card {
  min-height: 154px;
  padding: 18px;
  border-radius: 18px;
}

.admin-kpi-head,
.admin-provider-card-head,
.admin-queue-head,
.admin-section-head,
.admin-panel-head,
.admin-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-detail-header{flex-flow: column}

.admin-kpi-head span,
.admin-provider-card-head span,
.admin-queue-head span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
}

.admin-kpi-card strong {
  display: block;
  margin-top: 16px;
  font-size: 30px;
  line-height: 1;
}

.admin-kpi-card h2,
.admin-panel h2,
.admin-section-head h2,
.admin-detail-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.admin-kpi-card p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.admin-kpi-card.is-warning {
  border-color: #f59e0b;
}

.admin-kpi-card.is-critical,
.admin-kpi-card.is-error {
  border-color: #ef4444;
}

.admin-provider-grid,
.admin-tab-content {
  min-width: 0;
}

.admin-provider-grid {
  padding: 20px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.admin-provider-cards,
.admin-queue-grid,
.admin-error-group-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.admin-provider-cards {
  grid-template-columns: repeat(auto-fill, minmax(300px, 420px));
}

.admin-provider-secondary-row {
  grid-template-columns: repeat(4, minmax(260px, 1fr));
}

.admin-queue-grid,
.admin-error-group-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.admin-provider-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.admin-observability-guide {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(29, 78, 216, 0.14);
  border-radius: 12px;
  background: #f8fbff;
}

.admin-observability-guide summary {
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 700;
}

.admin-observability-guide div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 14px;
  margin-top: 10px;
}

.admin-observability-guide p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.admin-provider-group {
  margin-top: 22px;
}

.admin-provider-group-head,
.admin-provider-card-subline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-provider-group-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.admin-provider-group-head span,
.admin-provider-card-subline {
  color: #64748b;
  font-size: 12px;
}

.admin-provider-card-subline {
  margin-top: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.admin-provider-card,
.admin-queue-card,
.admin-error-card {
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
}

.admin-provider-card.is-ok,
.admin-provider-card.is-free_mode {
  border-color: rgba(16, 185, 129, 0.35);
}

.admin-provider-card.is-warning,
.admin-provider-card.is-not_configured,
.admin-provider-card.is-no_data {
  border-color: rgba(245, 158, 11, 0.42);
}

.admin-provider-card.is-error,
.admin-provider-card.is-critical {
  border-color: rgba(239, 68, 68, 0.48);
}

.admin-provider-values,
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.admin-provider-values.is-primary,
.admin-provider-values.is-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.admin-provider-values.is-secondary {
  margin-top: 10px;
}

.admin-detail-grid{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-detail-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-small-metric {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.admin-small-metric span {
  display: block;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
}

.admin-small-metric strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 14px;
}

.admin-small-metric.is-ok {
  border-color: rgba(16, 185, 129, 0.28);
}

.admin-small-metric.is-warning {
  border-color: rgba(245, 158, 11, 0.36);
}

.admin-small-metric.is-critical {
  border-color: rgba(239, 68, 68, 0.42);
}

.admin-small-metric.is-muted strong {
  color: #64748b;
}

.admin-provider-details {
  margin-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 10px;
}

.admin-provider-details summary {
  cursor: pointer;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.admin-provider-details p {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.admin-split-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.25fr) minmax(380px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.admin-panel {
  min-width: 0;
  padding: 18px;
  border-radius: 18px;
}

.admin-search-form {
  display: flex;
  min-width: 280px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.admin-search-form input {
  width: 100%;
  min-height: 38px;
  border: 0;
  padding: 0 12px;
  color: #0f172a;
  outline: 0;
}

.admin-search-form button {
  width: 42px;
  color: #2563eb;
  background: #eff6ff;
}

.admin-filter-row {
  margin: 16px 0;
}

.admin-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.admin-table-scroll {
  max-width: 100%;
  max-height: 680px;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.admin-table-scroll.compact {
  max-height: 360px;
}

.admin-data-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: #ffffff;
}

.admin-data-table--sessions {
  min-width: 980px;
}

.admin-data-table--users,
.admin-data-table--issues {
  min-width: 760px;
}

.admin-data-table--compact {
  min-width: 680px;
}

.admin-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
}

.admin-data-table td {
  padding: 12px;
  border-top: 1px solid #edf2f7;
  color: #334155;
  font-size: 13px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.admin-data-table tr.is-selected td {
  background: #eff6ff;
}

.admin-data-table td strong,
.admin-data-table td span {
  display: block;
}

.admin-data-table td span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.admin-link-button {
  color: #2563eb;
}

.admin-mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 30px;
  margin: 2px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f1f5f9;
}

.admin-status-badge {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: normal;
  width: fit-content;
}

.admin-status-badge.is-ok {
  background: #ecfdf5;
  color: #047857;
}

.admin-status-badge.is-processing {
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-status-badge.is-warning {
  background: #fffbeb;
  color: #b45309;
}

.admin-status-badge.is-critical {
  background: #fef2f2;
  color: #b91c1c;
}

.admin-diagnostics-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.admin-detail-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.admin-diagnostic-section {
  margin-top: 18px;
}

.admin-diagnostic-section h3,
.admin-technical-details summary {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.admin-stage-timeline,
.admin-funnel,
.admin-provider-usage-list,
.admin-two-columns {
  display: grid;
  gap: 10px;
}

.admin-stage-timeline,
.admin-provider-usage-list {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.admin-two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.admin-stage-card,
.admin-funnel-item,
.admin-usage-pill,
.admin-event-row,
.admin-reconcile-card,
.admin-provider-economics-row,
.admin-cost-day {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.admin-stage-card.is-warning,
.admin-reconcile-card.is-warning {
  border-color: #f59e0b;
  background: #fffbeb;
}

.admin-reconcile-card.is-ok {
  border-color: #86efac;
  background: #f0fdf4;
  margin-top: 10px;
}

.admin-stage-card strong,
.admin-funnel-item span,
.admin-event-row strong {
  display: block;
}

.admin-stage-card span,
.admin-stage-card small,
.admin-funnel-item small,
.admin-event-row span,
.admin-provider-card small,
.admin-reconcile-card span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-funnel {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-funnel-item div {
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.admin-funnel-item i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.admin-usage-pill {
  display: inline-flex;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #475569;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-technical-details {
  margin-top: 18px;
}

.admin-event-row {
  margin-top: 8px;
}

.admin-event-row code {
  display: block;
  max-width: 100%;
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.admin-error-card b {
  display: block;
  margin-top: 10px;
  color: #b91c1c;
  font-size: 24px;
}

.admin-provider-economics-row,
.admin-cost-day {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.admin-empty-panel {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #64748b;
  text-align: center;
}

.admin-empty-panel strong {
  color: #0f172a;
  font-size: 17px;
}

.admin-empty-inline {
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
}

.admin-skeleton-card,
.admin-table-skeleton i,
.admin-panel-skeleton i {
  display: block;
  min-height: 120px;
  border-radius: 18px;
  background: linear-gradient(90deg, #f1f5f9, #ffffff, #f1f5f9);
  background-size: 220% 100%;
  animation: admin-skeleton 1.2s infinite linear;
}

.admin-table-skeleton,
.admin-panel-skeleton {
  display: grid;
  gap: 10px;
}

.admin-table-skeleton i,
.admin-panel-skeleton i {
  min-height: 46px;
  border-radius: 12px;
}

@keyframes admin-skeleton {
  from { background-position: 0 0; }
  to { background-position: -220% 0; }
}

@media (max-width: 1180px) {
  .admin-split-layout,
  .admin-two-columns {
    grid-template-columns: 1fr;
  }

  .admin-detail-grid,
  .admin-detail-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-diagnostics-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .admin-cockpit {
    gap: 18px;
  }

  .admin-kpi-grid,
  .admin-provider-cards,
  .admin-queue-grid,
  .admin-error-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-detail-grid,
  .admin-detail-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panel {
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .admin-hero,
  .admin-section-head,
  .admin-panel-head,
  .admin-detail-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-hero-controls,
  .admin-period-toggle,
  .admin-tabs,
  .admin-search-form {
    width: 100%;
  }

  .admin-hero-controls,
  .admin-detail-actions,
  .admin-filter-row,
  .admin-row-actions {
    align-items: stretch;
  }

  .admin-period-toggle,
  .admin-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .admin-icon-button,
  .admin-plain-button {
    justify-content: center;
  }

  .admin-detail-actions .admin-plain-button,
  .admin-refresh-action {
    flex: 1 1 150px;
  }

  .admin-chip {
    flex: 1 1 auto;
    text-align: center;
  }

  .admin-kpi-grid,
  .admin-provider-cards,
  .admin-provider-secondary-row,
  .admin-queue-grid,
  .admin-error-group-grid,
  .admin-stage-timeline,
  .admin-provider-usage-list,
  .admin-funnel,
  .admin-two-columns {
    grid-template-columns: 1fr;
  }

  .admin-provider-values,
  .admin-detail-grid,
  .admin-detail-grid.compact {
    grid-template-columns: 1fr;
  }

  .admin-provider-card-head,
  .admin-queue-head {
    flex-wrap: wrap;
  }

  .admin-table-scroll {
    max-height: 560px;
  }
}

@media (max-width: 520px) {
  .admin-cockpit {
    gap: 14px;
  }

  .admin-hero,
  .admin-provider-grid,
  .admin-panel,
  .admin-kpi-card,
  .admin-provider-card,
  .admin-queue-card,
  .admin-error-card {
    border-radius: 14px;
  }

  .admin-hero,
  .admin-provider-grid,
  .admin-panel {
    padding: 14px;
  }

  .admin-hero-copy h1 {
    font-size: 26px;
  }

  .admin-kpi-card strong {
    font-size: 25px;
  }

  .admin-period-toggle,
  .admin-tabs {
    margin-right: -2px;
    margin-left: -2px;
  }

  .admin-search-form {
    min-width: 0;
  }

  .admin-detail-actions .admin-plain-button,
  .admin-filter-row .admin-chip,
  .admin-refresh-action {
    flex-basis: 100%;
  }
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-slate-900);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-slate-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ==========================================================================
   Dashboard Theme — Direct port from mvp.html reference (lighter palette)
   ========================================================================== */

/* ── Design tokens (посветлее: #1b65ff → #1b65ff) ────────────────────────── */
:root {
  --sb-bg:      #1b65ff;   /* lighter than mvp's #1b65ff            */
  --sb-accent:  #1b65ff;
  --content-bg: #f4f7fe;   /* exact match to mvp --main-bg           */
  --text-dark:  #2b3674;   /* mvp --text-dark                        */
  --text-gray:  #a3aed1;   /* mvp --text-gray                        */
}

/* ── Sidebar — direct port from mvp.html ─────────────────────────────────── */
.sidebar {
  background: var(--sb-bg);
  border-right: none;
  overflow: visible;     /* pseudo-elements must bleed beyond the sidebar */
  box-shadow: none;
  z-index: 20;
  padding-right: 0;      /* nav items flush to right edge */
}

.sidebar-logo {
  background: transparent;
  border-radius: 0;
}

.sidebar-brand { color: #ffffff; font-size: var(--text-base); letter-spacing: 0; }

/* ── Navigation ───────────────────────────────────────────────────────────── */
.sidebar-nav { overflow: visible; padding-right: 0; }

.sidebar-assist {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  padding: 24px 22px 0 0;
}

.sidebar-balance-card,
.sidebar-help-card {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-balance-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

.sidebar-balance-label,
.sidebar-balance-meta {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}

.sidebar-balance-value {
  display: block;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

.sidebar-balance-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.sidebar-balance-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.34);
  transition: width 0.25s ease;
}

.sidebar-balance-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  margin-top: 2px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  color: #1b65ff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(18, 76, 201, 0.16);
}

.sidebar-balance-button:hover,
.sidebar-balance-button:focus-visible {
  outline: none;
  background: #f8fbff;
}

.sidebar-help-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 14px 18px;
  text-decoration: none;
}

.sidebar-help-card:hover,
.sidebar-help-card:focus-visible {
  outline: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.sidebar-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
}

.sidebar-help-icon svg {
  width: 22px;
  height: 22px;
}

.sidebar-help-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.sidebar-help-copy strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}

.sidebar-help-copy span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}

.nav-section-label { color: rgba(255, 255, 255, 0.52); }

/* Inactive items — mvp style: no radius, semi-transparent white text */
.nav-item {
  color: rgba(255, 255, 255, 0.72);
  border-radius: 0;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-item svg  { color: rgba(255, 255, 255, 0.75); opacity: 1; }

.nav-item:hover:not(.is-active) {
  background: transparent;
  color: #ffffff;
}
.nav-item:hover:not(.is-active) svg { color: #ffffff; }

.nav-item.is-active {
  background: var(--content-bg);
  color: var(--sb-accent);
  font-weight: 500;
  border-radius: 30px 0 0 30px;
  position: relative;
  z-index: 1;
  /* reset any previous overrides */
  box-shadow: none;
  transform: none;
  animation: none;
  margin-right: 0;
  padding-right: var(--space-3);
  isolation: isolate;
}

.nav-item.is-active svg { color: var(--sb-accent); opacity: 1; }


.nav-item.is-active::before {
  content: '';
  position: absolute;
  top: -30px;
  right: 0px;
  width: 30px;
  height: 30px;
  background: transparent;
  border-bottom-right-radius: 30px;
  box-shadow: 15px 15px 0 15px var(--content-bg);
  pointer-events: none;
  z-index: 2;
}

.nav-item.is-active::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: 0;
  width: 30px;
  height: 30px;
  background: transparent;
  border-top-right-radius: 30px;
  box-shadow: 15px -15px 0 15px var(--content-bg);
  pointer-events: none;
  z-index: 2;
}

/* ── Main content area ───────────────────────────────────────────────────── */
.main-content { background: var(--content-bg); }

.page-body {
  background: transparent;
  padding: var(--space-6) 0;
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  height: 64px;
  /* Make topbar a full-width flex row */
  display: flex;
  align-items: center;

  gap: var(--space-4);
}

.topbar-heading { flex: 1; }

.topbar-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #2b3674;
  letter-spacing: -0.01em;
}

/* ── Topbar right section — port from mvp.html header-actions ───────────── */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* Circular icon buttons */
.topbar-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--text-gray);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}

.topbar-icon-btn svg { width: 20px; height: 20px; }

.topbar-menu-toggle {
  display: none;
}

.topbar-icon-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  color: var(--text-dark);
}

@media (min-width: 901px) {
  .sidebar {
    position: relative;
    width: var(--sidebar-collapsed-width);
    flex: 0 0 var(--sidebar-collapsed-width);
    padding: 18px 0 28px 12px;
    overflow-x: visible;
    overflow-y: auto;
    transition: width 0.22s ease, flex-basis 0.22s ease, margin-right 0.22s ease, box-shadow 0.22s ease;
    scrollbar-width: thin;
  }

  .sidebar-header {
    position: relative;
    display: block;
    min-height: 154px;
    margin-bottom: 6px;
    padding: 0;
  }

  .sidebar-logo,
  .sidebar-logo-compact {
    position: absolute;
    will-change: opacity;
    transition:
      opacity 0.16s ease,
      visibility 0s linear 0.16s;
  }

  .sidebar-logo {
    display: block;
    width: 180px;
    min-width: 180px;
    max-width: none;
    height: auto;
    top: 22px;
    left: 20px;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transform-origin: center;
    visibility: hidden;
  }

  .sidebar-brand {
    position: absolute;
    top: 78px;
    left: 20px;
    display: block;
    max-height: 0;
    width: max-content;
    overflow: hidden;
    opacity: 0;
    transform: none;
    transition:
      opacity 0.16s ease,
      visibility 0s linear 0.16s;
    visibility: hidden;
  }

  .sidebar-logo-compact {
    display: block;
    width: 44px;
    height: 44px;
    top: 0;
    left: 4px;
    object-fit: contain;
    background: white;
    padding: 7px;
    border-radius: 17px;
    opacity: 1;
    transform: none;
    transform-origin: center;
    visibility: visible;
  }

  .sidebar-toggle-button {
    display: inline-flex;
    position: absolute;
    top: 104px;
    left: 11px;
    z-index: 3;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.16);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease;
  }

  .sidebar-toggle-button:hover,
  .sidebar-toggle-button:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
  }

  .sidebar-toggle-button svg {
    width: 19px;
    height: 19px;
    transition: transform 0.22s ease;
  }

  body.sidebar-open .sidebar-toggle-button svg {
    transform: rotate(180deg);
  }

  .sidebar-close-button {
    display: none;
  }

  .sidebar-nav {
    gap: 6px;
    padding-right: 0;
  }

  .nav-section-label {
    display: none;
  }

  .nav-item {
    min-height: 48px;
    justify-content: center;
    gap: 0;
    padding: 12px 13px;
    border-radius: 22px 0 0 22px;
    font-size: 0;
    line-height: 0;
    white-space: nowrap;
  }

  .nav-item svg {
    width: 24px;
    height: 24px;
  }

  .nav-item.is-active {
    border-radius: 22px 0 0 22px;
    padding-right: 13px;
  }

  .nav-item.is-active::before,
  .nav-item.is-active::after {
    content: none;
  }

  #nav-admin {
    margin-top: 0;
  }

  .sidebar-assist {
    display: flex;
    margin-top: auto;
    padding: 0 18px 0 4px;
  }

  .sidebar-balance-card {
    display: none;
  }

  .sidebar-help-card {
    width: 44px;
    min-height: 44px;
    justify-content: center;
    gap: 0;
    border-radius: 999px;
    padding: 0;
  }

  .sidebar-help-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-width: 1px;
  }

  .sidebar-help-copy {
    display: none;
  }

  .main-content {
    min-width: 0;
    padding: 32px clamp(24px, 3vw, 44px);
  }

  .topbar {
    margin-bottom: 32px;
  }

  body.sidebar-open .sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    padding: 18px 0 40px 20px;
  }

  body.sidebar-open .sidebar-header {
    min-height: 154px;
    margin-bottom: 6px;
    padding: 0;
  }

  body.sidebar-open .sidebar-toggle-button {
    left: 3px;
  }

  body.sidebar-open .sidebar-logo {
    display: block;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
    visibility: visible;
  }

  body.sidebar-open .sidebar-logo-compact {
    display: block;
    opacity: 0;
    pointer-events: none;
    transform: none;
    visibility: hidden;
  }

  body.sidebar-open .sidebar-brand,
  body.sidebar-open .nav-section-label {
    display: block;
  }

  body.sidebar-open .sidebar-brand {
    max-height: 28px;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
    visibility: visible;
  }

  body.sidebar-open .nav-item {
    justify-content: flex-start;
    gap: var(--space-3);
    min-height: auto;
    padding: var(--space-4) var(--space-3);
    border-radius: 0;
    font-size: 16px;
    line-height: 1.5;
  }

  body.sidebar-open .nav-item.is-active {
    border-radius: 30px 0 0 30px;
    padding-right: var(--space-3);
  }

  body.sidebar-open .nav-item.is-active::before,
  body.sidebar-open .nav-item.is-active::after {
    content: '';
  }

  body.sidebar-open .sidebar-assist {
    display: flex;
    padding: 24px 22px 0 0;
  }

  body.sidebar-open .sidebar-balance-card {
    display: flex;
  }

  body.sidebar-open .sidebar-help-card {
    width: auto;
    min-height: 70px;
    justify-content: flex-start;
    gap: 14px;
    border-radius: 16px;
    padding: 14px 18px;
  }

  body.sidebar-open .sidebar-help-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-width: 2px;
  }

  body.sidebar-open .sidebar-help-copy {
    display: flex;
  }
}

@media (min-width: 901px) and (max-width: 1599px) {
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    border: 0;
    background: rgba(15, 23, 42, 0.24);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    margin-right: calc(var(--sidebar-collapsed-width) - var(--sidebar-width));
    z-index: 100;
    box-shadow: 24px 0 52px rgba(15, 23, 42, 0.22);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (min-width: 1600px) {
  body.sidebar-open .sidebar {
    margin-right: 0;
    box-shadow: none;
  }
}

.topbar-logout {
  color: var(--text-gray);
}

/* Thin divider */
.topbar-divider {
  width: 1px;
  height: 28px;
  background: rgba(0, 0, 0, 0.08);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Profile pill */
.topbar-user-profile {
  border: none;
  background: #ffffff;
  padding: 5px 14px 5px 5px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  cursor: default;
}

.topbar-dropdown {
  position: relative;
}

.topbar-notification-trigger {
  position: relative;
}

.topbar-notification-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px #ffffff;
}

.topbar-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.topbar-menu-head,
.topbar-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #edf2f7;
}

.topbar-menu-kicker {
  display: block;
  margin-bottom: 3px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar-menu-link {
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.topbar-notifications-list {
  display: grid;
  gap: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

.topbar-notification-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  width: 100%;
  padding: 12px 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.topbar-notification-item:last-child {
  border-bottom: none;
}

.topbar-notification-item:hover,
.topbar-notification-item:focus-visible {
  background: #f8fafc;
  outline: none;
}

.topbar-notification-item.is-unread {
  background: #f8fbff;
}

.topbar-notification-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
}

.topbar-notification-icon svg {
  width: 17px;
  height: 17px;
}

.topbar-notification-icon.is-success {
  background: #ecfdf5;
  color: #059669;
}

.topbar-notification-icon.is-warning {
  background: #fffbeb;
  color: #d97706;
}

.topbar-notification-icon.is-error {
  background: #fef2f2;
  color: #dc2626;
}

.topbar-notification-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.topbar-notification-copy strong {
  color: #0f172a;
  font-size: 12px;
}

.topbar-notification-copy span {
  color: #64748b;
}

.topbar-notification-copy time {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
}

.topbar-notification-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.topbar-notification-empty svg {
  width: 17px;
  height: 17px;
}

.topbar-account-menu {
  padding-bottom: 10px;
}

.topbar-account-head {
  justify-content: flex-start;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.topbar-account-head strong,
.topbar-account-head span {
  display: block;
}

.topbar-account-head span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.topbar-user-avatar.is-large {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.topbar-limit-card {
  margin: 12px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border: 1px solid #dbeafe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.topbar-limit-card:hover,
.topbar-limit-card:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  outline: 0;
}

.topbar-limit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.topbar-limit-row strong {
  color: #0f172a;
}

.topbar-limit-track {
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

.topbar-limit-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transition: width 0.35s ease;
}

.topbar-account-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 24px);
  min-height: 40px;
  margin: 4px 12px;
  padding: 0 13px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.topbar-account-action svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.topbar-account-action:hover {
  background: #eff7ff;
  text-decoration: none;
}

.topbar-account-action.is-danger {
  color: #dc2626;
}

.topbar-user-profile.is-clickable {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}

.topbar-user-profile.is-clickable:hover,
.topbar-user-profile.is-clickable:focus-visible {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: rgba(37, 99, 235, 0.12);
  outline: none;
}

.topbar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sb-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
}

.topbar-user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.topbar-user-email {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.topbar-user-credits {
  font-size: 11px;
  color: var(--text-gray);
  font-weight: 500;
}

/* ── Lead Generator workspace ───────────────────────────────────────────── */
.leadgen-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
}

.leadgen-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.leadgen-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.search-filters-card,
.search-results-panel {
  min-width: 0;
  max-width: 100%;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(22, 37, 76, 0.07);
}

.search-filters-card {
  padding: 24px 22px 22px;
  position: sticky;
  top: 0;
  overflow: visible;
}

.search-results-panel {
  padding: 24px;
  min-height: 720px;
  background:
    radial-gradient(circle at top right, rgba(27, 101, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.search-filters-header,
.search-results-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-filters-kicker {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(27, 101, 255, 0.08);
  color: var(--sb-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-filters-title,
.search-results-title {
  font-size: 24px;
  line-height: 1.12;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.search-filters-subtitle,
.search-results-subtitle {
  font-size: 14px;
  color: #7b88ad;
  line-height: 1.65;
}

.search-filters-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
  min-height: 0;
  padding-bottom: 8px;
}

.filter-group,
.filter-accordion {
  border-radius: 22px;
  border: 1px solid #e3e9f3;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.filter-group {
  padding: 18px;
}

.filter-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.filter-group-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f4f7fe;
  color: #64748b;
}

.filter-group-icon svg {
  width: 18px;
  height: 18px;
}

.filter-group-title,
.filter-group-subtitle {
  display: block;
}

.filter-group-title {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.filter-group-subtitle {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.filter-selected-summary {
  display: inline-flex;
  align-items: center;
  max-width: 210px;
  min-height: 24px;
  margin-top: 8px;
  padding: 0 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-selected-summary.is-empty {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.filter-selected-summary.is-error,
.filter-accordion.has-error .filter-selected-summary {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.filter-accordion.has-error .filter-accordion-chevron {
  color: #dc2626;
  background: #fef2f2;
}

.filter-accordion {
  overflow: visible;
}

.filter-accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  cursor: pointer;
}

.filter-accordion-summary::-webkit-details-marker {
  display: none;
}

.filter-accordion-chevron {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: transparent;
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.filter-accordion-chevron svg {
  width: 16px;
  height: 16px;
}

.filter-accordion[open] .filter-accordion-chevron {
  transform: rotate(180deg);
  color: #2563eb;
  background: rgba(59, 130, 246, 0.08);
}

.filter-accordion-body {
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-grid-two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.filter-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #7c8ab8;
}

.filter-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: #eef4ff;
  border: 1px solid #dbe7ff;
}

.filter-mode-option {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  background: transparent;
  color: #64748b;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.filter-mode-option:hover {
  color: #1d4ed8;
}

.filter-mode-option[aria-pressed="true"] {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.filter-field-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.filter-field-error::before {
  content: '!';
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.filter-control {
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: #f4f7fe;
  color: #0f172a;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.filter-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: #ffffff;
}

.filter-field.is-invalid .filter-control,
.filter-control[aria-invalid="true"] {
  border-color: #f87171;
  background: #fffafa;
}

.filter-field.is-invalid .filter-control:focus,
.filter-control[aria-invalid="true"]:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.filter-static-value {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: #f4f7fe;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}

.filter-select-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.filter-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.tom-select-shell::after {
  display: none;
}

.filter-number {
  appearance: textfield;
}

.filter-number::-webkit-outer-spin-button,
.filter-number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ts-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-sans);
  padding: 0!important;
}

.ts-wrapper.dropdown-active,
.ts-wrapper.focus {
  z-index: 3500;
}

.ts-wrapper.form-control,
.ts-wrapper.single,
.ts-wrapper.multi {
  border: none;
  box-shadow: none;
}

.ts-wrapper .ts-control {
  position: relative;
  display: flex;
  align-items: center;
  align-content: center;
  flex-wrap: nowrap;
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: #f4f7fe;
  box-shadow: none;
  padding: 10px 42px 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ts-wrapper .ts-control:hover {
  border-color: #d4ddf3;
}

.ts-wrapper.focus .ts-control {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: #ffffff;
}

.ts-wrapper.single .ts-control::after {
  border: none;
  width: 10px;
  height: 10px;
  margin: 0;
  right: 16px;
  top: 50%;
  transform: translateY(-65%) rotate(45deg);
  border-right: 2px solid #7c8ab8;
  border-bottom: 2px solid #7c8ab8;
}

.ts-wrapper.single.input-active .ts-control::after,
.ts-wrapper.single.dropdown-active .ts-control::after {
  transform: translateY(-35%) rotate(-135deg);
}

.ts-wrapper .ts-control input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 14px;
  color: var(--text-dark);
}

.ts-wrapper.single .ts-control > .item {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-wrapper.single.has-items:not(.focus) .ts-control > input {
  display: none !important;
}

.ts-wrapper.single.focus.has-items .ts-control > input {
  flex: 0 1 56px !important;
  width: 56px !important;
  min-width: 2px !important;
  display: inline-block !important;
}

.ts-wrapper.single.focus.has-items .ts-control > .item {
  width: auto;
  opacity: 1;
  pointer-events: auto;
}

.ts-wrapper.multi.has-items .ts-control > .item {
  display: none !important;
}

.ts-wrapper.multi .ts-control {
  flex-wrap: nowrap;
}

.ts-wrapper.multi.has-items .ts-control > input {
  display: inline-block !important;
}

.ts-wrapper .ts-control input::placeholder {
  color: #8fa0c8;
}

.ts-wrapper.disabled,
.ts-wrapper.disabled .ts-control {
  opacity: 1;
}

.ts-wrapper.disabled .ts-control {
  background: linear-gradient(180deg, #f5f7fc 0%, #eef3fb 100%);
  border-color: #e1e7f5;
  color: #9aa9ca;
  cursor: not-allowed;
}

.ts-wrapper .ts-dropdown,
.ts-dropdown {
  position: absolute;
  z-index: 3500;
  margin-top: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

.ts-wrapper .ts-dropdown .option,
.ts-wrapper .ts-dropdown .create,
.ts-wrapper .ts-dropdown .no-results,
.ts-dropdown .option,
.ts-dropdown .create,
.ts-dropdown .no-results {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-dark);
}

.ts-wrapper .ts-dropdown .option.active,
.ts-dropdown .option.active {
  background: rgba(27, 101, 255, 0.08);
  color: var(--sb-accent);
}

.ts-wrapper .ts-dropdown .option.selected,
.ts-dropdown .option.selected {
  background: rgba(27, 101, 255, 0.12);
  color: var(--sb-accent);
}

.ts-wrapper .ts-dropdown .no-results,
.ts-dropdown .no-results {
  color: #7c8ab8;
}

.ts-wrapper .ts-dropdown .ts-dropdown-content,
.ts-dropdown .ts-dropdown-content {
  max-height: min(360px, 42vh);
  overflow-y: auto;
}

.search-submit-button {
  margin-top: 4px;
  width: 100%;
  align-self: stretch;
  position: sticky;
  bottom: 0;
  z-index: 2;
  border: none;
  border-radius: 18px;
  min-height: 56px;
  padding: 0 18px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  z-index: 1000;
}

.search-form-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff7f7 0%, #fef2f2 100%);
  color: #991b1b;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.08);
}

.search-form-error::before {
  content: '!';
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.search-submit-button svg {
  width: 18px;
  height: 18px;
}

.search-submit-button:hover {
  box-shadow: 0 24px 36px rgba(37, 99, 235, 0.28);
  filter: saturate(1.05);
}

.search-results-header {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.search-results-copy {
  min-width: 0;
  max-width: 640px;
}

.search-results-summary {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #dde6fb;
  color: #0f172a;
  backdrop-filter: blur(10px);
}

.search-results-summary-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--sb-accent);
}

.search-results-summary-meta {
  font-size: 12px;
  font-weight: 700;
  color: #7c8ab8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-results-summary-divider {
  width: 1px;
  height: 18px;
  background: #d9e2f5;
  margin: 0 2px;
}

.search-results-surface {
  min-width: 0;
  max-width: 100%;
  min-height: 620px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(219, 228, 243, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(247, 250, 255, 0.98) 100%);
}

.search-empty-state {
  min-height: 560px;
  border-radius: 24px;
  border: 1px dashed #d5def6;
  background:
    radial-gradient(circle at top right, rgba(27, 101, 255, 0.07), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #f6f8fd 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px;
}

.search-empty-illustration {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 101, 255, 0.1);
  color: var(--sb-accent);
  margin-bottom: 18px;
}

.search-empty-illustration.is-loading {
  background: rgba(27, 101, 255, 0.08);
}

.search-loader-ring {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 3px solid rgba(27, 101, 255, 0.15);
  border-top-color: var(--sb-accent);
  animation: search-spin 0.8s linear infinite;
}

.search-empty-illustration svg {
  width: 42px;
  height: 42px;
}

.search-empty-title {
  max-width: 560px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-dark);
}

.search-empty-subtitle {
  max-width: 520px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #8793b8;
}

.search-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.search-skeleton-list {
  width: min(100%, 720px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}

.search-skeleton-card {
  height: 92px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(243, 246, 255, 0.95) 0%, rgba(232, 238, 252, 0.9) 50%, rgba(243, 246, 255, 0.95) 100%);
  background-size: 200% 100%;
  animation: search-shimmer 1.2s ease-in-out infinite;
}

.lead-results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

@keyframes search-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.lead-company-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-radius: 24px;
  border: none!important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  padding: 20px;
}

.lead-company-identity {
  display: flex;
  gap: 14px;
  min-width: 0;
}

.lead-company-avatar {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lead-company-avatar.is-image {
  background: #f4f7ff;
  overflow: hidden;
  border: 1px solid rgba(220, 228, 247, 0.95);
}

.lead-company-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lead-company-meta {
  min-width: 0;
}

.lead-company-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}


.lead-company-location {
  margin-top: 5px;
  color: #8793b8;
  font-size: 14px;
}

.lead-company-action,
.lead-contact-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 14px;
  background: #f8fbff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.lead-company-action svg,
.lead-contact-action svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.lead-company-action:hover,
.lead-contact-action:hover {
  text-decoration: none;
  box-shadow: 0 10px 18px rgba(43, 54, 116, 0.08);
  border-color: #cfd9f5;
}

.lead-company-action.is-muted,
.lead-contact-action.is-muted {
  color: #97a3c6;
  background: #fbfcff;
}

.lead-contact-card {
  background: #f8fbff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-contact-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.lead-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-textarea {
  min-height: 75px;
  padding: 12px 16px;
  resize: vertical;
}

@media (max-width: 1180px) {
  .leadgen-layout {
    grid-template-columns: 1fr;
  }

  .search-filters-card {
    position: static;
  }

  .search-submit-button {
    position: static;
  }

  .search-results-header {
    flex-direction: column;
  }

  .filter-grid-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-layout {
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, calc(100vw - 54px));
    max-width: calc(100vw - 54px);
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px 0 24px 18px;
    overflow-x: visible;
    overflow-y: auto;
    transform: translateX(-104%);
    transition: transform 0.24s ease;
    scrollbar-width: thin;
  }

  .sidebar-header {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 28px;
    padding: var(--space-5) var(--space-5) var(--space-4);
    padding-left: 14px;
  }

  .sidebar-close-button {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.18);
    color: rgba(255, 255, 255, 0.92);
  }

  .sidebar-close-button svg {
    width: 18px;
    height: 18px;
  }

  .sidebar-logo {
    width: min(160px, calc(100% - 16px));
  }

  .sidebar-brand {
    display: block;
  }

  .sidebar-nav {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    overflow: visible;
    padding-right: 0;
  }

  .sidebar-nav > span,
  #nav-admin-section {
    display: block;
  }

  .nav-section-label {
    display: block;
  }

  .nav-item {
    width: 100%;
    min-height: 46px;
    padding: 12px var(--space-3);
    border-radius: 0;
    white-space: normal;
  }

  .nav-item.is-active {
    border-radius: 24px 0 0 24px;
    background: var(--content-bg);
    color: var(--sb-accent);
    padding-right: var(--space-3);
  }

  .nav-item.is-active::before,
  .nav-item.is-active::after {
    content: none;
  }

  #nav-admin {
    margin-top: 0;
  }

  .sidebar-assist {
    display: flex;
    padding-right: 18px;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: block;
    border: 0;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    z-index: 10000;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .search-results-page-nav.is-result-page{
    display: flex;
    flex-flow: column;
  }

  .topbar-menu-toggle {
    display: inline-flex;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .topbar-menu-toggle {
    grid-column: 1;
    grid-row: 1;
  }

  .topbar-right {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .topbar-heading {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .main-content {
    width: 100%;
    min-width: 0;
    padding: 26px 18px;
    overflow: visible;
  }

  .page-body {
    padding: 12px 0 24px;
  }

  .topbar {
    height: auto;
    margin-bottom: 24px;
  }

}

@media (max-width: 640px) {
  .sidebar {
    width: min(300px, calc(100vw - 42px));
    max-width: calc(100vw - 42px);
    padding: 18px 0 18px 14px;
  }

  .sidebar-logo {
    width: min(145px, calc(100% - 16px));
  }

  .nav-item {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
  }

  .main-content {
    padding: 18px 12px;
  }

  .topbar-title {
    font-size: 24px;
  }

  .auth-name-grid,
  .account-settings-grid {
    grid-template-columns: 1fr;
  }

  .account-settings-modal {
    padding: 12px;
  }

  .account-settings-dialog {
    max-height: calc(100dvh - 24px);
    padding: 18px;
  }

  .search-filters-card,
  .search-results-panel {
    border-radius: 24px;
  }

  .search-results-surface {
    padding: 14px;
  }
}

/* ── Leadgen UI override pack ────────────────────────────────────────────── */
.search-filters-card {
  top: 0;
  max-height: calc(100dvh - 200px);
  overflow-y: auto;
  overflow-x: visible;
  align-self: start;
  padding-bottom: 18px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  scroll-padding-bottom: 92px;
}

.search-filters-card::-webkit-scrollbar {
  width: 6px;
}

.search-filters-card::-webkit-scrollbar-track {
  background: transparent;
}

.search-filters-card::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.filter-accordion {
  border-radius: 24px;
  background: #ffffff;
  overflow: visible;
}

.filter-accordion-summary {
  padding: 16px 16px 16px;
}

.filter-group-icon {
  border-radius: 14px;
  background: #eff6ff;
  color: #3b82f6;
}

.filter-group-icon > *,
.filter-accordion-chevron > *,
.filter-tooltip-trigger > *,
.search-empty-illustration > *,
.lead-company-chevron > *,
.lead-company-action > *,
.lead-contact-action > * {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.filter-group-icon > *,
.filter-accordion-chevron > *,
.filter-tooltip-trigger > *,
.search-empty-illustration > *,
.lead-company-chevron > *,
.lead-company-action > *,
.lead-contact-action > * {
  stroke-width: 1.8;
}

.filter-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-tooltip {
  position: relative;
  display: inline-flex;
  z-index: 12;
}

.filter-tooltip-trigger {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  transition: color 0.18s ease, background 0.18s ease;
}

.filter-tooltip-trigger:hover,
.filter-tooltip-trigger:focus-visible {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  outline: none;
}

.filter-tooltip-panel {
  display: none;
}

.filter-tooltip-portal {
  position: fixed;
  width: min(260px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
  transform: translateY(6px) scale(0.96);
  transform-origin: left bottom;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2500;
}

.filter-tooltip-portal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.filter-tooltip-portal.is-below {
  transform-origin: left top;
}

.filter-tooltip-portal::after {
  content: '';
  position: absolute;
  top: calc(100% - 2px);
  left: calc(var(--filter-tooltip-arrow-left, 18px) + 10px);
  width: 18px;
  height: 10px;
  background: #0f172a;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  border-radius: 0 0 10px 10px;
  transform: translateX(-50%);
}

.filter-tooltip-portal.is-below::after {
  top: auto;
  bottom: calc(100% - 2px);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  border-radius: 10px 10px 0 0;
}

.filter-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.filter-tag-label {
  display: inline-block;
}

.filter-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.12);
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.filter-tag-remove:hover,
.filter-tag-remove:focus-visible {
  background: rgba(29, 78, 216, 0.2);
}

.filter-tag-placeholder {
  background: #eef2ff;
  color: #64748b;
}

.lead-company-card {
  border-radius: 28px;
  overflow: hidden;
}

.lead-company-card > summary {
  list-style: none;
}

.lead-company-card > summary::-webkit-details-marker {
  display: none;
}

.lead-company-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  cursor: pointer;
}

.lead-company-summary-main {
  min-width: 0;
  flex: 1 1 auto;
}

.lead-company-summary-side {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.lead-company-summary-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.lead-company-chevron {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.lead-company-card[open] .lead-company-chevron {
  transform: rotate(180deg);
}

.lead-company-body {
  padding: 0 24px 24px;
  display: grid;
  gap: 18px;
  border-top: 1px solid rgba(219, 228, 243, 0.95);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.9) 0%, #ffffff 100%);
}

.lead-company-body-head {
  padding-top: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.lead-company-contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lead-company-people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.lead-company-avatar {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 999px;
  font-size: 22px;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.16);
}

.lead-company-avatar.is-image,
.lead-contact-avatar.is-image {
  border-radius: 999px;
}

.lead-company-avatar.is-image {
  background: #ffffff;
  border: 2px solid rgba(219, 228, 243, 0.95);
}

.lead-company-avatar-image {
  border-radius: 999px;
}

.lead-company-title-row {
  gap: 8px;
}

.lead-company-inline-note {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.lead-company-inline-note.is-danger {
  color: #b91c1c;
  background: #fef2f2;
}

.lead-company-action,
.lead-contact-action {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
}

.lead-company-action > *,
.lead-contact-action > * {
  width: 16px;
  height: 16px;
}

.lead-contact-card {
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.lead-contact-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lead-contact-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lead-contact-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.14);
}

.lead-contact-avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 999px;
}

.lead-company-empty-state {
  border: 1px dashed #d7e2f3;
  border-radius: 20px;
  padding: 18px;
  background: #fbfdff;
}

@media (max-width: 1180px) {
  .search-filters-card {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .lead-company-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-company-summary-side {
    justify-content: space-between;
  }

  .lead-company-summary-stats {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .lead-company-body {
    padding: 0 18px 18px;
  }

  .lead-company-summary {
    padding: 18px;
  }

  .lead-company-body-head {
    flex-direction: column;
  }

}

@media (max-width: 640px) {
  .lead-company-summary-side {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-company-people {
    grid-template-columns: 1fr;
  }
}

/* ── Results workspace: musalova reference-aligned override ─────────────── */
.search-results-panel {
  padding: 0;
  min-height: auto;
  background: transparent;
  border: none;
  box-shadow: none;
}

.search-results-header {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.search-results-copy {
  max-width: 640px;
}

.search-results-title {
  font-size: 30px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-top: 8px;
}

.search-results-subtitle {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 500;
  color: #64748b;
}

.search-results-summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  backdrop-filter: none;
}

.search-progress-panel {
  --search-progress: 0%;
  position: relative;
  width: 100%;
  overflow: visible;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.search-progress-fill,
.search-progress-stripes {
  position: absolute;
  left: 0;
  pointer-events: none;
  transition: width 0.75s ease;
}

.search-progress-fill {
  top: 0;
  bottom: 0;
  width: var(--search-progress);
  border-radius: 16px 0 0 16px;
  background: rgba(239, 246, 255, 0.78);
}

.search-progress-stripes {
  bottom: 0;
  height: 1.5px;
  width: var(--search-progress);
  background: linear-gradient(90deg, #2563eb 0 25%, #93c5fd 25% 50%, #2563eb 50% 75%, #93c5fd 75% 100%);
  background-size: 26px 2px;
}

.search-progress-panel.is-active .search-progress-stripes {
  animation: progress-stripes-move 0.85s linear infinite;
}

.search-progress-panel:not(.is-active) .search-progress-stripes {
  display: none;
  animation: none;
}

.search-progress-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 12px 10px 14px;
}

.search-progress-left,
.search-progress-right,
.search-progress-funnel,
.search-progress-funnel-item,
.search-progress-status,
.search-progress-reasons-btn {
  display: flex;
  align-items: center;
}

.search-progress-left {
  min-width: 0;
  gap: 12px;
}

.search-progress-right {
  flex-shrink: 0;
  gap: 10px;
}

.search-progress-status {
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 16px;
  background: #ffffff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.search-progress-status > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
}

.search-progress-status.is-active > span {
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.search-progress-divider {
  width: 1px;
  height: 24px;
  background: rgba(147, 197, 253, 0.45);
}

.search-progress-funnel {
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.search-progress-funnel-item {
  gap: 4px;
  white-space: nowrap;
}

.search-progress-funnel-item strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.search-progress-arrow {
  display: inline-flex;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.search-progress-percent {
  color: #2563eb;
  font-size: 13px;
  font-weight: 950;
}

.search-progress-stage {
  min-height: 26px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.search-progress-reasons {
  position: relative;
}

.search-progress-reasons-btn {
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.search-progress-reasons-btn svg {
  width: 14px;
  height: 14px;
}

.search-progress-reasons-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  width: 340px;
  max-width: calc(100vw - 48px);
  padding: 8px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
}

.search-progress-reasons-head {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-progress-reason-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border-radius: 12px;
}

.search-progress-reason-item:hover {
  background: #f8fafc;
}

.search-progress-reason-item svg {
  width: 16px;
  height: 16px;
  color: #94a3b8;
}

.search-progress-reason-item strong,
.search-progress-reason-item span {
  display: block;
}

.search-progress-reason-item strong {
  color: #334155;
  font-size: 11px;
}

.search-progress-reason-item span {
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 650;
}

@keyframes progress-stripes-move {
  from { background-position: 0 0; }
  to { background-position: 26px 0; }
}

@keyframes lead-crm-fade-in {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.search-results-summary-top,
.search-results-summary-bottom,
.search-results-summary-stages,
.search-results-summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.search-results-action-bar {
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 20px 20px 0 0;
  background: rgba(248, 250, 252, 0.7);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.search-results-action-bar .search-results-summary-actions {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  flex-wrap: wrap;
}

.search-results-summary-actions-left,
.search-results-summary-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.search-results-summary-actions-right {
  justify-content: flex-end;
  margin-left: auto;
}

.search-results-select-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #dbe5f5;
  border-radius: 16px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.search-results-select-page-btn:hover,
.search-results-select-page-btn:focus-visible {
  border-color: #93c5fd;
  color: #2563eb;
  outline: none;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
}

.search-results-select-page-btn.is-active {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.search-results-select-page-box {
  width: 16px;
  height: 16px;
  min-width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  color: #ffffff;
  line-height: 0;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.search-results-select-page-btn.is-active .search-results-select-page-box {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.16);
}

.search-results-select-page-box > * {
  width: 12px;
  height: 12px;
  display: block;
  stroke-width: 3;
}

.search-results-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.search-results-page-nav.is-result-page {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.search-results-bottom-pagination {
  display: flex;
  justify-content: center;
  padding: 4px 0 22px;
}

.search-results-bottom-pagination.hidden {
  display: none;
}

.search-results-bottom-pagination .search-results-page-nav {
  width: 100%;
}

.search-results-page-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-slate-600);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.search-results-page-nav-label svg {
  width: 15px;
  height: 15px;
}

.search-results-page-arrow {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--color-slate-600);
  cursor: pointer;
}

.search-results-page-arrow:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-primary);
}

.search-results-page-arrow:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.search-results-page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
}

.search-results-page-showing {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.search-results-page-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.search-results-page-number,
.search-results-page-ellipsis {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

.search-results-page-number {
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  cursor: pointer;
}

.search-results-page-number:hover:not(:disabled) {
  border-color: #bfdbfe;
  background: #ffffff;
  color: #1d4ed8;
}

.search-results-page-number.is-active {
  border-color: #2563eb;
  background: #3b82f6;
  color: #ffffff;
  cursor: default;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.32);
}

.search-results-page-number.is-loading {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
}

.search-results-page-ellipsis {
  color: #94a3b8;
}

.search-results-page-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(37, 99, 235, 0.22);
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

.search-results-page-size {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.search-results-page-size select {
  height: 40px;
  min-width: 68px;
  padding: 0 34px 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #1e293b;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.search-results-page-current {
  min-width: 118px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 10px;
  color: var(--color-slate-500);
  line-height: 1.1;
}

.search-results-page-btn-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-results-page-btn-range {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search-results-summary-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.search-results-summary-box.is-total {
  padding: 6px 16px;
  background: #ffffff;
}

.search-results-summary-box.is-error {
  background: #fff1f2;
  border-color: #fecdd3;
}

.search-results-summary-number {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  color: #2563eb;
}

.search-results-summary-label {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.search-results-summary-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  color: #16a34a;
}

.search-results-summary-icon > * {
  width: 14px;
  height: 14px;
}

.search-results-summary-text {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.search-results-summary-box.is-error .search-results-summary-text {
  color: #be123c;
}

.search-results-summary-badge,
.search-results-summary-stage {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.search-results-summary-badge.is-progress {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #2563eb;
}

.search-results-summary-stage {
  min-height: 26px;
  padding: 0 9px;
  font-size: 10px;
}

.search-results-summary-cancel {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff1f2;
  color: #be123c;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 10px;
}

.search-results-summary-cancel:hover {
  background: #ffe4e6;
}

.search-results-summary-cancel:disabled {
  cursor: wait;
  opacity: 0.72;
}

.search-results-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: normal;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.search-results-export-btn:hover:not(:disabled) {
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.14);
}

.search-results-export-btn:disabled {
  color: #94a3b8;
  border-color: #e2e8f0;
  background: #f8fafc;
  box-shadow: none;
  cursor: not-allowed;
}

.search-results-continue-btn {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 54%, #7c3aed 100%);
  color: #ffffff;
}

.search-results-continue-btn:hover:not(:disabled) {
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.34);
}

.search-results-export-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-results-export-icon > * {
  width: 16px;
  height: 16px;
}

.search-results-export-btn[data-loading="true"] .search-results-export-icon > * {
  animation: search-spin 0.8s linear infinite;
}

.search-results-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 18px;
  margin-top: -14px;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 20px 20px;
  background:white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.search-results-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.search-results-toolbar-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.search-results-toolbar-copy.is-compact {
  flex-direction: column;
  align-items: flex-start;
}

.search-results-toolbar-kicker {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  color: #64748b;
}

.search-results-toolbar-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.search-results-toolbar-count {
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
  color: #0f172a;
}

.search-results-toolbar-title {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: #64748b;
}

.search-results-toolbar-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.search-results-toolbar-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  min-height: 34px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.search-results-toolbar-metrics strong {
  color: #0f172a;
  font-weight: 900;
}

.search-results-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.search-results-toolbar-divider {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.search-results-toolbar-spacer {
  flex: 1 1 auto;
}

.search-results-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: #475569;
  background: #ffffff;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.search-results-sort:hover {
  background: #f8fafc;
  border-color: #eef2f7;
}

.search-results-sort-icon {
  display: inline-flex;
  color: #94a3b8;
  rotate: 90deg;
}

.search-results-sort-icon svg {
  width: 14px;
  height: 14px;
}

.search-results-sort-label {
  display: none;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}

.search-results-sort-wrap {
  position: relative;
  flex-shrink: 0;
  width: 90px;
}

.search-results-sort-wrap::after {
  content: none;
}

.search-results-sort-select {
  min-height: 32px;
  min-width: 120px;
  padding: 0;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  outline: none;
  appearance: none;
  box-shadow: none;
}

.search-results-sort-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-results-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 34px;
  padding: 0;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%);
  color: #dc2626;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  flex-shrink: 0;
}

.search-results-reset-btn:hover {
  border-color: #fca5a5;
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.16);
}

.search-results-reset-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-results-reset-icon > * {
  width: 14px;
  height: 14px;
}

.search-results-reset-label {
  display: none;
}

.search-results-filter-dropdown {
  position: relative;
  flex-shrink: 0;
}

.search-results-filter-dropdowns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
}

.search-results-filter-dropdown > summary {
  list-style: none;
}

.search-results-filter-dropdown > summary::-webkit-details-marker {
  display: none;
}

.search-empty-action{margin-top: 10px}

.search-results-filter-dropdown-summary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 34px;
  min-width: 0;
  max-width: 100%;
  padding: 0 11px;
  border-radius: 16px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.search-results-filter-dropdown-summary:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.1);
}

.search-results-filter-dropdown[open] .search-results-filter-dropdown-summary {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-results-filter-dropdown.is-active .search-results-filter-dropdown-summary {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.search-results-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid #eef2f7;
}

.search-results-active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 800;
}

.search-results-active-filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #2563eb;
  flex-shrink: 0;
}

.search-results-filter-dropdown-copy {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.search-results-filter-dropdown-label {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  color: #64748b;
  white-space: normal;
}

.search-results-filter-dropdown-label::after {
  content: ':';
}

.search-results-filter-dropdown-value {
  font-size: 12px;
  font-weight: 850;
  color: #0f172a;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.search-results-filter-dropdown-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}

.search-results-filter-dropdown-icon > * {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.search-results-filter-dropdown[open] .search-results-filter-dropdown-icon > * {
  transform: rotate(180deg);
}

.search-results-filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 12;
  display: grid;
  gap: 8px;
  min-width: 255px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #dbe5f5;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(16px);
}

.search-results-filter-dropdown-menu.is-company-grid {
  min-width: 520px;
  max-width: min(620px, calc(100vw - 32px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.search-results-filter-dropdown-section {
  display: grid;
  gap: 8px;
}

.search-results-filter-dropdown-section-title {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 4px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-results-filter-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.search-results-filter-option:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.search-results-filter-option.is-active {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.search-results-filter-option-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-results-filter-option-icon > * {
  width: 16px;
  height: 16px;
}

.search-results-filter-option-text {
  font-size: 13px;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-results-filter-option-count {
  min-width: 24px;
  height: 24px;
  margin-left: auto;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.search-results-filter-option.is-active .search-results-filter-option-count {
  background: rgba(255, 255, 255, 0.86);
  color: #1d4ed8;
}

.search-filter-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 44px 24px;
  border-radius: 24px;
  border: 1px dashed #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  text-align: center;
}

.search-filter-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.search-filter-empty-icon > * {
  width: 24px;
  height: 24px;
}

.search-filter-empty-title {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  color: #0f172a;
}

.search-filter-empty-subtitle {
  max-width: 560px;
  font-size: 14px;
  line-height: 1.7;
  color: #64748b;
}

.search-results-surface {
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

@media (max-width: 1100px) {
  .search-results-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-results-toolbar-actions {
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .search-results-toolbar {
    padding: 12px;
  }

  .search-results-toolbar-count {
    font-size: 13px;
  }

  .search-results-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .search-results-toolbar-metrics {
    width: 100%;
  }

  .search-results-toolbar-metrics span {
    width: auto;
  }

  .search-results-inline-search {
    width: 100%;
    max-width: 100%!important;
    flex: 1 1 auto;
  }

  .search-results-toolbar-divider {
    display: none;
  }

  .search-results-toolbar-spacer {
    display: none;
  }

  .search-results-sort,
  .search-results-sort-wrap,
  .search-results-sort-select,
  .search-results-filter-dropdowns,
  .search-results-filter-dropdown,
  .search-results-filter-dropdown-summary {
    width: auto;
  }

  .search-results-filter-dropdowns {
    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 6px;
  }

  .search-results-reset-btn {
    width: max-content;
    justify-self: start;
    gap: 8px;
    padding: 0 12px;
  }

  .search-results-reset-label {
    display: inline;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
  }

  .search-results-sort {
    flex-direction: row;
    align-items: center;
  }

  .search-results-sort-wrap {
    min-width: 0;
  }

  .search-results-sort-select {
    min-width: 0;
    width: 100%;
  }

  .search-results-filter-dropdown-menu {
    position: static;
    min-width: 100%;
    max-width: 100%;
    margin-top: 8px;
  }

  .search-results-filter-dropdown-menu.is-company-grid {
    min-width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .search-results-toolbar-actions {
    align-items: flex-start;
  }

  .search-results-filter-dropdowns {
    align-items: flex-start;
    align-content: flex-start;
  }

  .search-results-filter-dropdown {
    display: grid;
    column-gap: 8px;
    min-width: 0;
    align-self: flex-start;
  }

  .search-results-filter-dropdown-menu {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    margin-top: 0;
  }

  .search-results-filter-dropdown-summary {
    align-self: flex-start;
  }

  .search-results-filter-dropdown-menu.is-company-grid {
    min-width: 100%;
    max-width: 100%;
  }
}

.lead-results-list {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  padding-bottom: 24px;
}

.lead-results-back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.lead-results-back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lead-results-back-to-top:hover,
.lead-results-back-to-top:focus-visible {
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.22);
  outline: none;
}

.lead-results-back-to-top > * {
  width: 18px;
  height: 18px;
}

.search-empty-state {
  min-height: 520px;
  border-radius: 28px;
  border: 1px dashed #d5def6;
  background:
    radial-gradient(circle at top right, rgba(27, 101, 255, 0.07), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #f6f8fd 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.03);
}

.search-empty-illustration {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.search-empty-title {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 800;
  color: #0f172a;
}

.search-empty-subtitle {
  font-size: 14px;
  line-height: 1.7;
  color: #7b88ad;
}

.search-empty-state .search-results-summary {
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.search-empty-state .search-results-summary-meta {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Company cards ──────────────────────────────────────────────────────── */
.lead-company-card {
  padding: 0;
  min-width: 0;
  max-width: 100%;
  height: fit-content;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lead-company-card.is-interactive:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
}

.lead-company-card[open] {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);
}

.lead-company-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 16px 18px;
  gap: 12px;
  cursor: pointer;
}

.lead-company-summary-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lead-company-summary.is-static {
  cursor: default;
}

.lead-company-summary-side {
  display: flex;
  min-width: 0;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  flex-shrink: 0;
}

.lead-company-summary-open-tools {
  display: none;
  width: auto;
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
}

.lead-company-card[open] .lead-company-summary-open-tools {
  display: flex;
  pointer-events: auto;
  animation: lead-crm-fade-in 0.18s ease both;
}

.lead-company-summary-side.is-loading {
  gap: 10px;
}

.lead-company-card[open] .lead-company-summary-stats {
  display: none;
  pointer-events: none;
}

.lead-company-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lead-company-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lead-company-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.lead-company-avatar.is-loading {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(148, 163, 184, 0.14);
}

.lead-company-avatar.is-image {
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.lead-company-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.lead-company-avatar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lead-company-avatar-icon > * {
  width: 20px;
  height: 20px;
  color: #ffffff;
}

.lead-company-avatar-placeholder-icon > * {
  color: #cbd5e1;
}

.lead-company-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.lead-company-title {
  margin: 0;
  min-width: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.lead-company-industry-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 8px;
  background: #f4f7fe;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

.lead-company-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: normal;
}

.lead-company-status-tag.is-searching {
  background: #eff6ff;
  color: #2563eb;
}

.lead-company-status-tag.is-completed {
  background: #ecfdf5;
  color: #059669;
}

.lead-company-status-tag.is-partial {
  background: #fffbeb;
  color: #b45309;
}

.lead-company-status-tag.is-failed {
  background: #fef2f2;
  color: #dc2626;
}

.lead-company-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lead-company-status-icon > * {
  width: 12px;
  height: 12px;
}

.lead-company-replay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.lead-company-replay-btn:hover:not(:disabled),
.lead-company-replay-btn:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #2563eb;
}

.lead-company-replay-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.lead-company-replay-btn > * {
  width: 14px;
  height: 14px;
}

.lead-company-replay-spinner {
  animation: search-spin 1s linear infinite;
}

.lead-company-status-spinner {
  animation: search-spin 1s linear infinite;
}

.lead-company-location-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
}

.lead-company-location-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.lead-company-location-icon > * {
  width: 16px;
  height: 16px;
}

.lead-company-location-copy {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.lead-company-location {
  flex: 0 1 auto;
  margin: 0;
  min-width: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.lead-company-location-link {
  color: #475569;
  text-decoration: none;
  transition: color 0.18s ease;
}

.lead-company-location-link:hover,
.lead-company-location-link:focus-visible {
  color: #2563eb;
  text-decoration: underline;
}

.lead-company-location-extra {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2563eb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.lead-company-branches {
  margin-bottom: 22px;
}

.lead-company-branches-title {
  margin-bottom: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lead-company-branches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lead-company-branches-item {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #dbe7f5;
  color: #475569;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.lead-company-branches-item:hover,
.lead-company-branches-item:focus-visible {
  border-color: #bfd3f8;
  background: #eff6ff;
  color: #1d4ed8;
}

.lead-company-branches-item-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.lead-company-inline-note {
  margin-top: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 600;
}

.lead-company-inline-note.is-danger {
  background: #fef2f2;
  color: #b91c1c;
}

.lead-company-inline-note.is-warning {
  background: #fffbeb;
  color: #92400e;
}

.lead-company-summary-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 520px;
  opacity: 1;
  transition: max-width 0.24s ease, opacity 0.18s ease;
}

.lead-company-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 12px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.lead-company-summary-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.lead-company-summary-chip-icon > * {
  width: 14px;
  height: 14px;
}

.lead-company-summary-chip.is-lpr {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #2563eb;
}

.lead-company-summary-chip.is-contacts {
  background: #ecfdf5;
  border-color: #d1fae5;
  color: #059669;
}

.lead-company-summary-chip.is-socials {
  background: #faf5ff;
  border-color: #eadcff;
  color: #7c3aed;
}

.lead-company-summary-chip.is-missing {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.lead-company-summary-chip-text {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.lead-company-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  transition: transform 0.28s ease, background 0.18s ease, color 0.18s ease;
}

.lead-company-chevron.is-disabled {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: not-allowed;
}

.lead-company-card[open] .lead-company-chevron {
  transform: rotate(180deg);
  background: #dbeafe;
}

.lead-company-summary-skeleton {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-company-summary-skeleton-pill {
  display: block;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%);
  background-size: 200% 100%;
  animation: search-shimmer 1.3s ease-in-out infinite;
}

.lead-company-summary-skeleton-pill.is-short {
  width: 64px;
}

.lead-company-summary-skeleton-pill.is-long {
  width: 80px;
}

.lead-company-content {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.3s ease, opacity 0.3s ease;
}

.lead-company-card[open] .lead-company-content {
  grid-template-rows: 1fr;
  opacity: 1;
}

.lead-company-content-inner {
  overflow: hidden;
}

.lead-company-body {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
}

.lead-company-body-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.lead-company-body-head.has-contact-paywall {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}

.lead-company-body-head.has-contact-paywall .lead-company-contact-strip {
  flex: 0 1 auto;
  align-self: center;
}

.lead-company-body-head.has-contact-paywall .lead-company-contact-paywall {
  flex: 1 1 520px;
  min-width: 0;
  max-width: 100%;
  margin-top: 0;
  padding: 3px 4px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
}

.lead-company-body-head.is-unlocking .lead-company-contact-paywall {
  background:
    linear-gradient(90deg, #fff7ed 0%, #ffedd5 45%, #fff7ed 90%);
  background-size: 220% 100%;
  animation: lead-contact-shimmer 1s ease-in-out infinite;
}

.lead-company-contact-strip {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 7px;
  border-radius: 16px;
  background: #f4f7fe;
}

.lead-company-body-head > .lead-company-contact-grid {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  max-width: max-content;
}

.lead-company-action {
  --lead-company-action-accent: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.lead-company-contact-strip .lead-company-action,
.lead-company-contact-strip .lead-company-action.is-muted {
  color: #475569;
  background: none!important;
  box-shadow: none!important;
}

.lead-company-action:hover {
  color: rgb(37 99 235);
  background-color:white!important;
}

.lead-company-action > * {
  width: 14px;
  height: 14px;
}

.lead-company-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px !important;
  height: 14px !important;
  color: var(--lead-company-action-accent);
}

.lead-company-action-icon > * {
  width: 14px;
  height: 14px;
}

.lead-company-action.is-globe {
  --lead-company-action-accent: #3b82f6;
}

.lead-company-action.is-phone {
  --lead-company-action-accent: #10b981;
}

.lead-company-action.is-mail {
  --lead-company-action-accent: #8b5cf6;
}

.lead-company-action span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  width: auto !important;
  max-width: 180px;
  height: auto!important;
}

.lead-company-action:hover {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  text-decoration: none;
}

.lead-company-action.is-muted {
  color: #93a1c0;
}

.lead-company-action.is-muted .lead-company-action-icon {
  color: #cbd5e1;
}

.lead-company-social-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.lead-company-social-title {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lead-company-social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-company-social-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.lead-company-social-icon:hover {
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.lead-company-social-icon > svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.lead-company-social-icon.is-vk {
  color: #2787f5;
  background: rgba(39, 135, 245, 0.1);
}

.lead-company-social-icon.is-vk:hover {
  background: #2787f5;
  color: #ffffff;
}

.lead-company-social-icon.is-max {
  color: #ffffff;
  background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
}

.lead-company-social-icon.is-max:hover {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #ffffff;
}

.lead-company-social-icon.is-telegram {
  color: #24a1de;
  background: rgba(36, 161, 222, 0.1);
}

.lead-company-social-icon.is-telegram:hover {
  background: #24a1de;
  color: #ffffff;
}

.lead-company-social-icon.is-whatsapp {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
}

.lead-company-social-icon.is-whatsapp:hover {
  background: #16a34a;
  color: #ffffff;
}

.lead-company-social-icon.is-viber {
  color: #7360f2;
  background: rgba(115, 96, 242, 0.12);
}

.lead-company-social-icon.is-viber:hover {
  background: #7360f2;
  color: #ffffff;
}

.lead-company-social-icon.is-youtube {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.lead-company-social-icon.is-youtube:hover {
  background: #ef4444;
  color: #ffffff;
}

.lead-company-social-icon.is-instagram {
  color: #db2777;
  background: rgba(219, 39, 119, 0.1);
}

.lead-company-social-icon.is-instagram:hover {
  background: #db2777;
  color: #ffffff;
}

.lead-company-social-icon.is-facebook {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

.lead-company-social-icon.is-facebook:hover {
  background: #2563eb;
  color: #ffffff;
}

.lead-company-social-icon.is-ok {
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
}

.lead-company-social-icon.is-ok:hover {
  background: #f97316;
  color: #ffffff;
}

.lead-company-social-icon.is-tiktok {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.08);
}

.lead-company-social-icon.is-tiktok:hover {
  background: #0f172a;
  color: #ffffff;
}

.lead-company-people-section {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(248, 250, 252, 0.72);
}

.lead-company-people-section.has-locked-contacts {
  border-color: #fed7aa;
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.12);
}

.lead-company-people-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.lead-company-people-heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lead-company-people-heading-icon > * {
  width: 16px;
  height: 16px;
}

.lead-company-people {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
}

.lead-company-people.is-compact-group {
  gap: 10px;
}

.lead-company-people.has-rich-cards .lead-contact-card {
  min-height: 150px;
}

.lead-company-people.is-compact-group .lead-contact-card {
  min-height: 108px;
}

.lead-contact-card {
  --lead-contact-card-width: 232px;

  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 1 var(--lead-contact-card-width);
  width: var(--lead-contact-card-width);
  min-width: min(100%, var(--lead-contact-card-width));
  max-width: min(100%, var(--lead-contact-card-width));
  max-height: none;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.lead-contact-card.is-size-compact {
  --lead-contact-card-width: 232px;
}

.lead-contact-card.is-size-medium {
  --lead-contact-card-width: 286px;
}

.lead-contact-card.is-size-wide {
  --lead-contact-card-width: 328px;
}

.lead-contact-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.lead-contact-tooltip {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.96);
  transform-origin: left bottom;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.lead-contact-tooltip::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 99%;
  width: 18px;
  height: 10px;
  background: #0f172a;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  border-radius: 0 0 10px 10px;
}

.lead-contact-card:hover .lead-contact-tooltip,
.lead-contact-card:focus-within .lead-contact-tooltip {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lead-contact-tooltip-label {
  color: rgba(248, 250, 252, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lead-contact-tooltip-text {
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
}

.lead-contact-card.is-primary {
  border-color: #bfd8ff;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32%),
    linear-gradient(180deg, #fdfefe 0%, #f3f7ff 100%);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.1);
}

.lead-contact-spotlight {
  position: absolute;
  top: -10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #f59e0b;
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.lead-contact-spotlight > * {
  width: 16px;
  height: 16px;
}

.lead-contact-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.lead-contact-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 999px;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.lead-contact-avatar.is-primary {
  background: #2563eb;
  color: #ffffff;
}

.lead-contact-avatar.is-secondary {
  background: #f1f5f9;
  color: #64748b;
}

.lead-contact-avatar.is-image.is-primary {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.lead-contact-avatar.is-image.is-secondary {
  box-shadow: 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.lead-contact-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.lead-contact-name {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 800;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.lead-contact-card.is-primary .lead-contact-name {
  color: #10224a;
}

.lead-contact-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
}

.lead-contact-card.is-primary .lead-contact-footer {
  border-top-color: rgba(59, 130, 246, 0.16);
}

.lead-contact-position {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.lead-contact-position.is-primary {
  color: #1d4ed8;
  font-weight: 800;
}

.lead-contact-position.is-secondary {
  color: #64748b;
  font-weight: 500;
}

.lead-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  width: auto;
}

.lead-contact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 12px;
  border: none;
  background: #f4f7fe;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.lead-contact-action > * {
  width: 14px;
  height: 14px;
}

.lead-contact-action > span {
  width: auto !important;
}

.lead-contact-action.is-vk {
  background: #eef4ff;
  color: #2787f5;
  box-shadow: inset 0 0 0 1px rgba(39, 135, 245, 0.1);
}

.lead-contact-action.is-vk svg {
  fill: currentColor;
}

.lead-contact-action.is-instagram {
  background: #fff1f8;
  color: #db2777;
  box-shadow: inset 0 0 0 1px rgba(219, 39, 119, 0.1);
}

.lead-contact-action.is-profile {
  background: #eff6ff;
  color: #2563eb;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.lead-contact-action.is-phone {
  background: #ecfdf5;
  color: #10b981;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.lead-contact-action:hover {
  color: #ffffff;
  text-decoration: none;
}

.lead-contact-action.is-vk:hover {
  background: #2787f5;
  box-shadow: 0 6px 18px rgba(39, 135, 245, 0.2);
}

.lead-contact-action.is-instagram:hover {
  background: #db2777;
  box-shadow: 0 6px 18px rgba(219, 39, 119, 0.22);
}

.lead-contact-action.is-profile:hover {
  background: #2563eb;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.22);
}

.lead-contact-action.is-phone:hover {
  background: #10b981;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.22);
}

.lead-company-empty-state {
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed #d7e2f3;
  background: #ffffff;
}

.lead-company-empty-copy {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .search-results-header {
    align-items: flex-start;
  }

  .search-results-summary {
    align-items: flex-start;
  }

  .search-results-summary-top,
  .search-results-summary-bottom,
  .search-results-summary-stages {
    justify-content: flex-start;
  }

  .lead-company-body-head {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-company-social-rail {
    margin-left: 0;
    justify-content: flex-start;
  }

  .lead-results-list {
    grid-template-columns: 1fr;
  }

  .lead-company-people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .search-results-title {
    font-size: 28px;
  }

  .lead-company-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-company-summary-side {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .lead-company-summary-stats {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .search-results-header {
    gap: 14px;
    margin-bottom: 18px;
  }

  .search-results-summary,
  .search-results-summary-top,
  .search-results-summary-bottom,
  .search-results-summary-stages,
  .search-results-action-bar .search-results-summary-actions {
    width: 100%;
    min-width: 0;
  }

  .search-results-summary-box,
  .search-results-summary-badge,
  .search-results-summary-stage {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .search-results-summary-actions-left,
  .search-results-summary-actions-right {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .lead-company-summary {
    padding: 14px;
    gap: 20px;
  }

  .search-results-bottom-pagination .search-results-page-nav{
    display: flex;
    flex-flow: column;
  }

  .lead-company-body {
    padding: 0 14px 14px;
  }

  .lead-company-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .lead-company-summary-head,
  .lead-company-identity {
    align-items: flex-start;
  }

  .lead-company-title-row {
    gap: 6px;
  }

  .lead-company-title {
    font-size: 15px;
  }

  .lead-company-summary-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
  }

  .lead-company-summary-stats {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .lead-company-summary-chip {
    width: auto;
    flex: 0 1 auto;
    min-height: 28px;
    padding: 0 9px;
  }

  .lead-company-chevron {
    grid-column: 2;
    margin-left: auto;
  }

  .lead-company-contact-strip {
    width: fit-content;
  }

  .lead-company-action span{max-width: max-content;}

  .lead-company-body-head.has-contact-paywall {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-company-contact-paywall {
    align-items: stretch;
    grid-template-columns: 1fr;
    height: auto;
  }

  .lead-company-contact-paywall-copy {
    flex-wrap: wrap;
  }

  .lead-company-social-rail {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .lead-company-action,
  .lead-contact-action {
    min-width: 0;
  }

  .lead-company-summary-chip {
    justify-content: flex-start;
  }

  .lead-contact-action {
    justify-content: center;
  }

  .lead-contact-actions {
    width: 100%;
  }

  .lead-company-people {
    grid-template-columns: 1fr;
  }

  .lead-company-people-section {
    padding: 14px;
  }
}

/* ── Other component elevation on content-bg ─────────────────────────────── */
.card            { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04); }
.table-wrapper   { background: #ffffff; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04); }

/* ── Phase 8 monetization UI ────────────────────────────────────────────── */
.search-results-selection-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-results-batch-btn {
  border-color: transparent;
  background: linear-gradient(135deg, #0f766e 0%, #0ea5a4 100%);
  color: #ffffff;
}

.search-results-batch-btn:hover:not(:disabled) {
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(13, 148, 136, 0.26);
}

.search-results-csv-btn {
  background: #ffffff;
  color: #475569;
}

.lead-company-card.is-selected {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 12px 30px rgba(37, 99, 235, 0.08);
}

.lead-company-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lead-company-select-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #64748b;
  line-height: 0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.lead-company-select-control:hover:not(:disabled),
.lead-company-select-control:focus-visible {
  border-color: #93c5fd;
  color: #2563eb;
  outline: none;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.lead-company-select-control:disabled {
  cursor: not-allowed;
  background: #f8fafc;
  color: #cbd5e1;
  box-shadow: none;
}

.lead-company-select-control.is-selected {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.lead-company-select-box {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lead-company-select-box > * {
  width: 14px;
  height: 14px;
  display: block;
  stroke-width: 3;
}

.search-results-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin-left: 6px;
  padding: 0 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.search-results-select-all-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.search-results-select-all-box {
  position: relative;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.search-results-select-all-box::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.18s ease;
}

.search-results-select-all-input:checked + .search-results-select-all-box,
.search-results-select-all-input:indeterminate + .search-results-select-all-box {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.16);
}

.search-results-select-all-input:checked + .search-results-select-all-box::after {
  inset: 2px 4px 4px 3px;
  width: 8px;
  height: 4px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  background: transparent;
  transform: rotate(-45deg);
}

.search-results-select-all-input:indeterminate + .search-results-select-all-box::after {
  inset: 6px 3px;
  height: 2px;
  background: #ffffff;
}

.search-results-select-all-text {
  white-space: nowrap;
}

.search-results-select-all-pages {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 4px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.search-results-action-bar .search-results-select-all-pages {
  margin-left: 0;
}

.search-results-select-all-pages.is-active {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.search-results-select-all-pages-btn {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.lead-company-people-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lead-company-people-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lead-company-lock-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lead-company-lock-chip.is-open {
  background: #dcfce7;
  color: #15803d;
}

.lead-company-lock-chip.is-empty {
  background: #f1f5f9;
  color: #64748b;
}

.lead-contact-card {
  max-height: none;
  min-height: 0;
}

.lead-company-unlock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.lead-company-unlock-btn:hover:not(:disabled),
.lead-company-unlock-btn:focus-visible {
  box-shadow: 0 18px 34px rgba(234, 88, 12, 0.26);
  outline: none;
}

.lead-company-unlock-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.lead-company-unlock-btn[data-loading="true"] .search-results-export-icon > * {
  animation: search-spin 0.8s linear infinite;
}

.lead-company-unlock-btn.is-all {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.lead-company-contact-paywall {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: auto;
  min-height: 40px;
  margin-top: 0;
}

.lead-company-contact-paywall-copy {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.lead-company-contact-paywall-title {
  color: #9a3412;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
  white-space: nowrap;
}

.lead-company-contact-paywall-text,
.lead-company-contact-paywall-note {
  color: #7c2d12;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-company-contact-paywall-note {
  color: #475569;
}

.lead-company-contact-paywall-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.lead-company-contact-paywall-actions .lead-company-unlock-btn {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  line-height: 1.15;
}

.lead-company-contact-paywall-actions .lead-company-unlock-btn > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-company-contact-paywall-preview {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 0 3px;
}

.lead-company-contact-paywall-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 32px;
  border-radius: 8px;
  color: #ea580c;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.18);
  opacity: 0.72;
  filter: blur(0.7px);
}

.lead-company-contact-paywall-icon > * {
  width: 14px;
  height: 14px;
}

.lead-company-contact-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.lead-company-contact-status.is-open {
  background: #dcfce7;
  color: #15803d;
}

.lead-company-contact-status > * {
  width: 14px;
  height: 14px;
}

.lead-company-contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 7px;
  border-radius: 16px;
  background: #f4f7fe;
}

.lead-company-contact-grid.is-masked {
  pointer-events: none;
  user-select: none;
}

.lead-company-contact-grid.is-masked .lead-company-action {
  color: #94a3b8;
  background: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.75) !important;
  filter: blur(3px);
}

.lead-company-people-section.is-unlocking .lead-contact-action.is-hidden {
  animation: lead-contact-shimmer 1s ease-in-out infinite;
  background:
    linear-gradient(90deg, #f8fafc 0%, #eaf1ff 45%, #f8fafc 90%);
  background-size: 220% 100%;
}

@keyframes lead-contact-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.lead-contact-actions {
  margin-top: 0;
}

.lead-contact-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lead-contact-action.is-mail {
  background: #f5f3ff;
  color: #7c3aed;
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.1);
}

.lead-contact-action.is-mail:hover {
  background: #7c3aed;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.22);
}

.lead-contact-action.is-hidden {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: #94a3b8;
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.8);
  cursor: default;
}

/* ── Customer success: history, trust and lists ─────────────────────────── */
.customer-success-search-panel {
  margin-top: 18px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-success-search-head,
.customer-success-search-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.customer-success-search-title {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
}

.customer-success-search-actions {
  justify-content: flex-end;
}

.customer-success-search-actions > .customer-success-save-btn{width: 100%;justify-content: flex-start;}

.customer-success-search-accordion {
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.customer-success-search-summary {
  align-items: center;
}

.customer-success-search-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.customer-success-search-body {
  padding-top: 0;
}

.customer-success-icon-btn,
.customer-success-save-btn,
.lead-customer-success-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.customer-success-icon-btn {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.customer-success-save-btn,
.lead-customer-success-btn {
  padding: 0 12px;
  white-space: nowrap;
}

.customer-success-icon-btn:hover,
.customer-success-save-btn:hover,
.lead-customer-success-btn:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.1);
}

.customer-success-icon-btn > *,
.customer-success-save-btn > *,
.lead-customer-success-btn > * {
  height: 15px;
}

.customer-success-search-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.customer-success-search-column {
  min-width: 0;
}

.customer-success-search-column-title {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-success-search-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-success-search-item,
.customer-success-search-empty {
  width: 100%;
  min-height: 58px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-align: left;
}

.customer-success-search-item {
  color: #0f172a;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.customer-success-search-item:hover {
  border-color: #c7d2fe;
  background: #eef6ff;
}

.customer-success-search-item-title,
.customer-success-search-item-meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-success-search-item-title {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}

.customer-success-search-item-meta,
.customer-success-search-empty {
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 700;
}

.lead-customer-success-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  white-space: nowrap;
}

.lead-customer-success-panel.is-summary {
  cursor: default;
}

.lead-customer-success-actions,
.lead-customer-success-status,
.lead-customer-success-qualification {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-customer-success-status,
.lead-customer-success-qualification {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none!important;
}

.lead-customer-success-status {
  background: #f8fafc;
  color: #64748b;
}

.lead-customer-success-status.is-saved {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.lead-customer-success-status svg {
  width: 13px;
  height: 13px;
}

.lead-customer-success-qualification {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #2563eb;
}

.lead-customer-success-divider {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.lead-customer-success-actions {
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 8px;
  flex-wrap: nowrap;
}

.lead-customer-success-select-wrap {
  position: relative;
  display: flex;
}

.lead-customer-success-select {
  min-height: 32px;
  width: 100%;
  padding: 0 28px 0 10px;
  border-radius: 10px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  appearance: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.lead-customer-success-select:focus {
  border-color: #93c5fd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lead-customer-success-select-chevron {
  position: absolute;
  top: 41%;
  right: 9px;
  width: 14px;
  height: 14px;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.lead-customer-success-select-chevron svg {
  width: 14px;
  height: 14px;
}

.lead-customer-success-btn {
  min-height: 32px;
  justify-content: center;
  white-space: nowrap;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.lead-customer-success-btn span {
  max-width: 92px;
  text-overflow: ellipsis;
}

/* ── Saved lists ───────────────────────────────────────────────────────── */
.saved-lists-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.saved-lists-hero,
.saved-list-card,
.saved-lists-empty,
.saved-lists-error,
.saved-lists-loading,
.saved-lists-local-note,
.saved-lists-stat {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.saved-lists-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
}

.saved-lists-local-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  background: #fffbeb;
  border-color: #fde68a;
}

.saved-lists-local-note svg {
  width: 18px;
  height: 18px;
  color: #b45309;
}

.saved-lists-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 12px;
}

.saved-lists-stat {
  padding: 14px;
}

.saved-lists-stat span,
.saved-list-card-head p,
.saved-list-item span,
.saved-list-empty-row {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.saved-lists-stat strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.saved-lists-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(320px, 1fr));
  gap: 14px;
}

.saved-list-card {
  padding: 16px;
}

.saved-list-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
}

.saved-list-color {
  width: 12px;
  height: 42px;
  border-radius: 999px;
}

.saved-list-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.saved-list-card-head p {
  margin: 4px 0 0;
}

.saved-list-items {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.saved-list-item {
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
}

.saved-list-item > summary {
  list-style: none;
}

.saved-list-item > summary::-webkit-details-marker {
  display: none;
}

.saved-list-item-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.saved-list-item-main {
  min-width: 0;
}

.saved-list-item strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-list-item p {
  margin: 6px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.saved-list-item-status {
  flex-shrink: 0;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

.saved-list-item-chevron {
  display: inline-flex;
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.18s ease;
}

.saved-list-item-chevron svg {
  width: 16px;
  height: 16px;
}

.saved-list-item[open] .saved-list-item-chevron {
  transform: rotate(180deg);
}

.saved-list-item-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.saved-list-item-details div,
.saved-list-item-details a {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
}

.saved-list-item-details span,
.saved-list-item-details strong {
  display: block;
}

.saved-list-item-details span {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.saved-list-item-details strong,
.saved-list-item-details a {
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.saved-list-item-details a {
  color: #2563eb;
}

.saved-lists-empty,
.saved-lists-error,
.saved-lists-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  color: #64748b;
}

.saved-lists-empty svg,
.saved-lists-error svg {
  width: 34px;
  height: 34px;
  color: #94a3b8;
}

.saved-lists-empty strong,
.saved-lists-error strong {
  color: #0f172a;
  font-size: 16px;
}

.saved-list-card-description {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 650;
}

.saved-list-open-btn,
.saved-list-back-btn,
.saved-list-lead-site {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  padding: 0 var(--space-3);
}

.saved-list-open-btn {
  width: 100%;
  margin-top: 14px;
}

.saved-list-open-btn:hover,
.saved-list-back-btn:hover,
.saved-list-lead-site:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.saved-list-open-btn svg,
.saved-list-back-btn svg,
.saved-list-lead-site svg {
  width: 16px;
  height: 16px;
}

.saved-list-detail,
.saved-list-lead-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.saved-list-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.saved-list-detail-head,
.saved-list-detail-title-row,
.saved-list-detail-toolbar,
.saved-list-lead-main,
.saved-list-contact-grid {
  display: flex;
  align-items: center;
  gap: 12px;
}

.saved-list-detail-head {
  justify-content: space-between;
}

.saved-list-detail-title-row {
  align-items: flex-start;
}

.saved-list-detail-toolbar {
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.saved-list-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.saved-list-filter-field.is-search {
  flex: 1 1 260px;
}

.saved-list-filter-field span,
.saved-list-lead-status span,
.saved-list-section-label {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.saved-list-filter-select,
.saved-list-search-input,
.saved-list-lead-status select {
  min-height: 38px;
  width: 100%;
  border-radius: 11px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.saved-list-filter-select,
.saved-list-lead-status select {
  padding: 0 10px;
}

.saved-list-search-input {
  padding: 0 12px;
}

.saved-list-filter-select:focus,
.saved-list-search-input:focus,
.saved-list-lead-status select:focus {
  border-color: #93c5fd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.saved-list-lead-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.saved-list-leads {
  display: grid;
  gap: 12px;
}

.saved-list-lead-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.saved-list-lead-card.lead-company-card {
  display: block;
  padding: 0;
  border: 1px solid #e2e8f0!important;
}

.saved-list-lead-card .lead-company-select-control {
  display: none;
}

.saved-list-card-status {
  width: auto;
  min-width: 0;
}

.saved-list-tag-count {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
}

.saved-list-card-crm {
  display: grid;
  gap: 10px;
}

.saved-list-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.saved-list-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tag-color, #2563eb) 30%, #e2e8f0);
  background: color-mix(in srgb, var(--tag-color, #2563eb) 9%, #ffffff);
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.saved-list-note-list {
  display: grid;
  gap: 8px;
}

.saved-list-note-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
}

.saved-list-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #e0f2fe;
  color: #0369a1;
}

.saved-list-note-icon svg {
  width: 15px;
  height: 15px;
}

.saved-list-note-item p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.saved-list-lead-main {
  align-items: flex-start;
  justify-content: space-between;
}

.saved-list-lead-main h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 900;
}

.saved-list-lead-main p,
.saved-list-lead-note {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 650;
}

.saved-list-lead-status {
  display: flex;
  min-width: 150px;
  flex-direction: column;
  gap: 6px;
}

.saved-list-contact-grid {
  flex-wrap: wrap;
}

.saved-list-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  max-width: 100%;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.saved-list-contact-link:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.saved-list-contact-link svg,
.saved-list-contact-empty svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.saved-list-contact-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-list-contact-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 12px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.saved-list-decision-makers {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

/* ── Account settings ──────────────────────────────────────────────────── */
.account-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
}

.account-settings-modal.hidden {
  display: none;
}

.account-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
}

.account-settings-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  overflow-y: auto;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.account-settings-head,
.account-settings-section-title,
.account-settings-actions {
  display: flex;
  align-items: center;
}

.account-settings-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.account-settings-head h2 {
  color: #0f172a;
  font-size: 24px;
  line-height: 1.15;
  margin-top: 8px;
}

.account-settings-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
}

.account-settings-close svg,
.account-settings-section-title svg {
  width: 18px;
  height: 18px;
}

.account-settings-feedback {
  margin-bottom: 14px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.account-settings-feedback.is-success {
  background: #ecfdf5;
  color: #047857;
}

.account-settings-feedback.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.account-settings-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.account-settings-section + .account-settings-section {
  margin-top: 25px;
}

.account-settings-section.is-danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.account-settings-section-title {
  gap: 8px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
}

.account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-settings-field {
  display: grid;
  gap: 6px;
}

.account-settings-field span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.account-settings-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.account-settings-field input:focus {
  border-color: #93c5fd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.account-settings-actions {
  justify-content: flex-end;
}

.account-settings-danger-copy {
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.5;
}

.btn-danger {
  border-color: #fecaca;
  background: #dc2626;
  color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

@media (max-width: 640px) {
  .account-settings-grid {
    grid-template-columns: 1fr;
  }

  .account-settings-modal {
    padding: 12px;
  }

  .account-settings-dialog {
    max-height: calc(100dvh - 24px);
    padding: 18px;
  }
}

.saved-list-person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 11px;
  background: #f8fafc;
}

.saved-list-person-row strong,
.saved-list-person-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-list-person-row strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.saved-list-person-row span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

/* ── Search history ─────────────────────────────────────────────────────── */
.search-history-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.search-history-hero,
.search-history-toolbar,
.search-history-card,
.search-history-empty,
.search-history-error,
.search-history-loading,
.search-history-results-bar {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.search-history-hero {
  padding: 24px;
}

.search-history-hero h2 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.1;
}

.search-history-hero p {
  margin: 8px 0 0;
  max-width: 760px;
  color: #64748b;
  line-height: 1.55;
}

.search-history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
}

.search-history-search,
.search-results-inline-search {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 34px;
  min-width: 0;
  width: 255px;
  padding: 0 7px;
  border-radius: 16px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.search-history-search input,
.search-results-inline-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f172a;
  font: inherit;
  background: transparent;
}

.search-history-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-history-status-filter,
.search-history-primary-btn,
.search-history-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #dbe3ef;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.search-history-status-filter,
.search-history-secondary-btn {
  background: #ffffff;
  color: #334155;
}

.search-history-status-filter.is-active,
.search-history-primary-btn {
  border-color: #1b65ff;
  background: #1b65ff;
  color: #ffffff;
}

.search-history-list {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.search-history-card {
  display: grid;
  gap: 16px;
  align-items: center;
  padding: 18px;
  cursor: pointer;
}

.search-history-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.search-history-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.25;
}

.search-history-card p,
.search-history-dates,
.search-history-results-bar-copy span {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.search-history-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.search-history-status-badge.is-completed {
  background: #dcfce7;
  color: #166534;
}

.search-history-status-badge.is-processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.search-history-status-badge.is-failed {
  background: #fee2e2;
  color: #b91c1c;
}

.search-history-status-badge.is-cancelled {
  background: #f1f5f9;
  color: #475569;
}

.search-history-metrics,
.search-history-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}

.search-history-metrics span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.search-history-card-actions,
.search-history-results-bar-actions {
  display: flex;
  gap: 8px;
}

.search-history-empty,
.search-history-error,
.search-history-loading {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 20px;
  text-align: center;
  color: #64748b;
}

.search-history-empty strong,
.search-history-error strong {
  color: #0f172a;
  font-size: 18px;
}

.search-history-load-more {
  display: flex;
  justify-content: center;
  padding: 8px 0 0;
}

.search-history-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.search-history-results-bar.hidden {
  display: none;
}

.search-history-results-bar-copy {
  display: grid;
  gap: 2px;
}

.search-history-results-kicker {
  color: #1b65ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-history-results-bar-copy strong {
  color: #0f172a;
}

#screen-upload.is-history-results-mode .leadgen-layout {
  grid-template-columns: minmax(0, 1fr);
}

#screen-upload.is-history-results-mode .search-filters-card {
  display: none;
}

.search-results-inline-search {
  max-width: 231px;
  flex: 1 1 260px;
}

@media (max-width: 760px) {
  .search-history-card,
  .search-history-results-bar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .search-history-card-actions,
  .search-history-results-bar-actions {
    justify-content: stretch;
  }

  .search-history-primary-btn,
  .search-history-secondary-btn {
    width: 100%;
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.74); }
}

/* ── Onboarding ─────────────────────────────────────────────────────────── */
.onboarding-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.onboarding-hero,
.onboarding-demo-panel,
.onboarding-error {
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.onboarding-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.onboarding-hero-copy {
  max-width: 760px;
}

.onboarding-title {
  margin: 4px 0 8px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 900;
}

.onboarding-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 650;
}

.onboarding-hero-actions,
.onboarding-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.onboarding-step.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.onboarding-step.is-completed {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.onboarding-step-icon {
  display: inline-flex;
}

.onboarding-step-icon > * {
  width: 16px;
  height: 16px;
}

.onboarding-demo-panel,
.onboarding-error {
  padding: 22px;
}

.onboarding-section-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.onboarding-section-title {
  margin: 5px 0 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}

.onboarding-sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.onboarding-sample-company {
  min-width: 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.onboarding-sample-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.onboarding-sample-title {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 900;
}

.onboarding-sample-meta,
.onboarding-sample-lpr-role {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}

.onboarding-sample-lpr {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.onboarding-sample-lpr-name {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.onboarding-sample-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.onboarding-sample-signals span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 10px;
  font-weight: 900;
}

/* ── Team mode and outbound integrations ───────────────────────────────── */
.team-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.team-hero,
.team-sidebar-panel,
.team-main-panel,
.team-card,
.team-empty-panel,
.team-error-panel {
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.team-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.team-title {
  margin: 4px 0 8px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 900;
}

.team-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 650;
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.team-sidebar-panel,
.team-main-panel,
.team-card,
.team-empty-panel,
.team-error-panel {
  padding: 18px;
}

.team-main-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.team-panel-title,
.team-detail-title {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
}

.team-workspace-list,
.team-member-list,
.integration-list,
.integration-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-workspace-item {
  width: 100%;
  min-height: 66px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-align: left;
  color: #0f172a;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.team-workspace-item:hover,
.team-workspace-item.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.team-workspace-item-title,
.team-workspace-item-meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-workspace-item-title {
  font-size: 13px;
  font-weight: 900;
}

.team-workspace-item-meta,
.team-detail-subtitle,
.team-empty-inline {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.team-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.team-section-label,
.team-select-label span,
.team-inline-form label span,
.integration-form label span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-credit-card {
  min-width: 160px;
  padding: 16px;
  border-radius: 16px;
  background: #0f172a;
  color: #ffffff;
}

.team-credit-label {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-credit-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.team-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: 12px;
}

.team-inline-form,
.integration-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.team-inline-form label,
.integration-form label,
.team-select-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.team-input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 750;
}

.team-input:focus {
  border-color: #93c5fd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.team-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.team-member-row,
.integration-log-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.team-member-main,
.integration-log-row div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.team-member-main strong,
.integration-log-row strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
}

.team-member-main span,
.integration-log-row span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 750;
}

.team-member-actions,
.integration-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.team-role-select {
  min-width: 132px;
}

.team-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #475569;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.team-icon-btn:hover {
  border-color: #93c5fd;
  color: #2563eb;
}

.team-icon-btn > * {
  width: 16px;
  height: 16px;
}

.team-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.team-empty-panel,
.team-error-panel {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.team-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: #eff6ff;
  color: #2563eb;
}

.team-empty-icon > * {
  width: 24px;
  height: 24px;
}

.integrations-hero {
  align-items: center;
}

.integration-create-card {
  padding: 16px;
}

.integration-form {
  grid-template-columns: 150px minmax(160px, 1fr) minmax(220px, 1.5fr) minmax(140px, 0.8fr) auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.integration-form-wide {
  min-width: 0;
}

.integration-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.integration-card-head,
.integration-deliver-form {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.integration-title {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 900;
}

.integration-meta,
.integration-error {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.integration-error {
  color: #b91c1c;
}

.integration-deliver-form {
  margin-top: 14px;
  align-items: center;
}

.integration-card-actions {
  margin-top: 12px;
}

.integration-log-row.is-succeeded {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.integration-log-row.is-failed {
  border-color: #fecaca;
  background: #fef2f2;
}

.lead-contact-action.is-hidden:hover {
  color: #94a3b8;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.8);
}

.lead-contact-action-hidden-text {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.billing-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.billing-modal.hidden {
  display: none;
}

.billing-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(8px);
}

.billing-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 940px);
  overflow: auto;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.billing-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px 0;
}

.billing-modal-copy {
  max-width: 620px;
}

.billing-modal-kicker {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.billing-modal-title {
  margin: 8px 0 0;
  color: #0f172a;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.billing-modal-subtitle {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

.billing-modal-close {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 1px solid #dbe5f5;
  border-radius: 14px;
  background: #ffffff;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.billing-modal-body {
  padding: 24px 30px 30px;
}

.billing-state-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.billing-state-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.billing-state-banner.is-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.billing-state-banner strong {
  font-size: 13px;
  font-weight: 900;
}

.billing-state-banner span {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
}

.billing-wallet-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
}

.billing-wallet-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.billing-wallet-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.billing-wallet-balance {
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.billing-wallet-meta {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 600;
}

.billing-wallet-refresh,
.billing-package-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #dbe5f5;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.billing-wallet-refresh:hover,
.billing-package-button:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.billing-inline-note,
.billing-checkout-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 600;
}

.billing-credit-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.billing-credit-rules div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 70px;
  padding: 14px 16px;
  border-radius: 24px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}

.billing-credit-rules strong {
  color: #1d4ed8;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
}

.billing-credit-rules span {
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 750;
}

.billing-package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.billing-package-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.billing-package-card.is-starter {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.billing-package-card.is-growth {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.billing-package-card.is-scale {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.billing-package-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.billing-package-title {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.billing-package-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.billing-package-credits {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.billing-package-price {
  color: #ea580c;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.billing-package-caption {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.billing-package-button {
  margin-top: auto;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border-color: transparent;
  color: #ffffff;
  cursor: pointer;
}

.billing-package-button:hover {
  border-color: transparent;
}

.billing-package-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.billing-package-button[data-loading="true"] {
  position: relative;
  padding-left: 38px;
}

.billing-package-button[data-loading="true"]::before {
  content: '';
  position: absolute;
  left: 16px;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: billing-button-spin 0.7s linear infinite;
}

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

.billing-error-state {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #fecaca;
}

.billing-error-title {
  margin: 0 0 8px;
  color: #b91c1c;
  font-size: 20px;
  font-weight: 900;
}

.billing-error-copy {
  margin: 0;
  color: #7f1d1d;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

.billing-history-card {
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.billing-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.billing-history-title {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.billing-history-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.billing-history-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

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

.billing-history-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.billing-history-row.is-danger {
  background: #fff7f7;
  border-color: #fecaca;
}

.billing-history-row.is-pending {
  background: #fffbeb;
  border-color: #fde68a;
}

.billing-history-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 34px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 900;
  background: #e0f2fe;
  color: #0369a1;
}

.billing-history-type.is-danger {
  background: #fee2e2;
  color: #991b1b;
}

.billing-history-type.is-pending {
  background: #fef3c7;
  color: #92400e;
}

.billing-history-type.is-positive {
  background: #dcfce7;
  color: #166534;
}

.billing-history-type.is-negative {
  background: #fee2e2;
  color: #991b1b;
}

.billing-history-type.is-refund {
  background: #fef3c7;
  color: #92400e;
}

.billing-history-type.is-manual {
  background: #ede9fe;
  color: #5b21b6;
}

.billing-history-main {
  min-width: 0;
}

.billing-history-name {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.billing-history-meta {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.billing-history-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.billing-history-side strong {
  color: #0f172a;
  font-size: 16px;
}

.billing-history-side strong.is-positive {
  color: #166534;
}

.billing-history-side strong.is-negative {
  color: #991b1b;
}

.billing-history-side strong.is-muted {
  color: #64748b;
}

.billing-history-empty {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

body.billing-modal-open {
  overflow: hidden;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
}

.app-modal.hidden {
  display: none;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.app-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  padding: 22px;
}

.app-modal-head {
  display: grid;
  gap: 8px;
}

.app-modal-title {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.app-modal-message {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.app-modal-fields {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.app-modal-field {
  display: grid;
  gap: 8px;
}

.app-modal-field-label {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.app-modal-field-input {
  width: 100%;
  border: 1px solid #dbe5f3;
  border-radius: 8px;
  background: #f8fbff;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.app-modal-field-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea.app-modal-field-input {
  min-height: 112px;
  resize: vertical;
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.app-modal-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.app-modal-btn.is-secondary {
  background: #f1f5f9;
  color: #334155;
}

.app-modal-btn.is-primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.app-modal-btn.is-danger {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.18);
}

.lead-export-modal {
  width: min(560px, 100%);
}

.lead-export-scope-summary {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.lead-export-scope-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.lead-export-scope-summary div.is-total {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.lead-export-scope-summary strong {
  color: #0f172a;
  font-weight: 900;
}

.lead-export-balance-note {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.lead-export-balance-note.is-warning {
  background: #fff7ed;
  color: #9a3412;
}

.lead-export-modal-actions {
  flex-wrap: wrap;
}

.lead-export-modal-current {
  margin-top: 12px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

body.app-modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .billing-package-grid {
    grid-template-columns: 1fr;
  }

  .billing-credit-rules {
    grid-template-columns: 1fr;
  }

  .customer-success-search-grid,
  .onboarding-sample-grid,
  .onboarding-progress {
    grid-template-columns: 1fr;
  }

  .search-filters-card .customer-success-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-customer-success-panel,
  .onboarding-hero,
  .team-hero,
  .team-detail-head {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-customer-success-actions,
  .onboarding-hero-actions,
  .team-member-actions,
  .integration-card-head,
  .integration-deliver-form,
  .lead-company-contact-paywall-actions {
    justify-content: flex-start;
  }

  .team-layout,
  .team-card-grid,
  .team-action-grid {
    grid-template-columns: 1fr;
  }

  .team-inline-form,
  .integration-form {
    grid-template-columns: 1fr;
  }

  .saved-list-detail-head,
  .saved-list-lead-main {
    flex-direction: column;
    align-items: stretch;
  }

  .saved-list-lead-status,
  .saved-list-filter-field {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .billing-modal {
    padding: 14px;
    z-index: 1000;
  }

  .billing-modal-head,
  .billing-modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .billing-modal-title {
    font-size: 26px;
  }

  .topbar-menu{
    left: 0;
    right: 0;
    width: 250px;
  }

  .search-history-list{grid-template-columns: repeat(1, minmax(0, 1fr));}

  .billing-wallet-card,
  .lead-company-people-heading-row {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-company-summary-head {
    gap: 10px;
  }

  .lead-company-select-control {
    width: 22px;
    height: 22px;
    min-width: 22px;
  }

  .search-results-select-all {
    width: 100%;
    margin-left: 0;
  }

  .search-results-action-bar .search-results-summary-actions {
    gap: 12px;
  }

  .search-results-summary-actions-left,
  .search-results-summary-actions-right,
  .lead-company-people-heading-actions,
  .lead-company-contact-paywall-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .lead-company-contact-paywall-actions .lead-company-unlock-btn {
    width: 100%;
    justify-content: center;
  }

  .customer-success-search-head,
  .customer-success-search-actions,
  .onboarding-demo-head {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-success-icon-btn,
  .customer-success-save-btn,
  .lead-customer-success-btn,
  .lead-customer-success-select-wrap {
    width: 100%;
  }

  .lead-customer-success-actions {
    width: 100%;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .onboarding-title {
    font-size: 24px;
  }

  .team-title {
    font-size: 24px;
  }

  .team-member-row,
  .integration-log-row,
  .integration-card-head,
  .integration-deliver-form {
    align-items: stretch;
    flex-direction: column;
  }

  .team-member-actions,
  .integration-card-actions {
    width: 100%;
  }

  .team-role-select,
  .integration-deliver-form .team-input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .lead-company-status-tag.is-completed {
    display: none;
  }

  .lead-company-summary-head {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
  }

  .saved-list-detail-head > .btn-secondary{width: fit-content;}
  .saved-list-detail-head > .btn-secondary > svg{width: 20px;}

  .saved-list-lead-card > .lead-company-summary > .lead-company-summary-main > .lead-company-summary-head{grid-template-columns: auto!important;}

  .lead-company-select-control {
    margin-top: 9px;
  }

  .lead-company-identity {
    min-width: 0;
  }

  .lead-company-location-copy {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
  }

  .lead-company-location-extra {
    min-height: 20px;
    padding: 4px 10px;
  }

  .lead-company-location-extra-word {
    display: none;
  }

  .lead-customer-success-panel.is-summary {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    white-space: normal;
  }

  .lead-customer-success-status,
  .lead-customer-success-qualification {
    width: max-content;
    max-width: 100%;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .lead-customer-success-qualification{margin-left: -20px;}

  .lead-customer-success-divider {
    display: none;
  }

  .lead-customer-success-actions {
    width: max-content;
    max-width: 100%;
    flex: 0 1 auto;
    align-items: center;
  }

  .lead-customer-success-btn {
    width: max-content;
    flex: 0 0 32px;
  }

  .lead-company-body-head > .lead-company-contact-grid{    max-width: min-content;}

  .lead-customer-success-select-wrap {
    width: max-content;
    min-width: 118px;
    flex: 0 0 auto;
  }

  .lead-customer-success-select {
    width: 100%;
    min-width: 118px;
    min-height: 34px;
    padding-right: 30px;
    font-size: 12px;
  }

  .search-results-sort-select {
    min-height: 38px;
    padding: 0 28px 0 4px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .search-progress-content {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  .search-progress-left {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }

  .search-progress-status {
    width: max-content;
    max-width: 100%;
  }

  .search-progress-divider{
    display: none;
  }

  .search-progress-funnel {
    display: flex;
    align-items: center;
    row-gap: 10px;
    column-gap: 15px;
    min-width: 0;
  }

  .search-progress-funnel-item {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .search-progress-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
  }

  .search-progress-percent,
  .search-progress-stage,
  .search-progress-reasons {
    flex: 0 1 auto;
    max-width: 100%;
  }

  .search-progress-reasons-btn {
    max-width: 100%;
    white-space: normal;
  }

  .search-progress-reasons-menu {
    left: 0;
    right: auto;
    width: min(250px, calc(100vw - 48px));
  }

  .customer-success-search-summary {
    align-items: flex-start;
    gap: 12px;
  }

  .customer-success-search-summary-actions {
    align-self: flex-start;
  }

  .customer-success-search-summary-actions .filter-accordion-chevron {
    width: 34px;
    height: 34px;
  }

  .customer-success-search-body {
    padding: 0 12px 12px;
  }

  .lead-company-contact-strip {
    width: fit-content;
    max-width: 100%;
  }

  .lead-company-contact-strip .lead-company-action {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .lead-customer-success-panel.is-summary {
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: start;
    align-items: center;
    gap: 6px;
  }

  .lead-customer-success-panel.is-summary .lead-customer-success-status,
  .lead-customer-success-panel.is-summary .lead-customer-success-qualification {
    width: max-content;
    min-width: 0;
    max-width: calc(100vw - 64px);
  }

  .lead-customer-success-panel.is-summary .lead-customer-success-actions {
    grid-column: 1 / -1;
    width: max-content;
  }

  .search-results-action-bar .search-results-summary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
  }

  .search-results-action-bar .search-results-summary-actions-left,
  .search-results-action-bar .search-results-summary-actions-right {
    display: contents;
  }

  .search-results-action-bar .search-results-batch-btn {
    order: 1;
    grid-column: 1;
  }

  .search-results-action-bar .search-results-csv-btn {
    order: 2;
    grid-column: 2;
  }

  .search-results-action-bar .search-results-continue-btn {
    order: 3;
    grid-column: 1 / -1;
  }

  .search-results-action-bar .search-results-select-page-btn {
    order: 4;
  }

  .search-results-action-bar .search-results-select-all-pages {
    order: 5;
  }

  .search-results-select-all-pages{margin-left: -60px!important; width: fit-content;}

  .search-results-action-bar .search-results-unlock-all-btn {
    order: 6;
    grid-column: 1 / -1;
  }

  .search-results-action-bar .search-results-page-nav {
    order: 7;
  }

  .search-results-action-bar .search-results-export-btn,
  .search-results-action-bar {
    width: 100%;
    justify-content: center;
  }

  .search-results-select-page-btn{width: max-content}
}
