/**
 * weather.css
 * DefApp Weather Dashboard — Stylesheet
 *
 * System:  rickweb.test/defapp
 * Prefix:  ws-
 * Version: 1.0.0
 *
 * Table of Contents:
 *   1.  CSS Variables
 *   2.  Base / Reset
 *   3.  Layout (navbar, sidebar, main)
 *   4.  Cards
 *   5.  Gradients (card headers)
 *   6.  Metric Typography
 *   7.  Badges
 *   8.  Components (compass, arc, gauge, charts, forecast)
 *   9.  Alerts
 *   10. Modal
 *   11. Toast
 *   12. Footer
 *   13. Animations
 *   14. Dark Mode
 *   15. Responsive
 *   16. Print
 */

/* ================================================================
   1. CSS Variables
   ================================================================ */
:root {
  --ws-primary:        #3468b0;
  --ws-danger:         #ac1922;
  --ws-warning:        #d6a632;
  --ws-success:        #01712b;
  --ws-info:           #2f5ea3;
  --ws-navy:           #1a2332;
  --ws-navy-light:     #243044;
  --ws-navy-lighter:   #2d3b52;

  --ws-bg:             #f8f4f1;
  --ws-card-bg:        #fffbf8;
  --ws-text:           #14110e;
  --ws-text-secondary: #746d68;
  --ws-text-muted:     #98918b;
  --ws-border:         rgba(218,198,183,0.25);
  --ws-hover-shadow:   0 8px 24px rgba(20,17,14,0.08);

  --ws-sidebar-w:      260px;
  --ws-navbar-h:       52px;

  --ws-radius-card:    1.25rem;
  --ws-radius-badge:   9999px;
  --ws-radius-sm:      0.5rem;
}

/* ================================================================
   2. Base / Reset
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  background: var(--ws-bg);
  color: var(--ws-text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--ws-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: block; }

/* ================================================================
   3. Layout
   ================================================================ */

