/* =========================================================
   FMDX — Dark theme for Bootstrap + D3
   File: static/css/style.css
   NOTE: Load Bootstrap BEFORE this file.
   ========================================================= */

/* ---------- Theme tokens ---------- */
:root {
  --bg-page:        #0f172a;  /* page background */
  --bg-surface:     #1f2937;  /* panels/sidebar */
  --bg-surface-2:   #374151;  /* hovers */
  --border:         #4b5563;  /* borders */
  --text:           #f3f4f6;  /* primary text */
  --text-muted:     #9ca3af;  /* secondary text */
  --brand:          #3b82f6;  /* blue */
  --brand-strong:   #2563eb;  /* blue hover */
  --shadow:         rgba(0, 0, 0, 0.35);
  --shadow-subtle:  rgba(0, 0, 0, 0.15);
  --topbar-h:       64px;
  --side-header-h:  64px;
  --radius:         12px;
  --transition:     0.2s ease;
  --viewport-h:     100vh;
}

@supports (height: 100dvh) {
  :root {
    --viewport-h: 100dvh;
  }
}

/* ---------- Base ---------- */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body.page {
  color: var(--text);
  background: var(--bg-page);
  font: 15px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #60a5fa;
}

.main-container {
  padding: 24px;
  margin: 0 auto;
}

.main-container.map-screen {
  padding: 0;
  margin: 0;
  max-width: none;
}

.main-container > section + section {
  margin-top: 1.5rem;
}

.row.gap-tight {
  --bs-gutter-x: 0.9rem;
  --bs-gutter-y: 0.9rem;
}

@media (min-width: 1200px) {
  .main-container > section + section {
    margin-top: 1.8rem;
  }

  .row.gap-tight {
    --bs-gutter-x: 1.8rem;
    --bs-gutter-y: 1.8rem;
  }
}

@media (max-width: 768px) {
  .main-container {
    padding: 16px;
  }
}

/* ---------- Top bar / navigation ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--topbar-h);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 6px var(--shadow-subtle);
}

.topbar .navbar-brand {
  font-weight: 700;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background var(--transition);
}

.topbar .navbar-brand:hover {
  background: var(--bg-surface-2);
  color: var(--text);
}

.topbar .navbar-nav .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  border-radius: var(--radius);
  margin-right: 8px;
  padding: 8px 14px;
  transition: all var(--transition);
}

.topbar .navbar-nav .nav-link:hover {
  color: var(--text);
  background: var(--bg-surface-2);
}

.topbar .navbar-nav .nav-link.active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

.topbar-actions {
  color: var(--text-muted);
}

.topbar-scope {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.topbar-scope__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.topbar-scope__select {
  appearance: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  padding: 8px 36px 8px 12px;
  min-width: 180px;
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23f3f4f6' d='M1.41.59 6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}

.topbar-scope__select:hover {
  background: var(--bg-surface-2);
  border-color: var(--border);
}

.topbar-scope__select:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
}

.topbar-right {
  color: var(--text-muted);
}

@media (max-width: 991.98px) {
  .topbar-actions {
    margin-top: 16px;
  }

  .topbar-scope__select {
    width: 100%;
    min-width: 0;
  }

  .topbar-right {
    text-align: left;
  }
}

.topbar .navbar-toggler {
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius);
  padding: 6px 10px;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.topbar .navbar-toggler:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(59, 130, 246, 0.45);
}

.topbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.35);
  background: rgba(37, 99, 235, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
  outline: none;
}

.topbar .navbar-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(248,250,252,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  filter: none;
  opacity: 1;
}

.badge.bg-primary-subtle {
  background: rgba(59, 130, 246, 0.25) !important;
  color: var(--text) !important;
}

/* ---------- Map + Sidebar layout ---------- */
.map-layout {
  position: relative;
  width: 100%;
  min-height: calc(var(--viewport-h) - var(--topbar-h));
  min-height: max(320px, calc(var(--viewport-h) - var(--topbar-h)));
  height: calc(var(--viewport-h) - var(--topbar-h));
  height: max(320px, calc(var(--viewport-h) - var(--topbar-h)));
  --map-gap-x: clamp(16px, 5vw, 48px);
  --map-gap-y: clamp(16px, 6vh, 48px);
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, rgba(37, 99, 235, 0.08), transparent 55%), #0b1120;
}

#map,
#map.leaflet-container {
  position: absolute;
  inset: 0;
  height: 100% !important;
  width: 100% !important;
  min-height: 320px;
  background: #0b1120;
  border-radius: 0;
  box-shadow: none;
  z-index: 1;
}

.leaflet-control-container .leaflet-top.leaflet-right {
  margin-top: var(--map-gap-y);
  margin-right: var(--map-gap-x);
}

.leaflet-control-container .leaflet-top .leaflet-control {
  margin-top: 0;
}

