:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --navy: #1a3352;
  --navy-dark: #152a44;
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --red-50: #fef2f2;
  --red-600: #dc2626;
  --green-50: #ecfdf5;
  --green-100: #d1fae5;
  --green-600: #059669;
  --green-700: #047857;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-700: #0f766e;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.08);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--slate-800);
  background: var(--slate-50);
  -webkit-font-smoothing: antialiased;
}

.desk-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.desk-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--blue-50) 0%, var(--white) 28%, var(--slate-50) 100%);
}

/* Header */
.desk-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 42%),
    linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
}

.desk-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr) minmax(12rem, 1fr);
  align-items: center;
  column-gap: 1.25rem;
  row-gap: 0.65rem;
  min-height: 72px;
}

.desk-header-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  justify-self: start;
}

.desk-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.desk-logo {
  height: 30px;
  width: auto;
  max-width: none;
  display: block;
  object-fit: contain;
}

.desk-brand-divider {
  width: 1px;
  height: 2.15rem;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.desk-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.desk-tool-name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.desk-tool-name:hover {
  color: var(--white);
  opacity: 0.92;
}

.desk-tool-team {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.25;
  white-space: nowrap;
}

.desk-header-product {
  margin: 0;
  justify-self: center;
  text-align: center;
  min-width: 0;
  max-width: 38rem;
  padding: 0.2rem 0.5rem;
}

.desk-header-product-text {
  display: block;
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: #bfdbfe;
  text-wrap: balance;
}

.desk-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  justify-self: end;
}

.desk-nav-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.desk-nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.desk-nav-link.is-active {
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.desk-nav-label {
  display: block;
}

.desk-nav-label-short {
  display: none;
}

/* Global CSV export banner (survives refresh / navigate away) */
.desk-export-banner {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #eff6ff;
  border-bottom: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.desk-export-banner[hidden] {
  display: none !important;
}

.desk-export-banner-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.55rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
}

.desk-shell-wide .desk-export-banner-inner {
  width: calc(100% - 2rem);
  max-width: none;
}

.desk-export-banner-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  animation: desk-export-pulse 1.4s ease-out infinite;
}

@keyframes desk-export-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  }
  70% {
    box-shadow: 0 0 0 0.45rem rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.desk-export-banner-text {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 650;
  color: #1e3a8a;
  line-height: 1.35;
}

.desk-export-banner-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
  white-space: nowrap;
}

.desk-export-banner-link:hover {
  text-decoration: underline;
}

.desk-export-banner-dismiss {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 0.3rem;
}

.desk-export-banner-dismiss:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

/* Main */
.desk-main {
  flex: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.85rem 0 2rem;
}

.desk-shell-wide .desk-header-inner,
.desk-shell-wide .desk-footer-inner {
  max-width: none;
  width: calc(100% - 2rem);
  margin-left: auto;
  margin-right: auto;
}

.desk-main-wide {
  width: calc(100% - 2rem);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-top: 0.75rem;
  padding-bottom: 2rem;
}

.desk-main-wide .page-lead {
  max-width: none;
}

/* Footer */
.desk-footer {
  margin-top: auto;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
}

.desk-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.15rem 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.desk-footer-copy {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--slate-600);
  line-height: 1.5;
}

.desk-footer-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--slate-400);
}

/* Page header */
.page-head {
  margin-bottom: 1.75rem;
}

.page-head-main {
  min-width: 0;
}

.page-head-main .desk-breadcrumbs {
  margin-bottom: 0.65rem;
}

.page-title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--slate-800);
  line-height: 1.2;
}

.page-lead {
  margin: 0.65rem 0 0;
  max-width: 42rem;
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--slate-500);
}

.page-lead code {
  font-size: 0.875em;
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 500;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-start;
}

.page-actions-cluster {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
}

.page-actions-cluster-end {
  margin-left: auto;
}

.action-menu {
  position: relative;
  display: inline-flex;
  z-index: 1;
}

.action-menu.is-open {
  z-index: 40;
}

.action-menu-trigger {
  gap: 0.4rem;
}

.action-menu-caret {
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.1rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}

.action-menu.is-open .action-menu-caret {
  margin-top: 0.15rem;
  transform: rotate(-135deg);
}

.action-menu-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  left: auto;
  z-index: 41;
  width: max-content;
  min-width: 12.5rem;
  max-width: min(16rem, calc(100vw - 2rem));
  padding: 0.35rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.action-menu-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--slate-700);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.action-menu-item:hover:not(:disabled),
.action-menu-item:focus-visible {
  background: var(--slate-50);
  color: var(--slate-900);
  outline: none;
}

.action-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-head-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow: visible;
}

@media (min-width: 768px) {
  .page-head-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
  }

  .page-actions {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    max-width: none;
    justify-content: flex-end;
  }
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 1.35rem;
}

@media (min-width: 768px) {
  .card-pad {
    padding: 1.65rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  border-color: var(--blue-600);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-700);
  border-color: var(--blue-700);
}

.btn-secondary {
  background: var(--white);
  color: var(--slate-700);
  border-color: var(--slate-200);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--slate-50);
  border-color: var(--slate-400);
}

.btn-danger {
  background: var(--red-50);
  color: var(--red-600);
  border-color: rgba(220, 38, 38, 0.2);
}

.btn-danger:hover:not(:disabled) {
  background: #fee2e2;
}

.btn-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Upload */
.import-layout {
  display: grid;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

@media (min-width: 960px) {
  .import-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
    align-items: start;
  }
}

.import-upload-card,
.import-tips-card {
  height: 100%;
}

.dropzone {
  position: relative;
  border: 1.5px dashed #bfdbfe;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.08), transparent 55%),
    linear-gradient(180deg, #f8fbff 0%, var(--slate-50) 100%);
  padding: 2.35rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--blue-500);
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.14), transparent 55%),
    linear-gradient(180deg, var(--blue-50) 0%, #eff6ff 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.dropzone-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--blue-600) 0%, var(--blue-700) 100%);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.dropzone-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.dropzone-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--slate-800);
}

.dropzone-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.file-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--blue-100);
  font-size: 0.8rem;
  color: var(--blue-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.import-tips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.import-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fcfdff 0%, var(--white) 100%);
}

.import-tip strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.88rem;
  color: var(--slate-800);
}

.import-tip span span {
  display: block;
  font-size: 0.8rem;
  color: var(--slate-500);
  line-height: 1.45;
}

.import-tip code {
  font-size: 0.78em;
  background: var(--blue-50);
  color: var(--blue-700);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.import-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
  border-radius: 10px;
}

.import-tip-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.import-tip-icon-blue {
  background: var(--blue-50);
  color: var(--blue-600);
}

.import-tip-icon-green {
  background: var(--green-50);
  color: var(--green-600);
}

.import-tip-icon-teal {
  background: var(--teal-50);
  color: var(--teal-700);
}

.section-title-icon-blue {
  background: var(--blue-50);
  color: var(--blue-600);
}

.section-title-icon-amber {
  background: var(--amber-50);
  color: var(--amber-700);
}

.section-title-icon-teal {
  background: var(--teal-50);
  color: var(--teal-700);
}

/* Progress */
.status-panel {
  margin-top: 1.25rem;
}

.status-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.status-head-main {
  min-width: 0;
}

.status-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--slate-800);
}

.status-sub {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: var(--slate-500);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-idle { background: var(--slate-100); color: var(--slate-600); }
.status-pending { background: var(--slate-100); color: var(--slate-600); }
.status-processing { background: var(--blue-100); color: var(--blue-800); }
.status-completed { background: var(--green-50); color: var(--green-700); }
.status-failed { background: var(--red-50); color: var(--red-600); }
.status-partial { background: var(--amber-50); color: var(--amber-700); }

.progress-track {
  margin-bottom: 1.25rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-500);
}

.progress-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: var(--slate-100);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-600), #60a5fa);
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .metric-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--slate-200);
  background: var(--white);
}

.metric-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--metric-accent, var(--blue-600));
}

.metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  background: var(--metric-icon-bg, var(--blue-50));
  color: var(--metric-accent, var(--blue-600));
}

.metric-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.metric-card.is-highlight {
  border-color: var(--metric-border, var(--blue-100));
  background: var(--metric-bg, var(--blue-50));
}

.metric-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-500);
}

.metric-card.is-highlight .metric-label {
  color: var(--metric-accent, var(--blue-700));
}

.metric-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-800);
}

.metric-card.is-highlight .metric-value {
  color: var(--metric-accent, var(--blue-700));
}

.metric-card-green {
  --metric-accent: var(--green-600);
  --metric-icon-bg: var(--green-50);
  --metric-border: #d1fae5;
  --metric-bg: linear-gradient(180deg, #f4fdf8 0%, var(--white) 75%);
  background: linear-gradient(180deg, #f4fdf8 0%, var(--white) 75%);
  border-color: #d1fae5;
}

.metric-card-blue {
  --metric-accent: var(--blue-600);
  --metric-icon-bg: var(--blue-50);
  background: linear-gradient(180deg, #f8fbff 0%, var(--white) 75%);
  border-color: #dbeafe;
}

.metric-card-amber {
  --metric-accent: var(--amber-600);
  --metric-icon-bg: var(--amber-50);
  background: linear-gradient(180deg, #fffaf0 0%, var(--white) 75%);
  border-color: #fef3c7;
}

.metric-card-red {
  --metric-accent: var(--red-600);
  --metric-icon-bg: var(--red-50);
  background: linear-gradient(180deg, #fff7f7 0%, var(--white) 75%);
  border-color: #fecaca;
}

.metric-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-100);
}

.metric-details summary {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-500);
  cursor: pointer;
  user-select: none;
}

.metric-details summary:hover {
  color: var(--blue-600);
}

.metric-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-top: 0.85rem;
}

@media (min-width: 640px) {
  .metric-details-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-mini {
  font-size: 0.8rem;
  color: var(--slate-500);
}

.metric-mini strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
  color: var(--slate-800);
}

.status-running {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.84rem;
  color: var(--slate-500);
}

.status-running.is-visible {
  display: flex;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--blue-100);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Records */
.registry-card {
  overflow: hidden;
}

.registry-card .table-footer,
.registry-card .registry-toolbar {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.registry-card .page-head,
.desk-main-wide .page-head {
  margin-bottom: 1.15rem;
}

.registry-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  background: linear-gradient(180deg, #fcfdff 0%, var(--white) 100%);
}

.registry-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: stretch;
}

.registry-toolbar-row-search {
  display: flex;
  gap: 0.7rem;
  align-items: stretch;
}

.registry-toolbar-row-search .field-grow {
  flex: 1 1 auto;
}

.registry-toolbar-row-main {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: stretch;
}

.registry-toolbar-row-main .field-sm {
  flex: none;
  max-width: none;
  width: 100%;
}

.registry-toolbar-row-insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--slate-100);
}

