/* Login page: isolated from application modules. */
.login-page {
    --auth-dark: #101a1d;
    --auth-text: #10252f;
    --auth-muted: #738693;
    --auth-line: #dce6e9;
    --auth-teal: #12a99c;
    --auth-teal-dark: #087e77;
    --auth-teal-soft: #e8f8f5;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: clamp(18px, 4vw, 54px);
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(18, 169, 156, .16), transparent 26rem),
        radial-gradient(circle at 88% 82%, rgba(39, 125, 224, .09), transparent 28rem),
        #eef4f5;
    color: var(--auth-text);
}

.login-page::before,
.login-page::after {
    content: '';
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
}

.login-page::before {
    width: 420px;
    height: 420px;
    top: -230px;
    right: -110px;
    border: 1px solid rgba(18, 169, 156, .16);
    box-shadow: 0 0 0 60px rgba(255, 255, 255, .16), 0 0 0 120px rgba(18, 169, 156, .035);
}

.login-page::after {
    width: 250px;
    height: 250px;
    bottom: -145px;
    left: 8%;
    border: 1px solid rgba(15, 73, 78, .1);
    box-shadow: 0 0 0 54px rgba(255, 255, 255, .24);
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: calc(100dvh - clamp(36px, 8vw, 108px));
    display: grid;
    place-items: center;
}

.auth-card,
.auth-card * {
    box-sizing: border-box;
}

.auth-card {
    width: min(980px, 100%);
    min-height: 610px;
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(420px, 1.06fr);
    overflow: hidden;
    border: 1px solid rgba(189, 207, 212, .72);
    border-radius: 28px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 26px 80px rgba(14, 43, 52, .15), 0 6px 20px rgba(14, 43, 52, .06);
}

.auth-visual {
    position: relative;
    min-width: 0;
    padding: 42px 44px;
    display: flex;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(circle at 92% 8%, rgba(18, 169, 156, .26), transparent 20rem),
        linear-gradient(148deg, #0f191c 0%, #112327 58%, #0e3032 100%);
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    width: 360px;
    height: 360px;
    right: -170px;
    bottom: -135px;
    border-radius: 50%;
    border: 1px solid rgba(70, 218, 205, .22);
    box-shadow: 0 0 0 52px rgba(18, 169, 156, .055), 0 0 0 104px rgba(18, 169, 156, .03);
}

.auth-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .74), transparent 92%);
}

.auth-brand,
.auth-visual__mark {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    align-items: center;
}

.auth-brand__logo {
    width: 142px;
    height: 58px;
    display: grid;
    place-items: center;
}

.auth-brand__logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.auth-visual__mark {
    flex: 1 1 auto;
    display: grid;
    place-items: center;
}

.auth-visual__mark-ring {
    position: relative;
    width: 154px;
    height: 154px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(124, 233, 222, .2);
    border-radius: 50%;
    background: rgba(18, 169, 156, .07);
    color: rgba(158, 241, 233, .9);
    box-shadow:
        0 0 0 30px rgba(18, 169, 156, .035),
        0 0 0 60px rgba(18, 169, 156, .018),
        inset 0 0 36px rgba(18, 169, 156, .08);
}

.auth-visual__mark-ring::before,
.auth-visual__mark-ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .04);
}

.auth-visual__mark-ring::before {
    inset: -58px;
}

.auth-visual__mark-ring::after {
    inset: -102px;
}

.auth-visual__mark-ring svg {
    width: 64px;
    height: 64px;
}

.auth-form-panel {
    min-width: 0;
    display: grid;
    place-items: center;
    padding: 54px 56px 44px;
    background: #fff;
}

.auth-form-panel__inner {
    width: min(100%, 390px);
}

.auth-mobile-brand {
    display: none;
}

.auth-heading h1 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(34px, 3vw, 42px);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 800;
}

.auth-alert {
    margin-top: 24px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-alert__icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    margin-top: 1px;
}

.auth-alert__icon svg {
    width: 100%;
    height: 100%;
}

.auth-alert--success {
    border-color: #c9ebdc;
    background: #edf9f3;
    color: #16784f;
}

