/* ==========================================================================
   ClimaTrend Design System & Visual Styles
   Theme: Modern Glassmorphism with Vibrant Accents & Dual Theme Support
   ========================================================================== */

:root {
  /* Color Palette - Dark (Default) */
  --bg-primary: #0a0e17;
  --bg-secondary: #111726;
  --surface-glass: rgba(18, 26, 43, 0.72);
  --surface-glass-hover: rgba(28, 40, 65, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Accent Colors */
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  --accent-sky: #0ea5e9;

  /* Cards Gradients & Shadows */
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-glass);
  --card-shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 20px 2px rgba(59, 130, 246, 0.15);
  
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --surface-glass-hover: rgba(255, 255, 255, 0.95);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 0 0 1px var(--border-glass);
  --card-shadow-hover: 0 20px 35px -10px rgba(0, 0, 0, 0.1), 0 0 15px rgba(37, 99, 235, 0.12);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient Background Glows */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  top: -100px;
  right: -100px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  bottom: 5%;
  left: -150px;
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

[data-theme="light"] .glass-card:hover {
  border-color: rgba(0, 0, 0, 0.14);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

[data-theme="light"] .app-header {
  background: rgba(240, 244, 248, 0.85);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.brand-icon svg {
  width: 26px;
  height: 26px;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text h1 span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Site Public Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.site-nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.site-nav-link.active {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  font-weight: 600;
}

@media (max-width: 960px) {
  .site-nav {
    display: none;
  }
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-accent {
  background: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-accent:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Layout */
.main-layout {
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}

/* Filter Control Panel */
.filter-panel {
  position: relative;
  z-index: 100;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filter-panel.combobox-open,
.filter-panel:has(.combobox-wrapper.open),
.filter-panel:focus-within {
  z-index: 9999;
}

.filter-group.location-combobox-group {
  position: relative;
  z-index: 10000;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input-control {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition-smooth);
}

[data-theme="light"] .input-control {
  background: #ffffff;
}

.input-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* =============================================================
   Searchable Combobox Component
   ============================================================= */
.combobox-wrapper {
  position: relative;
  min-width: 290px;
  z-index: 10001;
}

.combobox-wrapper.open {
  z-index: 10002;
}

.combobox-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.combobox-icon {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.combobox-input {
  width: 100%;
  padding-left: 36px;
  padding-right: 48px;
  cursor: text;
  font-weight: 500;
}

.combobox-clear-btn {
  position: absolute;
  right: 28px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.combobox-clear-btn:hover {
  color: var(--accent-cyan);
}

.combobox-arrow {
  position: absolute;
  right: 12px;
  font-size: 0.65rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.combobox-wrapper.open .combobox-arrow {
  transform: rotate(180deg);
}

.combobox-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 340px;
  max-height: 380px;
  background: #0f172a;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.15);
  z-index: 99999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: dropdownFadeIn 0.15s ease-out;
}

[data-theme="light"] .combobox-dropdown {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.combobox-stats-header {
  padding: 8px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-count {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
}

.combobox-options-list {
  overflow-y: auto;
  max-height: 280px;
  padding: 4px 0;
}

.combobox-option {
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
  font-size: 0.88rem;
}

.combobox-option:hover,
.combobox-option.highlighted {
  background: rgba(56, 189, 248, 0.15);
}

.combobox-option.selected {
  background: rgba(56, 189, 248, 0.25);
  border-left: 3px solid var(--accent-cyan);
  font-weight: 600;
}

.combobox-option-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.combobox-city-name {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.combobox-city-name mark {
  background: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 700;
  border-radius: 2px;
  padding: 0 2px;
}

.combobox-city-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.combobox-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.combobox-badge-days {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  white-space: nowrap;
}

.combobox-badge-capital {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
  white-space: nowrap;
}

.combobox-empty {
  padding: 16px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.combobox-quick-action {
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.1);
  border-top: 1px solid var(--border-glass);
  font-size: 0.82rem;
  color: #60a5fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.combobox-quick-action:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}


.preset-buttons {
  display: flex;
  gap: 6px;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chip-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.chip-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.25));
  border-color: var(--accent-cyan);
  color: #fff;
  font-weight: 600;
}

[data-theme="light"] .chip-btn.active {
  color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.12);
}

.date-inputs {
  display: flex;
  gap: 12px;
}

.date-inputs div {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Status Banner */
.status-banner {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  position: relative;
  z-index: 2;
}

.kpi-card {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.kpi-card:hover::after {
  opacity: 1;
}

.kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon svg {
  width: 24px;
  height: 24px;
}

.icon-temp {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
}

.icon-heat {
  background: rgba(244, 63, 94, 0.16);
  color: #fb7185;
}

.icon-cold {
  background: rgba(6, 182, 212, 0.16);
  color: #22d3ee;
}

.icon-rain {
  background: rgba(14, 165, 233, 0.16);
  color: #38bdf8;
}

.icon-wind {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
}

.icon-drought {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.kpi-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
}

.kpi-value small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.highlight-hot {
  color: #f43f5e;
}

.highlight-cold {
  color: #06b6d4;
}

.highlight-rain {
  color: #38bdf8;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Clima Chips Grid */
.clima-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}

.clima-chip {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-md);
  gap: 4px;
  min-height: 72px;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.clima-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.clima-chip.active-focus {
  border-color: var(--accent-cyan) !important;
  background: rgba(14, 165, 233, 0.12) !important;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.25) !important;
}

.trend-select-wrap {
  display: flex;
  align-items: center;
}

.chip-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.chip-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.chip-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.chip-sub {
  font-size: 0.72rem;
  color: var(--text-dim, #94a3b8);
  font-weight: 500;
  line-height: 1.2;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.chart-card {
  padding: 22px;
}

.chart-card.full-width {
  grid-column: span 2;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.chart-title-wrap h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chart-title-wrap p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-temp {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}

.badge-rain {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
}

.badge-wind {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.badge-monthly {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-sky {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.chart-canvas-container {
  position: relative;
  width: 100%;
}

/* Table Section */
.table-section {
  padding: 24px;
}

.table-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.table-title h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.table-title p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.table-search-box input {
  min-width: 260px;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.data-table th {
  padding: 12px 14px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.data-table th:hover {
  color: var(--text-main);
}

.data-table th span {
  font-size: 0.75rem;
  opacity: 0.6;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

[data-theme="light"] .data-table td {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-glass);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 1;
  visibility: visible;
  transition: var(--transition-smooth);
}

.modal-card {
  width: 90%;
  max-width: 580px;
  padding: 28px;
  position: relative;
  background: var(--bg-secondary);
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-title-wrap {
  display: flex;
  gap: 14px;
  align-items: center;
}

.modal-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.scrape-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.btn-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-tag:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: #3b82f6;
}

/* Progress bar */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  transition: width 0.3s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* Footer */
.app-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border-glass);
  padding: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Utility classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 960px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .chart-card.full-width {
    grid-column: span 1;
  }
  .header-container {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   View Switcher & Comparative Analysis Styles
   ========================================================================== */

.view-switcher-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.view-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  padding: 6px;
  border-radius: 24px;
  backdrop-filter: blur(16px);
  gap: 6px;
  box-shadow: var(--card-shadow);
}

.view-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 22px;
  border-radius: 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.view-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.view-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.badge-tab-new {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.05em;
}

.view-content-panel {
  animation: fadeIn 0.3s ease;
}

/* Compare Filter Panel */
.compare-filter-panel {
  padding: 24px;
  margin-bottom: 28px;
}

.compare-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
}

.compare-mode-selector {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.compare-mode-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.compare-selectors-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 22px;
}

.series-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
}

.series-card.series-a {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: inset 0 0 25px rgba(6, 182, 212, 0.04);
}

.series-card.series-b {
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: inset 0 0 25px rgba(249, 115, 22, 0.04);
}

.series-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-a {
  background: #06b6d4;
  box-shadow: 0 0 8px #06b6d4;
}

.dot-b {
  background: #f97316;
  box-shadow: 0 0 8px #f97316;
}

.series-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.baseline-info-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.3);
  margin-top: 4px;
}

.baseline-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.baseline-details h4 {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fed7aa;
}

.baseline-details p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.compare-vs-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  letter-spacing: 0.05em;
  user-select: none;
}

.compare-actions-bar {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.btn-large {
  padding: 12px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 14px;
}

/* Compare Highlights Banner */
.compare-highlights-card {
  padding: 22px 26px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.06));
  border-left: 4px solid var(--accent-blue);
}

.highlights-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-cyan);
}

.highlights-title h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.highlights-list {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.highlights-list li {
  font-size: 0.93rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Delta highlights inside cards and tables */
.val-diff-hot {
  color: #fb7185 !important;
}

.val-diff-cold {
  color: #38bdf8 !important;
}

.val-diff-rain {
  color: #0ea5e9 !important;
}

.val-diff-drought {
  color: #fbbf24 !important;
}

@media (max-width: 860px) {
  .compare-selectors-grid {
    grid-template-columns: 1fr;
  }
  .compare-vs-badge {
    margin: -10px auto;
  }
}

/* =============================================================
   Admin Panel & Authentication Styles
   ============================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-dialog.modal-large {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .modal-dialog.modal-large {
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.admin-auth-body {
  padding: 32px 24px;
  display: flex;
  justify-content: center;
}

.admin-auth-card {
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.admin-auth-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.admin-auth-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.admin-auth-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  padding-right: 44px;
}

.btn-icon-input {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
  transition: var(--transition-smooth);
}

.btn-icon-input:hover {
  opacity: 1;
}

.admin-auth-error {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.admin-auth-footer {
  margin-top: 20px;
}

/* Admin Dashboard Elements */
.admin-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-glass);
}

.admin-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #34d399;
}

.admin-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-glass);
}

.admin-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.admin-stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.admin-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-glass);
}

.admin-tab-panel {
  padding: 20px 24px;
}

.btn-small {
  padding: 4px 10px;
  font-size: 0.78rem;
}

@media (max-width: 600px) {
  .admin-stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* Active Running Job Card & Banner */
.admin-active-job-card {
  margin: 16px 24px 0 24px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(239, 68, 68, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 15px rgba(245, 158, 11, 0.15);
  animation: fadeIn 0.3s ease;
}

.active-job-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.active-job-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.active-job-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fbbf24;
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: pulse-dot-anim 1.2s infinite ease-in-out;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #ef4444; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #ef4444; }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #ef4444; }
}

.active-job-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
}

.btn-danger-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #ef4444;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
  transition: all 0.2s ease;
}

.btn-danger-glow:hover:not(:disabled) {
  background: #b91c1c;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.6), 0 0 12px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.btn-danger-glow:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.active-job-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.active-job-progress-row .progress-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.active-job-progress-row .progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.active-job-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  gap: 12px;
  flex-wrap: wrap;
}

.active-job-details .job-detail-task {
  font-weight: 600;
  color: var(--text-main, #f8fafc);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.active-job-stats-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.active-job-details .job-detail-saved {
  color: #34d399;
  font-weight: 600;
}

/* Header badge when job is running */
.admin-badge-running {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
  animation: pulse-border 1.5s infinite alternate;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.3); }
  100% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.7); }
}

/* ==========================================================================
   Public Web Portal Styles (Hero, Methodology, Sources, Footer)
   ========================================================================== */

/* Section scroll anchor offset for sticky header */
.section-scroll-anchor {
  scroll-margin-top: 100px;
}

/* HERO SECTION */
.hero-section {
  padding: 46px 36px;
  margin-bottom: 36px;
  background: radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.16), transparent 50%),
              radial-gradient(circle at 10% 85%, rgba(59, 130, 246, 0.14), transparent 45%),
              var(--surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .hero-section {
  background: radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.12), transparent 50%),
              radial-gradient(circle at 10% 85%, rgba(59, 130, 246, 0.10), transparent 45%),
              rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.hero-gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 860px;
}

