/* =====================================================
   All-in-One Dashboard – Universal-Login & Portal-Auswahl
   Neutral (ohne Portal-Branding) · Light/Dark · Mobile First
   ===================================================== */

/* ---------- Design-Tokens ---------- */
:root {
    --bg:            #F3F5F8;
    --surface:       #FFFFFF;
    --surface-2:     #E9EDF3;
    --text:          #232B33;
    --text-muted:    #5C6873;
    --primary:       #3182CE;          /* neutrales Blau */
    --primary-soft:  #DCEAF8;
    --danger:        #E53E3E;
    --border:        #DDE3EA;
    --shadow:        0 2px 10px rgba(35, 43, 51, 0.08);

    --radius:        14px;
    --radius-sm:     9px;
    --font: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
        --bg:           #15191E;
        --surface:      #1E242B;
        --surface-2:    #262E37;
        --text:         #E8ECF0;
        --text-muted:   #9AA7B2;
        --primary:      #63A4E0;
        --primary-soft: #24344A;
        --danger:       #F07070;
        --border:       #2E3842;
        --shadow:       0 2px 10px rgba(0, 0, 0, 0.35);
    }
}

html[data-theme="dark"] {
    --bg:           #15191E;
    --surface:      #1E242B;
    --surface-2:    #262E37;
    --text:         #E8ECF0;
    --text-muted:   #9AA7B2;
    --primary:      #63A4E0;
    --primary-soft: #24344A;
    --danger:       #F07070;
    --border:       #2E3842;
    --shadow:       0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 0.5rem; }

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ---------- Login / Auswahl ---------- */
.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 1rem;
    background:
        radial-gradient(1100px 500px at 80% -10%, var(--primary-soft), transparent),
        var(--bg);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 1.5rem;
}

.login-logo { color: var(--primary); margin-bottom: 0.5rem; }
.login-sub { color: var(--text-muted); margin-top: 0; }

label { display: block; font-weight: 700; margin: 0.75rem 0 0.25rem; }

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}
input:focus { border-color: var(--primary); }

.password-wrap { position: relative; }
.password-toggle {
    position: absolute;
    right: 0.4rem; top: 50%;
    transform: translateY(-50%);
    border: none; background: transparent;
    cursor: pointer; font-size: 1rem;
    padding: 0.3rem;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; margin-top: 1rem; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

.alert {
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.alert-info  { background: var(--primary-soft); color: var(--primary); }
.alert-error { background: rgba(229, 62, 62, 0.12); color: var(--danger); }

.login-footer {
    margin: 1.25rem 0 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---------- Portal-Auswahl (Admin) ---------- */
.choice-card { max-width: 460px; text-align: center; }

.choice-grid {
    display: grid;
    gap: 0.9rem;
    margin: 1.25rem 0;
}

.choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.choice-familie svg { color: #38A169; }
.choice-jf svg      { color: #E53E3E; }
.choice-admin svg   { color: var(--primary); }   /* Update 14 */

.choice-logout { margin-top: 0.5rem; }

@media (min-width: 480px) {
    .choice-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
