.calendar-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.calendar-filters {
  display: flex;
  align-items: center;
  gap: 16px;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.filter-check input {
  width: 16px;
  height: 16px;
}

.filter-check .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.filter-check .dot.callback {
  background: #c8a03c;
}

.filter-check .dot.visit {
  background: #3b7e8c;
}

.filter-check .dot.availability {
  background: #5a9a6a;
}

/* Therapist Filter Dropdown */
.therapist-filter {
  position: relative;
}

.therapist-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(16, 16, 20, 0.15);
  background: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.therapist-filter-btn:hover {
  border-color: rgba(59, 126, 140, 0.4);
}

.therapist-filter-btn .count {
  background: var(--sea);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
}

.therapist-filter-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid rgba(16, 16, 20, 0.12);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(16, 16, 20, 0.12);
  min-width: 200px;
  z-index: 100;
  padding: 8px 0;
}

.therapist-filter-dropdown.open {
  display: block;
}

.therapist-filter-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(16, 16, 20, 0.08);
}

.therapist-filter-actions button {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(16, 16, 20, 0.15);
  background: white;
  cursor: pointer;
}

.therapist-filter-actions button:hover {
  background: rgba(59, 126, 140, 0.08);
}

.therapist-filter-list {
  max-height: 300px;
  overflow-y: auto;
}

.therapist-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}

.therapist-filter-item:hover {
  background: rgba(59, 126, 140, 0.05);
}

.therapist-filter-item input {
  width: 16px;
  height: 16px;
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: 4px;
}

.view-toggle button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(16, 16, 20, 0.15);
  background: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-toggle button:hover {
  border-color: rgba(59, 126, 140, 0.4);
}

.view-toggle button.active {
  background: var(--sea);
  color: white;
  border-color: var(--sea);
}

/* Calendar Navigation */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.calendar-nav button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(16, 16, 20, 0.15);
  background: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.calendar-nav button:hover {
  border-color: rgba(59, 126, 140, 0.4);
  color: var(--sea);
}

.calendar-nav h3 {
  margin: 0;
  min-width: 180px;
  text-align: center;
}

/* Calendar View Toggle */
.calendar-view {
  display: none;
}

.calendar-view.active {
  display: block;
}

/* ===================
   Day View Grid
   =================== */
