/* ============================================================
   CERES AI - EXECUTIVE CYBERNETIC DESIGN SYSTEM (BANCO SAFRA)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;800;900&family=Rajdhani:wght@500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root, html.dark {
  --safra-gold: #eab308;
  --safra-gold-hover: #ca8a04;
  --safra-gold-glow: rgba(234, 179, 8, 0.35);
  --safra-cyan: #38bdf8;
  --safra-cyan-glow: rgba(56, 189, 248, 0.35);
  --safra-bg: #020617;
  --safra-card: #0b132b;
  --safra-navy: #0f172a;
  --safra-border: #1e293b;

  --safra-bg-rgb: 2 6 23;
  --safra-dark-rgb: 2 6 23;
  --safra-card-rgb: 11 19 43;
  --safra-navy-rgb: 15 23 42;
  --safra-border-rgb: 30 41 59;
  color-scheme: dark;
}

html.light {
  --safra-gold: #d97706;
  --safra-gold-hover: #b45309;
  --safra-gold-glow: rgba(217, 119, 6, 0.2);
  --safra-cyan: #0284c7;
  --safra-cyan-glow: rgba(2, 132, 199, 0.2);
  --safra-bg: #f8fafc;
  --safra-card: #ffffff;
  --safra-navy: #f1f5f9;
  --safra-border: #e2e8f0;

  --safra-bg-rgb: 248 250 252;
  --safra-dark-rgb: 241 245 249;
  --safra-card-rgb: 255 255 255;
  --safra-navy-rgb: 241 245 249;
  --safra-border-rgb: 226 232 240;
  color-scheme: light;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--safra-bg);
  color: #f8fafc;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Tipografias Futuristas */
.font-orbitron {
  font-family: 'Orbitron', monospace, sans-serif;
  letter-spacing: 0.05em;
}

.font-rajdhani {
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.025em;
}

/* Sidebar Navigation Items */
.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: #94a3b8;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.sidebar-link:hover {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(51, 65, 85, 0.5);
  transform: translateX(3px);
}

.sidebar-link.active {
  color: #020617;
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  font-weight: 700;
  box-shadow: 0 4px 16px var(--safra-gold-glow);
  border-color: #facc15;
}

.sidebar-link.active i {
  color: #020617 !important;
}

.sidebar-link.active::after {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: #eab308;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px #eab308;
}

/* Filter Buttons */
.media-filter.active, .behavior-filter.active {
  background-color: var(--safra-gold);
  color: #020617;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--safra-gold-glow);
}

.media-filter:not(.active), .behavior-filter:not(.active) {
  background-color: var(--safra-card);
  color: #94a3b8;
  border: 1px solid var(--safra-border);
}

.media-filter:not(.active):hover, .behavior-filter:not(.active):hover {
  color: #f8fafc;
  background-color: #1e293b;
  border-color: #475569;
}

/* Glassmorphism Cards */
.glass-panel {
  background: rgba(11, 19, 43, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--safra-border);
}

/* Card Elevation & Hover Glow */
.stat-card {
  transition: all 0.25s ease;
}

.stat-card:hover {
  border-color: rgba(234, 179, 8, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(234, 179, 8, 0.1);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #eab308;
}

/* Utilitário para ocultar barra de rolagem em carrosséis mantendo swipe e navegação fluida */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ============================================================
   PORTÃO FUTURISTA & ONBOARDING CIBERNÉTICO (SOLO SISTEMA STYLE)
   ============================================================ */

/* Fundo com Malha Hexagonal & Grade Cibernética */
.cyber-grid-bg {
  background-color: #020617;
  background-image: 
    radial-gradient(rgba(56, 189, 248, 0.12) 1px, transparent 1px),
    radial-gradient(rgba(234, 179, 8, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: 0 0, 18px 18px;
}

/* Anel Central Pulsante (Botão de Iniciar) */
.core-pulse-ring {
  position: absolute;
  inset: -15px;
  border-radius: 9999px;
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  animation: corePulse 2.8s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  pointer-events: none;
}

.core-pulse-ring-2 {
  position: absolute;
  inset: -30px;
  border-radius: 9999px;
  border: 1px solid rgba(234, 179, 8, 0.35);
  animation: corePulse 2.8s cubic-bezier(0.25, 1, 0.5, 1) infinite 0.7s;
  pointer-events: none;
}

@keyframes corePulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.45);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

/* Brilho Neon Holográfico */
.glow-cyan {
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.35), inset 0 0 20px rgba(56, 189, 248, 0.2);
}

.glow-gold {
  box-shadow: 0 0 35px rgba(234, 179, 8, 0.35), inset 0 0 20px rgba(234, 179, 8, 0.15);
}

.text-glow-cyan {
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.6), 0 0 30px rgba(56, 189, 248, 0.3);
}

