/* ==========================================================================
   DsySA — Design System SurfAgent v1.1
   Baseado na arquitetura visual de mira-growth.aura.build + Matriz de Ondas/Período
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Geist:wght@300;400;500;600;700&family=DM+Sans:wght@300;400;500;600;700&family=Oswald:wght@300;400;500;600;700&display=swap');

:root {
  /* Backgrounds & Surfaces */
  --dsysa-bg-canvas: #000000;
  --dsysa-bg-midnight: #02010A;
  --dsysa-bg-telemetry: #05080F;
  --dsysa-bg-glass-dark: #0A0A10;
  --dsysa-bg-slate-950: #020617;
  --dsysa-bg-slate-900: #0F172A;
  --dsysa-bg-slate-800: #1E293B;

  /* Brand & Ocean Accent Colors */
  --dsysa-sky-300: #7DD3FC;
  --dsysa-sky-400: #38BDF8;
  --dsysa-sky-500: #0EA5E9;
  --dsysa-blue-400: #60A5FA;
  --dsysa-blue-500: #3B82F6;
  --dsysa-cyan-400: #22D3EE;
  --dsysa-indigo-400: #818CF8;
  --dsysa-indigo-500: #6366F1;
  --dsysa-purple-500: #A855F7;

  /* Surf Condition Semantic Colors */
  --dsysa-emerald-400: #34D399;
  --dsysa-emerald-500: #10B981;
  --dsysa-amber-300: #FCD34D;
  --dsysa-amber-500: #F59E0B;
  --dsysa-rose-400: #FB7185;
  --dsysa-rose-500: #F43F5E;

  /* Escala Cromática DsySA de Período Primário em Segundos (2s a 21+s) */
  --dsysa-period-2: #3B5998;
  --dsysa-period-3: #4361EE;
  --dsysa-period-4: #0284C7;
  --dsysa-period-5: #0EA5E9;
  --dsysa-period-6: #00B4D8;
  --dsysa-period-7: #06B6D4;
  --dsysa-period-8: #22D3EE;
  --dsysa-period-9: #14B8A6;
  --dsysa-period-10: #10B981;
  --dsysa-period-11: #22C55E;
  --dsysa-period-12: #84CC16;
  --dsysa-period-13: #A3E635;
  --dsysa-period-14: #EAB308;
  --dsysa-period-15: #F59E0B;
  --dsysa-period-16: #F97316;
  --dsysa-period-17: #EA580C;
  --dsysa-period-18: #EF4444;
  --dsysa-period-19: #BE123C;
  --dsysa-period-20: #A21CAF;
  --dsysa-period-21: #D946EF;

  /* Text Hierarchy */
  --dsysa-text-primary: #F8FAFC;
  --dsysa-text-secondary: #CBD5E1;
  --dsysa-text-muted: #94A3B8;
  --dsysa-text-dim: #64748B;

  /* Borders & Gradients */
  --dsysa-border-hairline: rgba(255, 255, 255, 0.05);
  --dsysa-border-subtle: rgba(255, 255, 255, 0.10);
  --dsysa-border-strong: rgba(255, 255, 255, 0.20);
  --dsysa-border-gradient-blue: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0));
  --dsysa-border-gradient-indigo: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0));
  --dsysa-border-gradient-emerald: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(56, 189, 248, 0.05));

  /* Typography */
  --dsysa-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dsysa-font-serif: 'Playfair Display', ui-serif, Georgia, 'Times New Roman', serif;
  --dsysa-font-geist: 'Geist', 'Inter', sans-serif;
  --dsysa-font-oswald: 'Oswald', sans-serif;
  --dsysa-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Shadows */
  --dsysa-shadow-console: 0 24px 80px rgba(0, 0, 0, 0.8);
  --dsysa-shadow-glass: 0 18px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --dsysa-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --dsysa-shadow-sky-cta: 0 14px 40px rgba(56, 189, 248, 0.45);
}

/* Font Helper Classes (from Mira) */
.font-inter { font-family: var(--dsysa-font-sans) !important; }
.font-playfair { font-family: var(--dsysa-font-serif) !important; }
.font-geist { font-family: var(--dsysa-font-geist) !important; }
.font-dm-sans { font-family: 'DM Sans', sans-serif !important; }
.font-oswald { font-family: var(--dsysa-font-oswald) !important; }

/* ==========================================================================
   1. SIGNATURE MASK BORDER GRADIENT ([style*="--border-gradient"]::before)
   ========================================================================== */
[style*="--border-gradient"]::before,
.dsysa-border-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: var(--border-radius-before, inherit);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: var(--border-gradient, var(--dsysa-border-gradient-blue));
  pointer-events: none;
  z-index: 1;
}

/* Alpha Vertical & Horizontal Masks */
.dsysa-mask-fade-b {
  -webkit-mask-image: linear-gradient(180deg, transparent, black 0%, black 85%, transparent);
  mask-image: linear-gradient(180deg, transparent, black 0%, black 85%, transparent);
}
.dsysa-mask-marquee {
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.dsysa-dot-matrix {
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 0);
  background-size: 16px 16px;
}

