/* =========================================
   LOGIN - VARIABLES
========================================= */

:root {
    --login-menu: #182431;
    --login-menu-profundo: #101b25;
    --login-principal: #b77845;
    --login-acento: #d3a477;
    --login-fondo: #f7f5f2;
    --login-superficie: #ffffff;
    --login-texto: #1d2935;
    --login-texto-suave: #657383;
    --login-borde: #e8ded4;
}


/* =========================================
   LOGIN - BODY
========================================= */

.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--login-fondo);
    color: var(--login-texto);
    font-family: "Inter", sans-serif;
}


/* =========================================
   LOGIN - ESTRUCTURA GENERAL
========================================= */

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(460px, 0.92fr);
}

.login-presentation {
    position: relative;
    min-height: 100vh;
    padding: 42px 58px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 78% 22%,
            rgba(211, 164, 119, 0.24),
            transparent 28%
        ),
        radial-gradient(
            circle at 12% 78%,
            rgba(183, 120, 69, 0.18),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            var(--login-menu-profundo),
            var(--login-menu)
        );
}

.login-presentation::before {
    content: "";
    position: absolute;
    top: -140px;
    right: -120px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
}

.login-presentation::after {
    content: "";
    position: absolute;
    right: 56px;
    bottom: 76px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(211, 164, 119, 0.18);
    border-radius: 50%;
}

.login-access {
    min-height: 100vh;
    padding: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(
            circle at 92% 8%,
            rgba(211, 164, 119, 0.18),
            transparent 26%
        ),
        var(--login-fondo);
}


/* =========================================
   LOGIN - MARCA
========================================= */

.login-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(
        135deg,
        var(--login-acento),
        var(--login-principal)
    );
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.login-brand-copy {
    display: flex;
    flex-direction: column;
}

.login-brand-name {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.07em;
}

.login-brand-description {
    margin-top: 2px;
    color: #bfd0dc;
    font-size: 12px;
}


/* =========================================
   LOGIN - PRESENTACION
========================================= */

.login-presentation-content {
    position: relative;
    z-index: 2;
    width: min(660px, 100%);
    margin: auto 0;
}

