.appointments-shell {
  width: min(1320px, calc(100% - 32px));
}

.appointments-topbar .page-subtitle {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.appointments-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.filter-field {
  display: grid;
  gap: 7px;
}

.filter-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(215, 168, 79, 0.14);
}

.appointment-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.appointments-board {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.calendar-panel,
.appointments-panel {
  min-width: 0;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.day-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 900;
}

.day-button small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.day-button.has-items {
  border-color: rgba(73, 194, 127, 0.56);
  background: rgba(73, 194, 127, 0.14);
  color: var(--green);
}

.day-button.has-items small {
  color: #8ee6b6;
}

.day-button.active {
  background: var(--accent);
  color: #17120a;
}

.day-button.active small {
  color: #4b3610;
}

.split-head {
  align-items: flex-start;
}

.split-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.advanced-appointments-list .appointment {
  grid-template-columns: 92px minmax(0, 1fr) minmax(140px, auto);
}

.appointment-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.appointment-side small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: right;
}

.appointment-meta .barber-pill {
  color: var(--accent);
}

.appointment-meta .payment-pill {
  color: var(--blue);
}

@media (max-width: 1080px) {
  .appointments-filters,
  .appointment-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointments-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .appointments-shell {
    width: min(100% - 20px, 1320px);
  }

  .appointments-filters,
  .appointment-summary-grid {
    grid-template-columns: 1fr;
  }

  .day-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .advanced-appointments-list .appointment {
    grid-template-columns: 1fr;
  }

  .appointment-side {
    justify-items: stretch;
  }

  .appointment-side small {
    text-align: left;
  }
}
