:root {
    --navy: #071d35;
    --navy-light: #0b3157;
    --blue: #1677ff;
    --blue-dark: #095ed8;
    --green: #11a36a;
    --white: #ffffff;
    --text: #0d2146;
    --muted: #71809d;
    --border: #dce5f1;
    --background: #f4f8fc;
    --danger: #dc3545;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
}

button,
input {
    font: inherit;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 48% 52%;
}


/* =========================
   LADO IZQUIERDO
   ========================= */

.login-brand {
    position: relative;
    overflow: hidden;
    padding: 65px 70px 45px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(31, 130, 255, 0.32),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            #08294b 0%,
            #061b32 55%,
            #031626 100%
        );
}

.login-brand::before {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    left: -160px;
    top: -130px;
}

.login-brand::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    right: -310px;
    bottom: -270px;
    background: rgba(22, 119, 255, 0.08);
}

.brand-content,
.brand-benefits,
.brand-footer {
    position: relative;
    z-index: 2;
}

.brand-logo {
    display: block;
    width: min(330px, 85%);
    max-height: 120px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 35px;
}

.brand-content h1 {
    font-size: clamp(28px, 3vw, 43px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.brand-slogan {
    color: #a9caea;
    font-size: 19px;
    font-weight: 400;
}

.brand-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 60px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #bed0e2;
    font-size: 13px;
    line-height: 1.45;
}

.benefit strong {
    color: white;
    font-weight: 600;
}

.benefit-icon {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #41b9ff;
    font-size: 22px;
    background: rgba(36, 137, 232, 0.14);
    border: 1px solid rgba(89, 176, 255, 0.16);
}

.brand-footer {
    font-size: 11px;
    letter-spacing: 4px;
    color: #4e83ad;
    margin-top: 70px;
}


/* =========================
   LADO DERECHO
   ========================= */

.login-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 82% 14%,
            rgba(64, 159, 255, 0.12),
            transparent 24%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8fbff 58%,
            #eef6fc 100%
        );
}

.login-area::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    right: -180px;
    top: -160px;
    border: 50px solid rgba(21, 112, 214, 0.03);
}

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 500px;
    padding: 48px 50px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e7edf5;
    border-radius: 20px;
    box-shadow:
        0 22px 65px rgba(11, 42, 75, 0.10),
        0 4px 14px rgba(11, 42, 75, 0.04);
}

.mobile-brand {
    display: none;
}

.login-header {
    margin-bottom: 36px;
}

.login-header h2 {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    color: #0b1f46;
    margin-bottom: 9px;
}

.login-header h2 span {
    color: var(--blue);
}

.login-header p {
    color: var(--muted);
    font-size: 14px;
}

.form-group {
    margin-bottom: 23px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #23395d;
    margin-bottom: 9px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: #182b4d;
    outline: none;
    padding: 0 48px 0 46px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #a4afc0;
}

.input-wrapper input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.09);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8294ae;
    font-size: 18px;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #8091aa;
    font-size: 18px;
}

.password-toggle:hover {
    color: var(--blue);
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #60708b;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 25px;
}

.remember-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
}


/* =========================
   OPCIONES DEL LOGIN
   ========================= */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.login-options .remember-row {
    margin: 0;
}

.forgot-password-link {
    color: #1677ff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 9px;
    background: linear-gradient(
        90deg,
        #0d75f5,
        #1687ff
    );
    color: white;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 9px 22px rgba(22, 119, 255, 0.20);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 27px rgba(22, 119, 255, 0.27);
}

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

.login-arrow {
    font-size: 20px;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 17px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff1f2;
    color: #b42334;
    font-size: 13px;
    border: 1px solid #ffd7dc;
}

.login-error span {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--danger);
    font-weight: 700;
}

.authorized-message {
    margin-top: 30px;
    padding-top: 23px;
    border-top: 1px solid #edf1f6;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #8b98ad;
    font-size: 12px;
}


/* =========================
   TABLET
   ========================= */

@media (max-width: 1000px) {
    .login-page {
        grid-template-columns: 42% 58%;
    }

    .login-brand {
        padding: 45px 35px;
    }

    .brand-benefits {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .login-area {
        padding: 35px;
    }

    .login-card {
        padding: 42px 36px;
    }
}


/* =========================
   MÓVIL
   ========================= */

@media (max-width: 760px) {
    body {
        background: #f5f9fd;
    }

    .login-page {
        display: block;
        min-height: 100vh;
    }

    .login-brand {
        display: none;
    }

    .login-area {
        min-height: 100vh;
        padding: 26px 20px;
        align-items: center;
    }

    .login-card {
        max-width: 440px;
        border-radius: 18px;
        padding: 31px 24px 28px;
        box-shadow: 0 14px 40px rgba(11, 42, 75, 0.09);
    }

    .mobile-brand {
        display: block;
        text-align: center;
        margin-bottom: 32px;
    }

    .mobile-brand img {
        display: block;
        width: 205px;
        max-height: 76px;
        object-fit: contain;
        margin: 0 auto 11px;
    }

    .mobile-brand h2 {
        font-size: 16px;
        color: #243858;
        margin-bottom: 5px;
    }

    .mobile-brand p {
        font-size: 12px;
        color: #8b9aaf;
    }

    .login-header {
        text-align: center;
        margin-bottom: 29px;
    }

    .login-header h2 {
        font-size: 25px;
    }

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

    .form-group {
        margin-bottom: 19px;
    }

    .input-wrapper input {
        height: 50px;
    }

    .login-button {
        height: 52px;
    }

    .authorized-message {
        text-align: center;
        line-height: 1.5;
    }
}


/* =========================
   PANTALLAS MUY PEQUEÑAS
   ========================= */

@media (max-width: 380px) {
    .login-area {
        padding: 15px;
    }

    .login-card {
        padding: 26px 18px;
    }

    .mobile-brand img {
        width: 180px;
    }

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

input[type="password"]::-ms-reveal {
    display: none;
}