/* vCP Auth-Seiten – Login & Passwort vergessen */

/* Inhalt sofort sichtbar – main.css versteckt bei show-spinner alle Kinder */
body.vcp-auth-page > *,
body.vcp-auth-page > main {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Globalen main.css-Spinner auf Auth-Seiten nie anzeigen */
body.vcp-auth-page.show-spinner::after,
body.vcp-auth-page::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    animation: none !important;
}

body.vcp-auth-page.show-spinner > main {
    overflow: visible !important;
}

/* Legacy-Fallback: alter Body ohne vcp-auth-page (z. B. veralteter Twig-Cache) */
body.background.no-footer.show-spinner:not(#app-container) > *,
body.background.no-footer.show-spinner:not(#app-container) > main {
    opacity: 1 !important;
    visibility: visible !important;
}

body.background.no-footer.show-spinner:not(#app-container)::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    animation: none !important;
}

/* Statischer Viewport – kein Scrollen, kein Layout-Shift */
body.vcp-auth-page {
    font-family: "Nunito", sans-serif;
    overflow: hidden !important;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
}

body.vcp-auth-page.background main {
    position: fixed;
    inset: 0;
    margin: 0 !important;
    height: 100vh !important;
    min-height: 100vh;
    overflow: hidden !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Hintergrundbild fixiert ohne Parallax-Jitter (background-attachment: fixed) */
body.vcp-auth-page .fixed-background {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-attachment: scroll !important;
    background-position: center center !important;
    background-size: cover !important;
    transform: none !important;
    animation: none !important;
    will-change: auto !important;
    z-index: 0;
    pointer-events: none;
}

.vcp-auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: min(92vw, 400px);
    padding: 1rem;
    position: relative;
    z-index: 2;
}

/* Karte und Ladeanzeige überlagern sich – kein Verschieben beim Fade */
.vcp-auth__stage {
    position: relative;
    width: 100%;
    max-width: min(92vw, 380px);
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-items: stretch;
    padding-bottom: 2.5rem;
}

.vcp-auth__card {
    grid-area: 1 / 1;
}

.vcp-auth__card {
    position: relative;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 4px 24px rgba(15, 23, 42, 0.08),
        0 25px 50px -12px rgba(15, 23, 42, 0.18);
    transform-origin: center center;
    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        visibility 0.35s ease;
}

.vcp-auth__card--exiting {
    opacity: 0;
    transform: scale(0.98);
    visibility: hidden;
    pointer-events: none;
}

.vcp-auth__card--processing .vcp-auth__header,
.vcp-auth__card--processing .vcp-auth__form,
.vcp-auth__card--processing .vcp-flash-stack,
.vcp-auth__card--result .vcp-auth__header,
.vcp-auth__card--result .vcp-auth__form,
.vcp-auth__card--result .vcp-flash-stack,
.vcp-auth__card--done .vcp-auth__header,
.vcp-auth__card--done .vcp-auth__form,
.vcp-auth__card--done .vcp-flash-stack {
    display: none;
}

.vcp-auth__card--processing .vcp-auth__body,
.vcp-auth__card--result .vcp-auth__body {
    min-height: 8.25rem;
    padding: 0.85rem 1.25rem;
}

.vcp-auth__card--success {
    border-color: rgba(5, 150, 105, 0.35);
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 55%);
    box-shadow:
        0 4px 24px rgba(5, 150, 105, 0.12),
        0 25px 50px -12px rgba(5, 150, 105, 0.18);
}

.vcp-auth__card--success .vcp-auth__accent {
    background: #059669;
}

