/* Auth-Seiten (Login / Registrierung / 2FA) — ergänzt landing.css */

html.auth-page-html {
    background-color: #f9fafb;
    min-height: 100%;
}

html.auth-page-html *,
html.auth-page-html *::before,
html.auth-page-html *::after {
    box-sizing: border-box;
}

body.auth-page,
body.auth-page.auth-page--login,
body.auth-page.auth-page--register,
body.auth-page.auth-page--2fa,
body.auth-page.auth-page--legal {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: #f9fafb;
    color: #6b7280;
}

body.auth-page.auth-page--with-site-nav {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem 3rem;
}

.auth-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    box-sizing: border-box;
}

body.auth-page:not(.auth-page--with-site-nav) .auth-shell {
    min-height: 100vh;
    padding: 32px 20px 48px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 28px;
    flex-shrink: 0;
}

.auth-brand:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
    border-radius: 8px;
}

.auth-brand__logo {
    height: 3rem;
    width: auto;
    max-width: min(18rem, 85vw);
    display: block;
    object-fit: contain;
}

.auth-brand__icon,
.auth-brand__wordmark {
    display: none;
}

.auth-page--register .auth-card {
    max-width: 440px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 32px 28px 28px;
    box-sizing: border-box;
}

.auth-card__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.25;
}

.auth-card__lead {
    margin: 0 0 24px;
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.5;
}

.auth-form .auth-field {
    margin-bottom: 18px;
}

.auth-form .auth-field:last-of-type {
    margin-bottom: 0;
}

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.auth-label .auth-label-optional {
    font-weight: 400;
    color: #94a3b8;
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.auth-label-row .auth-label {
    margin-bottom: 0;
}

.auth-forgot {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap;
}

.auth-forgot:hover {
    text-decoration: underline;
}

.auth-forgot:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.auth-input:hover {
    border-color: #94a3b8;
}

.auth-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-input.auth-input--error {
    border-color: #dc2626;
}

.auth-input.auth-input--error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.auth-password-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.auth-password-wrap .auth-input {
    padding-right: 48px;
}

.auth-toggle-pass {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.auth-toggle-pass:hover {
    color: #334155;
    background: #f1f5f9;
}

.auth-toggle-pass:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 0;
}

.auth-field-msg {
    font-size: 0.75rem;
    margin-top: 5px;
    min-height: 1.1em;
    color: #dc2626;
    line-height: 1.35;
}

.auth-field-msg:empty {
    min-height: 0;
    margin-top: 0;
}

.auth-field-hint {
    font-size: 0.75rem;
    margin-top: 5px;
    color: #64748b;
    line-height: 1.35;
}

select.auth-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.auth-alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    line-height: 1.45;
}

.auth-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.auth-alert--warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-social-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.auth-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.auth-social:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.auth-social:disabled,
.auth-social[aria-disabled='true'] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

a.auth-social:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.auth-social svg {
    display: block;
}

.auth-social-note {
    font-size: 0.6875rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 10px;
    line-height: 1.4;
}

.auth-submit-wrap {
    margin-top: 24px;
}

.auth-submit {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.15s;
    position: relative;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-page--login .auth-submit {
    background: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.auth-page--login .auth-submit:hover:not(:disabled) {
    background: #1e293b;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.auth-page--forgot .auth-submit,
.auth-page--reset .auth-submit {
    background: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.auth-page--forgot .auth-submit:hover:not(:disabled),
.auth-page--reset .auth-submit:hover:not(:disabled) {
    background: #1e293b;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

a.auth-submit {
    text-decoration: none;
    box-sizing: border-box;
}


.auth-page--register .auth-submit {
    background: #0f766e;
    box-shadow: 0 1px 2px rgba(15, 118, 110, 0.25);
}

.auth-page--register .auth-submit:hover:not(:disabled) {
    background: #0d9488;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
}

.auth-page--2fa .auth-submit {
    background: #2563eb;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.auth-page--2fa .auth-submit:hover:not(:disabled) {
    background: #1d4ed8;
}

.auth-submit:disabled {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}

.auth-form.is-submitting .auth-submit {
    color: transparent;
}

.auth-form.is-submitting .auth-submit::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.65s linear infinite;
}

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

.auth-switch {
    text-align: center;
    margin-top: 22px;
    font-size: 0.875rem;
    color: #64748b;
}

.auth-switch a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-legal {
    margin-top: 18px;
    font-size: 0.6875rem;
    line-height: 1.5;
    color: #94a3b8;
    text-align: center;
}

.auth-legal a {
    color: #64748b;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-legal a:hover {
    color: #475569;
}

.auth-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #334155;
    cursor: pointer;
}

.auth-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.auth-checkbox-label a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.auth-checkbox-label a:hover {
    text-decoration: underline;
}

.auth-field--checkbox {
    margin-top: 4px;
}

.auth-page--legal .auth-card {
    max-width: 560px;
}

.auth-legal-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

.auth-legal-item {
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.auth-legal-item__meta {
    margin: 8px 0 0 26px;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}

.auth-legal-item__meta code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.6875rem;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 5px;
}

.auth-page--legal .auth-submit {
    background: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.auth-page--legal .auth-submit:hover:not(:disabled) {
    background: #1e293b;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.auth-legal-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.875rem;
}

.auth-legal-footer a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.auth-legal-footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}

@media (max-width: 380px) {
    .auth-card {
        padding: 24px 20px 22px;
    }

    .auth-social-row {
        gap: 8px;
    }

    .auth-social {
        padding: 10px 6px;
        font-size: 0.625rem;
    }
}

/* Bot-Schutz: Honeypot-Feld auf Registrierungsseite */
.auth-field--hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
