.studio-schedule-area {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.schedule-head, .schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.schedule-head p:last-child { color: var(--muted); margin-top: 6px; }
.schedule-toolbar h2 { text-transform: capitalize; }
.schedule-board, .schedule-detail { display: grid; gap: 14px; }
.schedule-detail > h2 { margin-bottom: 0; }
.schedule-detail:focus { outline: none; }
#schedule-area .schedule-detail > * + * { margin-top: 0; }

#finance-area .finance-tabs,
#finance-area .finance-filters { justify-content: flex-start; }

#finance-area .finance-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  padding: 10px;
}
#finance-area .finance-tabs .studio-button {
  min-width: 0;
  margin: 0;
  justify-content: center;
  text-align: center;
}

#finance-area .finance-task > [data-finance-action="back"] { justify-self: start; }
#finance-area .finance-task > h2:focus { outline: none; }

.schedule-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  align-items: end;
  gap: 9px;
  background: var(--wash);
  border-radius: 12px;
  padding: 12px;
}

.schedule-filters .studio-button { justify-self: start; }
.schedule-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }

.schedule-calendar {
  display: grid;
  grid-template-columns: repeat(var(--schedule-columns, 7), minmax(0, 1fr));
  min-width: calc(var(--schedule-columns, 7) * 90px);
  background: var(--line);
  gap: 1px;
}

.schedule-weekday {
  text-align: center;
  padding: 9px;
  background: #e8f0ec;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 750;
}

.schedule-cell {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  min-height: 105px;
  min-width: 0;
  background: var(--paper);
}

.schedule-calendar[data-calendar-mode="week"] .schedule-cell { min-height: 220px; }
.schedule-calendar[data-calendar-mode="month"] .schedule-cell[data-outside="true"] { background: #f6f9f7; }

.schedule-cell .studio-button {
  align-self: flex-start;
  padding: 2px 6px;
  min-width: 29px;
  min-height: 29px;
  border-color: transparent;
}

.schedule-cell .studio-button[aria-current="date"] { background: var(--green); color: #fff; }

.schedule-event {
  width: 100%;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--schedule-event-color, #47806c);
  border-radius: 7px;
  background: #eef5f1;
  color: var(--ink);
  font: inherit;
  font-size: .8rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.schedule-event:focus-within, .schedule-event:hover { background: #e1eee6; }
.schedule-event[data-state="cancelled"], .schedule-event[data-state="declined"] { background: #f4f5f4; color: var(--muted); }
.schedule-event-open {
  display: grid;
  gap: 2px;
  flex: 1 1 100%;
  min-width: 0;
  border: 0;
  padding: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.schedule-event-actions { display: flex; gap: 4px; margin-left: auto; }
.schedule-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.schedule-icon:hover { border-color: var(--line); background: var(--paper); }
.schedule-icon[data-schedule-action="cancel-appointment"] { color: #962b3c; }
.schedule-icon svg { width: 17px; height: 17px; pointer-events: none; }
.schedule-event-time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.schedule-event-description { display: grid; gap: 3px; min-width: 0; }
.schedule-event-description small { color: var(--muted); font-size: .76rem; }
.schedule-event-description .schedule-conflict-label, .schedule-conflict-label { color: #962b3c; font-weight: 750; }
.schedule-list { display: grid; gap: 14px; }
.schedule-list-day { display: grid; gap: 7px; padding-block: 2px 4px; }
.schedule-list-day h3 { margin: 0; font-size: .94rem; text-transform: capitalize; }
.schedule-list-day h3[aria-current="date"] { color: var(--green); }
.schedule-list-day .schedule-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 7px 9px;
  font-size: .92rem;
}
.schedule-list-day .schedule-event-open {
  grid-template-columns: minmax(95px, max-content) minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
}
.schedule-legacy > summary { cursor: pointer; color: var(--muted); }
.schedule-legacy > div { margin-top: 9px; }
.schedule-empty-day {
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid #b55259;
  border-radius: 7px;
  background: #fbefef;
  color: #843943;
  font-size: .87rem;
}
.schedule-payment-chip {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f9ecd6;
  color: #784c19;
  font-size: .76rem;
  font-weight: 700;
}
.schedule-payment-chip[data-paid="true"] { background: #d9eee1; color: #245a40; }
.schedule-payment-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 15px;
  padding: 12px;
  border-radius: 10px;
  background: var(--wash);
}
.schedule-payment-detail p { margin: 3px 0 0; }
.schedule-billing { gap: 10px 14px; }
.schedule-billing p { margin: 0; }
.schedule-choices { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.schedule-choices legend { font-weight: 650; padding-inline: 4px; }
.schedule-types { list-style: none; padding: 0; display: grid; gap: 7px; }
.schedule-types li { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; background: var(--wash); border-radius: 8px; }
.working-hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.working-hours-day { min-width: 0; margin: 0; padding: 9px; border: 1px solid var(--line); border-radius: 9px; }
.working-hours-day legend { padding-inline: 4px; font-weight: 700; }
.working-hours-day:disabled { opacity: .55; }
.working-hours-bands:not([hidden]) { display: grid; gap: 8px; margin-top: 8px; }
.working-hours-period { padding-top: 6px; border-top: 1px solid var(--line); }
.working-hours-form .working-hours-switch { display: flex; align-items: center; gap: 7px; }
.working-hours-form .working-hours-switch input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--coach-accent); }
.working-hours-band { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 5px; }
.working-hours-band input { width: 100%; min-width: 0; }
.working-hours-band input:disabled { opacity: .48; }

@media (max-width: 600px) {
  #finance-area .finance-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-toolbar { align-items: flex-start; }
  .schedule-detail .studio-form-grid { grid-template-columns: minmax(0, 1fr); }
  .schedule-list-day .schedule-event-open { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
