:root {
  color-scheme: dark;
  --bg-deep: #070b09;
  --bg-base: #0b110e;
  --bg-surface: #101814;
  --bg-surface-elevated: #15221b;
  --bg-surface-hover: #1b2c23;
  --border-dim: #1c2b22;
  --line: #1c2b22;
  --border-mid: #25392d;
  --border-bright: #3a5946;
  --text-primary: #f0fdf4;
  --text-secondary: #9cb3a5;
  --text-muted: #647d6e;
  --text-dim: #44594c;

  /* Solar Industrial Accents */
  --solar-amber: #f59e0b;
  --solar-gold: #fbbf24;
  --emerald-gen: #10b981;
  --emerald-glow: #34d399;
  --cyan-electric: #06b6d4;
  --purple-ml: #a855f7;
  --blue-empiric: #3b82f6;
  --actual-white: #ffffff;
  --danger-crimson: #ef4444;

  /* Typography */
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "DM Mono", "JetBrains Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background-color: var(--bg-deep);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 60%),
    linear-gradient(rgba(16, 185, 129, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select {
  font: inherit;
}

.app-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 32px 60px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .app-shell {
    padding: 0 16px 40px;
  }
}

/* ==========================================================================
   TOPBAR: SCADA Console Header & Edge System Telemetry Strip
   ========================================================================== */
.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border-dim);
  padding: 12px 0;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--emerald-gen);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.brand-glow {
  width: 10px;
  height: 10px;
  background: var(--emerald-gen);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald-glow);
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.7; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 14px var(--emerald-glow); }
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: var(--font-sans);
  color: #ffffff;
}

.brand-period {
  color: var(--solar-amber);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Edge Cluster Telemetry Strip */
.edge-telemetry-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 24, 20, 0.75);
  border: 1px solid var(--border-dim);
  padding: 6px 14px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
}

.telemetry-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.telemetry-pill + .telemetry-pill::before {
  content: "·";
  color: var(--border-bright);
  margin-right: 4px;
}

.telemetry-dot.live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-gen);
  box-shadow: 0 0 8px var(--emerald-glow);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.telemetry-label {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.telemetry-val {
  color: var(--text-primary);
  font-weight: 600;
}

.text-emerald { color: var(--emerald-gen) !important; }
.text-cyan { color: var(--cyan-electric) !important; }
.text-amber { color: var(--solar-amber) !important; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font: 11px var(--font-mono);
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-dim);
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-gen);
  box-shadow: 0 0 8px var(--emerald-glow);
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border-dim);
}

/* Admin Auth Controls */
.auth-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-mid);
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald-gen);
  border-color: var(--emerald-gen);
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--solar-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.admin-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--solar-gold);
  box-shadow: 0 0 6px var(--solar-gold);
}

.auth-logout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 6px;
}

.auth-logout-btn:hover {
  color: var(--danger-crimson);
}

/* ==========================================================================
   PARK HUD & TEMPORAL NAVIGATOR
   ========================================================================== */
main {
  padding-top: 32px;
}

.park-hud-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.park-tabs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 29, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-dim);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.park-selector-wrapper {
  display: inline-flex;
  gap: 10px;
}

.park-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 10px 18px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.park-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-bright);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.park-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.03) 100%);
  border-color: var(--emerald-gen);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.park-badge-code {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--emerald-glow);
}

.park-btn.active .park-badge-code {
  background: var(--emerald-gen);
  color: #070b09;
  border-color: var(--emerald-glow);
  box-shadow: 0 0 10px var(--emerald-glow);
}

.park-btn-info {
  display: flex;
  flex-direction: column;
}

.park-btn-info strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.park-btn-info span {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 2px;
}

.park-btn.active .park-btn-info span {
  color: var(--text-secondary);
}

/* Time Navigator Bar */
.time-navigator-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 6px 12px;
  flex-wrap: wrap;
}

.time-nav-buttons {
  display: flex;
  gap: 4px;
}

.btn-time-nav {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 6px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-time-nav:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--border-bright);
}

.btn-today-highlight {
  color: var(--emerald-gen);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.btn-today-highlight:hover {
  background: var(--emerald-gen);
  color: #000000;
}

.date-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-picker-wrap input[type="date"] {
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color-scheme: dark;
  outline: none;
  cursor: pointer;
}

.date-picker-wrap input[type="date"]:focus {
  border-color: var(--emerald-gen);
}

.actual-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-glow);
  border: 1px solid var(--emerald-gen);
  border-radius: 6px;
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.quick-dates-dropdown-wrap select {
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-secondary);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  outline: none;
  cursor: pointer;
  max-width: 220px;
}

.quick-dates-dropdown-wrap select:focus {
  border-color: var(--emerald-gen);
  color: #ffffff;
}

.btn-load-action {
  background: var(--emerald-gen);
  color: #070b09;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-load-action:hover {
  background: var(--emerald-glow);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-force-action {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.3) 100%);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.btn-force-action:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.45) 100%);
  color: #fef3c7;
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.btn-force-action.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
  animation: pulse-amber-glow 1.5s infinite;
}

@keyframes pulse-amber-glow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
  }
}

