/* === Utility: JS visibility toggle === */
.hidden {
  display: none;
}

/* === App shell sidebar states === */
.app-shell {
  --sidebar-expanded-width: 18rem;
  --sidebar-collapsed-width: 5.5rem;
}

.app-sidebar {
  width: var(--sidebar-expanded-width);
  transition: width 0.2s ease, transform 0.2s ease;
}

.app-main {
  min-width: 0;
}

.sidebar-brand {
  min-width: 0;
}

.sidebar-logo-compact {
  display: none;
  align-items: center;
  justify-content: center;
  color: #111111;
}

.sidebar-search-collapsed {
  display: none;
}

.sidebar-desktop-toggle {
  flex-shrink: 0;
}

.sidebar-desktop-toggle-icon {
  transition: transform 0.2s ease;
}

@media (min-width: 768px) {
  .app-shell[data-sidebar-state="collapsed"] .app-sidebar {
    width: var(--sidebar-collapsed-width);
  }

  .app-shell[data-sidebar-state="collapsed"] .sidebar-header {
    flex-direction: column;
    justify-content: center;
    padding: 16px 12px;
    gap: 12px;
  }

  .app-shell[data-sidebar-state="collapsed"] .sidebar-brand {
    justify-content: center;
    width: 100%;
  }

  .app-shell[data-sidebar-state="collapsed"] .sidebar-logo-full,
  .app-shell[data-sidebar-state="collapsed"] .sidebar-search-expanded,
  .app-shell[data-sidebar-state="collapsed"] .sidebar-link-label,
  .app-shell[data-sidebar-state="collapsed"] .sidebar-expanded-only {
    display: none !important;
  }

  .app-shell[data-sidebar-state="collapsed"] .sidebar-logo-compact {
    display: inline-flex;
  }

  .app-shell[data-sidebar-state="collapsed"] .sidebar-search-collapsed {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .app-shell[data-sidebar-state="collapsed"] .sidebar-section,
  .app-shell[data-sidebar-state="collapsed"] .sidebar-footer-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-shell[data-sidebar-state="collapsed"] .sidebar-nav-link {
    justify-content: center;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .app-shell[data-sidebar-state="collapsed"] .sidebar-desktop-toggle-icon {
    transform: rotate(180deg);
  }
}

/* === JSON payload inspector blocks === */
.json-block {
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e5e5;
  color: #1f2937;
  overflow: auto;
  max-height: 380px;
  font-size: 0.8rem;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

/* === Documentation code blocks === */
.code-block {
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #374151;
  overflow: auto;
  font-size: 0.8rem;
  line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

/* === Country / stat chip (injected by JS) === */
.chip {
  display: inline-block;
  padding: 4px 10px;
  background: #f3f4f6;
  border: 1px solid #e5e5e5;
  border-radius: 9999px;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 600;
}

/* === Empty table row placeholder === */
.empty-row td {
  color: #6b7280;
  text-align: center;
  font-style: italic;
}

/* === Loading spinner (used by JS status text) === */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e5e7eb;
  border-top-color: #374151;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* === Filter info tooltips === */
.filter-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
}

.filter-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  width: max-content;
  max-width: 240px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 50;
}

.filter-tip::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1f2937;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 50;
}

.filter-tip:hover::after,
.filter-tip:hover::before {
  opacity: 1;
}

/* === Keyword badge box === */
.kw-badge-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kw-badge-box:focus-within {
  border-color: #d1d5db;
  box-shadow: 0 0 0 2px rgba(209, 213, 219, 0.5);
}
.kw-badge-input {
  flex: 1 1 80px;
  min-width: 80px;
  border: none;
  outline: none;
  font-size: 13px;
  padding: 2px 0;
  background: transparent;
}
.kw-badge-input::placeholder {
  color: #9ca3af;
}
.kw-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  line-height: 1.5;
}
.kw-badge-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 14px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  border: none;
  background: none;
  padding: 0;
}
.kw-badge-remove:hover {
  color: #ef4444;
}

