:root {
    --auth-navy: #071a36;
    --auth-navy-2: #0b2a55;
    --auth-blue: #2563eb;
    --auth-blue-hover: #1d4ed8;
    --auth-sky: #dbeafe;
    --auth-bg: #f5f8fc;
    --auth-card: #ffffff;
    --auth-text: #172033;
    --auth-muted: #667085;
    --auth-border: #dbe3ee;
    --auth-border-strong: #c8d3e1;
    --auth-danger: #b42318;
    --auth-danger-bg: #fff4f2;
    --auth-danger-border: #fecdca;
    --auth-success: #027a48;
    --auth-success-bg: #ecfdf3;
    --auth-success-border: #abefc6;
    --auth-warning: #b54708;
    --auth-warning-bg: #fffaeb;
    --auth-warning-border: #fedf89;
    --auth-shadow: 0 20px 50px rgba(15, 23, 42, .09);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-body {
    min-height: 100vh;
    margin: 0;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(420px, 46%) minmax(500px, 54%);
}

.auth-brand-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    overflow: hidden;
    padding: 36px clamp(36px, 5vw, 78px) 28px;
    background:
        radial-gradient(
            circle at 75% 15%,
            rgba(59, 130, 246, .28),
            transparent 34%
        ),
        radial-gradient(
            circle at 5% 85%,
            rgba(14, 165, 233, .12),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #06162e 0%,
            #08244a 58%,
            #0b3265 100%
        );
    color: #fff;
}

.auth-brand-panel::before {
    position: absolute;
    width: 480px;
    height: 480px;
    right: -230px;
    bottom: -190px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    content: "";
}

.auth-brand-panel::after {
    position: absolute;
    width: 330px;
    height: 330px;
    right: -145px;
    bottom: -115px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 50%;
    content: "";
}

.auth-brand-top,
.auth-brand-footer,
.auth-brand-content {
    position: relative;
    z-index: 1;
}

.auth-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: inherit;
    text-decoration: none;
}

.auth-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.02em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.auth-brand > span:last-child,
.auth-mobile-brand > div {
    display: grid;
}

.auth-brand strong {
    font-size: 14px;
    letter-spacing: .055em;
}

.auth-brand small {
    margin-top: 1px;
    color: #bcd1ea;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.auth-security-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #dbeafe;
    font-size: 9px;
    font-weight: 650;
}

.auth-security-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .14);
}

.auth-brand-content {
    width: min(560px, 100%);
    margin: auto 0;
    padding: 54px 0 46px;
}

.auth-eyebrow {
    margin: 0 0 7px;
    color: var(--auth-blue);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .145em;
}

.auth-eyebrow--light {
    color: #7dd3fc;
}

.auth-brand-content h1 {
    max-width: 520px;
    margin: 0;
    font-size: clamp(33px, 3.15vw, 50px);
    font-weight: 760;
    line-height: 1.04;
    letter-spacing: -.042em;
}

.auth-brand-lead {
    max-width: 520px;
    margin: 20px 0 0;
    color: #b9cce4;
    font-size: 13px;
    line-height: 1.72;
}

.auth-feature-grid {
    display: grid;
    max-width: 520px;
    gap: 3px;
    margin-top: 34px;
}

.auth-feature-grid article {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
}

.auth-feature-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid rgba(125, 211, 252, .18);
    border-radius: 9px;
    background: rgba(56, 189, 248, .08);
}

.auth-feature-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: #7dd3fc;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-feature-grid article > div {
    display: grid;
    gap: 2px;
}

.auth-feature-grid strong {
    color: #f8fbff;
    font-size: 10px;
}

.auth-feature-grid article > div span {
    color: #9fb6d2;
    font-size: 9px;
    line-height: 1.45;
}

.auth-brand-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7694b8;
    font-size: 8px;
}

.auth-brand-footer__separator {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #58789f;
}