/* ==========================================================================
   2. TRANSIÇÕES E ANIMAÇÕES CLEAN (Sem efeito cascata ou flashes da v1)
   ========================================================================== */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   3. LASER-EDGE GLOW BUTTON (Signature Hero CTA / Voice Trigger)
   ========================================================================== */
.dsysa-btn-laser {
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-family: var(--dsysa-font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  border: none;
  transition: all 0.3s ease;
}
.dsysa-btn-laser:hover { background: rgba(0, 0, 0, 0.8); }
.dsysa-btn-laser .laser-edge-v {
  pointer-events: none;
  position: absolute;
  top: -28px;
  bottom: -28px;
  width: 2px;
  background: linear-gradient(transparent, rgba(255,255,255,0.2) 28px, rgba(255,255,255,0.75) 28px, #ffffff, rgba(255,255,255,0.75) calc(100% - 28px), rgba(255,255,255,0.2) calc(100% - 28px), transparent);
}
.dsysa-btn-laser .laser-edge-v.left { left: -2px; }
.dsysa-btn-laser .laser-edge-v.right { right: -2px; }
.dsysa-btn-laser .laser-edge-h {
  pointer-events: none;
  position: absolute;
  left: -28px;
  right: -28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2) 28px, rgba(255,255,255,0.75) 28px, #ffffff, rgba(255,255,255,0.75) calc(100% - 28px), rgba(255,255,255,0.2) calc(100% - 28px), transparent);
}
.dsysa-btn-laser .laser-edge-h.top { top: -2px; }
.dsysa-btn-laser .laser-edge-h.bottom { bottom: -2px; }
.dsysa-btn-laser .laser-blur-base {
  position: absolute;
  inset: 0;
  filter: blur(4px);
  opacity: 0.8;
  background: inherit;
}
.dsysa-btn-laser .laser-blur-hover {
  position: absolute;
  inset: 0;
  filter: blur(10px);
  opacity: 0;
  background: inherit;
  transition: opacity 0.3s ease;
}
.dsysa-btn-laser .laser-radial-glow {
  pointer-events: none;
  position: absolute;
  inset: -20px;
  opacity: 0;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28), transparent 60%);
  filter: blur(18px);
  transition: opacity 0.3s ease;
}
.dsysa-btn-laser:hover .laser-blur-hover,
.dsysa-btn-laser:hover .laser-radial-glow { opacity: 1; }
.dsysa-btn-laser.listening .laser-radial-glow {
  opacity: 1;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.45), transparent 65%);
}

/* ==========================================================================
   4. SURFAGENT TABS & TELEMETRY SURFACES
   ========================================================================== */
.dsysa-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--dsysa-text-muted);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--dsysa-border-subtle);
  border-radius: 9999px;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.dsysa-tab:hover {
  color: var(--dsysa-text-primary);
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--dsysa-border-strong);
}
.dsysa-tab.active {
  color: #020617;
  background: linear-gradient(90deg, #38bdf8, #3b82f6);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.35);
}
.dsysa-tab.best-spot {
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
}
.dsysa-tab.best-spot.active {
  color: #022c22;
  background: linear-gradient(90deg, #34d399, #10b981);
  border-color: transparent;
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.45);
}

/* 4.1 DsySA Simplified Equal-Height Telemetry Cards (2x2 Grid Before Wave Chart) */
.dsysa-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .dsysa-telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.dsysa-telemetry-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 84px;
  height: auto; /* Hug content: ajusta-se naturalmente ao conteúdo sem quebrar */
  max-height: none;
  padding: 12px 14px;
  background: #05080F;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
  overflow: visible;
  gap: 6px;
}
.dsysa-telemetry-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  line-height: 1;
}
.dsysa-telemetry-card-cat {
  font-family: var(--dsysa-font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dsysa-telemetry-card-badge {
  font-family: var(--dsysa-font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  white-space: nowrap;
  flex-shrink: 0;
}
.dsysa-telemetry-card-value {
  font-family: var(--dsysa-font-geist);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f8fafc;
  line-height: 1.25;
  word-break: break-word;
}
.dsysa-telemetry-card-sub {
  font-family: var(--dsysa-font-sans);
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  line-height: 1.3;
  word-break: break-word;
}

/* ==========================================================================
   5. DSYSA WAVE HEIGHT, PERIOD & PRIMARY DIRECTION CHART
   (Reconstruído em DsySA a partir do modelo Altura e Período das Ondas)
   ========================================================================== */
.dsysa-wave-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.96) 0%, rgba(2, 1, 10, 0.98) 100%);
  border: 1px solid var(--dsysa-border-subtle);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--dsysa-shadow-glass);
  font-family: var(--dsysa-font-sans);
}

