/* =========================================================
   WAVE PRO SaaS — Design System
   Sistema completo, multi-tenant, responsivo
   ========================================================= */

:root {
  /* Cores principais */
  --azul-profundo: #042C53;
  --azul-mar: #185FA5;
  --azul-claro: #378ADD;
  --azul-ceu: #85B7EB;
  --azul-espuma: #E6F1FB;
  --areia: #F1EFE8;
  --sol: #FAC775;
  --coral: #D85A30;
  --verde: #1D9E75;
  --vermelho: #E24B4A;

  --branco: #FFFFFF;
  --texto: #1F2937;
  --texto-suave: #6B7280;
  --texto-claro: #9CA3AF;
  --bg: #F9FAFB;
  --surface: #FFFFFF;
  --border: #E5E7EB;
  --border-hover: #D1D5DB;

  /* Tipografia */
  --fonte: 'Inter', -apple-system, sans-serif;
  --fonte-titulo: 'Poppins', var(--fonte);

  /* Layout */
  --sidebar-w: 260px;
  --header-h: 64px;
  --raio-sm: 6px;
  --raio-md: 10px;
  --raio-lg: 14px;
  --transicao: 0.2s ease;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);

  /* Surf condition colors */
  --cond-otima: #1D9E75;
  --cond-boa: #639922;
  --cond-regular: #FAC775;
  --cond-ruim: #D85A30;
  --cond-pessima: #E24B4A;
}

/* ===== RESET ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--fonte);
  font-size: 14px;
  line-height: 1.6;
  color: var(--texto);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
h1, h2, h3, h4, h5 { font-family: var(--fonte-titulo); font-weight: 600; line-height: 1.3; color: var(--azul-profundo); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

/* ===== LAYOUT GERAL DO APP ===== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: var(--azul-profundo);
  color: var(--branco);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1rem;
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--azul-mar);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo-name { font-family: var(--fonte-titulo); font-weight: 700; font-size: 1rem; color: var(--branco); }
.sidebar-logo-sub { font-size: 0.7rem; color: var(--azul-ceu); }

.sidebar-section { padding: 0.5rem 1rem; font-size: 0.7rem; color: var(--azul-ceu); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-top: 0.5rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 0.75rem; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--raio-md);
  color: var(--azul-ceu);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transicao);
}
.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: var(--branco); }
.sidebar nav a.active { background: var(--azul-mar); color: var(--branco); }
.sidebar nav a svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem;
  color: var(--azul-ceu);
}

/* ===== HEADER (TOPBAR) ===== */
.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-title { font-family: var(--fonte-titulo); font-weight: 600; color: var(--azul-profundo); font-size: 1rem; }
.topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.topbar-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--texto-suave);
  position: relative;
  transition: var(--transicao);
}
.topbar-btn:hover { background: var(--bg); color: var(--texto); }
.topbar-btn .badge {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--coral); border-radius: 50%;
  border: 2px solid var(--surface);
}

/* User dropdown */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: 30px;
  transition: var(--transicao);
}
.user-btn:hover { background: var(--bg); }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--azul-mar); color: var(--branco);
  font-weight: 600; font-size: 0.85rem;
  flex-shrink: 0;
}
.user-info { text-align: left; }
.user-name { font-weight: 600; font-size: 0.85rem; line-height: 1.2; }
.user-role { font-size: 0.7rem; color: var(--texto-suave); line-height: 1.2; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--raio-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 0.5rem;
  z-index: 100;
  display: none;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--raio-sm);
  font-size: 0.85rem;
  color: var(--texto);
  transition: var(--transicao);
}
.user-dropdown a:hover { background: var(--bg); }
.user-dropdown hr { border: 0; border-top: 1px solid var(--border); margin: 0.4rem 0; }

/* ===== CONTAINER PRINCIPAL ===== */
.main { padding: 1.5rem; }
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-title h1 { margin-bottom: 0.25rem; }
.page-title p { color: var(--texto-suave); font-size: 0.9rem; }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--raio-lg);
  padding: 1.25rem;
}
.card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--azul-profundo);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-1-2 { grid-template-columns: 1fr 2fr; }