/* Park Specifications HUD Card */
.park-specs-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  background: linear-gradient(135deg, rgba(16, 24, 20, 0.8) 0%, rgba(11, 17, 14, 0.8) 100%);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 20px 24px;
  backdrop-filter: blur(10px);
}

.spec-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-column + .spec-column {
  border-left: 1px solid var(--border-dim);
  padding-left: 20px;
}

@media (max-width: 900px) {
  .spec-column + .spec-column {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border-dim);
    padding-top: 12px;
  }
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.spec-value {
  font-family: var(--font-mono);
  font-size: 16px;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.spec-value strong {
  font-weight: 700;
  color: #ffffff;
}

.spec-slash {
  color: var(--border-bright);
}

.spec-sub {
  font-size: 11px;
  color: var(--emerald-gen);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Admin Actions Bar */
.admin-actions-bar {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 10px 18px;
}

.admin-bar-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-badge-notice {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--solar-gold);
  letter-spacing: 0.06em;
}

.btn-admin-action {
  background: rgba(245, 158, 11, 0.2);
  color: #ffffff;
  border: 1px solid var(--solar-amber);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-admin-action:hover {
  background: var(--solar-amber);
  color: #000000;
}

/* ==========================================================================
   RESTRICTED ADMIN DATA & REAL SCADA TELEMETRY
   ========================================================================== */
body:not(.admin-mode) .park-specs-card,
body:not(.admin-mode) .chip-actual,
body:not(.admin-mode) #actual-data-badge,
body:not(.admin-mode) #quick-dates-container,
body:not(.admin-mode) .th-actual,
body:not(.admin-mode) .cell-actual,
body:not(.admin-mode) .th-solcast,
body:not(.admin-mode) .cell-solcast,
body:not(.admin-mode) .overview-model-card[data-model="solcast_ml"],
body:not(.admin-mode) .overview-model-card[data-model="solcast_empiric"],
body:not(.admin-mode) .series-chip[data-key="solcast_ml"],
body:not(.admin-mode) .series-chip[data-key="solcast_ml_da"],
body:not(.admin-mode) .series-chip[data-key="solcast_empiric"],
body:not(.admin-mode) .series-chip[data-key="solcast_empiric_da"],
body:not(.admin-mode) #bess-card-solcast_ml,
body:not(.admin-mode) #bess-card-solcast_empiric {
  display: none !important;
}

body:not(.admin-mode) .overview-models-grid:not([data-park-mode="L2"]) {
  grid-template-columns: repeat(2, 1fr);
}

/* ==========================================================================
   KPI OVERVIEW METRICS & 4-MODEL COMPARATOR
   ========================================================================== */
.overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.overview-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-toolbar-title {
  font: 11px var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.overview-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-gen);
  box-shadow: 0 0 8px var(--emerald-gen);
  animation: pulse-dot 2s infinite;
}

.overview-park-pill {
  font: 10px var(--font-mono);
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-gen);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.overview-view-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.kpi-switch-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font: 11px var(--font-mono);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kpi-switch-btn:hover {
  color: #ffffff;
}

.kpi-switch-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.overview {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  background: var(--bg-surface);
  overflow: hidden;
  margin-bottom: 28px;
}

/* Hero Banner: Telemetrie Reală iSolarCloud */
.overview-actual-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, rgba(16, 185, 129, 0.08) 100%);
  border-bottom: 1px solid var(--border-dim);
  gap: 20px;
  flex-wrap: wrap;
}

