/* --- Variables Globales de Color (Modo Claro por defecto) --- */
:root {
    /* Tipografía moderna */
    --font-primary: 'Open Sans', sans-serif;
    
    /* Modo Claro */
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg-color: #f8f9fa;
    --nav-bg-color: #ffffff;
    --border-color: #eeeeee;

    /* Modo Oscuro */
    --bg-color-dark: #0a192f;
    --text-color-dark: #f0f0f0;
    --card-bg-color-dark: #172a45;
    --nav-bg-color-dark: #0a192f;
    --border-color-dark: #1e3a5f;

    /* Colores de Marca */
    --color-vivid-blue: #00CFFF;
    --color-cobalt: #004aad;
    --color-teal: #5de0e6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    
    /* Colores de Botones */
    --btn-primary-bg: var(--color-cobalt);
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: transparent;
    --btn-secondary-text: var(--color-cobalt);
    --btn-secondary-border: var(--color-cobalt);
}

/* --- Estilos del Modo Oscuro --- */
[data-theme="dark"] {
    --bg-color: var(--bg-color-dark);
    --text-color: var(--text-color-dark);
    --card-bg-color: var(--card-bg-color-dark);
    --nav-bg-color: var(--nav-bg-color-dark);
    --border-color: var(--border-color-dark);
    
    --btn-secondary-text: var(--color-teal);
    --btn-secondary-border: var(--color-teal);
}

/* --- Reseteo Básico --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

/* --- Header y Navegación --- */
header {
    background-color: var(--nav-bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-image {
    height: 40px;
    width: auto;
    margin-right: 0.5rem;
}

.logo span {
    color: var(--color-teal);
}
.logo .logo-accent {
    color: var(--color-cobalt);
}
[data-theme="dark"] .logo .logo-accent {
    color: var(--color-teal);
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
}
.nav-links a:hover {
    color: var(--color-vivid-blue);
}
.nav-links a.active {
    color: var(--color-vivid-blue);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-vivid-blue);
}

/* --- Menú Móvil --- */
.nav-links.active {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    z-index: 99;
}

.nav-links.active li {
    margin: 0;
    width: 100%;
    text-align: center;
}

.nav-links.active a {
    display: block;
    padding: 0.75rem 1rem;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.nav-links.active a.active::after {
    display: none;
}

.nav-links.active .btn {
    margin: 0.5rem 1rem;
    width: calc(100% - 2rem);
    justify-content: center;
}

/* Ocultar botones de tema en móvil cuando el menú está activo */
.nav-links.active ~ .theme-switcher {
    display: none;
}

/* --- Botones --- */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-primary {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}
.btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 74, 173, 0.3);
}
.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 2px solid var(--btn-secondary-border);
}
.btn-secondary:hover {
    background-color: var(--btn-secondary-border);
    color: var(--bg-color);
    transform: translateY(-2px);
}
.btn-large {
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
}
.btn-full {
    width: 100%;
}

/* --- Interruptor de Tema (Dark/Light) --- */
.theme-switcher {
    margin-left: 1rem;
}
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}
#theme-toggle:hover {
    background-color: var(--border-color);
}
.moon { display: none; }
.sun { display: block; }
[data-theme="dark"] .moon { display: block; }
[data-theme="dark"] .sun { display: none; }

/* --- Botón de Menú Móvil --- */
#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    z-index: 101;
}
#mobile-menu-btn:hover {
    background-color: var(--border-color);
}
#mobile-menu-btn i {
    width: 28px;
    height: 28px;
}

