/* ============================================================
   style.css — Estação Meteorológica Chamon  v4.0
   Paleta INMET azul unificada em todo o site
   ============================================================ */

:root {
  /* ── Fundo e superfícies ── */
  --bg:       #060d18;
  --bg2:      #0c1829;
  --bg3:      #0f2040;
  --card:     #0f1f38;
  --card2:    #132848;

  /* ── Bordas ── */
  --border:   #1e3a5f;
  --border2:  #162d4a;

  /* ── Texto ── */
  --text:     #e8f0fb;
  --text2:    #bdd0ea;
  --muted:    #6b8aad;
  --muted2:   #3d5a7a;

  /* ── Acento principal INMET ── */
  --accent:   #1a7fd4;
  --accent-h: #4da6ff;
  --accent-dim: rgba(26,127,212,.15);

  /* ── Cyan INMET ── */
  --cyan:     #0e9ec7;
  --cyan-h:   #3dd5f3;

  /* ── Cores semânticas ── */
  --green:    #2da860;
  --green-h:  #4ade80;
  --red:      #e05252;
  --red-h:    #ff8080;
  --orange:   #d97706;
  --orange-h: #fbbf24;
  --yellow:   #c9960a;
  --yellow-h: #fcd34d;
  --purple:   #7c5cbf;
  --purple-h: #a78bfa;

  /* ── Dimensões ── */
  --radius:   8px;
  --radius-lg:12px;
  --shadow:   0 1px 4px rgba(0,0,0,.5), 0 4px 20px rgba(0,0,0,.3);

  /* ── Tipografia fluida ── */
  --fs-xs:  clamp(.68rem, 1.5vw, .75rem);
  --fs-sm:  clamp(.78rem, 2vw,   .875rem);
  --fs-md:  clamp(.9rem,  2.2vw, 1rem);
  --fs-lg:  clamp(1rem,   2.5vw, 1.15rem);
  --fs-xl:  clamp(1.5rem, 4vw,   2rem);
  --fs-2xl: clamp(2.5rem, 8vw,   4.5rem);

  /* ── Mono ── */
  --font-mono: 'IBM Plex Mono', 'Cascadia Code', 'Courier New', monospace;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
img, canvas { display: block; max-width: 100%; }
a { color: var(--accent-h); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }

/* ═══════════════════════════════════════════════════════════
   HEADER UNIFICADO — igual em todas as páginas
   ═══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--bg2);
  border-bottom: 2px solid var(--accent);
  position: sticky; top: 0; z-index: 200;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 0;
  gap: .75rem;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  color: var(--accent-h);
  flex: 1;
}
.logo-icon { flex-shrink: 0; }
.header-brand-text { min-width: 0; }
.header-brand-text h1 {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.station-info {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badge estação (código INMET) */
.station-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  padding: .1rem .5rem;
  border-radius: 4px;
  letter-spacing: .04em;
  margin-right: .4rem;
  flex-shrink: 0;
}