.registry-toolbar .field-grow {
  flex: 1 1 240px;
  min-width: 0;
}

.registry-toolbar .field-sm {
  min-width: 0;
}

.registry-toolbar .field-md {
  min-width: 0;
  width: 100%;
}

.registry-toolbar .form-input,
.registry-toolbar .form-select {
  min-height: 2.5rem;
  border-radius: 8px;
}

.registry-toolbar .btn {
  min-height: 2.5rem;
  border-radius: 8px;
  flex: 0 0 auto;
  align-self: stretch;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (max-width: 1200px) {
  .registry-toolbar-row-main {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .registry-toolbar-row-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .registry-toolbar-row-main,
  .registry-toolbar-row-insights {
    grid-template-columns: 1fr;
  }

  .registry-toolbar-row-search {
    flex-direction: column;
  }
}

.column-picker-field {
  position: relative;
  z-index: 5;
}

.column-picker {
  position: relative;
  width: 100%;
}

.column-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  cursor: pointer;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.column-picker-caret {
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.1rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  flex-shrink: 0;
}

.column-picker.is-open .column-picker-caret {
  margin-top: 0.15rem;
  transform: rotate(-135deg);
}

.column-picker-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 30;
  min-width: 13rem;
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.4rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.column-picker-actions {
  display: flex;
  gap: 0.35rem;
  padding: 0.2rem 0.25rem 0.45rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--slate-100);
}

.column-picker-action {
  flex: 1 1 0;
  padding: 0.4rem 0.5rem;
  border: 0;
  border-radius: 7px;
  background: var(--slate-50);
  color: var(--blue-700);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.column-picker-action:hover {
  background: var(--blue-50);
  color: var(--blue-800);
}

.column-picker-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--slate-700);
  cursor: pointer;
  user-select: none;
}

.column-picker-option:hover {
  background: var(--slate-50);
}

.column-picker-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue-600);
  cursor: pointer;
}

#recordsTable [data-col].is-col-hidden {
  display: none;
}

.social-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
}

.social-links-sep {
  color: var(--slate-400);
  font-weight: 500;
}

.social-link {
  white-space: nowrap;
}

.desk-main-wide .cell-url {
  max-width: 300px;
}

.desk-main-wide .cell-insight {
  max-width: 260px;
}

.desk-main-wide .data-table-sticky {
  max-height: min(62vh, 820px);
  margin: 0.35rem 0;
}

.registry-loader {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.registry-loader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.registry-loader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.registry-loader-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  text-align: center;
  animation: registryLoaderIn 0.28s ease;
}

@keyframes registryLoaderIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.registry-loader-spinner {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1.1rem;
}

.registry-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--blue-100);
  border-top-color: var(--blue-600);
  animation: spin 0.85s linear infinite;
}

.registry-loader-ring-delay {
  inset: 0.45rem;
  border-width: 2px;
  border-color: rgba(37, 99, 235, 0.12);
  border-bottom-color: #60a5fa;
  animation: spin 1.1s linear infinite reverse;
}

.registry-loader-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--slate-800);
  letter-spacing: -0.02em;
}

.registry-loader-sub {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--slate-500);
}

body.registry-is-loading {
  cursor: progress;
}

body.registry-is-loading .registry-toolbar,
body.registry-is-loading .data-table-wrap,
body.registry-is-loading .table-footer,
body.registry-is-loading .registry-split-sidebar,
body.registry-is-loading .leads-filter-actions {
  pointer-events: none;
}

#leadsFilterForm button[type='submit'].is-loading {
  position: relative;
  opacity: 0.88;
}

#btnApplyFilters {
  position: relative;
  min-width: 5.5rem;
}

#btnApplyFilters .registry-btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

#btnApplyFilters.is-loading .registry-btn-spinner {
  display: inline-block;
}

#btnApplyFilters.is-loading .btn-label {
  opacity: 0.88;
}

#recordSaveBtn {
  position: relative;
  min-width: 5.75rem;
}

#recordSaveBtn .record-save-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: -2px;
  margin-right: 0.4rem;
}

#recordSaveBtn.is-loading .record-save-spinner {
  display: inline-block;
}

#recordSaveBtn.is-loading .btn-label {
  opacity: 0.88;
}

#recordModal.is-saving .modal-close,
#recordModal.is-saving [data-close-modal].btn,
#recordModal.is-saving #btnAddMoreUrl {
  pointer-events: none;
  opacity: 0.55;
}

.form-input,
.form-select {
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--slate-800);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.bulk-notice {
  display: none;
  padding: 0.65rem 1.25rem;
  background: var(--red-50);
  border-bottom: 1px solid rgba(220, 38, 38, 0.12);
  font-size: 0.84rem;
  color: var(--red-600);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bulk-notice.is-visible {
  display: flex;
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table-sticky,
.column-picker-panel,
.action-menu-panel {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.data-table-sticky::-webkit-scrollbar,
.column-picker-panel::-webkit-scrollbar,
.action-menu-panel::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.data-table-sticky::-webkit-scrollbar-track,
.column-picker-panel::-webkit-scrollbar-track,
.action-menu-panel::-webkit-scrollbar-track {
  background: transparent;
}

.data-table-sticky::-webkit-scrollbar-thumb,
.column-picker-panel::-webkit-scrollbar-thumb,
.action-menu-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.data-table-sticky::-webkit-scrollbar-thumb:hover,
.column-picker-panel::-webkit-scrollbar-thumb:hover,
.action-menu-panel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.data-table-sticky::-webkit-scrollbar-corner {
  background: transparent;
}

.table-hscroll {
  display: none !important;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.data-table thead th {
  padding: 0.95rem 1.15rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate-500);
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
  white-space: nowrap;
  vertical-align: middle;
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.th-sort:hover,
.th-sort.is-active {
  color: var(--blue-700);
}

.sort-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  width: 0.7rem;
  flex-shrink: 0;
}

.sort-icon-up,
.sort-icon-down {
  width: 0;
  height: 0;
  border-left: 0.22rem solid transparent;
  border-right: 0.22rem solid transparent;
  opacity: 0.35;
}

.sort-icon-up {
  border-bottom: 0.28rem solid currentColor;
}

.sort-icon-down {
  border-top: 0.28rem solid currentColor;
}

.th-sort:hover .sort-icon-up,
.th-sort:hover .sort-icon-down {
  opacity: 0.7;
}

.th-sort.is-active.is-asc .sort-icon-up,
.th-sort.is-active.is-desc .sort-icon-down {
  opacity: 1;
  color: var(--blue-600);
}

.th-sort.is-active.is-asc .sort-icon-down,
.th-sort.is-active.is-desc .sort-icon-up {
  opacity: 0.25;
}

.data-table tbody td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.col-check {
  width: 44px;
  text-align: center;
}

.data-table th.col-check,
.data-table td.col-check {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--white);
  box-shadow: 6px 0 10px -8px rgba(15, 23, 42, 0.14);
}

.data-table thead th.col-check {
  top: 0;
  z-index: 4;
  background: var(--slate-50);
}

.data-table tbody tr:hover td.col-check {
  background: #f8fbff;
}

.data-table th.col-actions,
.data-table td.col-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  text-align: right;
  white-space: nowrap;
  min-width: 11rem;
  padding-left: 0.85rem;
  padding-right: 1rem;
  background: var(--white);
  box-shadow: -8px 0 10px -8px rgba(15, 23, 42, 0.18);
}

.data-table thead th.col-actions {
  top: 0;
  z-index: 4;
  background: var(--slate-50);
}

.data-table tbody tr:hover td.col-actions {
  background: #f8fbff;
}

.data-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--blue-600);
  cursor: pointer;
}

.cell-url {
  color: var(--blue-600);
  max-width: 300px;
}

.cell-url .url-copy {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}

.cell-status {
  white-space: nowrap;
  vertical-align: middle;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  border: 1px solid transparent;
}

.status-active {
  background: #ecfdf3;
  color: #067647;
  border-color: #abefc6;
}

.status-password-protected {
  background: #fffaeb;
  color: #b54708;
  border-color: #fedf89;
}

.status-not-active {
  background: #fef3f2;
  color: #b42318;
  border-color: #fecdca;
}

.status-not-shopify {
  background: #f8fafc;
  color: #475467;
  border-color: #e4e7ec;
}

.cell-insight {
  max-width: 240px;
  font-size: 0.84rem;
  color: var(--slate-700);
  line-height: 1.45;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-insight-empty {
  color: var(--slate-400);
  font-style: italic;
  max-width: none;
  white-space: nowrap;
}

#recordsTable td[data-col="email"],
#recordsTable td[data-col="secondary_email"],
#recordsTable td[data-col="other_email"],
#recordsTable td[data-col="phone"] {
  max-width: 260px;
}

#recordsTable td[data-col="shop_apps"],
#recordsTable td[data-col="what_they_sell"] {
  max-width: 240px;
}

.cell-num,
#recordsTable thead th[data-col="monthly_traffic"],
#recordsTable thead th[data-col="monthly_revenue"],
#recordsTable thead th[data-col="daily_orders"],
#recordsTable thead th[data-col="scrape_token_used"],
#recordsTable td[data-col="monthly_traffic"],
#recordsTable td[data-col="monthly_revenue"],
#recordsTable td[data-col="daily_orders"],
#recordsTable td[data-col="scrape_token_used"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
  max-width: none;
}

#recordsTable thead th[data-col="monthly_traffic"] .th-sort,
#recordsTable thead th[data-col="monthly_revenue"] .th-sort,
#recordsTable thead th[data-col="daily_orders"] .th-sort,
#recordsTable thead th[data-col="scrape_token_used"] .th-sort {
  justify-content: flex-end;
  width: 100%;
}

.cell-report {
  min-width: 7.5rem;
  max-width: 9rem;
}

.cell-report-action {
  max-width: none;
  white-space: nowrap;
}

.report-pdf-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.cell-actions {
  white-space: nowrap;
  text-align: right;
}

.ar-delete-btn {
  min-width: 4.5rem;
}

.audited-reports-table .ar-sticky-domain {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 11rem;
  max-width: 16rem;
  background: var(--white);
  box-shadow: 8px 0 12px rgba(15, 23, 42, 0.04);
}

.audited-reports-table .ar-sticky-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--white);
  box-shadow: -8px 0 12px rgba(15, 23, 42, 0.04);
}

.audited-reports-table thead .ar-sticky-domain,
.audited-reports-table thead .ar-sticky-actions {
  background: var(--slate-50);
  z-index: 4;
}

.data-table-sticky.leads-table-wrap .audited-reports-table thead th {
  z-index: 3;
}

