* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; background: #fdf8f5; color: #2c2c2a; min-height: 100vh; }

#login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { background: white; border-radius: 16px; padding: 40px; text-align: center; border: 0.5px solid #e8e0d8; width: 320px; }
.login-box .logo { font-size: 48px; margin-bottom: 16px; }
.login-box h1 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.login-box p { color: #888780; font-size: 14px; margin-bottom: 24px; }
#login-btn { background: #534ab7; color: white; border: none; border-radius: 8px; padding: 12px 24px; font-size: 14px; font-weight: 500; cursor: pointer; width: 100%; }
#login-btn:hover { background: #3c3489; }

.header { background: white; border-bottom: 0.5px solid #e8e0d8; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 100; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-small { font-size: 24px; }
.app-name { font-size: 15px; font-weight: 600; }
.app-sub { font-size: 11px; color: #888780; }
.center-nav { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.view-switcher { display: flex; gap: 4px; background: #f1efe8; border-radius: 8px; padding: 3px; }
.view-btn { background: none; border: none; border-radius: 6px; padding: 5px 14px; font-size: 12px; font-weight: 500; color: #5f5e5a; cursor: pointer; }
.view-btn.active { background: white; color: #534ab7; border: 0.5px solid #d3d1c7; }
.view-btn:hover:not(.active) { background: #e8e4dc; }
.week-nav { display: flex; align-items: center; gap: 8px; }
.nav-btn { background: none; border: 0.5px solid #d3d1c7; border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: 13px; color: #5f5e5a; }
.nav-btn:hover { background: #f1efe8; }
.week-label { font-size: 13px; font-weight: 500; min-width: 150px; text-align: center; }
.header-right { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #5f5e5a; }
#logout-btn { background: none; border: 0.5px solid #d3d1c7; border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: 12px; color: #5f5e5a; }
#logout-btn:hover { background: #f1efe8; }

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

.week-grid { display: grid; grid-template-columns: 70px repeat(5, 1fr); border: 0.5px solid #d3d1c7; border-radius: 10px; overflow: hidden; background: white; margin-bottom: 16px; }
.grid-corner { background: #f1efe8; border-bottom: 0.5px solid #d3d1c7; border-right: 0.5px solid #d3d1c7; padding: 8px; font-size: 10px; color: #888780; display: flex; align-items: center; justify-content: center; text-align: center; }
.grid-header { background: #f8f5f1; border-bottom: 0.5px solid #d3d1c7; border-right: 0.5px solid #d3d1c7; padding: 10px 8px; text-align: center; }
.grid-header:last-child { border-right: none; }
.grid-header.today { background: #eeedfe; }
.grid-header.today .day-name { color: #534ab7; }
.day-name { font-size: 12px; font-weight: 600; color: #5f5e5a; }
.day-date { font-size: 11px; color: #b4b2a9; margin-top: 2px; }
.grid-row-label { background: #f8f5f1; border-right: 0.5px solid #d3d1c7; border-bottom: 0.5px solid #e8e0d8; border-top: 0.5px solid #e8e0d8; padding: 0 8px; font-size: 10px; font-weight: 600; color: #888780; display: flex; align-items: center; justify-content: flex-end; min-height: 36px; }
.melding-cell { border-right: 0.5px solid #d3d1c7; border-bottom: 0.5px solid #d3d1c7; padding: 6px; min-height: 36px; background: #fdf8f5; }
.melding-cell:last-child { border-right: none; }
.tl-vrijdag { font-size: 10px; color: #a32d2d; font-weight: 500; margin-bottom: 2px; }
.tl-activiteit { font-size: 10px; color: #534ab7; margin-bottom: 2px; }
.timeline-cell { border-right: 0.5px solid #d3d1c7; border-bottom: 0.5px solid #e8e0d8; padding: 6px; }
.timeline-cell:last-child { border-right: none; }
.tl-bar-bg { width: 100%; background: #f1efe8; border-radius: 4px; height: 22px; position: relative; overflow: hidden; }
.tl-bar { position: absolute; height: 100%; display: flex; align-items: center; justify-content: center; }
.tl-bar-label { font-size: 9px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.school-bar { background: #1d9e75; }
.thuis-bar { background: #f09595; }
.thuis-bar .tl-bar-label { color: white; }
.oppas-open { background: #e24b4a; cursor: pointer; }
.oppas-open:hover { background: #a32d2d; }
.gizan-bar { background: #7f77dd; cursor: pointer; }
.gizan-bar:hover { background: #534ab7; }
.charlotte-bar { background: #d4537e; cursor: pointer; }
.charlotte-bar:hover { background: #993556; }
.paula-bar { background: #1d9e75; cursor: pointer; }
.paula-bar:hover { background: #0f6e56; }

.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 16px; }
.month-header { text-align: center; font-size: 11px; font-weight: 600; color: #888780; padding: 6px 0; }
.month-cell { background: white; border: 0.5px solid #e8e0d8; border-radius: 6px; padding: 5px; min-height: 80px; }
.month-cell.empty { background: transparent; border: none; min-height: 0; }
.month-cell.month-today { border-color: #7f77dd; background: #faf9ff; }
.month-cell.month-weekend { background: #f8f5f1; }
.month-day-num { font-size: 12px; font-weight: 600; color: #5f5e5a; margin-bottom: 4px; }
.month-today .month-day-num { color: #534ab7; }
.month-badge { font-size: 10px; padding: 2px 4px; border-radius: 3px; margin-bottom: 2px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.school-m { background: #e1f5ee; color: #0f6e56; }
.creche-m { background: #faeeda; color: #854f0b; }
.vrij-m { background: #fcebeb; color: #a32d2d; }
.activiteit-m { background: #eeedfe; color: #534ab7; }
.oppas-m { font-weight: 600; }
.gizan-m { background: #eeedfe; color: #534ab7; }
.charlotte-m { background: #fbeaf0; color: #993556; }
.paula-m { background: #e1f5ee; color: #0f6e56; }

.year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.year-month { background: white; border: 0.5px solid #e8e0d8; border-radius: 8px; padding: 10px; }
.year-month-title { font-size: 12px; font-weight: 600; color: #2c2c2a; margin-bottom: 6px; text-align: center; }
.year-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.year-mini-header { font-size: 8px; color: #b4b2a9; text-align: center; padding: 2px 0; font-weight: 600; }
.year-mini-cell { font-size: 9px; text-align: center; padding: 2px 1px; border-radius: 3px; color: #5f5e5a; }
.year-mini-cell.year-today { background: #534ab7; color: white; font-weight: 600; }
.year-mini-cell.year-weekend { color: #d3d1c7; }
.year-mini-cell.year-vrij { background: #fcebeb; color: #a32d2d; }
.year-mini-cell.year-activiteit { background: #eeedfe; color: #534ab7; }

.swap-section { background: white; border: 0.5px solid #d3d1c7; border-radius: 10px; padding: 14px 16px; margin-top: 16px; }
.swap-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.swap-row { display: flex; align-items: center; gap: 8px; background: #f8f5f1; border-radius: 7px; padding: 8px 10px; margin-bottom: 6px; }
.swap-info { flex: 1; }
.swap-from { font-size: 12px; font-weight: 500; }
.swap-note { font-size: 11px; color: #888780; margin-top: 2px; }
.swap-status { font-size: 11px; padding: 3px 8px; border-radius: 12px; font-weight: 500; white-space: nowrap; }
.status-pending { background: #faeeda; color: #854f0b; }
.status-accepted { background: #e1f5ee; color: #0f6e56; }
.swap-accept { font-size: 11px; color: #534ab7; cursor: pointer; font-weight: 500; padding: 4px 8px; border: 0.5px solid #7f77dd; border-radius: 5px; background: none; }
.swap-accept:hover { background: #eeedfe; }
.empty-swaps { font-size: 12px; color: #888780; padding: 4px 0; }
.add-swap-btn { margin-top: 10px; width: 100%; border: 1px dashed #d3d1c7; border-radius: 6px; padding: 8px; font-size: 12px; color: #534ab7; background: none; cursor: pointer; }
.add-swap-btn:hover { background: #eeedfe; border-color: #7f77dd; }

.ical-section { background: white; border: 0.5px solid #d3d1c7; border-radius: 10px; padding: 14px 16px; margin-top: 16px; }
.ical-hint { font-size: 12px; color: #888780; margin-bottom: 10px; }
.ical-input-row { display: flex; gap: 8px; align-items: center; }
.ical-input-row .modal-input { flex: 1; }
.ical-event { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 0.5px solid #e8e0d8; }
.ical-event:last-child { border-bottom: none; }
.ical-date { font-size: 11px; color: #888780; min-width: 50px; font-weight: 500; }
.ical-summary { font-size: 12px; color: #2c2c2a; }
.ical-vrij { color: #a32d2d; font-weight: 500; }

.gcal-section { background: white; border: 0.5px solid #d3d1c7; border-radius: 10px; padding: 14px 16px; margin-top: 16px; margin-bottom: 32px; }
.gcal-status-row { font-size: 12px; color: #5f5e5a; margin-top: 8px; }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.35); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal { background: white; border-radius: 12px; padding: 20px; width: 340px; max-width: 95vw; border: 0.5px solid #d3d1c7; }
.modal-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.modal-row { margin-bottom: 12px; }
.modal-label { font-size: 12px; color: #5f5e5a; margin-bottom: 4px; display: block; }
.modal-select, .modal-input { width: 100%; padding: 7px 10px; border: 0.5px solid #d3d1c7; border-radius: 6px; font-size: 13px; background: white; color: #2c2c2a; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.btn-primary { background: #534ab7; color: white; border: none; border-radius: 7px; padding: 9px 16px; font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-primary:hover { background: #3c3489; }
.btn-secondary { flex: 1; background: none; border: 0.5px solid #d3d1c7; border-radius: 7px; padding: 9px; font-size: 13px; color: #5f5e5a; cursor: pointer; }
.btn-secondary:hover { background: #f1efe8; }
.btn-danger { flex: 1; background: none; border: 0.5px solid #f09595; border-radius: 7px; padding: 9px; font-size: 13px; color: #a32d2d; cursor: pointer; }
.btn-danger:hover { background: #fcebeb; }
.modal-actions .btn-primary { flex: 1; }

@media (max-width: 700px) {
  .year-grid { grid-template-columns: repeat(2, 1fr); }
  .header { flex-wrap: wrap; gap: 8px; }
  .week-grid { grid-template-columns: 50px repeat(5, 1fr); }
  .ical-input-row { flex-direction: column; }
}