.text-glow-gold {
  text-shadow: 0 0 16px rgba(234, 179, 8, 0.6), 0 0 30px rgba(234, 179, 8, 0.3);
}

/* Card Holográfico com Cantos Chanfrados */
.cyber-panel {
  position: relative;
  background: rgba(11, 19, 43, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cyber-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-top: 2px solid #38bdf8;
  border-left: 2px solid #38bdf8;
}

.cyber-panel::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-bottom: 2px solid #eab308;
  border-right: 2px solid #eab308;
}

/* Cards de Perfil no Onboarding */
.profile-select-card {
  position: relative;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(30, 41, 59, 0.9);
  border-radius: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}

.profile-select-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.15);
}

.profile-select-card.selected {
  border-color: #eab308;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(234, 179, 8, 0.08));
  box-shadow: 0 0 25px rgba(234, 179, 8, 0.25), inset 0 0 15px rgba(234, 179, 8, 0.08);
}

/* Efeito de Digitação Terminal */
.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 18px;
  background-color: #38bdf8;
  margin-left: 4px;
  animation: blink 1s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Transições de Etapas do Onboarding */
.step-transition {
  width: 100%;
}

.step-hidden {
  display: none !important;
}

.step-active-forward {
  display: block !important;
  animation: stepSlideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-active-backward {
  display: block !important;
  animation: stepSlideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes stepSlideInRight {
  from {
    opacity: 0;
    transform: translateX(25px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes stepSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-25px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Barra de Progresso Neon */
.neon-progress-bar {
  background: linear-gradient(90deg, #38bdf8 0%, #eab308 100%);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
}

/* Canvas de Partículas */
#neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 1;
}

/* Robô Feminina Assistente - Apresentação Heroica Integrada (Sem Caixa/Bordas) */
.robot-hero-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.robot-hero-mask {
  mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 38%, rgba(0,0,0,0.85) 52%, rgba(0,0,0,0.2) 68%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 38%, rgba(0,0,0,0.85) 52%, rgba(0,0,0,0.2) 68%, transparent 78%);
  filter: drop-shadow(0 0 40px rgba(56, 189, 248, 0.25));
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.robot-hero-container:hover .robot-hero-mask {
  filter: drop-shadow(0 0 65px rgba(56, 189, 248, 0.45));
  transform: scale(1.02);
}

/* ============================================================
   DASHBOARD CYBER-LUXURY DESIGN SYSTEM
   ============================================================ */

/* Fundo com Grade Cibernética para o Dashboard */
.dashboard-cyber-bg {
  background-color: #020617;
  background-image: 
    radial-gradient(rgba(56, 189, 248, 0.07) 1px, transparent 1px),
    radial-gradient(rgba(234, 179, 8, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
}

/* Card Holográfico / Glassmorphism Avançado */
.cyber-card {
  position: relative;
  background: rgba(11, 19, 43, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.08);
}

/* Card Dourado Executivo */
.cyber-card-gold {
  position: relative;
  background: rgba(11, 19, 43, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-card-gold:hover {
  border-color: rgba(234, 179, 8, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(234, 179, 8, 0.12);
}

/* Cantos Chanfrados Tecnológicos */
.corner-bracket-tl {
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-top: 2px solid #38bdf8;
  border-left: 2px solid #38bdf8;
  border-top-left-radius: 0.75rem;
  pointer-events: none;
}

.corner-bracket-br {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid #eab308;
  border-right: 2px solid #eab308;
  border-bottom-right-radius: 0.75rem;
  pointer-events: none;
}

/* Ceres Mini Core Orb (Topbar / Status) */
.ceres-mini-orb {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: radial-gradient(circle at 40% 40%, #38bdf8 0%, #0284c7 50%, #0f172a 100%);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ceres-mini-orb::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  border: 1px dashed rgba(56, 189, 248, 0.7);
  animation: orbSpin 6s linear infinite;
}

@keyframes orbSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Barra de Comando Rápida da Ceres (Terminal Bar) */
.command-terminal-box {
  background: rgba(2, 6, 23, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1rem;
  transition: all 0.25s ease;
}

.command-terminal-box:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25), inset 0 0 15px rgba(56, 189, 248, 0.05);
}

/* Slots de Telemetria de Servidor */
.telemetry-rack-slot {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(30, 41, 59, 0.8);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.telemetry-rack-slot:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Badge Neon de Alta Intensidade */
.neon-pill-cyan {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.neon-pill-gold {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #facc15;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.15);
}

/* Previne alteração acidental de valores numéricos via scroll do mouse/trackpad */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

/* ============================================================
   MOBILE-FIRST APP EXPERIENCE (BOTTOM BAR & PWA ERGONOMICS)
   ============================================================ */

/* Barra de Navegação Inferior Fixa (Estilo App Nativo iOS/Android) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: rgba(11, 19, 43, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.65), 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 6px 2px;
  border-radius: 12px;
  position: relative;
  touch-action: manipulation;
}

.mobile-nav-item i {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-nav-item:active {
  transform: scale(0.92);
}

.mobile-nav-item.active {
  color: #eab308;
}

.mobile-nav-item.active i {
  color: #eab308;
  transform: translateY(-2px);
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 20px;
  height: 2.5px;
  background: #eab308;
  border-radius: 9999px;
  box-shadow: 0 0 10px #eab308;
}

/* Botão Central Flutuante WhatsApp (FAB com Pulso) */
.mobile-fab-whatsapp {
  position: relative;
  top: -16px;
  width: 54px;
  height: 54px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #020617;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5), 0 0 0 4px #0b132b;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
}

.mobile-fab-whatsapp:active {
  transform: scale(0.92);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4), 0 0 0 4px #0b132b;
}

.mobile-fab-whatsapp::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid rgba(16, 185, 129, 0.5);
  animation: fabPulse 2.4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  pointer-events: none;
}

@keyframes fabPulse {
  0% { transform: scale(0.92); opacity: 0.9; }
  60% { transform: scale(1.25); opacity: 0.15; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Modais Adaptáveis no Mobile (Bottom Sheets Estilo App Nativo) */
@media (max-width: 640px) {
  div[id$="-modal"],
  div[id^="modal-"] {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  div[id$="-modal"] > div,
  div[id^="modal-"] > div {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 1.5rem !important;
    border-top-right-radius: 1.5rem !important;
    max-height: 88vh !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-y: auto !important;
    padding: 1.25rem 1.1rem max(1.5rem, env(safe-area-inset-bottom)) 1.1rem !important;
    animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }

  @keyframes sheetSlideUp {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .sheet-handle {
    width: 36px;
    height: 4px;
    background: rgba(148, 163, 184, 0.4);
    border-radius: 9999px;
    margin: 0 auto 0.75rem auto;
  }
}

/* ============================================================
   CALENDÁRIO GUIA INTERATIVO CERES
   ============================================================ */
.calendar-day-btn {
  position: relative;
  min-height: 42px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 4px 4px;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.4);
  color: #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .calendar-day-btn {
    min-height: 52px;
    padding: 8px 6px 6px 6px;
    font-size: 0.8125rem;
  }
}

.calendar-day-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(234, 179, 8, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.calendar-day-btn:active {
  transform: scale(0.96);
}

.calendar-day-btn.is-other-month {
  opacity: 0.28;
  color: #64748b;
  border-color: transparent;
  background: transparent;
}

.calendar-day-btn.is-other-month:hover {
  opacity: 0.5;
}

.calendar-day-btn.is-today {
  border-color: #eab308;
  color: #eab308;
  font-weight: 700;
  background: rgba(234, 179, 8, 0.08);
  box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.4);
}

.calendar-day-btn.is-selected {
  background: linear-gradient(135deg, #eab308 0%, #f59e0b 100%) !important;
  color: #020617 !important;
  font-weight: 800 !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35) !important;
  transform: translateY(-1px);
}

.calendar-day-btn.is-selected .calendar-event-dot {
  background-color: #020617 !important;
}

.calendar-event-dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
  min-height: 6px;
  margin-top: auto;
}

.calendar-event-dot {
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background-color: #34d399;
  box-shadow: 0 0 4px rgba(52, 211, 153, 0.6);
  transition: background-color 0.2s;
}

.calendar-event-dot.priority-high {
  background-color: #f87171;
  box-shadow: 0 0 4px rgba(248, 113, 113, 0.6);
}

.calendar-event-dot.is-completed {
  background-color: #64748b;
  box-shadow: none;
  opacity: 0.6;
  width: 4px;
  height: 4px;
}

.calendar-event-count {
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
}

.calendar-day-btn.is-selected .calendar-event-count {
  background: rgba(2, 6, 23, 0.25);
  color: #020617;
}

.calendar-day-btn.is-selected .calendar-event-dot.is-completed {
  background-color: #020617 !important;
  opacity: 0.4;
}

/* ============================================================
   CERES AI - CLEAN EXECUTIVE LIGHT THEME (MODO CLARO)
   ============================================================ */
html.light body {
  background-color: var(--safra-bg) !important;
  color: #0f172a !important;
}

html.light .dashboard-cyber-bg {
  background-color: #f8fafc !important;
  background-image: 
    radial-gradient(rgba(2, 132, 199, 0.08) 1px, transparent 1px),
    radial-gradient(rgba(217, 119, 6, 0.06) 1px, transparent 1px) !important;
}

/* Sidebar Executiva no Modo Claro */
html.light #sidebar {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 4px 0 24px -4px rgba(15, 23, 42, 0.05) !important;
}

html.light #sidebar .sidebar-link {
  color: #64748b !important;
}

html.light #sidebar .sidebar-link:hover {
  color: #0f172a !important;
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

html.light #sidebar .sidebar-link.active {
  color: #0f172a !important;
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%) !important;
  box-shadow: 0 4px 16px rgba(234, 179, 8, 0.35) !important;
  border-color: #facc15 !important;
}

html.light #sidebar .sidebar-link.active i {
  color: #0f172a !important;
}

html.light #sidebar > div:last-child {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* Topbar Superior no Modo Claro */
html.light header {
  background-color: rgba(255, 255, 255, 0.88) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03) !important;
}

html.light #page-title {
  color: #0f172a !important;
}

html.light #user-credits-pill {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}

html.light #user-credits-count {
  color: #065f46 !important;
}


html.light #admin-notifications-container button,
html.light #theme-toggle-btn {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

html.light #admin-notifications-container button:hover,
html.light #theme-toggle-btn:hover {
  background-color: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Cards e Superfícies no Modo Claro */
html.light .cyber-panel,
html.light #overview-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #eff6ff 100%) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 2px 8px -2px rgba(15, 23, 42, 0.03) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.light .cyber-panel::before,
html.light #overview-hero-card::before,
html.light .corner-bracket-tl {
  border-top-color: #0284c7 !important;
  border-left-color: #0284c7 !important;
}

html.light .cyber-panel::after,
html.light #overview-hero-card::after,
html.light .corner-bracket-br {
  border-bottom-color: #d97706 !important;
  border-right-color: #d97706 !important;
}

/* Otimização dos textos internos do Hero no Modo Claro */
html.light #hero-greeting-title {
  color: #0f172a !important;
  text-shadow: none !important;
}

html.light #hero-greeting-desc {
  color: #475569 !important;
}

/* Botão Secundário do Hero no Modo Claro */
html.light #overview-hero-card button[onclick*="switchTab('agenda')"] {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

html.light #overview-hero-card button[onclick*="switchTab('agenda')"]:hover {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* Suaviza as auras holográficas no Modo Claro para remover o aspecto de película/mancha */
html.light #overview-hero-card .bg-sky-500\/10 {
  background-color: rgba(2, 132, 199, 0.04) !important;
}