/* Top Banner: "ALTURA E PERÍODO DAS ONDAS" */
.dsysa-wave-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 138, 0.35) 50%, rgba(15, 23, 42, 0.95) 100%);
  border-bottom: 1px solid var(--dsysa-border-subtle);
}
.dsysa-wave-topbar-title {
  font-family: var(--dsysa-font-oswald);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 4 Sub-Mode Tabs: Altura total | Vagas | Swell A | Swell B */
.dsysa-wave-subtabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.6);
  overflow-x: auto;
}
.dsysa-wave-subtab {
  padding: 7px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #94a3b8;
  background: rgba(15, 118, 110, 0.18);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.dsysa-wave-subtab:hover {
  color: #f8fafc;
  background: rgba(20, 184, 166, 0.28);
}
.dsysa-wave-subtab.active {
  color: #020617;
  background: #f8fafc;
  border-color: #f8fafc;
  box-shadow: 0 -4px 16px rgba(56, 189, 248, 0.25);
}

/* Matrix Layout: Left Y-Axis | Central Columns | Right Y-Axis */
.dsysa-wave-matrix-wrap {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  align-items: stretch;
  background: #05080F;
  position: relative;
}

/* Left & Right Y-Axis (metros) + "direção primária" label */
.dsysa-wave-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(2, 6, 23, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  z-index: 5;
}
.dsysa-wave-yaxis.right {
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.dsysa-wave-yaxis-spacer {
  height: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.dsysa-wave-yaxis-ticks {
  height: 210px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 4px 24px;
  text-align: center;
  font-size: 10px;
  line-height: 1.05;
  color: #94a3b8;
  font-weight: 500;
}
.dsysa-wave-yaxis-ticks .unit-label {
  font-size: 9px;
  color: #64748b;
  display: block;
}
.dsysa-wave-dir-box {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.15;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
}

/* Central Viewport with Horizontal Infinite Scroll (Mouse + Touch Finger Drag), Day Headers, Day/Night Bands, Dashed Lines, Wave Bars, and Direction Arrows */
.dsysa-wave-viewport,
.dsysa-touch-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  cursor: grab;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.55) rgba(15, 23, 42, 0.9);
}
.dsysa-wave-viewport.dragging,
.dsysa-touch-scroll.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.dsysa-wave-viewport::-webkit-scrollbar {
  height: 7px;
}
.dsysa-wave-viewport::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.dsysa-wave-viewport::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.5), rgba(59, 130, 246, 0.85));
  border-radius: 9999px;
}
.dsysa-wave-viewport::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #38bdf8, #3b82f6);
}

.dsysa-wave-canvas-grid {
  position: relative;
  width: max-content;
  min-width: 100%;
}

/* Day Headers Row: Ontem | TER 17 | QUA 18 | QUI 19 | SEX 20 */
.dsysa-wave-days-row {
  display: grid;
  height: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.dsysa-wave-day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.65);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.dsysa-wave-day-cell.is-past {
  background: linear-gradient(90deg, #072238, #0c4a6e);
  color: #f8fafc;
}
.dsysa-wave-day-cell.is-today {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.28), rgba(59, 130, 246, 0.22));
  color: #38bdf8;
}

/* Bars Plot Area (210px height, 3.5m max scale) */
.dsysa-wave-plot-area {
  position: relative;
  height: 210px;
  display: grid;
  align-items: end;
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.38) 0%, rgba(15, 118, 110, 0.22) 100%);
}

/* Horizontal Dashed Meter Lines (0.5m, 1.0m, 1.5m, 2.0m, 2.5m, 3.0m) */
.dsysa-wave-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
  pointer-events: none;
  z-index: 1;
}
.dsysa-wave-gridline.major {
  border-top-style: dashed;
  border-top-color: rgba(226, 232, 240, 0.35);
}

/* Individual Time Slot Column inside Plot Area */
.dsysa-wave-slot-col {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease;
  cursor: pointer;
}
.dsysa-wave-slot-col.daylight {
  background: rgba(56, 189, 248, 0.08);
}
.dsysa-wave-slot-col.twilight {
  background: rgba(15, 23, 42, 0.25);
}
.dsysa-wave-slot-col.night {
  background: rgba(2, 6, 23, 0.45);
}
.dsysa-wave-slot-col.day-divider {
  border-right: 1px solid rgba(2, 6, 23, 0.95);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.16);
}
.dsysa-wave-slot-col:hover {
  background: rgba(255, 255, 255, 0.12);
}
.dsysa-wave-slot-col.is-now::after {
  content: "AGORA";
  position: absolute;
  top: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: #10b981;
  color: #022c22;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  z-index: 4;
}

