/**
 * Components Compatibility CSS
 * Provides CSS custom properties and BEM styles needed by the shared
 * JS component files (hopVisualization, supplyChainTable, chainPathDiagram,
 * duplicatePathRow, columnBrowser). Page-level layouts use Tailwind CSS.
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
  /* Neutral palette */
  --neutral-50:  #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;

  /* Emerald palette */
  --emerald-50:  #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;

  /* Red palette */
  --red-50:  #fef2f2;
  --red-100: #fee2e2;
  --red-200: #fecaca;
  --red-300: #fca5a5;
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;

  /* Amber palette */
  --amber-50:  #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;

  /* Orange palette */
  --orange-50:  #fff7ed;
  --orange-100: #ffedd5;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;

  /* Blue palette */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  /* Extra palettes used by duplicate paths */
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-600: #9333ea;
  --purple-700: #7e22ce;
  --violet-100: #ede9fe;
  --violet-300: #c4b5fd;
  --violet-800: #5b21b6;
  --teal-100: #ccfbf8;
  --teal-300: #5eead4;
  --teal-700: #0f766e;
  --green-100: #dcfce7;
  --green-700: #15803d;

  /* Semantic aliases */
  --content-surface:  #ffffff;
  --content-border:   var(--neutral-200);
  --content-bg:       var(--neutral-100);
  --accent:           var(--emerald-500);
  --accent-dark:      var(--emerald-600);
  --text-primary:     var(--neutral-900);
  --text-secondary:   var(--neutral-600);
  --text-muted:       var(--neutral-400);
  --text-inverse:     #ffffff;
  --status-success-bg: var(--emerald-50);
  --status-error-bg:   var(--red-100);
  --status-warning-bg: var(--amber-50);
  --status-info-bg:    var(--blue-50);

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

  /* Border radius */
  --radius-sm:  0.25rem;
  --radius-md:  0.375rem;
  --radius-lg:  0.5rem;
  --radius-xl:  0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

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

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ==========================================================================
   Hop Visualization Component
   ========================================================================== */

.hop-viz {
  background: var(--content-surface);
  border: 1px solid var(--content-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.hop-viz__empty {
  padding: var(--space-12);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.hop-viz__columns {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.hop-viz__center-box {
  flex-shrink: 0;
  width: 11rem;
  border: 2px solid #c4b5fd;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.hop-viz__center-box:hover {
  border-color: #a78bfa;
}

.hop-viz__center-box--selected {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.04);
}

.hop-viz__center-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.hop-viz__center-count {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
}

.hop-viz__center-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-1);
}

.hop-viz__center-pills {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.hop-viz__arrow {
  display: flex;
  align-items: center;
  padding: 0 var(--space-2);
  color: var(--text-muted);
}

.hop-viz__arrow svg {
  width: 1.5rem;
  height: 1.5rem;
}

.hop-viz__col-wrap {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
}

.hop-viz__col-spacer {
  width: var(--space-3);
  flex-shrink: 0;
}

.hop-viz__col-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.hop-viz__col-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: var(--space-1);
  font-weight: 500;
}

.hop-viz__col-btn {
  flex: 1;
  min-width: 7.5rem;
  border: 1px solid;
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: var(--content-surface);
  border-color: #c4b5fd;
}

.hop-viz__col-btn:hover {
  border-color: #a78bfa;
}

.hop-viz__col-btn--selected {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.04);
}

