/* Kontoseiten (Anmelden, Registrieren). Bewusst ohne MudBlazor, da diese Seiten
   statisch gerendert werden und ein klassisches Formular abschicken. */

.auth-shell {
    --auth-accent: #4f46e5;
    --auth-accent-2: #0ea5e9;
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-line: #e2e8f0;
    --auth-bg: #f8fafc;

    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--auth-ink);
    background: var(--auth-bg);
}

/* -- Markenseite -------------------------------------------------------------------- */

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 3rem;
    color: #fff;
    background: linear-gradient(150deg, #1e1b4b 0%, #4338ca 45%, #0ea5e9 120%);
    overflow: hidden;
}

.auth-brand::after {
    content: "";
    position: absolute;
    inset: auto -20% -45% auto;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), transparent 62%);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 30rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 3.5rem;
    color: #fff;
    text-decoration: none;
}

.auth-logo-mark {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-logo-text {
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.auth-logo-text strong {
    font-weight: 700;
}

.auth-claim {
    margin: 0 0 1rem;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.auth-sub {
    margin: 0 0 2.5rem;
    font-size: 1.02rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-points span {
    display: grid;
    place-items: center;
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    font-weight: 600;
}

.auth-footnote {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* -- Formularseite ------------------------------------------------------------------ */

.auth-panel {
    display: grid;
    place-items: center;
    padding: 2.5rem 1.5rem;
}

.auth-card {
    width: min(26rem, 100%);
}

.auth-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.65rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.auth-lead {
    margin: 0 0 1.75rem;
    color: var(--auth-muted);
    font-size: 0.95rem;
}

.auth-field {
    display: block;
    margin-bottom: 1rem;
}

.auth-field > span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.auth-field input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--auth-ink);
    background: #fff;
    border: 1px solid var(--auth-line);
    border-radius: 0.6rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.auth-row {
    display: flex;
    gap: 1rem;
}

.auth-row > * {
    flex: 1;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.25rem 0 1.4rem;
    font-size: 0.88rem;
    color: #475569;
    cursor: pointer;
}

.auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-accent);
}

.auth-submit {
    width: 100%;
    padding: 0.78rem 1rem;
    font: inherit;
    font-size: 0.97rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(120deg, var(--auth-accent), #6366f1 60%, var(--auth-accent-2));
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    box-shadow: 0 8px 20px -10px rgba(79, 70, 229, 0.85);
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.auth-submit:hover {
    filter: brightness(1.05);
    box-shadow: 0 12px 26px -10px rgba(79, 70, 229, 0.9);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.6rem 0;
    color: var(--auth-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

.auth-providers {
    display: grid;
    gap: 0.7rem;
}

.auth-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--auth-line);
    border-radius: 0.6rem;
    transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.auth-provider:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.auth-provider:active {
    transform: translateY(1px);
}

.auth-provider svg {
    width: 1.1rem;
    height: 1.1rem;
}

.auth-hint {
    margin: 1.7rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--auth-muted);
}

.auth-hint a {
    color: var(--auth-accent);
    font-weight: 600;
    text-decoration: none;
}

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

.auth-alert {
    margin-bottom: 1.25rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.6rem;
    font-size: 0.88rem;
    line-height: 1.45;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.auth-alert ul {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}

.auth-note {
    margin-top: 1.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.6rem;
    background: #f1f5f9;
    color: var(--auth-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.auth-loading {
    display: grid;
    place-items: center;
    min-height: 60vh;
    color: #64748b;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

/* -- Dunkles Farbschema -------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
    .auth-shell {
        --auth-ink: #e2e8f0;
        --auth-muted: #94a3b8;
        --auth-line: #334155;
        --auth-bg: #0f172a;
    }

    .auth-field input,
    .auth-provider {
        background: #1e293b;
        color: #e2e8f0;
    }

    .auth-field > span {
        color: #cbd5e1;
    }

    .auth-provider:hover {
        background: #263449;
    }

    .auth-note {
        background: #1e293b;
    }

    .auth-alert {
        background: #431a1a;
        border-color: #7f1d1d;
        color: #fecaca;
    }

    .auth-alert-info {
        background: #1e293b;
        border-color: #1e40af;
        color: #bfdbfe;
    }
}

/* -- Schmale Ansichten ---------------------------------------------------------------- */

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

    .auth-brand {
        padding: 2rem 1.5rem;
    }

    .auth-logo {
        margin-bottom: 1.5rem;
    }

    .auth-claim {
        font-size: 1.6rem;
    }

    .auth-sub {
        margin-bottom: 1.25rem;
    }

    .auth-points,
    .auth-footnote {
        display: none;
    }
}
