/* auth_external.css - Komplette finale Version für externe Auth-Seiten */

/* ==========================================
   RESET & BASICS
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

body {
    min-height: 100%;
    font-family: inherit;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ==========================================
   ANIMATED BACKGROUND
   ========================================== */

body {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating particles effect - fixed position to avoid scroll issues */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 200px 200px, 300px 300px, 150px 150px;
    animation: floatParticles 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatParticles {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* ==========================================
   GLASSMORPHISM CARD
   ========================================== */

.auth-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 25px 45px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.auth-card:hover::before {
    left: 100%;
}

/* Email Management Card - größer */
.email-management-card {
    max-width: 600px;
}

/* ==========================================
   LOGO & HEADER
   ========================================== */

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-on-accent);
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.auth-logo-divider {
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    margin: 12px auto;
}

.auth-edition {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.auth-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    text-align: center;
    margin-bottom: 25px;
}

/* ==========================================
   FORM STYLING (für Django allauth forms)
   ========================================== */

/* Form Container */
.form-fields {
    width: 100%;
}

/* Django form.as_p styling */
.form-fields p {
    margin-bottom: 25px;
    position: relative;
}

/* Labels */
.form-fields label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Input Fields */
.form-fields input[type="text"],
.form-fields input[type="email"],
.form-fields input[type="password"] {
    width: 100%;
    padding: 18px 20px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--on-brand);
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.form-fields input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

.form-fields input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Checkbox styling */
.form-fields input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--switch-off);
    backdrop-filter: blur(5px);
    vertical-align: middle;
}

.form-fields input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.form-fields input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--on-brand);
    font-size: 12px;
    font-weight: bold;
}

/* Remember Me Row - Checkbox und Label in einer Zeile */
.remember-me-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.remember-me-row label {
    display: inline;
    margin-bottom: 0;
    cursor: pointer;
}

/* ==========================================
   ALLAUTH BUTTON STYLING
   ========================================== */

/* Allauth button elements */
form button[type="submit"],
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 56px;
    text-transform: none;
    letter-spacing: 0.5px;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 15px;
}

/* Primary button (submit) */
form button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--on-brand);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

form button[type="submit"]:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

form button[type="submit"]:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Secondary button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--on-brand);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* Disabled state */
form button:disabled,
.btn:disabled {
    opacity: var(--disabled-opacity);
    cursor: not-allowed;
    pointer-events: none;
}

/* Button hover effect */
form button::before,
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

form button:hover::before,
.btn:hover::before {
    left: 100%;
}

/* ==========================================
   LINKS & ACTIONS
   ========================================== */

.auth-links {
    text-align: center;
    margin-top: 25px;
}