.hop-viz__col-count {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.hop-viz__col-sublabel {
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.hop-viz__status-bar {
  width: 100%;
  height: 1.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  margin-top: var(--space-3);
}

.hop-viz__status-seg--green  { background-color: var(--emerald-400); }
.hop-viz__status-seg--orange { background-color: #fb923c; }
.hop-viz__status-seg--red    { background-color: var(--red-500); }
.hop-viz__status-seg--yellow { background-color: #facc15; }

.hop-viz__pills {
  margin-top: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  justify-content: center;
}

.hop-viz__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-weight: 600;
}

.hop-viz__pill--green  { background: rgba(52, 211, 153, 0.2); color: var(--emerald-700); }
.hop-viz__pill--orange { background: rgba(251, 146, 60, 0.2); color: #9a3412; }
.hop-viz__pill--red    { background: rgba(239, 68, 68, 0.2);  color: var(--red-700); }
.hop-viz__pill--yellow { background: rgba(250, 204, 21, 0.2); color: #854d0e; }

.hop-viz__pill--selected.hop-viz__pill--green  { background: rgba(52, 211, 153, 0.5); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4); }
.hop-viz__pill--selected.hop-viz__pill--orange { background: rgba(251, 146, 60, 0.5); box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.4); }
.hop-viz__pill--selected.hop-viz__pill--red    { background: rgba(239, 68, 68, 0.5);  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.4); }
.hop-viz__pill--selected.hop-viz__pill--yellow { background: rgba(250, 204, 21, 0.5); box-shadow: 0 0 0 2px rgba(202, 138, 4, 0.4); }

.hop-viz__pill-label {
  font-weight: 500;
}

.hop-viz__expand-toggle {
  display: flex;
  justify-content: center;
  margin-top: var(--space-3);
}

.hop-viz__expand-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  background: var(--emerald-600);
  border: none;
  border-radius: var(--radius-lg);
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.hop-viz__expand-btn:hover {
  background: var(--emerald-700);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.hop-viz__expand-btn svg {
  width: 1rem;
  height: 1rem;
  stroke: #fff;
}

.hop-viz__no-data {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: var(--space-8) 0;
}

/* ==========================================================================
   Path Explorer Cards (Cascading drill-down)
   ========================================================================== */

.path-explorer {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding: var(--space-2) var(--space-1);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar */
.path-explorer::-webkit-scrollbar {
  height: 6px;
}

.path-explorer::-webkit-scrollbar-track {
  background: var(--neutral-100);
  border-radius: 3px;
}

.path-explorer::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: 3px;
}

.path-explorer::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-400);
}

.path-explorer__card {
  flex: 1 1 0;
  min-width: 10rem;
  background: var(--content-surface);
  border: 1px solid var(--content-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.path-explorer__header {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  padding: var(--space-3) var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--neutral-100);
}

.path-explorer__list {
  max-height: 20rem;
  overflow-y: auto;
  padding: var(--space-1) 0;
}

.path-explorer__list::-webkit-scrollbar {
  width: 4px;
}

.path-explorer__list::-webkit-scrollbar-track {
  background: transparent;
}

.path-explorer__list::-webkit-scrollbar-thumb {
  background: var(--neutral-200);
  border-radius: 2px;
}

.path-explorer__domain {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.375rem var(--space-3);
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.path-explorer__domain:hover {
  background: var(--neutral-50);
}

.path-explorer__domain--selected {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-700);
  font-weight: 500;
}

.path-explorer__domain--selected:hover {
  background: rgba(59, 130, 246, 0.18);
}

.path-explorer__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.path-explorer__dot--valid      { background: var(--emerald-500); }
.path-explorer__dot--issue      { background: var(--red-500); }
.path-explorer__dot--warning    { background: #fb923c; }
.path-explorer__dot--unverified { background: var(--neutral-400); }

.path-explorer__domain-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  font-size: 0.8125rem;
}

.path-explorer__chevron {
  flex-shrink: 0;
  color: var(--neutral-300);
  transition: color var(--transition-fast);
}

.path-explorer__domain:hover .path-explorer__chevron,
.path-explorer__domain--selected .path-explorer__chevron {
  color: var(--neutral-500);
}

.path-explorer__chain-end {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--neutral-500);
  background: var(--neutral-100);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.path-explorer__empty {
  padding: var(--space-4) var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-align: center;
}

.path-explorer__spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e5e7eb;
  border-top-color: #10b981;
  border-radius: 50%;
  animation: explorer-spin 0.6s linear infinite;
}

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

/* ==========================================================================
   SSP Flow Visualization (SSP mode)
   ========================================================================== */

.ssp-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 20rem;
}

.ssp-flow__column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ssp-flow__column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding: 0 var(--space-1);
}

.ssp-flow__column-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ssp-flow__column-title--upstream   { color: var(--blue-600); }
.ssp-flow__column-title--downstream { color: #9333ea; }

.ssp-flow__column-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.ssp-flow__column-issues {
  color: var(--red-600);
  font-weight: 500;
}

.ssp-flow__list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-height: 25rem;
}