html.light #overview-hero-card .bg-safra-gold\/10 {
  background-color: rgba(217, 119, 6, 0.04) !important;
}

html.light .cyber-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02) !important;
}

html.light .cyber-card:hover {
  border-color: rgba(2, 132, 199, 0.45) !important;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 0 16px rgba(2, 132, 199, 0.08) !important;
}

html.light .cyber-card-gold {
  background-color: #ffffff !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
  box-shadow: 0 4px 20px -2px rgba(217, 119, 6, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.02) !important;
}

html.light .cyber-card-gold:hover {
  border-color: rgba(217, 119, 6, 0.6) !important;
  box-shadow: 0 12px 28px -4px rgba(217, 119, 6, 0.12), 0 0 20px rgba(217, 119, 6, 0.12) !important;
}

html.light .glass-panel {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
}

html.light .bg-safra-card {
  background-color: #ffffff !important;
}

html.light .bg-safra-navy {
  background-color: #f1f5f9 !important;
}

html.light .border-safra-border {
  border-color: #e2e8f0 !important;
}

/* Tipografia e Contraste no Modo Claro */
html.light h1,
html.light h2,
html.light h3,
html.light h4,
html.light h5,
html.light h6 {
  color: #0f172a;
}

html.light .text-white:not([class*="bg-"]):not([class*="from-"]):not(.preserve-white):not(.badge-filled),
html.light div.text-white:not([class*="bg-"]):not([class*="from-"]):not(.preserve-white),
html.light span.text-white:not([class*="bg-"]):not([class*="from-"]):not(.badge-filled):not(.preserve-white),
html.light p.text-white,
html.light a.text-white:not([class*="bg-"]) {
  color: #0f172a !important;
}