/* ===== STAT CARDS ===== */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--raio-lg);
  padding: 1.1rem;
}
.stat-label { font-size: 0.8rem; color: var(--texto-suave); margin-bottom: 0.4rem; font-weight: 500; }
.stat-value { font-family: var(--fonte-titulo); font-size: 1.6rem; font-weight: 700; color: var(--azul-profundo); }
.stat-trend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.75rem; font-weight: 500; margin-top: 0.4rem;
}
.stat-trend.up { color: var(--verde); }
.stat-trend.down { color: var(--vermelho); }
.stat-icon {
  width: 38px; height: 38px;
  border-radius: var(--raio-md);
  background: var(--azul-espuma);
  color: var(--azul-mar);
  display: flex; align-items: center; justify-content: center;
  float: right;
  margin-top: -2px;
}

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--raio-md);
  font-weight: 500;
  font-size: 0.85rem;
  transition: var(--transicao);
  white-space: nowrap;
}
.btn-primary { background: var(--azul-mar); color: var(--branco); }
.btn-primary:hover { background: var(--azul-profundo); }
.btn-outline { border: 1px solid var(--border); color: var(--texto); background: var(--surface); }
.btn-outline:hover { border-color: var(--azul-mar); color: var(--azul-mar); }
.btn-danger { background: var(--vermelho); color: var(--branco); }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: var(--verde); color: var(--branco); }
.btn-ghost { color: var(--texto-suave); }
.btn-ghost:hover { background: var(--bg); color: var(--texto); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* ===== BADGES ===== */
.badge-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.badge-ativo { background: #DCFCE7; color: #166534; }
.badge-ativo::before { background: var(--verde); }
.badge-inativo { background: #FEE2E2; color: #991B1B; }
.badge-inativo::before { background: var(--vermelho); }
.badge-pendente { background: #FEF3C7; color: #92400E; }
.badge-pendente::before { background: var(--sol); }
.badge-iniciante { background: #DBEAFE; color: #1E40AF; }
.badge-intermediario { background: #FEF3C7; color: #92400E; }
.badge-avancado { background: #FCE7F3; color: #9D174D; }

/* ===== TABELA ===== */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}
.table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background: var(--bg); }
.table-clickable tr { cursor: pointer; }
.cell-user { display: flex; align-items: center; gap: 0.65rem; }
.cell-actions { display: flex; gap: 4px; justify-content: flex-end; }
.cell-actions .btn { padding: 6px 10px; font-size: 0.78rem; }

/* ===== INPUTS ===== */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; color: var(--texto-suave); margin-bottom: 0.35rem; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--raio-md);
  background: var(--surface);
  transition: var(--transicao);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--azul-mar);
  box-shadow: 0 0 0 3px rgba(24,95,165,0.12);
}
.field textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--raio-lg);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--surface);
}
.modal-body { padding: 1.25rem; }
.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--texto-suave);
  font-size: 1.2rem;
}
.modal-close:hover { background: var(--bg); color: var(--texto); }

