@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --rg-navy-dark: #00172e;
  --rg-navy-primary: #002244;
  --rg-navy-light: #003366;
  --rg-accent-cyan: #00c9ff;
  --rg-accent-blue: #0072ff;
  --rg-emerald: #10b981;
  --rg-rose: #f43f5e;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: #0b1120;
  color: #f1f5f9;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism & Custom Card Styles */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.module-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.65) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 20px 25px -5px rgba(0, 34, 68, 0.5), 0 8px 10px -6px rgba(0, 34, 68, 0.3);
}

/* Status Indicator Pulses */
.status-pulse-online {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-green {
  to {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
}

.status-pulse-offline {
  box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
  animation: pulse-red 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-red {
  to {
    box-shadow: 0 0 0 10px rgba(244, 63, 94, 0);
  }
}

/* Refresh Button Spin */
.spinning {
  animation: spin 0.8s linear infinite;
}

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

/* Subtle Gradient Glows */
.header-glow {
  background: radial-gradient(circle at 50% -20%, rgba(0, 201, 255, 0.15) 0%, rgba(0, 34, 68, 0) 70%);
}

.pilar-badge-1 {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.pilar-badge-2 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(20, 184, 166, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0b1120;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Switches para Matriz RBAC */
.switch-input {
  display: none;
}
.switch-label {
  width: 42px;
  height: 22px;
  background-color: #334155;
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-block;
}
.switch-dot {
  width: 16px;
  height: 16px;
  background-color: #ffffff;
  border-radius: 9999px;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.switch-input:checked + .switch-label {
  background-color: #06b6d4;
}
.switch-input:checked + .switch-label .switch-dot {
  transform: translateX(20px);
}

/* Restricción RBAC en Tarjetas de Módulo */
.module-restricted {
  opacity: 0.55 !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
  background: linear-gradient(135deg, rgba(30, 20, 25, 0.9) 0%, rgba(20, 20, 30, 0.7) 100%) !important;
}
.module-restricted .action-btn {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* Modales */
.modal-overlay {
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
