.auth {
    padding: clamp(3rem, 6vw, 5rem) 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.14) 0%, rgba(236, 233, 254, 0.7) 50%, rgba(248, 250, 255, 0.95) 100%);
}

.auth::before,
.auth::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(0);
    opacity: 0.6;
}

.auth::before {
    width: 420px;
    height: 420px;
    top: -140px;
    right: -120px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 65%);
}

.auth::after {
    width: 520px;
    height: 520px;
    bottom: -220px;
    left: -160px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 70%);
}

.auth__card {
    display: grid;
    gap: 2.5rem;
    padding: clamp(2rem, 3vw, 3rem);
    border: 1px solid rgba(124, 58, 237, 0.18);
    box-shadow: var(--shadow-card);
    width: min(100%, 1040px);
    margin: 0 auto;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(8px);
    animation: auth-rise 0.6s ease both;
}

.auth__intro {
    display: grid;
    gap: 0.75rem;
    animation: auth-rise 0.6s ease 0.05s both;
}

.auth__intro h1 {
    font-size: clamp(2rem, 3.2vw + 1rem, 2.6rem);
}

.auth__bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.auth__bullets li {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text);
    font-weight: 500;
}

.auth__bullets i {
    color: var(--color-primary);
}

.auth__form {
    display: grid;
    gap: 1.2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(124, 58, 237, 0.12);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-border);
    animation: auth-rise 0.6s ease 0.15s both;
}

.auth__title {
    margin: 0;
    font-size: 1.4rem;
}

.form-field {
    display: grid;
    gap: 0.4rem;
}

.input-with-action {
    display: flex;
    align-items: stretch;
    border-radius: var(--radius-md);
    border: 1px solid rgba(124, 58, 237, 0.18);
    overflow: hidden;
    background: var(--color-surface);
}

.input-with-action:focus-within {
    border-color: rgba(124, 58, 237, 0.55);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.16);
}

.input-with-action .input-field {
    flex: 1;
    border: none;
    padding: 0.9rem 1rem;
    background: transparent;
}

.input-action {
    border: none;
    width: 46px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.input-action:hover,
.input-action:focus {
    background: rgba(124, 58, 237, 0.18);
}

.password-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.password-info {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-soft);
}

.validation-error {
    font-size: 0.82rem;
}

.auth-consent-group {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.92rem;
    color: var(--color-text-soft);
}

.auth-consent__checkbox {
    margin-top: 0.15rem;
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary);
    flex: 0 0 auto;
}

.auth-consent a {
    font-weight: 600;
    color: var(--color-primary);
}

.auth-consent__required {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #991b1b;
    background: rgba(248, 113, 113, 0.2);
    border: 1px solid rgba(248, 113, 113, 0.45);
}

.auth-consent__hint {
    margin: -0.2rem 0 0.15rem 1.55rem;
    font-size: 0.82rem;
    color: #b45309;
}

.auth__submit {
    width: 100%;
    margin-top: 0.5rem;
}

.auth__swap {
    text-align: center;
    margin: 0;
    color: var(--color-text-muted);
}

.auth__support {
    text-align: center;
    font-size: 0.9rem;
    margin: 0;
}

.auth__support a {
    color: var(--color-primary);
    font-weight: 600;
}

.social-login {
    display: grid;
    gap: 0.75rem;
}

.social-login__title {
    margin: 0;
    font-weight: 600;
    color: var(--color-text);
}

.social-login__buttons {
    display: grid;
    gap: 0.6rem;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    border: 1px solid rgba(124, 58, 237, 0.15);
    background: #fff;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.18s ease;
}

.btn-social:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.btn-social--google {
    border-color: rgba(0, 0, 0, 0.08);
}

.btn-social--facebook {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.btn-social--linkedin {
    background: #0a66c2;
    color: #fff;
    border-color: #0a66c2;
}
.btn-social--github {
    background: #111827;
    color: #fff;
    border-color: #0f172a;
}

.social-login__divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text-soft);
    font-size: 0.9rem;
}

.social-login__divider::before,
.social-login__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(124, 58, 237, 0.18);
}

@media (min-width: 768px) {
    .social-login__buttons {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

.auth--compact {
    padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.auth__card--single {
    max-width: 560px;
    width: min(100%, 560px);
    margin: 0 auto;
    grid-template-columns: 1fr;
    padding: clamp(2rem, 4vw, 3.25rem);
}

.auth__single {
    display: grid;
    gap: 1.4rem;
}

.auth__single form {
    display: grid;
    gap: 1rem;
}

.auth__header {
    display: grid;
    gap: 0.6rem;
    text-align: left;
}

.auth__header h1 {
    margin: 0;
    font-size: clamp(1.7rem, 2.2vw, 2rem);
}

.auth__header p {
    margin: 0;
}

.auth__notes {
    margin: 0.25rem 0 0;
    padding-left: 1.2rem;
    color: var(--color-text-soft);
    font-size: 0.9rem;
}

.auth__notes li:not(:last-child) {
    margin-bottom: 0.25rem;
}

.password-checklist {
    background: rgba(124, 58, 237, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    display: grid;
    gap: 0.5rem;
}

.password-checklist p {
    margin: 0;
    font-weight: 600;
    color: var(--color-text);
}

.password-checklist ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.password-checklist li.valid {
    color: var(--color-success);
}

#password-match-message.valid {
    color: var(--color-success);
}

#password-match-message.invalid {
    color: var(--color-error);
}

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

@media (min-width: 1024px) {
    .auth__card {
        grid-template-columns: 1fr 0.9fr;
        align-items: center;
    }

    .auth__form {
        justify-self: end;
        width: 100%;
        max-width: 420px;
    }

    .auth__card--single {
        grid-template-columns: 1fr;
        max-width: 560px;
    }
}

@media (max-width: 768px) {
    .auth__card {
        padding: clamp(1.6rem, 6vw, 2.4rem);
    }

    .auth__card--single {
        margin-inline: 1rem;
        width: calc(100% - 2rem);
    }

    .auth__form {
        padding: 1.4rem;
        gap: 1rem;
    }

    .social-login__buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .password-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .input-action {
        width: 42px;
    }

    .auth__header h1 {
        font-size: 1.5rem;
    }

    .btn-ghost {
        width: 100%;
        justify-content: center;
    }
}