/* === Keyword inspiration button === */
.ai-keyword-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}
.ai-keyword-btn:hover {
  color: #374151;
  background: #e5e7eb;
  border-color: #d1d5db;
}
.ai-keyword-btn-label,
.ai-country-btn-label,
.ai-industry-btn-label {
  white-space: nowrap;
}
.ai-keyword-btn.is-pending {
  color: #4338ca;
  background: #eef2ff;
  border-color: #c7d2fe;
}
.ai-keyword-btn.is-pending svg {
  animation: inspiration-pulse 1.2s ease-in-out infinite;
}
.ai-keyword-btn.is-ready {
  color: #14532d;
  background: #ecfdf3;
  border-color: #86efac;
}
.ai-keyword-btn.is-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

@keyframes inspiration-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.8;
  }
}

/* === Keyword inspiration modal === */
.ai-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.ai-modal-overlay.hidden {
  display: none;
}
.ai-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}
.ai-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.ai-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.ai-modal-close:hover {
  color: #374151;
}
.ai-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
}
.ai-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
}
.ai-modal-generate-btn,
.ai-modal-accept-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.ai-modal-generate-btn {
  color: #fff;
  background: #374151;
}
.ai-modal-generate-btn:hover {
  background: #1f2937;
}
.ai-modal-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ai-modal-accept-btn {
  color: #fff;
  background: #374151;
}
.ai-modal-accept-btn:hover {
  background: #1f2937;
}
.ai-modal-accept-btn.hidden {
  display: none;
}

/* Inspiration keyword chips in modal */
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  color: #374151;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.ai-chip:hover {
  background: #e5e7eb;
}
.ai-chip.deselected {
  opacity: 0.4;
  text-decoration: line-through;
}
.ai-chip .ai-chip-x {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1;
}

/* === Industry quickfill toggle === */
.industry-quickfill-toggle {
  display: inline-flex;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.industry-toggle-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}
.industry-toggle-btn:not(:last-child) {
  border-right: 1px solid #e5e7eb;
}
.industry-toggle-btn.active {
  background: #f3f4f6;
  color: #1f2937;
}
.industry-toggle-btn:hover:not(.active) {
  background: #f9fafb;
}

/* Exclusion badge */
.industry-exclusion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}
.industry-exclusion-badge.hidden {
  display: none;
}

/* Exclusions details within industry section */
.industry-exclusions-details {
  flex-basis: 100%;
}
.industry-exclusions-summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.industry-exclusions-summary:hover {
  color: #374151;
  border-color: #d1d5db;
  background: #f9fafb;
}
.industry-exclusions-summary::-webkit-details-marker {
  display: none;
}
.industry-exclusions-chevron {
  transition: transform 0.15s;
  flex-shrink: 0;
}
.industry-exclusions-details[open] > .industry-exclusions-summary .industry-exclusions-chevron {
  transform: rotate(90deg);
}

/* === Industry overlap alert === */
.industry-overlap-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.4;
}
.industry-overlap-fix-btn {
  flex-shrink: 0;
  padding: 3px 10px;
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #92400e;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.industry-overlap-fix-btn:hover {
  background: #fef9c3;
}
.industry-overlap-dismiss-btn {
  flex-shrink: 0;
  padding: 0 4px;
  background: none;
  border: none;
  font-size: 16px;
  color: #d97706;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
}
.industry-overlap-dismiss-btn:hover {
  opacity: 1;
}

/* === Search/report atomic cards === */
.atomic-form-card {
  border: 1px solid #eaebee;
  border-radius: 14px;
  background: #ffffff;
}

.atomic-form-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #343539;
  position: relative;
}

.atomic-form-summary::-webkit-details-marker {
  display: none;
}

.atomic-form-summary .section-filter-badge {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  border-radius: 9999px;
  background: #1f2937;
  color: #fff;
}

.atomic-form-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #6b7280;
  border-bottom: 1.5px solid #6b7280;
  transform: rotate(45deg);
  margin-top: -2px;
  transition: transform 0.15s ease, margin-top 0.15s ease;
  flex-shrink: 0;
}

.atomic-form-card[open] > .atomic-form-summary::after {
  transform: rotate(225deg);
  margin-top: 2px;
}

.atomic-form-summary:focus-visible {
  outline: 2px solid #9ca3af;
  outline-offset: -2px;
  border-radius: 14px;
}

.atomic-form-content {
  border-top: 1px solid #f1f2f4;
  padding: 16px 20px 20px;
}

/* Compact advanced section inside Location card */
.geo-circle-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.geo-circle-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 10px;
  min-height: 24px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.geo-circle-summary::-webkit-details-marker {
  display: none;
}

