.auth-container {
    --auth-card: var(--app-surface);
    --auth-text: var(--app-text);
    --auth-muted: var(--app-text-muted);
    --auth-border: var(--app-border);
    display: grid;
    grid-template-columns: minmax(20rem, 1.05fr) minmax(26rem, .95fr);
    gap: clamp(1rem, 3vw, 3rem);
    min-height: 100vh;
    padding: clamp(1rem, 3vw, 2.75rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 90% 5%, rgba(239, 121, 89, .08), transparent 27rem),
        var(--app-bg);
    color: var(--auth-text);
}

html[data-theme="dark"] .auth-container {
    --auth-card: var(--app-surface);
    --auth-text: var(--app-text);
    --auth-muted: var(--app-text-muted);
    --auth-border: var(--app-border);
}

.auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - clamp(2rem, 6vw, 5.5rem));
    padding: clamp(1.5rem, 4vw, 4rem);
    overflow: hidden;
    border-radius: 1.8rem;
    background:
        radial-gradient(circle at 82% 5%, rgba(245, 240, 232, .16), transparent 24rem),
        radial-gradient(circle at 5% 95%, rgba(239, 121, 89, .13), transparent 20rem),
        linear-gradient(145deg, var(--brand-charcoal) 0%, #302929 55%, #49342e 100%);
    color: var(--brand-cream);
    box-shadow: 0 30px 80px rgba(33, 31, 32, .18);
}

.auth-showcase::after {
    position: absolute;
    right: -6rem;
    bottom: -7rem;
    width: 22rem;
    height: 22rem;
    border: 1px solid rgba(245, 240, 232, .13);
    border-radius: 50%;
    box-shadow: 0 0 0 3rem rgba(245, 240, 232, .035), 0 0 0 7rem rgba(245, 240, 232, .025);
    content: "";
}

.auth-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: .75rem;
    color: var(--brand-cream);
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: -.04em;
    text-decoration: none;
}

.auth-brand:hover {
    color: var(--brand-cream);
}

.auth-brand strong {
    color: var(--brand-coral);
}

.auth-brand-mark {
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    border: 1px solid rgba(245, 240, 232, .2);
    border-radius: .9rem;
    background: rgba(245, 240, 232, .12);
    box-shadow: inset 0 1px 0 rgba(245, 240, 232, .12);
}

.auth-showcase-copy {
    position: relative;
    z-index: 2;
    max-width: 37rem;
    margin: auto 0;
    padding: 4rem 0 2rem;
}

.auth-showcase-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--brand-coral);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.auth-showcase h2 {
    max-width: 34rem;
    margin: 0;
    color: var(--brand-cream);
    font-size: clamp(2.2rem, 4.3vw, 4.25rem);
    font-weight: 880;
    letter-spacing: -.065em;
    line-height: 1.02;
}

.auth-showcase p {
    max-width: 31rem;
    margin: 1.4rem 0 0;
    color: rgba(245, 240, 232, .85);
    font-size: 1rem;
    line-height: 1.7;
}

.auth-showcase ul {
    display: grid;
    gap: .8rem;
    margin: 1.8rem 0 0;
    padding: 0;
    color: rgba(245, 240, 232, .88);
    font-size: .87rem;
    list-style: none;
}

.auth-showcase li {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.auth-showcase li i {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: rgba(239, 121, 89, .17);
    color: var(--brand-coral);
}

.auth-preview {
    position: relative;
    z-index: 2;
    width: min(27rem, 82%);
    margin-top: auto;
    padding: 1rem;
    border: 1px solid rgba(245, 240, 232, .14);
    border-radius: 1.2rem;
    background: rgba(33, 31, 32, .35);
    box-shadow: inset 0 1px 0 rgba(245, 240, 232, .08);
    backdrop-filter: blur(10px);
}

.auth-preview-head {
    display: flex;
    gap: .35rem;
    margin-bottom: 1rem;
}

.auth-preview-head span {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: rgba(245, 240, 232, .3);
}

.auth-preview-message {
    width: 74%;
    height: 2.7rem;
    margin: .65rem 0 .65rem auto;
    border-radius: .8rem .8rem .2rem .8rem;
    background: rgba(239, 121, 89, .65);
}

.auth-preview-message--muted {
    width: 58%;
    margin-right: auto;
    margin-left: 0;
    border-radius: .8rem .8rem .8rem .2rem;
    background: rgba(245, 240, 232, .11);
}

.auth-preview-composer {
    display: flex;
    align-items: center;
    gap: .65rem;
    height: 2.8rem;
    margin-top: 1rem;
    padding: .4rem .45rem .4rem .8rem;
    border: 1px solid rgba(245, 240, 232, .12);
    border-radius: .85rem;
    background: rgba(245, 240, 232, .08);
}

.auth-preview-composer span {
    width: 45%;
    height: .35rem;
    border-radius: 99px;
    background: rgba(245, 240, 232, .19);
}

.auth-preview-composer i {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    margin-left: auto;
    border-radius: .6rem;
    background: var(--brand-cream);
    color: var(--app-link);
}

.auth-card {
    align-self: center;
    width: min(100%, 32rem);
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2.6rem);
    border: 1px solid var(--auth-border);
    border-radius: 1.5rem;
    background: var(--auth-card);
    color: var(--auth-text);
    box-shadow: var(--app-shadow-md);
    animation: auth-enter .55s ease-out both;
}