html.light .text-slate-100 { color: #0f172a !important; }
html.light .text-slate-200 { color: #1e293b !important; }
html.light .text-slate-300:not(.preserve-contrast) { color: #334155 !important; }
html.light .text-slate-400:not(.preserve-contrast) { color: #64748b !important; }
html.light .text-slate-500 { color: #64748b !important; }

/* Preservação de texto branco e contraste em botões primários coloridos */
html.light .bg-emerald-500,
html.light .bg-emerald-600,
html.light .bg-rose-500,
html.light .bg-rose-600,
html.light .bg-sky-500,
html.light .bg-sky-600,
html.light [class*="from-emerald-"],
html.light [class*="from-teal-"],
html.light [class*="from-sky-"],
html.light .preserve-white,
html.light .btn-primary {
  color: #ffffff !important;
}

html.light .bg-safra-gold,
html.light .sidebar-link.active {
  color: #0f172a !important;
}

/* Inputs, Selects e Formulários no Modo Claro */
html.light input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
html.light select,
html.light textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

html.light input:focus,
html.light select:focus,
html.light textarea:focus {
  border-color: #d97706 !important;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.15) !important;
}

html.light select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Modais no Modo Claro */
html.light div[id$="-modal"],
html.light div[id^="modal-"] {
  background-color: rgba(15, 23, 42, 0.45) !important;
}

html.light div[id$="-modal"] > div,
html.light div[id^="modal-"] > div {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  color: #0f172a !important;
}

html.light div[id$="-modal"] button[onclick*="close"],
html.light div[id^="modal-"] button[onclick*="close"] {
  color: #64748b !important;
}

html.light div[id$="-modal"] button[onclick*="close"]:hover,
html.light div[id^="modal-"] button[onclick*="close"]:hover {
  color: #0f172a !important;
}

/* Tabelas no Modo Claro */
html.light table thead tr {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.light table thead th {
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

html.light table tbody tr {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

html.light table tbody tr:hover {
  background-color: #f8fafc !important;
}

html.light table tbody td {
  border-color: #e2e8f0 !important;
}

/* Calendário Interativo da Agenda no Modo Claro */
html.light .calendar-day-btn {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

html.light .calendar-day-btn:hover {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

html.light .calendar-day-btn.is-other-month {
  opacity: 0.35 !important;
  color: #94a3b8 !important;
  background: transparent !important;
  border-color: transparent !important;
}

html.light .calendar-day-btn.is-today {
  border-color: #d97706 !important;
  color: #b45309 !important;
  background: rgba(217, 119, 6, 0.08) !important;
}

html.light .calendar-day-btn.is-selected {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0f172a !important;
  border-color: #f59e0b !important;
}

/* Filtros de Mídia e Comportamento no Modo Claro */
html.light .media-filter:not(.active),
html.light .behavior-filter:not(.active),
html.light .usage-filter:not(.active) {
  background-color: #ffffff !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
}

html.light .media-filter:not(.active):hover,
html.light .behavior-filter:not(.active):hover,
html.light .usage-filter:not(.active):hover {
  color: #0f172a !important;
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

html.light .media-filter.active,
html.light .behavior-filter.active,
html.light .usage-filter.active {
  background-color: #d97706 !important;
  color: #ffffff !important;
}

/* Mobile Bottom Navigation no Modo Claro */
html.light .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06) !important;
}

html.light .mobile-nav-item {
  color: #64748b !important;
}

html.light .mobile-nav-item.active {
  color: #d97706 !important;
}

html.light .mobile-fab-whatsapp {
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4), 0 0 0 4px #ffffff !important;
}

/* ============================================================
   Cards de Escolha de Personalidade no Modo Claro (UX/UI Premium)
   ============================================================ */
html.light .personality-choice-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html.light .personality-choice-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08) !important;
}

/* Card Selecionado (Ativo) no Modo Claro */
html.light .personality-choice-card.border-safra-gold {
  border-color: #d97706 !important;
  background-color: #fffbeb !important;
  box-shadow: 0 0 0 1.5px #d97706, 0 12px 28px -5px rgba(217, 119, 6, 0.2) !important;
}

/* Título e Texto Principal no Modo Claro */
html.light .personality-choice-card h4 {
  color: #0f172a !important;
}

html.light .personality-choice-card p {
  color: #334155 !important;
  font-weight: 450 !important;
}

/* ---- Card 1: Extrovertida (Modo Claro) ---- */
html.light #personality-card-extrovertida .p-3 {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border-color: #fde68a !important;
}

html.light #personality-card-extrovertida .personality-badge {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fde68a !important;
  font-weight: 700 !important;
}

html.light #personality-card-extrovertida .personality-quote {
  color: #78350f !important;
  background-color: #fef3c7 !important;
  border: 1px solid #fde68a !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  margin-top: 12px !important;
  font-weight: 600 !important;
}

/* ---- Card 2: Neutra (Modo Claro) ---- */
html.light #personality-card-neutra .p-3 {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
}

html.light #personality-card-neutra .personality-badge {
  background-color: #e0f2fe !important;
  color: #075985 !important;
  border-color: #bae6fd !important;
  font-weight: 700 !important;
}

html.light #personality-card-neutra .personality-quote {
  color: #075985 !important;
  background-color: #e0f2fe !important;
  border: 1px solid #bae6fd !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  margin-top: 12px !important;
  font-weight: 600 !important;
}