.actual-hero-tag {
  font: 11px var(--font-mono);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.actual-hero-val-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.actual-hero-val {
  font: 30px var(--font-mono);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.actual-hero-unit {
  font: 14px var(--font-mono);
  color: var(--solar-gold);
  font-weight: 600;
}

.actual-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.actual-hero-sub {
  font: 12px var(--font-mono);
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.actual-hero-sub strong {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
}

.actual-hero-note {
  font-size: 11px;
  color: var(--text-muted);
}

/* Modul 1: 4 Modele Directe (Grid 4 coloane) */
.overview-models-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
}

.overview-model-card {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-dim);
  transition: background 0.2s ease;
  position: relative;
  background: transparent;
}

.overview-model-card:last-child {
  border-right: none;
}

.overview-model-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.overview-model-card.is-disabled {
  opacity: 0.45;
}

.overview-model-card .total-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 6px;
  font-size: clamp(30px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-family: var(--font-mono);
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.overview-model-card .total-unit {
  color: var(--solar-gold);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.model-badge-tag {
  font: 9px var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-left: auto;
}

.model-badge-tag.ml {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.model-badge-tag.phys {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.model-kpi-meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.model-kpi-type {
  font: 10px var(--font-mono);
  color: var(--text-muted);
}

.model-kpi-sub {
  font: 11px var(--font-mono);
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.model-kpi-sub strong {
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
}

.sub-time {
  color: var(--text-muted);
  font-size: 11px;
}

.model-kpi-freshness-strip {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
}

.freshness-pill-kpi {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #38bdf8;
  letter-spacing: -0.01em;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Modul 2: Sinteză Agregată (Classic Layout) */
.overview-classic-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 2fr;
  width: 100%;
}

@media (max-width: 860px) {
  .overview-classic-layout {
    grid-template-columns: 1fr;
  }
}

.energy-total {
  padding: 28px 32px;
  border-right: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, transparent 100%);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font: 11px var(--font-mono);
  letter-spacing: 0.08em;
}

.metric-index {
  color: var(--emerald-gen);
  font-weight: 700;
}

.energy-total .total-value {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0 6px;
  font-size: clamp(44px, 5.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-family: var(--font-mono);
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.energy-total .total-unit {
  color: var(--solar-gold);
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.metric-footnote {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.kpi-models-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 3px 8px;
  font: 11px var(--font-mono);
  color: var(--text-secondary);
}

.kpi-chip strong {
  color: #ffffff;
  font-weight: 600;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mini-metric {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border-dim);
}

.mini-metric:last-child {
  border-right: none;
}

.mini-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 4px;
  font: 26px var(--font-mono);
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.mini-unit {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.mini-note {
  color: var(--text-muted);
  font-size: 11px;
}

.model-value {
  color: var(--cyan-electric);
  font-size: 20px;
}

@media (max-width: 1050px) {
  .overview-models-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-model-card:nth-child(2) {
    border-right: none;
  }
  .overview-model-card:nth-child(1),
  .overview-model-card:nth-child(2) {
    border-bottom: 1px solid var(--border-dim);
  }
}

@media (max-width: 640px) {
  .overview-models-grid {
    grid-template-columns: 1fr;
  }
  .overview-model-card {
    border-right: none !important;
    border-bottom: 1px solid var(--border-dim);
  }
  .overview-model-card:last-child {
    border-bottom: none;
  }
}

/* ==========================================================================
   CHART SECTION & CANVAS
   ========================================================================== */
.chart-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--emerald-gen);
  font: 10px var(--font-mono);
  letter-spacing: 0.12em;
}

.eyebrow-line {
  width: 18px;
  height: 2px;
  background: var(--emerald-gen);
  border-radius: 2px;
}

h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.chart-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.series-toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.series-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.series-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-bright);
}

.series-chip.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--border-bright);
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.4;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.series-chip.active .chip-dot {
  opacity: 1;
  transform: scale(1.1);
}

.chart-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--solar-gold);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Chart Canvas Frame */
.chart-frame {
  position: relative;
  min-height: 380px;
  height: clamp(380px, 45vw, 480px);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 24, 20, 0.9) 0%, rgba(10, 15, 12, 0.95) 100%);
  overflow: hidden;
}

#power-chart {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: crosshair;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(7, 11, 9, 0.9);
}

/* SCADA Chart Loading Overlay */
.chart-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(10, 15, 12, 0.88);
  backdrop-filter: blur(4px);
  z-index: 8;
  pointer-events: none;
  animation: fadeInLoader 0.2s ease-out;
}

.chart-loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(16, 185, 129, 0.15);
  border-top-color: var(--emerald-gen, #10b981);
  border-radius: 50%;
  animation: chart-spin 0.75s linear infinite;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.chart-loader-text {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes chart-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInLoader {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* SCADA Tooltip */
.chart-tooltip {
  position: absolute;
  z-index: 10;
  min-width: 250px;
  padding: 12px 14px;
  background: rgba(11, 17, 14, 0.92);
  border: 1px solid var(--emerald-gen);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.2);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  backdrop-filter: blur(12px);
  transition: opacity 0.12s ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.tooltip-time {
  font-weight: 700;
  color: #ffffff;
  font-size: 12px;
}

.tooltip-tilt {
  font-size: 10px;
  color: var(--solar-gold);
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 3px 0;
  font-size: 11px;
}

.tooltip-actual {
  border-bottom: 1px dashed var(--border-mid);
  padding-bottom: 5px;
  margin-bottom: 6px;
  color: #ffffff;
  font-weight: 700;
}

.tooltip-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tooltip-val {
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
}

.chart-footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font: 11px var(--font-mono);
  flex-wrap: wrap;
}

.chart-time-ticks {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.chart-time-ticks span {
  color: var(--text-muted);
}

.chart-tz-badge {
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   SCIENTIFIC BENCHMARK SECTION (MASTER'S THESIS ACCURACY)
   ========================================================================== */
.benchmark-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
}

.benchmark-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--emerald-gen);
  color: var(--emerald-glow);
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.pill-metrics {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 11px;
  margin-left: 6px;
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0 16px;
}

.benchmark-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s ease;
}

.benchmark-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.benchmark-card.is-best {
  border-color: var(--emerald-gen);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(21, 34, 27, 0.6) 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.12);
}

.benchmark-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.benchmark-model-category {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.benchmark-model-name {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.benchmark-model-badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-glow);
  border: 1px solid var(--emerald-gen);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.benchmark-accuracy-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  overflow: hidden;
}

.benchmark-accuracy-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.benchmark-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.benchmark-metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.benchmark-metric-item.full-span {
  grid-column: span 2;
  border-top: 1px solid var(--border-dim);
  padding-top: 8px;
  margin-top: 2px;
}

.benchmark-metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.benchmark-metric-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.benchmark-metric-val .unit {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
}

.benchmark-metric-item.freshness-item {
  background: rgba(15, 23, 42, 0.4);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.benchmark-metric-val.freshness-val {
  font-size: 11px;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: -0.01em;
}

.benchmark-metric-val.pending-val {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  font-style: italic;
}

.benchmark-accuracy-bar-fill.is-pending {
  background: #334155 !important;
  opacity: 0.6;
}

.benchmark-methodology-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.note-icon {
  font-style: normal;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-gen);
  font-weight: 700;
  font-size: 11px;
}

/* ==========================================================================
   TELEMETRY TABLE (96 INTERVAL DETAIL)
   ========================================================================== */
.table-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
}

