/* ==========================================
   LOGIN PAGE
========================================== */

:root {
    --login-navy: #242440;

    --login-wine-dark: #3d2038;
    --login-wine: #5f1b3a;
    --login-wine-light: #7a1d42;

    --login-accent: #8d1637;
    --login-accent-hover: #74102d;

    --login-gold: #f0c66c;

    --login-cream: #f6f3ec;
    --login-card: #ffffff;

    --login-text: #1f2433;
    --login-muted: #777b85;

    --login-border: #e4e1dc;

    --login-input: #f2f6fc;
}


/* ==========================================
   RESET / BASE
========================================== */

.login-body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;

    margin: 0;

    overflow-x: hidden;

    background: var(--login-cream);

    color: var(--login-text);

    font-family: "DM Sans", sans-serif;
}


.login-page {
    display: grid;

    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(500px, 0.95fr);

    min-height: 100vh;
    min-height: 100dvh;
}


/* ==========================================
   LEFT PANEL
========================================== */

.login-brand-panel {
    position: relative;

    display: flex;

    align-items: center;

    min-height: 100vh;
    min-height: 100dvh;

    padding:
        clamp(70px, 8vw, 150px)
        clamp(70px, 10vw, 180px);

    overflow: hidden;

    background:
        linear-gradient(
            122deg,
            #252541 0%,
            #38203c 34%,
            #5d1a39 68%,
            #781b40 100%
        );

    color: #ffffff;
}


/* Background glow */

.login-brand-panel::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 8% 10%,
            rgba(90, 86, 154, 0.16),
            transparent 32%
        ),
        radial-gradient(
            circle at 84% 78%,
            rgba(190, 37, 89, 0.18),
            transparent 35%
        );
}


/* ==========================================
   LEFT CONTENT
========================================== */

.login-brand-content {
    position: relative;

    z-index: 1;

    width: min(100%, 590px);
}


.login-brand-logo {
    display: block;

    width: 51px;
    height: 51px;

    margin-bottom: 28px;

    object-fit: contain;

    border-radius: 10px;

    filter:
        drop-shadow(
            0 5px 12px
            rgba(0, 0, 0, 0.18)
        );
}


.login-brand-title {
    margin: 0;

    color: #ffffff;

    font-size:
        clamp(31px, 3vw, 41px);

    font-weight: 700;

    letter-spacing: -0.035em;

    line-height: 1.12;
}


.login-brand-system {
    margin: 7px 0 0;

    color: var(--login-gold);

    font-size:
        clamp(16px, 1.35vw, 19px);

    font-weight: 700;

    line-height: 1.4;
}


.login-brand-description {
    max-width: 570px;

    margin: 19px 0 0;

    color:
        rgba(255, 255, 255, 0.83);

    font-size: 15px;

    line-height: 1.7;
}


/* ==========================================
   ONE PLATFORM CARD
========================================== */

.login-platform-card {
    position: relative;

    width: min(100%, 590px);

    margin-top: 31px;

    padding:
        64px 25px 24px;

    overflow: hidden;

    border:
        1px solid
        rgba(255, 255, 255, 0.17);

    border-radius: 23px;

    background:
        rgba(255, 255, 255, 0.10);

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.045);

    backdrop-filter: blur(5px);
}


.login-platform-card::before {
    content: "";

    position: absolute;

    left: -71px;
    bottom: -69px;

    width: 180px;
    height: 180px;

    border:
        2px solid
        rgba(255, 255, 255, 0.13);

    border-radius: 50%;

    pointer-events: none;
}


.login-platform-badge {
    position: absolute;

    top: 23px;
    left: 26px;

    padding:
        5px 13px;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.14);

    color: #ffffff;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


.login-platform-grid {
    position: relative;

    z-index: 1;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 11px;
}


.login-platform-item {
    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 44px;

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.12);

    color:
        rgba(255, 255, 255, 0.94);

    font-size: 13px;

    font-weight: 500;
}


/* ==========================================
   RIGHT PANEL
========================================== */

.login-form-panel {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 100vh;
    min-height: 100dvh;

    padding:
        48px
        clamp(40px, 7vw, 110px);

    background:
        radial-gradient(
            circle at 62% 43%,
            rgba(255, 255, 255, 0.88),
            transparent 35%
        ),
        var(--login-cream);
}


/* ==========================================
   LOGIN CARD
========================================== */

