/* Minimal auth shell (Login / Registrierung / 2FA) — Schrift: DM Sans per Link im HTML */
/* Hintergrund wie index.php. Hinweis: assets/css/style.css NICHT einbinden — dort body { background: hellgrau }. */

html.auth-page-html {
    background-color: #070b14;
    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 {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: #070b14;
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -30%, rgba(59, 130, 246, 0.14), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(99, 102, 241, 0.06), transparent 45%);
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: #94a3b8;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 48px;
    box-sizing: border-box;
}

.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__icon {
    height: 44px;
    width: auto;
    display: block;
}

.auth-brand__wordmark {
    height: 34px;
    width: auto;
    display: block;
}

.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-size: 1.375rem;
    font-weight: 600;
    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-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: #2563eb;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.auth-page--login .auth-submit:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.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;
}

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

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

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