/* ---- Card 3: Formal (Modo Claro) ---- */
html.light #personality-card-formal .p-3 {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

html.light #personality-card-formal .personality-badge {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
  font-weight: 700 !important;
}

html.light #personality-card-formal .personality-quote {
  color: #0f172a !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  margin-top: 12px !important;
  font-weight: 600 !important;
}

/* Indicador Ativo no Modo Claro */
html.light #personality-active-indicator {
  color: #475569 !important;
  font-weight: 600 !important;
}

/* Scrollbars no Modo Claro */
html.light ::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
}

html.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
}

html.light ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* ============================================================
   LANDING PAGE & PORTAL INSTITUCIONAL - CERES AI
   ============================================================ */

/* Fundo da Landing Page com rolagem suave */
#system-gateway {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scroll-behavior: smooth;
}

/* Navbar Executivo Fixo */
.landing-nav {
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}

/* WhatsApp Showcase Mockup */
.wa-mockup-container {
  background-color: #0b141a;
  background-image: radial-gradient(rgba(30, 41, 59, 0.6) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.1);
}

.wa-msg-user {
  background-color: #005c4b;
  color: #e9edef;
  border-radius: 12px 2px 12px 12px;
}

.wa-msg-ceres {
  background-color: #202c33;
  color: #e9edef;
  border-radius: 2px 12px 12px 12px;
}