.table-heading {
  margin-bottom: 16px;
}

.table-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-mid);
  padding: 4px 10px;
  border-radius: 4px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-dim);
  border-radius: 8px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: left;
}

.comparison-table th, 
.comparison-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-dim);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.comparison-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
}

.comparison-table th.numeric, 
.comparison-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.comparison-table th.th-time {
  text-align: left;
}

.comparison-table td.time-cell {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.comparison-table th.th-opcom {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-bottom: 2px solid rgba(245, 158, 11, 0.45);
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.04em;
  padding: 10px 14px;
}

.comparison-table td.opcom-cell {
  background: rgba(245, 158, 11, 0.03);
  color: #fde047;
  font-weight: 600;
  font-family: var(--font-mono);
  border-left: 1px solid rgba(245, 158, 11, 0.15);
  border-right: 1px solid rgba(245, 158, 11, 0.15);
  transition: background-color 0.15s ease;
}

.comparison-table tbody tr:hover td.opcom-cell {
  background: rgba(245, 158, 11, 0.09);
}

/* Preț negativ OPCOM (Penalizare / Risc Dispecerizare Solară) */
.comparison-table td.opcom-cell.is-negative-price {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fca5a5 !important;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.comparison-table td.opcom-cell.is-negative-price::after {
  content: " ⚠️";
  font-size: 10px;
}

.comparison-table tfoot td.opcom-summary-cell {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-weight: 700;
  font-family: var(--font-mono);
  border-left: 1px solid rgba(245, 158, 11, 0.25);
  border-right: 1px solid rgba(245, 158, 11, 0.25);
}

.comparison-table th.th-actual {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.comparison-table td.td-actual {
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
  font-weight: 700;
}

.comparison-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.04);
}

.comparison-table tbody tr:hover td.td-actual {
  background: rgba(255, 255, 255, 0.06);
}

.comparison-table tfoot td {
  background: var(--bg-surface-elevated);
  font-weight: 700;
  color: #ffffff;
  border-top: 2px solid var(--border-bright);
}

.table-message {
  text-align: center !important;
  color: var(--text-muted);
  padding: 30px !important;
}

/* ==========================================================================
   ENGINEERING FOUNDATIONS & DISSERTATION SCIENTIFIC ARCHITECTURE
   ========================================================================== */
.foundations-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
}

.foundations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.foundation-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.foundation-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.foundation-badge.physical {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-empiric);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.foundation-badge.ml {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple-ml);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.foundation-badge.edge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-gen);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.foundation-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.foundation-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.formula-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.formula-box code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--solar-gold);
}

.formula-caption {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.foundation-specs {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-secondary);
}

.foundation-specs li {
  margin-bottom: 4px;
}