/* ===== ABAS ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
}
.tab {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--texto-suave);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: var(--transicao);
}
.tab:hover { color: var(--texto); }
.tab.active { color: var(--azul-mar); border-bottom-color: var(--azul-mar); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== ALERT ===== */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--raio-md);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.alert-info { background: var(--azul-espuma); color: var(--azul-profundo); }
.alert-warning { background: #FEF3C7; color: #92400E; }
.alert-success { background: #DCFCE7; color: #166534; }
.alert-danger { background: #FEE2E2; color: #991B1B; }

/* ===== FRIENDLY DIALOGS ===== */
.app-dialog-backdrop {
  z-index: 1200;
}
.app-dialog {
  max-width: 420px;
  text-align: center;
}
.app-dialog .modal-body {
  padding: 1.6rem 1.5rem 1rem;
}
.app-dialog .modal-footer {
  justify-content: center;
  border-top: 0;
  padding-top: 0.25rem;
  padding-bottom: 1.35rem;
}
.app-dialog-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 0 auto 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  background: var(--azul-espuma);
  color: var(--azul-profundo);
}
.app-dialog h3 {
  margin-bottom: 0.45rem;
}
.app-dialog p {
  margin: 0;
  color: var(--texto-suave);
  line-height: 1.55;
  font-size: 0.92rem;
}
.app-dialog-success .app-dialog-icon { background: #DCFCE7; color: #166534; }
.app-dialog-danger .app-dialog-icon { background: #FEE2E2; color: #991B1B; }
.app-dialog-warning .app-dialog-icon { background: #FEF3C7; color: #92400E; }
.app-dialog-confirm .app-dialog-icon { background: var(--azul-espuma); color: var(--azul-profundo); }

/* ===== ONBOARDING TOUR ===== */
.tour-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.35);
  z-index: 300;
  display: none;
  pointer-events: auto;
}
.tour-overlay.open { display: block; }
.tour-spotlight {
  position: absolute;
  border-radius: var(--raio-md);
  box-shadow: 0 0 0 9999px rgba(15,23,42,0.55);
  pointer-events: none;
  transition: all 0.3s ease;
}
.tour-popup {
  position: absolute;
  background: var(--surface);
  border-radius: var(--raio-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  width: 320px;
  z-index: 310;
}
.tour-popup h4 { color: var(--azul-profundo); margin-bottom: 0.4rem; font-size: 1rem; }
.tour-popup p { font-size: 0.85rem; color: var(--texto-suave); margin-bottom: 1rem; }
.tour-popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tour-step { font-size: 0.75rem; color: var(--texto-suave); }
.tour-actions { display: flex; gap: 6px; }

/* ===== AGENDAR AULA — CALENDÁRIO ===== */
.calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--raio-lg);
  padding: 1.25rem;
}
.calendar-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.calendar-title { font-weight: 600; color: var(--azul-profundo); font-size: 1rem; }
.calendar-nav { display: flex; gap: 4px; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-dow {
  font-size: 0.7rem; color: var(--texto-suave);
  text-align: center; padding: 0.5rem 0;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.calendar-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--raio-sm);
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  transition: var(--transicao);
}
.calendar-day:hover { background: var(--bg); }
.calendar-day.outside { color: var(--texto-claro); }
.calendar-day.today { font-weight: 700; color: var(--azul-mar); }
.calendar-day.selected { background: var(--azul-mar); color: var(--branco); }
.calendar-day.disabled { color: var(--texto-claro); cursor: not-allowed; opacity: 0.5; }
.calendar-day .surf-dot {
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
}

/* ===== PREVISÃO OCEÂNICA — Componentes ===== */
.surf-card {
  background: linear-gradient(135deg, var(--azul-profundo), var(--azul-mar));
  color: var(--branco);
  border-radius: var(--raio-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}
.surf-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.surf-card-loc { font-size: 0.85rem; opacity: 0.85; }
.surf-card-date { font-size: 0.75rem; opacity: 0.7; }
.surf-rating {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  font-size: 0.8rem; font-weight: 600;
}
.surf-rating-bar {
  display: flex; gap: 3px;
}
.surf-rating-bar span {
  width: 8px; height: 14px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
}
.surf-rating-bar span.on { background: var(--cond-otima); }

.surf-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 0.75rem; }
.surf-metric { text-align: center; }
.surf-metric-label { font-size: 0.7rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.35rem; }
.surf-metric-value { font-family: var(--fonte-titulo); font-size: 1.4rem; font-weight: 700; }
.surf-metric-unit { font-size: 0.65rem; opacity: 0.6; }

.surf-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.tide-graph {
  margin-top: 1rem;
  background: rgba(255,255,255,0.08);
  border-radius: var(--raio-md);
  padding: 0.75rem;
}
.tide-graph-title { font-size: 0.75rem; opacity: 0.85; margin-bottom: 0.5rem; }
.tide-graph svg { width: 100%; height: 80px; }

/* Hourly forecast */
.hourly {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  overflow: visible;
}
.hourly-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--raio-md);
  padding: 0.65rem 0.75rem;
  min-width: 0;
  text-align: center;
  cursor: pointer;
  transition: var(--transicao);
}
.hourly-item:hover { border-color: var(--azul-mar); }
.hourly-item.active { border-color: var(--azul-mar); background: var(--azul-espuma); }
.hourly-time { font-size: 0.75rem; color: var(--texto-suave); font-weight: 600; }
.hourly-cond {
  width: 30px; height: 4px;
  border-radius: 2px;
  margin: 6px auto;
}
.hourly-wave { font-weight: 600; font-size: 0.85rem; }
.hourly-period { font-size: 0.7rem; color: var(--texto-suave); }

