@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
    --pearl: #E0D4C0;
    --pearl-soft: #F6F1E8;
    --navy: #13273F;
    --navy-dark: #0F2137;
    --red: #4E0005;
    --chocolate: #6B4F3D;
    --steel: #8495A7;

    --white: #FFFFFF;
    --gray-text: #667085;
    --border-soft: #E8E6E1;

    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 14px;

    --shadow-main: 0 20px 55px rgba(19, 39, 63, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100svh;
    font-family: 'Montserrat', sans-serif;
    color: var(--navy);
    background: linear-gradient(
        90deg,
        #F6F1E8 0%,
        #F6F1E8 50%,
        #13273F 50%,
        #13273F 100%
    );
}

/* =========================
   CONTENEDOR GENERAL
========================= */

.login-page {
    width: 100%;
    min-height: 100svh;
    padding: clamp(12px, 1.8vw, 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
}

/* =========================
   DECORACIÓN
========================= */

.decor {
    position: absolute;
    border-radius: 999px;
    z-index: -1;
    opacity: 0.11;
    filter: blur(1px);
    pointer-events: none;
}

.decor-one {
    width: clamp(140px, 13vw, 210px);
    height: clamp(140px, 13vw, 210px);
    background: var(--red);
    top: 15%;
    left: 6%;
}

.decor-two {
    width: clamp(160px, 15vw, 240px);
    height: clamp(160px, 15vw, 240px);
    background: var(--steel);
    right: 8%;
    bottom: 14%;
    opacity: 0.12;
}

.decor-three {
    display: none;
}

/* =========================
   TARJETA PRINCIPAL
========================= */

.login-card {
    width: min(1060px, 100%);
    height: min(590px, calc(100svh - 28px));
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-main);
    overflow: hidden;
}

/* =========================
   LADO IZQUIERDO
========================= */

