/* ==========================================================================
   THEME LOGIN — JURISCONSULTAWEB
   Paleta institucional:
   Azul oscuro:  #061E33
   Azul medio:   #0C3D63
   Naranja:      #F47A00
   Blanco:       #FFFFFF
========================================================================== */

/* --------------------------------------------------------------------------
   VARIABLES
-------------------------------------------------------------------------- */

.theme-jurisconsulta {
    --jc-navy-950: #041524;
    --jc-navy-900: #061e33;
    --jc-navy-800: #082b48;
    --jc-blue-700: #0c3d63;
    --jc-blue-600: #14517f;
    --jc-orange-600: #f47a00;
    --jc-orange-500: #ff8a12;
    --jc-white: #ffffff;
    --jc-surface: #f7f9fc;
    --jc-border: #d9e1ea;
    --jc-text: #10243b;
    --jc-muted: #65758a;
    --jc-danger: #dc3545;
    --jc-success: #198754;

    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    color: var(--jc-text);
    background:
        radial-gradient(circle at 12% 14%, rgba(12, 61, 99, .12), transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(244, 122, 0, .10), transparent 28%),
        linear-gradient(135deg, #edf2f7 0%, #f9fbfd 55%, #eef3f8 100%);
}

/* --------------------------------------------------------------------------
   CONTENEDOR PRINCIPAL
-------------------------------------------------------------------------- */

.jurisconsulta-shell {
    width: 100%;
    max-width: 1080px;
    min-height: 570px;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    overflow: hidden;
    border: 1px solid rgba(6, 30, 51, .08);
    border-radius: 18px;
    background: var(--jc-white);
    box-shadow: 0 28px 85px rgba(6, 30, 51, .18);
}

/* --------------------------------------------------------------------------
   PANEL DE MARCA
-------------------------------------------------------------------------- */

.jurisconsulta-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
    color: var(--jc-white);
    background:
        linear-gradient(145deg, rgba(6, 30, 51, .98), rgba(12, 61, 99, .96)),
        var(--jc-navy-900);
}

.jurisconsulta-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(
            155deg,
            transparent 0 52%,
            rgba(2, 14, 24, .45) 52% 100%
        );
}

.jurisconsulta-brand-shape {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.jurisconsulta-brand-shape--one {
    width: 620px;
    height: 620px;
    top: -300px;
    right: -170px;
    background: rgba(20, 81, 127, .42);
}

.jurisconsulta-brand-shape--two {
    width: 330px;
    height: 330px;
    left: -150px;
    bottom: -130px;
    background: rgba(244, 122, 0, .12);
}

.jurisconsulta-brand-dots {
    position: absolute;
    top: 26px;
    left: 24px;
    width: 160px;
    height: 120px;
    opacity: .24;
    background-image: radial-gradient(
        circle,
        rgba(255, 255, 255, .52) 2px,
        transparent 2.5px
    );
    background-size: 18px 18px;
}

.jurisconsulta-brand-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    text-align: center;
}

.jurisconsulta-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 320px);
    min-height: 140px;
    margin: 0 auto 22px;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, .88);
    border-radius: 28px;
    background: rgba(255, 255, 255, .025);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .12),
        0 22px 45px rgba(0, 0, 0, .16);
}

.jurisconsulta-brand .login-logo {
    display: block;
    width: 100%;
    max-width: 260px;
    max-height: 110px;
    object-fit: contain;
}

.jurisconsulta-brand .login-logo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 20px;
    background: var(--jc-orange-600);
    color: var(--jc-white);
    font-size: 2.2rem;
    font-weight: 900;
}

.jurisconsulta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    margin-bottom: 20px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .94);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.jurisconsulta-badge i {
    color: var(--jc-orange-500);
}

.jurisconsulta-brand h1 {
    margin: 0;
    color: var(--jc-white);
    font-size: clamp(2.3rem, 4vw, 4rem);
    font-weight: 950;
    line-height: .96;
    letter-spacing: -.055em;
    text-transform: uppercase;
    text-shadow: 0 14px 32px rgba(0, 0, 0, .20);
}

.jurisconsulta-brand h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin: 16px auto 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--jc-orange-600),
        var(--jc-orange-500)
    );
}

.jurisconsulta-brand h2 {
    max-width: 480px;
    margin: 18px auto 0;
    color: rgba(255, 255, 255, .96);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    font-weight: 800;
    line-height: 1.35;
}