/* --- Navbar --- */
.ws-top-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--ws-navbar-h);
  background: var(--ws-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  gap: 1rem;
}
.ws-navbar-left  { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.ws-navbar-center { flex: 1; text-align: center; color: #efeae7; font-weight: 600; font-size: 0.9rem; }
.ws-navbar-right  { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.ws-brand         { display: flex; align-items: center; gap: 0.5rem; }
.ws-brand-icon    { width: 22px; height: 22px; color: #93b5ef; }
.ws-brand-name    { color: #fffbf8; font-weight: 700; font-size: 0.95rem; }

.ws-icon-btn {
  background: transparent;
  border: none;
  color: #cfc9c5;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--ws-radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.ws-icon-btn:hover { background: rgba(255,255,255,0.12); }
.ws-icon-btn i, .ws-icon-btn svg { width: 18px; height: 18px; }

.ws-live-indicator { display: flex; align-items: center; gap: 0.4rem; }
.ws-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #32ad52;
  animation: ws-pulse-live 1.5s ease-in-out infinite;
}
.ws-live-text { color: #97dfa1; font-weight: 600; font-size: 0.75rem; }
.ws-clock { color: #e2ddd9; font-variant-numeric: tabular-nums; font-size: 0.8rem; font-weight: 500; }
.ws-last-updated { color: #98918b; font-size: 0.72rem; }

.ws-bell-btn { position: relative; }
.ws-alert-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: #ac1922;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 50%;
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* --- Layout wrapper --- */
.ws-layout {
  display: flex;
  padding-top: var(--ws-navbar-h);
  min-height: 100vh;
}

/* --- Sidebar --- */
.ws-sidebar {
  width: var(--ws-sidebar-w);
  flex-shrink: 0;
  background: var(--ws-navy);
  min-height: calc(100vh - var(--ws-navbar-h));
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, left 0.3s ease;
  overflow: hidden;
}
.ws-sidebar.ws-collapsed { width: 0; }

.ws-station-selector { padding: 1.25rem 1rem 0.75rem; }
.ws-station-selector .ws-metric-label { color: #98918b; display: block; margin-bottom: 0.4rem; }
.ws-select-wrap { position: relative; }
.ws-select-wrap select {
  width: 100%;
  background: rgba(255,255,255,0.1);
  color: #fffbf8;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  appearance: none;
  cursor: pointer;
  outline: none;
}
.ws-select-wrap select:focus { box-shadow: 0 0 0 2px var(--ws-primary); }
.ws-select-chevron {
  position: absolute; right: 0.65rem; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: #98918b;
  pointer-events: none;
}

.ws-sidebar-nav { flex: 1; padding: 0.75rem 0.75rem; display: flex; flex-direction: column; gap: 0.2rem; }
.ws-sidebar-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.875rem;
  border-radius: 0.75rem;
  color: #98918b;
  cursor: pointer;
  font-size: 0.875rem; font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.ws-sidebar-nav-item i, .ws-sidebar-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.ws-sidebar-nav-item:hover { background: var(--ws-navy-lighter); color: #fffbf8; }
.ws-sidebar-nav-item.active { background: var(--ws-primary); color: #fffbf8; }

.ws-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem;
  color: #98918b;
}
.ws-sidebar-footer strong { color: #efeae7; }
.ws-sidebar-location { margin-top: 0.2rem; }

/* --- Main content --- */
.ws-main-content {
  flex: 1;
  min-height: calc(100vh - var(--ws-navbar-h));
  padding: 1.5rem;
  overflow-x: hidden;
}
.ws-row { margin-bottom: 1.25rem; }

/* ================================================================
   4. Cards
   ================================================================ */
.ws-card {
  background: var(--ws-card-bg);
  border-radius: var(--ws-radius-card);
  overflow: hidden;
  border: 1px solid var(--ws-border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.ws-card.ws-clickable { cursor: pointer; }
.ws-card.ws-clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--ws-hover-shadow);
}
.ws-card-hero { margin-bottom: 1.25rem; }

.ws-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.1rem;
  color: #fffbf8;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ws-card-header span { display: flex; align-items: center; gap: 0.5rem; }
.ws-card-header i, .ws-card-header svg { width: 15px; height: 15px; }

.ws-card-refresh {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fffbf8;
  cursor: pointer;
  border-radius: var(--ws-radius-sm);
  padding: 0.22rem 0.35rem;
  display: flex; align-items: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.ws-card-refresh:hover { background: rgba(255,255,255,0.35); }
.ws-card-refresh i, .ws-card-refresh svg { width: 13px; height: 13px; }

.ws-card-body { padding: 1.1rem 1.25rem; }
.ws-card-center { text-align: center; }

/* Hero body */
.ws-hero-body {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem;
}
.ws-hero-condition { font-size: 1.75rem; font-weight: 700; color: var(--ws-text); }
.ws-hero-station { font-size: 0.875rem; font-weight: 600; color: var(--ws-primary); margin-top: 0.2rem; }
.ws-hero-coords { font-size: 0.75rem; color: var(--ws-text-muted); margin-top: 0.2rem; }
.ws-hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.ws-hero-obs { margin-left: auto; text-align: right; flex-shrink: 0; }
.ws-obs-time { font-size: 0.875rem; font-weight: 600; color: #3f3935; font-variant-numeric: tabular-nums; margin-top: 0.25rem; }
.ws-obs-ago { font-size: 0.72rem; color: var(--ws-text-muted); margin-top: 0.15rem; }

/* ================================================================
   5. Gradients (card headers)
   ================================================================ */
.ws-gradient-red         { background: linear-gradient(135deg, #e7615b, #d57702); }
.ws-gradient-amber       { background: linear-gradient(135deg, #d6a632, #ed974a); }
.ws-gradient-teal        { background: linear-gradient(135deg, #26b89d, #5489d6); }
.ws-gradient-blue        { background: linear-gradient(135deg, #3468b0, #5489d6); }
.ws-gradient-bluegrey    { background: linear-gradient(135deg, #5a544f, #746d68); }
.ws-gradient-yellow-purple { background: linear-gradient(135deg, #d6a632, #9c6ac9); }
.ws-gradient-orange      { background: linear-gradient(135deg, #d57702, #f3c357); }
.ws-gradient-purple      { background: linear-gradient(135deg, #6f3da0, #9c6ac9); }

/* ================================================================
   6. Metric Typography
   ================================================================ */
.ws-metric-value {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ws-text);
}
.ws-unit { font-size: 1rem; font-weight: 600; }
.ws-metric-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ws-text-secondary);
}
.ws-metric-sub { font-size: 0.82rem; color: var(--ws-text-muted); margin-top: 0.2rem; }
.ws-value-transition { transition: all 0.45s ease; }

/* Temperature card specifics */
.ws-temp-minmax { display: flex; justify-content: center; gap: 1rem; margin-top: 0.6rem; font-size: 0.8rem; }
.ws-temp-min { color: #2b5899; font-weight: 600; display: flex; align-items: center; gap: 0.2rem; }
.ws-temp-max { color: #ac1922; font-weight: 600; display: flex; align-items: center; gap: 0.2rem; }
.ws-temp-min svg, .ws-temp-max svg { width: 12px; height: 12px; }
.ws-spark-wrap { position: relative; height: 56px; margin-top: 0.75rem; }

/* Feels Like */
.ws-feels-row { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 0.5rem; }
.ws-feels-diff { font-size: 0.875rem; font-weight: 600; color: var(--ws-primary); font-variant-numeric: tabular-nums; }

/* Wind */
.ws-wind-row { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.ws-wind-details {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--ws-text-secondary);
  margin-top: 0.65rem; padding: 0 0.5rem;
}

/* Humidity arc */
.ws-arc-wrap { position: relative; display: inline-block; }
.ws-arc-value {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 0;
}
.ws-arc-number { font-size: 1.5rem; font-weight: 700; color: var(--ws-text); font-variant-numeric: tabular-nums; }
.ws-arc-pct { font-size: 0.8rem; font-weight: 600; }
.ws-humidity-row {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--ws-text-secondary);
  margin-top: 0.5rem; padding: 0 0.25rem;
}
.ws-progress-arc { transition: stroke-dashoffset 1s ease; }
.ws-compass-rose { transition: transform 0.8s ease; }

/* Rain */
.ws-rain-top { display: flex; justify-content: space-between; margin-bottom: 0.75rem; }
.ws-rain-value { font-size: 1.2rem; font-weight: 700; color: var(--ws-text); font-variant-numeric: tabular-nums; }
.ws-rain-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; text-align: center; margin-bottom: 0.75rem; }
.ws-rain-total-val { font-size: 0.8rem; font-weight: 600; color: #3f3935; font-variant-numeric: tabular-nums; margin-top: 0.15rem; }
.ws-rain-chart-wrap { position: relative; height: 80px; }

/* Lightning */
.ws-lightning-top { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 0.75rem; }
.ws-bolt { opacity: 0.3; }
.ws-bolt.ws-lightning-active { animation: ws-lightning-flash 0.8s ease-in-out infinite; }
.ws-lightning-details {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--ws-text-secondary);
  padding: 0 0.5rem; margin-bottom: 0.75rem;
}

/* UV / Solar */
.ws-uv-top { display: flex; justify-content: space-between; margin-bottom: 0.75rem; }
.ws-uv-value-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.ws-uv-number { font-size: 1.6rem; font-weight: 700; color: var(--ws-text); }
.ws-solar-value { font-size: 1.1rem; font-weight: 700; color: var(--ws-text); margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.ws-solar-bar-wrap { margin-bottom: 0.75rem; }
.ws-progress-bar-bg { background: #efeae7; border-radius: 9999px; height: 8px; margin: 0.3rem 0 0.2rem; }
.ws-solar-bar { height: 8px; border-radius: 9999px; background: linear-gradient(90deg, #d57702, #f3c357); transition: width 0.6s ease; }
.ws-solar-pct { font-size: 0.7rem; color: var(--ws-text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.ws-daylight-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; color: var(--ws-text-muted); }
.ws-daylight-track { flex: 1; background: #efeae7; border-radius: 9999px; height: 6px; }
.ws-daylight-bar { height: 6px; border-radius: 9999px; background: #f3c357; transition: width 0.6s ease; }
.ws-daylight-label { font-size: 0.7rem; color: var(--ws-text-muted); text-align: center; margin-top: 0.25rem; }

/* Pressure gauge */
.ws-gauge-svg { display: block; margin: 0 auto; }
.ws-pressure-value { font-size: 1.5rem; font-weight: 700; color: var(--ws-text); margin-top: 0.35rem; font-variant-numeric: tabular-nums; }
.ws-pressure-trend { display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-top: 0.3rem; font-size: 0.8rem; font-weight: 600; color: var(--ws-text-secondary); }
.ws-pressure-trend i, .ws-pressure-trend svg { width: 14px; height: 14px; }
.ws-pressure-forecast { font-size: 0.72rem; color: var(--ws-text-muted); margin-top: 0.4rem; }
#ws-pressure-needle { transition: transform 0.8s ease; transform-origin: 90px 100px; }

/* Forecast grid */
.ws-forecast-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  overflow-x: auto;
  min-width: 320px;
}
.ws-forecast-day {
  background: var(--ws-bg);
  border-radius: 1rem;
  padding: 0.65rem 0.4rem;
  text-align: center;
}
.ws-forecast-day-name { font-size: 0.72rem; font-weight: 700; color: #3f3935; }
.ws-forecast-date { font-size: 0.62rem; color: var(--ws-text-muted); }
.ws-forecast-icon-wrap { display: flex; justify-content: center; margin: 0.4rem 0; }
.ws-forecast-cond { font-size: 0.62rem; color: var(--ws-text-secondary); margin-bottom: 0.35rem; }
.ws-forecast-temps { display: flex; align-items: center; justify-content: center; gap: 0.3rem; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.ws-forecast-hi { font-weight: 700; color: var(--ws-text); }
.ws-forecast-sep { color: #cfc9c5; }
.ws-forecast-lo { color: var(--ws-text-muted); }
.ws-forecast-precip { display: flex; align-items: center; justify-content: center; gap: 0.2rem; margin-top: 0.3rem; font-size: 0.62rem; color: var(--ws-primary); }

/* ================================================================
   7. Badges
   ================================================================ */
.ws-badge {
  display: inline-flex; align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: var(--ws-radius-badge);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.ws-badge-blue   { background: #dbeafe; color: #244b83; }
.ws-badge-grey   { background: #efeae7; color: #5a544f; }
.ws-badge-green  { background: #baeec0; color: #016826; }
.ws-badge-yellow { background: #f3c357; color: #6c5001; }
.ws-badge-orange { background: #ffba81; color: #6b3900; }
.ws-badge-red    { background: #ffe4e1; color: #9d1920; }
.ws-badge-teal   { background: #ccf5ed; color: #0f7561; }
.ws-badge-purple { background: #ece3f6; color: #603489; }
.ws-badge-white-ghost { background: rgba(255,255,255,0.2); color: #fffbf8; }

/* ================================================================
   8. Grid helpers
   ================================================================ */
.ws-grid { display: grid; gap: 1.1rem; }
.ws-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ws-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ws-col-span-2 { grid-column: span 2; }
.ws-text-right { text-align: right; }

/* ================================================================
   9. Alerts
   ================================================================ */
.ws-alerts-header { cursor: pointer; }
.ws-alerts-header-right { display: flex; align-items: center; gap: 0.5rem; }
.ws-alerts-header-right i,
.ws-alerts-header-right svg { width: 15px; height: 15px; }
#ws-alerts-chevron { transition: transform 0.25s ease; }

.ws-alert-item {
  border-left: 4px solid;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
}
.ws-alert-item:last-child { margin-bottom: 0; }
.ws-alert-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.ws-alert-title { font-weight: 600; font-size: 0.875rem; }
.ws-alert-meta { font-size: 0.72rem; color: var(--ws-text-muted); margin-bottom: 0.35rem; }
.ws-alert-desc { font-size: 0.82rem; color: #4c4642; }

.ws-alert-item.ws-alert-red    { border-color: #ac1922; background: rgba(172,25,34,0.06); }
.ws-alert-item.ws-alert-orange { border-color: #d57702; background: rgba(213,119,2,0.06); }
.ws-alert-item.ws-alert-yellow { border-color: #d6a632; background: rgba(214,166,50,0.06); }
.ws-alert-item.ws-alert-blue   { border-color: #3468b0; background: rgba(52,104,176,0.06); }

.ws-no-alerts {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 2rem;
  color: var(--ws-text-muted);
}
.ws-no-alerts-icon { width: 40px; height: 40px; color: #32ad52; margin-bottom: 0.5rem; }
.ws-no-alerts-title { font-weight: 600; color: #01712b; }
.ws-no-alerts-sub { font-size: 0.75rem; margin-top: 0.2rem; }

/* Pulsing border for active WARNING */
@keyframes ws-alert-pulse { 0%,100% { border-color: rgba(172,25,34,0.3); } 50% { border-color: rgba(172,25,34,0.8); } }
.ws-alert-pulse { animation: ws-alert-pulse 2s ease-in-out infinite; border: 2px solid rgba(172,25,34,0.3); }

/* ================================================================
   10. Modal
   ================================================================ */
.ws-modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,17,14,0.5);
  display: none; align-items: center; justify-content: center;
}
.ws-modal-overlay.ws-active { display: flex; }
.ws-modal {
  background: var(--ws-card-bg);
  border-radius: var(--ws-radius-card);
  max-width: 700px; width: 90%;
  max-height: 80vh; overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 20px 60px rgba(20,17,14,0.18);
}
.ws-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.ws-modal-title { font-size: 1.1rem; font-weight: 700; color: var(--ws-text); margin: 0; }
.ws-modal-chart-wrap { position: relative; height: 240px; margin-top: 0.75rem; }

/* ================================================================
   11. Toast
   ================================================================ */
.ws-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  background: var(--ws-card-bg);
  border-radius: 1rem;
  padding: 0.875rem 1.25rem;
  box-shadow: 0 12px 32px rgba(20,17,14,0.15);
  border-left: 4px solid var(--ws-danger);
  display: none; align-items: center; gap: 0.75rem;
  max-width: 360px;
}
.ws-toast.ws-active { display: flex; }
.ws-toast-icon { width: 22px; height: 22px; color: #ac1922; flex-shrink: 0; }
.ws-toast-title { font-weight: 600; font-size: 0.875rem; color: var(--ws-text); }
.ws-toast-body { font-size: 0.75rem; color: var(--ws-text-secondary); margin-top: 0.15rem; }
.ws-toast-close { margin-left: auto; flex-shrink: 0; }

/* ================================================================
   12. Footer
   ================================================================ */
.ws-footer {
  background: var(--ws-card-bg);
  border-top: 1px solid var(--ws-border);
  padding: 1.25rem 1.5rem;
}
.ws-footer-inner {
  text-align: center;
  font-size: 0.72rem;
  color: var(--ws-text-muted);
  line-height: 1.8;
}
.ws-footer-inner strong { color: #4c4642; }
.ws-footer-inner a { color: var(--ws-primary); }

/* ================================================================
   13. Animations
   ================================================================ */
@keyframes ws-pulse-live     { 0%,100%{opacity:1} 50%{opacity:0.35} }
@keyframes ws-lightning-flash{ 0%,100%{opacity:0.25} 50%{opacity:1} }
@keyframes ws-shimmer        { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
@keyframes ws-alert-pulse    { 0%,100%{border-color:rgba(172,25,34,0.3)} 50%{border-color:rgba(172,25,34,0.8)} }

.ws-skeleton {
  background: linear-gradient(90deg,#efeae7 25%,#f8f4f1 50%,#efeae7 75%);
  background-size: 200% 100%;
  animation: ws-shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

/* ================================================================
   14. Dark Mode
   ================================================================ */
body.ws-dark {
  --ws-bg:             #0f1724;
  --ws-card-bg:        #1a2332;
  --ws-text:           #e2ddd9;
  --ws-text-secondary: #b3ada8;
  --ws-text-muted:     #746d68;
  --ws-border:         rgba(45,59,82,0.8);
  --ws-hover-shadow:   0 8px 24px rgba(0,0,0,0.3);
}
body.ws-dark .ws-top-navbar { background: #0c1320; }
body.ws-dark .ws-sidebar    { background: #0c1320; }
body.ws-dark .ws-select-wrap select { background: rgba(255,255,255,0.06); }
body.ws-dark .ws-forecast-day { background: rgba(255,255,255,0.05); }
body.ws-dark .ws-progress-bar-bg,
body.ws-dark .ws-daylight-track { background: rgba(255,255,255,0.1); }
body.ws-dark .ws-modal  { background: #243044; }
body.ws-dark .ws-toast  { background: #243044; }
body.ws-dark .ws-footer { background: #0c1320; }
body.ws-dark .ws-badge-blue  { background: rgba(52,104,176,0.25); color: #93b5ef; }
body.ws-dark .ws-badge-grey  { background: rgba(255,255,255,0.1); color: #b3ada8; }
body.ws-dark .ws-badge-green { background: rgba(1,113,43,0.25); color: #97dfa1; }

/* ================================================================
   15. Responsive
   ================================================================ */
@media (max-width: 1200px) {
  .ws-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .ws-grid-3 { grid-template-columns: 1fr; }
  .ws-col-span-2 { grid-column: span 1; }
}
@media (max-width: 768px) {
  .ws-sidebar {
    position: fixed; left: calc(-1 * var(--ws-sidebar-w)); top: var(--ws-navbar-h);
    height: calc(100vh - var(--ws-navbar-h));
    z-index: 80; transition: left 0.3s;
  }
  .ws-sidebar.ws-mobile-open { left: 0; }
  .ws-grid-4 { grid-template-columns: 1fr; }
  .ws-hero-body { flex-direction: column; text-align: center; }
  .ws-hero-obs { margin-left: 0; text-align: center; }
  .ws-navbar-center { display: none; }
  .ws-last-updated { display: none; }
}

/* ================================================================
   16. Print
   ================================================================ */
@media print {
  .ws-sidebar, .ws-top-navbar, .ws-card-refresh,
  .ws-footer, .ws-toast, .ws-modal-overlay { display: none !important; }
  .ws-main-content { padding: 0; }
  .ws-card { break-inside: avoid; page-break-inside: avoid; border: 1px solid #ccc; }
  .ws-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ws-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