/* --- Sección Héroe --- */
#hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-vivid-blue), var(--color-teal));
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-teal), var(--color-vivid-blue), var(--color-cobalt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pulse-text {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-subtitle {
    font-size: 1.35rem;
    max-width: 500px;
    margin: 1rem auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-ghost {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
}

.btn-ghost:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.glow-on-hover {
    position: relative;
    overflow: hidden;
}

.glow-on-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.glow-on-hover:hover::before {
    left: 100%;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-vivid-blue);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-preview {
    position: relative;
    width: 400px;
    height: 300px;
    perspective: 1000px;
}

.preview-screen {
    width: 100%;
    height: 100%;
    background: var(--card-bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transform: rotateY(15deg) rotateX(5deg);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.dashboard-preview:hover .preview-screen {
    transform: rotateY(0deg) rotateX(0deg);
}

/* --- Animaciones de Fade-in --- */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* --- Sección de Características --- */
.content-section {
    padding: 4rem 5%;
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in 0.8s ease-out forwards;
}
.content-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}
[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 10px 30px rgba(0, 207, 255, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,207,255,0.1), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--color-vivid-blue), var(--color-teal));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    color: white;
    width: 32px;
    height: 32px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.feature-card p {
    font-size: 1rem;
    opacity: 0.9;
}

/* --- Sección de Precios --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}
.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}
.pricing-card.featured {
    border-color: var(--color-vivid-blue);
    transform: scale(1.05);
}
.pricing-card.featured::before {
    content: 'Más Popular';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-vivid-blue);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card.featured::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-vivid-blue), var(--color-teal), var(--color-vivid-blue));
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pricing-card.featured:hover::after {
    opacity: 1;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.pricing-card .price span {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.7;
}
.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
}
.pricing-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}
.pricing-card li:last-child {
    border-bottom: none;
}

/* --- Animación de Fade-in --- */
@keyframes fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    opacity: 0.6;
}

/* --- Modales como Ventanas Emergentes --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Fondo gris más oscuro */
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    animation: popIn 0.3s ease-out;
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg-color);
    border-radius: 12px 12px 0 0;
}

.modal-header .logo {
    font-size: 1.1rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.close-modal:hover {
    background-color: var(--border-color);
    opacity: 1;
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Formularios en Modales */
.auth-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-vivid-blue);
    box-shadow: 0 0 0 3px rgba(0, 207, 255, 0.1);
}

.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--color-error);
}

.auth-link {
    text-align: center;
    margin-top: 1.25rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.auth-link a {
    color: var(--color-vivid-blue);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: var(--color-cobalt);
    text-decoration: underline;
}

/* Animaciones para modales */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Efecto de desenfoque en el contenido de fondo cuando el modal está abierto */
body.modal-open {
    overflow: hidden;
}

body.modal-open main {
    filter: blur(2px);
    transition: filter 0.3s ease;
}

/* Efectos de hover mejorados para botones en modales */
.modal .btn-primary {
    margin-top: 0.5rem;
}

.modal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 74, 173, 0.4);
}

/* Estilos para mensajes de error */
.error-message {
    color: var(--color-error);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input {
    border-color: var(--color-error);
}

/* === ESTILOS ESPECÍFICOS DEL DASHBOARD === */

.dashboard {
  padding: 2rem 5%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* Header del Dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.welcome-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--color-teal), var(--color-vivid-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-section p {
  color: var(--text-color);
  opacity: 0.7;
  font-size: 1.1rem;
}

.company-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.company-badge, .last-update {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--card-bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.company-badge i, .last-update i {
  width: 16px;
  height: 16px;
  color: var(--color-vivid-blue);
}

/* Sección de Alertas */
.alerts-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.alert {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border-left: 4px solid transparent;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: var(--color-warning);
  color: var(--color-warning);
}

.alert-info {
  background: rgba(0, 207, 255, 0.1);
  border-left-color: var(--color-vivid-blue);
  color: var(--color-vivid-blue);
}

.alert i {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.alert-content p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

/* KPIs Principales */
.kpis-main {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.kpi-card.large {
  padding: 1.5rem;
  background: var(--card-bg-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.kpi-card.large:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-vivid-blue), var(--color-teal));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon i {
  color: white;
  width: 24px;
  height: 24px;
}

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.kpi-trend.positive {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.kpi-trend.negative {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

.kpi-trend i {
  width: 12px;
  height: 12px;
}

.kpi-card.large h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  opacity: 0.8;
}

.kpi-card.large .value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.kpi-description {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 1rem;
}

.kpi-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-success), var(--color-teal));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-fill.warning {
  background: linear-gradient(90deg, var(--color-warning), var(--color-error));
}

.kpi-progress span {
  font-size: 0.8rem;
  color: var(--text-color);
  opacity: 0.6;
}

/* Grid Principal */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Contenedores de Gráficos y Módulos */
.chart-container, .compliance-container, .quick-actions, .recent-activity {
  background: var(--card-bg-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.chart-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.chart-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.period-select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 0.9rem;
}

.btn-icon {
  padding: 0.5rem;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-icon:hover {
  background: var(--border-color);
}

.chart-wrapper {
  position: relative;
  height: 300px;
}

/* Cumplimiento */
.compliance-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.compliance-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.compliance-item:hover {
  transform: translateX(4px);
  border-color: var(--color-vivid-blue);
}

.compliance-icon {
  width: 40px;
  height: 40px;
  background: rgba(0, 207, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.compliance-icon i {
  width: 20px;
  height: 20px;
  color: var(--color-vivid-blue);
}

.compliance-info {
  flex: 1;
}

.compliance-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.compliance-info p {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Acciones Rápidas */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.action-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-vivid-blue);
  background: rgba(0, 207, 255, 0.05);
}

.action-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-vivid-blue), var(--color-teal));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-icon i {
  color: white;
  width: 24px;
  height: 24px;
}

.action-card span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
}

/* Actividad Reciente */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.activity-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

.activity-icon.info {
  background: rgba(0, 207, 255, 0.1);
  color: var(--color-vivid-blue);
}

.activity-icon i {
  width: 16px;
  height: 16px;
}

.activity-content {
  flex: 1;
}

.activity-content p {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.activity-content span {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* === CHATBOT FLOTANTE === */
.chatbot-floating {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  max-width: 380px;
  width: 100%;
}

.chatbot-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--color-cobalt), var(--color-vivid-blue));
  color: white;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 74, 173, 0.3);
  transition: all 0.3s ease;
}

.chatbot-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 74, 173, 0.4);
}