.leaflet-control-container .leaflet-right .leaflet-control {
  margin-right: 0;
}

.leaflet-control-container .leaflet-top .leaflet-control + .leaflet-control {
  margin-top: 12px;
}

.leaflet-control-container .leaflet-bottom.leaflet-right {
  margin-right: var(--map-gap-x);
  margin-bottom: var(--map-gap-y);
}

.leaflet-bar,
.leaflet-touch .leaflet-bar {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@supports not ((backdrop-filter: blur(1px))) {
  .leaflet-bar,
  .leaflet-touch .leaflet-bar {
    background: rgba(15, 23, 42, 0.96);
  }
}

.leaflet-bar a,
.leaflet-bar a:hover,
.leaflet-touch .leaflet-bar a {
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.leaflet-bar a:hover {
  background: rgba(37, 99, 235, 0.3);
}

.leaflet-bar a:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.leaflet-bar a:last-child {
  border-bottom: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.leaflet-control-layers {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  box-shadow: 0 24px 40px rgba(2, 6, 23, 0.5);
  color: var(--text);
}

.leaflet-control-layers .leaflet-control-layers-toggle {
  width: 40px;
  height: 40px;
  background-color: rgba(15, 23, 42, 0.92);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.45);
}

.leaflet-control-layers .leaflet-control-layers-toggle:hover {
  background-color: rgba(37, 99, 235, 0.3);
}

.leaflet-control-layers-expanded {
  padding: 12px 14px;
}

.leaflet-control-layers-list label {
  color: var(--text-muted);
}

.leaflet-control-layers-selector {
  accent-color: var(--brand);
}

.sidebar-toggle-control {
  border-radius: 14px;
}

.sidebar-toggle-control a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 0;
  line-height: 0;
  border-bottom: none !important;
}

.sidebar-toggle-control a:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.45);
}

.sidebar-toggle-control__icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.85);
  transition: box-shadow 0.2s ease;
}

.sidebar-toggle-control a:hover .sidebar-toggle-control__icon,
.sidebar-toggle-control a:focus-visible .sidebar-toggle-control__icon {
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.9);
}

.sidebar-toggle-control__icon::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  right: 10px;
  border-radius: 3px;
  border: 2px solid rgba(248, 250, 252, 0.9);
  opacity: 0.85;
}

.sidebar-toggle-control__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 4px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid rgba(248, 250, 252, 0.85);
  transform: translateY(-50%);
}

.sidebar-toggle-control__button--hidden .sidebar-toggle-control__icon::after {
  transform: translateY(-50%) scaleX(-1);
}

/* Map markers */
.leaflet-div-icon.receiver-pin {
  background: transparent;
  border: none;
  width: 24px !important;
  height: 34px !important;
}

.receiver-pin {
  --pin-color: var(--brand);
}

.receiver-pin__body {
  position: absolute;
  top: 2px;
  left: 4px;
  width: 16px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.receiver-pin__body::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  top: 5px;
  left: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.receiver-pin__shadow {
  position: absolute;
  bottom: 2px;
  left: 6px;
  width: 12px;
  height: 4px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.45);
  filter: blur(1px);
}

.receiver-pin--locked {
  --pin-color: #ef4444;
}

.receiver-pin--wideband {
  --pin-color: #22c55e;
}

.receiver-pin--active .receiver-pin__body {
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.55);
}

.receiver-pin--active .receiver-pin__shadow {
  background: rgba(59, 130, 246, 0.35);
  filter: blur(0.5px);
}

.map-sidebar {
  position: absolute;
  top: var(--map-gap-y);
  bottom: var(--map-gap-y);
  left: var(--map-gap-x);
  width: min(360px, calc(100% - 2 * var(--map-gap-x)));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.5);
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2;
  transform: translate3d(0, 0, 0);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.24s ease,
              visibility 0s linear 0s;
  visibility: visible;
}

@supports not ((backdrop-filter: blur(1px))) {
  .map-sidebar {
    background: rgba(17, 24, 39, 0.96);
  }
}

.map-sidebar.map-sidebar--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(calc(-100% - var(--map-gap-x)), 0, 0);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease,
              visibility 0s linear 0.32s;
}

@media (min-width: 1440px) {
  .map-sidebar {
    width: min(400px, calc(100% - 2 * var(--map-gap-x)));
  }
}

@media (max-width: 1024px) {
  .map-layout {
    --map-gap-x: clamp(12px, 4vw, 32px);
  }
  .map-sidebar {
    width: min(320px, calc(100% - 2 * var(--map-gap-x)));
  }
}

@media (max-width: 900px) {
  .map-sidebar {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: clamp(340px, 55vh, 520px);
    border-radius: 20px 20px 16px 16px;
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.55);
  }

  .map-sidebar.map-sidebar--hidden {
    transform: translate3d(0, calc(100% + 28px), 0);
  }

  @supports (height: 100dvh) {
    .map-sidebar {
      max-height: clamp(340px, 55dvh, 520px);
    }
  }

  .map-sidebar::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    z-index: 4;
  }

  .side-header {
    padding-top: 32px;
  }
}