/* Hero Stats Grid */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 4px;
}

.hero-stat-card {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

[data-theme="light"] .hero-stat-card {
  background: rgba(255, 255, 255, 0.65);
}

.hero-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.4);
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Quick City Pills */
.hero-quick-cities {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

[data-theme="light"] .hero-quick-cities {
  background: rgba(0, 0, 0, 0.04);
}

.quick-cities-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.quick-cities-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-city-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

[data-theme="light"] .quick-city-pill {
  background: rgba(0, 0, 0, 0.05);
}

.quick-city-pill:hover {
  background: rgba(6, 182, 212, 0.15);
  color: var(--text-main);
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.quick-city-pill.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.35);
}

/* Hero Actions */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hero-cta-btn {
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: var(--border-focus);
}

/* PORTAL SECTIONS (Methodology & Sources) */
.portal-section {
  padding: 44px 36px;
  margin-top: 48px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
}

.section-header-wrap {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Methodology Grid */
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.methodology-card {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

[data-theme="light"] .methodology-card {
  background: rgba(255, 255, 255, 0.6);
}

.methodology-card:hover {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.methodology-icon {
  font-size: 2rem;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glass);
}

.methodology-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.methodology-content p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.methodology-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* Sources & Transparency Section */
.sources-box {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
}

.sources-text p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 14px 0 20px;
}

.sources-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-source {
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 500;
}

.sources-card-action {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px;
}

[data-theme="light"] .sources-card-action {
  background: rgba(255, 255, 255, 0.6);
}

.sources-card-inner {
  text-align: center;
}

.sources-card-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.sources-card-inner h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.sources-card-inner p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

/* MODERN PORTAL FOOTER */
.site-footer {
  margin-top: 60px;
  background: #070a12;
  border-top: 1px solid var(--border-glass);
  padding: 56px 24px 28px;
}

[data-theme="light"] .site-footer {
  background: #e2e8f0;
  border-top-color: rgba(0, 0, 0, 0.1);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.6fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.footer-brand h3 span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-mission {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer-stats-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-system-text {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.footer-admin-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: #fbbf24;
}

.footer-bottom-bar {
  padding-top: 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.copyright {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-badges {
  display: flex;
  gap: 10px;
}

.f-badge {
  font-size: 0.74rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-glass);
}

/* RESPONSIVE STYLES FOR PORTAL */
@media (max-width: 1080px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .methodology-grid {
    grid-template-columns: 1fr;
  }
  .sources-box {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .hero-section {
    padding: 28px 20px;
  }
  .hero-title {
    font-size: 1.65rem;
  }
  .hero-stats-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
  }
}