.geo-circle-summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #6b7280;
  border-bottom: 1.5px solid #6b7280;
  transform: rotate(45deg);
  margin-top: -2px;
  transition: transform 0.15s ease, margin-top 0.15s ease;
  flex-shrink: 0;
}

.geo-circle-card[open] > .geo-circle-summary::after {
  transform: rotate(225deg);
  margin-top: 2px;
}

.geo-circle-summary:focus-visible {
  outline: 2px solid #9ca3af;
  outline-offset: -2px;
  border-radius: 12px;
}

.geo-circle-content {
  border-top: 1px solid #e5e7eb;
  padding: 10px;
}

@media (max-width: 900px) {
  .keyword-fields-row {
    grid-template-columns: 1fr;
  }
}

/* === Relevant accounts fixed action dock === */
.accounts-action-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  border-top: 1px solid #eaebee;
  background: rgba(245, 246, 246, 0.95);
  backdrop-filter: blur(6px);
}

@media (min-width: 768px) {
  .accounts-action-dock {
    left: 18rem;
  }
}

.accounts-action-dock-inner {
  width: 100%;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px));
}

.accounts-action-dock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 10px;
}

.accounts-action-dock-primary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.accounts-action-dock-meta {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px 16px;
  min-width: 0;
}

.accounts-action-dock-btn,
.accounts-action-dock-select,
.accounts-action-dock-icon,
.accounts-action-dock-metric {
  flex-shrink: 0;
}

.accounts-action-dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  white-space: nowrap;
}

.accounts-action-dock-submit {
  padding: 0 18px;
}

.accounts-action-dock-cancel {
  padding: 0 14px;
}

.accounts-action-dock-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.accounts-action-dock-select-input {
  min-width: 10rem;
  padding: 6px 28px 6px 10px;
}

.accounts-action-dock-icon {
  width: 40px;
  height: 40px;
}

.accounts-action-dock-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.accounts-action-dock-refresh {
  flex-shrink: 0;
}

@media (max-width: 1180px) {
  .accounts-action-dock-row {
    grid-template-columns: 1fr;
  }

  .accounts-action-dock-meta {
    justify-self: start;
    flex-wrap: wrap;
    gap: 8px 14px;
  }
}

.accounts-search-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.accounts-search-form > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0 !important;
}

.section-group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.section-group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(156, 163, 175, 0.4), rgba(229, 231, 235, 0.25));
}

.section-order-00 { order: 0; }
.section-order-10 { order: 10; }
.section-order-11 { order: 11; }
.section-order-12 { order: 12; }
.section-order-13 { order: 13; }
.section-order-14 { order: 14; }
.section-order-15 { order: 15; }
.section-order-16 { order: 16; }
.section-order-20 { order: 20; }
.section-order-21 { order: 21; }
.section-order-22 { order: 22; }
.section-order-30 { order: 30; }
.section-order-31 { order: 31; }
.section-order-32 { order: 32; }
.section-order-33 { order: 33; }
.section-order-34 { order: 34; }
.section-order-40 { order: 40; }
.section-order-41 { order: 41; }
.section-order-42 { order: 42; }
.section-order-43 { order: 43; }
.section-order-44 { order: 44; }
.section-order-45 { order: 45; }

.accounts-criteria-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: start;
  gap: 24px;
}

.accounts-form-navigator {
  position: sticky;
  top: 88px;
}

.accounts-form-navigator-card {
  border: 1px solid #eaebee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f6 100%);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.06);
  padding: 14px;
}

.accounts-form-navigator-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 10px;
}

.accounts-form-navigator-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.accounts-form-navigator-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.accounts-form-navigator-link:hover {
  border-color: #d1d5db;
  color: #111827;
  transform: translateX(-1px);
}

.accounts-form-navigator-link.is-active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.accounts-form-navigator-label {
  min-width: 0;
}

.accounts-form-navigator-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: rgba(17, 24, 39, 0.08);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.accounts-form-navigator-link.is-active .accounts-form-navigator-count {
  background: rgba(255, 255, 255, 0.16);
}

.nl-search-preview-filter-grid {
  min-width: 0;
}

.nl-search-preview-filter-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
}

.nl-search-preview-filter-card dt,
.nl-search-preview-filter-card dd {
  margin: 0;
}

.nl-search-preview-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.nl-search-preview-filter-value {
  margin-top: 6px;
  min-width: 0;
}