.chatbot-avatar {
  position: relative;
}

.robot-face {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.robot-face.small {
  width: 32px;
  height: 32px;
}

.robot-eye {
  position: absolute;
  width: 8px;
  height: 6px;
  background: var(--color-cobalt);
  border-radius: 50%;
  top: 18px;
}

.robot-face.small .robot-eye {
  width: 6px;
  height: 4px;
  top: 12px;
}

.robot-eye.left {
  left: 12px;
}

.robot-face.small .robot-eye.left {
  left: 8px;
}

.robot-eye.right {
  right: 12px;
}

.robot-face.small .robot-eye.right {
  right: 8px;
}

.robot-mouth {
  position: absolute;
  width: 16px;
  height: 1px;
  background: var(--color-cobalt);
  bottom: 12px;
  border-radius: 2px;
}

.robot-face.small .robot-mouth {
  width: 12px;
  bottom: 8px;
}

.chatbot-info {
  flex: 1;
}

.chatbot-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.chatbot-info p {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.9;
}

.chatbot-toggle i {
  width: 20px;
  height: 20px;
}

.chatbot-window {
  display: none;
  margin-top: 1rem;
  background: var(--bg-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.chatbot-messages {
  height: 300px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Mensajes del Chat */
.message {
  display: flex;
  gap: 0.75rem;
  max-width: 100%;
}

.message.bot {
  align-items: flex-start;
}

.message.user {
  justify-content: flex-end;
}

.message-avatar {
  flex-shrink: 0;
}

.message-content {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--border-color);
  font-size: 0.9rem;
  line-height: 1.4;
}

.message.user .message-content {
  background: linear-gradient(135deg, var(--color-cobalt), var(--color-vivid-blue));
  color: white;
}

.message-content p {
  margin: 0;
}

/* Preguntas Rápidas */
.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.quick-question {
  padding: 0.5rem 0.75rem;
  background: var(--border-color);
  border: none;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-color);
}

.quick-question:hover {
  background: var(--color-vivid-blue);
  color: white;
  transform: translateY(-1px);
}

.chatbot-input {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg-color);
}

.chatbot-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 0.9rem;
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--color-vivid-blue);
}