.login-eyebrow {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--login-acento);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.login-presentation-content h1 {
    margin: 0;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.login-presentation-content p {
    max-width: 590px;
    margin: 26px 0 32px;
    color: #c8d5de;
    font-size: 17px;
    line-height: 1.75;
}

.login-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.login-feature-item {
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e7edf1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
}

.login-feature-item i {
    color: var(--login-acento);
    font-size: 17px;
}

.login-feature-item span {
    font-size: 13px;
    font-weight: 700;
}

.login-presentation-footer {
    position: relative;
    z-index: 2;
    color: #8fa3b2;
    font-size: 12px;
}


/* =========================================
   LOGIN - CARD PRINCIPAL
========================================= */

.login-container {
    width: 100%;
    max-width: 470px;
    padding: 40px;
    border: 1px solid var(--login-borde);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 26px 70px rgba(24, 36, 49, 0.12);
    backdrop-filter: blur(12px);
}


/* =========================================
   LOGIN - ENCABEZADO
========================================= */

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

.logo-circle {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(
        135deg,
        var(--login-acento),
        var(--login-principal)
    );
    box-shadow: 0 14px 32px rgba(183, 120, 69, 0.26);
}

.login-title {
    margin-bottom: 8px;
    color: var(--login-texto);
    font-size: 29px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.login-subtitle {
    color: var(--login-texto-suave);
    font-size: 14px;
}


/* =========================================
   LOGIN - FORMULARIO
========================================= */

.login-form-group {
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    margin-bottom: 9px;
    color: var(--login-texto);
    font-size: 13px;
    font-weight: 800;
}

.login-input-wrapper {
    position: relative;
}

.login-input-wrapper > i {
    position: absolute;
    top: 50%;
    left: 15px;
    color: #87939d;
    font-size: 17px;
    transform: translateY(-50%);
}

.login-form-group input {
    width: 100%;
    height: 52px;
    padding: 0 46px;
    border: 1px solid #dce2e6;
    border-radius: 14px;
    outline: none;
    color: var(--login-texto);
    font-size: 14px;
    background: #f9fafb;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.login-form-group input::placeholder {
    color: #9aa4ad;
}

.login-form-group input:focus {
    border-color: var(--login-principal);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(183, 120, 69, 0.13);
}

.btn-toggle-password {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b8790;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.btn-toggle-password:hover {
    color: var(--login-principal);
    background: #f1e7dd;
}


/* =========================================
   LOGIN - BOTON
========================================= */

.btn-login {
    width: 100%;
    height: 52px;
    margin-top: 4px;
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(
        135deg,
        var(--login-principal),
        #9b5f34
    );
    box-shadow: 0 14px 28px rgba(183, 120, 69, 0.24);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(183, 120, 69, 0.3);
}


/* =========================================
   LOGIN - LINKS
========================================= */

.login-links {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
}

.login-links a {
    color: #6f5a49;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-links a:hover {
    color: var(--login-principal);
}


/* =========================================
   LOGIN - FOOTER
========================================= */

.login-footer {
    margin-top: 28px;
    color: #9aa4ad;
    font-size: 12px;
    text-align: center;
}


/* =========================================
   MODAL - OVERLAY
========================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(16, 27, 37, 0.72);
    backdrop-filter: blur(6px);
}


/* =========================================
   MODAL - CONTENEDOR
========================================= */

.custom-modal {
    width: min(620px, 100%);
    max-height: calc(100vh - 44px);
    overflow: hidden;
    border: 1px solid var(--login-borde);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
}

.custom-modal-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--login-borde);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.custom-modal-header h2 {
    margin: 4px 0 0;
    color: var(--login-texto);
    font-size: 21px;
    font-weight: 900;
}

.custom-modal-eyebrow {
    color: var(--login-principal);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.btn-modal-close {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--login-borde);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6d7780;
    background: #ffffff;
    cursor: pointer;
}

.btn-modal-close:hover {
    color: var(--login-principal);
    background: var(--login-fondo);
}

.custom-modal-body {
    padding: 22px 24px;
    overflow-y: auto;
}

.custom-modal-help {
    margin: 0 0 20px;
    color: var(--login-texto-suave);
    font-size: 13px;
    line-height: 1.6;
}

.modal-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.custom-modal-footer {
    position: sticky;
    bottom: 0;
    padding: 18px 24px;
    border-top: 1px solid var(--login-borde);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #ffffff;
}


/* =========================================
   MODAL - FORMULARIO
========================================= */

.modal-form-group {
    margin-bottom: 18px;
}

.modal-fields-grid .modal-form-group {
    margin-bottom: 0;
}

.modal-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--login-texto);
    font-size: 13px;
    font-weight: 800;
}

.modal-form-group input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #dce2e6;
    border-radius: 13px;
    outline: none;
    color: var(--login-texto);
    background: #f9fafb;
}

.modal-form-group input:focus {
    border-color: var(--login-principal);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(183, 120, 69, 0.13);
}


/* =========================================
   MODAL - BOTONES
========================================= */

.btn-modal-secondary,
.btn-modal-primary {
    min-height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.btn-modal-secondary {
    color: #58636d;
    background: #edf0f2;
}

.btn-modal-primary {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--login-principal),
        #9b5f34
    );
}


/* =========================================
   LOGIN - IDENTIDAD OBSESSION MD
========================================= */

.login-presentation {
    padding-right: 390px;
}

.login-brand-logo {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    padding: 5px;
    border: 1px solid rgba(211, 164, 119, 0.34);
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.32);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.login-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-brand-name {
    color: #f2d39f;
}

.logo-circle {
    padding: 7px;
    overflow: hidden;
    background: #050505;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* =========================================
   LOGIN - IMAGEN TOMAS
========================================= */

.login-tomas-card {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 42px;
    width: 310px;
    overflow: hidden;
    border: 1px solid rgba(211, 164, 119, 0.3);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
    transform: translateY(-50%);
    backdrop-filter: blur(14px);
}

.login-tomas-image-wrapper {
    height: 330px;
    overflow: hidden;
    background: #f6efe5;
}

.login-tomas-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 50%;
}

.login-tomas-copy {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: linear-gradient(
        145deg,
        rgba(16, 27, 37, 0.96),
        rgba(24, 36, 49, 0.92)
    );
}

.login-tomas-label {
    color: var(--login-acento);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.login-tomas-copy strong {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.45;
}


/* =========================================
   LOGIN - CHERRYSOFT
========================================= */

.login-presentation-footer,
.login-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-footer {
    justify-content: center;
}

.login-cherry-logo,
.login-footer-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.72;
}

