:root {
    --login-blue: #1c75bc;
    --login-blue-deep: #003f88;
    --login-blue-soft: #cde6ff;
    --login-ink: #17304f;
    --login-muted: #6f7e93;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    width: 100%;
}

body {
    background:
        radial-gradient(circle at 10% 0%, rgba(28,117,188,.14), transparent 31rem),
        radial-gradient(circle at 92% 100%, rgba(0,63,136,.12), transparent 32rem),
        #eef4fa;
    color: var(--login-ink);
    font-family: "DM Sans", sans-serif;
}

.login-page {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    width: 100%;
}

.login-shell {
    background: #fff;
    display: grid;
    grid-template-columns: minmax(0,1.12fr) minmax(390px,.88fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.login-brand-panel {
    background:
        radial-gradient(circle at 10% 8%, rgba(255,255,255,.9), transparent 22rem),
        radial-gradient(circle at 100% 100%, rgba(28,117,188,.18), transparent 28rem),
        linear-gradient(145deg,#fff,#e4f1fd 58%,#c4def5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    padding: clamp(28px,4.2vw,64px);
    position: relative;
}

.login-brand-panel::after {
    border: 1px solid rgba(28,117,188,.13);
    border-radius: 50%;
    content: "";
    height: 300px;
    pointer-events: none;
    position: absolute;
    right: -170px;
    top: 12%;
    width: 300px;
}

.login-brand-logo {
    display: block;
    height: auto;
    max-width: 290px;
    position: relative;
    width: min(62%,290px);
    z-index: 1;
}

.login-brand-copy {
    max-width: 580px;
    position: relative;
    z-index: 1;
}

.login-brand-kicker {
    align-items: center;
    color: var(--login-blue);
    display: inline-flex;
    font-size: .7rem;
    font-weight: 800;
    gap: 7px;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.login-brand-kicker i {
    font-size: 1.05rem;
}

.login-brand-copy h1 {
    color: #123154;
    font-family: "Manrope", sans-serif;
    font-size: clamp(2.05rem,4.2vw,3.75rem);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: 1.04;
    margin: 15px 0 0;
    max-width: 650px;
}

.login-brand-copy p {
    color: #64778e;
    font-size: clamp(.85rem,1.25vw,1rem);
    line-height: 1.7;
    margin: 18px 0 0;
    max-width: 540px;
}

.login-benefits {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3,minmax(0,1fr));
    margin-top: 30px;
}

.login-benefit {
    background: rgba(255,255,255,.65);
    border: 1px solid rgba(28,117,188,.13);
    border-radius: 16px;
    min-width: 0;
    padding: 14px;
}

.login-benefit i {
    align-items: center;
    background: #e6f1fc;
    border-radius: 10px;
    color: var(--login-blue);
    display: inline-flex;
    font-size: 1.05rem;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.login-benefit strong,
.login-benefit small {
    display: block;
}

.login-benefit strong {
    color: #29445f;
    font-size: .68rem;
    margin-top: 10px;
}

.login-benefit small {
    color: #8391a3;
    font-size: .57rem;
    line-height: 1.45;
    margin-top: 3px;
}

.login-developer {
    align-items: center;
    color: #718297;
    display: flex;
    font-size: .59rem;
    gap: 9px;
    margin-top: 28px;
    position: relative;
    z-index: 1;
}

.login-developer img {
    height: auto;
    max-width: 74px;
}

.login-access-panel {
    align-items: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(94,159,232,.35), transparent 22rem),
        linear-gradient(145deg,#327fc9,#145d9d 52%,#003f88);
    display: flex;
    height: 100%;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    padding: clamp(24px,3.5vw,54px);
    position: relative;
}

.login-access-panel::before {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    bottom: -120px;
    content: "";
    height: 310px;
    left: -150px;
    position: absolute;
    width: 310px;
}

.login-card {
    max-width: 410px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.login-card-icon {
    align-items: center;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 15px;
    color: #fff;
    display: inline-flex;
    font-size: 1.25rem;
    height: 47px;
    justify-content: center;
    width: 47px;
}

.login-card h2 {
    color: #fff;
    font-family: "Manrope", sans-serif;
    font-size: clamp(1.75rem,3vw,2.35rem);
    font-weight: 800;
    letter-spacing: -.045em;
    margin: 22px 0 0;
}

.login-card > p {
    color: rgba(255,255,255,.68);
    font-size: .74rem;
    line-height: 1.55;
    margin: 7px 0 24px;
}

.login-error {
    align-items: flex-start;
    background: rgba(91,15,35,.22);
    border: 1px solid rgba(255,199,211,.32);
    border-radius: 13px;
    color: #ffe7ec;
    display: flex;
    font-size: .65rem;
    gap: 8px;
    line-height: 1.45;
    margin-bottom: 16px;
    padding: 11px 12px;
}

.login-success {
    align-items: flex-start;
    background: rgba(12, 92, 68, .24);
    border: 1px solid rgba(185, 255, 227, .3);
    border-radius: 13px;
    color: #e4fff5;
    display: flex;
    font-size: .65rem;
    gap: 8px;
    line-height: 1.45;
    margin-bottom: 16px;
    padding: 11px 12px;
}

.login-success i {
    flex: 0 0 auto;
    font-size: 1rem;
}

.login-error i {
    flex: 0 0 auto;
    font-size: 1rem;
}

.login-subscription-alert {
    align-items: flex-start;
    background: rgba(255,255,255,.11);
    border: 1px solid rgba(110,225,245,.38);
    border-radius: 15px;
    color: #fff;
    display: flex;
    gap: 11px;
    margin-bottom: 18px;
    padding: 14px;
}

.login-subscription-alert > i {
    color: #72e5f5;
    flex: 0 0 auto;
    font-size: 1.2rem;
}

.login-subscription-alert strong,
.login-subscription-alert span {
    display: block;
}

.login-subscription-alert strong {
    font-size: .72rem;
}

.login-subscription-alert span {
    color: rgba(255,255,255,.72);
    font-size: .63rem;
    line-height: 1.5;
    margin-top: 4px;
}

.login-subscription-alert a {
    align-items: center;
    background: #fff;
    border-radius: 999px;
    color: #064f91;
    display: inline-flex;
    font-size: .65rem;
    font-weight: 800;
    gap: 5px;
    margin-top: 11px;
    min-height: 34px;
    padding: 0 14px;
    text-decoration: none;
}

.login-form {
    display: grid;
    gap: 15px;
}

.recovery-password-rule {
    color: #74859a;
    display: block;
    font-size: .62rem;
    line-height: 1.45;
    margin-top: 6px;
}

.login-field {
    display: grid;
    gap: 7px;
}

.login-field > span {
    color: rgba(255,255,255,.8);
    font-size: .61rem;
    font-weight: 700;
}

.login-control {
    align-items: center;
    display: flex;
    position: relative;
}

.login-control > i {
    color: #8094ab;
    font-size: 1.05rem;
    left: 14px;
    pointer-events: none;
    position: absolute;
}

.login-control input {
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 14px;
    color: #263c57;
    font: 600 .72rem "DM Sans",sans-serif;
    min-height: 49px;
    outline: none;
    padding: 11px 45px 11px 41px;
    transition: border-color .16s ease,box-shadow .16s ease,background .16s ease;
    width: 100%;
}

.login-control input::placeholder {
    color: #9aa7b6;
    font-weight: 500;
}

.login-control input:focus {
    background: #fff;
    border-color: #9bc9f5;
    box-shadow: 0 0 0 4px rgba(196,224,250,.16);
}

.password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: #74889f;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.05rem;
    height: 36px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 7px;
    width: 36px;
}

.login-form-meta {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    margin-top: -2px;
}

.login-form-meta a,
.login-form-meta button {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,.82);
    cursor: pointer;
    font-family: inherit;
    font-size: .61rem;
    font-weight: 700;
    padding: 0;
    text-decoration: none;
}

.login-form-meta a:hover,
.login-form-meta button:hover {
    color: #fff;
    text-decoration: underline;
}

body.modal-open {
    overflow: hidden;
}

.recovery-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    padding: 22px;
    pointer-events: none;
    position: fixed;
    transition: opacity .2s ease;
    visibility: hidden;
    z-index: 1000;
}

.recovery-modal.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.recovery-modal-backdrop {
    background: rgba(8,24,48,.68);
    backdrop-filter: blur(7px);
    inset: 0;
    position: absolute;
}

.recovery-dialog {
    background: #fff;
    border: 1px solid rgba(28,117,188,.13);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(3,31,68,.3);
    max-width: 470px;
    padding: 34px;
    position: relative;
    transform: translateY(16px) scale(.98);
    transition: transform .22s ease;
    width: 100%;
    z-index: 1;
}

.recovery-modal.is-open .recovery-dialog {
    transform: translateY(0) scale(1);
}

.recovery-close {
    align-items: center;
    background: #f1f5fa;
    border: 0;
    border-radius: 10px;
    color: #60748c;
    cursor: pointer;
    display: flex;
    font-size: 1.25rem;
    height: 38px;
    justify-content: center;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 38px;
}

.recovery-icon {
    align-items: center;
    background: linear-gradient(135deg,#e4f1ff,#d9e8ff);
    border-radius: 15px;
    color: var(--login-blue);
    display: flex;
    font-size: 1.35rem;
    height: 50px;
    justify-content: center;
    margin-bottom: 19px;
    width: 50px;
}

.recovery-kicker {
    color: var(--login-blue);
    display: block;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.recovery-dialog h2 {
    color: #173858;
    font: 800 1.75rem/1.15 "Manrope",sans-serif;
    letter-spacing: -.035em;
    margin: 7px 0 0;
}

.recovery-dialog > p {
    color: #718096;
    font-size: .82rem;
    line-height: 1.6;
    margin: 10px 0 22px;
}

.recovery-dialog > p strong {
    color: #426381;
    font-weight: 800;
}

.recovery-form {
    display: grid;
    gap: 14px;
}

.recovery-form label > span {
    color: #415872;
    display: block;
    font-size: .7rem;
    font-weight: 700;
    margin-bottom: 7px;
}

.recovery-form label > div {
    align-items: center;
    display: flex;
    position: relative;
}

.recovery-form label > div i {
    color: #7890aa;
    font-size: 1rem;
    left: 14px;
    position: absolute;
}

.recovery-form input {
    border: 1px solid #d9e3ef;
    border-radius: 13px;
    color: #263c57;
    font: 600 .78rem "DM Sans",sans-serif;
    min-height: 49px;
    outline: none;
    padding: 10px 14px 10px 41px;
    width: 100%;
}

.recovery-form input:focus {
    border-color: #6da8df;
    box-shadow: 0 0 0 4px rgba(28,117,188,.1);
}

.recovery-form > button {
    align-items: center;
    background: linear-gradient(135deg,#1c75bc,#075596);
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: flex;
    font: 800 .78rem "DM Sans",sans-serif;
    gap: 8px;
    justify-content: center;
    min-height: 49px;
    margin-top: 3px;
}

.recovery-form > button:disabled {
    cursor: wait;
    opacity: .7;
}

.recovery-form > button.is-loading i {
    animation: recovery-spin .8s linear infinite;
}

.recovery-code-inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
}

.recovery-code-inputs input {
    min-width: 0;
    min-height: 58px;
    padding: 0;
    text-align: center;
    font: 800 1.25rem "Manrope", sans-serif;
}

.recovery-code-actions {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.recovery-code-actions .recovery-text-button {
    min-height: auto;
    margin: 0;
    padding: 6px;
    border: 0;
    color: var(--login-blue);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: .7rem;
    font-weight: 700;
}

.recovery-code-actions .recovery-text-button:hover {
    text-decoration: underline;
}

@keyframes recovery-spin {
    to { transform: rotate(360deg); }
}

.recovery-feedback {
    border-radius: 11px;
    font-size: .7rem;
    line-height: 1.45;
    padding: 10px 12px;
}

.recovery-feedback.is-error {
    background: #fff0f2;
    color: #a94352;
}

.recovery-feedback.is-success {
    background: #eaf9f3;
    color: #187454;
}

.login-submit {
    align-items: center;
    background: #fff;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 25px rgba(0,37,80,.2);
    color: #075596;
    cursor: pointer;
    display: flex;
    font: 800 .73rem "DM Sans",sans-serif;
    gap: 8px;
    justify-content: center;
    min-height: 49px;
    padding: 0 18px;
    transition: transform .16s ease,box-shadow .16s ease,background .16s ease;
    width: 100%;
}

.login-submit:hover {
    background: #eef7ff;
    box-shadow: 0 15px 30px rgba(0,37,80,.25);
    transform: translateY(-1px);
}

.login-signup-callout {
    align-items: center;
    color: rgba(255,255,255,.68);
    display: flex;
    font-size: .66rem;
    gap: 5px;
    justify-content: center;
    margin-top: 15px;
}

.login-signup-callout a {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.login-signup-callout a:hover {
    text-decoration: underline;
}

.login-security-note {
    align-items: center;
    color: rgba(255,255,255,.54);
    display: flex;
    font-size: .56rem;
    gap: 6px;
    justify-content: center;
    margin: 10px 0 0;
    text-align: center;
}

.login-developer-credit {
    align-items: center;
    bottom: clamp(22px, 3.2vh, 34px);
    display: flex;
    gap: 11px;
    left: 50%;
    padding: 8px 12px;
    position: absolute;
    text-decoration: none;
    transform: translateX(-50%);
    transition: opacity .16s ease, transform .16s ease;
    white-space: nowrap;
    z-index: 2;
}

.login-developer-credit::before {
    background: rgba(255,255,255,.22);
    content: "";
    height: 24px;
    order: 1;
    width: 1px;
}

.login-developer-credit span {
    color: rgba(255,255,255,.64);
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: .03em;
}

.login-developer-credit img {
    display: block;
    height: auto;
    max-width: 118px;
    order: 2;
    width: 118px;
}

.login-developer-credit:hover {
    opacity: .9;
    transform: translateX(-50%) translateY(-1px);
}

.terms-card {
    max-width: 520px;
}

.terms-shell {
    grid-template-columns: minmax(0,.95fr) minmax(430px,1.05fr);
}

.terms-text {
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 14px;
    color: #314a66;
    font-size: .72rem;
    line-height: 1.65;
    max-height: min(36vh, 320px);
    overflow: auto;
    padding: 16px 18px;
}

.terms-text p {
    margin: 0;
}

.terms-text p + p {
    margin-top: 11px;
}

.terms-check {
    align-items: flex-start;
    color: rgba(255,255,255,.86);
    cursor: pointer;
    display: flex;
    font-size: .68rem;
    font-weight: 700;
    gap: 10px;
    line-height: 1.45;
}

.terms-check input {
    accent-color: #fff;
    flex: 0 0 auto;
    height: 17px;
    margin-top: 1px;
    width: 17px;
}

.terms-message {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.22);
}

.terms-logout {
    margin: 12px 0 0;
    text-align: center;
}

.terms-logout a {
    color: rgba(255,255,255,.78);
    font-size: .62rem;
    font-weight: 700;
    text-decoration: none;
}

.terms-logout a:hover {
    color: #fff;
    text-decoration: underline;
}

@media(max-width:960px) {
    .login-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 32% 68%;
    }

    .login-brand-panel {
        min-height: 0;
        padding: clamp(18px,3.5vh,28px) 32px;
    }

    .login-brand-copy h1 {
        font-size: clamp(1.55rem,4.5vw,2.35rem);
        margin-top: 8px;
    }

    .login-brand-copy p {
        line-height: 1.45;
        margin-top: 8px;
    }

    .login-benefits,
    .login-developer {
        display: none;
    }

    .login-access-panel {
        min-height: 0;
        padding: clamp(20px,4vh,34px) 24px 58px;
    }

    .login-card-icon {
        height: 40px;
        width: 40px;
    }

    .login-card h2 {
        margin-top: 14px;
    }

    .login-card > p {
        margin-bottom: 16px;
    }

    .login-form {
        gap: 11px;
    }

    .login-security-note {
        margin-top: 12px;
    }

    .login-developer-credit {
        bottom: 10px;
    }
}

@media(max-height:900px) and (min-width:961px) {
    .login-brand-panel,
    .login-access-panel {
        padding-bottom: 32px;
        padding-top: 32px;
    }

    .login-brand-logo { max-width: 245px; }
    .login-brand-copy h1 { font-size: clamp(2rem,3.45vw,3.15rem); margin-top: 11px; }
    .login-brand-copy p { margin-top: 12px; }
    .login-benefits { margin-top: 20px; }
    .login-benefit { padding: 12px; }
    .login-developer-credit { bottom: 18px; }
}

@media(max-width:600px) {
    .login-shell {
        grid-template-rows: 25% 75%;
    }

    .login-brand-panel {
        min-height: 0;
        padding: clamp(14px,2.5vh,22px);
    }

    .login-brand-logo {
        max-width: 160px;
    }

    .login-brand-kicker {
        font-size: .58rem;
    }

    .login-brand-copy h1 {
        font-size: clamp(1.25rem,6vw,1.6rem);
        margin-top: 6px;
    }

    .login-brand-copy p {
        display: none;
        font-size: .68rem;
        line-height: 1.5;
        margin-top: 6px;
    }

    .login-access-panel {
        min-height: 0;
        padding: clamp(16px,3vh,26px) 21px 54px;
    }

    .login-developer-credit img { width: 100px; }
}

@media(max-height:720px) and (min-width:961px) {
    .login-brand-panel,
    .login-access-panel {
        padding-bottom: 24px;
        padding-top: 24px;
    }

    .login-brand-copy h1 {
        font-size: clamp(2rem,3.5vw,3rem);
    }

    .login-brand-copy p {
        margin-top: 10px;
    }

    .login-benefits {
        margin-top: 18px;
    }

    .login-developer {
        margin-top: 14px;
    }
}

@media(max-width:960px) and (max-height:620px) {
    .login-shell {
        display: block;
    }

    .login-brand-panel {
        display: none;
    }

    .login-access-panel {
        height: 100%;
    }

    .login-card-icon {
        display: none;
    }

    .login-card h2 {
        margin-top: 0;
    }
}

@media(max-width:600px) and (max-height:700px) {
    .login-shell {
        grid-template-rows: 21% 79%;
    }

    .login-brand-kicker {
        display: none;
    }

    .login-card h2 {
        font-size: 1.55rem;
    }

    .login-control input,
    .login-submit {
        min-height: 44px;
    }

    .login-security-note {
        margin-top: 8px;
    }
}