.data-table-sticky.leads-table-wrap .audited-reports-table thead .ar-sticky-domain,
.data-table-sticky.leads-table-wrap .audited-reports-table thead .ar-sticky-actions {
  z-index: 5;
}

.report-link {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--blue-100);
  border-radius: 7px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.report-link:hover {
  border-color: var(--blue-500);
  background: var(--white);
}

.type-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
}

.cell-date {
  font-size: 0.8rem;
  color: var(--slate-500);
  white-space: nowrap;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  justify-content: flex-end;
}

.btn-text {
  background: none;
  border: none;
  padding: 0.35rem 0.55rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  border-radius: 6px;
  line-height: 1.2;
}

.btn-text:hover {
  color: var(--blue-600);
  background: var(--blue-50);
}

.btn-text-danger {
  color: var(--red-600);
}

.btn-text-danger:hover {
  background: var(--red-50);
  color: var(--red-600);
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--slate-500);
}

.empty-state p {
  margin: 0;
  font-size: 0.925rem;
}

.empty-state a {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: none;
}

.empty-state a:hover {
  text-decoration: underline;
}

.table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.95rem 1.35rem;
  border-top: 1px solid var(--slate-100);
  background: var(--slate-50);
}

.table-footer-top {
  border-top: none;
  border-bottom: 1px solid var(--slate-100);
}

.table-footer-info {
  font-size: 0.84rem;
  color: var(--slate-500);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.modal-overlay.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.modal-dialog {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-content.confirm-content {
  max-width: 26.5rem;
  width: min(100%, 26.5rem);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-100);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--slate-400);
  cursor: pointer;
  padding: 0;
}

.modal-close:hover {
  color: var(--slate-700);
}

.modal-body {
  padding: 1.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--slate-700);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0 1.25rem 1.25rem;
}

.record-url-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.record-url-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.record-url-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.record-url-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--slate-700);
}

.record-url-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.record-url-field .form-input {
  flex: 1;
  min-width: 0;
}

.record-url-field .btn-remove-url {
  flex-shrink: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}

.record-url-field .btn-remove-url[hidden] {
  display: none;
}

.record-url-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.15rem;
}

.record-url-actions[hidden],
#recordForm.is-edit-mode .record-url-actions {
  display: none !important;
}

#recordForm.is-edit-mode .btn-remove-url {
  display: none !important;
}

.record-url-limit {
  font-size: 0.78rem;
  color: var(--slate-500);
}

.record-url-actions .btn-text:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.record-registry-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-200);
}

.record-info-section {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-200);
}

#recordForm.is-edit-mode .record-info-section {
  display: flex;
}

.record-info-lead {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: var(--slate-600);
  line-height: 1.45;
}

/* Toast */
.desk-toast-root {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 220;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.desk-toast {
  min-width: 240px;
  max-width: 360px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.25s ease;
}

.desk-toast.is-success { background: var(--blue-700); }
.desk-toast.is-error { background: var(--red-600); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Error page */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--slate-50);
}

.error-card {
  text-align: center;
  max-width: 420px;
  padding: 2.5rem 2rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.error-code {
  font-size: 3rem;
  font-weight: 700;
  color: var(--blue-600);
  letter-spacing: -0.03em;
  line-height: 1;
}

.error-message {
  margin: 1rem 0 1.5rem;
  font-size: 1rem;
  color: var(--slate-600);
  line-height: 1.5;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--blue-600);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus {
  left: 1rem;
  top: 0;
}

.btn:focus-visible,
.desk-nav-link:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.btn-text:focus-visible,
.url-copy:focus-visible,
.modal-close:focus-visible,
[data-close-modal]:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

/* Breadcrumbs */
.desk-breadcrumbs {
  margin-bottom: 0;
}

.desk-breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--slate-500);
}

.desk-breadcrumb-item:not(:last-child)::after {
  content: '/';
  margin-left: 0.35rem;
  color: var(--slate-400);
}

.desk-breadcrumb-item a {
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 500;
}

.desk-breadcrumb-item a:hover {
  text-decoration: underline;
}

.desk-breadcrumb-item span {
  color: var(--slate-700);
  font-weight: 600;
}

/* Dashboard */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.05rem 1.15rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--kpi-accent, var(--blue-600));
}

.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.kpi-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-500);
  line-height: 1.35;
}

.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--kpi-icon-bg, var(--blue-50));
  color: var(--kpi-accent, var(--blue-600));
}

.kpi-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.kpi-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-800);
}

.kpi-value-sm {
  font-size: 1.1rem;
  line-height: 1.3;
}

.kpi-card-blue {
  --kpi-accent: var(--blue-600);
  --kpi-icon-bg: var(--blue-50);
  background: linear-gradient(180deg, #f8fbff 0%, var(--white) 70%);
  border-color: #dbeafe;
}

.kpi-card-green {
  --kpi-accent: var(--green-600);
  --kpi-icon-bg: var(--green-50);
  background: linear-gradient(180deg, #f4fdf8 0%, var(--white) 70%);
  border-color: #d1fae5;
}

.kpi-card-amber {
  --kpi-accent: var(--amber-600);
  --kpi-icon-bg: var(--amber-50);
  background: linear-gradient(180deg, #fffaf0 0%, var(--white) 70%);
  border-color: #fef3c7;
}

.kpi-card-slate {
  --kpi-accent: var(--slate-600);
  --kpi-icon-bg: var(--slate-100);
  background: linear-gradient(180deg, #f8fafc 0%, var(--white) 70%);
  border-color: var(--slate-200);
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-800);
}

.section-title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.section-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 8px;
  background: var(--teal-50);
  color: var(--teal-700);
}

.section-title-icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.section-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-600);
  text-decoration: none;
}

.section-link:hover {
  text-decoration: underline;
}

.quick-actions {
  display: grid;
  gap: 0.65rem;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.quick-action:hover {
  transform: translateY(-1px);
}

.quick-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--action-icon-bg, var(--blue-50));
  color: var(--action-accent, var(--blue-600));
}

.quick-action-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.quick-action-copy {
  min-width: 0;
}

.quick-action-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-800);
}

.quick-action-desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--slate-500);
}

.quick-action-import {
  --action-accent: var(--blue-600);
  --action-icon-bg: var(--blue-50);
}

.quick-action-import:hover {
  border-color: var(--blue-100);
  background: var(--blue-50);
}

.quick-action-registry {
  --action-accent: var(--teal-700);
  --action-icon-bg: var(--teal-50);
}

.quick-action-registry:hover {
  border-color: var(--teal-100);
  background: var(--teal-50);
}

.quick-action-sample {
  --action-accent: var(--amber-700);
  --action-icon-bg: var(--amber-50);
}

.quick-action-sample:hover {
  border-color: var(--amber-100);
  background: var(--amber-50);
}

.summary-list {
  margin: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--slate-100);
  font-size: 0.875rem;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row dt {
  color: var(--slate-500);
  font-weight: 500;
}

.summary-row dd {
  margin: 0;
  color: var(--slate-800);
  font-weight: 600;
  text-align: right;
}

.summary-positive {
  color: var(--green-700);
}

.summary-negative {
  color: var(--red-600);
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--slate-100);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-main {
  font-size: 0.875rem;
  color: var(--slate-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-meta {
  font-size: 0.78rem;
  color: var(--slate-500);
}

.muted-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--slate-500);
}

.muted-text a {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: none;
}

.muted-text a:hover {
  text-decoration: underline;
}

/* Import completion */
.completion-card {
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--blue-100);
  background: var(--blue-50);
}

.completion-card[hidden] {
  display: none !important;
}

.completion-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-800);
}

.completion-summary {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.5;
}

.completion-card.is-error {
  border-color: rgba(220, 38, 38, 0.2);
  background: var(--red-50);
}

.completion-card.is-warning {
  border-color: rgba(180, 83, 9, 0.2);
  background: var(--amber-50);
}

/* Loading skeleton */
.metric-grid.is-loading .metric-value {
  color: transparent;
  background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-200) 50%, var(--slate-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 4px;
  min-height: 1.35rem;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Registry polish */
.data-table-sticky {
  max-height: min(70vh, 720px);
  overflow: auto;
}

.data-table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 var(--slate-200);
}

.url-copy {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--blue-600);
  cursor: pointer;
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}

.url-copy:hover {
  text-decoration: underline;
}

.empty-state-hint {
  margin-top: 0.5rem !important;
  font-size: 0.85rem !important;
}

/* Confirm modal */
.confirm-message {
  margin: 0;
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--slate-600);
  white-space: pre-line;
}

.confirm-message:has(.confirm-summary) {
  white-space: normal;
}

.confirm-summary {
  display: grid;
  gap: 0.9rem;
}

.confirm-summary-lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--slate-700);
  font-weight: 500;
}

.confirm-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.confirm-summary-metric {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0.7rem 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.65rem;
  background: #f8fafc;
  text-align: center;
  min-width: 0;
}

.confirm-summary-metric.is-primary {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.06);
}

.confirm-summary-metric.is-warn {
  border-color: rgba(180, 83, 9, 0.28);
  background: rgba(255, 247, 237, 0.95);
}

.confirm-summary-metric dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.confirm-summary-metric dd {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.confirm-summary-note {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #334155;
  background: #f1f5f9;
}

.confirm-summary-note.is-warn {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.18);
}

.confirm-summary-note.is-alert {
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid rgba(244, 63, 94, 0.16);
}

.confirm-summary-foot {
  margin: 0;
  font-size: 0.84rem;
  color: #64748b;
}

@media (max-width: 420px) {
  .confirm-summary-metrics {
    grid-template-columns: 1fr;
  }
}

.modal-footer [data-confirm-cancel][hidden] {
  display: none !important;
}

/* Toast dismiss */
.desk-toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.desk-toast-text {
  flex: 1;
}

.desk-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.desk-toast-close:hover {
  color: var(--white);
}

@media (max-width: 900px) {
  .desk-nav-link {
    padding: 0.5rem 0.7rem;
    font-size: 0.78rem;
  }

  .desk-nav-label-full {
    display: none;
  }

  .desk-nav-label-short {
    display: block;
  }
}

@media (max-width: 1100px) {
  .desk-header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'brand nav'
      'product product';
  }

  .desk-header-brand {
    grid-area: brand;
  }

  .desk-header-product {
    grid-area: product;
    max-width: none;
    justify-self: stretch;
    text-align: left;
    padding: 0.15rem 0 0;
  }

  .desk-nav {
    grid-area: nav;
  }
}