.nl-search-preview-filter-text {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  color: #111827;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nl-search-preview-filter-meta {
  margin-top: 8px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.nl-search-preview-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.nl-search-preview-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nl-search-preview-chip.is-code {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.nl-search-preview-chip.is-industry {
  align-items: flex-start;
  padding-top: 6px;
  padding-bottom: 6px;
  border-color: #dbe4f0;
  background: #f8fbff;
  color: #1f2937;
  font-weight: 500;
}

.complexity-gauge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
}

.complexity-gauge-bar {
  display: inline-flex;
  gap: 3px;
}

.complexity-gauge-segment {
  width: 16px;
  height: 6px;
  border-radius: 9999px;
  background: #e5e7eb;
  transition: background 0.15s ease;
}

.complexity-gauge-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.complexity-gauge-low .complexity-gauge-segment:nth-child(1) {
  background: #15803d;
}

.complexity-gauge-medium .complexity-gauge-segment:nth-child(-n+2) {
  background: #b45309;
}

.complexity-gauge-high .complexity-gauge-segment {
  background: #b91c1c;
}

.complexity-gauge-low .complexity-gauge-label {
  color: #166534;
}

.complexity-gauge-medium .complexity-gauge-label {
  color: #9a3412;
}

.complexity-gauge-high .complexity-gauge-label {
  color: #991b1b;
}


@media (max-width: 1024px) {
  .accounts-action-dock-inner {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 767px) {
  .accounts-action-dock-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .accounts-action-dock-primary,
  .accounts-action-dock-meta {
    width: 100%;
  }

  .accounts-action-dock-submit,
  .accounts-action-dock-cancel {
    flex: 1 1 auto;
  }

  .accounts-action-dock-select-input {
    min-width: 8.5rem;
  }
}

@media (max-width: 1279px) {
  .accounts-criteria-layout {
    grid-template-columns: 1fr;
  }

  .accounts-form-navigator {
    display: none !important;
  }
}

/* === Search templates modal === */
.search-templates-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.search-templates-overlay.hidden {
  display: none;
}
.search-templates-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  width: 960px;
  max-width: 92vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

/* === Search history modal === */
.search-history-overlay {
  position: fixed;
  inset: 0;
  padding: clamp(16px, 3vw, 36px);
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(14px) saturate(125%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.search-history-overlay.hidden {
  display: none;
}
.search-history-modal {
  position: relative;
  width: min(1080px, calc(100vw - 32px));
  max-width: 100%;
  max-height: min(86vh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 34%),
    linear-gradient(180deg, #fcfdff 0%, #f3f6fb 100%);
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.24);
}

.accounts-project-modal {
  width: min(42rem, 92vw);
}

.search-history-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 22px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.8)),
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.08), transparent 32%);
}

.search-history-modal-copy {
  min-width: 0;
  flex: 1;
}

.search-history-modal-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #64748b;
}

.search-history-modal-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
}

.search-history-modal-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.05;
  color: #0f172a;
}

.search-history-modal-subtitle {
  margin: 10px 0 0;
  max-width: 48rem;
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
}

.search-history-summary-badge,
.search-history-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.search-history-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.search-history-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #1e293b;
  border-radius: 16px;
  background: linear-gradient(180deg, #1f2937 0%, #0f172a 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.search-history-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.search-history-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #64748b;
  font-size: 28px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.search-history-close-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: rotate(90deg);
}

.search-history-modal-body {
  display: grid;
  gap: 18px;
  padding: 22px 24px 26px;
  overflow: auto;
}

.search-history-section {
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.search-history-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.search-history-section-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #94a3b8;
}

.search-history-section-title {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.search-history-grid {
  display: grid;
  gap: 14px;
}

.search-history-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.search-history-entry::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #1d4ed8 0%, #0f172a 100%);
}

