/* ==========================================================================
   Design System & Tokens - MapeiaDrone v4.0 (Dark & Light Themes)
   ========================================================================== */

:root, [data-theme="dark"] {
  /* Paleta Base Escura (Aerospace Carbon) */
  --bg-core: #080c14;
  --bg-card: #0f172a;
  --bg-canvas: #070a12;
  --bg-surface-1: #0f172a;
  --bg-surface-2: #1e293b;
  --bg-surface-glass: rgba(15, 23, 42, 0.82);
  --bg-surface-elevated: rgba(30, 41, 59, 0.92);
  --bg-input: rgba(10, 15, 26, 0.85);
  --bg-header: rgba(8, 12, 20, 0.7);
  --bg-footer: rgba(8, 12, 20, 0.6);
  --bg-spec: rgba(30, 41, 59, 0.6);
  --modal-backdrop-bg: rgba(4, 7, 14, 0.82);

  /* Acentos Vibrantes de Alta Tecnologia */
  --accent-cyan: #00f2fe;
  --accent-cyan-glow: rgba(0, 242, 254, 0.35);
  --accent-teal: #06b6d4;
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.35);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.35);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.35);
  --accent-blue: #3b82f6;

  /* Tipografia */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Cores de Texto */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #64748b;
  --text-accent: #38bdf8;
  --brand-title-color: linear-gradient(90deg, #ffffff, var(--accent-cyan));

  /* Bordas & Divisores */
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-active: rgba(0, 242, 254, 0.45);
  --border-glow: 0 0 15px rgba(0, 242, 254, 0.2);

  /* Efeitos de Blur & Sombra */
  --backdrop-blur: blur(14px);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --shadow-elevation: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-neon: 0 0 20px rgba(0, 242, 254, 0.3);
  --drone-shadow: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));

  /* Transições & Raios */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   TEMA CLARO (LIGHT THEME - Clean, Modern Slate & White)
   ========================================================================== */
[data-theme="light"] {
  --bg-core: #f1f5f9;         /* Slate 100 */
  --bg-card: #ffffff;         /* Pure clean white */
  --bg-canvas: #f8fafc;       /* Slate 50 */
  --bg-surface-1: #ffffff;
  --bg-surface-2: #e2e8f0;    /* Slate 200 */
  --bg-surface-glass: rgba(255, 255, 255, 0.88);
  --bg-surface-elevated: rgba(255, 255, 255, 0.96);
  --bg-input: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-footer: rgba(248, 250, 252, 0.92);
  --bg-spec: #e2e8f0;
  --modal-backdrop-bg: rgba(15, 23, 42, 0.45);

  /* Acentos Vibrantes e com Alto Contraste */
  --accent-cyan: #0284c7;     /* Sky 600 - nítido e elegante no claro */
  --accent-cyan-glow: rgba(2, 132, 199, 0.25);
  --accent-teal: #0d9488;
  --accent-green: #059669;    /* Emerald 600 */
  --accent-green-glow: rgba(5, 150, 105, 0.25);
  --accent-purple: #7c3aed;   /* Violet 600 */
  --accent-purple-glow: rgba(124, 58, 237, 0.25);
  --accent-amber: #d97706;    /* Amber 600 */
  --accent-rose: #e11d48;     /* Rose 600 */
  --accent-red: #dc2626;      /* Red 600 */
  --accent-red-glow: rgba(220, 38, 38, 0.25);
  --accent-blue: #2563eb;     /* Blue 600 */

  /* Cores de Texto Nítidas */
  --text-primary: #0f172a;    /* Slate 900 */
  --text-secondary: #475569;  /* Slate 600 */
  --text-muted: #64748b;      /* Slate 500 */
  --text-dim: #94a3b8;        /* Slate 400 */
  --text-accent: #0284c7;     /* Sky 600 */
  --brand-title-color: linear-gradient(90deg, #0f172a, #0284c7);

  /* Bordas e Sombras Suaves */
  --border-subtle: rgba(100, 116, 139, 0.22);
  --border-active: rgba(2, 132, 199, 0.55);
  --border-glow: 0 0 15px rgba(2, 132, 199, 0.2);

  --shadow-card: 0 4px 20px 0 rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-elevation: 0 14px 34px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-neon: 0 0 16px rgba(2, 132, 199, 0.25);
  --drone-shadow: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-core);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Transições suaves de tema nos principais blocos */
.app-sidebar,
.sidebar-header,
.sidebar-section,
.telemetry-dashboard,
.elevation-profile-card,
.modal-dialog,
.mission-hover-tooltip,
.btn-secondary,
.mode-chip,
.form-input,
.form-select,
.guide-mission-card {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Scrollbars customizadas */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-core);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-2);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}