@media (max-width: 768px) {
  .desk-header-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      'brand'
      'product'
      'nav';
    padding: 0.85rem 1.15rem;
    min-height: 0;
  }

  .desk-header-brand {
    width: 100%;
  }

  .desk-tool-name {
    font-size: 1.05rem;
  }

  .desk-tool-team {
    font-size: 0.72rem;
    white-space: normal;
  }

  .desk-header-product {
    text-align: left;
    padding: 0;
  }

  .desk-header-product-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #bfdbfe;
  }

  .desk-nav {
    width: 100%;
    justify-content: stretch;
  }

  .desk-nav-link {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.55rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .desk-brand-divider {
    display: none;
  }

  .desk-header-brand {
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .desk-main,
  .desk-main-wide {
    width: calc(100% - 1.5rem);
    padding-top: 0.65rem;
  }

  .desk-shell-wide .desk-header-inner,
  .desk-shell-wide .desk-footer-inner {
    width: calc(100% - 1.5rem);
  }

  .page-actions {
    width: 100%;
  }

  .page-actions-cluster {
    width: 100%;
  }

  .page-actions-cluster-end {
    margin-left: 0;
  }

  .page-actions .btn,
  .page-actions .action-menu {
    flex: 1 1 calc(50% - 0.25rem);
  }

  .page-actions-cluster-end .btn {
    flex: 1 1 100%;
  }

  .action-menu-panel {
    left: auto;
    right: 0;
    width: min(18rem, calc(100vw - 2rem));
  }

  .registry-toolbar .field-sm,
  .registry-toolbar .field-md {
    flex: 1 1 100%;
    max-width: none;
  }
}

/* Hooks outreach modal */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-hooks {
  color: var(--blue-700);
}

.btn-hooks:hover {
  color: var(--blue-800);
  background: var(--blue-50);
}

.btn-run-cro {
  color: var(--blue-700);
}

.btn-run-cro:hover {
  color: var(--blue-800);
  background: var(--blue-50);
}

.btn-run-cro:disabled {
  opacity: 0.65;
  cursor: wait;
  pointer-events: none;
}

.hooks-modal .modal-backdrop {
  background: rgba(15, 23, 42, 0.4);
}

.hooks-dialog {
  padding: 1.25rem;
}

.hooks-modal-content {
  max-width: 820px;
  width: min(820px, calc(100vw - 2.5rem));
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.hooks-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  color: var(--slate-800);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hooks-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--slate-100);
  background: var(--slate-50);
}

.hooks-toolbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  flex-shrink: 0;
}

.hooks-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
  padding: 0.2rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
}

.hooks-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--slate-500);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.hooks-tab-ico {
  display: inline-flex;
  opacity: 0.8;
}

.hooks-tab:hover {
  color: var(--slate-700);
  background: var(--slate-50);
}

.hooks-tab.is-active {
  background: var(--navy);
  color: var(--white);
}

.hooks-tab.is-active .hooks-tab-ico {
  opacity: 1;
}

.hooks-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.hooks-icon-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--slate-500);
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hooks-icon-btn:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

.hooks-body {
  position: relative;
  min-height: 340px;
  padding: 1.4rem 1.5rem 1.6rem;
  background: var(--white);
}

.hooks-loading,
.hooks-error,
.hooks-email {
  display: none;
}

.hooks-body[data-hooks-state="loading"] .hooks-loading,
.hooks-body[data-hooks-state="ready"] .hooks-email,
.hooks-body[data-hooks-state="error"] .hooks-error {
  display: flex;
}

.hooks-loading,
.hooks-error {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 280px;
  text-align: center;
  color: var(--slate-500);
}

.hooks-loading p,
.hooks-error p {
  margin: 0;
  font-size: 0.9rem;
}

.hooks-loading-spinner {
  width: 1.65rem;
  height: 1.65rem;
  border: 2px solid var(--slate-200);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: hooks-spin 0.65s linear infinite;
}

@keyframes hooks-spin {
  to { transform: rotate(360deg); }
}

.hooks-retry {
  appearance: none;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-700);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
}

.hooks-retry:hover {
  background: var(--blue-50);
  border-color: var(--blue-100);
  color: var(--blue-700);
}

.hooks-email {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  animation: hooks-fade-in 0.22s ease;
}

@keyframes hooks-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.hooks-subject-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.hooks-subject {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--navy);
}

.hooks-subject-code {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--slate-500);
  word-break: break-word;
}

.hooks-divider {
  height: 1px;
  margin: 1.1rem 0 1.15rem;
  background: var(--slate-100);
}

.hooks-message {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--slate-600);
}

.hooks-message p {
  margin: 0 0 0.95rem;
}

.hooks-message p:last-child {
  margin-bottom: 0;
}

.hooks-message .hooks-greet {
  color: var(--slate-800);
  font-weight: 600;
}

.hooks-message .hooks-hook {
  color: var(--navy);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
}

.hooks-message .hooks-signoff {
  margin-top: 1.25rem;
  color: var(--slate-500);
  line-height: 1.55;
}

.hooks-message strong {
  color: var(--slate-800);
  font-weight: 700;
}

@media (max-width: 640px) {
  .hooks-toolbar {
    flex-wrap: wrap;
  }

  .hooks-tabs {
    order: 3;
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .hooks-tab {
    flex: 1;
    justify-content: center;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    font-size: 0.72rem;
  }

  .hooks-body {
    padding: 1.15rem 1.1rem 1.3rem;
    min-height: 300px;
  }

  .hooks-subject {
    font-size: 1.15rem;
  }
}

.leads-table {
  table-layout: auto;
}

.leads-view-col {
  width: 1%;
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
}

.leads-table th.leads-view-col {
  text-align: left;
}

.leads-row-actions {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.lead-cell-main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.lead-cell-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--slate-800);
}

.lead-avatar,
.lead-app-icon,
.lead-stat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
}

.lead-avatar {
  width: 34px;
  height: 34px;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid #dbeafe;
}

.lead-avatar-merchant {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.lead-avatar-lg {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.lead-avatar svg,
.lead-app-icon svg,
.lead-stat-ico svg,
#leadModalIconFallback {
  width: 18px;
  height: 18px;
}

.lead-avatar-lg svg,
#leadModalIconFallback {
  width: 22px;
  height: 22px;
}

.lead-avatar-img,
#leadModalIcon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.btn-lead-view {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue-500) 0%, var(--blue-600) 100%);
  color: var(--white);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
}

.btn-lead-view svg {
  width: 15px;
  height: 15px;
}

.btn-lead-view:hover {
  filter: brightness(1.05);
}

body.lead-modal-open {
  overflow: hidden;
}

.lead-modal.is-open {
  overflow: hidden;
}

.lead-modal .modal-dialog {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  align-items: center;
  padding: 1rem;
}

.lead-modal-content {
  width: min(1360px, calc(100vw - 1.5rem));
  max-width: min(1360px, calc(100vw - 1.5rem));
  max-height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.lead-modal-header {
  flex: 0 0 auto;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.35rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 55%, #fff 100%);
}

.lead-modal-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.lead-modal-heading h2 {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.lead-modal-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--slate-500);
  word-break: break-all;
}

.lead-modal-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.15rem 1.35rem 1.4rem;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 28%),
    #f8fafc;
}

.lead-modal-body::-webkit-scrollbar {
  width: 10px;
}

.lead-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid #f8fafc;
}

.lead-detail {
  display: grid;
  gap: 1rem;
}

.lead-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.lead-stat {
  min-width: 0;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lead-stat-ico {
  width: 32px;
  height: 32px;
  margin-bottom: 0.55rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.7);
}

.lead-stat-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lead-stat-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.35;
  word-break: break-word;
}