.auth-alert--danger {
    border-color: #f3cfd4;
    background: #fff3f4;
    color: #aa3140;
}

.auth-form {
    display: grid;
    gap: 17px;
    margin-top: 32px;
}

.auth-field {
    display: grid;
    gap: 7px;
    cursor: default;
}

.auth-field__label {
    color: #29434d;
    font-size: 13px;
    font-weight: 750;
}

.auth-field__control {
    position: relative;
    display: block;
}

.auth-field__icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 15px;
    width: 21px;
    height: 21px;
    transform: translateY(-50%);
    color: #92a3ab;
    pointer-events: none;
}

.auth-field__icon svg {
    width: 100%;
    height: 100%;
}

.auth-field__control:focus-within .auth-field__icon {
    color: var(--auth-teal-dark);
}

.auth-field input {
    width: 100%;
    height: 54px;
    border: 1px solid #cedbdf;
    border-radius: 12px;
    padding: 0 46px 0 48px;
    background: #fbfcfc;
    color: var(--auth-text);
    outline: none;
    font-size: 15px;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.auth-field input:hover {
    border-color: #b9ccd1;
    background: #fff;
}

.auth-field input:focus {
    border-color: var(--auth-teal);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(18, 169, 156, .11);
}

.auth-field input[aria-invalid="true"] {
    border-color: #df8792;
}

.auth-field input::placeholder {
    color: #a6b4ba;
}

.auth-password-toggle {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 9px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #7e929b;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease;
}

.auth-password-toggle:hover {
    background: var(--auth-teal-soft);
    color: var(--auth-teal-dark);
}

.auth-password-toggle:focus-visible,
.auth-submit:focus-visible {
    outline: 3px solid rgba(18, 169, 156, .22);
    outline-offset: 2px;
}

.auth-password-toggle svg {
    width: 20px;
    height: 20px;
}

.auth-password-toggle__hide {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-toggle__show {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-toggle__hide {
    display: block;
}

.auth-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 2px;
    border: 1px solid var(--auth-teal);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #12b3a5, #0d958b);
    color: #fff;
    box-shadow: 0 10px 24px rgba(18, 169, 156, .2);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.auth-submit svg {
    width: 19px;
    height: 19px;
    transition: transform .16s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(18, 169, 156, .26);
    filter: saturate(1.05);
}

.auth-submit:hover svg {
    transform: translateX(2px);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .72;
    transform: none;
}

.auth-copyright {
    margin: 26px 0 0;
    color: #9aa9af;
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

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

    .auth-card {
        width: min(600px, 100%);
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .auth-visual {
        display: none;
    }

    .auth-form-panel {
        padding: 42px 42px 34px;
    }

    .auth-form-panel__inner {
        width: min(100%, 430px);
    }

    .auth-mobile-brand {
        margin-bottom: 34px;
        display: flex;
        align-items: center;
    }

    .auth-mobile-brand img {
        width: 124px;
        height: 50px;
        object-fit: contain;
    }
}

@media (max-width: 560px) {
    .login-page {
        padding: 10px;
        background: #edf3f4;
    }

    .auth-shell {
        min-height: calc(100dvh - 20px);
        align-items: center;
    }

    .auth-card {
        width: 100%;
        border-radius: 20px;
        box-shadow: 0 14px 38px rgba(14, 43, 52, .11);
    }

    .auth-form-panel {
        padding: 30px 20px 24px;
    }

    .auth-mobile-brand {
        margin-bottom: 30px;
    }

    .auth-mobile-brand img {
        width: 108px;
        height: 42px;
    }

    .auth-heading h1 {
        font-size: 32px;
    }

    .auth-form {
        margin-top: 26px;
        gap: 15px;
    }

    .auth-field input,
    .auth-submit {
        min-height: 52px;
        height: 52px;
    }

    .auth-alert {
        margin-top: 19px;
    }
}

@media (max-height: 720px) and (min-width: 921px) {
    .login-page {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .auth-card {
        min-height: 560px;
    }

    .auth-visual {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .auth-form-panel {
        padding-top: 34px;
        padding-bottom: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-field input,
    .auth-password-toggle,
    .auth-submit,
    .auth-submit svg {
        transition: none !important;
    }
}