.auth-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.auth-link:hover {
    color: var(--on-brand);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.divider span {
    padding: 0 20px;
    font-weight: 300;
}

/* ==========================================
   ERROR MESSAGES (Django allauth)
   ========================================== */

.errorlist {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
}

.errorlist .error-item,
.errorlist li {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b7a;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(220, 53, 69, 0.3);
    backdrop-filter: blur(10px);
    font-size: 14px;
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Field-specific errors */
.form-fields ul.errorlist {
    margin-top: 8px;
    margin-bottom: 0;
}

/* Non-field errors */
.non-field-errors {
    margin-bottom: 20px;
}

/* ==========================================
   SUCCESS MESSAGES
   ========================================== */

.messages {
    margin-bottom: 25px;
}

.messages .success {
    background: rgba(40, 167, 69, 0.15);
    color: #4ade80;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.3);
    backdrop-filter: blur(10px);
    font-size: 14px;
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(0.95); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================
   INFO BOX STYLING
   ========================================== */

.auth-info-box {
    background: rgba(23, 162, 184, 0.15);
    border: 1px solid rgba(23, 162, 184, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.auth-info-box i {
    color: var(--info-ink);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.auth-info-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

/* Warning Box Variant */
.auth-warning-box {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
}

.auth-warning-box i {
    color: var(--warning-ink);
}

.auth-warning-box strong {
    display: block;
    margin-bottom: 4px;
    color: #ffffff;
    font-weight: 600;
}

/* Error Box Variant */
.auth-error-box {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
}

.auth-error-box i {
    color: var(--danger-ink);
}

/* Success Box Variant */
.auth-success-box {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
}

.auth-success-box i {
    color: var(--success-ink);
}

/* ==========================================
   LOGOUT-SPECIFIC STYLING
   ========================================== */

/* Logout button styling */
button[tags*="logout"] {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    color: var(--on-danger);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

button[tags*="logout"]:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--danger-dark) 0%, #a71d2a 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.4);
}

button[tags*="logout"]:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* ==========================================
   EMAIL MANAGEMENT STYLING
   ========================================== */

.email-list-section,
.add-email-section {
    margin: 24px 0;
    padding: 20px 0;
}

.email-list-section h3,
.add-email-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

.email-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.email-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.email-item.primary {
    border-color: rgba(255, 193, 7, 0.4);
    background: rgba(255, 193, 7, 0.1);
}

.email-info {
    flex: 1;
}

.email-address {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.email-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.email-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.email-badge.verified {
    background: rgba(40, 167, 69, 0.2);
    color: #4ade80;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.email-badge.unverified {
    background: rgba(255, 193, 7, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.email-badge.primary {
    background: rgba(0, 123, 255, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

.email-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.email-actions form {
    margin: 0;
}

.email-actions button {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Small Button Variants */
button[tags*="small"] {
    padding: 6px 12px;
    font-size: 12px;
    min-height: auto;
    margin: 0;
    width: auto;
}

button[tags*="resend"] {
    background: linear-gradient(135deg, var(--info-color) 0%, var(--info-dark) 100%);
    color: var(--on-info);
}

button[tags*="resend"]:hover {
    background: linear-gradient(135deg, var(--info-dark) 0%, var(--info-dark) 100%);
}

button[tags*="primary"] {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-hover) 100%);
    color: var(--on-warning);
}

button[tags*="primary"]:hover {
    background: linear-gradient(135deg, var(--warning-hover) 0%, var(--warning-hover) 100%);
    color: var(--on-warning);
}

button[tags*="danger"] {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    color: var(--on-danger);
}

button[tags*="danger"]:hover {
    background: linear-gradient(135deg, var(--danger-dark) 0%, #a71d2a 100%);
}

button[tags*="add"] {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
    color: var(--on-success);
}

button[tags*="add"]:hover {
    background: linear-gradient(135deg, var(--success-dark) 0%, var(--success-dark) 100%);
}

/* ==========================================
   TERMS NOTICE STYLING
   ========================================== */

.auth-terms-notice {
    text-align: center;
    margin: 16px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-terms-notice small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    line-height: 1.4;
}

.auth-terms-notice a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.auth-terms-notice a:hover {
    color: var(--text-on-accent);
    text-decoration: none;
}

/* ==========================================
   SOCIAL ACCOUNT STYLING
   ========================================== */

.social-account-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
}

.social-provider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.social-provider i {
    font-size: 20px;
    color: #4285f4; /* Google Blue als Standard */
}

.social-data {
    margin: 8px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.social-data strong {
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   MFA STYLING
   ========================================== */

.mfa-code-input input[type="text"] {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
}

.mfa-confirmation-warning {
    margin: 20px 0;
    padding: 16px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
}

.confirmation-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
}

.confirmation-checkbox input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

/* Recovery Codes */
.recovery-codes-section {
    margin: 24px 0;
}

.recovery-codes-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    text-align: center;
}

.recovery-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.recovery-code-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.recovery-code-item code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-on-accent);
    background: none;
    letter-spacing: 1px;
}

.recovery-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

/* Recovery Use Section */
.recovery-use-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    text-align: center;
}

/* ==========================================
   RATE LIMIT / MAINTENANCE STYLING
   ========================================== */

.rate-limit-status,
.maintenance-status {
    margin: 24px 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #20c997);
    border-radius: 4px;
    transition: width 1s linear;
    width: 0%;
}

.countdown-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

#countdown-display,
#refresh-countdown {
    font-weight: 600;
    color: var(--warning-ink);
    font-size: 16px;
}

.auto-refresh-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.refresh-countdown {
    font-size: 18px;
    font-weight: 600;
    color: var(--info-ink);
}

/* ==========================================
   BUTTON VARIANTS
   ========================================== */

/* MFA specific buttons */
button[tags*="verify"] {
    background: linear-gradient(135deg, var(--info-color) 0%, var(--info-dark) 100%);
    color: var(--on-info);
}

button[tags*="verify"]:hover {
    background: linear-gradient(135deg, var(--info-dark) 0%, var(--info-dark) 100%);
}

button[tags*="recovery"] {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: var(--on-secondary);
}

button[tags*="recovery"]:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #3d4142 100%);
}

button[tags*="deactivate"] {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    color: var(--on-danger);
}

button[tags*="deactivate"]:hover {
    background: linear-gradient(135deg, var(--danger-dark) 0%, #a71d2a 100%);
}

button[tags*="deactivate"]:disabled {
    opacity: var(--disabled-opacity);
    cursor: not-allowed;
}

/* Error-specific button colors */
button[onclick*="history.back()"],
button[onclick*="location.reload()"] {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

button[onclick*="history.back()"]:hover,
button[onclick*="location.reload()"]:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Debug info styling */
.auth-info-box small {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.6;
    word-break: break-all;
}

/* ==========================================
   PROVIDER ICONS
   ========================================== */

.bi-google { color: #4285f4; }
.bi-facebook { color: #1877f2; }
.bi-twitter { color: #1da1f2; }
.bi-github { color: var(--text-color); }
.bi-linkedin { color: #0077b5; }
.bi-microsoft { color: #00a1f1; }
.bi-apple { color: var(--text-color); }

/* ==========================================
   ANIMATIONS
   ========================================== */

.social-account-info {
    animation: slideInFromLeft 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.recovery-code-item {
    animation: fadeInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation-fill-mode: both;
}

.recovery-code-item:nth-child(1) { animation-delay: 0.1s; }
.recovery-code-item:nth-child(2) { animation-delay: 0.2s; }
.recovery-code-item:nth-child(3) { animation-delay: 0.3s; }
.recovery-code-item:nth-child(4) { animation-delay: 0.4s; }
.recovery-code-item:nth-child(5) { animation-delay: 0.5s; }
.recovery-code-item:nth-child(6) { animation-delay: 0.6s; }
.recovery-code-item:nth-child(7) { animation-delay: 0.7s; }
.recovery-code-item:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.email-item {
    animation: emailItemEntrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes emailItemEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.email-actions button:active {
    transform: scale(0.95);
}

/* Pulsing effect for countdown */
#countdown-display,
#refresh-countdown {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
    }

    .auth-card {
        padding: 30px 25px;
        max-width: 100%;
        border-radius: 16px;
    }

    .auth-logo {
        font-size: 28px;
    }

    .auth-title {
        font-size: 20px;
    }

    .form-fields input {
        padding: 16px 18px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }

    .btn {
        padding: 14px 28px;
        font-size: 15px;
    }

    .social-account-info {
        margin: 16px 0;
        padding: 12px;
    }

    .recovery-codes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .recovery-actions {
        flex-direction: column;
        align-items: center;
    }

    .recovery-actions .btn {
        width: 100%;
        max-width: 200px;
    }

    .mfa-code-input input[type="text"] {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .auto-refresh-info {
        flex-direction: column;
        gap: 4px;
    }

    .email-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .email-actions {
        width: 100%;
        justify-content: center;
    }

    .email-actions button {
        flex: 1;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .auth-header {
        margin-bottom: 30px;
    }

    .form-fields p {
        margin-bottom: 20px;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::before {
        animation: none;
    }

    body {
        animation: none;
        background: linear-gradient(-45deg, #667eea, #764ba2);
    }
}

@media (prefers-contrast: high) {
    .auth-card {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
    }

    .form-fields input {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
    }
}

/* ==========================================
   FOCUS MANAGEMENT
   ========================================== */

.btn:focus,
.form-fields input:focus,
.auth-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* ==========================================
   LOADING STATES
   ========================================== */

.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   FLACH — die Bühne seit dem 21.11.2026
   ==========================================================================
   Was darüber steht, ist das alte Erscheinungsbild: wandernder Farbverlauf,
   schwebende Punkte, Glaskarte, Knöpfe mit Lichtstreif. Dieser Abschnitt
   nimmt das zurück und setzt eine ruhige, dunkle Bühne dafür ein:

       links   ein Bild (Linien, die zu einem Strom zusammenlaufen, eine
               davon in der Markenfarbe)
       rechts  die Spalte mit dem Inhalt, ohne Karte, ohne Schatten

   Auf dem Handy wird das Bild zum Streifen über dem Inhalt.

   WARUM ALS ABSCHNITT AM ENDE UND NICHT ALS NEUE DATEI: 34 Vorlagen binden
   diese Datei ein und benutzen dieselben Klassen (.auth-container,
   .auth-card, .auth-info-box …). So bekommen ALLE das neue Bild, auch die,
   die niemand angefasst hat — eine zweite Datei hätte nur die Seiten
   erreicht, an die jemand denkt.

   Die Seiten sind IMMER dunkel, unabhängig vom Thema der Plattform: vor der
   Anmeldung gibt es kein Thema, und eine Fehlerseite soll nicht davon
   abhängen, dass sich eins laden liess.

   Markenfarbe #c5023c — wie auf rivus360.com. Weiss darauf: 5,9 : 1.
   ========================================================================== */

/* Die zehn Farben der Anmeldung (--ext-grund … --ext-fokus) stehen in
   core_tokens.css, Abschnitt 8 — dort ist die eine Quelle, und dort zählt
   Prüfung 29 (03-tests/test_design_db.py) sie nicht als modullokalen
   Festwert. Hier bleibt nur das Mass. */
:root {
    --ext-spalte: 560px;
}

html {
    color-scheme: dark;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}

body {
    background: var(--ext-grund);
    background-attachment: scroll;
    animation: none;
    color: var(--ext-text);
}

body::before {
    content: none;
}

/* Nichts bewegt sich mehr von selbst. */
.auth-container *,
.auth-container *::before,
.auth-container *::after {
    animation: none !important;
    backdrop-filter: none !important;
    text-shadow: none !important;
}

.auth-container :focus-visible {
    outline: 2px solid var(--ext-fokus);
    outline-offset: 2px;
}

/* ---------- Bühne ---------- */

.auth-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--ext-spalte));
    align-items: stretch;
    justify-content: stretch;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    background: linear-gradient(
        to right,
        var(--ext-grund) calc(100% - var(--ext-spalte)),
        var(--ext-flaeche) calc(100% - var(--ext-spalte))
    );
}

.auth-container::before,
.auth-buehne {
    content: '';
    position: static;
    width: auto;
    height: auto;
    background-color: var(--ext-grund);
    background-image: url('../img/anmeldung/login-hoch-1.jpg');
    background-image: image-set(
        url('../img/anmeldung/login-hoch-1.webp') type('image/webp'),
        url('../img/anmeldung/login-hoch-1.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    border-right: 1px solid var(--ext-rand);
}

/* Seiten mit eigener Bühne (Text über dem Bild) bringen sie als Element mit. */
.auth-container--buehne::before {
    content: none;
}

.auth-buehne {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(28px, 4vw, 56px);
    min-width: 0;
}

.auth-buehne__ueber {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ext-marke-hell);
}

/* Der Satz steht in EINER Zeile. Seine Grösse folgt deshalb der Breite der
   Bühne (cqw) und nicht der des Fensters: die Bühne ist das Fenster minus
   der Inhaltsspalte, und nur an ihr lässt sich sagen, was hineinpasst. */
.auth-buehne {
    container-type: inline-size;
}

.auth-buehne__satz {
    margin: 0;
    font-size: clamp(20px, 2.4vw, 36px);
    font-size: clamp(18px, 4.3cqw, 36px);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.01em;
    color: var(--ext-text);
}

.auth-buehne__klein {
    margin: 16px 0 0;
    max-width: 44ch;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ext-leise);
}

.auth-container--fehler::before,
.auth-container--fehler .auth-buehne {
    background-image: url('../img/anmeldung/fehler-hoch-1.jpg');
    background-image: image-set(
        url('../img/anmeldung/fehler-hoch-1.webp') type('image/webp'),
        url('../img/anmeldung/fehler-hoch-1.jpg') type('image/jpeg')
    );
}

/* ---------- Inhaltsspalte ---------- */

.auth-card,
.email-management-card {
    align-self: center;
    justify-self: center;
    width: 100%;
    max-width: 456px;
    margin: 0;
    padding: clamp(28px, 5vh, 56px) clamp(20px, 4vw, 40px);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.email-management-card {
    max-width: 520px;
}

.auth-card::before {
    content: none;
}

/* ---------- Kopf: Wortmarke, Titel ---------- */

.auth-header {
    margin-bottom: 28px;
    text-align: left;
}

/* Die Wortmarke von rivus360.com. Der Text „RIVUS360" bleibt im Dokument
   (Vorleser), gezeigt wird das Zeichen. */
.auth-logo {
    display: block;
    width: 190px;
    height: 24px;
    margin: 0 0 30px;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
    letter-spacing: 0;
    color: transparent;
    background: url('../img/rivus360-logo.svg') left center / contain no-repeat;
}

/* „Enterprise" steht nur noch da, wenn das Paket gebucht ist: die Vorlage
   setzt dann .ist-enterprise an den Kopf. Sonst bleibt beides weg. */
.auth-logo-divider,
.auth-edition {
    display: none;
}

.auth-header.ist-enterprise .auth-logo {
    margin-bottom: 8px;
}

.auth-header.ist-enterprise .auth-edition {
    display: block;
    margin: 0 0 26px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.32em;
    color: var(--ext-leise);
}

.auth-title {
    margin: 0 0 8px;
    font-size: clamp(24px, 3.2vw, 30px);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-align: left;
    color: var(--ext-text);
}

.auth-subtitle {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.55;
    text-align: left;
    color: var(--ext-leise);
}

/* ---------- Felder ---------- */

.form-fields p {
    margin-bottom: 18px;
}

.form-fields label {
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 550;
    color: var(--ext-text);
}

.form-fields input[type="text"],
.form-fields input[type="email"],
.form-fields input[type="password"],
.form-fields input[type="number"],
.form-fields input[type="tel"],
.auth-card textarea,
.mfa-code-input {
    padding: 14px 16px;
    border: 1px solid var(--ext-rand-hell);
    border-radius: 10px;
    background: var(--ext-feld);
    color: var(--ext-text);
    font-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-fields input::placeholder,
.auth-card textarea::placeholder {
    color: #6c7380;
    font-weight: 400;
}

.form-fields input:focus,
.auth-card textarea:focus,
.mfa-code-input:focus {
    background: var(--ext-feld);
    border-color: var(--ext-marke-hell);
    box-shadow: 0 0 0 3px rgba(197, 2, 60, 0.28);
    transform: none;
    outline: none;
}

/* Vom Browser ausgefüllte Felder bleiben dunkel. */
.form-fields input:-webkit-autofill {
    -webkit-text-fill-color: var(--ext-text);
    box-shadow: 0 0 0 1000px var(--ext-feld) inset;
    caret-color: var(--ext-text);
}

.form-fields input[type="checkbox"] {
    flex: 0 0 auto;
    border: 1px solid var(--ext-rand-hell);
    border-radius: 5px;
    background: var(--ext-feld);
    margin-right: 10px;
}

.form-fields input[type="checkbox"]:checked {
    background: var(--ext-marke);
    border-color: var(--ext-marke);
}

.remember-me-row label {
    font-weight: 400;
    color: var(--ext-leise);
}

/* ---------- Knöpfe ---------- */

form button[type="submit"],
.btn {
    min-height: 50px;
    margin-bottom: 12px;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 16px;
    letter-spacing: 0;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

form button::before,
.btn::before {
    content: none;
}

form button[type="submit"],
.btn-primary {
    background: var(--ext-marke);
    color: #ffffff;
    box-shadow: none;
}

form button[type="submit"]:hover:not(:disabled),
form button[type="submit"]:active,
.btn-primary:hover:not(:disabled) {
    background: var(--ext-marke-hell);
    transform: none;
    box-shadow: none;
}

.btn-secondary,
form button[type="submit"].btn-secondary {
    background: transparent;
    color: var(--ext-text);
    border: 1px solid var(--ext-rand-hell);
}

.btn-secondary:hover:not(:disabled),
form button[type="submit"].btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: #555c6b;
    transform: none;
    box-shadow: none;
}

/* Ein Knopf, der wie ein Verweis aussieht („Neuen Code senden"). */
form button[type="submit"].auth-textknopf,
.auth-textknopf {
    display: inline;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ext-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

form button[type="submit"].auth-textknopf:hover:not(:disabled) {
    background: none;
    color: #ffffff;
}

/* ---------- Verweise, Trenner ---------- */

.auth-links {
    margin-top: 22px;
    text-align: left;
}

.auth-link,
.auth-leise {
    padding: 0;
    color: var(--ext-leise);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-link:hover,
.auth-leise:hover {
    background: none;
    color: var(--ext-text);
    transform: none;
    text-decoration: underline;
}

.divider {
    margin: 22px 0;
    color: var(--ext-leise);
    font-size: 13px;
}

.divider::before,
.divider::after {
    background: var(--ext-rand);
}

.divider span {
    padding: 0 14px;
    font-weight: 400;
}

/* ---------- Meldungen und Kästen ---------- */

.errorlist .error-item,
.errorlist li,
.messages .message,
.messages .success {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.errorlist .error-item,
.errorlist li,
.messages .error {
    background: rgba(197, 2, 60, 0.14);
    border: 1px solid rgba(222, 26, 84, 0.45);
    color: #ffb3c5;
}

.messages .message {
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ext-rand);
    color: var(--ext-text);
}

.messages .success {
    background: rgba(46, 160, 110, 0.14);
    border-color: rgba(46, 160, 110, 0.45);
    color: #a6e9c8;
}

.messages .warning {
    background: rgba(214, 158, 46, 0.14);
    border-color: rgba(214, 158, 46, 0.45);
    color: #f5d99a;
}

.auth-info-box {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ext-rand);
}

.auth-info-box i {
    color: var(--ext-leise);
}

.auth-info-box p,
.auth-info-box div {
    color: #c9cdd5;
    font-size: 14px;
    line-height: 1.55;
}

.auth-info-box strong {
    color: var(--ext-text);
}

.auth-error-box {
    background: rgba(197, 2, 60, 0.12);
    border-color: rgba(222, 26, 84, 0.4);
}

.auth-error-box i {
    color: #ff8fab;
}

.auth-warning-box {
    background: rgba(214, 158, 46, 0.12);
    border-color: rgba(214, 158, 46, 0.4);
}

.auth-warning-box i {
    color: #f0c466;
}

.auth-success-box {
    background: rgba(46, 160, 110, 0.12);
    border-color: rgba(46, 160, 110, 0.4);
}

.auth-success-box i {
    color: #6fd9a8;
}

/* ---------- Anmeldung in Schritten ---------- */

/* „Sie melden sich an als …" mit dem Weg zurück. */
.auth-adresse {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    padding: 10px 14px;
    border: 1px solid var(--ext-rand);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 14px;
    color: var(--ext-text);
}

.auth-adresse i {
    color: var(--ext-leise);
    font-size: 17px;
}

.auth-adresse span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-labelzeile {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.auth-labelzeile label {
    margin-bottom: 7px;
}

.auth-reihe {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    margin-top: 6px;
}

.auth-reihe form {
    display: inline;
}

/* Der sechsstellige Code: gross, gesperrt, in Ziffernschrift. */
.form-fields input.auth-code,
.auth-code {
    width: 100%;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.42em;
    text-align: center;
    padding: 14px 8px 14px 18px;
    font-variant-numeric: tabular-nums;
}

.auth-verborgen {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.auth-fuss {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--ext-rand);
    font-size: 13px;
    line-height: 1.6;
    color: var(--ext-leise);
}

/* ---------- Fehlerseiten ---------- */

.auth-status {
    margin: 0 0 6px;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--ext-marke-hell);
}

.auth-schritte {
    margin: 18px 0 0;
    padding: 0 0 0 20px;
    color: #c9cdd5;
    font-size: 15px;
    line-height: 1.6;
}

.auth-schritte li + li {
    margin-top: 6px;
}

/* Die Kennung: das Einzige auf der Seite, das der Anwender weitergeben soll. */
.auth-kennung {
    margin: 26px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--ext-rand-hell);
    border-radius: 12px;
    background: var(--ext-feld);
}

.auth-kennung__name {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ext-leise);
}

.auth-kennung__wert {
    margin: 0;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: clamp(20px, 5.2vw, 26px);
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--ext-text);
    user-select: all;
    overflow-wrap: anywhere;
}

.auth-kennung__dazu {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ext-leise);
}

.auth-daten {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 14px;
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--ext-leise);
}

.auth-daten dt {
    font-weight: 600;
}

.auth-daten dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #c9cdd5;
}

.auth-card textarea {
    display: block;
    width: 100%;
    min-height: 92px;
    margin: 8px 0 12px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.auth-aktionen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 26px;
}

.auth-aktionen .btn {
    margin-bottom: 0;
}

/* ---------- Sprachwahl ---------- */

/* Oben rechts über der Inhaltsspalte. Der Baustein ist der der Plattform
   (customers/static/css/core_language.css) und rechnet mit deren Farbnamen;
   hier bekommt er sie in dunkel — nur innerhalb dieses Kastens, damit die
   Seite sonst nichts von den Themen der Plattform braucht. */
.auth-container {
    position: relative;
}

.auth-sprache {
    position: absolute;
    top: 20px;
    right: clamp(16px, 3vw, 32px);
    z-index: 20;
    width: 210px;
    font-size: 14px;

    --surface: #181b21;
    --surface-sunken: #20242c;
    --surface-tertiary: #20242c;
    --border-color: var(--ext-rand);
    --border-strong: var(--ext-rand-hell);
    --input-border: var(--ext-rand-hell);
    --text-muted: var(--ext-leise);
    --primary-rgb: 197, 2, 60;
    --primary-border: var(--ext-marke-hell);
    --primary-light: rgba(197, 2, 60, 0.18);
    --primary-text: #ffffff;
    --info-bg: rgba(255, 255, 255, 0.07);
    --danger-ink: #ff8fab;
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.55);
    color: var(--ext-text);
}

.auth-sprache .language-selector-display {
    border-radius: 10px;
    background: rgba(15, 16, 20, 0.82);
    color: var(--ext-text);
}

.auth-sprache .language-selector-dropdown {
    border-radius: 10px;
    color: var(--ext-text);
}

.auth-sprache .language-selector-search input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ext-rand-hell);
    border-radius: 8px;
    background: var(--ext-feld);
    color: var(--ext-text);
    font-size: 14px;
}

.auth-sprache .language-option,
.auth-sprache .language-option .name {
    color: var(--ext-text);
}

/* Ohne Skript: das gewöhnliche <select>, dunkel. */
.auth-sprache > select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--ext-rand-hell);
    border-radius: 10px;
    background: var(--ext-feld);
    color: var(--ext-text);
    font-size: 14px;
}

/* ---------- Der Schalter („Angemeldet bleiben") ---------- */

/* Der ovale Schalter der Plattform (.form-switch in style.css), hier in den
   Farben der Bühne. Die Regeln für das Häkchen-Kästchen weiter oben gelten
   für ihn nicht mehr. */
.auth-card .form-switch {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-card .form-switch input[type="checkbox"] {
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
    margin: 0;
    border: 0;
    border-radius: 12px;
    background: #3a3f4b;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.auth-card .form-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.2s ease;
}

.auth-card .form-switch input[type="checkbox"]:checked {
    background: var(--ext-marke);
    border: 0;
}

.auth-card .form-switch input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.auth-card .form-switch input[type="checkbox"]:checked::after {
    content: none;
}

.auth-card .form-switch label {
    margin: 0;
    cursor: pointer;
}

/* ---------- Schmal: das Bild wird zum Streifen ---------- */

@media (max-width: 920px) {
    .auth-container {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        background: var(--ext-flaeche);
    }

    .auth-container::before,
    .auth-buehne {
        min-height: 132px;
        border-right: 0;
        border-bottom: 1px solid var(--ext-rand);
        background-image: url('../img/anmeldung/login-quer-1.jpg');
        background-image: image-set(
            url('../img/anmeldung/login-quer-1.webp') type('image/webp'),
            url('../img/anmeldung/login-quer-1.jpg') type('image/jpeg')
        );
        background-position: center;
    }

    .auth-container--fehler::before,
    .auth-container--fehler .auth-buehne {
        background-image: url('../img/anmeldung/fehler-quer-1.jpg');
        background-image: image-set(
            url('../img/anmeldung/fehler-quer-1.webp') type('image/webp'),
            url('../img/anmeldung/fehler-quer-1.jpg') type('image/jpeg')
        );
    }

    .auth-buehne {
        padding: 18px 20px;
    }

    .auth-sprache {
        top: 14px;
        right: 16px;
        width: 180px;
    }

    .auth-buehne__satz,
    .auth-buehne__klein {
        display: none;
    }

    .auth-buehne__ueber {
        margin: 0;
    }

    .auth-card,
    .email-management-card {
        align-self: start;
        max-width: 520px;
        padding-top: 28px;
    }
}

@media (max-width: 420px) {
    .auth-aktionen {
        grid-template-columns: 1fr;
    }

    .form-fields input.auth-code,
    .auth-code {
        font-size: 22px;
        letter-spacing: 0.3em;
    }
}

@media print {
    .auth-container::before,
    .auth-buehne {
        display: none;
    }

    .auth-container {
        display: block;
        background: #ffffff;
    }
}