.lead-stat-blue { background: #eff6ff; border-color: #dbeafe; color: #1d4ed8; }
.lead-stat-violet { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.lead-stat-teal { background: #f0fdfa; border-color: #99f6e4; color: #0f766e; }
.lead-stat-amber { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.lead-stat-rose { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.lead-stat-indigo { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.lead-stat-green { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.lead-stat-sky { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
.lead-stat-orange { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.lead-stat-lime { background: #f7fee7; border-color: #d9f99d; color: #3f6212; }
.lead-stat-slate { background: #f8fafc; border-color: #e2e8f0; color: #475569; }

.lead-panel {
  padding: 1rem 1.05rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lead-panel h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.lead-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
}

.lead-detail-desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--slate-600);
}

.lead-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lead-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.lead-chip-muted {
  background: #fef3c7;
  color: #92400e;
}

.lead-contact-grid,
.lead-app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.lead-contact-card {
  min-width: 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid #e0e7ff;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
}

.lead-contact-type,
.lead-app-state {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: capitalize;
  white-space: nowrap;
}

.lead-contact-type.type-facebook { background: #dbeafe; color: #1d4ed8; }
.lead-contact-type.type-instagram { background: #fce7f3; color: #be185d; }
.lead-contact-type.type-youtube { background: #fee2e2; color: #b91c1c; }
.lead-contact-type.type-tiktok,
.lead-contact-type.type-twitter,
.lead-contact-type.type-x { background: #e2e8f0; color: #0f172a; }
.lead-contact-type.type-pinterest { background: #ffe4e6; color: #be123c; }
.lead-contact-type.type-linkedin { background: #dbeafe; color: #1e40af; }
.lead-contact-type.type-email { background: #dcfce7; color: #166534; }
.lead-contact-type.type-phone { background: #cffafe; color: #155e75; }

.lead-contact-link {
  display: block;
  margin-top: 0.45rem;
  color: var(--blue-700);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  word-break: break-all;
}

.lead-contact-link:hover {
  text-decoration: underline;
}

.lead-contact-link.is-text {
  color: var(--slate-700);
}

.lead-app-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 72%);
  overflow: hidden;
}

.lead-app-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dbeafe;
  color: #2563eb;
  overflow: hidden;
  object-fit: cover;
}

.lead-app-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.lead-app-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.lead-app-name {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-800);
  text-decoration: none;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

a.lead-app-name:hover {
  color: var(--blue-700);
}

.lead-app-state {
  flex: 0 0 auto;
  background: #e2e8f0;
  color: #334155;
}

.lead-app-state.is-active {
  background: #dcfce7;
  color: #166534;
}

.lead-loading {
  padding: 1.5rem 0.25rem;
  font-size: 0.92rem;
  color: var(--slate-500);
}

.lead-fold {
  min-width: 0;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.lead-fold + .lead-fold,
.lead-fold-stack > .lead-fold + .lead-fold,
.lead-fold-stack > .lead-field + .lead-fold,
.lead-fold-stack > .lead-fold + .lead-field {
  margin-top: 0.65rem;
}

.lead-fold-summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.lead-fold-summary::-webkit-details-marker {
  display: none;
}

.lead-fold-summary::marker {
  content: '';
}

.lead-fold-chevron {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  margin-top: -2px;
}

.lead-fold[open] > .lead-fold-summary .lead-fold-chevron {
  transform: rotate(45deg);
  margin-top: 0;
}

.lead-fold-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate-600);
}

.lead-fold-meta {
  flex: 0 0 auto;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
}

.lead-fold-body {
  min-width: 0;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid #f1f5f9;
}

.lead-fold-stack {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.lead-fold-stack > .lead-fold {
  box-shadow: none;
  background: #fcfdff;
}

.lead-fold-stack > .lead-fold > .lead-fold-summary {
  background: #f8fafc;
  padding: 0.7rem 0.85rem;
}

.lead-fold-stack > .lead-fold > .lead-fold-summary .lead-fold-title {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.84rem;
  color: var(--slate-700);
}

.lead-fold-stack > .lead-fold > .lead-fold-body {
  padding: 0.75rem 0.85rem 0.85rem;
}

.lead-app-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.lead-field {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  gap: 0.85rem 1rem;
  align-items: start;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: #fff;
}

.lead-field-key {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--slate-500);
  word-break: break-word;
}

.lead-field-val {
  min-width: 0;
  font-size: 0.9rem;
  color: var(--slate-800);
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lead-field-text {
  white-space: pre-wrap;
}

.lead-field-empty,
.lead-empty {
  margin: 0;
  color: var(--slate-400);
  font-size: 0.86rem;
}

.lead-json-link {
  color: var(--blue-700);
  text-decoration: none;
  word-break: break-all;
}

.lead-json-link:hover {
  text-decoration: underline;
}

.lead-json-image-wrap {
  display: grid;
  gap: 0.45rem;
  justify-items: start;
}

.lead-json-image {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--slate-200);
  background: #fff;
}

.lead-raw-json {
  margin: 0.85rem 0 0;
  padding: 0.9rem 1rem;
  max-height: 420px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.lead-fold-body > .lead-raw-json,
.lead-fold-body > div > .lead-raw-json {
  margin-top: 0;
}

@media (max-width: 980px) {
  .lead-stat-grid,
  .lead-contact-grid,
  .lead-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .lead-stat-grid,
  .lead-contact-grid,
  .lead-app-grid {
    width: auto;
    grid-template-columns: 1fr;
  }

  .leads-table {
    --leads-sticky-store-w: 11.5rem;
    --leads-sticky-country-w: 4.5rem;
    --leads-sticky-categories-w: 11rem;
  }

  .lead-field {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .leads-view-col {
    width: auto !important;
  }
}

/* ===== Store Lead Detail page ===== */
.sld-page-head { align-items: flex-start; gap: 1rem; }
.sld-page-head .page-head-main { display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem; }
.sld-back-btn { display: inline-flex; align-items: center; gap: 0.35rem; flex: 0 0 auto; align-self: flex-start; }
.sld-back-btn svg { width: 16px; height: 16px; }
.sld-head-row { display: flex; align-items: flex-start; gap: 0.85rem; min-width: 0; width: 100%; }
.sld-head-identity { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.sld-head-favicon { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; border: 1px solid var(--slate-200); background: var(--white); flex: 0 0 auto; }
.sld-head-favicon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sld-head-copy { min-width: 0; }
.sld-head-domain { margin: 0.15rem 0 0; color: var(--slate-500); font-size: 0.9rem; word-break: break-all; }
.sld-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.sld-head-actions .btn svg,
.sld-open-btn svg { width: 15px; height: 15px; margin-right: 0.3rem; vertical-align: -2px; }
.sld-open-btn.is-disabled,
a.sld-open-btn.is-disabled { pointer-events: none; opacity: 0.55; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

.sld-sticky-actions {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: none;
  gap: 0.4rem;
  padding: 0.55rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-lg);
}
.sld-sticky-actions.is-visible { display: flex; flex-wrap: wrap; }

.sld-root { display: grid; gap: 1rem; padding-bottom: 2.5rem; }
.sld-skeleton { display: grid; gap: 1rem; }
.sld-skel-hero,
.sld-skel-card,
.sld-skel-block {
  min-height: 120px;
  background: linear-gradient(90deg, var(--slate-100), var(--slate-50), var(--slate-100));
  background-size: 200% 100%;
  animation: sld-shimmer 1.2s linear infinite;
}
.sld-skel-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.sld-skel-card { min-height: 96px; }
.sld-skel-block { min-height: 180px; }
@keyframes sld-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.sld-hero { padding: 1.25rem 1.35rem; }
.sld-hero-top { display: flex; gap: 1rem; align-items: flex-start; }
.sld-hero-logo {
  width: 72px; height: 72px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--slate-200); background: var(--slate-50);
  display: grid; place-items: center; flex: 0 0 auto;
}
.sld-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.sld-hero-fallback svg { width: 32px; height: 32px; color: var(--blue-600); }
.sld-hero-main { min-width: 0; flex: 1 1 auto; }
.sld-hero-name { margin: 0; font-size: 1.45rem; letter-spacing: -0.02em; color: var(--slate-800); }
.sld-hero-domain { display: inline-block; margin-top: 0.25rem; color: var(--blue-700); text-decoration: none; word-break: break-all; }
.sld-hero-domain:hover { text-decoration: underline; }
.sld-hero-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.sld-badge {
  display: inline-flex; align-items: center; padding: 0.22rem 0.6rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; border: 1px solid transparent;
}
.sld-badge-blue { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.sld-badge-violet { background: var(--blue-50); color: var(--blue-800); border-color: var(--blue-100); }
.sld-badge-green { background: var(--green-50); color: var(--green-700); border-color: var(--green-100); }
.sld-badge-amber { background: var(--amber-50); color: var(--amber-700); border-color: var(--amber-100); }
.sld-badge-teal { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-100); }
.sld-badge-slate { background: var(--slate-100); color: var(--slate-700); border-color: var(--slate-200); }
.sld-badge-indigo { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }

.sld-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-100);
}
.sld-hero-meta-item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  min-width: 0;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.sld-hero-meta-item:hover {
  border-color: var(--blue-100);
  background: var(--blue-50);
  box-shadow: var(--shadow-sm);
}
.sld-hero-meta-item .sld-ico-sm {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--blue-700);
}
.sld-hero-meta-item .sld-ico-sm svg {
  width: 14px;
  height: 14px;
}
.sld-hero-meta-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.sld-hero-meta-value {
  margin-top: 0.12rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-800);
  word-break: break-word;
  line-height: 1.35;
}

.sld-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.sld-stat-card {
  padding: 0.95rem 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.sld-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--blue-100);
}
.sld-stat-ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-700); margin-bottom: 0.65rem;
}
.sld-stat-ico svg { width: 18px; height: 18px; }
.sld-stat-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate-500); }
.sld-stat-value { margin-top: 0.2rem; font-size: 1.15rem; font-weight: 700; color: var(--slate-800); }

.sld-section { padding: 1.1rem 1.2rem; }
.sld-section-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
.sld-section-ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--slate-100); color: var(--slate-700); flex: 0 0 auto;
}
.sld-section-ico svg { width: 18px; height: 18px; }
.sld-section-title-wrap { min-width: 0; flex: 1 1 auto; }
.sld-section-title { margin: 0; font-size: 1rem; color: var(--slate-800); }
.sld-section-sub { margin: 0.15rem 0 0; color: var(--slate-500); font-size: 0.84rem; }
.sld-count {
  min-width: 1.5rem; padding: 0.1rem 0.45rem; border-radius: 999px;
  background: var(--blue-50); color: var(--blue-700); font-size: 0.75rem; font-weight: 700;
}

.sld-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.sld-info-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sld-info-row:hover { border-color: var(--blue-100); background: var(--blue-50); }
.sld-info-ico { color: var(--slate-500); margin-top: 0.1rem; }
.sld-info-ico svg, .sld-ico svg, .sld-ico-sm svg { width: 16px; height: 16px; display: block; }
.sld-ico-sm svg { width: 14px; height: 14px; }
.sld-info-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate-500); }
.sld-info-value { margin-top: 0.15rem; font-size: 0.9rem; color: var(--slate-800); word-break: break-word; }
.sld-copy-btn, .sld-icon-btn {
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-600);
  border-radius: 8px;
  width: 30px; height: 30px;
  display: inline-grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.sld-copy-btn:hover, .sld-icon-btn:hover {
  background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100);
}

.sld-chip-wrap { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.sld-chip {
  display: inline-flex; align-items: center; max-width: 100%;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: var(--blue-50); color: var(--blue-700);
  border: 1px solid var(--blue-100);
  font-size: 0.8rem; font-weight: 600; word-break: break-word;
}
.sld-chip-feature { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-100); }
.sld-chip-action { cursor: pointer; font: inherit; }
.sld-chip-action:hover { filter: brightness(0.97); }

.sld-contact-grid, .sld-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}
.sld-contact-card, .sld-tech-card {
  padding: 0.9rem;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 55%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sld-contact-card:hover, .sld-tech-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.sld-contact-top, .sld-tech-top { display: flex; gap: 0.65rem; align-items: flex-start; }
.sld-contact-ico {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--slate-100); color: var(--slate-700); flex: 0 0 auto;
}
.sld-contact-ico svg { width: 18px; height: 18px; }
.sld-contact-ico.type-facebook { background: var(--blue-50); color: var(--blue-700); }
.sld-contact-ico.type-instagram { background: var(--red-50); color: var(--red-600); }
.sld-contact-ico.type-youtube { background: var(--red-50); color: var(--red-600); }
.sld-contact-ico.type-email { background: var(--green-50); color: var(--green-700); }
.sld-contact-ico.type-phone { background: var(--teal-50); color: var(--teal-700); }
.sld-contact-title { min-width: 0; flex: 1 1 auto; }
.sld-contact-type { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-500); }
.sld-contact-metrics { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.sld-metric {
  padding: 0.2rem 0.5rem; border-radius: 999px; background: var(--slate-100);
  color: var(--slate-700); font-size: 0.74rem; font-weight: 600;
}
.sld-metric.is-up { background: var(--green-50); color: var(--green-700); }
.sld-metric.is-down { background: var(--red-50); color: var(--red-600); }
.is-up { color: var(--green-700); }
.is-down { color: var(--red-600); }
.is-flat { color: var(--slate-500); }

.sld-tech-icon, .sld-tech-fallback {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--slate-200); background: var(--white); flex: 0 0 auto;
}
.sld-tech-fallback { display: grid; place-items: center; color: var(--blue-700); background: var(--blue-50); }
.sld-tech-fallback svg { width: 20px; height: 20px; }
.sld-tech-name { font-weight: 700; color: var(--slate-800); }
.sld-tech-cat { margin-top: 0.15rem; font-size: 0.8rem; color: var(--slate-500); }
.sld-tech-meta { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.65rem; font-size: 0.78rem; color: var(--slate-600); }
.sld-tech-vendor { display: inline-block; margin-top: 0.55rem; font-size: 0.82rem; }

