/* Kochplan: schlankes, mobiles Grundlayout. Farben als Variablen, dunkel folgt dem System. */

:root {
    --bg: #f4f6f4;
    --surface: #ffffff;
    --border: #dde4df;
    --text: #1c231f;
    --muted: #5c675f;
    --accent: #2f7d5b;
    --accent-text: #ffffff;
    --ok-bg: #e4f3ea;
    --warn-bg: #fdf1d9;
    --error-bg: #fbe4e2;
    --nav-h: 64px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14181a;
        --surface: #1d2326;
        --border: #2f383c;
        --text: #eaf0ec;
        --muted: #9aa8a0;
        --accent: #55b98a;
        --accent-text: #0f1a14;
        --ok-bg: #1d3a2b;
        --warn-bg: #3d3318;
        --error-bg: #452221;
    }
}

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

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h1:focus { outline: none; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* --- Rahmen mit Navigation unten --- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1rem; padding-top: max(.75rem, env(safe-area-inset-top));
    border-bottom: 1px solid var(--border); background: var(--surface);
}
.brand { font-weight: 700; letter-spacing: -.01em; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; padding: .25rem; }
.link-btn:hover { color: var(--text); }

.content { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 1rem 1rem calc(var(--nav-h) + 1.5rem); }

.bottom-nav {
    position: fixed; inset: auto 0 0 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: flex; background: var(--surface); border-top: 1px solid var(--border);
}
.bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .1rem; font-size: .75rem; color: var(--muted); text-decoration: none;
}
.bottom-nav a .ico { font-size: 1.35rem; line-height: 1; }
.bottom-nav a.active { color: var(--accent); font-weight: 600; }

.placeholder { padding: 1.25rem; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface); }
.placeholder p { margin: 0 0 .5rem; }

/* --- Login, Fehler, Nicht gefunden --- */
.empty-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }

.card {
    width: 100%; max-width: 420px; padding: 2rem 1.5rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
}
.card h1 { font-size: 1.3rem; margin-bottom: .5rem; }
.badge {
    width: 44px; height: 44px; border-radius: 12px; margin-bottom: 1rem;
    display: grid; place-items: center; font-weight: 700; font-size: 1.25rem;
    background: var(--accent); color: var(--accent-text);
}

label { display: block; font-size: .85rem; font-weight: 600; margin: 1rem 0 .35rem; }
input[type=email], input[type=text] {
    width: 100%; padding: .7rem .8rem; font: inherit; color: var(--text);
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
input:focus-visible, .btn:focus-visible, .link-btn:focus-visible, .bottom-nav a:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}

.btn {
    display: inline-block; width: 100%; margin-top: 1rem; padding: .75rem 1rem; text-align: center;
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    color: var(--accent-text); background: var(--accent); border: 0; border-radius: 8px;
}

.alert { margin-top: 1rem; padding: .75rem 1rem; border-radius: 8px; font-size: .9rem; }
.alert.ok { background: var(--ok-bg); }
.alert.warn { background: var(--warn-bg); }
.alert.error { background: var(--error-bg); }

/* --- Blazor-Standardelemente --- */
.validation-message { color: #c0362c; font-size: .85rem; }

#blazor-error-ui {
    color-scheme: light only; background: #fff3cd; color: #3b3000;
    bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); box-sizing: border-box;
    display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