.search-history-entry.is-saved::before {
  background: linear-gradient(180deg, #0f766e 0%, #0f172a 100%);
}

.search-history-entry-content {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.search-history-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-history-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.search-history-meta-pill.is-time {
  background: #eef2ff;
  color: #4338ca;
}

.search-history-meta-pill.is-count {
  background: #e0f2fe;
  color: #0369a1;
}

.search-history-meta-pill.is-saved {
  background: #dcfce7;
  color: #166534;
}

.search-history-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  color: #111827;
}

.search-history-description {
  margin: 0;
  max-width: 64ch;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}

.search-history-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-history-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.search-history-chip.is-location {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.search-history-chip.is-industry {
  background: #f8fafc;
  border-color: #dbe4f0;
}

.search-history-chip.is-size {
  background: #fff7ed;
  border-color: #fed7aa;
}

.search-history-chip.is-signal {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.search-history-chip-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.search-history-chip-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.search-history-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 132px;
}

.search-history-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.search-history-action:hover {
  transform: translateY(-1px);
}

.search-history-action.is-primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.search-history-action.is-primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.search-history-action.is-accent {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.search-history-action.is-accent:hover {
  background: #dbeafe;
}

.search-history-action.is-danger {
  background: #ffffff;
  border-color: #fecaca;
  color: #dc2626;
}

.search-history-action.is-danger:hover {
  background: #fef2f2;
}

.search-history-empty {
  padding: 32px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-size: 14px;
  color: #64748b;
}

@media (max-width: 900px) {
  .search-history-modal {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
  }

  .search-history-modal-header {
    padding: 24px 22px 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .search-history-modal-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-history-modal-actions {
    justify-content: space-between;
  }

  .search-history-modal-body {
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .search-history-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .search-history-modal {
    width: 100%;
    max-height: calc(100vh - 12px);
    border-radius: 24px 24px 18px 18px;
  }

  .search-history-section {
    padding: 16px;
    border-radius: 20px;
  }

  .search-history-section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-history-entry {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .search-history-actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }

  .search-history-action {
    flex: 1 1 120px;
  }

  .search-history-chip {
    width: 100%;
  }
}

.accounts-results-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 20px 24px;
}

.accounts-results-hero-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accounts-results-hero-headline {
  min-width: 0;
}

.accounts-results-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.accounts-results-hero-title {
  margin: 6px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.accounts-results-hero-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  max-width: 48ch;
}

.accounts-results-hero-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.accounts-results-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.accounts-results-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.accounts-results-overview-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
  border-left: 3px solid #cbd5e1;
}

.accounts-results-overview-card::before {
  display: none;
}

.accounts-results-overview-card.is-location {
  border-left-color: #0d9488;
}

.accounts-results-overview-card.is-industry {
  border-left-color: #3b82f6;
}

.accounts-results-overview-card.is-size {
  border-left-color: #d97706;
}

.accounts-results-overview-card.is-signal {
  border-left-color: #8b5cf6;
}

.accounts-results-overview-card.is-empty {
  border-left-color: #94a3b8;
  justify-content: center;
}

.accounts-results-overview-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.accounts-results-overview-title {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.accounts-results-overview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.accounts-results-overview-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.accounts-results-overview-tag.is-overflow {
  border-style: dashed;
  color: #3b82f6;
  background: transparent;
}

.accounts-results-overview-note {
  margin: auto 0 0;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.4;
}

.accounts-primary-action,
.accounts-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.accounts-primary-action {
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
}

.accounts-primary-action:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.accounts-secondary-action {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
}

.accounts-secondary-action:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.accounts-results-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.accounts-stat-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.accounts-narrative-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
}

.accounts-narrative-bullet {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 9999px;
  background: #1d4ed8;
  flex-shrink: 0;
}

.accounts-guidance-item {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px 14px;
  line-height: 1.45;
}

.report-next-steps-card {
  border: 1px solid #dbe4f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.report-next-steps-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
}

.report-next-steps-summary::-webkit-details-marker {
  display: none;
}

.report-next-steps-summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.5px solid #475569;
  border-bottom: 1.5px solid #475569;
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.15s ease, margin-top 0.15s ease;
  flex-shrink: 0;
}

.report-next-steps-card[open] > .report-next-steps-summary::after {
  transform: rotate(225deg);
  margin-top: 4px;
}

.report-next-steps-summary:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
}

.report-next-steps-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0f766e;
}

