/* ═══════════════════════════════════════════════════════
   DTEConnect V3.2.0 – Premium Dark Theme
   Font: Inter | Color: Dark Navy + Cyan Accent
   ═══════════════════════════════════════════════════════ */

/* ── Google Fonts fallback ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  /* Colors */
  --bg-base:       #070d1a;
  --bg-surface:    #0d1527;
  --bg-card:       rgba(13, 21, 39, 0.85);
  --bg-card-hover: rgba(17, 27, 50, 0.95);
  --bg-glass:      rgba(255,255,255,0.04);
  --bg-glass-hover:rgba(255,255,255,0.07);

  --accent:        #00d4ff;
  --accent-2:      #0ea5e9;
  --accent-3:      #38bdf8;
  --accent-glow:   rgba(0,212,255,0.25);

  --border:        rgba(255,255,255,0.08);
  --border-accent: rgba(0,212,255,0.35);

  --text-primary:  #f0f6ff;
  --text-secondary:#8ba3c7;
  --text-muted:    #4d6080;

  /* Status colors */
  --color-ok:      #10b981;
  --color-warn:    #f97316;
  --color-bad:     #ef4444;
  --color-calib:   #3b82f6;
  --color-missing: #6b7280;

  /* Sidebar */
  --sidebar-w:     240px;
  --sidebar-bg:    rgba(7, 13, 26, 0.97);

  /* Header */
  --header-h:      60px;
  --header-bg:     rgba(7, 13, 26, 0.92);

  /* Radii & Shadows */
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     20px;

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow:   0 0 20px rgba(0,212,255,0.2);

  /* Transitions */
  --transition:    all 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ── Light Theme Override ──────────────────────────────────── */
[data-theme="light"] {
  --bg-base:       #f0f4f8;
  --bg-surface:    #e2e8f0;
  --bg-card:       rgba(255, 255, 255, 0.92);
  --bg-card-hover: rgba(248, 250, 252, 0.98);
  --bg-glass:      rgba(255,255,255,0.65);
  --bg-glass-hover:rgba(255,255,255,0.85);

  --accent:        #0ea5e9;
  --accent-2:      #2563eb;
  --accent-3:      #38bdf8;
  --accent-glow:   rgba(14,165,233,0.2);

  --border:        rgba(15,23,42,0.10);
  --border-accent: rgba(14,165,233,0.45);

  --text-primary:  #0f172a;
  --text-secondary:#334155;
  --text-muted:    #64748b;

  --color-ok:      #059669;
  --color-warn:    #d97706;
  --color-bad:     #dc2626;
  --color-calib:   #2563eb;
  --color-missing: #94a3b8;

  --sidebar-bg:    rgba(248, 250, 252, 0.98);
  --header-bg:     rgba(248, 250, 252, 0.95);

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.12);
  --shadow-glow:   0 0 20px rgba(14,165,233,0.15);
}

/* Smooth theme transition */
*, *::before, *::after {
  transition: background-color 0.3s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── Reset & Base ──────────────────────────────────────── */

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Ambient Background ────────────────────────────────── */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #0ea5e9, transparent 70%);
  top: -200px; left: -200px;
  animation-delay: 0s;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  bottom: -150px; right: -150px;
  animation-delay: -7s;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #00d4ff, transparent 70%);
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 30px) scale(0.95); }
}