/* The Wave Bar itself (height = meters, background = primary period color) */
.dsysa-wave-bar {
  width: 86%;
  border-radius: 3px 3px 0 0;
  position: relative;
  z-index: 2;
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s ease, filter 0.2s ease;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.dsysa-wave-slot-col:hover .dsysa-wave-bar {
  filter: brightness(1.18);
}

/* Primary Direction Row (Circular Arrow Badges + Cardinal Text) */
.dsysa-wave-dirs-row {
  display: grid;
  height: 54px;
  background: rgba(2, 6, 23, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.dsysa-wave-dir-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 1px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.dsysa-wave-dir-cell.day-divider {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.dsysa-dir-circle {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid rgba(147, 197, 253, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.45);
  transition: transform 0.35s ease;
}
.dsysa-dir-cardinal {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #cbd5e1;
}

/* Period Color Legend Strip: 2s to 21+s */
.dsysa-period-legend-wrap {
  padding: 10px 14px 8px;
  background: rgba(2, 6, 23, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.dsysa-period-scale-bar {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 680px;
  margin: 0 auto;
}
.dsysa-period-cell {
  padding: 3px 0;
  font-size: 10px;
  font-weight: 700;
  color: #020617;
  text-align: center;
  user-select: none;
  transition: transform 0.15s ease;
}
.dsysa-period-cell.light-text {
  color: #f8fafc;
}
.dsysa-period-caption {
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #cbd5e1;
}

/* Bottom Infinite Scroll Status & Forecast Limit Alert Bar */
.dsysa-scroll-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #020617;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  gap: 10px;
  font-size: 11px;
  color: #94a3b8;
  transition: all 0.25s ease;
}
.dsysa-scroll-status-bar.at-end {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.95));
  border-top-color: rgba(251, 191, 36, 0.4);
}
.dsysa-end-forecast-msg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.2);
}
.dsysa-end-cap-col {
  width: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
  border-left: 1px dashed rgba(251, 191, 36, 0.45);
  color: #fde68a;
  z-index: 3;
}

/* ==========================================================================
   6. DSYSA SURFACE WIND FORECAST CHART ("VENTO DE SUPERFÍCIE MÉDIO")
   (Costeiro/Marítimo, Unidades KT/KmH/MS/MPH, Vento + Rajadas, Cores das Setas)
   ========================================================================== */
.dsysa-wind-zone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px 8px;
  background: rgba(2, 6, 23, 0.78);
}
.dsysa-wind-zone-group {
  display: inline-flex;
  align-items: stretch;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.9);
}
.dsysa-wind-zone-btn {
  padding: 8px 16px;
  font-family: var(--dsysa-font-oswald);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}
.dsysa-wind-zone-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}
.dsysa-wind-zone-btn.active {
  color: #020617;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px #020617;
}
.dsysa-wind-help-btn {
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.dsysa-wind-help-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}
.dsysa-wind-zone-note {
  font-size: 11px;
  font-weight: 600;
  color: #93c5fd;
  line-height: 1.35;
}

/* Subtabs row: Nós (KT) | Km/H | M/S | MPH  +  Vento / Rajadas Legend */
.dsysa-wind-subtabs-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.6);
}
.dsysa-wind-bars-legend {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
}
.dsysa-wind-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 5px;
}
.dsysa-wind-swatch.sustained {
  background: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.45);
}
.dsysa-wind-swatch.gust {
  background: #f97316;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.45);
}