.header-time { text-align: right; flex-shrink: 0; }
.time-label  { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.time-value  { font-size: var(--fs-sm); font-weight: 700; color: var(--accent-h); line-height: 1.3; }
.time-sub    { font-size: var(--fs-xs); color: var(--muted); }

/* Nav principal */
.main-nav {
  display: flex;
  gap: .1rem;
  padding: .35rem 0;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: .32rem .75rem;
  border-radius: 5px;
  transition: color .15s, background .15s;
  white-space: nowrap;
  letter-spacing: .01em;
}
.main-nav a:hover { color: var(--accent-h); background: var(--accent-dim); text-decoration: none; }
.main-nav a.active { color: var(--accent-h); background: var(--accent-dim); }

/* ── Alerta offline ─────────────────────────────────────────── */
.alert-bar {
  background: rgba(209,108,0,.18);
  border-bottom: 1px solid rgba(209,108,0,.4);
  color: #fbbf24;
  font-size: var(--fs-sm);
  text-align: center;
  padding: .45rem 1rem;
  display: none;
}
.alert-bar.show { display: block; }

/* ═══════════════════════════════════════════════════════════
   HERO — Temperatura principal
   ═══════════════════════════════════════════════════════════ */
.hero-card {
  background: linear-gradient(135deg, #0a1f3d 0%, #071629 60%, #091e2a 100%);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 1rem 0 .875rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.5rem;
  align-items: start;
}
@media (min-width: 500px) { .hero-card { padding: 1.5rem 2rem; gap: 1.25rem 2.5rem; } }
@media (min-width: 768px) { .hero-card { padding: 1.75rem 2.5rem; align-items: center; } }

.hero-temp { display: flex; align-items: baseline; gap: .2rem; }
.hero-value {
  font-size: var(--fs-2xl);
  font-weight: 200;
  letter-spacing: -2px;
  line-height: 1;
  color: #fff;
}
.hero-unit {
  font-size: clamp(1.2rem, 3.5vw, 1.75rem);
  color: var(--muted);
  font-weight: 300;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem 1.25rem;
}
@media (min-width: 500px) { .hero-meta { grid-template-columns: repeat(4, auto); gap: .5rem 2rem; } }

.hero-item { display: flex; flex-direction: column; }
.hero-item .lbl {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1.3;
}
.hero-item .val {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  line-height: 1.2;
}
.hero-item .val.red    { color: var(--red-h); }
.hero-item .val.blue   { color: var(--cyan-h); }
.hero-item .val.orange { color: var(--orange-h); }

/* ═══════════════════════════════════════════════════════════
   CARDS DE SENSORES
   ═══════════════════════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
  margin-bottom: 1rem;
}
@media (min-width: 700px)  { .cards-grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; } }
@media (min-width: 1000px) { .cards-grid { grid-template-columns: repeat(6, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--card-accent, var(--accent));
  border-radius: var(--radius);
  padding: .875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  box-shadow: var(--shadow);
  transition: border-color .2s, transform .15s;
}
.card:hover { border-color: var(--accent-h); transform: translateY(-1px); }

.card-humidity  { --card-accent: var(--cyan); }
.card-pressure  { --card-accent: var(--purple); }
.card-wind      { --card-accent: var(--yellow-h); }
.card-rain      { --card-accent: var(--accent-h); }
.card-uv        { --card-accent: var(--orange-h); }
.card-status    { --card-accent: var(--green); }

.card-icon  { font-size: 1.3rem; line-height: 1; margin-bottom: .1rem; }
.card-label {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.card-value {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.card-value .unit {
  font-size: .75em;
  font-weight: 400;
  color: var(--muted);
  margin-left: 1px;
}
.card-sub { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }

/* Barra de progresso (umidade) */
.progress-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: .3rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--accent-h));
  border-radius: 2px;
  transition: width .6s ease;
}

/* Vento */
.wind-detail { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.wind-compass { font-size: 1rem; font-weight: 800; color: var(--yellow-h); letter-spacing: .05em; }
.wind-arrow-wrap { margin-top: .35rem; }

/* UV badge */
.uv-badge {
  display: inline-flex;
  align-items: center;
  padding: .15rem .6rem;
  border-radius: 20px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #111;
  width: fit-content;
  margin-top: .1rem;
}

/* Status online */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--green-h);
}
.status-dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-h);
  box-shadow: 0 0 6px var(--green-h);
  animation: blink 2s infinite;
}
.status-dot.offline { color: var(--red-h); }
.status-dot.offline::before {
  background: var(--red-h);
  box-shadow: 0 0 6px var(--red-h);
  animation: none;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ═══════════════════════════════════════════════════════════
   SEÇÃO DE GRÁFICOS
   ═══════════════════════════════════════════════════════════ */
.section-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .875rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-title span { color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-bottom: .75rem;
}
@media (min-width: 700px) { .charts-grid { grid-template-columns: 1fr 1fr; } }

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
@media (min-width: 640px) { .chart-card { padding: 1.1rem 1.25rem; } }

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  flex-wrap: wrap;
  gap: .4rem;
}
.chart-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.chart-current {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text2);
  font-family: var(--font-mono);
}

