/* ============================================================
   LOGIN MODERNO RESPONSIVE - Sandrita / SADTEC
   Página de autenticación del panel administrativo
   ============================================================ */

html {
    height: 100%;
}

body.login-page {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Reset de pseudo-elementos del tema (mantiene compatibilidad) */
body.login-page:before,
body.login-page:after {
    width: 100%;
    position: static;
    content: normal;
}

h3 {
    margin: 0;
}

/* ---------- Contenedor principal (centrado vertical/horizontal) ---------- */
.login-page .page-back {
    position: relative;
    min-height: 100vh;
    padding: 48px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Orbes decorativos de luz de fondo */
.login-page .page-back::before,
.login-page .page-back::after {
    content: '';
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.login-page .page-back::before {
    width: 380px;
    height: 380px;
    top: -90px;
    left: -70px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.38), transparent 70%);
}

.login-page .page-back::after {
    width: 440px;
    height: 440px;
    bottom: -120px;
    right: -100px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.32), transparent 70%);
}

/* ---------- Logo ---------- */
.login-page .text-center {
    position: relative;
    z-index: 1;
    margin-bottom: 26px;
}

.login-page .text-center img {
    max-width: 100%;
    height: auto;
    max-height: 96px;
    filter: drop-shadow(0 8px 18px rgba(2, 6, 23, 0.35));
}

/* ---------- Tarjetas (login / olvidé / registrar) ---------- */
.login-page #login,
.login-page #forgot_password,
.login-page #register {
    position: relative;
    z-index: 1;
    width: 100%;
}

.login-page .login-form-div {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.login-page .login-content,
.login-page .reg-content {
    position: relative;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 22px;
    padding: 34px 30px 26px;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

/* Franja superior decorativa */
.login-page .login-content::before,
.login-page .reg-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2563eb, #22d3ee, #22c55e);
}

/* ---------- Título ---------- */
.login-page .div-title {
    margin: 0 0 24px;
    text-align: center;
}

.login-page .div-title h3 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #0f172a;
}

/* ---------- Alertas ---------- */
.login-page .alert {
    border-radius: 12px;
    border: 0;
    font-size: 0.92rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.login-page .alert ul {
    margin-bottom: 0;
}

/* ---------- Campos de texto ---------- */
.login-page .textbox-wrap {
    margin-bottom: 16px;
}

.login-page .textbox-wrap .input-group {
    border-radius: 13px;
    overflow: hidden;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.login-page .textbox-wrap .input-group:focus-within {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.login-page .input-group .input-group-addon {
    background: transparent;
    border: 0;
    color: #64748b;
    font-size: 1rem;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    border-radius: 13px 0 0 13px;
}

.login-page .input-group .input-group-addon i {
    padding: 0;
    width: auto;
}

.login-page .input-group .form-control {
    border: 0;
    background: transparent;
    box-shadow: none;
    height: 52px;
    font-size: 1.05rem;
    color: #0f172a;
    border-radius: 0 13px 13px 0 !important;
}

.login-page .input-group .form-control:focus {
    box-shadow: none;
    outline: none;
}

.login-page .input-group .form-control::placeholder {
    color: #94a3b8;
}

/* Botón mostrar/ocultar contraseña */
.login-page #showPasswordBtn {
    background: transparent;
    border: 0;
    color: #64748b;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.login-page #showPasswordBtn:hover {
    color: #2563eb;
}

.login-page #showPasswordBtn:active {
    transform: scale(0.92);
}

/* ---------- Captcha ---------- */
.login-page .div-captcha-left {
    padding-right: 8px;
}

.login-page .div-captcha-right {
    padding-left: 8px;
}

.login-page .div-captcha-left img {
    width: 100%;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
}

/* ---------- Acciones del formulario ---------- */
.login-page .form-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
}

