﻿
/* =========================================================
   CleanDation – Login und Registrierung
   ========================================================= */

.auth-page {
    --auth-primary: #0050E8;
    --auth-navy: #111827;
    --auth-light: #F7F9FC;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
    background-image: none;
}

    .auth-page,
    .auth-page * {
        box-sizing: border-box;
    }

/* =========================================================
   Formularkarte
   ========================================================= */

.auth-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 2.5rem;
    background: #FFFFFF;
    border: 1px solid #E4EAF2;
    border-radius: 18px;
    box-shadow: 0 14px 45px rgba(17, 24, 39, 0.06);
    backdrop-filter: none;
}

.auth-card-register {
    max-width: 530px;
}

/* =========================================================
   Doppelte Logos ausblenden
   ========================================================= */

/*
   Die Auth-Karte enthält noch das eigene Logo
   aus Login.razor beziehungsweise Register.razor.

   Dieses Logo wird bewusst nur optisch entfernt.
   Die Identity-Logik bleibt unverändert.

   Das einzelne sichtbare Logo wird über
   AuthLayout.razor gesteuert.
*/

.auth-page .auth-brand {
    display: none !important;
}

/* Bestehende Markenelemente */

.auth-wordmark {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.auth-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.auth-brand-text {
    color: #111827;
    font-size: 1.35rem;
    font-weight: 750;
}

/* =========================================================
   Überschriften
   ========================================================= */

.auth-header {
    margin-bottom: 2rem;
    text-align: center;
}

    .auth-header h1 {
        margin: 0 0 0.65rem;
        color: #111827;
        font-size: clamp(1.65rem, 2.3vw, 2rem);
        font-weight: 800;
        line-height: 1.25;
        letter-spacing: -0.025em;
    }

    .auth-header p {
        max-width: 370px;
        margin: 0 auto;
        color: #64748B;
        font-size: 0.96rem;
        line-height: 1.65;
    }

/* =========================================================
   Formular
   ========================================================= */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    width: 100%;
}

    .auth-form .form-floating {
        margin: 0;
    }

    .auth-form .form-control {
        width: 100%;
        min-height: 56px;
        color: #111827;
        background-color: #FFFFFF;
        border: 1px solid #D6DFEB;
        border-radius: 9px;
        font-size: 1rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .auth-form .form-control:focus {
            color: #111827;
            background-color: #FFFFFF;
            border-color: #0050E8;
            outline: none;
            box-shadow: 0 0 0 3px rgba(0, 80, 232, 0.12);
        }

    .auth-form .form-floating > label {
        color: #64748B;
    }

    .auth-form .form-floating > .form-control:focus ~ label,
    .auth-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
        color: #52617A;
    }

    .auth-form .validation-message {
        color: #B42318;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .auth-form .validation-summary-errors {
        color: #B42318;
        font-size: 0.9rem;
        line-height: 1.6;
    }

/* =========================================================
   Login-Optionen
   ========================================================= */

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: #475569;
    font-size: 0.9rem;
}

    .auth-options .form-check {
        margin: 0;
    }

    .auth-options .form-check-input {
        border-color: #CBD5E1;
    }

        .auth-options .form-check-input:checked {
            background-color: #0050E8;
            border-color: #0050E8;
        }

.auth-link {
    color: #0050E8;
    font-weight: 600;
    text-decoration: none;
}

    .auth-link:hover {
        color: #003FC0;
        text-decoration: underline;
    }

/* =========================================================
   Hauptbutton
   ========================================================= */

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin-top: 0.25rem;
    padding: 0.85rem 1.25rem;
    color: #FFFFFF;
    background-color: #0050E8;
    border: 1px solid #0050E8;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    .auth-submit:hover,
    .auth-submit:focus {
        color: #FFFFFF;
        background-color: #003FC0;
        border-color: #003FC0;
    }

    .auth-submit:focus-visible {
        outline: 3px solid #80C7FF;
        outline-offset: 3px;
    }

/* =========================================================
   Trenner
   ========================================================= */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #94A3B8;
    font-size: 0.85rem;
}

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: #E4EAF2;
    }

/* =========================================================
   Sekundärer Button
   ========================================================= */

.auth-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 0.75rem 1rem;
    color: #0050E8;
    background: #FFFFFF;
    border: 1px solid #0050E8;
    border-radius: 10px;
    font-size: 0.96rem;
    font-weight: 650;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .auth-secondary-action:hover {
        color: #FFFFFF;
        background-color: #0050E8;
        border-color: #0050E8;
        text-decoration: none;
    }

/* =========================================================
   Zusätzliche Links
   ========================================================= */

.auth-footer-links {
    margin-top: 0.4rem;
    text-align: center;
    font-size: 0.88rem;
}

    .auth-footer-links a {
        color: #64748B;
        text-decoration: none;
    }

        .auth-footer-links a:hover {
            color: #0050E8;
            text-decoration: underline;
        }

.auth-login-hint {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    color: #64748B;
    border-top: 1px solid #E4EAF2;
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: center;
}

    .auth-login-hint a {
        margin-left: 0.25rem;
        color: #0050E8;
        font-weight: 700;
        text-decoration: none;
    }

        .auth-login-hint a:hover {
            text-decoration: underline;
        }

/* =========================================================
   Bestehende Layout-Korrekturen
   ========================================================= */

html body article.public-page-content:has(> .auth-page) {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body main.public-main-content:has(.auth-page) {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1100px) {

    .auth-card {
        padding: 2rem;
    }
}

/* =========================================================
   Smartphone
   ========================================================= */

@media (max-width: 575.98px) {

    .auth-page {
        align-items: flex-start;
    }

    .auth-card,
    .auth-card-register {
        max-width: 100%;
        padding: 1.5rem 1.2rem;
        border-radius: 14px;
        box-shadow: 0 8px 25px rgba(17, 24, 39, 0.04);
    }

    .auth-header {
        margin-bottom: 1.5rem;
    }

        .auth-header h1 {
            font-size: 1.7rem;
        }

        .auth-header p {
            font-size: 0.9rem;
        }

    .auth-form {
        gap: 1rem;
    }

    .auth-options {
        align-items: flex-start;
        gap: 0.8rem;
    }

    .auth-form .form-control {
        min-height: 54px;
    }
}

/* =========================================================
   Reduzierte Animationen
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .auth-form .form-control,
    .auth-submit,
    .auth-secondary-action {
        transition: none;
    }
}