.chart-canvas-wrap { position: relative; width: 100%; }
.chart-canvas-wrap canvas,
.chart-canvas-wrap-rose canvas {
  width: 100% !important;
  height: clamp(130px, 22vw, 190px) !important;
}
.chart-card.chart-lg .chart-canvas-wrap canvas {
  height: clamp(170px, 28vw, 240px) !important;
}
.wind-rose-card { align-items: center; justify-content: center; }
.wind-rose-wrap { width: 100%; max-width: 190px; aspect-ratio: 1; margin: 0 auto; }
.wind-rose-wrap canvas { width: 100% !important; height: 100% !important; }

/* Loading state */
.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  color: var(--muted);
  font-size: var(--fs-sm);
  gap: .5rem;
}
.chart-loading::before {
  content: '';
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   TABELAS
   ═══════════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-xs);
  min-width: 550px;
}
.data-table th {
  background: var(--bg3);
  color: var(--muted);
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .6rem .875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: .55rem .875rem;
  border-bottom: 1px solid var(--border2);
  color: var(--text2);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(26,127,212,.07); }

/* ═══════════════════════════════════════════════════════════
   FORMULÁRIOS E BOTÕES
   ═══════════════════════════════════════════════════════════ */
.form-row {
  display: flex;
  gap: .6rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: .25rem; }
.form-group label {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
}
.form-group input,
.form-group select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: var(--fs-sm);
  padding: .45rem .8rem;
  min-width: 130px;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,127,212,.2); }

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: .48rem 1.1rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: background .15s, transform .1s;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { background: var(--accent-h); text-decoration: none; color: #fff; }
.btn:active { transform: scale(.97); }
.btn.btn-sm { padding: .35rem .8rem; font-size: var(--fs-xs); }
.btn.btn-secondary {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}
.btn.btn-secondary:hover { background: var(--card2); border-color: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   RELATÓRIO — INMET TABLE PAGE (reusa estrutura do site)
   ═══════════════════════════════════════════════════════════ */

/* Controles do relatório */
.report-controls {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: .7rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 0;
}
/* (sticky fica abaixo do header) - ajusta top dinamicamente via JS */

.report-controls-inner {
  display: flex;
  align-items: flex-end;
  gap: .65rem;
  flex-wrap: wrap;
}

.period-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.period-toggle a {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: .38rem .8rem;
  color: var(--muted);
  background: var(--bg3);
  transition: background .15s, color .15s;
  white-space: nowrap;
  border-right: 1px solid var(--border);
  text-decoration: none;
}
.period-toggle a:last-child { border-right: none; }
.period-toggle a:hover { background: var(--card2); color: var(--text); }
.period-toggle a.active { background: var(--accent); color: #fff; }

/* Stats pills */
.stats-bar {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  padding: .65rem 0 .5rem;
  border-bottom: 1px solid var(--border2);
  margin-bottom: .875rem;
}
.stat-pill {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .22rem .8rem;
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.stat-pill .sp-label { color: var(--muted); }
.stat-pill .sp-val   { font-weight: 700; color: var(--text); font-family: var(--font-mono); }

/* Sparklines do relatório */
.sparks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .6rem;
  margin-bottom: .875rem;
}
.spark-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
}
.spark-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .5rem;
}
.spark-label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.spark-stat  { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700; color: var(--text2); }
.spark-canvas-wrap canvas { width: 100% !important; height: 64px !important; }

/* Tabela Padrão OMM */
.inmet-table-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.inmet-table-header {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: .55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.inmet-table-header h3 {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text);
}
.inmet-table-header span { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }

.inmet-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.inmet-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: .73rem;
  min-width: 860px;
}
table.inmet-tbl thead tr.th-group th {
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
  padding: .38rem .5rem;
  border: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
}
table.inmet-tbl thead tr.th-sub th {
  background: var(--bg3);
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  text-align: center;
  padding: .28rem .5rem;
  border: 1px solid var(--border2);
  white-space: nowrap;
}
table.inmet-tbl tbody tr td {
  padding: .28rem .5rem;
  text-align: center;
  border-bottom: 1px solid var(--border2);
  border-right: 1px solid var(--border2);
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text2);
  white-space: nowrap;
}
/* Colunas fixas sticky */
table.inmet-tbl tbody tr td:nth-child(1) {
  background: var(--bg3);
  font-family: inherit;
  font-weight: 700;
  font-size: .72rem;
  color: var(--muted);
  text-align: left;
  padding-left: .75rem;
  border-right: 2px solid var(--border);
  position: sticky; left: 0; z-index: 2;
  min-width: 82px;
}
table.inmet-tbl tbody tr td:nth-child(2) {
  background: var(--bg3);
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--muted);
  border-right: 2px solid var(--border);
  position: sticky; left: 82px; z-index: 2;
  min-width: 52px;
}
table.inmet-tbl thead tr th:nth-child(1) {
  position: sticky; left: 0; z-index: 3;
}
table.inmet-tbl thead tr th:nth-child(2) {
  position: sticky; left: 82px; z-index: 3;
}
table.inmet-tbl tfoot tr td:nth-child(1) {
  position: sticky; left: 0; z-index: 2;
}
table.inmet-tbl tfoot tr td:nth-child(2) {
  position: sticky; left: 82px; z-index: 2;
}
table.inmet-tbl tbody tr:nth-child(odd)  td { background: var(--card); }
table.inmet-tbl tbody tr:nth-child(even) td { background: var(--card2); }
table.inmet-tbl tbody tr:nth-child(odd)  td:nth-child(1),
table.inmet-tbl tbody tr:nth-child(odd)  td:nth-child(2) { background: var(--bg3); }
table.inmet-tbl tbody tr:nth-child(even) td:nth-child(1),
table.inmet-tbl tbody tr:nth-child(even) td:nth-child(2) { background: #0d1e38; }
table.inmet-tbl tbody tr:hover td { background: rgba(26,127,212,.1) !important; }

td.t-hot  { color: var(--red-h)    !important; font-weight: 700; }
td.t-cold { color: var(--cyan-h)   !important; }
td.t-rain { color: var(--cyan)     !important; font-weight: 700; }
td.t-wind { color: var(--yellow-h) !important; font-weight: 700; }
td.t-null { color: var(--muted2)   !important; }

table.inmet-tbl tfoot tr td {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  padding: .38rem .5rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
}
table.inmet-tbl tfoot tr td:nth-child(1),
table.inmet-tbl tfoot tr td:nth-child(2) {
  font-family: inherit;
  text-align: left;
  padding-left: .75rem;
  background: var(--bg3);
  color: var(--muted);
}

.inmet-table-legend {
  padding: .5rem 1rem;
  border-top: 1px solid var(--border2);
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: .65rem;
  color: var(--muted);
  background: var(--bg3);
}
.inmet-table-legend strong { color: var(--text2); }

/* ═══════════════════════════════════════════════════════════
   HISTÓRICO — charts
   ═══════════════════════════════════════════════════════════ */
.hist-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin: .875rem 0;
}
@media (min-width: 700px) { .hist-charts { grid-template-columns: 1fr 1fr; } }