.login-card {
    width:
        min(100%, 455px);

    padding:
        40px 38px 32px;

    border:
        1px solid
        rgba(222, 218, 212, 0.78);

    border-radius: 24px;

    background:
        var(--login-card);

    box-shadow:
        0 20px 52px
        rgba(52, 44, 38, 0.08);
}


/* ==========================================
   TOP BACK LINK
========================================== */

.login-back-link {
    display: inline-flex;

    align-items: center;

    gap: 6px;

    margin-bottom: 28px;

    color:
        var(--login-accent);

    font-size: 13px;

    font-weight: 700;

    text-decoration: none;

    transition:
        transform 180ms ease,
        color 180ms ease;
}


.login-back-link i {
    font-size: 10px;
}


.login-back-link:hover {
    color:
        var(--login-accent-hover);

    transform:
        translateX(-2px);
}


/* ==========================================
   CARD HEADER
========================================== */

.login-card-header {
    margin: 0 0 27px;

    text-align: left;
}


.login-secure-label {
    margin: 0 0 14px;

    color:
        var(--login-accent);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 0.19em;

    line-height: 1.4;

    text-transform: uppercase;
}


.login-card-header h2 {
    margin: 0;

    color:
        var(--login-text);

    font-size: 29px;

    font-weight: 700;

    letter-spacing: -0.035em;

    line-height: 1.15;
}


.login-card-description {
    margin: 9px 0 0;

    color:
        var(--login-muted);

    font-size: 14px;

    line-height: 1.55;
}


/* ==========================================
   FORM
========================================== */

.login-form {
    display: grid;

    width: 100%;

    gap: 22px;
}


.login-field label {
    display: block;

    margin-bottom: 8px;

    color: #303440;

    font-size: 12px;

    font-weight: 600;
}


/* ==========================================
   INPUT WRAPPER
========================================== */

.login-input-wrap {
    display: grid;

    grid-template-columns:
        24px minmax(0, 1fr);

    align-items: center;

    min-height: 48px;

    padding: 0 14px;

    border:
        1px solid
        #dfe3e8;

    border-radius: 9px;

    background:
        var(--login-input);

    color: #5a5367;

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}


.login-input-wrap:focus-within {
    border-color:
        rgba(141, 22, 55, 0.76);

    background: #ffffff;

    box-shadow:
        0 0 0 3px
        rgba(141, 22, 55, 0.08);
}


.login-input-wrap > i {
    color: #59466a;

    font-size: 13px;
}


.login-input-wrap input {
    width: 100%;

    min-width: 0;

    height: 46px;

    padding: 0;

    border: 0;

    outline: 0;

    background:
        transparent;

    color: #242936;

    font-family: inherit;

    font-size: 14px;
}


.login-input-wrap input::placeholder {
    color: #9b9faa;

    opacity: 1;
}


/* ==========================================
   PASSWORD INPUT
========================================== */

.login-field:has(
    .login-password-toggle
)
.login-input-wrap {
    grid-template-columns:
        24px
        minmax(0, 1fr)
        33px;

    padding-right: 7px;
}


.login-password-toggle {
    display: grid;

    width: 33px;
    height: 33px;

    padding: 0;

    place-items: center;

    border: 0;

    border-radius: 7px;

    background:
        transparent;

    color: #8f949e;

    cursor: pointer;

    transition:
        color 180ms ease,
        background-color 180ms ease;
}


.login-password-toggle:hover {
    background:
        rgba(141, 22, 55, 0.06);

    color:
        var(--login-accent);
}


/* ==========================================
   INVALID STATE
========================================== */

.login-input-wrap:has(
    input[aria-invalid="true"]
) {
    border-color: #bf4665;

    box-shadow:
        0 0 0 3px
        rgba(191, 70, 101, 0.08);
}


.login-field-error {
    margin: 6px 0 0;

    color: #b93456;

    font-size: 11px;

    line-height: 1.4;
}


/* ==========================================
   FORM STATUS
========================================== */

.login-form-status {
    margin: -5px 0 0;

    padding: 10px 12px;

    border:
        1px solid
        rgba(184, 47, 80, 0.17);

    border-radius: 8px;

    background:
        rgba(184, 47, 80, 0.055);

    color: #a62b49;

    font-size: 11px;

    line-height: 1.45;
}


.login-form-status.is-info {
    border-color:
        rgba(141, 22, 55, 0.16);

    background:
        rgba(141, 22, 55, 0.05);

    color:
        var(--login-accent);
}


/* ==========================================
   SIGN IN BUTTON
========================================== */

