/**
 * Login Page Styles - POS CESIT
 * Diseño moderno con fondo dinámico (video/carrusel)
 * Glassmorphism sutil y animaciones suaves
 */

/* ========================================
   RESET Y BASE
   ======================================== */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   FONDO DINÁMICO
   ======================================== */

/* Video de fondo */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Carrusel de imágenes */
.background-carousel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.background-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.background-carousel img.active {
    opacity: 1;
}

/* Overlay oscuro para legibilidad del texto */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 50% oscuridad */
    z-index: -1;
}

/* ========================================
   CONTENEDOR DE LOGIN
   ======================================== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

/* ========================================
   CARD DE LOGIN
   ======================================== */
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.15); /* Glassmorphism sutil */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 2.5rem 2rem;

    /* Animación de entrada fade-in + slide-up */
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   LOGO Y TIPOGRAFÍA
   ======================================== */
.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-logo p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ========================================
   FORMULARIO
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* ========================================
   BOTÓN PRINCIPAL
   ======================================== */
.btn-primary {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   ALERT MESSAGES
   ======================================== */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   UTILIDADES
   ======================================== */
.mt-2 {
    margin-top: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 0.875rem 1rem;
    font-size: 1rem;
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-logo h1 {
        font-size: 1.75rem;
    }

    .login-logo p {
        font-size: 0.85rem;
    }
}

/* ========================================
   FALLBACK PARA NAVEGADORES SIN BACKDROP-FILTER
   ======================================== */
@supports not (backdrop-filter: blur(10px)) {
    .login-card {
        background: rgba(255, 255, 255, 0.25);
    }
}