/* ── Skip Link ─────────────────────────────────────────── */
.skip-link {
  position: fixed; top: -100%; left: 16px; z-index: 10000;
  background: var(--accent); color: #000; padding: 8px 16px;
  border-radius: var(--radius-sm); font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* ── Header ────────────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-toggle-btn {
  width: 36px; height: 36px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; border-radius: var(--radius-sm);
  transition: var(--transition);
  padding: 6px;
}
.sidebar-toggle-btn:hover { background: var(--bg-glass); }
.hamburger-line {
  width: 18px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

.header-brand {
  display: flex; align-items: center; gap: 10px;
}
.logo-dt {
  width: 34px; height: 34px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--border-accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-size: 15px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-version {
  font-size: 10px; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.header-center {
  flex: 1;
  text-align: center;
}
.company-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.header-right {
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}

.stat-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  border: 1px solid;
}
.stat-pill.online {
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.35);
  color: #10b981;
}

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

.header-time {
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.header-user {
  display: flex; align-items: center; gap: 8px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #000;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

/* ── App Layout ────────────────────────────────────────── */
.app-layout {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  position: relative;
  z-index: 1;
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
  flex-shrink: 0;
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: width var(--transition-slow), transform var(--transition-slow);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar.collapsed { width: 60px; }
.sidebar.mobile-hidden { transform: translateX(-100%); }

.sidebar-nav { padding: 16px 0; }

.nav-section { margin-bottom: 8px; }
.nav-section-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  padding: 8px 16px 4px;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar.collapsed .nav-section-label { opacity: 0; }

.sidebar-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-radius: 0;
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  width: 100%;
}
.sidebar-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: var(--transition);
}
.sidebar-btn:hover,
.sidebar-btn.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}
.sidebar-btn.active::before { opacity: 1; }
.sidebar-btn.active { color: var(--accent); }

.logout-btn { color: #ef4444 !important; }
.logout-btn:hover { background: rgba(239,68,68,0.1) !important; }

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
}
.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity var(--transition-slow), max-width var(--transition-slow);
}
.sidebar.collapsed .nav-label { max-width: 0; opacity: 0; }

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* ── Main Content ──────────────────────────────────────── */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 24px;
  min-height: calc(100vh - var(--header-h));
  transition: margin-left var(--transition-slow);
  max-width: 100%;
  overflow-x: hidden;
}
.sidebar.collapsed ~ .main,
.main.expanded { margin-left: 60px; }

/* ── Page Sections ─────────────────────────────────────── */
.page-section { position: relative; }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}

.page-title {
  font-size: 20px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
}
.title-icon {
  width: 22px; height: 22px; color: var(--accent);
}

.page-subtitle {
  font-size: 13px; color: var(--text-muted);
  margin-top: 4px;
}

.page-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Glass Card ────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

/* ── Status Banner ─────────────────────────────────────── */
.status-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  transition: var(--transition);
}
.status-banner.connected {
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.06);
}
.status-banner.disconnected {
  border-color: rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.06);
}

.status-indicator {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  animation: pulseDot 2s ease-in-out infinite;
}
.status-banner.connected .status-indicator { background: var(--color-ok); }
.status-banner.disconnected .status-indicator { background: var(--color-bad); animation: none; }

.status-info { flex: 1; }
.status-label { font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.08em; }
.status-value { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-left: 8px; }
.status-time { font-size: 12px; color: var(--text-muted); }