.ssp-flow__list--left  { padding-right: var(--space-2); }
.ssp-flow__list--right { padding-left: var(--space-2); }

.ssp-flow__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.ssp-flow__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  min-height: 120px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.ssp-flow__loading .spinner {
  width: 1rem;
  height: 1rem;
}

.ssp-flow__center {
  flex-shrink: 0;
  width: 11rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ssp-flow__center-card {
  border: 2px solid #a855f7;
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  text-align: center;
  width: 100%;
}

.ssp-flow__center-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #a855f7;
  margin: 0 auto var(--space-2);
}

.ssp-flow__center-domain {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssp-flow__center-type {
  font-size: var(--text-xs);
  color: #a855f7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-1);
}

.ssp-flow__center-stats {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ssp-flow__center-stat {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.ssp-flow__arrow {
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  flex-shrink: 0;
}

.ssp-flow__arrow svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--neutral-300);
}

.ssp-flow__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  cursor: pointer;
  text-align: left;
  border-right: none;
  border-top: none;
  border-bottom: none;
  transition: background-color var(--transition-fast);
}

.ssp-flow__item--green {
  border-left-color: var(--emerald-500);
  background: var(--emerald-50);
}
.ssp-flow__item--green:hover { background: var(--emerald-100); }

.ssp-flow__item--orange {
  border-left-color: #fb923c;
  background: #fff7ed;
}
.ssp-flow__item--orange:hover { background: #ffedd5; }

.ssp-flow__item--red {
  border-left-color: var(--red-500);
  background: var(--red-50);
}
.ssp-flow__item--red:hover { background: var(--red-100); }

.ssp-flow__item-domain {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.ssp-flow__item-badges {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.ssp-flow__item-rel {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.ssp-flow__item-rel--direct {
  background: var(--emerald-100);
  color: var(--emerald-700);
}

.ssp-flow__item-rel--reseller {
  background: var(--amber-100);
  color: var(--amber-700);
}

.ssp-flow__item-type {
  font-size: 0.625rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Flow Entity Popup (SSP mode detail modal)
   ========================================================================== */

.flow-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
}

.flow-popup {
  background: var(--content-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--content-border);
  width: 100%;
  max-width: 32rem;
  margin: 0 var(--space-4);
  overflow: hidden;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.flow-popup__header {
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.flow-popup__header--valid     { background: var(--emerald-500); }
.flow-popup__header--issue     { background: var(--red-500); }
.flow-popup__header--warning   { background: #f97316; }
.flow-popup__header--unverified { background: var(--neutral-500); }

.flow-popup__header-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.flow-popup__header-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #fff;
}

.flow-popup__header-domain {
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
}

.flow-popup__header-meta {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-xs);
}

.flow-popup__close {
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  transition: color var(--transition-fast);
}

.flow-popup__close:hover { color: #fff; }

.flow-popup__close svg {
  width: 1rem;
  height: 1rem;
}

.flow-popup__summary {
  padding: var(--space-3) var(--space-5);
  background: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-100);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
}

.flow-popup__summary-label { color: var(--text-muted); }

.flow-popup__summary-issues {
  margin-left: auto;
  color: var(--red-600);
  font-weight: 500;
}

.flow-popup__connections {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3) var(--space-5);
}

.flow-popup__conn-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.flow-popup__conn-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.flow-popup__conn-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--content-border);
  padding: var(--space-3);
}

.flow-popup__conn-card--valid     { background: var(--emerald-50); }
.flow-popup__conn-card--issue     { background: var(--red-50); }
.flow-popup__conn-card--warning   { background: #fff7ed; }
.flow-popup__conn-card--unverified { background: var(--neutral-50); }

.flow-popup__conn-path {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.flow-popup__conn-domain {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-popup__conn-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: var(--text-xs);
}

.flow-popup__conn-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.flow-popup__conn-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.flow-popup__conn-dot--valid     { background: var(--emerald-500); }
.flow-popup__conn-dot--issue     { background: var(--red-500); }
.flow-popup__conn-dot--warning   { background: #f97316; }
.flow-popup__conn-dot--unverified { background: var(--neutral-400); }

.flow-popup__conn-status-text {
  font-size: var(--text-xs);
  font-weight: 600;
}

.flow-popup__conn-status-text--valid     { color: var(--emerald-700); }
.flow-popup__conn-status-text--issue     { color: var(--red-700); }
.flow-popup__conn-status-text--warning   { color: #9a3412; }
.flow-popup__conn-status-text--unverified { color: var(--neutral-700); }

.flow-popup__conn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1) var(--space-4);
  font-size: var(--text-xs);
}

.flow-popup__conn-grid-label { color: var(--text-muted); }

.flow-popup__conn-grid-value { color: var(--neutral-700); }

.flow-popup__conn-grid-value--mono {
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-popup__conn-grid-value--error {
  color: var(--red-600);
  font-weight: 500;
}

.flow-popup__conn-diagnosis {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--content-border);
  font-size: var(--text-xs);
  color: var(--neutral-600);
  line-height: 1.5;
}

.flow-popup__loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.flow-popup__loading .spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--neutral-200);
  border-top-color: var(--neutral-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.flow-popup__conn-empty {
  padding: var(--space-4) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

.flow-popup__conn-more {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--content-border);
}

/* ==========================================================================
   Chain Path Diagram Component
   ========================================================================== */

.chain-path {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  padding: var(--space-1) 0;
  min-width: 200px;
}

.chain-path__entity {
  display: flex;
  align-items: center;
}

.chain-path__circle {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: default;
}

.chain-path__circle--empty {
  border-style: dashed;
  border-color: var(--neutral-300);
  background: var(--content-surface);
}

.chain-path__circle--compact {
  border-color: var(--neutral-300);
  background: var(--content-surface);
}

.chain-path__circle--focused {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 2px;
}

.chain-path__circle-num {
  font-size: 0.5625rem;
  font-weight: 500;
  color: var(--neutral-500);
}

.chain-path__circle--empty .chain-path__circle-num {
  font-size: 0.5rem;
  color: var(--neutral-300);
}

.chain-path__circle--focused .chain-path__circle-num {
  font-weight: 700;
  color: var(--neutral-600);
}

.chain-path__circle--valid     { border-color: var(--emerald-500); background: var(--emerald-50); }
.chain-path__circle--issue     { border-color: var(--red-500);     background: var(--red-50); }
.chain-path__circle--warning   { border-color: #f97316;            background: #fff7ed; }
.chain-path__circle--unverified { border-color: var(--neutral-400); background: var(--neutral-50); }

.chain-path__expanded {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: default;
}

.chain-path__domain-label {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  max-width: 5.625rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.chain-path__connector {
  display: flex;
  align-items: center;
  margin: 0 var(--space-1);
}

.chain-path__line {
  width: 1rem;
  height: 2px;
}

.chain-path__line--valid   { background: var(--emerald-500); }
.chain-path__line--issue   { background: var(--red-500); }
.chain-path__line--warning { background: #f97316; }

.chain-path__line--unverified {
  height: 0;
  border-top: 1px dashed var(--neutral-400);
}

.chain-path__line--gray {
  background: var(--neutral-300);
  height: 1px;
}

.chain-path__line--dashed {
  height: 0;
  border-top: 1px dashed var(--neutral-300);
  width: 1rem;
}

.chain-path__line--status {
  height: 1.5px;
  opacity: 0.6;
}

.chain-path__status-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.chain-path__status-icon--valid     { color: var(--emerald-500); }
.chain-path__status-icon--issue     { color: var(--red-500); }
.chain-path__status-icon--warning   { color: #f97316; }
.chain-path__status-icon--unverified { color: var(--neutral-400); }

.chain-path__tooltip {
  position: fixed;
  z-index: 50;
  padding: 0.375rem 0.625rem;
  background: var(--neutral-900);
  color: #fff;
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  transform: translate(-50%, -100%);
}

.chain-path__tooltip-domain { font-weight: 500; }
.chain-path__tooltip-type   { color: var(--neutral-300); font-size: 0.625rem; }
.chain-path__tooltip-id     { color: var(--neutral-400); font-size: 0.625rem; }

/* ==========================================================================
   Supply Chain Table (generic reusable)
   ========================================================================== */

.supply-chain-table {
  background: var(--content-surface);
  border: 1px solid var(--content-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.supply-chain-table__scroll {
  overflow-x: auto;
}

.supply-chain-table__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.supply-chain-table__table thead {
  background: var(--neutral-50);
  position: sticky;
  top: 0;
  z-index: 2;
}

.supply-chain-table__table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--content-border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.supply-chain-table__table th:hover {
  color: var(--text-primary);
}

.supply-chain-table__table th .sort-indicator {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.625rem;
  color: var(--neutral-300);
}

.supply-chain-table__table th .sort-indicator--asc,
.supply-chain-table__table th .sort-indicator--desc {
  color: var(--text-primary);
}

.supply-chain-table__table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--neutral-100);
}

.supply-chain-table__table tbody tr {
  transition: background-color var(--transition-fast);
}

.supply-chain-table__table tbody tr:hover {
  background: var(--neutral-50);
}

.supply-chain-table__table .cell-checkbox {
  width: 2.5rem;
  text-align: center;
}

.supply-chain-table__table .cell-checkbox input {
  cursor: pointer;
}

.supply-chain-table__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--content-border);
  gap: var(--space-3);
}

.supply-chain-table__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--content-border);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.supply-chain-table__page-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.supply-chain-table__empty {
  padding: var(--space-8);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ==========================================================================
   Supply Table (chain verification specific)
   ========================================================================== */

.supply-table__status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin-right: var(--space-1);
}

.supply-table__status-dot--valid     { background: var(--emerald-500); }
.supply-table__status-dot--issue     { background: var(--red-500); }
.supply-table__status-dot--warning   { background: #f97316; }
.supply-table__status-dot--unverified { background: var(--neutral-400); }

.supply-table__break-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
}

.supply-table__break-badge--valid {
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.supply-table__break-badge--issue {
  background: var(--red-50);
  color: var(--red-700);
}

.supply-table__break-badge--warning {
  background: #fff7ed;
  color: #9a3412;
}

.supply-table__break-badge--unverified {
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.supply-table__issues-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-md, 0.375rem);
  border: 1px solid var(--neutral-200);
  background: var(--neutral-50, #fafafa);
  color: var(--neutral-600);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.supply-table__issues-toggle:hover {
  border-color: var(--neutral-300);
  background: var(--neutral-100);
}

/* ==========================================================================
   Export Picker Modal
   ========================================================================== */

.export-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}

.export-picker {
  background: #fff;
  border-radius: var(--radius-lg, 0.5rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  min-width: 320px;
  max-width: 400px;
}

.export-picker__title {
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--neutral-800, #1f2937);
  margin-bottom: 1rem;
}

.export-picker__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.export-picker__option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  border: 1px solid var(--neutral-200, #e5e7eb);
  border-radius: var(--radius-md, 0.375rem);
  background: #fff;
  color: var(--neutral-700, #374151);
  cursor: pointer;
  transition: all 0.15s ease;
}

.export-picker__option:hover {
  border-color: var(--emerald-400, #34d399);
  background: var(--emerald-50, #ecfdf5);
  color: var(--emerald-700, #047857);
}

.export-picker__option--email {
  border-style: dashed;
  color: var(--neutral-500, #6b7280);
}

.export-picker__option--email:hover {
  border-color: var(--blue-400, #60a5fa);
  background: var(--blue-50, #eff6ff);
  color: var(--blue-700, #1d4ed8);
}

.export-picker__cancel {
  display: block;
  width: 100%;
  padding: 0.5rem;
  font-size: var(--text-xs, 0.75rem);
  font-weight: 500;
  border: none;
  background: none;
  color: var(--neutral-400, #9ca3af);
  cursor: pointer;
  text-align: center;
}

.export-picker__cancel:hover {
  color: var(--neutral-600, #4b5563);
}

/* ==========================================================================
   Column Browser Component
   ========================================================================== */

.column-browser {
  position: relative;
}

.column-browser__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--content-border);
  border-radius: var(--radius-md);
  background: var(--content-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.column-browser__trigger:hover {
  background: var(--neutral-100);
}

.column-browser__panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  background: var(--content-surface);
  border: 1px solid var(--content-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
  min-width: 14rem;
  max-height: 20rem;
  overflow-y: auto;
  display: none;
}

.column-browser__panel--open {
  display: block;
}

.column-browser__actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--content-border);
}

.column-browser__action-btn {
  font-size: var(--text-xs);
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}

.column-browser__action-btn:hover {
  text-decoration: underline;
}

.column-browser__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
}

.column-browser__item label {
  font-size: var(--text-xs);
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.column-browser__item input[type="checkbox"] {
  cursor: pointer;
}

/* ==========================================================================
   Pagination Buttons (shared by supplyChainTable)
   ========================================================================== */

.ssp-optimizer__page-btn {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  border: 1px solid var(--content-border);
  background: var(--content-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.ssp-optimizer__page-btn:hover:not(:disabled) {
  background: var(--neutral-100);
}

.ssp-optimizer__page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ssp-optimizer__page-btn--active {
  background: var(--neutral-900);
  color: var(--text-inverse);
  border-color: var(--neutral-900);
}

/* ==========================================================================
   Duplicate Path Row Component
   ========================================================================== */

.duplicate-row {
  border-bottom: 1px solid var(--content-border);
}

.duplicate-row:last-child {
  border-bottom: none;
}

.duplicate-row__header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  transition: background-color var(--transition-fast);
}

.duplicate-row__header:hover {
  background: var(--neutral-50);
}

.duplicate-row__chevron {
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.duplicate-row--expanded .duplicate-row__chevron {
  transform: rotate(90deg);
}

.duplicate-row__severity-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.duplicate-row__severity-dot--critical { background: var(--red-500); }
.duplicate-row__severity-dot--warning  { background: var(--amber-500); }
.duplicate-row__severity-dot--info     { background: var(--blue-500); }

.duplicate-row__entity {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.duplicate-row__name {
  font-weight: 700;
  color: var(--text-primary);
}

.duplicate-row__domain-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.duplicate-row__count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--purple-100);
  color: var(--purple-700);
}

.duplicate-row__spacer {
  flex: 1;
}

.duplicate-row__details {
  padding: 0 var(--space-4) var(--space-4);
  padding-left: 2.75rem;
  display: none;
}

.duplicate-row--expanded .duplicate-row__details {
  display: block;
}

.duplicate-row__details-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.duplicate-row__fault {
  background: var(--amber-50);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.duplicate-row__fault-icon {
  width: 1rem;
  height: 1rem;
  color: var(--amber-600);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.duplicate-row__fault-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: #9a3412;
}

.duplicate-row__fault-title strong { font-weight: 700; }

.duplicate-row__fault-reason {
  font-size: var(--text-xs);
  color: var(--amber-700);
  margin-top: 0.125rem;
}

.duplicate-row__paths-header {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.duplicate-row__hop-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.duplicate-row__hop-group {
  border-radius: var(--radius-lg);
  border: 1px solid;
  overflow: hidden;
}

.duplicate-row__hop-group--short {
  border-color: var(--emerald-300);
  background: rgba(236, 253, 245, 0.4);
}

.duplicate-row__hop-group--long {
  border-color: var(--red-200);
  background: rgba(254, 242, 242, 0.4);
}

.duplicate-row__hop-group-header {
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid;
}

.duplicate-row__hop-group--short .duplicate-row__hop-group-header {
  background: rgba(209, 250, 229, 0.6);
  border-bottom-color: var(--emerald-200);
}

.duplicate-row__hop-group--long .duplicate-row__hop-group-header {
  background: rgba(254, 226, 226, 0.6);
  border-bottom-color: var(--red-200);
}

.duplicate-row__hop-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
}

.duplicate-row__hop-group--short .duplicate-row__hop-badge {
  background: var(--emerald-200);
  color: var(--emerald-700);
}

.duplicate-row__hop-group--long .duplicate-row__hop-badge {
  background: var(--red-200);
  color: var(--red-700);
}

.duplicate-row__hop-group-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.duplicate-row__hop-group-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--emerald-700);
  margin-left: auto;
}

.duplicate-row__hop-group-paths {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ==========================================================================
   Path Row (single path visualization)
   ========================================================================== */

.path-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: 0.625rem var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
}

.path-row__chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.path-row__node {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.path-row__node-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.path-row__node-chip--source {
  background: var(--emerald-100);
  color: var(--emerald-700);
}

.path-row__node-chip--intermediate {
  background: var(--blue-100);
  color: var(--blue-700);
}

.path-row__node-chip--duplicate {
  background: var(--red-100);
  color: var(--red-700);
  border: 2px solid var(--red-400);
}

.path-row__seller-id {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  border: 1px solid;
}

.path-row__seller-id--valid {
  background: var(--amber-100);
  color: #9a3412;
  border-color: var(--amber-200);
}

.path-row__seller-id--issue {
  background: var(--red-100);
  color: var(--red-700);
  border-color: var(--red-400);
}

.path-row__seller-id--confidential {
  background: var(--violet-100);
  color: var(--violet-800);
  border-color: var(--violet-300);
}

.path-row__seller-id--warning {
  background: var(--orange-100);
  color: #9a3412;
  border-color: var(--orange-400);
}

.path-row__seller-id--unverified {
  background: var(--neutral-100);
  color: var(--neutral-600);
  border-color: var(--neutral-300);
}

.path-row__relationship {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.path-row__relationship--direct {
  background: var(--green-100);
  color: var(--green-700);
}

.path-row__relationship--reseller {
  background: var(--amber-100);
  color: var(--amber-700);
}

.path-row__seller-type-both {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-weight: 500;
  background: var(--teal-100);
  color: var(--teal-700);
  border: 1px solid var(--teal-300);
}

.path-row__arrow {
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin: 0 var(--space-1);
}

.path-row__hop-count {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--neutral-100);
  color: var(--neutral-600);
  margin-left: auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .hop-viz__columns {
    flex-wrap: wrap;
  }

  .hop-viz__center-box {
    width: 100%;
    margin-bottom: var(--space-4);
  }

  .ssp-flow {
    flex-direction: column;
    gap: var(--space-4);
  }

  .ssp-flow__arrow {
    justify-content: center;
    padding: var(--space-2) 0;
  }

  .ssp-flow__arrow svg {
    transform: rotate(90deg);
  }

  .ssp-flow__center {
    width: 100%;
  }
}

/* ==========================================================================
   Edge Detail Modal (status click modal)
   ========================================================================== */

.edge-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
}

.edge-modal {
  background: var(--content-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--content-border);
  width: 100%;
  max-width: 28rem;
  margin: 0 var(--space-4);
  overflow: hidden;
}

.edge-modal__header {
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edge-modal__header--valid     { background: var(--emerald-500); }
.edge-modal__header--issue     { background: var(--red-500); }
.edge-modal__header--warning   { background: #f97316; }
.edge-modal__header--unverified { background: var(--neutral-500); }

.edge-modal__header-title {
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
}

.edge-modal__header-sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-xs);
  margin-top: 0.125rem;
}

.edge-modal__close {
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  transition: color var(--transition-fast);
}

.edge-modal__close:hover { color: #fff; }

.edge-modal__close svg {
  width: 1rem;
  height: 1rem;
}

.edge-modal__path {
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid var(--neutral-100);
  background: var(--neutral-50);
}

.edge-modal__path-domain {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-modal__path-arrow {
  color: var(--text-muted);
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.edge-modal__hop-badge {
  margin-left: auto;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--blue-600);
  background: var(--blue-50);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.edge-modal__steps {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--neutral-100);
}

.edge-modal__steps-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.edge-modal__steps-list {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.edge-modal__step {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--neutral-700);
  line-height: 1.5;
}

.edge-modal__step::before {
  content: counter(step);
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--neutral-100);
  color: var(--neutral-600);
  font-size: var(--text-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edge-modal__status {
  margin: var(--space-3) var(--space-5);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
}

.edge-modal__status--valid     { background: var(--emerald-50); border: 1px solid var(--emerald-200); }
.edge-modal__status--issue     { background: var(--red-50); border: 1px solid var(--red-200); }
.edge-modal__status--warning   { background: var(--orange-50); border: 1px solid var(--orange-100); }
.edge-modal__status--unverified { background: var(--neutral-50); border: 1px solid var(--neutral-200); }

.edge-modal__status-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.edge-modal__status-message {
  font-size: var(--text-sm);
  color: var(--neutral-700);
}

.edge-modal__details {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--neutral-100);
  display: flex;
  gap: var(--space-6);
}

.edge-modal__detail {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.edge-modal__detail-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.edge-modal__detail-value {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--neutral-700);
}

/* ==========================================================================
   Animations
   ========================================================================== */

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