.vcp-auth__card--error {
    border-color: rgba(220, 38, 38, 0.35);
    background: linear-gradient(180deg, #fef2f2 0%, #fff 55%);
    box-shadow:
        0 4px 24px rgba(220, 38, 38, 0.1),
        0 25px 50px -12px rgba(220, 38, 38, 0.16);
}

.vcp-auth__card--error .vcp-auth__accent {
    background: #dc2626;
}

.vcp-auth__card--result,
.vcp-auth__card--done {
    transition:
        border-color 0.45s ease,
        background 0.45s ease,
        box-shadow 0.45s ease;
}

.vcp-auth__result {
    position: absolute;
    inset: 0;
    z-index: 11;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1rem 1.25rem;
    opacity: 0;
    transform: scale(0.92);
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.4s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        visibility 0.4s ease;
}

.vcp-auth__result--visible {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    pointer-events: auto;
    z-index: 13;
}

.vcp-auth__result--instant {
    transition: none !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    visibility: visible !important;
}

.vcp-auth__done--instant {
    transition: none !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    z-index: 13;
}

.vcp-auth__result-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    position: relative;
}

.vcp-auth__card--success .vcp-auth__result-icon-wrap {
    background: rgba(5, 150, 105, 0.12);
    box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.08);
}

.vcp-auth__card--error .vcp-auth__result-icon-wrap {
    background: rgba(220, 38, 38, 0.1);
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.06);
}

.vcp-auth__result-icon {
    position: absolute;
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0;
    transform: scale(0.5) rotate(-20deg);
    transition:
        opacity 0.35s ease 0.1s,
        transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}

.vcp-auth__result--visible .vcp-auth__result-icon--success,
.vcp-auth__card--success.vcp-auth__card--result .vcp-auth__result-icon--success {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.vcp-auth__result--visible .vcp-auth__result-icon--error,
.vcp-auth__card--error.vcp-auth__card--result .vcp-auth__result-icon--error {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.vcp-auth__result-icon--success {
    color: #059669;
}

.vcp-auth__result-icon--error {
    color: #dc2626;
}

.vcp-auth__card--success .vcp-auth__result-icon--error {
    display: none;
}

.vcp-auth__card--error .vcp-auth__result-icon--success {
    display: none;
}

.vcp-auth__result-msg {
    margin: 0;
    max-width: 22rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    color: #334155;
}

.vcp-auth__card--success .vcp-auth__result-msg {
    color: #047857;
}

.vcp-auth__card--error .vcp-auth__result-msg {
    color: #b91c1c;
}

.vcp-auth__done {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem 1.25rem;
    opacity: 0;
    transform: translateY(12px);
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.45s ease,
        transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1),
        visibility 0.45s ease;
}

.vcp-auth__done--visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

/* Passwort vergessen: Box wächst für Spinner, Erfolg und Done-Inhalt */
.vcp-auth:has(.vcp-auth__card--forgot-flow) .vcp-auth__stage {
    max-width: min(92vw, 420px);
    transition: max-width 0.45s ease;
}

.vcp-auth__card--forgot-flow.vcp-auth__card--processing .vcp-auth__body,
.vcp-auth__card--forgot-flow.vcp-auth__card--result .vcp-auth__body {
    min-height: 8.25rem;
    padding: 0.85rem 1.25rem;
}

.vcp-auth__card--forgot-flow.vcp-auth__card--done .vcp-auth__body {
    min-height: 0;
    padding: 1.35rem 1.35rem 1.5rem;
}

.vcp-auth__card--forgot-flow.vcp-auth__card--done .vcp-auth__done--visible {
    position: relative;
    inset: auto;
    width: 100%;
    padding: 0.25rem 0 0;
    gap: 1rem;
}

.vcp-auth__card--forgot-flow .vcp-auth__done-msg {
    max-width: none;
    width: 100%;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.vcp-auth__done-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 12px;
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    font-size: 1.35rem;
    animation: vcp-auth-done-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes vcp-auth-done-pop {
    from {
        opacity: 0;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vcp-auth__done-msg {
    margin: 0;
    max-width: 24rem;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #475569;
}

.vcp-auth__done-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.35rem;
    padding: 0.65rem 1.35rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
    background: #1E2DC0;
    box-shadow: 0 2px 10px rgba(30, 45, 192, 0.28);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.vcp-auth__done-link:hover,
.vcp-auth__done-link:focus {
    color: #fff !important;
    background: #161eb0;
    box-shadow: 0 4px 16px rgba(30, 45, 192, 0.34);
    transform: translateY(-1px);
    outline: none;
}

.vcp-auth__done-link i {
    font-size: 1rem;
}

.vcp-auth__loading {
    position: absolute;
    inset: 0;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border-radius: inherit;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.vcp-auth__loading--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.vcp-auth__loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 2px solid rgba(30, 45, 192, 0.18);
    border-top-color: #1E2DC0;
    border-radius: 50%;
    animation: vcp-auth-spin 0.75s linear infinite;
}

.vcp-auth__loading-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1E2DC0;
    letter-spacing: 0.01em;
}

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

.vcp-auth__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #1E2DC0;
    z-index: 1;
}

.vcp-auth__header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.15rem 1.25rem 0.2rem;
}

.vcp-auth__header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    color: #1E2DC0;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(30, 45, 192, 0.14);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    font-size: 1rem;
}

