body.auth-page {
    --brand: #0c83ff;
    --ink-900: #122335;
    --ink-700: #3b5168;
    --ink-500: #6f8195;
    --line: #d5deea;
    --surface: #ffffff;
    --danger: #cc2f50;
    --success: #0f8c67;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    margin: 0;
    min-height: 100vh;
    min-height: 100vh;
    font-family: "Inter", "Aptos", "Segoe UI", sans-serif;
    color: var(--ink-900);
    background: #eeeff5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 2.2vw, 2.25rem);
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-page * {
    box-sizing: border-box;
}

.auth-shell {
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;

    max-width: 1120px;
    margin-inline: auto;
}

.auth-frame {
    width: 45%;
    height: 85%;
    min-height: min(640px, 92vh);
    background: var(--surface);
    border-radius: 0.75rem;
    overflow: auto;
    box-shadow: 0 18px 40px rgba(16, 33, 60, 0.12);
}

@media (max-width: 980px) {
    .auth-frame {
        width: 100%;
        height: auto;
        min-height: 0;
    }
}

.auth-brand {
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.auth-brand img {
    height: 70px;
    object-fit: contain;
}


.welcome-label {
    display: none;
}

.welcome-headline {
    text-align: center;
    margin-top: 0;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.45;
    color: #59627d;
}

.welcome-text {
    display: none;
}

.auth-form-right {
    width: 90%;
    height: 100%;
    margin: 0 auto;
    position: relative;
    background: var(--surface);
    padding: clamp(1.8rem, 4vw, 3rem) clamp(1.4rem, 3.6vw, 2.6rem);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    overflow-y: auto;
}

.auth-form-right::after {
    display: none;
}

.auth-content {
    position: relative;
    z-index: 2;
    width: min(370px, 100%);
}

.auth-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.auth-card-header {
    margin-bottom: 1.2rem;
    text-align: left;
}

.auth-card-header h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 1.6rem);
    line-height: 1.14;
    letter-spacing: -0.01em;
    font-weight: 600;
    color: var(--ink-900);
}

.auth-card-header p {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--ink-500);
}

.form-group {
    margin-bottom: 0.95rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.36rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #44596e;
}

.form-control {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.63rem 0.9rem;
    border: 1px solid #d0d5e2;
    border-radius: 0.38rem;
    background: #fdfdff;
    font-size: 0.88rem;
    color: #1b2f44;
    -webkit-text-fill-color: #1b2f44;
    font-family: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-control::placeholder {
    color: #8393a2;
    opacity: 1;
}

.form-control:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--brand);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 24%, transparent);
}

input.form-control:-webkit-autofill,
input.form-control:-webkit-autofill:hover,
input.form-control:-webkit-autofill:focus,
textarea.form-control:-webkit-autofill,
select.form-control:-webkit-autofill {
    -webkit-text-fill-color: #1b2f44 !important;
    box-shadow: 0 0 0 1000px #f3f6f9 inset !important;
    caret-color: #1b2f44;
    transition: background-color 9999s ease-out 0s;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 0.88rem;
    height: 0.88rem;
    margin: 0;
    accent-color: var(--brand);
}

.form-check-label {
    margin: 0;
    font-size: 0.74rem;
    color: #4f657b;
}

.form-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.2rem 0 1rem;
}

.form-meta-link {
    font-size: 0.74rem;
    font-weight: 600;
    color: #4f657b;
    text-decoration: none;
}

.form-meta-link:hover {
    color: var(--brand);
    text-decoration: underline;
}

.verify-resend-row {
    justify-content: flex-end;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.resend-link-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--brand);
    text-decoration: underline;
    cursor: pointer;
}

.resend-link-btn:hover {
    color: #3855bf;
}

.form-note {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #687d92;
}

.auth-section-title {
    margin: 1rem 0 0.55rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #425a73;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.72rem;
    border-radius: 0.4rem;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-primary {
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, #ffffff 8%) 0%, color-mix(in srgb, var(--brand) 70%, #00152d 30%) 100%);
    color: #ffffff;
    box-shadow: 0 8px 16px -10px rgba(55, 76, 177, 0.7);
}

.btn-primary:hover {
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-outline-light {
    background: transparent;
    border-color: #9aadc1;
    color: #273f57;
}

.btn-outline-light:hover {
    background: #f4f7fa;
    border-color: #6c86a0;
    color: #1f344a;
}

.form-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
}

.auth-links {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #d7e0ea;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.auth-links a {
    font-size: 0.75rem;
    font-weight: 500;
    color: #516981;
    text-decoration: none;
}

.auth-links a:hover {
    color: var(--brand);
    text-decoration: underline;
}

.auth-links-simple {
    justify-content: center;
    gap: 0.35rem;
}

.auth-links-help {
    font-size: 0.74rem;
    color: #6c7c95;
}

.alert {
    padding: 0.8rem 0.95rem;
    border-radius: 0.28rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    box-shadow: none;
    line-height: 1.4;
}

.alert-success {
    background: #dff5e8;
    color: #0f6a43;
}

.alert-danger {
    background: #fae5e9;
    color: #bf1e46;
}

.alert p,
.alert ul {
    margin: 0;
}

.alert ul {
    list-style: none;
    padding: 0;
}

.alert ul li + li {
    margin-top: 0.2rem;
}

.validation-summary-valid {
    display: none;
}

.text-danger {
    display: block;
    margin-top: 0.22rem;
    font-size: 0.72rem;
    color: var(--danger);
}

@media (max-width: 980px) {
    body.auth-page {
        align-items: flex-start;
        justify-content: flex-start;
        padding: max(0.85rem, env(safe-area-inset-top)) 0.85rem max(1rem, env(safe-area-inset-bottom));
    }

    .auth-shell {
        max-width: 100%;
    }

    .auth-frame {
        grid-template-columns: 1fr;
        min-height: 0;
        overflow: visible;
    }

    .auth-visual-left {
        min-height: 220px;
    }

    .auth-visual-left::after {
        display: none;
    }

    .auth-form-right {
        display: block;
        max-height: none;
        overflow: visible;
        padding-top: clamp(1.5rem, 5vw, 2.25rem);
        padding-bottom: clamp(1.75rem, 6vw, 2.5rem);
    }

    .auth-content {
        margin: 0 auto;
    }

    .auth-illustration {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .auth-card-header h2 {
        font-size: 1.85rem;
    }

    .auth-card-header p {
        font-size: 0.78rem;
    }

    .form-control {
        min-height: 2.9rem;
    }
}

@media (max-width: 640px) {
    .auth-form-right {
        padding: max(1.4rem, env(safe-area-inset-top)) 1rem max(1.5rem, calc(env(safe-area-inset-bottom) + 0.8rem));
    }

    .visual-copy {
        width: 100%;
    }

    .welcome-headline {
        text-align: center;
        font-size: 0.84rem;
    }

    .auth-brand {
        justify-content: center;
    }

    .auth-illustration {
        max-height: 210px;
    }

    .auth-card-header {
        text-align: center;
    }

    .auth-links {
        justify-content: center;
    }

}

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