/* === MODALES DEL DASHBOARD === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-color);
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: popIn 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.close-modal:hover {
  background: var(--border-color);
}

.modal-body {
  padding: 1.5rem;
}

/* Área de Upload */
.upload-instructions {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--card-bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.upload-instructions h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.upload-instructions ul {
  margin: 0;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.upload-area:hover {
  border-color: var(--color-vivid-blue);
  background: rgba(0, 207, 255, 0.05);
}

.upload-area i {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--border-color);
}

.upload-area p {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.upload-area small {
  opacity: 0.6;
}

/* Credenciales */
.credentials-form {
  margin-bottom: 1.5rem;
}

.privacy-notice {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 207, 255, 0.05);
  border-radius: 8px;
  border: 1px solid var(--color-vivid-blue);
  margin-top: 1rem;
}

.privacy-notice i {
  width: 20px;
  height: 20px;
  color: var(--color-vivid-blue);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.privacy-notice p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Notificaciones */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  max-width: 400px;
  z-index: 3000;
  animation: slideInRight 0.3s ease;
}

.notification-success {
  border-left: 4px solid var(--color-success);
}

.notification-warning {
  border-left: 4px solid var(--color-warning);
}

.notification-info {
  border-left: 4px solid var(--color-vivid-blue);
}

.notification-icon i {
  width: 20px;
  height: 20px;
}

.notification-success .notification-icon i {
  color: var(--color-success);
}

.notification-warning .notification-icon i {
  color: var(--color-warning);
}

.notification-info .notification-icon i {
  color: var(--color-vivid-blue);
}

.notification-content {
  flex: 1;
}

.notification-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.notification-content p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.notification-close {
  background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.notification-close:hover {
    opacity: 1;
    background: var(--border-color);
}

/* Loading Spinner */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--color-vivid-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Efectos de Partículas para el Hero --- */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.particle {
    position: absolute;
    background: var(--color-vivid-blue);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 15s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* --- Animaciones Mejoradas --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Dashboard Mockup */
.dashboard-mockup {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--card-bg-color), var(--bg-color));
    border-radius: 8px;
    overflow: hidden;
    font-family: var(--font-primary);
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--nav-bg-color);
    border-bottom: 1px solid var(--border-color);
}

.mockup-logo {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-vivid-blue);
}

.mockup-actions {
    display: flex;
    gap: 0.25rem;
}

.mockup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
}

.mockup-content {
    padding: 1.5rem;
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.kpi-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.mockup-kpi {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-vivid-blue);
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: 0.7rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-container {
    flex: 1;
    display: flex;
    align-items: flex-end;
}

.mockup-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    width: 100%;
    height: 80px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--color-vivid-blue), var(--color-teal));
    border-radius: 4px 4px 0 0;
    animation: chartGrow 2s ease-out;
    transform-origin: bottom;
}

@keyframes chartGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.status-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-item.success .status-dot {
    background: var(--color-success);
    animation: pulse 2s infinite;
}

.status-item.warning .status-dot {
    background: var(--color-warning);
    animation: pulse 2s infinite 1s;
}

.preview-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid var(--color-vivid-blue);
    border-radius: 20px;
    pointer-events: none;
    opacity: 0.5;
    animation: frameGlow 3s ease-in-out infinite;
}

@keyframes frameGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* --- Nuevos Componentes Interactivos --- */
.testimonial-slider {
    margin: 4rem 0;
    padding: 3rem 0;
    background: var(--card-bg-color);
    border-radius: 20px;
}

.testimonial-card {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.client-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--color-vivid-blue), var(--color-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Responsividad Móvil --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    #mobile-menu-btn {
        display: block;
    }
    
    #hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 2rem;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
    #hero p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .dashboard-preview {
        width: 300px;
        height: 200px;
        margin-top: 2rem;
    }
    
    .pricing-card.featured {
        transform: none;
        margin: 1rem 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-width: none;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.25rem;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    /* Dashboard en móvil */
    .dashboard {
        padding: 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
    }
    
    .kpis-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .chatbot-floating {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2rem;
    }
    
    .content-section h2 {
        font-size: 2rem;
    }
    
    .modal-body h2 {
        font-size: 1.3rem;
    }
    
    .hero-logo-image {
        max-width: 200px;
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 1rem 1.25rem;
    }
    
    .modal-body {
        padding: 1.25rem;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .alert {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .alert .btn-small {
        align-self: stretch;
    }
    
    .chatbot-header {
        padding: 1rem;
    }
    
    .chatbot-info h4 {
        font-size: 0.9rem;
    }
    
    .chatbot-info p {
        font-size: 0.75rem;
    }
}