/* 
  ==============================================================
  VOLTIOPR - ESTILOS SECUNDARIOS (BLUE EDITION)
  ==============================================================
  Nota para no programadores: 
  Este archivo controla el "look" (apariencia) de la página. 
  Aquí configuramos los colores, sombras y efectos de cristal
  (glassmorphism) para que todas las pantallas se vean iguales.
*/

/* Importar tipo de letra Inter (moderno y fácil de leer) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

html {
  overflow-x: hidden;
  height: 100%;
}
body {
  font-family: 'Inter', sans-serif;
  background-color: #020617;
  background-image: radial-gradient(circle at center, #0a192f 0%, #020617 100%);
  color: #e2e8f0;
  margin: 0;
  
  /* ESCALA GLOBAL 80% PERFECTA */
  transform: scale(0.8);
  transform-origin: top left;
  width: 125%; /* 100 / 0.8 */
  min-height: 125vh;
}

/* Efecto "Glassmorphism" (Cristal esmerilado translúcido) */
.glass-panel {
  background: rgba(255, 255, 255, 0.03); /* Blanco casi transparente */
  backdrop-filter: blur(12px);           /* Desenfoque de lo que hay detrás */
  -webkit-backdrop-filter: blur(12px);   /* Desenfoque para Safari */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Borde muy fino y brillante */
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.8); /* Sombra reducida */
}

/* Efecto de resplandor Neón para botones importantes */
.neon-glow {
  box-shadow: 0 0 15px rgba(13, 185, 242, 0.4);
  transition: all 0.3s ease;
}

.neon-glow:hover {
  box-shadow: 0 0 25px rgba(13, 185, 242, 0.7); /* Brilla más al pasar el ratón */
  transform: translateY(-2px); /* Se levanta un poquito */
}

/* ======= ESTILOS PARA INTERRUPTORES (TOGGLES) DEL DASHBOARD ======= */
/* El color cuando está apagado */
.toggle-checkbox {
  transition: all 0.3s ease;
}

/* El color cuando está encendido (Volti Red) */
.toggle-checkbox:checked {
  background-color: #ff4b2b !important;
  right: 0;
  border-color: #ff4b2b !important;
}

/* Sombras y color del fondo del botón encendido */
.toggle-checkbox:checked + .toggle-label {
  background-color: rgba(255, 75, 43, 0.2);
}

/* ======= ESTILOS PARA DESLIZADORES (SLIDERS) ======= */
/* Ocultar el estilo por defecto del navegador */
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  height: 10px;
}

/* El "botón" circular que mueves en el slider */
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: #0db9f2; /* Azul Voltio */
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 12px #0db9f2; /* Brillo azul */
  border: 2px solid white;
}

/* ======= NAVEGACIÓN PREMIUM ======= */
.main-nav {
  position: sticky;
  top: 0.5rem;
  z-index: 50;
  margin-bottom: 1rem;
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
  color: #94a3b8; /* Slate 400 */
}

.nav-link:hover {
  color: #0db9f2; /* Azul Voltio */
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0db9f2;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px #0db9f2;
}

.nav-link:hover::after, .active-link::after {
  width: 100%;
}

.active-link {
  color: white !important;
  font-weight: 700;
}

body.light-mode .active-link {
  color: #0db9f2 !important;
}

/* Propiedades extras de animación manual */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none; /* Que no molesten al hacer clic en nada */
}

/* ======= SISTEMA DE TOASTS (NOTIFICACIONES) ======= */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success .toast-icon { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.toast-error .toast-icon { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.toast-info .toast-icon { background: rgba(13, 185, 242, 0.1); color: #0db9f2; }

/* ======= SKELETON LOADER (ESTADOS DE CARGA) ======= */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ======= INDICADOR DE CONECTIVIDAD ======= */
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-online { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.status-offline { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

/* ======= SOPORTE MODAL / LIGHT MODE ======= */
body.light-mode {
  background-color: #f1f5f9;
  background-image: radial-gradient(circle at center, #ffffff 0%, #e2e8f0 100%);
  color: #0f172a;
}

body.light-mode .glass-panel {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-mode .nav-link {
  color: #0db9f2;
}

body.light-mode .text-slate-400, 
body.light-mode .text-slate-500,
body.light-mode .text-gray-400,
body.light-mode .text-gray-500,
body.light-mode .text-white\/50,
body.light-mode .text-white\/20,
body.light-mode .text-slate-600 {
  color: #0789b5 !important; /* Un azul un poco más oscuro para mejor contraste en fondo claro */
}

body.light-mode .opacity-70, 
body.light-mode .opacity-50,
body.light-mode .opacity-20 {
  opacity: 1 !important;
}

body.light-mode .bg-white\/5 {
  background: rgba(13, 185, 242, 0.05); /* Sutil tinte azulado en lugar de gris */
}

body.light-mode .border-white\/5,
body.light-mode .border-white\/10 {
  border-color: rgba(13, 185, 242, 0.2);
}

body.light-mode h1, body.light-mode h2, body.light-mode h3 {
  color: #0f172a;
}

body.light-mode label {
  color: #0789b5;
}