.forecast-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  align-items: end;
}
.forecast-toolbar .field { margin-bottom: 0; }
.forecast-modern {
  display: grid;
  gap: 1rem;
}
.forecast-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 1rem;
  align-items: stretch;
  padding: 1.15rem;
  border-radius: var(--raio-lg);
  color: var(--branco);
  background:
    radial-gradient(circle at 10% 0%, rgba(250,199,117,0.28), transparent 34%),
    linear-gradient(135deg, var(--azul-profundo), var(--azul-mar));
  overflow: hidden;
}
.forecast-eyebrow {
  display: inline-flex;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
}
.forecast-hero h2 {
  margin: 0 0 0.35rem;
  color: var(--branco);
  font-size: 1.6rem;
}
.forecast-hero p {
  margin: 0 0 0.65rem;
  color: rgba(255,255,255,0.84);
  font-size: 0.86rem;
  line-height: 1.5;
}
.forecast-plan-note {
  display: inline-flex;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 700;
}
.forecast-hero-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}
.forecast-hero-kpis div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--raio-md);
  background: rgba(255,255,255,0.12);
}
.forecast-hero-kpis small,
.forecast-hero-kpis span {
  display: block;
  color: rgba(255,255,255,0.76);
  font-size: 0.72rem;
}
.forecast-hero-kpis strong {
  display: block;
  color: var(--branco);
  font-size: 1.25rem;
  margin: 0.18rem 0;
}
.forecast-chart-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--raio-lg);
  padding: 1rem;
}
.forecast-day-grid,
.forecast-chart-grid,
.forecast-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}
.forecast-day-card,
.forecast-chart-card,
.forecast-detail-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--raio-md);
  background: var(--surface);
  padding: 0.8rem;
}
.forecast-day-head,
.forecast-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.forecast-day-head span {
  font-size: 0.74rem;
  font-weight: 700;
}
.forecast-day-metrics,
.forecast-detail-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.forecast-detail-data {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.forecast-day-metrics div,
.forecast-detail-data div {
  padding: 0.48rem;
  border-radius: var(--raio-sm);
  background: var(--bg);
}
.forecast-day-metrics small,
.forecast-detail-data small {
  display: block;
  color: var(--texto-suave);
  font-size: 0.68rem;
}
.forecast-day-metrics strong,
.forecast-detail-data strong {
  display: block;
  color: var(--azul-profundo);
  font-size: 0.88rem;
}
.forecast-day-foot {
  margin-top: 0.55rem;
  color: var(--texto-suave);
  font-size: 0.75rem;
}
.forecast-bars {
  height: 96px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding-top: 0.5rem;
  margin-bottom: 0.55rem;
  border-radius: var(--raio-sm);
  background: linear-gradient(180deg, var(--azul-espuma), rgba(229,244,251,0.25));
}
.forecast-bars span {
  display: block;
  width: 34px;
  min-height: 12px;
  border-radius: 8px 8px 3px 3px;
}
.forecast-bars .wave { background: linear-gradient(180deg, var(--azul-mar), var(--azul-profundo)); }
.forecast-bars .wind { background: linear-gradient(180deg, var(--sol), var(--coral)); }
.forecast-chart-card {
  text-align: center;
}
.forecast-chart-date {
  color: var(--texto-suave);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.forecast-chart-card strong {
  display: block;
  color: var(--azul-profundo);
}
.forecast-chart-card small {
  color: var(--texto-suave);
}
.forecast-tide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.forecast-tide-tags span,
.forecast-detail-top span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  color: var(--branco);
  background: var(--azul-mar);
  font-size: 0.7rem;
  font-weight: 700;
}
.forecast-hour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
}
.forecast-hour-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--raio-md);
  padding: 0.65rem;
  background: var(--surface);
  cursor: pointer;
  transition: var(--transicao);
}
.forecast-hour-card:hover,
.forecast-hour-card.active {
  border-color: var(--azul-mar);
  box-shadow: 0 0 0 3px rgba(24,95,165,0.08);
}
.forecast-hour-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.forecast-hour-top span {
  border-radius: 999px;
  color: var(--branco);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.4rem;
}
.forecast-hour-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}
.forecast-hour-data div {
  padding: 0.35rem;
  border-radius: var(--raio-sm);
  background: var(--bg);
}
.forecast-hour-data small {
  display: block;
  color: var(--texto-suave);
  font-size: 0.66rem;
}
.forecast-hour-data strong {
  color: var(--azul-profundo);
  font-size: 0.82rem;
}