/* Feature Hologram Card */
.feature-card-glow {
  position: relative;
  background: rgba(11, 19, 43, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 1.25rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card-glow:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.12);
}

/* Pricing Card Glow */
.pricing-card-popular {
  border: 2px solid #eab308 !important;
  box-shadow: 0 0 35px rgba(234, 179, 8, 0.25), 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}

/* FAQ Accordion Item */
.faq-trigger {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.faq-trigger:hover {
  color: #38bdf8;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

.faq-item.active .faq-content {
  max-height: 500px;
  opacity: 1;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: #38bdf8;
}

/* Modal Overlay Flutuante para Wizard, Login e Jurídico */
.gateway-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background-color: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

/* Legal Documents Styling */
.legal-document-body {
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1.7;
}

.legal-document-body h2 {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.legal-document-body h3 {
  font-size: 0.975rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-document-body p {
  margin-bottom: 0.85rem;
}

.legal-document-body ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-document-body li {
  margin-bottom: 0.35rem;
}

.legal-callout {
  background: rgba(15, 23, 42, 0.85);
  border-left: 3px solid #38bdf8;
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1.25rem 0;
  font-size: 0.825rem;
  color: #94a3b8;
}

.legal-callout-gold {
  background: rgba(20, 18, 10, 0.85);
  border-left: 3px solid #eab308;
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1.25rem 0;
  font-size: 0.825rem;
  color: #fef08a;
}
