/*
 * Double Zero Observatory — Design System
 * Brutalist editorial style with warm contrast
 * 
 * Usage: 
 *   1. Link this file in your HTML: <link rel="stylesheet" href="design-system.css">
 *   2. Add Google Font in <head>: 
 *      <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
 */

/* =============================================================================
   CSS VARIABLES / DESIGN TOKENS
   ============================================================================= */

:root {
  /* Backgrounds */
  --bg-cream: #FDFBF7;
  --bg-warm: #F5F3EE;
  --bg-dark: #1A1D24;
  
  /* Typography */
  --ink: #1A1D24;
  --ink-soft: #2D323D;
  --ink-muted: #6B7280;
  --text-light: #FDFBF7;
  --text-light-muted: rgba(255, 255, 255, 0.6);
  --text-light-faint: rgba(255, 255, 255, 0.4);
  
  /* Borders */
  --border: #1A1D24;
  --border-soft: #D1CEC7;
  --border-light: rgba(255, 255, 255, 0.1);
  --border-light-strong: rgba(255, 255, 255, 0.2);
  
  /* Operator Colors */
  --color-green: #00C853;
  --color-blue: #2979FF;
  --color-purple: #7C4DFF;
  --color-yellow: #FFB300;
  --color-red: #FF5252;
  --color-orange: #FF6D00;
  --color-pink: #E040FB;
  --color-teal: #00E676;
  
  /* Semantic Colors */
  --color-success: #00C853;
  --color-warning: #FFB300;
  --color-error: #FF5252;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Border widths */
  --border-thin: 1px;
  --border-medium: 2px;
  --border-thick: 3px;
  
  /* Typography */
  --font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-size-xs: 9px;
  --font-size-sm: 11px;
  --font-size-base: 13px;
  --font-size-md: 14px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 28px;
  --font-size-3xl: 32px;
  --font-size-4xl: 42px;
  --font-size-hero: 100px;
  
  /* Letter spacing */
  --tracking-tight: -0.05em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;
  --tracking-widest: 0.12em;
  
  /* Grid background */
  --grid-color-light: rgba(0, 200, 83, 0.1);
  --grid-color-dark: rgba(0, 200, 83, 0.08);
  --grid-size: 40px;
}


/* =============================================================================
   BASE / RESET
   ============================================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background: var(--bg-cream);
  font-family: var(--font-family);
  color: var(--ink);
  line-height: 1.5;
}


/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.tracking-tight { letter-spacing: var(--tracking-tight); }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }
.tracking-widest { letter-spacing: var(--tracking-widest); }

.uppercase { text-transform: uppercase; }
.tabular-nums { font-variant-numeric: tabular-nums; }

.text-muted { color: var(--ink-muted); }
.text-light { color: var(--text-light); }
.text-light-muted { color: var(--text-light-muted); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }


/* =============================================================================
   HEADER
   ============================================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-cream);
  border-bottom: 3px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 48px;
  height: 64px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.header__logo-dot {
  width: 32px;
  height: 32px;
  background: var(--ink);
  border-radius: 50%;
}

.header__logo-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__nav {
  display: flex;
  height: 100%;
}

.header__nav-link {
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink);
  border-left: 1px solid var(--border);
  transition: background 0.15s;
}

.header__nav-link:hover {
  background: var(--bg-warm);
}

.header__nav-link.is-active {
  background: var(--ink);
  color: var(--bg-cream);
}

.header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__epoch-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.header__epoch-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}


/* =============================================================================
   HERO SECTION (with grid background)
   ============================================================================= */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: var(--border-thick) solid var(--border);
}

.hero__left {
  padding: var(--space-2xl);
  border-right: var(--border-thick) solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Dark background with green glow */
.hero__bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 200, 83, 0.08) 0%, transparent 50%),
    var(--bg-dark);
}

/* Green grid overlay */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--grid-color-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color-light) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: var(--font-size-hero);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
  margin-bottom: var(--space-lg);
  color: var(--text-light);
}

.hero__subtitle {
  font-size: 15px;
  line-height: 1.6;
  max-width: 380px;
  color: var(--text-light-muted);
}

.hero__subtitle strong {
  color: var(--color-success);
}


/* =============================================================================
   STATS GRID
   ============================================================================= */

.stats-grid {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: var(--border-thick) solid var(--border);
}

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

.stat-box {
  padding: var(--space-lg) var(--space-xl);
  border-right: var(--border-thick) solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
}

.stat-box:last-child {
  border-right: none;
}

.stat-box.is-inverted {
  background: var(--ink);
  color: var(--text-light);
}