.auth-card-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.7rem;
}

.auth-card-tools > a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--auth-muted);
    font-size: .76rem;
    font-weight: 750;
    text-decoration: none;
}

.auth-card-tools > a:hover {
    color: var(--app-link);
}

.auth-header {
    margin-bottom: 1.65rem;
}

.auth-header h1 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(1.8rem, 4vw, 2.25rem);
    font-weight: 880;
    letter-spacing: -.055em;
}

.auth-header p {
    margin: .55rem 0 0;
    color: var(--auth-muted);
    font-size: .9rem;
}

.form-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem;
    margin-inline: 0;
    padding: 0;
    border: 0;
    margin: 0 0 1.45rem;
    padding: .3rem;
    border: 1px solid var(--auth-border);
    border-radius: .9rem;
    background: var(--app-surface-muted);
}

.switch-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.55rem;
    margin: 0;
    border-radius: .65rem;
    color: var(--auth-muted);
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
}

.switch-label:has(input:checked) {
    background: var(--auth-card);
    color: var(--app-link);
    box-shadow: var(--app-shadow-xs);
}

.switch-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.form-group {
    position: relative;
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    margin-bottom: .45rem;
    color: var(--auth-text);
    font-size: .78rem;
    font-weight: 800;
}

.auth-card .form-control {
    width: 100%;
    min-height: 3.15rem;
    padding: .8rem .9rem;
    border: 1px solid var(--auth-border);
    border-radius: .8rem !important;
    background: var(--app-surface-muted);
    color: var(--auth-text);
    font-size: .9rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-card .form-control:focus {
    border-color: var(--app-primary);
    background: var(--auth-card);
    box-shadow: 0 0 0 .22rem var(--app-focus);
}

.input-group {
    position: relative;
    display: block;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: .85rem;
    z-index: 3;
    padding: .35rem;
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    user-select: none;
}

.password-toggle:focus-visible {
    border-radius: .45rem;
    outline: 3px solid var(--app-focus);
    outline-offset: 1px;
}

.auth-card .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.15rem;
    margin-top: .25rem;
    border: 0;
    border-radius: .82rem;
    background: var(--app-primary);
    color: var(--brand-cream);
    font-size: .85rem;
    font-weight: 850;
    letter-spacing: .01em;
    text-transform: none;
    box-shadow: var(--app-shadow-xs);
}

.auth-card .btn-primary:hover:not(:disabled) {
    box-shadow: 0 14px 30px rgba(239, 121, 89, .2);
    transform: translateY(-2px);
}

.auth-card .btn-primary:disabled {
    cursor: wait;
    opacity: .68;
}

.auth-card .btn-link {
    display: block;
    width: fit-content;
    margin: 1rem auto 0;
    padding: .25rem;
    border: 0;
    background: transparent;
    color: var(--app-link);
    font-size: .78rem;
    font-weight: 750;
    text-decoration: none;
}

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

.alert {
    margin-bottom: 1rem;
    padding: .85rem 1rem;
    border: 1px solid;
    border-radius: .8rem;
    font-size: .8rem;
}

.alert-success {
    border-color: color-mix(in srgb, var(--app-success) 35%, transparent);
    background: var(--app-success-soft);
    color: var(--app-success);
}

.alert-danger {
    border-color: var(--app-danger-border);
    background: var(--app-danger-soft);
    color: var(--app-danger);
}

.verification-notice {
    margin-bottom: 1rem;
    padding: 1.15rem;
    border: 1px solid color-mix(in srgb, var(--app-primary) 32%, var(--auth-border));
    border-radius: .9rem;
    background: var(--app-primary-soft);
    color: var(--auth-text);
    text-align: center;
}

.verification-notice-icon {
    margin-bottom: .4rem;
    font-size: 1.75rem;
}

.verification-notice h3 {
    margin: 0 0 .4rem;
    color: var(--app-link);
    font-size: 1rem;
}

.verification-notice p {
    margin: 0;
    color: var(--auth-muted);
    font-size: .82rem;
    line-height: 1.55;
}

.form-validation-message {
    display: block;
    margin-top: .35rem;
    color: var(--app-danger);
    font-size: .72rem;
}

.strength-meter {
    width: 100%;
    height: .25rem;
    margin-top: .5rem;
    overflow: hidden;
    border-radius: 99px;
    background: var(--app-surface-strong);
}

.strength-bar {
    height: 100%;
    border-radius: inherit;
    transition: width .3s ease, background .3s ease;
}

.strength-weak { background: #ef5c70; }
.strength-medium { background: #f1a63a; }
.strength-strong { background: #2ebc8d; }

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: .5rem;
    border: 2px solid rgba(245, 240, 232, .3);
    border-top-color: var(--app-on-primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes auth-enter {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 980px) {
    .auth-container {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .auth-showcase {
        display: none;
    }
}

@media (max-width: 520px) {
    .auth-container {
        padding: .65rem;
    }

    .auth-card {
        padding: 1.25rem;
        border-radius: 1.15rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .spinner {
        animation: none;
    }
}

.auth-container--single { grid-template-columns: minmax(0, 30rem); justify-content: center; align-items: center; }
.auth-card .btn-primary { color: var(--app-on-primary); }
