:root {
    --auth-primary: #0b55d4;
    --auth-primary-dark: #073d9b;
    --auth-primary-soft: #eaf2ff;
    --auth-background: #f3f6fb;
    --auth-surface: #ffffff;
    --auth-text: #152033;
    --auth-muted: #6d7789;
    --auth-border: #dfe5ee;
    --auth-danger: #b42318;
    --auth-danger-background: #fff1f0;
    --auth-danger-border: #f4c7c3;
    --auth-success: #16794d;
    --auth-success-background: #edfdf5;
    --auth-success-border: #b7ebd0;
    --auth-shadow:
        0 24px 70px rgba(22, 43, 77, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.auth-page {
    min-height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-shell {
    width: min(1180px, 100%);
    min-height: 720px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    overflow: hidden;
    border: 1px solid rgba(220, 227, 238, 0.9);
    border-radius: 28px;
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(
            circle at 85% 12%,
            rgba(73, 144, 255, 0.48),
            transparent 28%
        ),
        radial-gradient(
            circle at 10% 88%,
            rgba(20, 98, 214, 0.46),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #082c73 0%,
            #0a4db8 52%,
            #0b65e6 100%
        );
    color: #ffffff;
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    top: -210px;
    right: -210px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    bottom: -175px;
    left: -135px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

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

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

.auth-brand-symbol {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--auth-primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    box-shadow:
        0 12px 30px rgba(8, 42, 100, 0.22);
}

.auth-brand-panel .auth-brand-symbol {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    box-shadow: none;
}

.auth-brand-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-brand-name strong {
    font-size: 17px;
    line-height: 1.1;
}

.auth-brand-name span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.auth-mobile-brand .auth-brand-name span {
    color: var(--auth-muted);
}

.auth-presentation {
    max-width: 535px;
    margin-top: 76px;
}

.auth-eyebrow,
.auth-form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.auth-eyebrow {
    color: rgba(255, 255, 255, 0.7);
}

.auth-eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
}

.auth-presentation h1 {
    margin: 20px 0 18px;
    font-size: clamp(40px, 4.3vw, 61px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.auth-presentation p {
    max-width: 480px;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 16px;
    line-height: 1.72;
}

.auth-features {
    margin-top: 54px;
    display: grid;
    gap: 13px;
}

.auth-feature {
    max-width: 490px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    font-size: 11px;
    font-weight: 800;
}

.auth-feature strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.auth-feature p {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    line-height: 1.45;
}

.auth-brand-footer {
    margin-top: 40px;
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
}

.auth-form-panel {
    padding: 70px 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbfcff 100%
        );
}

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

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 13px;
    margin-bottom: 48px;
}

.auth-form-header {
    margin-bottom: 30px;
}

.auth-form-eyebrow {
    margin-bottom: 15px;
    color: var(--auth-primary);
}

.auth-form-header h2 {
    margin: 0 0 12px;
    color: var(--auth-text);
    font-size: 34px;
    line-height: 1.13;
    letter-spacing: -0.04em;
}

.auth-form-header p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.65;
}

.auth-alert {
    margin-bottom: 22px;
    padding: 13px 15px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}

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

.auth-alert-error .auth-alert-icon {
    background: var(--auth-danger);
    color: #ffffff;
}

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

.auth-alert-success .auth-alert-icon {
    background: var(--auth-success);
    color: #ffffff;
}

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

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

.auth-field label {
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

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

.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper input {
    width: 100%;
    height: 54px;
    padding: 0 52px 0 46px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    outline: none;
    background: #ffffff;
    color: var(--auth-text);
    font-size: 14px;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.auth-input-wrapper input::placeholder {
    color: #a1a9b7;
}

.auth-input-wrapper input:hover {
    border-color: #c6cfdd;
}

.auth-input-wrapper input:focus {
    border-color: var(--auth-primary);
    box-shadow:
        0 0 0 4px rgba(11, 85, 212, 0.1);
}

.auth-input-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 16px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    color: #8c96a8;
    font-size: 14px;
    font-weight: 800;
    pointer-events: none;
}

.auth-password-toggle {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    padding: 5px 2px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--auth-primary);
    font-size: 11px;
    font-weight: 800;
}

.auth-password-toggle:focus-visible {
    border-radius: 5px;
    box-shadow:
        0 0 0 3px rgba(11, 85, 212, 0.15);
}

.auth-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 5px;
    padding: 0 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            var(--auth-primary) 0%,
            #0b6ee5 100%
        );
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    box-shadow:
        0 13px 28px rgba(11, 85, 212, 0.24);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow:
        0 17px 34px rgba(11, 85, 212, 0.28);
}

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