.report-next-steps-heading {
  margin-top: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.report-next-steps-body {
  border-top: 1px solid #dbe4f0;
  padding: 0 22px 22px;
}

.report-next-steps-intro {
  margin: 18px 0 0;
  max-width: 44rem;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.report-next-steps-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.report-next-steps-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.report-next-steps-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.report-next-steps-copy {
  min-width: 0;
}

.report-next-steps-title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.report-next-steps-text {
  margin: 4px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.accounts-data-quality-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.accounts-data-quality-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.accounts-data-quality-track {
  height: 10px;
  overflow: hidden;
  border-radius: 9999px;
  background: #e5e7eb;
}

.accounts-data-quality-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #111827 0%, #2563eb 100%);
}

.accounts-data-quality-value {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  text-align: right;
}

.accounts-analytics-grid {
  align-items: stretch;
}

.accounts-chart-card {
  min-height: 300px;
  display: flex;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}

.accounts-chart-card canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 auto;
}

.history-library-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 16px 20px;
}

.history-card-summary {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.history-card-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.history-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.history-card-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.history-card-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.history-card-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

/* === Employee dual-handle range slider === */
.emp-slider-wrap {
  padding: 0 10px;
}
.emp-slider-track {
  position: relative;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  cursor: pointer;
}
.emp-slider-fill {
  position: absolute;
  height: 100%;
  background: #111827;
  border-radius: 3px;
  pointer-events: none;
}
.emp-slider-handle {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 2px solid #111827;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  z-index: 2;
  transition: box-shadow 0.15s;
}
.emp-slider-handle:hover,
.emp-slider-handle:focus {
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.12);
  outline: none;
}
.emp-slider-handle:active {
  cursor: grabbing;
}
.emp-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10px;
  color: #9ca3af;
  user-select: none;
}

/* === Employee size badge (in summary line) === */
.emp-size-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  vertical-align: middle;
  line-height: 1.5;
}
.emp-size-badge.badge-micro       { background: #f0fdf4; color: #166534; }
.emp-size-badge.badge-small       { background: #ecfdf5; color: #065f46; }
.emp-size-badge.badge-smb         { background: #eff6ff; color: #1e40af; }
.emp-size-badge.badge-mid-market  { background: #fefce8; color: #854d0e; }
.emp-size-badge.badge-enterprise  { background: #fdf2f8; color: #9d174d; }
.emp-size-badge.badge-large-enterprise { background: #faf5ff; color: #7e22ce; }
.emp-size-badge.badge-custom      { background: #f3f4f6; color: #374151; }

/* === Sticky first column in results table === */
#accountsTableHead th:first-child,
#accountsTableBody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}
#accountsTableHead th:first-child { background: #f9fafb; z-index: 3; }
#accountsTableBody tr td:first-child { background: inherit; }
#accountsTableHead th:first-child::after,
#accountsTableBody td:first-child::after {
  content: "";
  position: absolute;
  top: 0; right: -4px; bottom: 0; width: 4px;
  background: linear-gradient(to right, rgba(0,0,0,0.04), transparent);
  pointer-events: none;
}

.accounts-results-table-shell {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.accounts-results-table {
  border-collapse: separate;
  border-spacing: 0;
}

.accounts-results-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}

.accounts-results-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (min-width: 768px) {
  .accounts-results-hero-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .accounts-results-hero-toolbar {
    flex-shrink: 0;
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  .accounts-results-overview-grid {
    grid-template-columns: 1fr;
  }

  .accounts-chart-card {
    min-height: 260px;
  }

  .report-next-steps-summary {
    padding: 18px;
  }

  .report-next-steps-body {
    padding: 0 18px 18px;
  }

  .report-next-steps-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .accounts-data-quality-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .accounts-data-quality-value {
    text-align: left;
  }
}

/* === Toast notifications === */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.18);
  transform: translateX(16px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: auto;
}
.toast-visible {
  transform: translateX(0);
  opacity: 1;
}
.toast-exit {
  animation: toast-fade-out 0.2s ease forwards;
}
@keyframes toast-fade-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(16px);
  }
}
.toast-success {
  background: #166534;
}
.toast-error {
  background: #b91c1c;
}
.toast-info {
  background: #343539;
}
.toast-warning {
  background: #b45309;
}
.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}
.toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0.72;
}
.toast-close:hover,
.toast-close:focus-visible {
  opacity: 1;
}

@media (max-width: 767px) {
  .toast-container {
    top: 72px;
    right: 12px;
    width: min(320px, calc(100vw - 24px));
  }
}

/* === Industry code atlas === */
.industry-atlas-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #d8dee8;
  border-radius: 32px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.55), transparent 36%),
    radial-gradient(circle at left bottom, rgba(226, 232, 240, 0.9), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.08);
}