.foundation-specs strong {
  color: var(--text-primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-dim);
  padding: 24px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-mark {
  width: 6px;
  height: 6px;
  background: var(--emerald-gen);
  border-radius: 50%;
}

.footer-slash {
  color: var(--border-bright);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-separator {
  color: var(--border-bright);
}

/* ==========================================================================
   MODALS: LOGIN & UPLOAD
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.15);
}

.modal-card.modal-upload {
  max-width: 580px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-title-group h3 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--emerald-gen);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-description {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-description code {
  background: rgba(0, 0, 0, 0.4);
  color: var(--emerald-glow);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="password"] {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 10px 12px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  border-color: var(--emerald-gen);
}

.upload-park-selector {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.dropzone {
  border: 2px dashed var(--border-bright);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--emerald-gen);
  background: rgba(16, 185, 129, 0.05);
}

.dropzone-icon {
  font-size: 28px;
}

.dropzone-text {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.btn-modal-submit {
  background: var(--emerald-gen);
  border: none;
  color: #070b09;
  border-radius: 6px;
  padding: 8px 20px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-submit:hover:not(:disabled) {
  background: var(--emerald-glow);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.btn-modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-error {
  color: var(--danger-crimson);
  font-size: 12px;
  font-family: var(--font-mono);
}

.form-feedback {
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 8px 12px;
  border-radius: 6px;
}


/* Dataset & Date Info Strip */
.dataset-info-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(16, 24, 20, 0.6);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  margin-bottom: 14px;
}

.heading-subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.heading-subtitle time {
  color: var(--text-bright);
  font-weight: 600;
}

.data-stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stamp-value {
  color: var(--primary);
  font-weight: 600;
}

.stamp-zone {
  color: var(--text-dim);
}

.subtitle-divider {
  color: var(--border-light);
  margin: 0 4px;
}


/* ==========================================================================
   SCADA HIGH-TECH ANIMATIONS & MICRO-INTERACTIONS
   ========================================================================== */

/* 1. Radar Sonar Pulse on Live SCADA Telemetry Dots */
.telemetry-dot.live,
.state-dot {
  position: relative;
}

.telemetry-dot.live::after,
.state-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--emerald-gen);
  animation: sonar-pulse 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes sonar-pulse {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  70% {
    transform: scale(2.6);
    opacity: 0;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* 2. SCADA Laser Sweep Line along Chart Top Edge */
.chart-frame {
  position: relative;
}

.chart-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(16, 185, 129, 0.8) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: chart-laser-sweep 5s linear infinite;
  z-index: 4;
  pointer-events: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

@keyframes chart-laser-sweep {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 3. Shimmer Beam on Benchmark Accuracy Bars */
.benchmark-accuracy-bar-wrap {
  position: relative;
  overflow: hidden;
}

.benchmark-accuracy-bar-fill {
  transition: width 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.benchmark-accuracy-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: bar-light-shimmer 2.8s infinite ease-in-out;
}

@keyframes bar-light-shimmer {
  0% {
    transform: translateX(-100%);
  }
  50%, 100% {
    transform: translateX(150%);
  }
}

/* 4. Best Model Scientific Badge Breathing Glow */
.benchmark-model-badge {
  animation: badge-breathing-glow 2.5s ease-in-out infinite;
  transition: transform 0.2s ease;
}

@keyframes badge-breathing-glow {
  0%, 100% {
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.85), 0 0 24px rgba(16, 185, 129, 0.3);
    transform: scale(1.02);
  }
}

/* 5. KPI Number Live Count-up Flash */
@keyframes metric-flash-glow {
  0% {
    color: #34d399;
    text-shadow: 0 0 14px rgba(16, 185, 129, 0.8);
    transform: scale(1.02);
  }
  100% {
    color: inherit;
    text-shadow: none;
    transform: scale(1);
  }
}

.metric-updated {
  animation: metric-flash-glow 0.65s ease-out;
}

/* 6. Benchmark Cards Staggered Slide-In */
.benchmark-card {
  animation: card-appear 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.benchmark-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px rgba(16, 185, 129, 0.15);
}

@keyframes card-appear {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 7. Interactive Park & Series Buttons Micro-Interactions */
.park-btn {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.park-btn:hover:not(.active) {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.park-btn:active {
  transform: scale(0.98);
}

.series-chip {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.series-chip:hover {
  transform: translateY(-1px);
}

.series-chip:active {
  transform: scale(0.96);
}

.series-chip.active {
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.series-chip[data-key="isolarcloud_actual"].active {
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.btn-time-nav {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-time-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-time-nav:active {
  transform: scale(0.95);
}

/* 8. Smooth Chart Tooltip Appearance */
.chart-tooltip {
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 12px rgba(16, 185, 129, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ==========================================================================
   SOLCAST SCHEDULER & SYNC STATUS INDICATOR & ALERT BANNER
   ========================================================================== */
.solcast-sync-state,
.gdrive-sync-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font: 11px var(--font-mono);
  background: rgba(0, 0, 0, 0.35);
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.solcast-sync-state:hover,
.gdrive-sync-state:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.solcast-dot,
.gdrive-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-gen);
  box-shadow: 0 0 8px var(--emerald-gen);
  flex-shrink: 0;
}

.solcast-dot.error,
.gdrive-dot.error {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse-solcast-danger 1.5s infinite;
}

.solcast-dot.warning,
.gdrive-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.solcast-dot.syncing,
.gdrive-dot.syncing {
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  animation: pulse-solcast-danger 1s infinite;
}

@keyframes pulse-solcast-danger {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}

.system-alert-banner {
  margin: 12px 0 16px 0;
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
  animation: fadeIn 0.3s ease-in-out;
}

.system-alert-banner .alert-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.system-alert-banner .alert-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.system-alert-banner .alert-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.system-alert-banner .alert-text strong {
  font-size: 0.88rem;
  color: #fca5a5;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

.system-alert-banner .alert-text span {
  font-size: 0.8rem;
  color: #fecaca;
  line-height: 1.4;
}

.system-alert-banner .alert-dismiss-btn {
  background: transparent;
  border: none;
  color: #f87171;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.system-alert-banner .alert-dismiss-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
}

/* ==========================================================================
   NOWCASTING & COMPUTER VISION SECTION (Ventusky & PRSC K-Means)
   ========================================================================== */
.nowcasting-section {
  margin-top: 36px;
  margin-bottom: 36px;
}

.nowcasting-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.nowcasting-controls-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nowcasting-controls-strip.nowcast-middle-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  margin: 4px 0;
}

.nowcasting-layers-toggle {
  display: flex;
  flex-wrap: wrap;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.nowcast-layer-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nowcast-layer-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.nowcast-layer-btn.active {
  background: var(--blue-empiric);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.btn-nowcast-refresh {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-nowcast-refresh:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-bright);
}

.nowcasting-stacked-layout,
.nowcasting-dual-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nowcasting-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-col;
  flex-direction: column;
}

.nowcasting-panel .panel-header {
  padding: 12px 18px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
}

.nowcasting-panel .panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nowcasting-panel .panel-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.nowcasting-panel .panel-tag {
  background: rgba(245, 158, 11, 0.12);
  color: var(--solar-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.nowcasting-panel .panel-tag.ml-tag {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple-ml);
  border-color: rgba(168, 85, 247, 0.25);
}

.panel-ext-link {
  color: var(--cyan-electric);
  text-decoration: none;
  font-size: 11px;
}
.panel-ext-link:hover {
  text-decoration: underline;
}

.ventusky-iframe-wrap {
  position: relative;
  width: 100%;
  height: clamp(540px, 62vh, 800px);
  background: #020608;
}

.ventusky-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.ventusky-hud-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(7, 11, 9, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-dim);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.ventusky-hud-overlay .hud-target {
  color: var(--solar-amber);
  font-weight: 700;
}

.ventusky-hud-overlay .hud-coords {
  color: var(--text-secondary);
}

.ventusky-hud-overlay .hud-model {
  color: var(--emerald-gen);
}

.nowcast-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border-dim);
}

.nowcast-kpi-grid.nowcast-kpi-bottom {
  border-bottom: none;
  background: rgba(8, 13, 20, 0.35);
}

.nowcast-kpi-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.nowcast-kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: block;
}

.nowcast-kpi-val {
  font-size: 20px;
  font-weight: 800;
  margin: 4px 0;
  font-family: var(--font-mono);
}

.nowcast-kpi-sub {
  font-size: 10px;
  color: var(--text-secondary);
}

.nowcast-images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border-dim);
}

@media (max-width: 900px) {
  .nowcast-images-grid {
    grid-template-columns: 1fr;
  }
}

.nowcast-images-grid .image-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 300px;
  justify-content: center;
}

.image-box .image-label {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  margin-bottom: 10px;
  text-align: center;
}

.nowcast-stage {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #080d14;
}

.nowcast-base-img {
  display: block;
  width: 100%;
  height: auto;
}

.nowcast-mask-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  transition: opacity 0.12s ease-out;
}

.nowcast-preview-img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #080d14;
}

.nowcast-preview-loader {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 13, 20, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  pointer-events: none;
}

.nowcast-tools-bar {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-dim);
}

.nowcast-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.nowcast-slider-wrap.nowcast-k-inline {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
}

.nowcast-slider-label {
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.nowcast-slider {
  accent-color: var(--purple-ml);
  cursor: pointer;
}

.btn-nowcast-mask {
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-nowcast-mask:hover {
  border-color: var(--border-bright);
}

.btn-nowcast-mask.active {
  background: rgba(168, 85, 247, 0.22);
  color: #d8b4fe;
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

.nowcast-palette-container {
  padding: 12px 16px;
  background: var(--bg-surface);
}

.nowcast-palette-container.nowcast-palette-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-dim);
}

.nowcast-palette-main {
  flex: 1 1 auto;
  min-width: 240px;
}

.nowcast-palette-title {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.nowcast-palette-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cluster-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
}

.cluster-color-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nowcast-timeline-controls {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 3px 8px;
  gap: 10px;
}

.nowcast-play-btn {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.nowcast-play-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
}

.nowcast-play-btn.active {
  background: #10b981;
  color: #04120c;
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

.nowcast-live-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.nowcast-live-btn.active {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-block;
}

.nowcast-hour-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nowcast-hour-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nowcast-hour-slider {
  width: 90px;
  height: 5px;
  cursor: pointer;
}

.nowcast-hour-presets {
  display: flex;
  gap: 3px;
}

.hour-preset-btn {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hour-preset-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--cyan-electric);
}

.nowcast-sync-date-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.hud-item.hud-date {
  color: #f59e0b !important;
  font-weight: 700;
}


/* ==========================================================================
   OPCOM PZU Market Chart Section & Components
   ========================================================================== */
.opcom-chart-section {
  position: relative;
  border-color: rgba(245, 158, 11, 0.22);
}

.opcom-chart-section .eyebrow {
  color: #f59e0b;
}

.opcom-chart-section .eyebrow-line {
  background: #f59e0b;
}

/* Timezone Axis Switcher (CET vs Bucuresti vs Dual) */
.opcom-tz-selector {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.opcom-tz-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.opcom-tz-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.opcom-tz-btn.active {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.opcom-kpi-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.opcom-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dim);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.opcom-pill strong {
  color: #f59e0b;
  font-weight: 700;
}

.opcom-pill-min strong {
  color: #10b981;
}

.opcom-pill-max strong {
  color: #ef4444;
}

.opcom-chart-frame {
  position: relative;
  min-height: 380px;
  height: clamp(380px, 42vw, 460px);
}

.opcom-chart-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.9) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: chart-laser-sweep 5s linear infinite;
  z-index: 4;
  pointer-events: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

#opcom-chart {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: crosshair;
}

/* Bottom Bar & Official Legend (Matches OPCOM portal) */
.opcom-chart-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.opcom-chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.opcom-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.opcom-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.opcom-swatch-vol {
  background: #5ea8b6;
  border: 1px solid #7dc1cf;
}

.opcom-swatch-price {
  background: #ff6a00;
  height: 3px;
  width: 16px;
  position: relative;
}

.opcom-swatch-price::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #ff6a00;
  border: 1px solid #ffffff;
  border-radius: 50%;
}

