:root {
    --login-ink: #12212f;
    --login-muted: #657384;
    --login-line: #dce4eb;
    --login-surface: #ffffff;
    --login-soft: #f5f8fa;
    --login-primary: #0f8b83;
    --login-primary-dark: #08736d;
    --login-navy: #102033;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--login-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 12%, rgba(15, 139, 131, .13), transparent 27%),
        radial-gradient(circle at 90% 85%, rgba(37, 99, 235, .10), transparent 26%),
        #edf3f6;
    touch-action: manipulation;
}

button,
input {
    font: inherit;
}

.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-card {
    width: min(100%, 980px);
    min-height: 610px;
    display: grid;
    grid-template-columns: minmax(330px, .86fr) minmax(430px, 1.14fr);
    overflow: hidden;
    background: var(--login-surface);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(22, 43, 61, .16),
        0 8px 24px rgba(22, 43, 61, .08);
}

.auth-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #0c1d30 0%, #12384a 58%, #0b746f 135%);
}

.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .22;
    background-image: linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 74%);
}

.brand-orb {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(1px);
}

.brand-orb-one {
    width: 300px;
    height: 300px;
    right: -160px;
    top: -100px;
    background: rgba(35, 211, 192, .24);
}

.brand-orb-two {
    width: 230px;
    height: 230px;
    left: -120px;
    bottom: -90px;
    background: rgba(59, 130, 246, .18);
}

.brand-content {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 56px;
    padding: 48px 42px;
}