.auth-submit:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(11, 85, 212, 0.17),
        0 13px 28px rgba(11, 85, 212, 0.24);
}

.auth-form-footer {
    margin-top: 36px;
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    border-top: 1px solid #edf0f5;
    color: var(--auth-muted);
    font-size: 11px;
}

.auth-form-footer small {
    color: #9aa2af;
    font-size: 10px;
}

.auth-form-wide .auth-form-wrapper {
    width: min(100%, 560px);
}

.auth-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.auth-type-option {
    position: relative;
}

.auth-type-option input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.auth-type-option span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    color: var(--auth-text);
    font-size: 13px;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.auth-type-option span strong {
    font-size: 14px;
}

.auth-type-option span small {
    color: var(--auth-muted);
    font-weight: 500;
}

.auth-type-option input:checked + span {
    border-color: var(--auth-primary);
    background: var(--auth-primary-soft);
    box-shadow: 0 0 0 3px rgba(11, 85, 212, 0.1);
}

.auth-type-option input:focus-visible + span {
    box-shadow: 0 0 0 4px rgba(11, 85, 212, 0.17);
}

.auth-plan-grid {
    display: grid;
    gap: 10px;
}

.auth-plan-option {
    position: relative;
}

.auth-plan-option input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.auth-plan-option span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.auth-plan-option strong {
    display: block;
    color: var(--auth-text);
    font-size: 14px;
}

.auth-plan-option small {
    color: var(--auth-muted);
    font-size: 12px;
}

.auth-plan-price {
    color: var(--auth-primary);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.auth-plan-option input:checked + span {
    border-color: var(--auth-primary);
    background: var(--auth-primary-soft);
    box-shadow: 0 0 0 3px rgba(11, 85, 212, 0.1);
}

.auth-plan-option input:focus-visible + span {
    box-shadow: 0 0 0 4px rgba(11, 85, 212, 0.17);
}

.auth-select-wrapper select {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    outline: none;
    background: #ffffff;
    color: var(--auth-text);
    font-size: 14px;
}

.auth-select-wrapper select:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(11, 85, 212, 0.1);
}

.auth-form-link {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
}

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

.auth-pending-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 50%;
    background: var(--auth-primary-soft);
    color: var(--auth-primary);
    font-size: 26px;
}

.auth-debug-box {
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px dashed var(--auth-border);
    border-radius: 13px;
    background: #fafbfd;
    font-size: 12px;
    color: var(--auth-muted);
    word-break: break-all;
}

.auth-debug-box a {
    color: var(--auth-primary);
    font-weight: 700;
}

@media (max-width: 1000px) {
    .auth-page {
        padding: 0;
    }

    .auth-shell {
        min-height: 100vh;
        grid-template-columns: minmax(0, 1fr);
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

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

    .auth-form-panel {
        padding: 50px 28px;
    }

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

@media (max-width: 520px) {
    .auth-form-panel {
        padding: 34px 20px;
        align-items: flex-start;
    }

    .auth-form-wrapper {
        padding-top: 14px;
    }

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

    .auth-form-header h2 {
        font-size: 29px;
    }

    .auth-input-wrapper input {
        height: 52px;
    }

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

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