.opcom-swatch-peak {
  background: rgba(245, 158, 11, 0.25);
  border: 1px dashed rgba(245, 158, 11, 0.6);
}

/* Enhanced Tooltip */
.opcom-chart-tooltip {
  position: absolute;
  pointer-events: none !important;
  display: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  background: rgba(11, 17, 26, 0.97) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 230px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.2);
  color: #f8fafc;
  font-size: 12px;
  z-index: 50 !important;
  white-space: nowrap;
}

.opcom-chart-tooltip.visible,
.opcom-chart-tooltip[style*="display: block"] {
  display: block !important;
  opacity: 1 !important;
}

/* Ensure empty state never blocks hover events */
#opcom-chart-empty,
.opcom-chart-frame .chart-empty {
  pointer-events: none !important;
  z-index: 3;
}

#opcom-chart-empty[hidden] {
  display: none !important;
}

.opcom-chart-tooltip .opcom-tt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.opcom-chart-tooltip .opcom-tt-int {
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fbbf24;
  font-size: 12px;
}

.opcom-chart-tooltip .opcom-tt-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.opcom-chart-tooltip .opcom-tt-badge.peak {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.opcom-chart-tooltip .opcom-tt-badge.offpeak {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.opcom-chart-tooltip .opcom-tt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  line-height: 1.5;
  font-family: var(--font-mono);
}

.opcom-chart-tooltip .opcom-tt-row.ro-row {
  color: #fde047;
  font-weight: 600;
}

.opcom-chart-tooltip .opcom-tt-metric-row {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}


/* ==========================================================================
   BESS 9.288 MWh Zorleni L1 Optimization & 4-Model Comparison Grid
   ========================================================================== */
.bess-zorleni-section {
  position: relative;
  border-color: rgba(16, 185, 129, 0.25);
  margin-top: 24px;
}

.bess-zorleni-section .eyebrow {
  color: #10b981;
}

.bess-zorleni-section .eyebrow-line {
  background: #10b981;
}

/* BESS Mode Tabs Selector (Segmentat vs Range Necesar) */
.bess-tabs-selector {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.bess-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.bess-tab-btn .tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.2s ease;
}

.bess-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.bess-tab-btn.active {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.bess-tab-btn.active .tab-dot {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.bess-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 18px;
}

@media (max-width: 1024px) {
  .bess-charts-grid {
    grid-template-columns: 1fr;
  }
}

.bess-card {
  position: relative;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bess-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.bess-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 10px;
}

.bess-card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bess-model-badge {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
}

.bess-model-badge.badge-solcast-ml { color: #38bdf8; }
.bess-model-badge.badge-openmeteo-ml { color: #c084fc; }
.bess-model-badge.badge-solcast-emp { color: #fbbf24; }
.bess-model-badge.badge-openmeteo-emp { color: #2dd4bf; }

.bess-model-desc {
  font-size: 11px;
  color: #64748b;
  font-family: var(--font-mono);
}

.bess-card-kpis {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bess-kpi-chip {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.bess-kpi-chip strong {
  color: #f8fafc;
}

.bess-kpi-chip.chip-soc {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.bess-kpi-chip.chip-price {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.3);
  color: #fed7aa;
}

.bess-canvas-wrap {
  position: relative;
  width: 100%;
  height: 290px;
}

.bess-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.bess-chart-tooltip {
  position: absolute;
  pointer-events: none !important;
  display: none;
  z-index: 25;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 220px;
  font-family: var(--font-mono);
  backdrop-filter: blur(8px);
}

.bess-chart-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.bess-chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #94a3b8;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.bess-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bess-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.bess-legend-swatch.swatch-charge {
  background: #10b981;
  border: 1px solid #34d399;
}

.bess-legend-swatch.swatch-grid {
  background: rgba(56, 189, 248, 0.5);
  border: 1px solid #38bdf8;
}

.bess-legend-swatch.swatch-price {
  background: #ff6a00;
  border: 1px solid #ea580c;
  height: 3px;
  border-radius: 1px;
}

.bess-legend-swatch.swatch-peak {
  background: rgba(245, 158, 11, 0.2);
  border: 1px dashed rgba(245, 158, 11, 0.6);
}

/* Selector Modus în OPCOM toolbar */
.opcom-mode-selector {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.opcom-mode-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.opcom-mode-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.opcom-mode-btn.active {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Horizon Presets Bar & Dashed Dots */
.horizon-presets {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  padding: 3px 6px;
  margin-right: 8px;
}

.horizon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.horizon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.horizon-btn.active {
  background: rgba(16, 185, 129, 0.22);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.5);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.chip-dot-dashed {
  background: transparent !important;
  border: 2px dashed;
  border-radius: 50%;
  width: 9px;
  height: 9px;
  box-sizing: border-box;
  display: inline-block;
  opacity: 0.6;
}

.series-chip.active .chip-dot-dashed {
  opacity: 1;
  transform: scale(1.15);
}

/* ==========================================================================
   DUAL-DECK MODEL CONTROLS: SOLCAST & OPEN-METEO
   ========================================================================== */
.chart-heading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chart-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dot-actual-white {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.95);
}

.series-chip[data-key="isolarcloud_actual"].active {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.model-deck {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 960px) {
  .model-deck {
    grid-template-columns: 1fr;
  }
}

.deck-card {
  background: rgba(16, 24, 20, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.deck-solcast {
  border-left: 3px solid #10b981;
}

.deck-solcast:hover {
  border-color: rgba(168, 185, 129, 0.4);
}

.deck-openmeteo {
  border-left: 3px solid #a855f7;
}

.deck-openmeteo:hover {
  border-color: rgba(168, 85, 247, 0.4);
}

.deck-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.deck-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.provider-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
}

.solcast-pill {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.openmeteo-pill {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.deck-desc {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.deck-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deck-model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.model-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge-ml-green {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-emp-blue {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.badge-ml-purple {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.badge-emp-orange {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.deck-chips-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Individual chip active borders & glows */
.series-chip[data-key="solcast_ml_da"].active {
  border-color: #34d399;
  color: #f0fdf4;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
}

.series-chip[data-key="solcast_ml"].active {
  border-color: #059669;
  color: #f0fdf4;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

.series-chip[data-key="solcast_empiric_da"].active {
  border-color: #60a5fa;
  color: #f0fdf4;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}

.series-chip[data-key="solcast_empiric"].active {
  border-color: #2563eb;
  color: #f0fdf4;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.35);
}

.series-chip[data-key="openmeteo_ml_da"].active {
  border-color: #c084fc;
  color: #f0fdf4;
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.3);
}

.series-chip[data-key="openmeteo_ml"].active {
  border-color: #7e22ce;
  color: #f0fdf4;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.35);
}

.series-chip[data-key="openmeteo_empiric_da"].active {
  border-color: #fb923c;
  color: #f0fdf4;
  box-shadow: 0 0 8px rgba(251, 146, 60, 0.3);
}

.series-chip[data-key="openmeteo_empiric"].active {
  border-color: #ea580c;
  color: #f0fdf4;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.35);
}

.series-chip.run-chip.active {
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.3);
}

.series-chip.run-chip-emp.active {
  border-color: rgba(251, 146, 60, 0.8);
  box-shadow: 0 0 6px rgba(251, 146, 60, 0.3);
}

/* Multi-STS (Oporelu L2) Active Chip Glows */
.series-chip[data-key="sts_1"].active {
  border-color: #38bdf8;
  color: #f0f9ff;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}
.series-chip[data-key="sts_2"].active {
  border-color: #34d399;
  color: #f0fdf4;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.35);
}
.series-chip[data-key="sts_3"].active {
  border-color: #fbbf24;
  color: #fffbeb;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.35);
}
.series-chip[data-key="sts_4"].active {
  border-color: #c084fc;
  color: #faf5ff;
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.35);
}
.series-chip[data-key="sts_5"].active {
  border-color: #94a3b8;
  color: #f8fafc;
  box-shadow: 0 0 6px rgba(148, 163, 184, 0.3);
}
.series-chip[data-key="sts_6"].active {
  border-color: #64748b;
  color: #f8fafc;
  box-shadow: 0 0 6px rgba(100, 116, 139, 0.3);
}

#btn-toggle-all-sts.sts-all-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
  cursor: pointer;
  transition: all 0.15s ease;
}

#btn-toggle-all-sts.sts-all-toggle-btn.active {
  background: rgba(56, 189, 248, 0.22);
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.28);
}


/* ==========================================================================
   HELIOS PLATFORM — OPORELU MULTI-STS SCADA STYLES (6 SUBSTAȚII)
   ========================================================================== */

.sts-oporelu-section {
  position: relative;
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

.sts-topology-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sts-topo-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 150px;
  min-width: 140px;
}

.sts-topo-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-mono, monospace);
}

.sts-topo-val {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.2px;
}

.sts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .sts-cards-grid {
    grid-template-columns: 1fr;
  }
}

.sts-card {
  position: relative;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
  overflow: hidden;
}

.sts-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.sts-card-future {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.45);
}

.sts-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 10px;
}

.sts-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sts-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.sts-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.2px;
}

.sts-code-pill {
  font-size: 10px;
  font-family: var(--font-mono, monospace);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sts-code-pill.planned {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.25);
}

.sts-card-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sts-kpi-chip {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  color: #cbd5e1;
}

.sts-canvas-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.4);
  overflow: hidden;
}

.sts-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sts-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #64748b;
  font-family: var(--font-mono, monospace);
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.06);
}

/* Mode Overlay Styles */
.sts-overlay-container {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.sts-overlay-canvas-wrap {
  position: relative;
  width: 100%;
  height: 420px;
  background: rgba(2, 6, 23, 0.45);
  border-radius: 8px;
  overflow: hidden;
}

.sts-overlay-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sts-overlay-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  justify-content: center;
}

.sts-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sts-legend-pill .legend-swatch {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}
