:root {
    --accent: #00544e;
    --accent-soft: #e3f0ef;
    --text: #1f2328;
    --muted: #667;
    --line: #d9dee3;
    --bg: #f6f7f8;
    --card: #fff;
    --error: #b42318;
    --success: #1a7f37;
}

@media (prefers-color-scheme: dark) {
    :root {
        --accent: #4fb3a9;
        --accent-soft: #16312f;
        --text: #e6e8ea;
        --muted: #9aa3ab;
        --line: #333a41;
        --bg: #15181b;
        --card: #1d2125;
        --error: #ff8a80;
        --success: #6fd08c;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

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

.page { max-width: 880px; margin: 0 auto; padding: 32px 16px 48px; }

.head h1 { margin: 0 0 4px; font-size: 1.8rem; }
.owner { margin: 0 0 12px; color: var(--muted); }
.intro { white-space: pre-wrap; }
.muted { color: var(--muted); font-weight: normal; }

h2 { font-size: 1.15rem; margin: 28px 0 12px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}
.card h2 { margin-top: 0; }

.error, .success { padding: 10px 14px; border-radius: 6px; border: 1px solid currentColor; }
.error { color: var(--error); }
.success { color: var(--success); }

.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.type {
    display: flex; flex-direction: column; gap: 2px;
    padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--card); color: var(--text); text-decoration: none;
}
.type:hover { border-color: var(--accent); }
.type.active { border-color: var(--accent); background: var(--accent-soft); }
.type-name { font-weight: 600; }
.type-duration, .type-desc { color: var(--muted); font-size: .9rem; }

.weeknav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.weeklabel { font-weight: 600; }

.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.day { display: flex; flex-direction: column; gap: 6px; }
.dayname { font-weight: 600; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.slot {
    display: block; text-align: center; padding: 6px 0;
    border: 1px solid var(--accent); border-radius: 6px; text-decoration: none;
    background: var(--card);
}
.slot:hover { background: var(--accent); color: #fff; }

.chosen .change { margin-left: 8px; font-size: .9rem; }

form label { display: block; margin: 12px 0; font-weight: 600; font-size: .95rem; }
form input:not([type=checkbox]), form textarea {
    display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
    border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit;
}
form label.check { font-weight: normal; display: flex; gap: 8px; align-items: flex-start; }
form label.check input { margin-top: 5px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.g-recaptcha { margin: 12px 0; }

button {
    padding: 10px 20px; border: 1px solid var(--accent); border-radius: 6px;
    background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
button.secondary { background: transparent; color: var(--accent); }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.details { border-collapse: collapse; width: 100%; margin-bottom: 8px; }
.details th { text-align: left; color: var(--muted); font-weight: normal; padding: 4px 16px 4px 0; vertical-align: top; width: 30%; }
.details td { padding: 4px 0; }
.pre { white-space: pre-wrap; }

.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 0 16px 24px; }

/* Verwaltung */
.page.wide { max-width: 1200px; }
.head.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.card.narrow { max-width: 420px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.inline-form label { flex: 1 1 180px; margin: 0; }
.inline-form label.small { flex: 0 0 90px; }
.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
.list th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 6px 8px; }
.list td { border-bottom: 1px solid var(--line); padding: 6px 8px; vertical-align: middle; }
.list td.actions { white-space: nowrap; }
.list td form { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 0 0; }
button.link { background: none; border: none; color: var(--accent); padding: 0; font-weight: normal; text-decoration: underline; }
button.link.danger { color: var(--error); }
label.check.small { font-weight: normal; font-size: .85rem; display: inline-flex; gap: 4px; margin: 0; }
code { font-family: Consolas, monospace; font-size: .9em; }