/* ═══════════════════════════════════════════════════════════
   SEÇÃO HEADER (título + botão)
   ═══════════════════════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.section-header h2 { font-size: var(--fs-lg); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 1.1rem 0;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-top: 2rem;
}
.site-footer a { color: var(--accent-h); }
.site-footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   UTILITÁRIOS
   ═══════════════════════════════════════════════════════════ */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.text-red    { color: var(--red-h); }
.text-blue   { color: var(--cyan-h); }
.text-green  { color: var(--green-h); }
.text-orange { color: var(--orange-h); }
.text-muted  { color: var(--muted); }
.fw-700 { font-weight: 700; }
.mono   { font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════ */
@media print {
  .site-header, .report-controls, .sparks-grid { display: none !important; }
  body { background: #fff; color: #000; font-size: 11px; }
  .card, .chart-card, .inmet-table-section { background: #fff; border-color: #ccc; }
  table.inmet-tbl thead tr.th-group th { background: #1a7fd4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVO MOBILE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 399px) {
  .header-time { display: none; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); gap: .6rem 1rem; }
  .hero-item .val { font-size: 1.1rem; }
  .cards-grid { gap: .5rem; }
  .card { padding: .75rem .875rem; }
  .card-value { font-size: 1.35rem; }
}
@media (max-width: 640px) {
  .btn-hide-mobile { display: none; }
}