.login-left {
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: clamp(20px, 2.4vw, 36px) clamp(34px, 4vw, 56px);
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =========================
   MARCA
========================= */

.brand-box {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.brand-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--red);
    color: var(--pearl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(78, 0, 5, 0.17);
    flex-shrink: 0;
}

.brand-kicker {
    font-size: 0.64rem;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: var(--chocolate);
    font-weight: 800;
    margin-bottom: 5px;
}

.brand-box h1 {
    font-size: clamp(1.15rem, 1.7vw, 1.45rem);
    color: var(--navy);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

/* =========================
   TEXTO LOGIN
========================= */

.login-copy {
    margin-bottom: 14px;
    flex-shrink: 0;
}

.login-copy h2 {
    font-size: clamp(1.85rem, 3vw, 2.45rem);
    color: var(--navy);
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.login-copy p {
    max-width: 450px;
    color: var(--gray-text);
    line-height: 1.5;
    font-size: 0.86rem;
    font-weight: 500;
}

/* =========================
   FORMULARIO
========================= */

.login-form {
    width: 100%;
    max-width: 420px;
    flex-shrink: 0;
}

.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.input-box {
    width: 100%;
    min-height: 48px;
    border-radius: 15px;
    background: var(--white);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 16px;
    box-shadow: 0 8px 22px rgba(19, 39, 63, 0.045);
    transition: all 0.25s ease;
}

.input-box:hover {
    border-color: rgba(107, 79, 61, 0.38);
    background: #FFFCF7;
    box-shadow: 0 10px 26px rgba(19, 39, 63, 0.07);
}

.input-box:focus-within {
    border-color: rgba(78, 0, 5, 0.46);
    background: #FFFFFF;
    box-shadow:
        0 0 0 4px rgba(224, 212, 192, 0.42),
        0 12px 28px rgba(19, 39, 63, 0.10);
}

.input-box:focus-within .field-icon,
.input-box:focus-within .toggle-password {
    color: var(--red);
}

.input-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    color: var(--navy);
    font-weight: 600;
}

.input-box input::placeholder {
    color: rgba(102, 112, 133, 0.62);
    font-weight: 500;
}

.field-icon {
    width: 22px;
    height: 22px;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =========================
   BOTÓN VER CONTRASEÑA
========================= */

.toggle-password {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--chocolate);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.toggle-password:hover {
    background: rgba(224, 212, 192, 0.22);
}

/* =========================
   BOTÓN LOGIN
========================= */

.btn-login {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 15px;
    margin-top: 14px;
    cursor: pointer;
    background: var(--navy);
    color: var(--pearl-soft);
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 14px 30px rgba(19, 39, 63, 0.20);
    transition: all 0.28s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.btn-login:hover {
    background: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 19px 40px rgba(19, 39, 63, 0.24);
}

.btn-login:active {
    transform: scale(0.985);
}

.login-footer {
    margin-top: 22px;
    color: rgba(102, 112, 133, 0.72);
    font-size: 0.74rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* =========================
   LADO DERECHO
========================= */

.login-right {
    min-width: 0;
    min-height: 0;
    position: relative;
    padding: clamp(30px, 4vw, 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--navy);
}

.login-right::before {
    content: '';
    position: absolute;
    width: 390px;
    height: 390px;
    border-radius: 50%;
    background: rgba(224, 212, 192, 0.05);
    top: -155px;
    right: -135px;
}

.login-right::after {
    content: '';
    position: absolute;
    width: 310px;
    height: 310px;
    border-radius: 50%;
    border: 1px solid rgba(224, 212, 192, 0.10);
    bottom: -125px;
    left: -125px;
}

.right-content {
    position: relative;
    z-index: 1;
    max-width: 430px;
    color: var(--white);
}

.system-label {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(224, 212, 192, 0.16);
    color: var(--pearl);
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    font-size: 0.66rem;
    margin-bottom: 20px;
}

.right-content h2 {
    font-size: clamp(2.05rem, 3.3vw, 2.9rem);
    line-height: 1.12;
    font-weight: 800;
    color: #FBF8F2;
    margin-bottom: 16px;
    letter-spacing: -0.045em;
}

.right-content p {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.6;
    font-size: 0.86rem;
    font-weight: 500;
    margin-bottom: 18px;
}

/* =========================
   MINI TARJETAS
========================= */

.mini-cards {
    display: grid;
    gap: 9px;
}

.mini-cards div {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
    font-size: 0.82rem;
    transition: all 0.25s ease;
}

.mini-cards div:hover {
    background: rgba(255, 255, 255, 0.075);
    transform: translateX(4px);
}

/* =========================
   SVG ICONS
========================= */

svg {
    width: 1em;
    height: 1em;
    display: block;
}

svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-icon svg {
    font-size: 24px;
    color: var(--pearl);
}

.field-icon svg {
    font-size: 19px;
}

.toggle-password svg {
    font-size: 19px;
    color: var(--chocolate);
}

.btn-login svg {
    font-size: 18px;
    color: currentColor;
}

.mini-cards svg {
    font-size: 19px;
    color: var(--pearl);
    flex-shrink: 0;
}

/* =========================
   SWEETALERT2
========================= */

.swal2-popup {
    border-radius: 18px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* =========================
   LAPTOPS CON POCA ALTURA
========================= */

@media (min-width: 981px) and (max-height: 760px) {
    .login-page {
        padding: 12px;
    }

    .login-card {
        height: calc(100svh - 24px);
    }

    .login-left {
        padding: 18px 46px;
        justify-content: center;
    }

    .login-right {
        padding: 26px 50px;
    }

    .brand-box {
        margin-bottom: 14px;
    }

    .brand-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .brand-icon svg {
        font-size: 21px;
    }

    .brand-kicker {
        font-size: 0.58rem;
        margin-bottom: 4px;
    }

    .brand-box h1 {
        font-size: 1.16rem;
    }

    .login-copy {
        margin-bottom: 12px;
    }

    .login-copy h2 {
        font-size: 2rem;
        margin-bottom: 6px;
    }

    .login-copy p {
        font-size: 0.78rem;
        line-height: 1.42;
    }

    .input-group {
        margin-bottom: 8px;
    }

    .input-group label {
        font-size: 0.76rem;
        margin-bottom: 4px;
    }

    .input-box {
        min-height: 42px;
        border-radius: 13px;
    }

    .input-box input {
        font-size: 0.8rem;
    }

    .toggle-password {
        width: 32px;
        height: 32px;
    }

    .btn-login {
        min-height: 44px;
        margin-top: 8px;
        font-size: 0.8rem;
        border-radius: 13px;
    }

    .login-footer {
        margin-top: 10px;
        font-size: 0.68rem;
    }

    .system-label {
        margin-bottom: 14px;
        font-size: 0.6rem;
    }

    .right-content h2 {
        font-size: 2.15rem;
        margin-bottom: 12px;
    }

    .right-content p {
        font-size: 0.78rem;
        line-height: 1.5;
        margin-bottom: 14px;
    }

    .mini-cards {
        gap: 7px;
    }

    .mini-cards div {
        padding: 9px 12px;
        font-size: 0.76rem;
    }
}

/* =========================
   TABLET
========================= */

@media (max-width: 980px) {
    body {
        background: #F6F1E8;
        overflow-y: auto;
    }

    .login-page {
        min-height: 100svh;
        padding: 24px;
        align-items: flex-start;
    }

    .login-card {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .login-left,
    .login-right {
        height: auto;
        padding: 42px 34px;
    }

    .login-left {
        justify-content: flex-start;
    }

    .brand-box {
        margin-bottom: 24px;
    }

    .login-copy {
        margin-bottom: 22px;
    }

    .input-group {
        margin-bottom: 15px;
    }

    .input-box {
        min-height: 54px;
    }

    .btn-login {
        min-height: 56px;
        margin-top: 6px;
    }

    .login-footer {
        margin-top: 24px;
    }

    .login-form {
        max-width: 100%;
    }
}

/* =========================
   MÓVIL
========================= */

@media (max-width: 560px) {
    .login-page {
        padding: 16px;
    }

    .login-card {
        border-radius: 24px;
    }

    .login-left,
    .login-right {
        padding: 34px 22px;
    }

    .brand-box {
        align-items: flex-start;
        margin-bottom: 26px;
    }

    .brand-icon {
        width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    .brand-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }

    .brand-box h1 {
        font-size: 1.22rem;
        line-height: 1.25;
    }

    .login-copy h2 {
        font-size: 1.95rem;
    }

    .login-copy p {
        font-size: 0.88rem;
    }

    .input-box {
        min-height: 54px;
        border-radius: 15px;
    }

    .input-box input {
        font-size: 0.88rem;
    }

    .btn-login {
        min-height: 56px;
        border-radius: 16px;
        font-size: 0.86rem;
    }

    .right-content h2 {
        font-size: 1.95rem;
    }

    .right-content p {
        font-size: 0.88rem;
    }

    .mini-cards div {
        font-size: 0.82rem;
    }

    .decor {
        display: none;
    }
}