.stat-box__label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  color: var(--ink-muted);
}

.stat-box.is-inverted .stat-box__label {
  color: var(--text-light-muted);
}

.stat-box__value {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stat-box__value.is-muted {
  color: var(--border-soft);
}

.stat-box__value .unit {
  font-size: var(--font-size-xl);
  color: var(--ink-muted);
}

.stat-box.is-inverted .stat-box__value .unit {
  color: var(--text-light-faint);
}


/* =============================================================================
   SIDEBAR
   ============================================================================= */

.sidebar {
  border-right: var(--border-thick) solid var(--border);
}

.sidebar__header {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-warm);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  border-bottom: var(--border-thick) solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* =============================================================================
   OPERATOR LIST
   ============================================================================= */

.operator-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: var(--border-thin) solid var(--border-soft);
  cursor: pointer;
  transition: all 0.1s ease;
}

.operator-item:hover {
  background: var(--bg-warm);
}

.operator-item.is-selected {
  background: var(--ink);
  color: var(--text-light);
}

.operator-item__info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.operator-item__dot {
  width: 12px;
  height: 12px;
}

.operator-item__name {
  font-size: var(--font-size-md);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.operator-item__share {
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}


/* =============================================================================
   BAR CHART
   ============================================================================= */

.bar-chart {
  padding: var(--space-2xl);
}

.bar-chart__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.bar-chart__title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  color: var(--ink-muted);
}

.bar-chart__meta {
  font-size: var(--font-size-sm);
  color: var(--ink-muted);
}

.bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 90px 70px;
  align-items: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.bar-row__name {
  font-size: var(--font-size-base);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bar-row__track {
  height: 36px;
  background: var(--bg-warm);
  position: relative;
}

.bar-row__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  transition: width 0.5s ease;
}

.bar-row__amount {
  font-size: var(--font-size-md);
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bar-row__status {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  padding: 6px 0;
  text-align: center;
  border: var(--border-medium) solid;
}

.bar-row__status.is-paid {
  border-color: var(--color-success);
  color: var(--color-success);
}

.bar-row__status.is-pending {
  border-color: var(--color-warning);
  color: var(--color-warning);
  background: rgba(255, 179, 0, 0.1);
}


/* =============================================================================
   VERIFICATION GRID (dark section with green grid)
   ============================================================================= */

.verification {
  padding: var(--space-2xl);
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.verification__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(0, 200, 83, 0.1) 0%, transparent 50%);
}

.verification__grid-bg {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--grid-color-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color-dark) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}

.verification__content {
  position: relative;
  z-index: 1;
}

.verification__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.verification__title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  color: var(--text-light-muted);
}

.verification__status-all {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--color-success);
}

.verification__status-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
}

.verification-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  background: var(--border-light);
}

.verification-item {
  background: var(--bg-dark);
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  border: var(--border-thin) solid var(--border-light);
}

.verification-item__dot {
  width: 16px;
  height: 16px;
  margin: 0 auto var(--space-md);
}

.verification-item__name {
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-light-muted);
  margin-bottom: var(--space-sm);
}

.verification-item__value {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-light);
  margin-bottom: 12px;
}

.verification-item__check {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.verification-item__check.is-pending {
  color: var(--color-warning);
}

.verification-item__check-icon {
  width: 16px;
  height: 16px;
  background: var(--color-success);
  color: var(--bg-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}


/* =============================================================================
   MAP COMPONENTS
   ============================================================================= */

/* Map container (dark) */
.map-container {
  position: relative;
  background: var(--bg-dark);
  overflow: hidden;
}

.map-container__bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 40%, rgba(0, 200, 83, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(41, 121, 255, 0.1) 0%, transparent 40%),
    var(--bg-dark);
}

.map-container__grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Map controls */
.map-controls {
  position: absolute;
  top: var(--space-lg);
  left: var(--space-lg);
  border: var(--border-medium) solid var(--border-light-strong);
}

.map-controls__btn {
  width: 44px;
  height: 44px;
  background: var(--bg-dark);
  border: none;
  border-bottom: var(--border-thin) solid var(--border-light-strong);
  color: var(--text-light);
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-controls__btn:last-child {
  border-bottom: none;
}

.map-controls__btn:hover {
  background: var(--color-success);
  color: var(--bg-dark);
}

/* Layer toggles */
.layer-toggles {
  position: absolute;
  bottom: 40px;
  left: 60px;
  display: flex;
  border: 2px solid var(--border-light-strong);
  background: var(--bg-dark);
  z-index: 1000;
}

.layer-toggle {
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-light-strong);
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
}

.layer-toggle:last-child {
  border-right: none;
}

.layer-toggle.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.layer-toggle:hover {
  color: #fff;
}

.toggle-check {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.layer-toggle.active .toggle-check {
  background: var(--color-green);
  border-color: var(--color-green);
  color: var(--bg-dark);
}

/* Popup (brutalist style) */
.map-popup {
  position: absolute;
  background: var(--bg-cream);
  border: var(--border-thick) solid var(--border);
  min-width: 260px;
  box-shadow: 8px 8px 0 var(--border);
}

.map-popup__header {
  padding: 14px 18px;
  background: var(--ink);
  color: var(--text-light);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-popup__close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.map-popup__close:hover {
  color: var(--color-error);
}

.map-popup__content {
  padding: var(--space-md) 18px;
}

.map-popup__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: var(--border-thin) solid var(--border-soft);
}

.map-popup__row:last-child {
  border-bottom: none;
}

.map-popup__label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-muted);
}

