:root {
    --bg: #f7f7f5;
    --card-bg: #ffffff;
    --text: #1f2430;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #2563eb;
    --danger: #dc2626;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

header.topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

header.topbar nav a {
    margin-right: 16px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

header.topbar nav a:hover { color: var(--accent); }

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: white;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.btn.secondary {
    background: white;
    color: var(--accent);
}

.btn.danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn[disabled], .btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

input, select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    margin-top: 4px;
}

label { font-weight: 500; font-size: 14px; }

.field { margin-bottom: 14px; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 90px;
    padding: 6px;
    font-size: 12px;
}

.calendar-day .daynum { color: var(--muted); font-size: 11px; }

.event-pill {
    display: block;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 5px;
    color: white;
    font-size: 11px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weekday-header {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding-bottom: 4px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge.angemeldet { background: #dcfce7; color: #166534; }
.badge.abgemeldet { background: #fee2e2; color: #991b1b; }
.badge.keine_rueckmeldung { background: #f3f4f6; color: #4b5563; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); font-size: 14px; }

.muted { color: var(--muted); font-size: 13px; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.info { background: #eff6ff; color: #1e40af; }
