/* 
 * Login Premium Styles - SIST_ADMIN_SMS_V3_2
 * Estética de alta gama con Glassmorphism profundo y efectos dinámicos.
 */

:root {
    --login-bg: #020617;
    --card-bg: rgba(15, 23, 42, 0.4);
    --input-bg: #0A0F1E;
    --accent-blue: #2563eb;
    --accent-indigo: #4f46e5;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1; /* Más claro para nitidez */
    --glass-blur: blur(25px); /* Menos blur para más nitidez */
    --transition-standard: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mr-2 { margin-right: 0.5rem; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden !important; /* Elimina scrolls */
}

.login-body {
    background: radial-gradient(circle at center, #0f172a 0%, #020617 70%) !important; /* Estilo Teatro/Viñeta */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

/* Contenedor de Capas de Fondo */
.bg-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

/* Blobs con Identidad COOPAC */
.blob {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    z-index: 0;
}

.blob-red {
    background: radial-gradient(circle, var(--accent-red), transparent 70%);
    top: -20%;
    left: -10%;
    animation: drift 25s infinite alternate ease-in-out;
}

.blob-green {
    background: radial-gradient(circle, var(--accent-green), transparent 70%);
    top: -10%;
    right: -10%;
    animation: drift 30s infinite alternate-reverse ease-in-out;
}

.blob-blue {
    background: radial-gradient(circle, var(--accent-blue), transparent 70%);
    bottom: -10%;
    left: 20%;
    width: 1000px;
    height: 1000px;
    animation: drift 35s infinite alternate ease-in-out;
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.2); }
}

/* Partículas del Favicon (Colores Originales) */
.favicon-particle {
    position: absolute;
    width: 80px;
    height: 80px;
    background: url('../img/Favicon.png') no-repeat center/contain;
    opacity: 0.15; /* Más visible al ser a color */
    z-index: 1;
}

.part-1 { top: 10%; left: 15%; animation: float-fav 25s infinite linear; }
.part-2 { bottom: 20%; right: 10%; animation: float-fav 30s infinite linear reverse; }
.part-3 { top: 60%; left: 10%; animation: float-fav 35s infinite linear; animation-delay: -5s; }
.part-4 { bottom: 60%; right: 20%; animation: float-fav 40s infinite linear reverse; animation-delay: -10s; }

@keyframes float-fav {
    0% { transform: translate(0, 0) rotate(0deg) scale(0.8); opacity: 0; }
    20% { opacity: 0.15; }
    80% { opacity: 0.15; }
    100% { transform: translate(150px, -250px) rotate(360deg) scale(1.2); opacity: 0; }
}

@keyframes drift {
    0% { transform: rotate(0deg) translate(50px) rotate(0deg); }
    100% { transform: rotate(360deg) translate(50px) rotate(-360deg); }
}

/* Marco Cuadrado Monumental (Líneas Rectas) */
.spectrum-square {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 210vh;  /* MODIFICAR ESTO: Aumentar para alejar, Bajar para acercar */
    height: 210vh;  /* MODIFICAR ESTO: Debe ser igual al width */
    border-radius: 0;
    z-index: 1;
    animation: rotate-square 45s infinite linear;
    border: 4px solid var(--accent-blue);
    box-shadow: 0 0 120px rgba(37, 99, 235, 0.2);
    opacity: 0.2; /* Un poco más de opacidad para que se note */
    pointer-events: none;
}

.spectrum-square::before {
    display: none; /* Eliminamos el espectro para volver al color sólido */
}

@keyframes rotate-square {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Card Principal con Glassmorphism */
.login-card {
    position: relative;
    background: rgba(15, 23, 42, 0.75) !important; /* Más opaco para mejor contraste */
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 3rem !important;
    padding: 3rem 2.5rem !important;
    width: 400px !important;
    max-width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
    z-index: 10;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), 
                border 0.3s ease, 
                box-shadow 0.3s ease;
    animation: card-breath 10s infinite ease-in-out;
    will-change: transform; /* Optimización de hardware */
}

@keyframes card-breath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.025); }
}

.login-card:hover {
    transform: translateY(-8px) scale(1.04); /* Un poco más de elevación */
    border: 2px solid var(--accent-blue) !important; /* Borde más grande y color del botón */
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 
                0 0 20px rgba(37, 99, 235, 0.4) !important; /* Glow color botón */
}

/* Logo Circle Premium - Ajustado para ser redondo y más grande */
.logo-circle {
    width: 125px !important;
    height: 125px !important;
    background: white !important;
    border-radius: 50% !important; /* Círculo perfecto */
    margin: 0 auto 1.5rem auto !important; /* Más cerca del formulario */
    padding: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.brand-text {
    color: var(--accent-blue) !important;
    font-size: 0.75rem !important;
    margin-top: 2px;
}

/* Estilo de Inputs Minimalistas */
.form-group {
    margin-bottom: 2rem !important;
}

.form-group label {
    color: var(--text-secondary) !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.75rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px;
}

.form-control {
    background: var(--input-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 1.2rem !important;
    padding: 14px 20px !important;
    color: white !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.form-control:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    outline: none !important;
}

/* Botón Premium con Efecto Shine */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-indigo) 100%) !important;
    border: none !important;
    border-radius: 1.5rem !important;
    padding: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
    margin-top: 1rem !important;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4) !important;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.btn-primary:hover::after {
    left: 120%;
}

/* Icono de visibilidad */
#togglePassword {
    color: var(--text-secondary) !important;
    transition: color 0.3s ease;
}

#togglePassword:hover {
    color: var(--accent-blue);
}

/* Mensajes de Error */
#message {
    font-size: 0.85rem;
    padding: 10px;
    border-radius: 0.8rem;
    text-align: center;
}

.error-message {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    display: block !important;
}

.success-message {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #22c55e !important;
    border: 1px solid rgba(34, 197, 94, 0.2) !important;
    display: block !important;
}

/* Responsivo */
@media (max-width: 480px) {
    .login-card {
        padding: 2.5rem 1.5rem !important;
        border-radius: 2.5rem !important;
        width: 88% !important;
    }
    
    .logo-circle {
        width: 100px !important;
        height: 100px !important;
        margin-bottom: 2rem !important;
    }

    .form-group {
        margin-bottom: 1.5rem !important;
    }

    .blob-1 { width: 400px; height: 400px; }
    .blob-2 { width: 350px; height: 350px; }
}