.day-grid-outer {
  overflow-x: auto;
  border: 1px solid rgba(16, 16, 20, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
}

.day-grid-header {
  display: flex;
  min-width: 1500px;
  background: rgba(245, 245, 245, 1);
}

.header-cell {
  padding: 10px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(16, 16, 20, 0.6);
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  box-sizing: border-box;
  border-right: 1px solid rgba(16, 16, 20, 0.12);
}

.header-cell:last-child {
  border-right: none;
}

.header-cell.time-col {
  width: 75px;
  flex-shrink: 0;
}

.header-cell.actions-col {
  width: 140px;
  flex-shrink: 0;
  background: rgba(252, 248, 235, 1);
}

.header-cell.therapist-col {
  flex: 1;
  min-width: 120px;
}

.day-grid-container {
  overflow-y: auto;
  max-height: 600px;
}

.day-grid-wrapper {
  display: flex;
  min-width: 1500px;
  font-size: 14px;
}

.day-grid-column {
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(16, 16, 20, 0.12);
}

.day-grid-column:last-child {
  border-right: none;
}

.day-grid-column.time-col {
  width: 75px;
  flex-shrink: 0;
}

.day-grid-column.actions-col {
  width: 140px;
  flex-shrink: 0;
}

.day-grid-column.therapist-col {
  flex: 1;
  min-width: 120px;
}

.day-grid-column.therapist-col:nth-child(even) {
  background: rgba(16, 16, 20, 0.015);
}


.column-body {
  position: relative;
  height: 1920px;
}

.time-slots {
  display: flex;
  flex-direction: column;
}

.time-slot-row {
  height: 40px;
  border-bottom: 1px solid rgba(16, 16, 20, 0.06);
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(16, 16, 20, 0.4);
  text-align: right;
}

.time-slot-row.hour-mark {
  color: rgba(16, 16, 20, 0.6);
  font-size: 12px;
  border-bottom: 1px solid rgba(16, 16, 20, 0.12);
}

.slot-bg {
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  border-bottom: 1px solid rgba(16, 16, 20, 0.06);
}

.slot-bg.hour-mark {
  border-bottom: 1px solid rgba(16, 16, 20, 0.12);
}

.actions-col .column-body {
  background: rgba(200, 160, 60, 0.02);
}

/* ===================
   Grid Appointments
   =================== */
.grid-item {
  position: absolute;
  left: 2px;
  right: 2px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  z-index: 1;
}

.grid-item:hover {
  z-index: 10;
  box-shadow: 0 2px 8px rgba(16, 16, 20, 0.15);
  transform: scale(1.02);
}

.grid-item.callback {
  background: rgba(200, 160, 60, 0.25);
  border: 1px solid rgba(200, 160, 60, 0.5);
}

.grid-item.visit {
  background: rgba(59, 126, 140, 0.2);
  border: 1px solid rgba(59, 126, 140, 0.4);
}

.grid-item .item-type {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  opacity: 0.85;
}

.grid-item.callback .item-type {
  color: #6a4a00;
}

.grid-item.visit .item-type {
  color: #0a4a5a;
}

.grid-item .item-name {
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-item .item-detail {
  font-size: 10px;
  opacity: 0.7;
}

/* ===================
   Week View
   =================== */
.week-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(16, 16, 20, 0.08);
}

.week-table th,
.week-table td {
  padding: 8px;
  border: 1px solid rgba(16, 16, 20, 0.15);
  text-align: left;
  vertical-align: top;
  min-width: 140px;
}

.week-table td:nth-child(even) {
  background: rgba(16, 16, 20, 0.015);
}

.week-table th {
  background: rgba(16, 16, 20, 0.03);
  font-size: 12px;
  text-align: center;
  font-weight: 600;
}

.week-table th .day-name {
  color: rgba(16, 16, 20, 0.5);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.week-table th .day-date {
  font-size: 14px;
  color: rgba(16, 16, 20, 0.85);
}

.week-table td {
  height: auto;
  min-height: 180px;
}

.week-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.week-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.week-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 16, 20, 0.1);
}

.week-item.callback {
  background: rgba(200, 160, 60, 0.15);
  border-left: 3px solid #c8a03c;
}

.week-item.visit {
  background: rgba(59, 126, 140, 0.12);
  border-left: 3px solid #3b7e8c;
}

.week-item .item-time {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.7;
}

.week-item .item-info {
  font-weight: 500;
}

.week-item.callback .item-info {
  color: #6a5a20;
}

.week-item.visit .item-info {
  color: #2a5a6a;
}

/* Weekend columns */
.week-table th.weekend,
.week-table td.weekend {
  background: rgba(200, 160, 60, 0.04);
}

.week-table th.weekend .day-name {
  color: rgba(200, 160, 60, 0.8);
}

/* ===================
   Legend
   =================== */
.calendar-legend {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  font-size: 12px;
  color: rgba(16, 16, 20, 0.6);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.legend-dot.callback {
  background: rgba(200, 160, 60, 0.4);
  border: 1px solid #c8a03c;
}

.legend-dot.visit {
  background: rgba(59, 126, 140, 0.3);
  border: 1px solid #3b7e8c;
}

.legend-dot.availability {
  background: rgba(90, 154, 106, 0.3);
  border: 1px solid #5a9a6a;
}

/* ===================
   Availability Blocks
   =================== */
.availability-block {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(90, 154, 106, 0.12);
  border-left: 3px solid rgba(90, 154, 106, 0.5);
  pointer-events: none;
  z-index: 0;
  display: none;
}

.show-availability .availability-block {
  display: block;
}

.availability-block.unavailable {
  background: rgba(16, 16, 20, 0.06);
  border-left-color: rgba(16, 16, 20, 0.2);
}

.availability-block.meeting {
  background: rgba(200, 160, 60, 0.08);
  border-left-color: rgba(200, 160, 60, 0.4);
}

.availability-block.on-leave {
  background: rgba(180, 80, 80, 0.08);
  border-left-color: rgba(180, 80, 80, 0.4);
}
