.cal-section { margin-top: 1.5rem; }
.cal-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  margin-bottom: 1rem; justify-content: space-between;
}
.cal-toolbar .left, .cal-toolbar .right { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.cal-toolbar button, .cal-toolbar .view-btn {
  font: inherit; font-size: 0.85rem; padding: 0.4rem 0.75rem;
  border: 1px solid var(--line, #d0d8e0); background: #fff; border-radius: 8px; cursor: pointer;
}
.cal-toolbar button:hover, .cal-toolbar .view-btn:hover { border-color: var(--petrol, #2a5f6e); }
.cal-toolbar .view-btn.active { background: var(--petrol, #2a5f6e); color: #fff; border-color: transparent; }
.cal-title { font-weight: 700; font-size: 1.05rem; color: var(--petrol-dark, #1e4652); min-width: 10rem; text-align: center; }

.cal-legend { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.85rem; }
.cal-legend span::before {
  content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px;
  margin-right: 0.35rem; vertical-align: -1px;
}
.leg-free::before { background: #2e7d32; }
.leg-pending::before { background: #f9a825; }
.leg-booked::before { background: #c62828; }
.leg-blocked::before { background: #b0bec5; }

.cal-month {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  font-size: 0.8rem;
}
.cal-month .dow { text-align: center; font-weight: 600; color: var(--muted); padding: 0.35rem 0; }
.cal-day-cell {
  min-height: 4.2rem; background: #f7f9fb; border: 1px solid var(--line, #e0e6ec);
  border-radius: 8px; padding: 0.3rem; cursor: default;
}
.cal-day-cell.other { opacity: 0.4; }
.cal-day-cell.open-day { background: #e8f5e9; border-color: #a5d6a7; cursor: pointer; }
.cal-day-cell.open-day:hover { outline: 2px solid #2e7d32; }
.cal-day-cell.selected-day { outline: 2px solid var(--petrol, #2a5f6e); background: #e3f2fd; }
.cal-day-num { font-weight: 700; font-size: 0.85rem; }
.cal-day-hint { font-size: 0.68rem; color: #2e7d32; margin-top: 0.2rem; line-height: 1.2; }

.cal-week-grid { display: grid; gap: 0.65rem; }
@media (min-width: 700px) {
  .cal-week-grid { grid-template-columns: repeat(3, 1fr); }
}
.cal-week-day {
  border: 1px solid var(--line, #d0d8e0); border-radius: 10px; padding: 0.65rem 0.75rem; background: #fff;
}
.cal-week-day h4 { margin: 0 0 0.45rem; font-size: 0.9rem; }
.slot-btn {
  display: block; width: 100%; text-align: left; margin: 0.2rem 0; padding: 0.35rem 0.5rem;
  border-radius: 6px; border: 1px solid transparent; font-size: 0.8rem; cursor: pointer; font: inherit;
}
.slot-btn.free { background: #e8f5e9; color: #1b5e20; }
.slot-btn.free:hover { outline: 2px solid #2e7d32; }
.slot-btn.pending { background: #fff8e1; color: #f57f17; cursor: not-allowed; }
.slot-btn.booked { background: #ffebee; color: #c62828; cursor: not-allowed; text-decoration: line-through; }
.slot-btn.blocked { background: #eceff1; color: #90a4ae; cursor: not-allowed; }
.slot-btn.selected { outline: 2px solid var(--petrol); background: var(--petrol); color: #fff; }

.cal-request {
  display: none; margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 12px;
  background: #f0f6f8; border: 1px solid var(--line, #cfd8dc);
}
.cal-request.open { display: block; }
.cal-request label { display: block; font-size: 0.82rem; font-weight: 600; margin: 0.45rem 0 0.2rem; }
.cal-request input, .cal-request textarea {
  width: 100%; padding: 0.45rem 0.55rem; border: 1px solid #c5d0d8; border-radius: 8px; font: inherit; font-size: 0.9rem;
}
.cal-request textarea { min-height: 80px; resize: vertical; }
.cal-request .hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }
.cal-rules {
  font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.9rem; background: #f7f9fb; border-radius: 10px; border-left: 4px solid var(--petrol, #2a5f6e);
}
.cal-rules strong { color: var(--petrol-dark, #1e4652); }
.admin-box {
  margin-top: 1.5rem; padding: 1rem; border: 1px dashed #90a4ae; border-radius: 10px; background: #fafafa;
  font-size: 0.85rem;
}
.admin-box h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.admin-box textarea { width: 100%; min-height: 100px; font-family: ui-monospace, monospace; font-size: 0.75rem; }
.year-strip { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.75rem; }
.year-strip button { font-size: 0.75rem; padding: 0.3rem 0.5rem; border-radius: 6px; border: 1px solid #cfd8dc; background: #fff; cursor: pointer; }
.year-strip button.has { background: #e8f5e9; border-color: #a5d6a7; }
.year-strip button.cur { background: var(--petrol); color: #fff; border-color: transparent; }


/* Belegungsanzeige im Monatskalender */
.cal-day-cell.day-all-booked {
  background: #ffebee !important;
  border-color: #ef9a9a !important;
  cursor: pointer;
}
.cal-day-cell.day-all-booked .cal-day-num { color: #b71c1c; }
.cal-day-cell.day-partial {
  background: #fff8e1;
  border-color: #ffe082;
  cursor: pointer;
}
.cal-day-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 0.25rem;
}
.cal-day-bar {
  height: 7px;
  border-radius: 3px;
  background: #cfd8dc;
  overflow: hidden;
  position: relative;
}
.cal-day-bar .fill {
  height: 100%;
  border-radius: 3px;
}
.cal-day-bar.na { opacity: 0.25; }
.cal-day-bar .fill.free { background: #66bb6a; width: 100%; }
.cal-day-bar .fill.full { background: #e53935; width: 100%; }
.cal-day-bar .fill.part { background: #e53935; }
.cal-day-bar-label {
  font-size: 0.62rem;
  line-height: 1.15;
  margin-top: 0.15rem;
  color: #546e7a;
}
.cal-day-cell.day-all-booked .cal-day-bar-label { color: #c62828; font-weight: 600; }


.gender-note {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--muted, #6b7c85);
  letter-spacing: 0.01em;
}