@media (max-width: 600px) {
  .map-sidebar {
    bottom: max(env(safe-area-inset-bottom), 12px);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ---------- Sidebar content ---------- */
.side-header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: var(--side-header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(17, 24, 39, 0.92) 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.45);
}

.side-header h2 {
  margin: 0;
  font: 600 18px/1.3 system-ui, sans-serif;
  color: var(--text);
}

#side-count {
  font-weight: 600;
  font-size: 14px;
}

.side-list {
  flex: 1 1 auto;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 4px 0 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(11, 17, 32, 0.95) 100%);
  scrollbar-gutter: stable both-edges;
}

.side-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 12px;
  row-gap: 4px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.side-item.wideband {
  border-left: 4px solid #22c55e;
  padding-left: 20px;
}

.side-item.locked {
  border-left: 4px solid #ef4444;
  padding-left: 20px;
}

.side-item.default {
  border-left: 4px solid var(--brand);
  padding-left: 20px;
}

.side-list > li:last-child {
  border-bottom: none;
}

.side-item.locked.wideband {
  border-left-color: #ef4444;
}

.side-item:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(59, 130, 246, 0.28);
  transform: translateY(-1px);
}

.side-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.38), rgba(37, 99, 235, 0.12));
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
}

.flag {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  margin-top: 2px;
}

.side-title {
  grid-column: 2;
  font: 700 15px/1.3 system-ui, sans-serif;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-location {
  grid-column: 2;
  font: 500 13px/1.4 system-ui, sans-serif;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-url {
  grid-column: 2;
  font: 13px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--text-muted);
  opacity: 0.9;
  text-decoration: none;
  word-break: break-all;
}

.side-url:hover,
.side-url:focus {
  color: var(--brand);
  text-decoration: underline;
}

/* Toggle */
.form-switch .form-check-input {
  background-color: var(--bg-surface-2);
  border-color: var(--border);
  cursor: pointer;
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.35);
}

.form-switch .form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

.form-switch .form-check-label {
  color: var(--text-muted);
  user-select: none;
}

/* ---------- Panels / cards ---------- */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--shadow-subtle);
  transition: transform var(--transition), box-shadow var(--transition);
}

.panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--shadow);
}

.panel-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), transparent);
}

.panel-header h3 {
  margin: 0;
  font: 600 16px/1.3 system-ui, sans-serif;
  color: var(--text);
}

.panel-body {
  padding: 24px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 24px var(--shadow-subtle);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--shadow);
}

.kpi-label {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--text);
}

/* ---------- Tables ---------- */
.table {
  color: var(--text);
}

.table thead th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface-2);
}

.table tbody td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
}

.table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.03);
}

.table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.06);
}

.table tbody tr:hover {
  background: rgba(59, 130, 246, 0.2);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-responsive {
  scrollbar-width: thin;
}

/* ---------- Country OS breakdown ---------- */
.country-os-grid .col {
  display: flex;
}

.country-os-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  width: 100%;
  box-shadow: 0 6px 18px var(--shadow-subtle);
  transition: transform var(--transition), box-shadow var(--transition);
}

.country-os-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--shadow);
}

.country-os-card__title {
  gap: 0.35rem;
}

.country-os-card__rank {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.country-os-card__name {
  font-weight: 600;
}

.country-os-card__code {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.country-os-card__header .badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.country-os-card table {
  margin-bottom: 0;
}

.country-os-card table thead th {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.country-os-card table tbody td {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  padding: 6px 4px;
}

.country-os-card table tbody tr:nth-child(odd),
.country-os-card table tbody tr:nth-child(even),
.country-os-card table tbody tr:hover {
  background: transparent;
}

/* ---------- Chart styles (D3) ---------- */
.chart-container {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.chart-svg {
  width: 100%;
  height: 100%;
  max-height: 340px;
}

.chart-total {
  fill: var(--text);
  font-size: 1.6rem;
  font-weight: 600;
}

.chart-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.chart-legend.legend-grid {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.legend-item {
  color: var(--text);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.legend-value {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.axis path,
.axis line {
  stroke: var(--border);
}

.axis-label {
  fill: var(--text-muted);
  font-size: 0.8rem;
}

.bar-label {
  fill: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Leaflet tooltip ---------- */
.place-label {
  font: 13px/1.3 system-ui, sans-serif;
  background: rgba(0, 0, 0, 0.9);
  color: var(--text);
  border-radius: 6px;
  box-shadow: 0 4px 12px var(--shadow);
  padding: 6px 10px;
}

/* ---------- Utility tweaks ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

::-webkit-scrollbar-track {
  background: transparent;
}