.jurisconsulta-brand-text {
    max-width: 480px;
    margin: 12px auto 0;
    color: rgba(255, 255, 255, .78);
    font-size: .92rem;
    line-height: 1.6;
}

.jurisconsulta-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.jurisconsulta-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: rgba(255, 255, 255, .92);
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.jurisconsulta-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: var(--jc-orange-500);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* --------------------------------------------------------------------------
   ÁREA DEL FORMULARIO
-------------------------------------------------------------------------- */

.jurisconsulta-form-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 54px 28px;
    background:
        radial-gradient(circle at 92% 8%, rgba(12, 61, 99, .045), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.jurisconsulta-form-box {
    width: 100%;
    max-width: 370px;
}

.jurisconsulta-mobile-brand {
    display: none;
}

.jurisconsulta-form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    color: #8795a6;
    font-size: .78rem;
    font-weight: 650;
}

/* --------------------------------------------------------------------------
   TARJETA EXISTENTE DEL FRAMEWORK
-------------------------------------------------------------------------- */

.theme-jurisconsulta .login-card {
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.theme-jurisconsulta .login-card > .login-logo,
.theme-jurisconsulta .login-card > .login-logo-placeholder {
    display: none;
}

.theme-jurisconsulta .login-title {
    position: relative;
    margin-bottom: 10px;
    color: var(--jc-navy-900);
    font-size: clamp(1.5rem, 2vw, 1.9rem);
    font-weight: 950;
    line-height: 1.15;
    letter-spacing: -.03em;
    text-align: center;
}

.theme-jurisconsulta .login-title::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: var(--jc-orange-600);
}

.theme-jurisconsulta .login-subtitle {
    margin-bottom: 22px;
    color: var(--jc-muted);
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
}

/* --------------------------------------------------------------------------
   CAMPOS
-------------------------------------------------------------------------- */

.theme-jurisconsulta .form-label {
    display: block;
    margin-bottom: .55rem;
    color: var(--jc-navy-900);
    font-size: .9rem;
    font-weight: 800;
}

.theme-jurisconsulta .form-control {
    min-height: 48px;
    border: 1px solid var(--jc-border);
    border-radius: 10px;
    background: var(--jc-white);
    padding: .7rem 1rem;
    color: var(--jc-text);
    font-size: .95rem;
    box-shadow: none;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease;
}

.theme-jurisconsulta .form-control::placeholder {
    color: #8b98a9;
}

.theme-jurisconsulta .form-control:hover {
    border-color: #b8c5d4;
}

.theme-jurisconsulta .form-control:focus {
    border-color: var(--jc-orange-600);
    background: var(--jc-white);
    box-shadow: 0 0 0 .22rem rgba(244, 122, 0, .14);
}

.theme-jurisconsulta .form-check-input {
    border-color: #b9c4d0;
}

.theme-jurisconsulta .form-check-input:checked {
    border-color: var(--jc-orange-600);
    background-color: var(--jc-orange-600);
}

.theme-jurisconsulta .form-check-input:focus {
    border-color: var(--jc-orange-600);
    box-shadow: 0 0 0 .2rem rgba(244, 122, 0, .15);
}

.theme-jurisconsulta .form-check-label {
    color: #32465d;
    font-size: .9rem;
}

/* --------------------------------------------------------------------------
   ICONOS AUTOMÁTICOS EN CAMPOS CON IDS CONOCIDOS
-------------------------------------------------------------------------- */