.auth-form-panel {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 36px clamp(26px, 6vw, 90px);
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(37, 99, 235, .035),
            transparent 30%
        ),
        #f7f9fc;
}

.auth-card {
    width: min(430px, 100%);
    padding: 34px 36px 31px;
    border: 1px solid rgba(214, 223, 235, .9);
    border-radius: 18px;
    background: var(--auth-card);
    box-shadow: var(--auth-shadow);
}

.auth-card-heading {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 13px;
    align-items: start;
    margin-bottom: 25px;
}

.auth-card-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 11px;
    background: #eff6ff;
    color: #2563eb;
}

.auth-card-icon--otp {
    background: #eef2ff;
    color: #4f46e5;
}

.auth-card-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-card-heading h2 {
    margin: 0;
    color: #172033;
    font-size: 21px;
    font-weight: 750;
    line-height: 1.18;
    letter-spacing: -.025em;
}

.auth-card-heading p:last-child {
    margin: 7px 0 0;
    color: var(--auth-muted);
    font-size: 10px;
    line-height: 1.55;
}

.auth-alert {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin: 0 0 19px;
    padding: 10px 11px;
    border: 1px solid;
    border-radius: 9px;
    font-size: 9px;
}

.auth-alert-icon {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 800;
}

.auth-alert > div {
    display: grid;
    gap: 2px;
}

.auth-alert strong {
    font-size: 9px;
}

.auth-alert span:last-child {
    line-height: 1.4;
}

.auth-alert--error {
    border-color: var(--auth-danger-border);
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
}

.auth-alert--success {
    border-color: var(--auth-success-border);
    background: var(--auth-success-bg);
    color: var(--auth-success);
}

.auth-alert--warning {
    border-color: var(--auth-warning-border);
    background: var(--auth-warning-bg);
    color: var(--auth-warning);
}

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

.auth-field {
    display: grid;
    gap: 6px;
}

.auth-field > label,
.auth-label-row label,
.auth-otp-fieldset legend {
    color: #344054;
    font-size: 9px;
    font-weight: 700;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-link,
.auth-link-button,
.auth-back-link {
    color: var(--auth-blue);
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover,
.auth-back-link:hover {
    text-decoration: underline;
}

.auth-input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-shell input {
    width: 100%;
    height: 43px;
    padding: 0 47px 0 39px;
    border: 1px solid var(--auth-border-strong);
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: #172033;
    font-size: 11px;
    transition:
        border-color .13s ease,
        box-shadow .13s ease;
}

.auth-input-shell input::placeholder {
    color: #98a2b3;
}

.auth-input-shell input:hover {
    border-color: #aebccc;
}

.auth-input-shell input:focus {
    border-color: #4f8df8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.auth-input-shell input[aria-invalid="true"] {
    border-color: #f04438;
    box-shadow: 0 0 0 3px rgba(240, 68, 56, .08);
}

.auth-input-icon {
    position: absolute;
    left: 13px;
    z-index: 1;
    display: grid;
    place-items: center;
    color: #7b8ba3;
    pointer-events: none;
}

.auth-input-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-password-toggle {
    position: absolute;
    right: 6px;
    height: 31px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #526581;
    cursor: pointer;
    font-size: 8px;
    font-weight: 700;
}

.auth-password-toggle:hover {
    background: #f3f6fa;
    color: #1f4f8d;
}

.auth-field-error {
    min-height: 11px;
    color: var(--auth-danger);
    font-size: 8px;
}

.auth-check {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 7px;
    color: #667085;
    cursor: pointer;
    font-size: 9px;
}

.auth-check input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--auth-blue);
}