.login-footer-logo {
    width: 17px;
    height: 17px;
    opacity: 0.6;
}


/* =========================================
   LOGIN - TOMAS EN MARCO CIRCULAR
========================================= */

.login-tomas-portrait {
    position: absolute;
    top: 58px;
    right: 72px;
    z-index: 3;
    width: clamp(250px, 25vw, 350px);
    aspect-ratio: 1 / 1;
}

.login-tomas-circle {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 3px solid var(--login-acento);
    border-radius: 50%;
    background: var(--login-menu);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.28),
        0 0 0 9px rgba(211, 164, 119, 0.07);
}

.login-tomas-circle::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 -30px 55px rgba(16, 27, 37, 0.18);
    pointer-events: none;
}

.login-tomas-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 48% 42%;
    transform: scale(1.03);
}

.login-brand-logo {
    width: 48px;
    height: 48px;
    padding: 4px;
    border: 1px solid rgba(211, 164, 119, 0.32);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.24);
}

.login-brand-logo img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.logo-circle {
    overflow: hidden;
    padding: 0;
    background: #050505;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-presentation-content {
    max-width: 650px;
    padding-top: 230px;
}

.login-presentation-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-cherry-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.login-footer-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
}


/* =========================================
   LOGIN - OCULTAR CARD ANTERIOR
========================================= */

.login-tomas-card {
    display: none;
}


/* =========================================
   LOGIN - AJUSTE COMPACTO DESKTOP
========================================= */

@media (min-width: 981px) {

    .login-presentation {
        padding:
            clamp(24px, 2.2vw, 38px)
            clamp(28px, 3vw, 52px);
    }

    .login-brand-logo {
        width: 42px;
        height: 42px;
    }

    .login-brand-name {
        font-size: 15px;
    }

    .login-brand-description {
        font-size: 10px;
    }

    .login-tomas-portrait {
        top: clamp(40px, 5vh, 70px);
        right: clamp(36px, 5vw, 74px);
        width: clamp(225px, 22vw, 315px);
    }

    .login-presentation-content {
        width: min(570px, 64%);
        max-width: 570px;
        margin-top: auto;
        margin-bottom: auto;
        padding-top: clamp(150px, 20vh, 220px);
    }

    .login-eyebrow {
        margin-bottom: 11px;
        font-size: 10px;
    }

    .login-presentation-content h1 {
        font-size: clamp(39px, 4.1vw, 61px);
        line-height: 1.02;
    }

    .login-presentation-content p {
        max-width: 510px;
        margin: 18px 0 22px;
        font-size: 14px;
        line-height: 1.55;
    }

    .login-feature-list {
        gap: 8px;
    }

    .login-feature-item {
        min-height: 39px;
        padding: 0 12px;
        border-radius: 11px;
    }

    .login-feature-item span {
        font-size: 11px;
    }

    .login-presentation-footer {
        font-size: 10px;
    }

    .login-access {
        padding: 24px;
        align-items: center;
    }

    .login-container {
        max-width: 410px;
        padding: 29px 30px;
        border-radius: 23px;
        transform: translateY(-2vh);
    }

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

    .logo-circle {
        width: 58px;
        height: 58px;
        margin-bottom: 13px;
        border-radius: 17px;
    }

    .login-title {
        margin-bottom: 5px;
        font-size: 25px;
    }

    .login-subtitle {
        font-size: 12px;
    }

    .login-form-group {
        margin-bottom: 14px;
    }

    .login-form-group input {
        height: 46px;
    }

    .btn-login {
        height: 47px;
    }

    .login-links {
        margin-top: 16px;
        gap: 8px;
    }

    .login-footer {
        margin-top: 18px;
    }

}


/* =========================================
   LOGIN - PANTALLAS DESKTOP BAJAS
========================================= */

@media (min-width: 981px) and (max-height: 760px) {

    .login-tomas-portrait {
        top: 30px;
        width: clamp(190px, 20vw, 260px);
    }

    .login-presentation-content {
        padding-top: 120px;
    }

    .login-presentation-content h1 {
        font-size: clamp(36px, 3.7vw, 52px);
    }

    .login-presentation-content p {
        margin: 13px 0 17px;
        font-size: 13px;
    }

    .login-feature-item {
        min-height: 35px;
    }

    .login-container {
        padding: 24px 27px;
    }

}