.vcp-auth__header-text {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.vcp-auth__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.vcp-auth__subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
}

.vcp-auth__body {
    padding: 0.5rem 1.25rem 1.15rem;
    position: relative;
    transition: min-height 0.35s ease, padding 0.35s ease;
}

.vcp-auth__card--done:not(.vcp-auth__card--forgot-flow) .vcp-auth__body {
    min-height: 8.25rem;
    padding: 0.85rem 1.25rem;
}

.vcp-auth__body .vcp-flash-stack {
    margin-bottom: 1.15rem;
}

.vcp-auth__form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.vcp-auth__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.vcp-auth__label {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

.vcp-auth__field .form-control {
    display: block;
    width: 100%;
    border: 1px solid rgba(30, 45, 192, 0.14) !important;
    border-radius: 10px !important;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    color: #1e293b !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vcp-auth__field .form-control:focus {
    border-color: rgba(30, 45, 192, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(30, 45, 192, 0.12) !important;
    outline: none !important;
}

.vcp-auth__field .form-control::placeholder {
    color: #94a3b8;
}

.vcp-auth__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.15rem;
    padding-top: 0.35rem;
}

.vcp-auth__link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1E2DC0;
    text-decoration: none;
    transition: color 0.15s ease;
}

.vcp-auth__link:hover,
.vcp-auth__link:focus {
    color: #161eb0;
    text-decoration: underline;
    outline: none;
}

