:root {
    --text: #1f2328;
    --muted: #59636e;
    --border: #d1d9e0;
    --head: #f0f3f6;
    --accent: #0969da;
    --ok-bg: #dafbe1;
    --error-bg: #ffebe9;
    --locked: #eaeef2;
    --bg: #ffffff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--accent); }

.kopf {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.kopf h1 { margin: 0; font-size: 20px; }
.kopf h1 a { color: inherit; text-decoration: none; }
.kopf p { margin: 4px 0 0; color: var(--muted); }
.kopf nav { display: flex; align-items: center; gap: 12px; }
.kopf nav form { margin: 0; }

main { padding: 16px; }

.meldung { padding: 8px 12px; border-radius: 6px; }
.meldung.ok { background: var(--ok-bg); }
.meldung.fehler { background: var(--error-bg); }

.tabelle { overflow-x: auto; }
table { border-collapse: collapse; }
th, td { border: 1px solid var(--border); padding: 4px 8px; white-space: nowrap; text-align: left; }
th { background: var(--head); }
tr.monatsanfang td { border-top: 2px solid var(--muted); }
td.gesperrt { background: var(--locked); color: var(--muted); }

td:has(> button.zelle) { padding: 0; }
button.zelle {
    display: block;
    width: 100%;
    min-width: 64px;
    min-height: 26px;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
button.zelle:hover, button.zelle:focus-visible { background: #ddf4ff; outline: 1px solid var(--accent); }

button, input { font: inherit; }
button { padding: 6px 12px; cursor: pointer; }
button.link { padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; }
input[type="text"], input[type="email"], input[type="date"] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; }

.neu form, .anmeldung form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 12px; }
label { display: flex; flex-direction: column; gap: 4px; }
.anmeldung { max-width: 480px; }

dialog { border: 1px solid var(--border); border-radius: 8px; padding: 16px; width: min(420px, calc(100vw - 32px)); }
dialog h2 { margin-top: 0; font-size: 16px; }
dialog input[type="text"] { width: 100%; }
.hinweis { color: var(--muted); margin: 4px 0 12px; }
.knoepfe { display: flex; gap: 8px; align-items: center; }
