/* ============================================
   LOGIN PAGE - CLEAN & SPACIOUS DESIGN
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url(../img/bg2.png);
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
main {
    width: 100%;
    padding: 40px 30px;
    position: relative;
    z-index: 1;
    min-height: auto;
}

/* ============================================
   LOGIN CARD - MÁS ANCHO Y ESPACIOSO
   ============================================ */
.container__login {
    background: white;
    width: 100%;
    max-width: 520px;
    border-radius: 24px;
    padding: 60px 70px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    animation: slideInUp 0.5s ease-out;
    position: relative;
    margin: 0 auto;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LOGO Y TÍTULO
   ============================================ */
.login__img {
    text-align: center;
    margin-bottom: 15px;
}

.img__logo {
    width: 100%;
    max-width: 300px;
    height: auto;
    animation: fadeIn 0.8s ease-out;
}

.login__title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   FORMULARIO
   ============================================ */
.form__group {
    margin-bottom: 35px;
}

.form__label {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.form__label i {
    color: #667eea;
    margin-right: 8px;
}

/* Input Groups - Diseño Limpio */
.input-group-modern {
    position: relative;
    display: flex;
    width: 100%;
}

.input-group-modern .input-group-prepend {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 2;
}

.input-group-modern .input-group-text {
    background: transparent;
    border: none;
    color: #9ca3af;
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.input-group-modern .form-control {
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 20px 16px 55px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
    color: #1f2937;
}

.input-group-modern .form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-group-modern .form-control:focus ~ .input-group-prepend .input-group-text {
    color: #667eea;
}

.input-group-modern .form-control::placeholder {
    color: #9ca3af;
}

/* ============================================
   BOTONES
   ============================================ */
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 14px;
    color: white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* Botón de Microsoft */
.btn-microsoft {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 14px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-microsoft:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.btn-microsoft:active {
    transform: translateY(0);
}

.btn-microsoft svg {
    flex-shrink: 0;
}

/* ============================================
   SEPARADOR
   ============================================ */
.separator {
    position: relative;
    text-align: center;
    margin: 35px 0;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.separator__text {
    position: relative;
    display: inline-block;
    background: white;
    padding: 0 20px;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================
   MENSAJES DE ALERTA
   ============================================ */
#aviso {
    margin-bottom: 25px;
}

#aviso .alert {
    border: none;
    border-radius: 14px;
    padding: 16px 20px;
    font-weight: 500;
    animation: shake 0.5s ease-out;
}

#aviso .alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container__login {
        padding: 50px 50px;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    main {
        padding: 20px;
    }

    .container__login {
        padding: 40px 30px;
        border-radius: 20px;
    }

    .login__img {
        margin-bottom: 40px;
    }

    .img__logo {
        max-width: 240px;
    }

    .form__group {
        margin-bottom: 28px;
    }

    .input-group-modern .form-control {
        padding: 14px 18px 14px 50px;
        font-size: 0.95rem;
    }

    .btn-login {
        padding: 16px 20px;
        font-size: 1rem;
    }

    .btn-microsoft {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .separator {
        margin: 28px 0;
    }
}

@media (max-width: 400px) {
    .container__login {
        padding: 35px 25px;
    }

    .img__logo {
        max-width: 200px;
    }

    .form__group {
        margin-bottom: 25px;
    }
}

/* ============================================
   ANIMACIONES ADICIONALES
   ============================================ */

/* Efecto de pulsación en el botón */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.btn-login:focus {
    animation: pulse 0.5s ease-out;
}