.brand-heading {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    display: block;
    overflow: hidden;
    background: #050505;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 20px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .2);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.brand-name,
.brand-version {
    display: block;
}

.brand-name {
    font-size: 20px;
    font-weight: 780;
    letter-spacing: .2em;
}

.brand-version {
    margin-top: 5px;
    color: rgba(255, 255, 255, .64);
    font-size: 12px;
    letter-spacing: .04em;
}

.brand-kicker,
.auth-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 760;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.brand-kicker {
    color: #72e1d3;
}

.brand-message h2 {
    max-width: 390px;
    margin: 16px 0 18px;
    font-size: clamp(30px, 3.1vw, 42px);
    line-height: 1.1;
    letter-spacing: -.035em;
}

.brand-message p {
    max-width: 370px;
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 15px;
    line-height: 1.7;
}

.brand-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.brand-benefits span {
    padding: 8px 12px;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    font-weight: 650;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.auth-panel {
    display: grid;
    place-items: center;
    background: #fff;
}

.auth-content {
    width: min(100%, 430px);
    padding: 54px 32px;
}

.mobile-brand {
    display: none;
}

.auth-kicker {
    color: var(--login-primary);
}

.auth-content h1 {
    margin: 10px 0 8px;
    color: var(--login-ink);
    font-size: 38px;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.auth-description {
    margin: 0 0 34px;
    color: var(--login-muted);
    font-size: 15px;
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 20px;
}

.form-assist {
    display: flex;
    justify-content: flex-end;
    margin-top: -9px;
}

.forgot-password-link,
.auth-back-link {
    color: var(--login-primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.forgot-password-link:hover,
.auth-back-link:hover {
    color: var(--login-primary-dark);
    text-decoration: underline;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field > label {
    color: #304154;
    font-size: 13px;
    font-weight: 720;
}

.field-control {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    background: var(--login-soft);
    border: 1px solid var(--login-line);
    border-radius: 14px;
    transition: border-color .2s ease, box-shadow .2s ease,
        background-color .2s ease;
}

.field-control:focus-within {
    background: #fff;
    border-color: var(--login-primary);
    box-shadow: 0 0 0 4px rgba(15, 139, 131, .11);
}

.field-control > svg {
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: #7a8997;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: stroke .2s ease;
}

.field-control:focus-within > svg {
    stroke: var(--login-primary);
}

.field-control input {
    min-width: 0;
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0;
    color: var(--login-ink);
    font-size: 16px;
    background: transparent;
    border: 0;
    outline: 0;
}

.field-control input::placeholder {
    color: #9aa6b2;
}

.password-toggle {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    margin-right: -7px;
    padding: 0;
    color: #778796;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 10px;
}

.password-toggle:hover {
    color: var(--login-primary);
    background: rgba(15, 139, 131, .08);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.login-button {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    padding: 0 22px;
    color: #fff;
    font-weight: 760;
    cursor: pointer;
    background: linear-gradient(135deg, var(--login-primary), #08766f);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(15, 139, 131, .22);
    transition: transform .18s ease, box-shadow .18s ease,
        filter .18s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 16px 28px rgba(15, 139, 131, .28);
}

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

.login-button:disabled,
.login-button.is-loading {
    opacity: .58;
    cursor: wait;
    transform: none;
    filter: grayscale(.25);
    box-shadow: none;
}

.login-button svg,
.create-arrow {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.account-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 16px;
    color: #8996a3;
    font-size: 12px;
    white-space: nowrap;
}

.account-separator::before,
.account-separator::after {
    content: "";
    width: 100%;
    height: 1px;
    background: #e5ebf0;
}

.create-account-button {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    color: var(--login-ink);
    text-decoration: none;
    background: #f8fbfb;
    border: 1px solid #cfe3e1;
    border-radius: 16px;
    transition: transform .18s ease, border-color .18s ease,
        background-color .18s ease, box-shadow .18s ease;
}

.create-account-button:hover {
    transform: translateY(-1px);
    background: #f1f9f8;
    border-color: #8fc8c3;
    box-shadow: 0 10px 22px rgba(22, 73, 70, .09);
}

.create-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    color: var(--login-primary);
    background: rgba(15, 139, 131, .1);
    border-radius: 12px;
}

.create-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.create-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.create-copy strong {
    font-size: 14px;
}

.create-copy small {
    overflow: hidden;
    color: var(--login-muted);
    font-size: 11px;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.create-arrow {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-left: auto;
    color: var(--login-primary);
}

.security-note {
    margin: 20px 0 0;
    color: #8b98a4;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

.recovery-card {
    min-height: 590px;
}

.recovery-brand .brand-content {
    gap: 42px;
}

.recovery-description {
    margin-bottom: 26px;
}

.recovery-form {
    gap: 18px;
}

.auth-back-link {
    display: block;
    width: max-content;
    margin: 24px auto 0;
}

.auth-button-link {
    width: 100%;
    text-decoration: none;
}

.auth-alert,
.auth-help-note {
    margin: 0 0 22px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 12px;
}

.auth-alert-error {
    color: #8b1f2d;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.auth-help-note {
    color: #536170;
    background: #f4f8fa;
    border: 1px solid #dce7ec;
}

.auth-result-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    font-size: 28px;
    font-weight: 800;
    border-radius: 18px;
}

.auth-result-success {
    color: #08736d;
    background: #dcf5f1;
}

.auth-result-error {
    color: #a02738;
    background: #ffe4e6;
}

.login-page a:focus-visible,
.login-page button:focus-visible {
    outline: 3px solid rgba(15, 139, 131, .28);
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .auth-shell {
        place-items: start center;
        padding: 18px;
    }

    .auth-card {
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .auth-brand {
        display: none;
    }

    .auth-content {
        width: 100%;
        max-width: 480px;
        padding: 34px 26px 30px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 34px;
        color: var(--login-navy);
        font-size: 15px;
        font-weight: 800;
        letter-spacing: .17em;
    }

    .mobile-brand .brand-mark {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        background: #050505;
        border-color: rgba(15, 139, 131, .15);
        border-radius: 12px;
        box-shadow: none;
    }

    .mobile-brand .brand-mark img {
        width: 74px;
        height: 74px;
        max-width: none;
        transform: translate(-16px, -8px);
    }

    .auth-content h1 {
        font-size: 34px;
    }
}

@media (max-width: 420px) {
    .auth-shell {
        padding: 0;
        background: #fff;
    }

    .auth-card {
        min-height: 100vh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-content {
        padding: 28px 20px;
    }

    .account-separator {
        gap: 8px;
        text-align: center;
    }

    .create-copy small {
        white-space: normal;
    }
}

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