.vcp-auth__submit {
    min-width: 6.75rem;
    padding: 0.5rem 1.1rem !important;
    border: 0 !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #fff !important;
    background: #1E2DC0 !important;
    box-shadow: 0 2px 8px rgba(30, 45, 192, 0.28) !important;
    transition: background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.vcp-auth__submit:hover:not(:disabled),
.vcp-auth__submit:focus:not(:disabled) {
    background: #161eb0 !important;
    box-shadow: 0 4px 14px rgba(30, 45, 192, 0.32) !important;
    outline: none !important;
}

.vcp-auth__submit:disabled,
.vcp-auth__submit[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.vcp-auth__hint {
    margin: -0.15rem 0 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
}

.vcp-auth__hint.is-error {
    color: #dc2626;
}

.vcp-auth__hint.is-success {
    color: #059669;
}

.vcp-auth__password-meter {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.55rem;
}

.vcp-auth__password-meter__track {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.vcp-auth__password-meter__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #94a3b8;
    transition: width 0.3s ease, background 0.3s ease;
}

.vcp-auth__password-meter__label {
    min-height: 1.1em;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.vcp-auth__password-meter.is-weak .vcp-auth__password-meter__fill {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.vcp-auth__password-meter.is-weak .vcp-auth__password-meter__label {
    color: #dc2626;
}

.vcp-auth__password-meter.is-fair .vcp-auth__password-meter__fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.vcp-auth__password-meter.is-fair .vcp-auth__password-meter__label {
    color: #d97706;
}

.vcp-auth__password-meter.is-good .vcp-auth__password-meter__fill {
    background: linear-gradient(90deg, #1E2DC0, #3b4fe0);
}

.vcp-auth__password-meter.is-good .vcp-auth__password-meter__label {
    color: #1E2DC0;
}

.vcp-auth__password-meter.is-strong .vcp-auth__password-meter__fill {
    background: linear-gradient(90deg, #059669, #10b981);
}

.vcp-auth__password-meter.is-strong .vcp-auth__password-meter__label {
    color: #059669;
}

.vcp-auth__password-reqs {
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.vcp-auth__password-req {
    position: relative;
    padding-left: 1.15rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748b;
}

.vcp-auth__password-req::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 0.5rem;
    height: 0.5rem;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    opacity: 0.65;
}

.vcp-auth__password-req.is-met {
    color: #059669;
}

.vcp-auth__password-req.is-met::before {
    border-color: #059669;
    background: #059669;
    opacity: 1;
    box-shadow: inset 0 0 0 1.5px #fff;
}

.vcp-auth__field .form-control.is-valid {
    border-color: rgba(5, 150, 105, 0.45) !important;
}

.vcp-auth__field .form-control.is-invalid {
    border-color: rgba(239, 68, 68, 0.55) !important;
}

.vcp-auth__field .invalid-feedback.vcp-user-availability {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: #ef4444;
}

body.dark .vcp-auth__field .invalid-feedback.vcp-user-availability {
    color: #f87171;
}

/* Dark Mode */
body.dark .vcp-auth__card {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(30, 41, 59, 0.98);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.35),
        0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

body.dark .vcp-auth__accent {
    background: color-mix(in srgb, #1E2DC0 85%, #7b87ff);
}

body.dark .vcp-auth__header-icon {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(255, 255, 255, 0.08);
    color: color-mix(in srgb, #1E2DC0 70%, #a5aeff);
}

body.dark .vcp-auth__title {
    color: #f1f5f9;
}

body.dark .vcp-auth__subtitle,
body.dark .vcp-auth__label {
    color: #94a3b8;
}

body.dark .vcp-auth__field .form-control {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(15, 23, 42, 0.55) !important;
    color: #e2e8f0 !important;
}

body.dark .vcp-auth__field .form-control:focus {
    border-color: rgba(123, 135, 255, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(123, 135, 255, 0.12) !important;
}

body.dark .vcp-auth__field .form-control::placeholder {
    color: #64748b;
}

body.dark .vcp-auth__link {
    color: color-mix(in srgb, #1E2DC0 70%, #a5aeff);
}

body.dark .vcp-auth__link:hover,
body.dark .vcp-auth__link:focus {
    color: #bfdbfe;
}

body.dark .vcp-auth__submit {
    background: color-mix(in srgb, #1E2DC0 85%, #7b87ff) !important;
}

body.dark .vcp-auth__submit:hover:not(:disabled),
body.dark .vcp-auth__submit:focus:not(:disabled) {
    background: color-mix(in srgb, #1E2DC0 70%, #a5aeff) !important;
}

body.dark .vcp-auth__hint {
    color: #94a3b8;
}

body.dark .vcp-auth__hint.is-error {
    color: #f87171;
}

body.dark .vcp-auth__hint.is-success {
    color: #34d399;
}

body.dark .vcp-auth__password-meter__track {
    background: rgba(148, 163, 184, 0.18);
}

body.dark .vcp-auth__password-meter__label,
body.dark .vcp-auth__password-req {
    color: #94a3b8;
}

body.dark .vcp-auth__password-meter.is-weak .vcp-auth__password-meter__label {
    color: #f87171;
}

body.dark .vcp-auth__password-meter.is-fair .vcp-auth__password-meter__label {
    color: #fbbf24;
}

body.dark .vcp-auth__password-meter.is-good .vcp-auth__password-meter__label {
    color: color-mix(in srgb, #1E2DC0 70%, #a5aeff);
}

body.dark .vcp-auth__password-meter.is-strong .vcp-auth__password-meter__label,
body.dark .vcp-auth__password-req.is-met {
    color: #34d399;
}

body.dark .vcp-auth__password-req.is-met::before {
    border-color: #34d399;
    background: #34d399;
    box-shadow: inset 0 0 0 1.5px rgba(15, 23, 42, 0.9);
}

body.dark .vcp-auth__loading {
    background: rgba(30, 41, 59, 0.98);
}

body.dark .vcp-auth__loading-spinner {
    border-color: rgba(147, 197, 253, 0.22);
    border-top-color: color-mix(in srgb, #1E2DC0 70%, #a5aeff);
}

body.dark .vcp-auth__loading-text {
    color: color-mix(in srgb, #1E2DC0 70%, #a5aeff);
}

body.dark .vcp-auth__card--success {
    border-color: rgba(52, 211, 153, 0.25);
    background: linear-gradient(180deg, rgba(5, 150, 105, 0.12) 0%, rgba(30, 41, 59, 0.98) 55%);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.35),
        0 25px 50px -12px rgba(5, 150, 105, 0.15);
}

body.dark .vcp-auth__card--success .vcp-auth__accent {
    background: #34d399;
}

body.dark .vcp-auth__card--error {
    border-color: rgba(248, 113, 113, 0.25);
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.1) 0%, rgba(30, 41, 59, 0.98) 55%);
}

body.dark .vcp-auth__card--error .vcp-auth__accent {
    background: #f87171;
}

body.dark .vcp-auth__result-msg {
    color: #cbd5e1;
}

body.dark .vcp-auth__card--success .vcp-auth__result-msg {
    color: #6ee7b7;
}

body.dark .vcp-auth__card--error .vcp-auth__result-msg {
    color: #fca5a5;
}

body.dark .vcp-auth__done-msg {
    color: #94a3b8;
}

body.dark .vcp-auth__done-icon-wrap {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.2);
}

body.dark .vcp-auth__done-link {
    background: color-mix(in srgb, #1E2DC0 85%, #7b87ff) !important;
}

body.dark .vcp-auth__done-link:hover,
body.dark .vcp-auth__done-link:focus {
    background: color-mix(in srgb, #1E2DC0 70%, #a5aeff) !important;
}

/* Signup wizard — 3-step invite registration */
.vcp-auth:has(#authSignupForm) {
    max-width: min(92vw, 440px);
}

.vcp-auth:has(#authSignupForm) .vcp-auth__stage {
    max-width: min(92vw, 440px);
}

.vcp-auth__form--wizard {
    gap: 0.85rem;
}

.vcp-auth__stepper {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.15rem;
}

.vcp-auth__stepper-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vcp-auth__stepper-step {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    text-align: center;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.vcp-auth__stepper-marker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    border: 1.5px solid rgba(148, 163, 184, 0.55);
    background: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.vcp-auth__stepper-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0.65);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.vcp-auth__stepper-label {
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.vcp-auth__stepper-step.is-active {
    color: #1E2DC0;
}

.vcp-auth__stepper-step.is-active .vcp-auth__stepper-marker {
    border-color: #1E2DC0;
    background: rgba(30, 45, 192, 0.08);
    color: #1E2DC0;
    transform: scale(1.04);
}

.vcp-auth__stepper-step.is-complete {
    color: #059669;
}

.vcp-auth__stepper-step.is-complete .vcp-auth__stepper-marker {
    border-color: #059669;
    background: #059669;
    color: #fff;
}

.vcp-auth__stepper-step.is-complete .vcp-auth__stepper-number {
    opacity: 0;
}

.vcp-auth__stepper-step.is-complete .vcp-auth__stepper-check {
    opacity: 1;
    transform: scale(1);
}

.vcp-auth__stepper-track {
    height: 3px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    overflow: hidden;
}

.vcp-auth__stepper-progress {
    width: calc(var(--vcp-stepper-progress, 0) * 1%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1E2DC0, #3b4fe0);
    transition: width 0.32s ease;
}

.vcp-auth__wizard-body {
    position: relative;
    min-height: 14rem;
    max-height: min(52vh, 26rem);
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.1rem;
    scrollbar-gutter: stable;
}

.vcp-auth__wizard-step {
    display: none;
    flex-direction: column;
    gap: 0.7rem;
}

.vcp-auth__wizard-step.is-active {
    display: flex;
}

.vcp-auth__wizard-step.is-entering {
    animation: vcpAuthWizardEnter 0.28s ease forwards;
}

.vcp-auth__wizard-step.is-entering-back {
    animation: vcpAuthWizardEnterBack 0.28s ease forwards;
}

@keyframes vcpAuthWizardEnter {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes vcpAuthWizardEnterBack {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.vcp-auth__section-title {
    margin: 0 0 0.15rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
}

.vcp-auth__actions--wizard {
    align-items: center;
}

.vcp-auth__wizard-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.vcp-auth__wizard-back {
    min-width: 5.5rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid rgba(30, 45, 192, 0.22);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1E2DC0;
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vcp-auth__wizard-back:hover:not(:disabled),
.vcp-auth__wizard-back:focus:not(:disabled) {
    background: rgba(30, 45, 192, 0.06);
    border-color: rgba(30, 45, 192, 0.35);
    outline: none;
}

.vcp-auth__wizard-back:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.vcp-auth__wizard-next[hidden],
.vcp-auth__wizard-back[hidden],
.vcp-auth__form--wizard [data-vcp-wizard-submit][hidden] {
    display: none !important;
}

body.dark .vcp-auth__stepper-step.is-active {
    color: color-mix(in srgb, #1E2DC0 70%, #a5aeff);
}

body.dark .vcp-auth__stepper-step.is-active .vcp-auth__stepper-marker {
    border-color: color-mix(in srgb, #1E2DC0 70%, #a5aeff);
    background: rgba(123, 135, 255, 0.12);
    color: color-mix(in srgb, #1E2DC0 70%, #a5aeff);
}

body.dark .vcp-auth__stepper-marker {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.35);
}

body.dark .vcp-auth__stepper-progress {
    background: linear-gradient(90deg, color-mix(in srgb, #1E2DC0 85%, #7b87ff), #7b87ff);
}

body.dark .vcp-auth__section-title {
    color: #e2e8f0;
}

body.dark .vcp-auth__wizard-back {
    color: color-mix(in srgb, #1E2DC0 70%, #a5aeff);
    border-color: rgba(123, 135, 255, 0.28);
}

body.dark .vcp-auth__wizard-back:hover:not(:disabled),
body.dark .vcp-auth__wizard-back:focus:not(:disabled) {
    background: rgba(123, 135, 255, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    .vcp-auth__wizard-step.is-entering,
    .vcp-auth__wizard-step.is-entering-back {
        animation: none;
    }

    .vcp-auth__stepper-progress,
    .vcp-auth__stepper-marker,
    .vcp-auth__stepper-check,
    .vcp-auth__stepper-step {
        transition: none;
    }
}

@media (max-width: 575.98px) {
    .vcp-auth {
        padding: 1rem 0.75rem;
    }

    .vcp-auth__header,
    .vcp-auth__body {
        padding-left: 1.15rem;
        padding-right: 1.15rem;
    }

    .vcp-auth__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .vcp-auth__link {
        text-align: center;
    }

    .vcp-auth__submit {
        width: 100%;
    }

    .vcp-auth__wizard-nav {
        flex-direction: column-reverse;
        align-items: stretch;
        width: 100%;
    }

    .vcp-auth__wizard-back,
    .vcp-auth__wizard-next,
    .vcp-auth__form--wizard [data-vcp-wizard-submit] {
        width: 100%;
    }

    .vcp-auth__stepper-label {
        font-size: 0.625rem;
    }

    .vcp-auth__wizard-body {
        max-height: min(48vh, 22rem);
    }
}

.vcp-auth__notice {
    padding: 0.25rem 0;
    color: #64748b;
    line-height: 1.5;
}

.vcp-auth__notice p {
    margin-bottom: 0.75rem;
}

body.dark .vcp-auth__notice {
    color: #94a3b8;
}