.auth-primary-button {
    position: relative;
    display: inline-flex;
    height: 43px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    border: 1px solid #1d4ed8;
    border-radius: 9px;
    background: linear-gradient(180deg, #2f6fed 0%, #2159d5 100%);
    color: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 750;
    box-shadow:
        0 1px 2px rgba(16, 24, 40, .08),
        inset 0 1px 0 rgba(255, 255, 255, .16);
    transition:
        background .13s ease,
        transform .08s ease,
        opacity .13s ease;
}

.auth-primary-button:hover:not(:disabled) {
    background: linear-gradient(180deg, #2864df 0%, #194dc4 100%);
}

.auth-primary-button:active:not(:disabled) {
    transform: translateY(1px);
}

.auth-primary-button:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.auth-button-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

.auth-primary-button.is-loading .auth-button-spinner {
    display: block;
}

.auth-primary-button.is-loading .auth-button-label {
    opacity: .86;
}

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

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    margin: 23px 0 15px;
}

.auth-divider span {
    height: 1px;
    background: #e8edf4;
}

.auth-divider small {
    color: #98a2b3;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .12em;
}

.auth-security-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    color: #718096;
}

.auth-security-note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 1px;
    fill: none;
    stroke: #3b82f6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.auth-security-note p {
    margin: 0;
    font-size: 8px;
    line-height: 1.55;
}

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

.auth-form-footer {
    position: absolute;
    bottom: 21px;
    display: flex;
    gap: 5px;
    color: #98a2b3;
    font-size: 8px;
}

.auth-form-panel {
    position: relative;
}

.auth-otp-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.auth-otp-fieldset legend {
    margin-bottom: 8px;
}

.auth-otp-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.auth-otp-grid input {
    width: 100%;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--auth-border-strong);
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: #172033;
    font-size: 18px;
    font-weight: 750;
    text-align: center;
    caret-color: var(--auth-blue);
}

.auth-otp-grid input:focus {
    border-color: #4f8df8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.auth-otp-grid input.is-filled {
    border-color: #8fb6fb;
    background: #f8fbff;
}

.auth-otp-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #7b8799;
    font-size: 8px;
}

.auth-otp-meta strong {
    color: #344054;
}

.auth-resend-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 18px;
    color: #667085;
    font-size: 9px;
}

.auth-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.auth-link-button:disabled {
    color: #98a2b3;
    cursor: not-allowed;
}

.auth-back-link {
    display: block;
    width: max-content;
    margin: 16px auto 0;
    color: #667085;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1040px) {
    .auth-shell {
        grid-template-columns: 40% 60%;
    }

    .auth-brand-panel {
        padding-inline: 32px;
    }

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

    .auth-security-pill {
        display: none;
    }
}

@media (max-width: 760px) {
    .auth-shell {
        display: block;
    }

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

    .auth-form-panel {
        min-height: 100vh;
        padding: 84px 20px 72px;
    }

    .auth-mobile-brand {
        position: absolute;
        top: 22px;
        left: 22px;
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .auth-mobile-brand .auth-brand-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border: 0;
        border-radius: 9px;
        background: var(--auth-navy-2);
        font-size: 11px;
    }

    .auth-mobile-brand strong {
        color: #172033;
        font-size: 11px;
        letter-spacing: .04em;
    }

    .auth-mobile-brand small {
        color: #7b8799;
        font-size: 7px;
        font-weight: 700;
        letter-spacing: .09em;
        text-transform: uppercase;
    }

    .auth-card {
        padding: 29px 24px 26px;
    }

    .auth-form-footer {
        right: 20px;
        bottom: 18px;
        left: 20px;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .auth-form-panel {
        align-items: flex-start;
        padding-inline: 14px;
    }

    .auth-card {
        padding-inline: 19px;
        border-radius: 15px;
    }

    .auth-card-heading {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
    }

    .auth-card-icon {
        width: 36px;
        height: 36px;
    }

    .auth-card-heading h2 {
        font-size: 19px;
    }

    .auth-otp-grid {
        gap: 5px;
    }

    .auth-otp-grid input {
        height: 44px;
        font-size: 16px;
    }

    .auth-otp-meta {
        display: grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
}
