/* =====================================================
   CONFIGURACIÓN GENERAL
   ===================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(
            135deg,
            rgba(5, 76, 120, 0.93),
            rgba(7, 126, 184, 0.86)
        ),
        url("/img/fondo_login_admin.jpg") center center / cover fixed;
}


/* =====================================================
   CONTENEDOR PRINCIPAL
   ===================================================== */

.login-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.login-container {
    width: 100%;
    max-width: 460px;
}


/* =====================================================
   LOGOTIPO
   ===================================================== */

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    width: 190px;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.18));
}


/* =====================================================
   TARJETA DEL LOGIN
   ===================================================== */

.login-card {
    width: 100%;
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.23);
}


/* =====================================================
   ENCABEZADO DEL LOGIN
   ===================================================== */

.login-header {
    padding: 32px 35px 20px;
    text-align: center;
}

.login-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 17px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 29px;
    border-radius: 50%;
    background: linear-gradient(135deg, #087db8, #045a86);
    box-shadow: 0 8px 20px rgba(8, 125, 184, 0.3);
}

.login-header h1 {
    margin: 0 0 8px;
    color: #18354a;
    font-size: 27px;
    font-weight: 700;
}

.login-header p {
    margin: 0;
    color: #71808c;
    font-size: 15px;
    line-height: 1.5;
}


/* =====================================================
   FORMULARIO
   ===================================================== */

#formLogin {
    padding: 8px 35px 30px;
}

#formLogin .form-group {
    margin-bottom: 21px;
}

#formLogin label {
    display: block;
    margin-bottom: 8px;
    color: #344b5b;
    font-size: 14px;
    font-weight: 700;
}

#formLogin label i {
    width: 22px;
    color: #087db8;
    text-align: center;
    margin-right: 4px;
}


/* =====================================================
   CAMPOS DE TEXTO
   ===================================================== */

.input-container {
    position: relative;
}

#formLogin .form-control {
    width: 100%;
    height: 50px;
    color: #2f4350;
    font-size: 15px;
    background-color: #f7f9fb;
    border: 1px solid #d8e0e6;
    border-radius: 10px;
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

#formLogin input.form-control {
    padding: 10px 48px 10px 15px;
}

#formLogin .form-control::placeholder {
    color: #a3adb5;
}

#formLogin .form-control:hover {
    border-color: #aebdc7;
}

#formLogin .form-control:focus {
    color: #243a48;
    background-color: #ffffff;
    border-color: #087db8;
    box-shadow: 0 0 0 3px rgba(8, 125, 184, 0.12);
    outline: none;
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 17px;
    color: #91a1ab;
    font-size: 17px;
    pointer-events: none;
    transform: translateY(-50%);
}

.input-container:focus-within .input-icon {
    color: #087db8;
}


/* =====================================================
   SELECT DE ESCUELAS
   ===================================================== */

#formLogin select.form-control {
    padding: 8px 38px 8px 15px;
    cursor: pointer;
}


/* =====================================================
   ESTILOS PARA CHOSEN
   ===================================================== */

#formLogin .chosen-container {
    width: 100% !important;
    font-size: 15px;
}

#formLogin .chosen-container-single .chosen-single {
    height: 50px;
    padding: 0 42px 0 15px;
    display: flex;
    align-items: center;
    color: #2f4350;
    background: #f7f9fb;
    border: 1px solid #d8e0e6;
    border-radius: 10px;
    box-shadow: none;
}

#formLogin .chosen-container-single .chosen-single span {
    line-height: normal;
}

#formLogin .chosen-container-single .chosen-single div {
    width: 38px;
}

#formLogin .chosen-container-single .chosen-single div b {
    background-position: 8px 15px;
}

#formLogin .chosen-container-active .chosen-single {
    background: #ffffff;
    border-color: #087db8;
    box-shadow: 0 0 0 3px rgba(8, 125, 184, 0.12);
}

#formLogin .chosen-container .chosen-drop {
    margin-top: 6px;
    border: 1px solid #d8e0e6;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.14);
}

#formLogin .chosen-container-single .chosen-search input[type="text"] {
    height: 39px;
    padding: 8px 12px;
    border: 1px solid #d8e0e6;
    border-radius: 7px;
    background: none;
}

#formLogin .chosen-container .chosen-results li {
    padding: 10px 12px;
}

#formLogin .chosen-container .chosen-results li.highlighted {
    color: #ffffff;
    background: #087db8;
}


/* =====================================================
   MENSAJE DE ERROR
   ===================================================== */

.login-message {
    margin-bottom: 20px;
    padding: 12px 15px;
    color: #842029;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 9px;
}


/* =====================================================
   BOTÓN INGRESAR
   ===================================================== */

.btn-login {
    width: 100%;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #087db8, #045a86);
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(8, 125, 184, 0.27);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.btn-login:hover {
    color: #ffffff;
    box-shadow: 0 11px 25px rgba(8, 125, 184, 0.36);
    transform: translateY(-2px);
}

.btn-login:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(8, 125, 184, 0.2);
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}


/* =====================================================
   PIE DE LA TARJETA
   ===================================================== */

.login-footer {
    padding: 17px 20px;
    color: #71808c;
    font-size: 13px;
    text-align: center;
    background-color: #f7f9fb;
    border-top: 1px solid #e8edf1;
}

.login-footer i {
    margin-right: 6px;
    color: #087db8;
}


/* =====================================================
   AJUSTES PARA TABLETAS
   ===================================================== */

@media (max-width: 768px) {

    .login-page {
        padding: 30px 18px;
    }

    .login-logo img {
        width: 170px;
    }

}


/* =====================================================
   AJUSTES PARA CELULARES
   ===================================================== */

@media (max-width: 480px) {

    .login-page {
        align-items: flex-start;
        padding: 22px 14px;
    }

    .login-logo {
        margin-bottom: 15px;
    }

    .login-logo img {
        width: 145px;
    }

    .login-card {
        border-radius: 14px;
    }

    .login-header {
        padding: 25px 22px 17px;
    }

    .login-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 14px;
        font-size: 25px;
    }

    .login-header h1 {
        font-size: 23px;
    }

    .login-header p {
        font-size: 14px;
    }

    #formLogin {
        padding: 7px 22px 25px;
    }

    #formLogin .form-control,
    #formLogin .chosen-container-single .chosen-single {
        height: 48px;
    }

    .btn-login {
        height: 50px;
    }

}