:root {
    --login-bg: #071923;
    --login-surface: #ffffff;
    --login-text: #10212b;
    --login-muted: #647680;
    --login-border: #dfe8ec;
    --login-field: #f7fafb;
    --login-primary: #0798cf;
    --login-primary-dark: #087aa9;
    --login-accent: #83c529;
    --login-focus: rgba(7, 152, 207, 0.18);
    --login-shadow: 0 28px 80px rgba(0, 13, 23, 0.38);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.login-page {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    color: var(--login-text);
    background:
        radial-gradient(circle at 12% 12%, rgba(7, 152, 207, 0.2), transparent 32rem),
        radial-gradient(circle at 88% 88%, rgba(131, 197, 41, 0.14), transparent 30rem),
        var(--login-bg);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

body.login-page::before,
body.login-page::after {
    position: fixed;
    z-index: 0;
    width: 26rem;
    height: 26rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

body.login-page::before {
    top: -15rem;
    right: -7rem;
}

body.login-page::after {
    bottom: -18rem;
    left: -8rem;
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding: clamp(20px, 4vw, 52px);
}

.login-card {
    display: grid;
    grid-template-columns: minmax(330px, 0.88fr) minmax(420px, 1.12fr);
    width: min(100%, 1040px);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    background: var(--login-surface);
    box-shadow: var(--login-shadow);
}

.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(36px, 5vw, 60px);
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(6, 48, 70, 0.2), rgba(5, 76, 96, 0.08)),
        linear-gradient(145deg, #06334a 0%, #075f7d 55%, #087f91 100%);
}

.login-brand::before {
    position: absolute;
    right: -8rem;
    bottom: -9rem;
    width: 24rem;
    height: 24rem;
    border: 4rem solid rgba(255, 255, 255, 0.055);
    border-radius: 50%;
    content: "";
}

.login-brand::after {
    position: absolute;
    top: 7rem;
    right: -3rem;
    width: 9rem;
    height: 9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
}

.brand-content,
.brand-security {
    position: relative;
    z-index: 1;
}

.brand-logo {
    display: inline-flex;
    width: 210px;
    min-height: 104px;
    align-items: center;
    justify-content: center;
    margin-bottom: 42px;
    padding: 12px 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(0, 19, 30, 0.22);
}

.brand-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.brand-kicker {
    display: block;
    margin-bottom: 14px;
    color: #a9e75c;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.login-brand h1 {
    max-width: 16ch;
    margin: 0 0 20px;
    color: #ffffff;
    font-size: clamp(2.25rem, 3.4vw, 3rem);
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.brand-description {
    max-width: 35ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.08rem;
    line-height: 1.7;
}

.brand-security {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 44px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    font-weight: 600;
}

.brand-security-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #b9ef75;
}

.login-form-panel {
    display: flex;
    align-items: center;
    padding: clamp(42px, 6vw, 80px);
    background: var(--login-surface);
}

.login-form {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    color: var(--login-primary-dark);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-eyebrow::before {
    width: 22px;
    height: 3px;
    border-radius: 99px;
    background: var(--login-accent);
    content: "";
}

.login-form h2 {
    margin: 0;
    color: var(--login-text);
    font-size: clamp(2.1rem, 3.2vw, 2.6rem);
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.form-description {
    margin: 12px 0 34px;
    color: var(--login-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #30444f;
    font-size: 0.95rem;
    font-weight: 700;
}

.input-shell {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    align-items: center;
    min-height: 60px;
    overflow: hidden;
    border: 1px solid var(--login-border);
    border-radius: 14px;
    background: var(--login-field);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.input-shell:focus-within {
    border-color: var(--login-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--login-focus);
}

.input-icon {
    display: grid;
    height: 100%;
    place-items: center;
    color: #78909c;
    font-size: 1.05rem;
}

.login-input {
    width: 100%;
    min-width: 0;
    height: 58px;
    padding: 0 6px;
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--login-text);
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 600;
}

.login-input::placeholder {
    color: #9aabb3;
    font-size: 1.16rem;
    font-weight: 500;
}

.empty-suffix {
    width: 46px;
}

.password-toggle {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    justify-self: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    outline: 0;
    background: transparent;
    color: #71858f;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #e6f1f5;
    color: var(--login-primary-dark);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 26px;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #536873;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.remember-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.remember-switch {
    position: relative;
    width: 40px;
    height: 23px;
    flex: 0 0 auto;
    border-radius: 99px;
    background: #c9d5da;
    transition: background-color 180ms ease, box-shadow 180ms ease;
}

.remember-switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(21, 45, 57, 0.22);
    content: "";
    transition: transform 180ms ease;
}

.remember-option input:checked + .remember-switch {
    background: var(--login-primary);
}

.remember-option input:checked + .remember-switch::after {
    transform: translateX(17px);
}

.remember-option input:focus-visible + .remember-switch {
    box-shadow: 0 0 0 4px var(--login-focus);
}

.login-submit {
    display: inline-flex;
    width: 100%;
    min-height: 60px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    outline: 0;
    background: linear-gradient(135deg, var(--login-primary), var(--login-primary-dark));
    box-shadow: 0 13px 26px rgba(7, 126, 173, 0.24);
    color: #ffffff;
    font-family: inherit;
    font-size: 1.06rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 32px rgba(7, 126, 173, 0.3);
    filter: saturate(1.08);
}

.login-submit:focus-visible {
    box-shadow: 0 0 0 4px var(--login-focus), 0 13px 26px rgba(7, 126, 173, 0.24);
}

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

.login-submit[aria-busy="true"] {
    cursor: wait;
    opacity: 0.88;
}

.form-footer {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid #edf2f4;
    color: #8a9aa2;
    font-size: 0.86rem;
    line-height: 1.65;
    text-align: center;
}

.form-footer strong {
    color: #5b707a;
    font-weight: 700;
}

.platform-info {
    display: inline-block;
    margin-left: 7px;
    padding-left: 9px;
    border-left: 1px solid #dce5e9;
}

@media (max-width: 840px) {
    .login-shell {
        padding: 22px;
    }

    .login-card {
        grid-template-columns: 1fr;
        width: min(100%, 570px);
        min-height: auto;
    }

    .login-brand {
        display: block;
        padding: 28px 34px;
    }

    .brand-content {
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .brand-logo {
        width: 150px;
        min-height: 76px;
        flex: 0 0 auto;
        margin: 0;
        padding: 9px 13px;
        border-radius: 14px;
    }

    .brand-kicker {
        margin-bottom: 7px;
    }

    .login-brand h1 {
        max-width: 20ch;
        margin: 0;
        font-size: 1.65rem;
    }

    .brand-description,
    .brand-security {
        display: none;
    }

    .login-form-panel {
        padding: 42px 52px 46px;
    }
}

@media (max-width: 540px) {
    .login-shell {
        display: block;
        padding: 0;
    }

    .login-card {
        width: 100%;
        min-height: 100vh;
        min-height: 100svh;
        border: 0;
        border-radius: 0;
    }

    .login-brand {
        padding: 22px 24px;
    }

    .brand-content {
        gap: 16px;
    }

    .brand-logo {
        width: 116px;
        min-height: 61px;
        padding: 7px 10px;
        border-radius: 11px;
    }

    .brand-kicker {
        font-size: 0.74rem;
    }

    .login-brand h1 {
        font-size: 1.32rem;
        line-height: 1.2;
    }

    .login-form-panel {
        align-items: flex-start;
        padding: 36px 24px 30px;
    }

    .form-description {
        margin-bottom: 28px;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