.sld-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  margin-top: 0.15rem;
}
.sld-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.sld-table th, .sld-table td {
  padding: 0.7rem 0.85rem; text-align: left; border-bottom: 1px solid var(--slate-100);
  font-size: 0.86rem; vertical-align: middle;
}
.sld-table th {
  background: var(--slate-50); color: var(--slate-500);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.sld-table tr:last-child td { border-bottom: 0; }
.sld-platform-cell { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }

.sld-desc-prose, .sld-desc-text {
  margin: 0; font-size: 0.95rem; line-height: 1.7; color: var(--slate-700); white-space: pre-wrap;
}
.sld-empty, .sld-muted { color: var(--slate-400); }
.sld-link { color: var(--blue-700); text-decoration: none; word-break: break-all; }
.sld-link:hover { text-decoration: underline; }

.sld-mini-fold { margin-top: 0.65rem; }
.sld-mini-fold > summary {
  cursor: pointer; list-style: none; font-size: 0.8rem; font-weight: 700; color: var(--blue-700);
}
.sld-mini-fold > summary::-webkit-details-marker { display: none; }
.sld-mini-fold[open] > summary { margin-bottom: 0.35rem; }

.sld-accordion { overflow: hidden; }
.sld-accordion-summary {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sld-accordion-summary::-webkit-details-marker { display: none; }
.sld-accordion-summary::marker { content: ''; }
.sld-accordion-summary .sld-section-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
}
.sld-accordion-summary .sld-section-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-800);
}
.sld-accordion-chevron {
  margin-left: auto;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-700);
  display: inline-grid;
  place-items: center;
  transition: transform 0.18s ease, background 0.15s ease, border-color 0.15s ease;
}
.sld-accordion-chevron svg {
  width: 16px;
  height: 16px;
  display: block;
}
.sld-accordion-summary:hover .sld-accordion-chevron {
  background: var(--blue-50);
  border-color: var(--blue-100);
  color: var(--blue-700);
}
.sld-accordion[open] > .sld-accordion-summary .sld-accordion-chevron {
  transform: rotate(180deg);
  background: var(--blue-50);
  border-color: var(--blue-100);
  color: var(--blue-700);
}
.sld-accordion-body {
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid var(--slate-100);
  animation: sld-fade 0.18s ease;
}
.sld-accordion-body > .sld-table-wrap,
.sld-accordion-body > .sld-info-grid,
.sld-accordion-body > .sld-contact-grid,
.sld-accordion-body > .sld-tech-grid,
.sld-accordion-body > .sld-chip-wrap,
.sld-accordion-body > .sld-meta-stack,
.sld-section-body > .sld-table-wrap {
  margin-top: 0;
}
@keyframes sld-fade { from { opacity: 0.4; } to { opacity: 1; } }

.sld-meta-stack { display: grid; gap: 0.65rem; padding-top: 0.85rem; }
.sld-meta-stack > .sld-accordion { box-shadow: none; }

.sld-filters {
  position: sticky;
  top: 72px;
  z-index: 40;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

[data-sld-section] {
  scroll-margin-top: var(--sld-sticky-offset, 240px);
}
.sld-filters-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.sld-filters-toolbar .field-grow { flex: 1 1 220px; min-width: 180px; }
.sld-filter-select { min-width: 180px; max-width: 240px; }
.sld-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.sld-filter-chip {
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-700);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.sld-filter-chip:hover {
  border-color: var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-700);
}
.sld-filter-chip.is-active {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: var(--white);
}
.sld-filter-empty { padding: 1.2rem; text-align: center; }

.sld-raw-wrap { padding-top: 0.85rem; }
.sld-raw-actions { display: flex; justify-content: flex-end; margin-bottom: 0.65rem; }
.sld-json {
  margin: 0; padding: 0.95rem 1rem; max-height: 480px; overflow: auto;
  border-radius: 12px; border: 1px solid var(--slate-200);
  background: var(--navy-dark); color: var(--slate-100);
  font-size: 0.78rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.sld-json-key { color: #93c5fd; }
.sld-json-string { color: #86efac; }
.sld-json-number { color: #fcd34d; }
.sld-json-bool { color: #f9a8d4; }
.sld-json-null { color: var(--slate-400); }

@media (max-width: 980px) {
  .sld-skel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sld-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sld-info-grid { grid-template-columns: 1fr; }
  .sld-head-actions { width: 100%; }
  .sld-filters { top: 64px; }
  .sld-hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .sld-page-head { flex-direction: column; }
  .sld-head-row { flex-direction: column; }
  .sld-hero-top { flex-direction: column; }
  .sld-skel-stats { grid-template-columns: 1fr; }
  .sld-stat-grid { grid-template-columns: 1fr; }
  .sld-sticky-actions { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; }
  .sld-filter-select { max-width: none; width: 100%; }
  .sld-hero-meta { grid-template-columns: 1fr; }
}

/* Store Leads detailed filters */
.leads-filter-shell {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.7rem;
}
.leads-filter-panel {
  margin-top: 0;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 42%);
  overflow: hidden;
}
.leads-filter-panel.is-active,
.leads-filter-shell.is-active .leads-filter-panel {
  border-color: var(--blue-100);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.06);
}
.leads-filter-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.05rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.leads-filter-summary::-webkit-details-marker { display: none; }
.leads-filter-summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--slate-400);
  border-bottom: 2px solid var(--slate-400);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}
.leads-filter-panel[open] .leads-filter-summary::after {
  transform: rotate(225deg);
  margin-top: 0.15rem;
}
.leads-filter-summary-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
}
.leads-filter-summary-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
  flex: 0 0 auto;
}
.leads-filter-summary-ico svg { width: 16px; height: 16px; display: block; }
.leads-filter-summary-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-800);
}
.leads-filter-summary-sub {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  color: var(--slate-500);
}
.leads-filter-summary-meta {
  flex: 0 0 auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 0.72rem;
  font-weight: 700;
}
.leads-filter-panel.is-active .leads-filter-summary-meta {
  background: var(--blue-50);
  color: var(--blue-700);
}
.leads-filter-groups {
  display: grid;
  gap: 0.85rem;
}
.leads-filters-body {
  padding: 0 1.05rem 1.05rem;
  border-top: 1px solid var(--slate-100);
}
.leads-filter-group {
  padding: 0;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
}
.leads-filter-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem 0.9rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-500);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.leads-filter-group-title::-webkit-details-marker { display: none; }
.leads-filter-group-title::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--slate-400);
  border-bottom: 2px solid var(--slate-400);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
  margin-top: -0.15rem;
}
.leads-filter-group[open] .leads-filter-group-title {
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-100);
}
.leads-filter-group[open] .leads-filter-group-title::after {
  transform: rotate(225deg);
  margin-top: 0.15rem;
}
.leads-filter-group-title:hover {
  color: var(--slate-700);
  background: var(--slate-50);
}
.leads-filter-group-body {
  padding: 0.85rem 0.9rem 0.9rem;
}
.leads-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.leads-filter-label {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.leads-filter-multi-toolbar {
  margin-bottom: 0.4rem;
}
.leads-filter-multi-search {
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
}
.leads-filter-multi-list {
  display: grid;
  gap: 0.28rem;
  max-height: 10.5rem;
  overflow: auto;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: var(--white);
}
.leads-filter-multi-list:focus-within {
  border-color: var(--blue-200);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.leads-filter-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--slate-700);
  line-height: 1.35;
  cursor: pointer;
}
.leads-filter-check input {
  margin-top: 0.15rem;
  flex: 0 0 auto;
}
.leads-filter-check span {
  overflow-wrap: anywhere;
  word-break: normal;
}
.leads-filter-multi-list [data-multi-option].is-filtered-out {
  display: none;
}
.leads-filter-multi-empty-filter {
  display: block;
  padding: 0.25rem 0.1rem;
  color: var(--slate-500);
  font-size: 0.8rem;
}
.leads-filter-multi-empty-filter.is-hidden {
  display: none;
}
.leads-filter-multi-empty {
  display: block;
  padding: 0.55rem 0.65rem;
  border: 1px dashed var(--slate-200);
  border-radius: 10px;
  color: var(--slate-500);
  font-size: 0.82rem;
}
.leads-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.leads-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.1rem;
}
.leads-range {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
}
.leads-range.is-active {
  border-color: var(--blue-100);
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 70%);
}
.leads-range-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.leads-range-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.leads-range-values {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-800);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.leads-range-sep {
  margin: 0 0.2rem;
  color: var(--slate-400);
}
.leads-range-slider {
  position: relative;
  height: 28px;
  display: grid;
  align-items: center;
}
.leads-range-rail {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  border-radius: 999px;
  background: var(--slate-200);
  overflow: hidden;
}
.leads-range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-500, #3b82f6), var(--blue-700));
}
.leads-range-thumb {
  position: absolute;
  left: 0;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
  margin: 0;
  height: 28px;
}
.leads-range-thumb::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
  border: none;
}
.leads-range-thumb::-moz-range-track {
  height: 8px;
  background: transparent;
  border: none;
}
.leads-range-thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: var(--blue-700);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  margin-top: -5px;
}
.leads-range-thumb::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: var(--blue-700);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  cursor: pointer;
}
.leads-range-thumb:focus {
  outline: none;
}
.leads-range-thumb:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.leads-range-thumb:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.leads-filters {
  margin-top: 0.9rem;
  padding: 0.95rem 1.05rem 1.05rem;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 48%);
}
.leads-filters.is-active {
  border-color: var(--blue-100);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.06);
}
.leads-filters-head {
  margin-bottom: 0.85rem;
}
.leads-filters-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-800);
}
.leads-filters-sub {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--slate-500);
}
.leads-applied-filters {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--blue-100);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 70%);
}
.leads-applied-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.leads-applied-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-700);
}
.leads-applied-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--blue-600);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
}
.leads-applied-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.leads-applied-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0.2rem;
  padding: 0.28rem 0.28rem 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.leads-applied-chip-body {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  padding-right: 0.15rem;
}
.leads-applied-chip-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate-500);
  white-space: nowrap;
}
.leads-applied-chip-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-800);
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leads-applied-chip-remove {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  color: var(--slate-500);
  text-decoration: none;
  flex: 0 0 auto;
  transition: background 0.12s ease, color 0.12s ease;
}
.leads-applied-chip-remove:hover {
  background: var(--slate-100);
  color: var(--slate-800);
}
.leads-applied-chip-remove svg {
  width: 12px;
  height: 12px;
  display: block;
}
.leads-applied-clear {
  justify-self: start;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-700);
  text-decoration: none;
}
.leads-applied-clear:hover {
  text-decoration: underline;
}
.leads-table-wrap {
  overflow-x: auto;
}
.leads-table {
  --leads-sticky-store-w: 15rem;
  --leads-sticky-country-w: 5.75rem;
  --leads-sticky-categories-w: 14rem;
  min-width: 2400px;
  table-layout: auto;
}
.leads-table .leads-sticky-col {
  position: sticky;
  background: var(--white);
  z-index: 2;
}
.leads-table .leads-sticky-store {
  left: 0;
  min-width: var(--leads-sticky-store-w);
  width: var(--leads-sticky-store-w);
  max-width: var(--leads-sticky-store-w);
}
.leads-table .leads-sticky-country {
  left: var(--leads-sticky-store-w);
  min-width: var(--leads-sticky-country-w);
  width: var(--leads-sticky-country-w);
  max-width: var(--leads-sticky-country-w);
}
.leads-table .leads-sticky-categories {
  left: calc(var(--leads-sticky-store-w) + var(--leads-sticky-country-w));
  min-width: var(--leads-sticky-categories-w);
  width: var(--leads-sticky-categories-w);
  max-width: var(--leads-sticky-categories-w);
  box-shadow: 8px 0 12px rgba(15, 23, 42, 0.05);
}
.leads-table thead .leads-sticky-col {
  background: var(--slate-50);
  z-index: 5;
}
.data-table-sticky.leads-table-wrap .leads-table thead th {
  z-index: 3;
}
.data-table-sticky.leads-table-wrap .leads-table thead .leads-sticky-col {
  z-index: 6;
}
.leads-table tbody tr:hover .leads-sticky-col {
  background: #f8fbff;
}
.leads-col-owner {
  min-width: 140px;
}
.leads-col-email {
  min-width: 260px;
  width: 280px;
}
.leads-col-phone {
  min-width: 150px;
  width: 170px;
}
.leads-multi-list {
  display: grid;
  gap: 0.28rem;
}
.leads-multi-item {
  display: block;
  color: var(--blue-700);
  text-decoration: none;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.35;
}
.leads-multi-item:hover {
  text-decoration: underline;
}
.leads-col-categories {
  min-width: var(--leads-sticky-categories-w, 14rem);
  max-width: var(--leads-sticky-categories-w, 14rem);
}
.leads-col-tech {
  min-width: 420px;
  width: 420px;
}
.leads-col-apps {
  min-width: 420px;
  width: 420px;
}
.leads-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.leads-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.leads-tag.is-more,
.leads-multi-item.is-more {
  border-style: dashed;
  color: var(--slate-500);
  font-weight: 500;
}
.lead-store-url {
  color: var(--blue-700);
  text-decoration: none;
  font-weight: 600;
}
.lead-store-url:hover { text-decoration: underline; }
.lead-contact-stack {
  display: grid;
  gap: 0.22rem;
  min-width: 12rem;
}
.lead-contact-line {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.4rem;
  align-items: baseline;
}
.lead-contact-k {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.lead-contact-v {
  font-size: 0.82rem;
  color: var(--slate-800);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.lead-more {
  color: var(--slate-500);
  font-weight: 600;
  font-size: 0.75em;
}
.lead-icp-cell {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}
.lead-icp-score {
  font-weight: 700;
  color: var(--slate-800);
  font-variant-numeric: tabular-nums;
}
.lead-icp-max {
  margin-left: 0.1rem;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--slate-500);
}
.lead-checked-yes,
.lead-checked-no {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.lead-checked-yes {
  background: var(--green-50);
  color: var(--green-700);
}
.lead-checked-no {
  background: var(--slate-100);
  color: var(--slate-600);
}
.lead-fit-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.lead-fit-good {
  background: var(--green-50);
  color: var(--green-700);
}
.lead-fit-maybe {
  background: var(--amber-50);
  color: var(--amber-700);
}
.lead-fit-bad {
  background: var(--red-50);
  color: var(--red-600);
}
.lead-fit-unknown {
  background: var(--slate-100);
  color: var(--slate-600);
}
.leads-table th,
.leads-table td {
  white-space: normal;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: break-word;
}
.leads-cell-wrap {
  min-width: 280px;
  max-width: 420px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
}
.leads-cell-clip {
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}
.leads-table .leads-view-col {
  position: sticky;
  right: 0;
  background: var(--white);
  box-shadow: -8px 0 12px rgba(15, 23, 42, 0.04);
  z-index: 2;
}
.leads-table thead .leads-view-col {
  background: var(--slate-50);
  z-index: 3;
}

@media (max-width: 1100px) {
  .leads-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .leads-range-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .leads-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .leads-filter-grid { grid-template-columns: 1fr; }
  .leads-filter-summary { align-items: flex-start; flex-wrap: wrap; }
  .leads-filter-summary::after { margin-left: 0; }
  .leads-applied-chip-value { max-width: 12rem; }
  .leads-cell-wrap { max-width: none; }
}

/* Registry split layout — sidebar filters + table */
.registry-split-card.registry-card .registry-toolbar,
.registry-split-card.registry-card .table-footer {
  margin-left: 0;
  margin-right: 0;
}

.registry-split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
}

.registry-split-sidebar {
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 42%);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: calc(100vh - 11rem);
  overflow: auto;
  position: sticky;
  top: 1rem;
}