.login-submit-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 48px;

    margin-top: 2px;

    padding: 11px 20px;

    border: 0;

    border-radius: 8px;

    background:
        var(--login-accent);

    color: #ffffff;

    font-family: inherit;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 7px 17px
        rgba(141, 22, 55, 0.12);

    transition:
        background-color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}


.login-submit-button:hover {
    background:
        var(--login-accent-hover);

    transform:
        translateY(-1px);

    box-shadow:
        0 10px 22px
        rgba(141, 22, 55, 0.17);
}


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


/* ==========================================
   BOTTOM LINK
========================================== */

.login-bottom-link {
    display: block;

    width: fit-content;

    margin:
        18px auto 0;

    color: #7b7e87;

    font-size: 12px;

    font-weight: 500;

    text-decoration: none;

    transition:
        color 180ms ease;
}


.login-bottom-link:hover {
    color:
        var(--login-accent);
}


/* ==========================================
   LOGIN OPTIONS
========================================== */

.login-form-options {
    display: flex;

    flex-wrap: wrap;

    align-items: center;
    justify-content: space-between;

    gap: 10px 16px;

    margin: -6px 0 -4px;
}


.login-remember-option {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: #666b76;

    font-size: 12px;

    font-weight: 500;

    line-height: 1.4;

    cursor: pointer;
}


.login-remember-option input {
    flex: 0 0 auto;

    width: 15px;
    height: 15px;

    margin: 0;

    accent-color: var(--login-accent);

    cursor: pointer;
}


.login-forgot-password {
    padding: 2px 0;

    border: 0;

    background: transparent;

    color: var(--login-accent);

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

    line-height: 1.4;

    cursor: pointer;

    transition: color 180ms ease;
}


.login-forgot-password:hover {
    color: var(--login-accent-hover);
}


/* ==========================================
   ACCESSIBILITY
========================================== */

.login-password-toggle:focus-visible,
.login-remember-option input:focus-visible,
.login-forgot-password:focus-visible,
.login-submit-button:focus-visible,
.login-back-link:focus-visible,
.login-bottom-link:focus-visible {
    outline:
        3px solid
        rgba(141, 22, 55, 0.18);

    outline-offset: 3px;
}


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

@media (max-width: 1024px) {

    .login-page {
        grid-template-columns:
            minmax(340px, 0.82fr)
            minmax(430px, 1.18fr);
    }


    .login-brand-panel {
        padding:
            55px 45px;
    }


    .login-form-panel {
        padding:
            40px 32px;
    }

}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 760px) {

    .login-page {
        display: block;
    }


    .login-brand-panel {
        min-height: auto;

        padding:
            42px 28px 46px;
    }


    .login-brand-content {
        width: 100%;
    }


    .login-brand-logo {
        width: 46px;
        height: 46px;

        margin-bottom: 20px;
    }


    .login-brand-title {
        font-size: 30px;
    }


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


    .login-platform-card {
        margin-top: 27px;
    }


    .login-form-panel {
        min-height:
            calc(100vh - 420px);

        min-height:
            calc(100dvh - 420px);

        padding:
            38px 22px;
    }


    .login-card {
        width:
            min(100%, 470px);

        padding:
            32px 25px 28px;
    }

}


/* ==========================================
   SMALL MOBILE
========================================== */

@media (max-width: 460px) {

    .login-platform-grid {
        grid-template-columns:
            1fr;
    }


    .login-card {
        padding:
            28px 20px 25px;

        border-radius: 20px;
    }


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


    .login-back-link {
        margin-bottom: 23px;
    }

}


/* ==========================================
   SHORT DESKTOP
========================================== */

@media
(max-height: 720px)
and
(min-width: 761px) {

    .login-brand-panel {
        padding-top: 44px;
        padding-bottom: 44px;
    }


    .login-brand-logo {
        margin-bottom: 18px;
    }


    .login-brand-description {
        margin-top: 14px;
    }


    .login-platform-card {
        margin-top: 21px;
    }


    .login-form-panel {
        padding-top: 24px;
        padding-bottom: 24px;
    }


    .login-card {
        padding-top: 28px;
        padding-bottom: 27px;
    }


    .login-back-link {
        margin-bottom: 20px;
    }


    .login-card-header {
        margin-bottom: 21px;
    }


    .login-form {
        gap: 17px;
    }

}


/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {

    .login-input-wrap,
    .login-password-toggle,
    .login-forgot-password,
    .login-submit-button,
    .login-back-link,
    .login-bottom-link {
        transition: none;
    }

}