.login-page .checkbox {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.login-page .custom-checkbox {
    float: none;
    margin-right: 8px;
}

.login-page .custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

.login-page .checkbox-text {
    line-height: 22px;
}

.login-page .checkbox label {
    cursor: pointer;
    font-weight: 400;
    margin: 0;
    padding: 0;
    color: #334155;
    font-size: 1rem;
}

/* ---------- Botones ---------- */
.login-page .btn {
    border-radius: 12px !important;
    font-weight: 700;
    letter-spacing: 0.3px;
    font-size: 1.05rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login-page .btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 0;
    color: #fff;
    padding: 12px 28px;
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.34);
}

.login-page .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 0;
    color: #fff;
    padding: 12px 28px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32);
}

.login-page .btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

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

/* ---------- Enlaces (olvidé / registrarme) ---------- */
.login-page .login-form-links {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 16px;
    padding: 18px 20px;
    margin-top: 18px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.login-page .login-form-links h4 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 6px;
}

.login-page .login-form-links span {
    color: #475569;
    font-size: 1rem;
    line-height: 1.5;
}

.login-page .login-form-links a {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Formulario de registro ---------- */
.login-page .registration-form-div {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

.login-page .registration-form-action {
    background: transparent;
    padding: 20px;
}

.login-page .registration-left-div {
    padding-left: 0;
    padding-right: 8px;
}

.login-page .registration-right-div {
    padding-left: 8px;
    padding-right: 0;
}

.login-page .reg-content .form-group label {
    font-weight: 600;
    color: #0f172a;
    font-size: 1rem;
    display: block;
    margin-bottom: 6px;
}

.login-page .reg-content .form-group {
    margin-bottom: 18px;
}

.login-page .help-block {
    color: #64748b;
    font-size: 0.92rem;
    margin-top: 6px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .login-page .page-back {
        padding: 28px 14px;
    }

    .login-page .login-content,
    .login-page .reg-content {
        padding: 26px 20px 22px;
        border-radius: 18px;
    }

    .login-page .div-title h3 {
        font-size: 1.35rem;
    }

    .login-page .form-action {
        flex-direction: column;
        align-items: stretch;
    }

    .login-page .form-action .btn {
        width: 100%;
    }

    .login-page .checkbox {
        justify-content: center;
    }

    /* Captcha en columna */
    .login-page .div-captcha-left,
    .login-page .div-captcha-right {
        width: 100%;
        float: none;
        padding: 0;
    }

    .login-page .div-captcha-right {
        margin-top: 12px;
    }

    /* Botones del registro apilados */
    .login-page .reg-content .col-sm-12 .btn {
        width: 100%;
        float: none;
        display: block;
        margin: 6px 0;
    }

    /* Registro en columna única */
    .login-page .registration-left-div,
    .login-page .registration-right-div {
        padding: 0;
    }
}

@media (max-width: 380px) {
    .login-page .login-content,
    .login-page .reg-content {
        padding: 22px 16px 18px;
    }

    .login-page .text-center {
        margin-bottom: 18px;
    }
}

/* ---------- Alertas del formulario (error / éxito / aviso) ---------- */
.login-page .alert {
    position: relative;
    padding: 15px 16px 15px 18px;
    border: 0;
    border-left: 4px solid transparent;
    border-radius: 14px;
    font-size: 1rem;
    line-height: 1.5;
}

.login-page .alert .close {
    opacity: 0.5;
    font-size: 1.1rem;
}

.login-page .alert .close:hover {
    opacity: 1;
}

.login-page .alert-danger {
    background: linear-gradient(90deg, #fef2f2, #fee2e2);
    color: #991b1b;
    border-left-color: #ef4444;
}

.login-page .alert-success {
    background: linear-gradient(90deg, #f0fdf4, #dcfce7);
    color: #166534;
    border-left-color: #22c55e;
}

.login-page .alert-warning {
    background: linear-gradient(90deg, #fffbeb, #fef3c7);
    color: #92400e;
    border-left-color: #f59e0b;
}

.login-page .alert ul.list-group {
    margin: 0;
    list-style: none;
    padding: 0;
}

.login-page .alert ul.list-group li {
    margin: 4px 0;
}