.registry-split-sidebar.is-active,
.registry-split-card.has-split-filters .registry-split-sidebar {
  border-color: var(--blue-100);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.06);
}

.registry-split-sidebar-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.registry-split-sidebar-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
  flex: 0 0 auto;
}

.registry-split-sidebar-ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

.registry-split-sidebar-head-copy {
  min-width: 0;
}

.registry-split-sidebar-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-800);
}

.registry-split-sidebar-sub {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  color: var(--slate-500);
}

.registry-split-sidebar-search .form-input {
  width: 100%;
}

.registry-split-filter-groups {
  gap: 0.75rem;
}

.registry-split-filter-grid {
  grid-template-columns: 1fr;
}

.registry-split-sidebar .leads-range-grid {
  grid-template-columns: 1fr;
}

.registry-split-applied-filters {
  margin-top: 0;
}

.registry-split-applied-filters.is-top {
  order: 0;
}

.registry-split-sidebar-actions {
  margin-top: 0;
  padding-top: 0.25rem;
  border-top: 1px solid var(--slate-100);
}

.registry-split-sidebar-actions.is-top {
  border-top: none;
  border-bottom: 1px solid var(--slate-100);
  padding-top: 0;
  padding-bottom: 0.75rem;
  margin-bottom: 0.15rem;
}

.registry-split-sidebar-actions.is-bottom {
  padding-top: 0.75rem;
}

.registry-split-sidebar-actions .btn {
  flex: 1 1 auto;
}

.registry-split-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.leads-page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(26, 51, 82, 0.1);
  border-radius: 0.85rem;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 55%, #fff 100%);
}

.leads-page-intro-copy {
  min-width: 0;
  max-width: 48rem;
}

.leads-page-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.leads-page-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.2;
}

.leads-page-banner {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--slate-600);
}

.leads-page-intro-stat {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(26, 51, 82, 0.08);
  text-align: center;
}

.leads-page-intro-stat-value {
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.1;
}

.leads-page-intro-stat-label {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--slate-500);
}

.registry-split-toolbar.registry-toolbar {
  padding: 0;
  margin: 0 0 0.75rem;
  border: none;
  background: transparent;
}

.registry-split-toolbar .registry-toolbar-row-search {
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .registry-split-layout {
    grid-template-columns: 1fr;
  }

  .registry-split-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .leads-page-intro {
    flex-direction: column;
    padding: 0.9rem 1rem;
  }

  .leads-page-intro-stat {
    align-items: center;
    text-align: center;
    width: 100%;
  }
}

/* Welcome splash — entry screen (once per 10 min) */
.desk-welcome-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.desk-welcome-splash {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 8vh, 5.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(1.5rem, 4vh, 2.5rem);
  background: #070b14;
  color: #f8fafc;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.desk-welcome-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(37, 99, 235, 0.34), transparent 60%),
    radial-gradient(ellipse 40% 35% at 12% 80%, rgba(14, 165, 233, 0.08), transparent 55%),
    radial-gradient(ellipse 45% 40% at 88% 70%, rgba(52, 211, 153, 0.06), transparent 50%),
    linear-gradient(180deg, #0a1222 0%, #0b1220 48%, #070b14 100%);
  transition: opacity 0.9s ease;
}

.desk-welcome-atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.2) 0%, transparent 24%, transparent 68%, rgba(7, 11, 20, 0.6) 100%);
}

.desk-welcome-mark {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 0;
  width: min(72vw, 34rem);
  transform: translate(-50%, -50%);
  opacity: 0.07;
  pointer-events: none;
  filter: grayscale(0.2);
  animation: deskWelcomeMarkIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.desk-welcome-mark img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes deskWelcomeMarkIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(1.04); }
  to { opacity: 0.07; transform: translate(-50%, -50%) scale(1); }
}

.desk-welcome-constellation {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.desk-welcome-constellation svg {
  width: 100%;
  height: 100%;
  display: block;
}

.desk-welcome-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: deskWelcomeDotPulse 3.8s ease-in-out infinite;
}

.desk-welcome-dot:nth-child(3n) { animation-delay: 0.6s; }
.desk-welcome-dot:nth-child(3n+1) { animation-delay: 1.4s; }
.desk-welcome-dot:nth-child(3n+2) { animation-delay: 2.2s; }

@keyframes deskWelcomeDotPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.95; }
}

.desk-welcome-chart {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 0;
  z-index: 0;
  height: min(28vh, 16rem);
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px);
  animation: deskWelcomeChartIn 1.2s ease 0.4s forwards;
  mask-image: linear-gradient(180deg, transparent 0%, #000 28%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 28%, #000 100%);
}

.desk-welcome-chart svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.desk-welcome-chart-area {
  clip-path: inset(0 100% 0 0);
  animation: deskWelcomeRevealChart 5.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.9s forwards;
}

.desk-welcome-chart-line {
  fill: none;
  stroke: #93c5fd;
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: deskWelcomeDrawLine 5.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.9s forwards;
}

.desk-welcome-chart-dot {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.4) translateY(6px);
}

.desk-welcome-chart-dot:nth-child(1) { animation: deskWelcomeChartDotIn 0.55s ease 1.7s forwards; }
.desk-welcome-chart-dot:nth-child(2) { animation: deskWelcomeChartDotIn 0.55s ease 2.5s forwards; }
.desk-welcome-chart-dot:nth-child(3) { animation: deskWelcomeChartDotIn 0.55s ease 3.3s forwards; }
.desk-welcome-chart-dot:nth-child(4) { animation: deskWelcomeChartDotIn 0.55s ease 4.1s forwards; }
.desk-welcome-chart-dot:nth-child(5) { animation: deskWelcomeChartDotIn 0.55s ease 4.9s forwards; }