/* ===== SLOTS DE HORÁRIO ===== */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.slot {
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--raio-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transicao);
  background: var(--surface);
}
.slot:hover { border-color: var(--azul-mar); }
.slot.selected { border-color: var(--azul-mar); background: var(--azul-mar); color: var(--branco); }
.slot.taken { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.slot-time { font-weight: 600; font-size: 0.9rem; }
.slot-vagas { font-size: 0.7rem; color: var(--texto-suave); }
.slot.selected .slot-vagas { color: rgba(255,255,255,0.85); }

/* ===== PATROCÍNIO BANNER ===== */
.sponsors-area {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--raio-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.sponsors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.sponsor {
  background: linear-gradient(135deg, var(--azul-espuma), var(--areia));
  border-radius: var(--raio-md);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: var(--transicao);
  min-height: 110px;
  display: flex; flex-direction: column; justify-content: center;
}
.sponsor:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sponsor-tag {
  position: absolute; top: 6px; right: 6px;
  font-size: 0.6rem; background: rgba(0,0,0,0.6); color: var(--branco);
  padding: 2px 6px; border-radius: 10px;
}
.sponsor-title { font-weight: 700; color: var(--azul-profundo); margin-bottom: 0.25rem; font-size: 1rem; }
.sponsor-desc { font-size: 0.78rem; color: var(--texto-suave); }

/* ===== MOBILE RESPONSIVO ===== */
.mobile-toggle { display: none; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .surf-metrics { grid-template-columns: repeat(2, 1fr); }
  .sponsors-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 280px;
    z-index: 150;
    transition: left 0.3s ease;
  }
  .sidebar.open { left: 0; }
  .mobile-toggle { display: flex; }
  .grid-4, .grid-3, .grid-2, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .surf-metrics { grid-template-columns: repeat(2, 1fr); }
  .sponsors-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .forecast-toolbar,
  .forecast-hero {
    grid-template-columns: 1fr;
  }
  .forecast-hero h2 {
    font-size: 1.35rem;
  }
  .forecast-hero-kpis,
  .forecast-day-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar { padding: 0 1rem; }
  .main { padding: 1rem; }
  .user-info { display: none; }
  h1 { font-size: 1.4rem; }
  .table th, .table td { padding: 0.6rem 0.5rem; font-size: 0.8rem; }
}
@media (max-width: 500px) {
  .topbar-title { display: none; }
}

/* Backdrop pra sidebar mobile */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 140;
}
.sidebar-backdrop.open { display: block; }

/* ===== UTILS ===== */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 0.5rem; }
.text-suave { color: var(--texto-suave); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.72rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.center { text-align: center; }

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: var(--vermelho) !important;
  box-shadow: 0 0 0 3px rgba(226, 75, 74, 0.12);
}