/* Stacked Wind + Gust Bar inside Plot Area */
.dsysa-wind-bar-stack {
  width: 86%;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.18s ease;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
}
.dsysa-wave-slot-col:hover .dsysa-wind-bar-stack {
  filter: brightness(1.15);
}
.dsysa-wind-bar-gust-part {
  width: 100%;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.dsysa-wind-bar-sustained-part {
  width: 100%;
  background: linear-gradient(180deg, #fde047 0%, #eab308 100%);
}

/* Wind Direction Arrow Circles Colored by Surf Quality (fraco, terral, cruzado, maral) */
.dsysa-wind-dir-circle {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.35s ease;
}
.dsysa-wind-dir-circle.fraco {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  border: 1px solid rgba(199, 210, 254, 0.5);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}
.dsysa-wind-dir-circle.terral {
  background: linear-gradient(135deg, #22c55e, #15803d);
  border: 1px solid rgba(134, 239, 172, 0.5);
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.5);
}
.dsysa-wind-dir-circle.cruzado {
  background: linear-gradient(135deg, #fb923c, #ea580c);
  border: 1px solid rgba(253, 186, 116, 0.5);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.45);
}
.dsysa-wind-dir-circle.maral {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  border: 1px solid rgba(252, 165, 165, 0.5);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
}

/* Bottom Arrow Colors Legend: CORES DAS SETAS | fraco | terral | cruzado | maral */
.dsysa-wind-arrows-legend-wrap {
  padding: 10px 14px;
  background: rgba(2, 6, 23, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.dsysa-wind-arrows-title {
  font-family: var(--dsysa-font-oswald);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f8fafc;
  text-transform: uppercase;
}
.dsysa-wind-arrows-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 120px));
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.dsysa-wind-arrow-key {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  letter-spacing: 0.02em;
}
.dsysa-wind-arrow-key.fraco { background: #818cf8; }
.dsysa-wind-arrow-key.terral { background: #16a34a; }
.dsysa-wind-arrow-key.cruzado { background: #ea580c; }
.dsysa-wind-arrow-key.maral { background: #991b1b; }

/* ==========================================================================
   7. DSYSA WEATHER-REACTIVE AMBIENT BACKGROUND ENGINE
   (Ensolarado | Parcialmente Nublado | Chuvoso | Chuva com Raios)
   ========================================================================== */
@keyframes dsysa-sun-pulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes dsysa-cloud-drift {
  0% { transform: translateX(-6%); }
  50% { transform: translateX(6%); }
  100% { transform: translateX(-6%); }
}

@keyframes dsysa-rain-fall {
  0% { background-position: 0 0; }
  100% { background-position: -90px 420px; }
}

@keyframes dsysa-lightning-flash {
  0%, 84%, 88%, 92%, 100% { opacity: 0; }
  85% { opacity: 0.55; }
  86% { opacity: 0.12; }
  89% { opacity: 0.85; }
  90% { opacity: 0; }
}

@keyframes dsysa-bolt-strike {
  0%, 84%, 91%, 100% { opacity: 0; transform: scaleY(0.95); }
  85%, 89% { opacity: 1; transform: scaleY(1); }
  87% { opacity: 0.2; }
}

.dsysa-weather-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  transition: background 0.8s ease;
}

/* 7.1 ENSOLARADO (Sunny: Azulado Oceânico + Amarelo Sol Radiante) */
.dsysa-weather-stage.weather-sunny {
  background: linear-gradient(180deg, #031B38 0%, #073B6B 45%, #020813 100%);
}
.dsysa-weather-stage .dsysa-sun-orb {
  position: absolute;
  top: -70px;
  right: 8%;
  width: 440px;
  height: 440px;
  border-radius: 9999px;
  background: radial-gradient(
    circle,
    rgba(254, 240, 138, 0.95) 0%,
    rgba(250, 204, 21, 0.72) 22%,
    rgba(245, 158, 11, 0.28) 48%,
    rgba(56, 189, 248, 0) 72%
  );
  filter: blur(8px);
  opacity: 0;
  transition: all 0.8s ease;
}
.dsysa-weather-stage .dsysa-sun-core {
  position: absolute;
  top: 48px;
  right: calc(8% + 140px);
  width: 110px;
  height: 110px;
  border-radius: 9999px;
  background: radial-gradient(circle, #fef9c3 0%, #facc15 65%, #f59e0b 100%);
  box-shadow: 0 0 80px 30px rgba(250, 204, 21, 0.55), 0 0 160px 60px rgba(56, 189, 248, 0.35);
  opacity: 0;
  transition: all 0.8s ease;
}
.dsysa-weather-stage.weather-sunny .dsysa-sun-orb,
.dsysa-weather-stage.weather-sunny .dsysa-sun-core {
  opacity: 1;
  animation: dsysa-sun-pulse 6s ease-in-out infinite;
}

/* 7.2 PARCIALMENTE NUBLADO (Partly Cloudy: Azulado Suave + Sol Difuso + Nuvens Translúcidas) */
.dsysa-weather-stage.weather-partly_cloudy {
  background: linear-gradient(180deg, #0B2545 0%, #1E3A5F 48%, #0B1120 100%);
}
.dsysa-weather-stage.weather-partly_cloudy .dsysa-sun-orb {
  opacity: 0.62;
  top: -40px;
  right: 12%;
  filter: blur(18px);
}
.dsysa-weather-stage.weather-partly_cloudy .dsysa-sun-core {
  opacity: 0.75;
  top: 62px;
  right: calc(12% + 130px);
  width: 86px;
  height: 86px;
  filter: blur(2px);
}
.dsysa-weather-stage .dsysa-clouds-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.dsysa-weather-stage .dsysa-cloud-blob {
  position: absolute;
  border-radius: 9999px;
  background: radial-gradient(closest-side, rgba(203, 213, 225, 0.32), rgba(148, 163, 184, 0.12), transparent);
  filter: blur(16px);
}
.dsysa-weather-stage.weather-partly_cloudy .dsysa-clouds-layer {
  opacity: 1;
  animation: dsysa-cloud-drift 18s ease-in-out infinite;
}

/* 7.3 CHUVOSO (Rainy: Background Acinzentado + Véu de Chuva Diagonal) */
.dsysa-weather-stage.weather-rainy {
  background: linear-gradient(180deg, #273244 0%, #334155 45%, #111827 100%);
}
.dsysa-weather-stage.weather-rainy .dsysa-clouds-layer {
  opacity: 0.9;
  animation: dsysa-cloud-drift 22s ease-in-out infinite;
}
.dsysa-weather-stage .dsysa-rain-layer {
  position: absolute;
  inset: -40px;
  opacity: 0;
  background-image: repeating-linear-gradient(
    108deg,
    transparent 0px,
    transparent 18px,
    rgba(203, 213, 225, 0.22) 19px,
    transparent 20px,
    transparent 46px
  );
  background-size: 180px 420px;
  transition: opacity 0.6s ease;
}
.dsysa-weather-stage.weather-rainy .dsysa-rain-layer {
  opacity: 0.85;
  animation: dsysa-rain-fall 0.85s linear infinite;
}

/* 7.4 CHUVA COM RAIOS (Thunderstorm: Acinzentado Escuro + Efeito de Piscar de Raios) */
.dsysa-weather-stage.weather-thunderstorm {
  background: linear-gradient(180deg, #111827 0%, #1E293B 45%, #090D16 100%);
}
.dsysa-weather-stage.weather-thunderstorm .dsysa-clouds-layer {
  opacity: 1;
}
.dsysa-weather-stage.weather-thunderstorm .dsysa-rain-layer {
  opacity: 1;
  animation: dsysa-rain-fall 0.65s linear infinite;
}
.dsysa-weather-stage .dsysa-lightning-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 65% 18%, rgba(224, 242, 254, 0.85), rgba(148, 163, 184, 0.35) 55%, rgba(15, 23, 42, 0.1) 100%);
  mix-blend-mode: screen;
}
.dsysa-weather-stage .dsysa-lightning-svg {
  position: absolute;
  top: 0;
  right: 18%;
  width: 220px;
  height: 360px;
  opacity: 0;
  filter: drop-shadow(0 0 18px #7dd3fc) drop-shadow(0 0 35px #e0f2fe);
}
.dsysa-weather-stage.weather-thunderstorm .dsysa-lightning-overlay {
  animation: dsysa-lightning-flash 4.8s infinite;
}
.dsysa-weather-stage.weather-thunderstorm .dsysa-lightning-svg {
  animation: dsysa-bolt-strike 4.8s infinite;
}

/* ==========================================================================
   8. DSYSA WAVE ENERGY FORECAST CHART ("ENERGIA DAS ONDAS")
   (Energia total | Vagas | Swell A | Swell B + Escala kJ / Joules + Scroll Infinito)
   ========================================================================== */
.dsysa-energy-bar {
  width: 86%;
  border-radius: 3px 3px 0 0;
  position: relative;
  z-index: 2;
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease, filter 0.2s ease;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.dsysa-wave-slot-col:hover .dsysa-energy-bar {
  filter: brightness(1.2);
}
.dsysa-energy-val-tag {
  font-size: 8.5px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
  opacity: 0.85;
  z-index: 3;
}
.dsysa-energy-scale-bar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 680px;
  margin: 0 auto;
}
.dsysa-energy-cell {
  padding: 4px 2px;
  font-size: 9.5px;
  font-weight: 700;
  text-align: center;
  color: #020617;
  user-select: none;
  transition: transform 0.15s ease;
  line-height: 1.15;
}
.dsysa-energy-cell.light-text {
  color: #f8fafc;
}
.dsysa-energy-cell span {
  display: block;
  font-size: 8px;
  font-weight: 600;
  opacity: 0.85;
}

/* ==========================================================================
   9. DSYSA TIDE TABLE & ASTRONOMY CHART ("ALTURA DA MARÉ")
   (Porto de Referência, Horas dos Astros, Curva Senoidal Bicolor, Badges de
    Preamar/Baixamar, Mini-Mapa Multi-Dias e Seletores GRÁFICOS | TABELAS | MÊS)
   ========================================================================== */
.dsysa-tide-harbor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 8px;
  background: rgba(2, 6, 23, 0.78);
}
.dsysa-tide-harbor-pin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--dsysa-font-oswald);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #38bdf8;
  text-transform: lowercase;
}
.dsysa-tide-matrix-wrap {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: stretch;
  background: #05080F;
  position: relative;
}
.dsysa-tide-yaxis {
  display: flex;
  flex-direction: column;
  background: rgba(2, 6, 23, 0.94);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  z-index: 5;
}
.dsysa-tide-astro-label {
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dsysa-tide-astro-label span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.15;
}
.dsysa-tide-meters-ticks {
  height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 6px 4px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
}
.dsysa-tide-day-col {
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  user-select: none;
}
.dsysa-tide-badge-high {
  background: #00e5ff;
  color: #020617;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
  white-space: nowrap;
}
.dsysa-tide-badge-low {
  background: #0284c7;
  color: #f8fafc;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.35);
  white-space: nowrap;
}
.dsysa-tide-now-callout {
  background: #be123c;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

/* Mini-Map Overview Strip (ONTEM | TER 17 | QUA 18 | QUI 19 | SEX 20 | SAB 21 | DOM 22 | SEG 23) */
.dsysa-tide-ministrip-wrap {
  margin: 10px 14px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
  background: #05080F;
}

/* Bottom View Mode Switcher: GRÁFICOS | TABELAS | MÊS */
.dsysa-tide-mode-bar {
  display: flex;
  justify-content: center;
  padding: 10px 14px 12px;
  background: rgba(2, 6, 23, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.dsysa-tide-mode-group {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}
.dsysa-tide-mode-btn {
  padding: 8px 20px;
  font-family: var(--dsysa-font-oswald);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
}
.dsysa-tide-mode-btn:last-child {
  border-right: none;
}
.dsysa-tide-mode-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}
.dsysa-tide-mode-btn.active {
  color: #020617;
  background: #f8fafc;
}

/* ==========================================================================
   10. DSYSA FUNCTIONAL BEACH COMPASS CARD & MODAL ("BÚSSOLA DA PRAIA")
   (Anel graduado 0°-350°, Rosa dos Ventos N/NE/E/SE/S/SW/W/NW, Agulha Bicolor
    Vermelha/Azul, Arco de Posicionamento da Praia e Modal Ampliado)
   ========================================================================== */
.dsysa-compass-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 18px;
  align-items: center;
  background: radial-gradient(circle at 22% 50%, rgba(56, 189, 248, 0.08), rgba(5, 8, 15, 0.96) 70%);
}
@media (min-width: 640px) {
  .dsysa-compass-body {
    grid-template-columns: 205px minmax(0, 1fr);
  }
}
.dsysa-compass-dial-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  user-select: none;
}
.dsysa-compass-svg {
  display: block;
  cursor: grab;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 18px rgba(56, 189, 248, 0.14));
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.dsysa-compass-svg:active {
  cursor: grabbing;
}
.dsysa-compass-rotor {
  transform-origin: 150px 150px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.dsysa-compass-rotor.dragging,
.dsysa-compass-rotor.live-tracking {
  transition: none !important;
}

/* Botão Interativo Bússola ao Vivo (Live Gyro/Compass) */
.dsysa-btn-live-compass {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #38bdf8;
  font-family: var(--dsysa-font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.dsysa-btn-live-compass:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.65);
  transform: translateY(-1px);
}
.dsysa-btn-live-compass.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.dsysa-compass-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #64748b;
  transition: background 0.2s ease;
}
.dsysa-btn-live-compass.active .dsysa-compass-live-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: dsysaPulseLive 1.6s infinite ease-in-out;
}
@keyframes dsysaPulseLive {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.65;
  }
}

.dsysa-compass-live-toast {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(2, 6, 23, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 9999px;
  color: #fde68a;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  animation: dsysaFadeInToast 0.25s ease-out;
}
@keyframes dsysaFadeInToast {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.dsysa-compass-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dsysa-compass-headline {
  font-family: var(--dsysa-font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f8fafc;
  line-height: 1.3;
}
.dsysa-compass-desc {
  font-family: var(--dsysa-font-sans);
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}
.dsysa-compass-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dsysa-compass-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 500;
  color: #e2e8f0;
}
.dsysa-btn-expand-compass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #38bdf8, #3b82f6);
  color: #020617;
  font-family: var(--dsysa-font-sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.38);
  transition: all 0.2s ease;
}
.dsysa-btn-expand-compass:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 14px 34px rgba(56, 189, 248, 0.52);
}

/* Modal da Bússola Ampliada */
.dsysa-compass-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.dsysa-compass-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.dsysa-compass-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #070B14 0%, #020617 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.88), 0 0 40px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.dsysa-compass-modal-backdrop.open .dsysa-compass-modal-dialog {
  transform: scale(1);
}
.dsysa-btn-close-modal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fda4af;
  font-family: var(--dsysa-font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dsysa-btn-close-modal:hover {
  background: rgba(244, 63, 94, 0.28);
  color: #ffffff;
}

/* ==========================================================================
   Card Hug Contents: SurfAgent Voice Assistant
   ========================================================================== */
.dsysa-voice-assistant-card {
  height: fit-content !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important; /* Nunca estica para preencher a coluna; mantém sempre o tamanho do conteúdo interno (HUG) */
  align-self: flex-start;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start !important;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   11. REGRAS DE RESPONSIVIDADE E OTIMIZAÇÃO MOBILE (iPhone 15, Android & Tablets)
   ========================================================================== */

/* Prevenção universal de overflow horizontal */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 640px) {
  /* Painéis de Gráficos: Topbar compacta e fluida */
  .dsysa-wave-topbar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .dsysa-wave-topbar-title {
    font-size: 0.84rem;
    letter-spacing: 0.03em;
    max-width: calc(100% - 34px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dsysa-wave-subtabs {
    padding: 8px 10px 0;
    gap: 3px;
  }
  .dsysa-wave-subtab {
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  /* Oculta o 2º eixo Y redundante da direita nos smartphones p/ dar ~70px a mais aos gráficos */
  .dsysa-wave-matrix-wrap {
    grid-template-columns: 44px minmax(0, 1fr) !important;
  }
  .dsysa-wave-yaxis.right {
    display: none !important;
  }
  .dsysa-wave-yaxis.left {
    width: 44px;
  }
  .dsysa-wave-yaxis-ticks {
    font-size: 8.5px;
    padding: 8px 1px 18px;
  }
  .dsysa-wave-dir-box {
    font-size: 7.8px;
    line-height: 1.1;
    height: 52px;
    padding: 2px;
  }

  /* Tábua de Marés */
  .dsysa-tide-matrix-wrap {
    grid-template-columns: 44px minmax(0, 1fr) !important;
  }
  .dsysa-tide-harbor-bar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .dsysa-tide-harbor-pin span {
    font-size: 0.88rem;
  }
  .dsysa-tide-astro-label span {
    font-size: 8.5px;
  }
  .dsysa-tide-meters-ticks {
    font-size: 8.5px;
    padding: 4px 2px;
  }

  /* Gráfico de Vento */
  .dsysa-wind-zone-bar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .dsysa-wind-zone-note {
    font-size: 9.5px;
    width: 100%;
  }
  .dsysa-wind-subtabs-row {
    padding: 6px 12px 0;
    gap: 6px;
    flex-direction: column;
    align-items: flex-start;
  }
  .dsysa-wind-bars-legend {
    font-size: 10.5px;
    gap: 10px;
    padding-bottom: 4px;
  }
  .dsysa-wind-swatch {
    width: 12px;
    height: 12px;
  }

  /* Bússola no Card */
  .dsysa-compass-body {
    padding: 12px;
    gap: 14px;
    grid-template-columns: 1fr;
  }
  .dsysa-compass-svg {
    max-width: 172px;
    height: auto;
  }
  .dsysa-compass-headline {
    font-size: 0.95rem;
  }
  .dsysa-compass-desc {
    font-size: 11.5px;
  }
  .dsysa-compass-badges {
    gap: 6px;
  }
  .dsysa-compass-pill {
    font-size: 10px;
    padding: 4px 8px;
    max-width: 100%;
  }
  .dsysa-btn-live-compass,
  .dsysa-btn-expand-compass {
    font-size: 11px;
    padding: 7px 12px;
    gap: 6px;
  }
  .dsysa-compass-angle-readout {
    font-size: 10px !important;
  }

  /* Modal da Bússola Ampliada */
  .dsysa-compass-modal-backdrop {
    padding: 8px;
  }
  .dsysa-compass-modal-dialog {
    max-width: 100%;
    max-height: 94vh;
    border-radius: 16px;
  }
  #dsysaModalCompassSvgHost {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  #dsysaModalCompassSvgHost svg {
    max-width: 100% !important;
    width: 260px !important;
    height: auto !important;
  }

  /* Telemetria Cards */
  .dsysa-telemetry-grid {
    gap: 0.6rem;
  }
  .dsysa-telemetry-card {
    padding: 10px 12px;
  }
  .dsysa-telemetry-card-value {
    font-size: 13.5px;
  }
  .dsysa-telemetry-card-sub {
    font-size: 10.5px;
  }

  /* Abas do Topo */
  .dsysa-tab {
    padding: 0.45rem 0.8rem;
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   12. CALLOUT INTERATIVO DE TAMANHO & HORA SOBRE AS BARRAS DOS GRÁFICOS
   (Exibido ao clicar ou tocar sobre as barras: onda, energia e vento)
   ========================================================================== */
.dsysa-bar-callout {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  z-index: 12;
  white-space: nowrap;
  line-height: 1.1;
  padding-bottom: 2px;
  animation: dsysaCalloutPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dsysaCalloutPop {
  from {
    opacity: 0;
    transform: translate(-50%, 4px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* Mostra no slot selecionado (por clique ou toque) ou no hover */
.dsysa-wave-slot-col.is-selected .dsysa-bar-callout,
.dsysa-wave-slot-col:hover .dsysa-bar-callout {
  display: flex !important;
}

.dsysa-bar-callout-time {
  font-family: var(--dsysa-font-mono, monospace);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #cbd5e1;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  line-height: 1;
  margin-bottom: 2px;
}

.dsysa-bar-callout-val {
  font-family: var(--dsysa-font-geist, var(--dsysa-font-sans));
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

/* 1. Gráfico de Ondas: Tamanho em metros (ex: 1.7) */
.dsysa-bar-callout-val.wave-val {
  color: #f8fafc;
  font-size: 13.5px;
}

/* 2. Gráfico de Energia: Valor dourado/amarelo destacado (ex: 520) */
.dsysa-bar-callout-val.energy-val {
  color: #facc15;
  font-family: var(--dsysa-font-mono, monospace);
  font-weight: 800;
  font-size: 13.5px;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.45), 0 1px 4px rgba(0, 0, 0, 0.95);
}

/* 3. Gráfico de Vento: Velocidade clara com unidade (ex: 20km/h) */
.dsysa-bar-callout-val.wind-val {
  color: #e2e8f0;
  font-family: var(--dsysa-font-mono, monospace);
  font-size: 11.5px;
  font-weight: 700;
}

/* Realce na coluna da barra quando selecionada */
.dsysa-wave-slot-col.is-selected {
  background: rgba(255, 255, 255, 0.09) !important;
}
.dsysa-wave-slot-col.is-selected .dsysa-wave-bar,
.dsysa-wave-slot-col.is-selected .dsysa-energy-bar,
.dsysa-wave-slot-col.is-selected .dsysa-wind-bar-stack {
  filter: brightness(1.22);
}

@media (max-width: 390px) {
  /* Smartphones ultra-compactos (iPhone SE, Galaxy Mini) */
  .dsysa-telemetry-card-value {
    font-size: 12.5px;
  }
  .dsysa-wave-topbar-title {
    font-size: 0.78rem;
  }
  #dsysaModalCompassSvgHost svg {
    width: 230px !important;
  }
}

