* { box-sizing: border-box; }
body {
    font-family: -apple-system, Segoe UI, Roboto, sans-serif;
    color: #1c1c1c;
    background: #fafafa;
    margin: 0;
    padding: 0 16px 40px;
}

/* ---- Login ---- */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0 16px;
}
.login-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 32px;
    width: 100%;
    max-width: 360px;
}
.login-box h1 { font-size: 1.2rem; margin: 0 0 4px; }
.login-box .hint { color: #666; margin: 0 0 16px; font-size: 0.9rem; }
.login-box label { display: block; margin-top: 12px; font-weight: 600; font-size: 0.9rem; }
.login-box input {
    width: 100%; padding: 10px; margin-top: 4px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 1rem;
}
.login-box button {
    width: 100%; margin-top: 20px; padding: 10px;
    background: #0082c9; color: #fff; border: none; border-radius: 6px;
    font-size: 1rem; cursor: pointer;
}
.login-box button:hover { background: #006aa3; }
.error { color: #c62828; font-weight: 600; font-size: 0.9rem; }

/* ---- Kalender ---- */
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 0; flex-wrap: wrap; gap: 8px;
}
.topbar h1 { font-size: 1.2rem; margin: 0; }
.user-info { font-size: 0.9rem; color: #444; }
.user-info a { color: #0082c9; }

.month-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px; font-size: 1rem;
}
.month-nav a { color: #0082c9; text-decoration: none; }
.month-nav a:hover { text-decoration: underline; }

.legende { font-size: 0.85rem; color: #555; margin: 8px 0 16px; }
.badge {
    display: inline-block; width: 12px; height: 12px; border-radius: 3px;
    margin-right: 4px; vertical-align: middle;
}
.badge.frei { background: #e8f5e9; border: 1px solid #a5d6a7; }
.badge.gesperrt { background: #eee; border: 1px solid #ccc; }

table.kalender {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    font-size: 0.92rem;
}
table.kalender th, table.kalender td {
    border-bottom: 1px solid #eee;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}
table.kalender th { background: #f5f5f5; font-size: 0.85rem; }
table.kalender tr.samstag { background: #fbfbf5; }
table.kalender tr.gesperrt { background: #f0f0f0; color: #999; }
table.kalender td.hinweis { font-size: 0.85rem; color: #555; }

td.slot { min-width: 140px; }
.checkbox input { width: 18px; height: 18px; }
.namen { font-size: 0.8rem; color: #444; margin-top: 4px; }

.status { min-height: 1.2em; font-size: 0.85rem; color: #2e7d32; }

@media (max-width: 640px) {
    table.kalender, table.kalender thead, table.kalender tbody, table.kalender th, table.kalender td, table.kalender tr {
        display: block;
    }
    table.kalender thead { display: none; }
    table.kalender tr {
        margin-bottom: 10px; border: 1px solid #eee; border-radius: 6px; padding: 6px;
    }
    table.kalender td { border: none; padding: 4px 6px; }
    table.kalender td::before {
        content: attr(data-label);
        font-weight: 600; display: block; font-size: 0.75rem; color: #888;
    }
}