.map-popup__value {
  font-size: var(--font-size-md);
  font-weight: 700;
}

.map-popup__value.is-highlight {
  color: var(--color-success);
}

.map-popup__action {
  margin-top: 12px;
  padding: 12px var(--space-md);
  width: 100%;
  background: var(--bg-cream);
  border: var(--border-medium) solid var(--color-success);
  color: var(--color-success);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  font-family: var(--font-family);
}

.map-popup__action:hover {
  background: var(--color-success);
  color: var(--bg-dark);
}


/* =============================================================================
   ROUTES TABLE
   ============================================================================= */

.route-row {
  padding: var(--space-md) var(--space-lg);
  border-bottom: var(--border-thin) solid var(--border-soft);
  cursor: pointer;
  transition: all 0.1s ease;
}

.route-row:hover {
  background: var(--bg-warm);
}

.route-row__path {
  font-size: var(--font-size-md);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.route-row__arrow {
  color: var(--color-success);
  font-weight: 400;
}

.route-row__meta {
  display: flex;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
}

.route-row__stat {
  display: flex;
  gap: var(--space-xs);
}

.route-row__stat-label {
  color: var(--ink-muted);
  font-weight: 500;
}

.route-row__stat-value {
  font-weight: 700;
}

.route-row__stat-value.is-good {
  color: var(--color-success);
}

.route-row__operator {
  margin-left: auto;
  font-weight: 700;
  color: var(--color-blue);
}


/* =============================================================================
   LEGEND
   ============================================================================= */

.legend-group {
  padding: var(--space-md) var(--space-lg);
  border-bottom: var(--border-thin) solid var(--border-soft);
}

.legend-group:last-child {
  border-bottom: none;
}

.legend-group__title {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.legend-item__dot {
  width: 12px;
  height: 12px;
}

.legend-item__line {
  width: 24px;
  height: 4px;
}

.legend-item__name {
  font-size: var(--font-size-base);
  font-weight: 500;
}


/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
  border-top: var(--border-thick) solid var(--border);
  padding: var(--space-xl) var(--space-2xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-muted);
}


/* =============================================================================
   UTILITIES
   ============================================================================= */

.border-b { border-bottom: var(--border-thick) solid var(--border); }
.border-r { border-right: var(--border-thick) solid var(--border); }
.border-soft { border-color: var(--border-soft); }

.bg-cream { background: var(--bg-cream); }
.bg-warm { background: var(--bg-warm); }
.bg-dark { background: var(--bg-dark); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }


/* =============================================================================
   LEAFLET OVERRIDES (for your map)
   ============================================================================= */

.leaflet-container {
  background: var(--bg-dark);
  font-family: var(--font-family);
}

/* Zoom Controls */
.leaflet-control-zoom {
  border: var(--border-medium) solid var(--border-light-strong) !important;
  border-radius: 0 !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--bg-dark) !important;
  color: var(--text-light) !important;
  border: none !important;
  border-bottom: var(--border-thin) solid var(--border-light-strong) !important;
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  font-family: var(--font-family) !important;
}

.leaflet-control-zoom a:last-child {
  border-bottom: none !important;
}

.leaflet-control-zoom a:hover {
  background: var(--color-success) !important;
  color: var(--bg-dark) !important;
}

/* Popup Styling */
.leaflet-popup-content-wrapper {
  background: var(--bg-cream);
  border: var(--border-thick) solid var(--border);
  border-radius: 0;
  box-shadow: 8px 8px 0 var(--border);
  padding: 0;
}

.leaflet-popup-content {
  margin: 0;
  min-width: 240px;
}

