.agenda-heading { margin-bottom: 16px; }
.calendar-toolbar { padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.period-navigation { display: flex; align-items: center; gap: 7px; }
.period-navigation h2 { font-size: 14px; font-weight: 800; margin: 0 9px; }
.period-navigation .icon-button { width: 29px; height: 30px; }
.toolbar-right { display: flex; gap: 10px; align-items: center; }
.segmented { display: flex; padding: 3px; background: var(--surface-muted); border-radius: 7px; gap: 2px; }
.segmented button { border: 0; padding: 6px 13px; border-radius: 5px; background: transparent; color: var(--text-muted); font-size: 10px; font-weight: 650; }
.segmented button.selected { background: white; color: var(--primary); box-shadow: 0 1px 4px #25324712; }
.calendar-filters { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border); padding: 8px 18px; }
.room-filter { display: flex; align-items: center; gap: 10px; }
.filter-caption { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); }
.filter-caption .icon { width: 16px; height: 16px; }
.room-filter select { width: 180px; min-height: 32px; padding: 6px 9px; font-size: 10px; border-color: var(--border); }
.search-field { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.search-field .icon { width: 16px; height: 16px; color: var(--text-subtle); }
.search-field input { border: 0; padding: 5px; min-height: 30px; font-size: 10px; width: 195px; background: transparent; }
.calendar-filters > .icon-button { width: 30px; height: 30px; }
.calendar-scroll { overflow: auto; max-height: 650px; scrollbar-width: thin; }
.calendar-grid { min-width: calc(56px + var(--days) * 105px); }
.calendar-day-head, .calendar-body { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); }
.calendar-day-head { position: sticky; top: 0; z-index: 5; background: white; border-bottom: 1px solid var(--border); }
.time-zone { font-size: 8px; color: var(--text-subtle); display: flex; justify-content: center; align-items: center; }
.day-heading { min-height: 56px; padding: 5px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; gap: 2px; border-left: 1px solid var(--border-subtle); }
.day-heading > span { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .7px; }
.day-heading > strong { font-size: 19px; font-weight: 650; line-height: 30px; width: 31px; text-align: center; }
.day-heading.is-today { background: #f5fbfb; }
.day-heading.is-today > strong { border-radius: 9px; background: var(--primary); color: white; }
.day-heading.is-today > span { color: var(--primary); }
.day-heading em { position: absolute; right: 8px; top: 9px; color: var(--primary); font-size: 8px; font-weight: 700; font-style: normal; }
.calendar-body { position: relative; }
.time-axis { background: white; }
.time-axis > div { height: var(--hour-height); padding-top: 5px; text-align: center; font-size: 9px; color: var(--text-subtle); }
.day-column { position: relative; min-width: 0; border-left: 1px solid var(--border-subtle); }
.day-column.is-today { background: #f7fcfc; }
.time-slot { height: var(--hour-height); display: block; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--border-subtle); padding: 0; text-align: center; position: relative; }
.time-slot::after { content: ""; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px dashed #f1f3f6; pointer-events: none; }
.time-slot > span { display: none; color: var(--primary); }
.time-slot:hover, .time-slot:focus-visible { background: #e8f8f880; }
.time-slot:hover > span, .time-slot:focus-visible > span { display: inline-flex; }
.time-slot:focus-visible { z-index: 4; outline-offset: -3px; }
.calendar-event { position: absolute; display: flex; flex-direction: column; align-items: flex-start; padding: 4px 6px; background: var(--tone-bg); color: var(--tone-color); border: 1px solid transparent; border-left: 3px solid var(--tone-line); border-radius: 5px; text-align: left; z-index: 2; overflow: hidden; transition: box-shadow .15s, filter .15s; }
.calendar-event:hover { filter: saturate(1.3); box-shadow: 0 3px 12px #25324717; z-index: 3; }
.calendar-event strong { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 750; line-height: 1.5; }
.calendar-event > span { font-size: 9px; white-space: nowrap; margin-top: 2px; }
.calendar-event small { font-size: 8px; margin-top: auto; overflow: hidden; text-overflow: ellipsis; width: 100%; white-space: nowrap; opacity: .9; }
.calendar-event.compact { padding: 2px 5px; }
.calendar-event.compact > span { display: none; }
.now-line { position: absolute; left: 0; right: 0; height: 1px; background: var(--coral); z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.calendar-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 9px; color: var(--text-muted); }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.legend > span, .calendar-footer > span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-footer .icon { width: 12px; height: 12px; }
.calendar-tip { margin: 13px 2px 0; display: flex; align-items: center; gap: 7px; color: var(--text-subtle); font-size: 10px; }
.calendar-tip .icon { width: 14px; height: 14px; }
@media (max-width: 1100px) {
  .calendar-toolbar { flex-wrap: wrap; padding: 12px; }
  .period-navigation h2 { font-size: 12px; }
  .day-heading em { display: none; }
  .calendar-filters { padding: 10px 16px; }
}
@media (max-width: 760px) {
  .calendar-toolbar { gap: 12px; }
  .period-navigation { width: 100%; }
  .period-navigation h2 { flex: 1; font-size: 11px; margin: 0 3px; }
  .toolbar-right { margin-left: auto; }
  .calendar-filters { flex-wrap: wrap; gap: 10px; }
  .room-filter { flex: 1; }
  .room-filter select { width: 100%; }
  .search-field { order: 3; width: 100%; border-top: 1px solid var(--border-subtle); padding-top: 6px; }
  .search-field input { width: 100%; }
  .calendar-footer { flex-wrap: wrap; gap: 10px; }
  .calendar-scroll { max-height: 550px; }
  .calendar-tip { align-items: flex-start; line-height: 1.7; }
}