/* ── Legend Card ───────────────────────────────────────── */
.legend-card {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.legend-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.legend-items { display: flex; gap: 14px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.legend-box { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-online  { background: var(--color-ok); animation: pulseDot 2s ease-in-out infinite; }
.dot-warning { background: var(--color-warn); }
.dot-offline { background: var(--color-bad); }

/* ── KPI Cards Grid ────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.card {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: var(--transition);
  overflow: hidden;
  cursor: default;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover { border-color: rgba(0,212,255,0.25); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card:hover::before { opacity: 1; }

/* Card states */
.card.ok    { border-left: 3px solid var(--color-ok); }
.card.warn  { border-left: 3px solid var(--color-warn); }
.card.bad   { border-left: 3px solid var(--color-bad); }
.card.calibration { border-left: 3px solid var(--color-calib); }
.card.missing { border-left: 3px solid var(--color-missing); opacity: 0.75; }

/* Gradient overlays */
.card.ok::after    { content:''; position:absolute; top:0;left:0;right:0;bottom:0; background: linear-gradient(135deg, rgba(16,185,129,0.06) 0%, transparent 60%); pointer-events:none; }
.card.warn::after  { content:''; position:absolute; top:0;left:0;right:0;bottom:0; background: linear-gradient(135deg, rgba(249,115,22,0.06) 0%, transparent 60%); pointer-events:none; }
.card.bad::after   { content:''; position:absolute; top:0;left:0;right:0;bottom:0; background: linear-gradient(135deg, rgba(239,68,68,0.06) 0%, transparent 60%); pointer-events:none; }
.card.calibration::after { content:''; position:absolute; top:0;left:0;right:0;bottom:0; background: linear-gradient(135deg, rgba(59,130,246,0.06) 0%, transparent 60%); pointer-events:none; }

.card h4 {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
/* Light theme: card h4 darker for readability */
[data-theme="light"] .card h4 { color: var(--text-secondary); }
.card .value {
  font-size: 28px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}
/* Dark theme: pastel tints for status values */
:root .card.ok    .value { color: #e0fdf4; }
:root .card.warn  .value { color: #fff7ed; }
:root .card.bad   .value { color: #fef2f2; }
:root .card.calibration .value { color: #eff6ff; }
/* Light theme: use dark text so values are readable on white cards */
[data-theme="light"] .card.ok    .value { color: #065f46; }
[data-theme="light"] .card.warn  .value { color: #92400e; }
[data-theme="light"] .card.bad   .value { color: #991b1b; }
[data-theme="light"] .card.calibration .value { color: #1e3a8a; }
[data-theme="light"] .card .value { color: var(--text-primary); }

.card .unit {
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  align-self: flex-end;
  padding-bottom: 3px;
}
.threshold-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.card .meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
}
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge.ok         { background: rgba(16,185,129,0.15); color: #10b981; }
.badge.warn       { background: rgba(249,115,22,0.15); color: #f97316; }
.badge.bad        { background: rgba(239,68,68,0.15);  color: #ef4444; }
.badge.calibration{ background: rgba(59,130,246,0.15); color: #3b82f6; }
.badge.missing    { background: rgba(107,114,128,0.15);color: #9ca3af; }

.sparkline { flex: 1; opacity: 0.7; }
.sparkline svg path { stroke: var(--text-secondary); }
.card.ok .sparkline svg path { stroke: var(--color-ok); }
.card.warn .sparkline svg path { stroke: var(--color-warn); }
.card.bad .sparkline svg path { stroke: var(--color-bad); }

.trend { font-size: 11px; font-weight: 600; white-space: nowrap; }
.trend.up   { color: var(--color-ok); }
.trend.down { color: var(--color-bad); }

/* ── Stations Grid (Overview page) ────────────────────── */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.station-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.station-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.station-card.online::before  { background: var(--color-ok); }
.station-card.warning::before { background: var(--color-warn); }
.station-card.offline::before { background: var(--color-bad); }
.station-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border-color: var(--border-accent);
}

.station-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.station-card-title {
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
}
.station-card-id {
  font-size: 11px; color: var(--text-muted);
  font-family: monospace;
  background: var(--bg-glass);
  padding: 2px 8px; border-radius: 4px;
}
.station-status-badge {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.station-status-badge.online  { background: rgba(16,185,129,0.15); color: #10b981; }
.station-status-badge.warning { background: rgba(249,115,22,0.15); color: #f97316; }
.station-status-badge.offline { background: rgba(239,68,68,0.15);  color: #ef4444; }

.station-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.station-kpi-item {
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}
.station-kpi-name { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.station-kpi-value { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.station-kpi-value.warn  { color: var(--color-warn); }
.station-kpi-value.bad   { color: var(--color-bad); }
.station-kpi-value.calib { color: var(--color-calib); }

.station-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.station-location { display: flex; align-items: center; gap: 4px; }
.station-last-seen { font-variant-numeric: tabular-nums; }

/* ── Station Selector Dropdown ─────────────────────────── */
.station-selector-wrap { display: flex; flex-direction: column; gap: 4px; }
.selector-label { font-size: 10px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.08em; }

.custom-select { position: relative; }
.custom-select-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px; font-weight: 500;
  min-width: 220px;
  transition: var(--transition);
}
.custom-select-btn:hover { border-color: var(--border-accent); }
.custom-select-btn[aria-expanded="true"] { border-color: var(--accent); }
.custom-select-btn .select-icon { font-size: 14px; }
.custom-select-btn .chevron { width: 16px; height: 16px; margin-left: auto; transition: transform var(--transition); }
.custom-select-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.custom-select-list {
  position: absolute; top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  overflow: hidden;
  max-height: 300px; overflow-y: auto;
  display: none;
}
.custom-select-list.open { display: block; animation: slideDown 0.15s ease; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

.custom-select-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.custom-select-list li:hover  { background: var(--bg-glass); color: var(--text-primary); }
.custom-select-list li.active { background: rgba(0,212,255,0.1); color: var(--accent); }
.custom-select-list li .station-opt-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── Chart Card ────────────────────────────────────────── */
.chart-card {
  margin-bottom: 24px;
  padding: 20px;
}
.chart-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.chart-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.chart-controls { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }

.param-btn {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  border: 1px solid transparent;
  color: var(--text-muted);
  background: var(--bg-glass);
  transition: var(--transition);
  white-space: nowrap;
}
.param-btn.active {
  background: rgba(var(--param-color, 0,212,255), 0.15);
  border-color: var(--param-color, var(--accent));
  color: var(--text-primary);
}
/* Use CSS custom property per button */
.param-btn { --param-color: #00d4ff; }

.btn-reset-zoom {
  padding: 5px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px; font-weight: 500;
  transition: var(--transition);
}
.btn-reset-zoom:hover { border-color: var(--border-accent); color: var(--accent); }

.chart-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  padding: 8px;
}
.chart-wrapper canvas { max-height: 320px; }

/* ── Section Header ────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 12px;
}
.section-header h3 {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
}

/* ── Table Controls ────────────────────────────────────── */
.table-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search-input {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  width: 280px;
  transition: var(--transition);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #000;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 700;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); opacity: 0.95; }

.btn-secondary {
  padding: 8px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 12px; font-weight: 600;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { border-color: var(--border-accent); color: var(--text-primary); }

.btn-danger {
  padding: 9px 18px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: var(--radius-md);
  color: #ef4444;
  font-size: 13px; font-weight: 700;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }

/* ── Table ─────────────────────────────────────────────── */
.table-wrapper {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  overflow-x: auto;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead {
  background: linear-gradient(135deg, rgba(0,212,255,0.08) 0%, rgba(14,165,233,0.05) 100%);
  border-bottom: 1px solid var(--border-accent);
}
.data-table th {
  padding: 12px 14px;
  text-align: center;
  font-size: 11px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.data-table td {
  padding: 10px 14px;
  text-align: center;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--bg-glass); }

/* ── Settings Page ─────────────────────────────────────── */
.settings-container {
  display: flex; flex-direction: column; gap: 20px;
}
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.settings-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.settings-card-header h3 {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.settings-card-desc {
  font-size: 12px; color: var(--text-muted);
  margin-top: 4px;
}
.settings-card-body { padding: 20px 22px; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.setting-box {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.setting-label {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.param-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.unit-tag { font-size: 11px; color: var(--text-muted); }
.setting-inputs { display: flex; gap: 10px; }
.input-field { flex: 1; }
.input-field label { display: block; font-size: 10px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.input-field input[type="number"],
.input-field input[type="text"] {
  width: 100%;
  padding: 7px 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px; font-weight: 500;
  transition: var(--transition);
  -moz-appearance: textfield;
}
.input-field input::-webkit-outer-spin-button,
.input-field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.input-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.settings-actions {
  padding-top: 16px;
  display: flex; justify-content: flex-end; gap: 10px;
}

/* Danger Zone */
.settings-card.danger-zone .settings-card-header {
  border-bottom-color: rgba(239,68,68,0.25);
}
.danger-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 20px 22px; }
.danger-warning { font-size: 12px; color: rgba(239,68,68,0.7); }

/* Stations settings */
.station-list { display: flex; flex-direction: column; gap: 10px; }
.station-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}
.station-row-info { flex: 1; min-width: 200px; }
.station-row-id { font-size: 11px; font-family: monospace; color: var(--text-muted); }
.station-row-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.station-row-actions { display: flex; gap: 8px; }
.btn-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
}
.btn-icon:hover { border-color: var(--border-accent); color: var(--accent); }
.btn-icon.delete:hover { border-color: rgba(239,68,68,0.5); color: #ef4444; }

/* Station threshold tab panel */
.station-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.station-tab-btn {
  padding: 8px 16px; font-size: 12px; font-weight: 600;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  white-space: nowrap; transition: var(--transition);
}
.station-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.station-tab-panel { display: none; }
.station-tab-panel.active { display: block; }

/* ── Loading / Empty States ────────────────────────────── */
.loading-state {
  grid-column: 1/-1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 60px 20px;
  color: var(--text-muted);
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  grid-column: 1/-1;
  text-align: center; padding: 40px 20px;
  color: var(--text-muted); font-size: 13px;
}

/* ── Modal ─────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal[aria-hidden="false"] { display: flex; }

.modal-content {
  max-width: 520px; width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn { from { opacity:0; transform:scale(0.92); } to { opacity:1; transform:scale(1); } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-header-content { display: flex; align-items: center; gap: 14px; }
.modal-logo { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; }
.modal-header h2 { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-muted);
  background: var(--bg-glass);
  transition: var(--transition);
}
.modal-close:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.info-section { }
.section-title {
  font-size: 13px; font-weight: 700;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.icon-inline { width: 15px; height: 15px; }

.contact-grid { display: flex; flex-direction: column; gap: 8px; }
.contact-item { display: flex; align-items: flex-start; gap: 12px; }
.contact-label { font-size: 11px; font-weight: 600; color: var(--text-muted); min-width: 90px; padding-top: 1px; }
.contact-value { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.contact-link { color: var(--accent); display: flex; align-items: center; gap: 4px; }
.contact-link:hover { text-decoration: underline; }
.company-name-modal { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }

.version-badge-modal {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(14,165,233,0.1));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md); padding: 10px 16px;
}
.version-label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.version-number { font-size: 18px; font-weight: 800; color: var(--accent); }

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 11px; color: var(--text-muted);
}

/* ── Login Page ────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  position: relative; z-index: 1;
}
.login-logo {
  text-align: center; margin-bottom: 24px;
}
.login-logo img { width: 64px; height: 64px; border-radius: 16px; object-fit: contain; }
.login-title {
  font-size: 22px; font-weight: 800;
  text-align: center; margin-bottom: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.login-subtitle { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 14px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary); font-size: 14px;
  transition: var(--transition);
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-submit {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #000; font-size: 14px; font-weight: 700;
  border-radius: var(--radius-md); margin-top: 6px;
  transition: var(--transition);
}
.form-submit:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.form-error {
  padding: 10px 14px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: var(--radius-md);
  color: #ef4444; font-size: 12px; font-weight: 500;
  margin-bottom: 14px;
}

/* ── Map Page ──────────────────────────────────────────── */
#mapContainer {
  width: 100%; height: 500px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* ── Scrollbar global ──────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Utility ───────────────────────────────────────────── */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .company-name { display: none; }
}

@media (max-width: 700px) {
  .header { padding: 0 12px; gap: 10px; }
  .brand-text { display: none; }
  .user-name { display: none; }
  .header-stats { display: none; }
  .main { margin-left: 0 !important; padding: 16px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-backdrop { display: block; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .stations-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card .value { font-size: 22px; }
}

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, .station-card, .settings-card, .glass-card {
  animation: fadeInUp 0.3s ease both;
}
.card:nth-child(1)  { animation-delay: 0.04s; }
.card:nth-child(2)  { animation-delay: 0.08s; }
.card:nth-child(3)  { animation-delay: 0.12s; }
.card:nth-child(4)  { animation-delay: 0.16s; }
.card:nth-child(5)  { animation-delay: 0.20s; }
.card:nth-child(6)  { animation-delay: 0.24s; }
.card:nth-child(7)  { animation-delay: 0.28s; }
.card:nth-child(8)  { animation-delay: 0.32s; }

/* ── Highlight animation for new data ─────────────────── */
@keyframes cardFlash {
  0%   { box-shadow: 0 0 0 0 rgba(0,212,255,0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(0,212,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,212,255,0); }
}
.card.new-data { animation: cardFlash 0.8s ease-out; }

/* ═══════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE – Comprehensive mobile-first fixes
   ═══════════════════════════════════════════════════════════════════ */

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
  .sidebar-btn, .btn-primary, .btn-secondary, .station-tab-btn,
  button, .custom-select-btn {
    min-height: 44px;
  }
  input, select, textarea { font-size: 16px !important; } /* prevent iOS zoom */
}

/* ── 900px: Tablet landscape ────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .company-name { display: none; }
  .kpi-charts-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-actions { width: 100%; flex-wrap: wrap; }
}

/* ── 700px: Mobile portrait ─────────────────────────────────────── */
@media (max-width: 700px) {
  /* Header */
  .header { padding: 0 12px; gap: 8px; height: 56px; }
  .brand-text { display: none; }
  .user-name { display: none; }
  .header-stats { display: none; }
  .header-time { font-size: 12px; }

  /* Sidebar – full-width overlay on mobile */
  .main { margin-left: 0 !important; padding: 12px 12px 80px; }
  .sidebar {
    transform: translateX(-100%);
    width: 260px !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar.collapsed { transform: translateX(-100%); }
  .sidebar-backdrop { display: block; }

  /* Page header */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 14px;
  }
  .page-title { font-size: 16px; }
  .page-actions { width: 100%; flex-wrap: wrap; gap: 8px; }

  /* KPI Cards */
  .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 14px; }
  .card .value { font-size: 20px; }
  .card .param-icon { width: 28px; height: 28px; font-size: 9px; }

  /* Stations grid */
  .stations-grid { grid-template-columns: 1fr; }
  .station-card { padding: 14px; }

  /* Settings */
  .settings-container { gap: 14px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card-body { padding: 14px; }
  .setting-box { padding: 12px; }

  /* Report */
  .glass-card { padding: 12px 14px; }

  /* Tables – horizontal scroll */
  .table-wrap, .report-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table { min-width: 600px; }
  #reportTable, #dailyFlowTable { min-width: 700px; }

  /* Charts */
  .kpi-charts-grid { grid-template-columns: 1fr; gap: 12px; }
  .kpi-chart-card { padding: 14px 14px 10px; }
  .chart-canvas-wrap { height: 140px; }
  .kpi-chart-val { font-size: 18px; }
  .charts-station-tabs { gap: 6px; }
  .station-tab-btn { padding: 7px 12px; font-size: 11px; }

  /* Camera page */
  .camera-grid { grid-template-columns: 1fr !important; }

  /* Custom select */
  .custom-select-btn { font-size: 12px; padding: 8px 12px; }
  .custom-select-list { min-width: 200px; }

  /* Station selector */
  .station-selector-wrap { width: 100%; }
  .custom-select { width: 100%; }
  .custom-select-btn { width: 100%; }
}

/* ── 480px: Small phones ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .header { padding: 0 8px; }
  .main { padding: 10px 10px 80px; }

  /* KPI Cards – 2 columns */
  .cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card { padding: 12px 10px; }
  .card .value { font-size: 18px; }
  .card .label { font-size: 9px; }
  .card .unit { font-size: 10px; }

  /* Charts */
  .chart-canvas-wrap { height: 120px; }
  .kpi-chart-val { font-size: 16px; }
  .kpi-chart-legend { gap: 6px; font-size: 9px; }

  /* Sidebar */
  .sidebar { width: 85vw !important; max-width: 280px; }

  /* Buttons */
  .btn-primary, .btn-secondary { padding: 8px 14px; font-size: 12px; }

  /* Page title */
  .page-title { font-size: 15px; }
  .page-subtitle { font-size: 11px; }
  .title-icon { width: 18px; height: 18px; }

  /* Login page */
  .login-card { padding: 24px 18px; }
}

/* ── Very small (iPhone SE) ──────────────────────────────────────── */
@media (max-width: 360px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 6px; }
  .card .value { font-size: 16px; }
  .main { padding: 8px; }
}


/* ── Station selector – overflow visible để dropdown hiển thị ──────────────── */
.station-selector-wrap {
  max-width: 100%;
  overflow: visible;        /* must be visible for dropdown to show */
}
.page-actions {
  max-width: 100%;
  overflow: visible;        /* must be visible for dropdown to show */
  flex-shrink: 0;
}
#stationSelectLabel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }

/* ── Smooth scrolling for mobile ─────────────────────────────────── */
html { scroll-behavior: smooth; }
.main { -webkit-overflow-scrolling: touch; }

/* ── Well station cards – blue accent ────────────────────────────── */
.station-card[data-station-type="well"]::before {
  background: linear-gradient(90deg, #3b82f6, #0891B2);
}
.station-card[data-station-type="well"] .station-card-id {
  color: #3b82f6;
}
.station-card[data-station-type="well"]:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 32px rgba(59,130,246,.25);
}

/* ── Stations section separator ───────────────────────────────────── */
.stations-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-secondary);
  margin: 0 0 12px; padding: 10px 16px;
  background: var(--bg-secondary); border-radius: 10px;
  border-left: 4px solid transparent;
}
.stations-section-title.wastewater { border-left-color: #6366f1; }
.stations-section-title.well       { border-left-color: #3b82f6; }
.stations-section-title .count-pill {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 10px; font-size: 12px; font-weight: 800;
  color: var(--text-primary);
}
.stations-section-wrap { margin-bottom: 28px; }