.theme-jurisconsulta .mb-3:has(#login),
.theme-jurisconsulta .mb-3:has(#usuario),
.theme-jurisconsulta .mb-3:has(#correo),
.theme-jurisconsulta .mb-3:has(#password),
.theme-jurisconsulta .mb-3:has(#pwd),
.theme-jurisconsulta .mb-3:has(#password2) {
    position: relative;
}

.theme-jurisconsulta .mb-3:has(#login)::before,
.theme-jurisconsulta .mb-3:has(#usuario)::before {
    content: "\f007";
}

.theme-jurisconsulta .mb-3:has(#correo)::before {
    content: "\f0e0";
}

.theme-jurisconsulta .mb-3:has(#password)::before,
.theme-jurisconsulta .mb-3:has(#pwd)::before,
.theme-jurisconsulta .mb-3:has(#password2)::before {
    content: "\f023";
}

.theme-jurisconsulta .mb-3:has(#login)::before,
.theme-jurisconsulta .mb-3:has(#usuario)::before,
.theme-jurisconsulta .mb-3:has(#correo)::before,
.theme-jurisconsulta .mb-3:has(#password)::before,
.theme-jurisconsulta .mb-3:has(#pwd)::before,
.theme-jurisconsulta .mb-3:has(#password2)::before {
    position: absolute;
    top: 39px;
    left: 15px;
    z-index: 4;
    color: #7f8ca0;
    font-family: "Font Awesome 6 Free";
    font-size: 14px;
    font-weight: 900;
    pointer-events: none;
}

.theme-jurisconsulta #login,
.theme-jurisconsulta #usuario,
.theme-jurisconsulta #correo,
.theme-jurisconsulta #password,
.theme-jurisconsulta #pwd,
.theme-jurisconsulta #password2 {
    padding-left: 42px !important;
}

/* --------------------------------------------------------------------------
   PASSWORD + BOTÓN MOSTRAR
-------------------------------------------------------------------------- */

.theme-jurisconsulta .input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.theme-jurisconsulta .input-group.has-validation .form-control.login-password-input {
    flex: 1 1 auto;
    width: 1%;
    min-height: 48px;
    border-right: 0;
    border-radius: 10px 0 0 10px !important;
    padding-right: 1rem !important;
    background-image: none !important;
}

.theme-jurisconsulta .input-group.has-validation .btn-toggle-password {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-height: 48px;
    border: 1px solid var(--jc-border);
    border-left: 1px solid var(--jc-border);
    border-radius: 0 10px 10px 0 !important;
    background: #f8fafc;
    color: #748196;
    transition:
        color .18s ease,
        background-color .18s ease,
        border-color .18s ease;
}

.theme-jurisconsulta .input-group.has-validation .btn-toggle-password:hover,
.theme-jurisconsulta .input-group.has-validation .btn-toggle-password:focus {
    border-color: var(--jc-orange-600);
    background: #fff7ef;
    color: var(--jc-orange-600);
    box-shadow: none;
}

.theme-jurisconsulta .input-group.has-validation:focus-within .form-control,
.theme-jurisconsulta .input-group.has-validation:focus-within .btn-toggle-password {
    border-color: var(--jc-orange-600);
}

.theme-jurisconsulta .input-group.has-validation:focus-within {
    border-radius: 10px;
    box-shadow: 0 0 0 .22rem rgba(244, 122, 0, .14);
}

.theme-jurisconsulta .input-group.has-validation:focus-within .form-control {
    box-shadow: none;
}

.theme-jurisconsulta .input-group.has-validation .invalid-feedback,
.theme-jurisconsulta .input-group.has-validation .valid-feedback {
    flex-basis: 100%;
    width: 100%;
    margin-top: .35rem;
}

/* --------------------------------------------------------------------------
   VALIDACIONES
-------------------------------------------------------------------------- */

.theme-jurisconsulta .was-validated .form-control:valid,
.theme-jurisconsulta .form-control.is-valid {
    border-color: var(--jc-success);
}

.theme-jurisconsulta .was-validated .form-control:invalid,
.theme-jurisconsulta .form-control.is-invalid {
    border-color: var(--jc-danger);
}

.theme-jurisconsulta .invalid-feedback {
    color: var(--jc-danger);
    font-size: .83rem;
}

.theme-jurisconsulta .valid-feedback {
    color: var(--jc-success);
    font-size: .83rem;
}

/* --------------------------------------------------------------------------
   BOTÓN PRINCIPAL
-------------------------------------------------------------------------- */

.theme-jurisconsulta .btn-login {
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            var(--jc-blue-700) 0%,
            var(--jc-navy-900) 100%
        );
    color: var(--jc-white);
    font-size: .9rem;
    font-weight: 850;
    letter-spacing: .015em;
    box-shadow: 0 14px 28px rgba(6, 30, 51, .20);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.theme-jurisconsulta .btn-login:hover,
.theme-jurisconsulta .btn-login:focus {
    color: var(--jc-white);
    background:
        linear-gradient(
            90deg,
            var(--jc-orange-600) 0%,
            var(--jc-orange-500) 100%
        );
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(244, 122, 0, .24);
}

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

/* --------------------------------------------------------------------------
   ENLACES
-------------------------------------------------------------------------- */

.theme-jurisconsulta .login-links a,
.theme-jurisconsulta .login-card a {
    color: var(--jc-blue-700);
    font-weight: 750;
    text-decoration: none;
}

.theme-jurisconsulta .login-links a:hover,
.theme-jurisconsulta .login-card a:hover {
    color: var(--jc-orange-600);
    text-decoration: underline;
}

.theme-jurisconsulta .login-footer-text {
    color: #8795a6;
    font-size: .8rem;
}

/* --------------------------------------------------------------------------
   ALERTAS
-------------------------------------------------------------------------- */

.theme-jurisconsulta .alert {
    border: 0;
    border-left: 4px solid currentColor;
    border-radius: 8px;
    font-size: .9rem;
}

.theme-jurisconsulta .alert-danger {
    color: #9f2633;
    background: #fff1f3;
}

.theme-jurisconsulta .alert-success {
    color: #146c43;
    background: #edf9f2;
}

.theme-jurisconsulta .alert-warning {
    color: #8a5700;
    background: #fff7e6;
}

/* --------------------------------------------------------------------------
   CAPTCHA
-------------------------------------------------------------------------- */

.theme-jurisconsulta .g-recaptcha {
    max-width: 100%;
    transform-origin: left top;
}

/* --------------------------------------------------------------------------
   ANIMACIONES
-------------------------------------------------------------------------- */

@keyframes jurisconsultaFadeLeft {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes jurisconsultaFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jurisconsulta-brand-content {
    animation: jurisconsultaFadeLeft .55s ease both;
}

.jurisconsulta-form-box {
    animation: jurisconsultaFadeUp .55s .08s ease both;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
-------------------------------------------------------------------------- */

@media (max-width: 1180px) {
    .jurisconsulta-shell {
        grid-template-columns: 1fr 1fr;
        min-height: 540px;
    }

    .jurisconsulta-brand {
        padding: 42px 32px;
    }

    .jurisconsulta-form-area {
        padding: 40px 32px 24px;
    }

    .jurisconsulta-logo-wrap {
        min-height: 120px;
    }

    .jurisconsulta-features {
        gap: 10px;
    }
}

@media (max-width: 991px) {
    .theme-jurisconsulta {
        padding: 0;
    }

    .jurisconsulta-shell {
        min-height: 100vh;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .jurisconsulta-brand {
        display: none;
    }

    .jurisconsulta-form-area {
        min-height: 100vh;
        justify-content: center;
        padding: 32px 20px 24px;
    }

    .jurisconsulta-mobile-brand {
        display: block;
        width: 100%;
        max-width: 400px;
        margin: 0 auto 22px;
        text-align: center;
    }

    .jurisconsulta-mobile-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 10px;
    }

    .jurisconsulta-mobile-logo .login-logo {
        display: block;
        width: auto;
        max-width: 200px;
        max-height: 90px;
        object-fit: contain;
    }

    .jurisconsulta-mobile-logo .login-logo-placeholder {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 64px;
        height: 64px;
        border-radius: 16px;
        background: var(--jc-navy-900);
        color: var(--jc-white);
        font-size: 1.5rem;
        font-weight: 900;
    }

    .jurisconsulta-mobile-title {
        color: var(--jc-navy-900);
        font-size: .9rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .jurisconsulta-form-box {
        max-width: 370px;
    }
}

@media (max-width: 576px) {
    .jurisconsulta-form-area {
        padding: 24px 18px 20px;
    }

    .jurisconsulta-mobile-brand {
        margin-bottom: 18px;
    }

    .jurisconsulta-mobile-logo .login-logo {
        max-width: 170px;
        max-height: 76px;
    }

    .theme-jurisconsulta .login-title {
        font-size: 1.4rem;
    }

    .theme-jurisconsulta .login-subtitle {
        margin-bottom: 18px;
        font-size: .88rem;
    }

    .theme-jurisconsulta .form-control,
    .theme-jurisconsulta .input-group.has-validation .form-control.login-password-input,
    .theme-jurisconsulta .input-group.has-validation .btn-toggle-password,
    .theme-jurisconsulta .btn-login {
        min-height: 46px;
    }

    .jurisconsulta-form-footer {
        flex-wrap: wrap;
        margin-top: 18px;
        text-align: center;
    }

    .jurisconsulta-form-box {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jurisconsulta-brand-content,
    .jurisconsulta-form-box {
        animation: none;
    }

    .theme-jurisconsulta *,
    .theme-jurisconsulta *::before,
    .theme-jurisconsulta *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