.industry-atlas-hero-grid {
  display: grid;
  gap: 24px;
  align-items: start;
}

.industry-atlas-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.industry-atlas-primary-link,
.industry-atlas-secondary-link,
.industry-atlas-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.industry-atlas-primary-link {
  background: #111827;
  color: #ffffff;
  border: 1px solid #111827;
}

.industry-atlas-primary-link:hover,
.industry-atlas-primary-link:focus-visible {
  background: #1f2937;
  border-color: #1f2937;
  transform: translateY(-1px);
}

.industry-atlas-secondary-link,
.industry-atlas-retry-btn {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #d8dee8;
}

.industry-atlas-secondary-link:hover,
.industry-atlas-secondary-link:focus-visible,
.industry-atlas-retry-btn:hover,
.industry-atlas-retry-btn:focus-visible {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.industry-atlas-stat-card {
  border-radius: 24px;
  border: 1px solid rgba(203, 213, 225, 0.7);
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
  backdrop-filter: blur(10px);
}

.industry-atlas-stat-label,
.industry-atlas-summary-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
}

.industry-atlas-stat-value {
  margin-top: 10px;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  color: #0f172a;
}

.industry-atlas-stat-copy,
.industry-atlas-summary-copy {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.industry-atlas-tab-row,
.industry-atlas-mode-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.industry-atlas-tab-btn,
.industry-atlas-mode-btn {
  appearance: none;
  border: 1px solid #d8dee8;
  background: #f8fafc;
  color: #475569;
  border-radius: 9999px;
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.industry-atlas-tab-btn.is-active,
.industry-atlas-mode-btn.is-active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.industry-atlas-tab-btn:hover,
.industry-atlas-tab-btn:focus-visible,
.industry-atlas-mode-btn:hover,
.industry-atlas-mode-btn:focus-visible {
  border-color: #94a3b8;
  color: #0f172a;
}

.industry-atlas-tab-btn.is-active:hover,
.industry-atlas-tab-btn.is-active:focus-visible,
.industry-atlas-mode-btn.is-active:hover,
.industry-atlas-mode-btn.is-active:focus-visible {
  color: #ffffff;
}

.industry-atlas-summary-card {
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 18px;
}

.industry-atlas-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  border: 1px solid #d8dee8;
  background: #ffffff;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.industry-atlas-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.industry-atlas-jump-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.industry-atlas-jump-chip:hover,
.industry-atlas-jump-chip:focus-visible {
  background: #ffffff;
  border-color: #94a3b8;
  color: #0f172a;
}

.industry-atlas-family {
  border-radius: 24px;
  border: 1px solid #d8dee8;
  background: #ffffff;
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.industry-atlas-family-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.industry-atlas-family-summary::-webkit-details-marker {
  display: none;
}

.industry-atlas-family-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.industry-atlas-family-code,
.industry-atlas-row-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.industry-atlas-family-label {
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.industry-atlas-family-count {
  flex-shrink: 0;
  border-radius: 9999px;
  background: #eef2f7;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.industry-atlas-family-list {
  border-top: 1px solid #eef2f7;
  padding: 8px 14px 14px;
}

.industry-atlas-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-radius: 18px;
  padding: 10px 12px;
}

.industry-atlas-row:nth-child(odd) {
  background: #fbfcfe;
}

.industry-atlas-row-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.industry-atlas-row-label {
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #334155;
}

.industry-atlas-row-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.industry-atlas-row-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #eef2f7;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #64748b;
  text-transform: uppercase;
}

.industry-atlas-row-tag.is-parent {
  background: #dbeafe;
  color: #1d4ed8;
}

.industry-atlas-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 24px;
  background: #ffffff;
  padding: 28px 24px;
  text-align: center;
}

.industry-atlas-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.industry-atlas-empty-copy {
  margin: 10px auto 0;
  max-width: 32rem;
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
}

@media (min-width: 1080px) {
  .industry-atlas-hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  }
}

@media (max-width: 767px) {
  .industry-atlas-hero {
    padding: 22px;
    border-radius: 28px;
  }

  .industry-atlas-family-summary,
  .industry-atlas-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .industry-atlas-family-count,
  .industry-atlas-row-meta {
    justify-content: flex-start;
  }

  .industry-atlas-row-copy {
    width: 100%;
    flex-wrap: wrap;
  }
}