.leaflet-popup-tip-container {
  display: none;
}

.leaflet-popup .popup-header {
  padding: 12px 16px;
  background: var(--ink);
  color: var(--text-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.leaflet-popup .popup-content {
  padding: 12px 16px;
}

.leaflet-popup .popup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: var(--border-thin) solid var(--border-soft);
}

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

.leaflet-popup .popup-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.leaflet-popup .popup-value {
  font-size: 13px;
  font-weight: 700;
}

.leaflet-popup .popup-value.is-highlight {
  color: var(--color-success);
}

.leaflet-popup .popup-action {
  margin-top: 12px;
  padding: 10px 14px;
  width: 100%;
  background: var(--bg-cream);
  border: var(--border-medium) solid var(--color-success);
  color: var(--color-success);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: var(--font-family);
}

.leaflet-popup .popup-action:hover {
  background: var(--color-success);
  color: var(--bg-dark);
}

/* Popup Detail Button */
.leaflet-popup .popup-detail-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  background: var(--bg-warm);
  border: none;
  border-top: 1px solid var(--border-soft);
  color: var(--ink);
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.leaflet-popup .popup-detail-btn:hover {
  background: var(--color-success);
  color: var(--bg-dark);
}

/* Validator Detail List */
.validator-detail-list {
  max-height: 400px;
  overflow-y: auto;
}

.validator-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.validator-detail-item:last-child {
  border-bottom: none;
}

.validator-detail-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.validator-detail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.validator-detail-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.validator-detail-name:hover {
  color: var(--color-success);
}

.validator-detail-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.validator-detail-dzd {
  font-size: 11px;
  color: var(--ink-muted);
  font-family: monospace;
}

.validator-detail-conn {
  display: flex;
  align-items: center;
  gap: 6px;
}

.validator-multi-conn {
  font-size: 10px;
  font-weight: 700;
  color: #FFB300;
  background: rgba(255, 179, 0, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
  cursor: help;
  white-space: nowrap;
}

.validator-detail-item.has-multi-conn {
  border-left: 2px solid #FFB300;
  padding-left: 10px;
  margin-left: -12px;
}

.validator-detail-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.validator-detail-stake {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-success);
}

.validator-detail-commission {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--bg-warm);
  padding: 2px 6px;
  border-radius: 2px;
}

.validator-detail-jito {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #E040FB;
  background: rgba(224, 64, 251, 0.1);
  padding: 2px 6px;
  border-radius: 2px;
}

.validator-detail-dzsol {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(138, 43, 226, 0.15);
}

.validator-detail-ibrl {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.3);
  font-family: monospace;
}

/* Attribution */
.leaflet-control-attribution {
  background: var(--bg-dark) !important;
  color: rgba(255,255,255,0.4) !important;
  font-family: var(--font-family) !important;
  font-size: 10px !important;
  padding: 4px 8px !important;
}

.leaflet-control-attribution a {
  color: rgba(255,255,255,0.6) !important;
}

/* Custom Marker Base (use with L.divIcon) */
.leaflet-marker-icon.custom-marker {
  background: transparent;
  border: none;
}

/* Polyline defaults for WAN links */
.leaflet-interactive.wan-link-high {
  stroke: var(--color-success);
  stroke-opacity: 0.8;
}

.leaflet-interactive.wan-link-low {
  stroke: var(--color-success);
  stroke-opacity: 0.4;
}


/* =============================================================================
   MOBILE RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
  /* Header */
  .header {
    padding: 0 16px;
    height: 56px;
  }

  .header__logo-text {
    font-size: 12px;
  }

  .header__nav-link {
    padding: 0 12px;
    font-size: 10px;
  }

  .header__epoch-value {
    font-size: 18px;
  }

  /* Layer toggles */
  .layer-toggles {
    left: 16px;
    right: 16px;
    bottom: 16px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .layer-toggle {
    padding: 8px 12px;
    font-size: 10px;
  }

  /* Sidebar */
  .sidebar {
    display: none;
  }

  /* Map popups */
  .leaflet-popup-content {
    min-width: 200px;
  }

  /* Verification grid */
  .verification-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .verification-item__value {
    font-size: 22px;
  }

  /* Bar chart rows */
  .bar-row {
    grid-template-columns: 70px 1fr 60px;
    gap: 12px;
  }

  .bar-row__status {
    display: none;
  }

  /* Footer */
  .footer {
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header__logo-text {
    display: none;
  }

  .layer-toggle {
    padding: 6px 10px;
    font-size: 9px;
  }

  .toggle-check {
    display: none;
  }
}
