/* Month grid and per-room day timeline. */

.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; color: var(--muted-2); cursor: pointer;
  background: #F4F1EA; user-select: none;
}
.month-label { font-size: 17px; font-weight: 800; min-width: 150px; text-align: center; }
.today-btn { font-size: 12px; font-weight: 600; color: var(--accent); cursor: pointer; padding: 6px 11px; border-radius: 9px; border: 1px solid #ECDBB4; }
.today-btn:hover { background: var(--warn-bg); }

.weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.weekday { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }

.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day-cell {
  position: relative; min-height: 88px; padding: 8px; border-radius: 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; transition: all .12s;
  border: 1px solid #EDEAE3; background: #fff;
}
.day-cell:hover { border-color: var(--accent); }
.day-cell.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.day-cell-head { display: flex; align-items: center; justify-content: space-between; }
.day-num { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; color: var(--ink); }
.day-num.today { border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; }
.day-more { font-size: 11px; color: var(--danger-fg); font-weight: 700; }
.day-bars { display: flex; flex-direction: column; gap: 3px; margin-top: auto; }
.day-bar { height: 6px; border-radius: 4px; }
.day-bar.approved { background: var(--green); }
.day-bar.pending { background: var(--accent); }

.legend { display: flex; gap: 18px; margin-top: 14px; font-size: 12px; color: var(--muted-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 14px; height: 6px; border-radius: 3px; }

/* Day timeline */
.timeline-card { overflow-x: auto; }
.timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.timeline-inner { min-width: 680px; }
.timeline-hours-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.timeline-rowlabel { width: 150px; flex: none; }
.timeline-cols { display: grid; gap: 6px; flex: 1; }
.timeline-hour { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; }
.timeline-rooms { display: flex; flex-direction: column; gap: 10px; }
.timeline-room { display: flex; gap: 8px; align-items: stretch; }
.timeline-room-label {
  width: 150px; flex: none; padding-right: 10px; display: flex; flex-direction: column;
  justify-content: center; border-right: 3px solid;
}
.tl-cell {
  min-height: 60px; border-radius: 10px; display: flex; flex-direction: column;
  justify-content: center; cursor: pointer; overflow: hidden;
}
.tl-cell.free { align-items: center; background: #fff; border: 1px dashed #E0DCD3; color: #CBC5BA; font-size: 16px; }
.tl-cell.booked { padding: 7px 8px; gap: 2px; }
.tl-cell.booked.approved { background: var(--ok-bg); border: 1px solid #CFE6D8; color: var(--ok-fg); }
.tl-cell.booked.pending { background: var(--warn-bg); border: 1px solid #ECDBB4; color: var(--warn-fg); }
.tl-cell:hover { filter: brightness(.97); }
.tl-cell.free.locked { cursor: not-allowed; border-style: solid; background: repeating-linear-gradient(45deg, #F7F5F1, #F7F5F1 6px, #F1EEE8 6px, #F1EEE8 12px); }
.timeline-room.locked .timeline-room-label .room-meta { color: var(--danger-fg); }
.tl-title { font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-time { font-size: 10px; opacity: .85; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .cal-toolbar { gap: 10px; }
  .month-label { font-size: 15px; min-width: 0; }
  .nav-btn { width: 30px; height: 30px; font-size: 18px; }

  .weekday-row, .month-grid { gap: 4px; }
  .weekday { font-size: 10px; }
  .day-cell { min-height: 56px; padding: 5px; border-radius: 9px; gap: 3px; }
  .day-num { width: 22px; height: 22px; font-size: 12px; }
  .day-num.today { font-size: 11px; }
  .day-more { font-size: 10px; }
  .day-bars { gap: 2px; }
  .day-bar { height: 4px; }
  .legend { gap: 12px; flex-wrap: wrap; }

  /* Timeline stays scrollable, just tighter. */
  .timeline-inner { min-width: 560px; }
  .timeline-rowlabel, .timeline-room-label { width: 108px; }
  .tl-cell { min-height: 52px; }
}