@keyframes deskWelcomeChartIn {
  to {
    opacity: 0.95;
    transform: translateY(0);
  }
}

@keyframes deskWelcomeDrawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes deskWelcomeRevealChart {
  to { clip-path: inset(0 0 0 0); }
}

@keyframes deskWelcomeChartDotIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.desk-welcome-money {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 42% 38% at 50% 48%, transparent 0%, transparent 36%, rgba(0,0,0,0.5) 66%, #000 100%);
  -webkit-mask-image: radial-gradient(ellipse 42% 38% at 50% 48%, transparent 0%, transparent 36%, rgba(0,0,0,0.5) 66%, #000 100%);
}

.desk-welcome-money.is-far {
  z-index: 0;
  opacity: 0.5;
  filter: blur(1.5px) saturate(0.9);
}

.desk-welcome-money.is-mid {
  z-index: 1;
  opacity: 0.88;
}

.desk-welcome-money.is-near {
  z-index: 1;
  opacity: 0.95;
  mask-image: radial-gradient(ellipse 55% 48% at 50% 48%, transparent 0%, transparent 48%, #000 82%);
  -webkit-mask-image: radial-gradient(ellipse 55% 48% at 50% 48%, transparent 0%, transparent 48%, #000 82%);
}

.desk-welcome-bill {
  position: absolute;
  top: -16%;
  left: var(--x, 50%);
  width: var(--w, 2.6rem);
  height: var(--h, 1.45rem);
  transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  animation:
    deskWelcomeMoneyFall var(--duration, 10.5s) linear var(--delay, 0s) infinite,
    deskWelcomeMoneySway var(--sway-dur, 3.4s) ease-in-out var(--delay, 0s) infinite;
  will-change: transform, opacity;
  opacity: 0;
}

.desk-welcome-bill.is-coin {
  width: var(--w, 1.2rem);
  height: var(--w, 1.2rem);
}

.desk-welcome-bill svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 14px rgba(2, 6, 23, 0.35));
}

.desk-welcome-bill-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 0.22rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(254, 249, 195, 0.92);
  background:
    linear-gradient(145deg, rgba(52, 211, 153, 0.42) 0%, rgba(251, 191, 36, 0.38) 55%, rgba(16, 185, 129, 0.3) 100%);
  border: 1px solid rgba(253, 224, 71, 0.32);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.15) inset,
    0 8px 18px rgba(2, 6, 23, 0.28);
}

.desk-welcome-bill.is-coin .desk-welcome-bill-face {
  border-radius: 999px;
  font-size: 0.62rem;
  background:
    radial-gradient(circle at 35% 30%, rgba(254, 243, 199, 0.55), transparent 45%),
    linear-gradient(160deg, rgba(251, 191, 36, 0.55), rgba(180, 83, 9, 0.35));
  border-color: rgba(253, 230, 138, 0.45);
}

@keyframes deskWelcomeMoneyFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
    opacity: 0;
  }
  10% { opacity: var(--opacity, 0.55); }
  88% { opacity: calc(var(--opacity, 0.55) * 0.85); }
  100% {
    transform: translate3d(var(--drift, 0px), 120vh, 0)
      rotate(calc(var(--rot, 0deg) + var(--spin, 24deg)))
      scale(var(--scale, 1));
    opacity: 0;
  }
}

@keyframes deskWelcomeMoneySway {
  0%, 100% { margin-left: 0; }
  50% { margin-left: var(--sway, 12px); }
}

.desk-welcome-skip .desk-welcome-splash,
.desk-welcome-splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.desk-welcome-splash.is-exiting {
  opacity: 0;
  filter: blur(10px);
  transform: scale(1.035);
  pointer-events: none;
}

.desk-welcome-splash.is-exiting .desk-welcome-splash-inner {
  transform: scale(0.96) translateY(-10px);
  opacity: 0;
  filter: blur(4px);
}

.desk-welcome-splash.is-exiting .desk-welcome-atmosphere,
.desk-welcome-splash.is-exiting .desk-welcome-chart,
.desk-welcome-splash.is-exiting .desk-welcome-constellation,
.desk-welcome-splash.is-exiting .desk-welcome-mark,
.desk-welcome-splash.is-exiting .desk-welcome-money {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.desk-welcome-splash-inner {
  position: relative;
  z-index: 10;
  isolation: isolate;
  width: min(100%, 58rem);
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 2.75rem 1.25rem 2.5rem;
  transition:
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.desk-welcome-splash-inner::before {
  content: '';
  position: absolute;
  inset: -10% -6%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 78% 68% at 50% 42%, rgba(7, 11, 20, 0.9) 0%, rgba(7, 11, 20, 0.55) 48%, transparent 74%);
}

.desk-welcome-splash-inner > * {
  position: relative;
  z-index: 1;
}

.desk-welcome-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.35rem;
}

.desk-welcome-brand::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8rem;
  height: 8rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.22), transparent 68%);
  filter: blur(8px);
  z-index: -1;
}

.desk-welcome-logo {
  width: auto;
  height: 2.5rem;
  object-fit: contain;
  opacity: 0.98;
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.35));
  animation: deskWelcomeLogoBreathe 3.6s ease-in-out 1.1s 1 both;
}

@keyframes deskWelcomeLogoBreathe {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.04); }
}

.desk-welcome-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, 0.9);
}

.desk-welcome-title {
  margin: 0;
  width: max-content;
  max-width: 100%;
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.05rem, 2.35vw, 2.15rem);
  font-weight: 650;
  font-optical-sizing: auto;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #f8fafc;
  white-space: nowrap;
  text-shadow: 0 2px 28px rgba(15, 23, 42, 0.55);
}

.desk-welcome-lead {
  margin: 1.25rem 0 0;
  max-width: 28rem;
  font-size: 1.02rem;
  font-weight: 450;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.72);
}

.desk-welcome-sub {
  margin: 0.7rem 0 0;
  max-width: 30rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.88);
}

.desk-welcome-flow {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem 0.45rem;
  margin: 1.45rem 0 0;
  max-width: 52rem;
  padding: 0.65rem 0.85rem;
  font-size: clamp(0.84rem, 1.35vw, 0.98rem);
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #f1f5f9;
  text-shadow: 0 1px 2px rgba(7, 11, 20, 0.85), 0 0 18px rgba(7, 11, 20, 0.75);
}

.desk-welcome-flow::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 0.85rem;
  background: rgba(7, 11, 20, 0.72);
  pointer-events: none;
}

.desk-welcome-step {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(14px);
  animation: deskWelcomeStepRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.desk-welcome-step:nth-child(1) { animation-delay: 1s; }
.desk-welcome-step:nth-child(2) { animation-delay: 2s; }
.desk-welcome-step:nth-child(3) { animation-delay: 3s; }
.desk-welcome-step:nth-child(4) { animation-delay: 4s; }
.desk-welcome-step:nth-child(5) { animation-delay: 5s; }

.desk-welcome-step::after {
  content: '→';
  margin-left: 0.1rem;
  font-weight: 500;
  font-size: 0.92em;
  color: rgba(148, 163, 184, 0.55);
}

.desk-welcome-step:last-child::after { display: none; }

@keyframes deskWelcomeStepRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.desk-welcome-rule {
  width: 3.25rem;
  height: 1px;
  margin: 1.75rem 0 0;
  background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.45), transparent);
  border: 0;
}

.desk-welcome-loader {
  width: min(100%, 12.5rem);
  margin-top: 1.55rem;
}

.desk-welcome-loader-track {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.1);
  overflow: hidden;
}

.desk-welcome-loader-bar {
  display: block;
  height: 100%;
  width: 6%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #93c5fd 55%, #e2e8f0);
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.55);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.desk-welcome-status {
  margin: 1.05rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.desk-welcome-anim {
  opacity: 0;
  transform: translateY(18px);
  animation: deskWelcomeRise 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.desk-welcome-anim-1 { animation-delay: 0.12s; }
.desk-welcome-anim-2 { animation-delay: 0.32s; }
.desk-welcome-anim-3 { animation-delay: 0.52s; }
.desk-welcome-anim-4 { animation-delay: 0.78s; }
.desk-welcome-anim-5 { animation-delay: 0.98s; }
.desk-welcome-anim-7 { animation-delay: 6.1s; }
.desk-welcome-anim-8 { animation-delay: 6.3s; }
.desk-welcome-anim-9 { animation-delay: 6.45s; }

@keyframes deskWelcomeRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .desk-welcome-title {
    font-size: clamp(0.72rem, 3.6vw, 1.05rem);
  }

  .desk-welcome-flow {
    font-size: 0.8rem;
    gap: 0.45rem 0.35rem;
  }
}

/* Short success celebration (export ready, Instantly connected, etc.) */
.desk-celebrate {
  position: fixed;
  inset: 0;
  z-index: 4100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
  background: rgba(11, 18, 32, 0.72);
  color: #f8fafc;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow: hidden;
}

.desk-celebrate.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.desk-celebrate.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.desk-celebrate-money {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.desk-celebrate-card {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  padding: 1.5rem 1.4rem 1.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.96) 100%);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
  text-align: center;
}

.desk-celebrate-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.desk-celebrate-title {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #f8fafc;
}

.desk-celebrate-lead {
  margin: 0.65rem 0 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.82);
}

.desk-celebrate-dismiss {
  margin-top: 1.1rem;
}

@media (prefers-reduced-motion: reduce) {
  .desk-welcome-anim,
  .desk-welcome-bill,
  .desk-welcome-logo,
  .desk-welcome-dot,
  .desk-welcome-chart,
  .desk-welcome-chart-area,
  .desk-welcome-chart-line,
  .desk-welcome-chart-dot,
  .desk-welcome-step,
  .desk-welcome-mark {
    animation: none;
  }

  .desk-welcome-anim,
  .desk-welcome-step {
    opacity: 1;
    transform: none;
  }

  .desk-welcome-mark {
    opacity: 0.07;
    transform: translate(-50%, -50%);
  }

  .desk-welcome-chart {
    opacity: 0.95;
    transform: none;
  }

  .desk-welcome-chart-line { stroke-dashoffset: 0; }
  .desk-welcome-chart-area { clip-path: none; }
  .desk-welcome-chart-dot {
    opacity: 1;
    transform: none;
  }

  .desk-welcome-money,
  .desk-celebrate-money {
    display: none;
  }

  .desk-welcome-splash {
    transition-duration: 0.2s;
  }

  .desk-welcome-splash.is-exiting {
    filter: none;
    transform: none;
  }

  .desk-welcome-loader-bar {
    width: 100%;
    transform: none;
  }
}
