.schedules-page{max-width:1180px;margin:0 auto;padding:24px}.split-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.schedule-summary-card{min-width:220px;padding:18px;border-radius:22px;background:rgba(15,23,42,.52);border:1px solid rgba(148,163,184,.22);box-shadow:0 16px 38px rgba(2,6,23,.18)}.schedule-summary-card span,.schedule-summary-card small{display:block;color:var(--muted-text,#94a3b8)}.schedule-summary-card strong{display:block;font-size:2rem;margin:6px 0}.schedule-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field-wrap{display:flex;flex-direction:column;gap:8px}.field-wrap label{font-weight:800}.field-wrap input,.field-wrap select,.field-wrap textarea,.schedule-filter-row input,.schedule-filter-row select{width:100%;border:1px solid rgba(148,163,184,.28);background:rgba(15,23,42,.7);color:#e5e7eb;border-radius:16px;padding:12px 14px;outline:none}.field-wrap textarea{min-height:110px;resize:vertical}.field-full{grid-column:1/-1}.schedule-actions,.schedule-filter-row,.schedule-toolbar-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:18px}.schedule-filter-row input{flex:1 1 320px}.schedule-filter-row select{flex:0 1 220px}.schedule-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.schedule-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-top:18px}.calendar-weekday{font-weight:900;text-align:center;color:var(--muted-text,#94a3b8);font-size:.82rem;text-transform:uppercase}.calendar-day{min-height:106px;border:1px solid rgba(148,163,184,.22);border-radius:18px;padding:10px;background:rgba(15,23,42,.38);display:flex;flex-direction:column;gap:6px}.calendar-day.outside{opacity:.42}.calendar-day.today{outline:2px solid rgba(59,130,246,.8)}.calendar-day strong{font-size:.9rem}.calendar-pill{display:block;border-radius:999px;padding:5px 7px;font-size:.72rem;font-weight:900;background:rgba(59,130,246,.18);color:#bfdbfe;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid rgba(96,165,250,.22)}.schedule-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-top:18px}.schedule-card{border:1px solid rgba(148,163,184,.22);background:rgba(15,23,42,.54);border-radius:22px;padding:16px;box-shadow:0 16px 36px rgba(2,6,23,.18);display:flex;flex-direction:column;gap:12px}.schedule-card-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.schedule-card h4{margin:0;font-size:1.05rem}.schedule-card p{margin:0;color:var(--muted-text,#94a3b8)}.schedule-chip-row{display:flex;flex-wrap:wrap;gap:8px}.schedule-chip{font-size:.78rem;font-weight:800;border-radius:999px;padding:6px 9px;background:rgba(59,130,246,.16);color:#bfdbfe;border:1px solid rgba(96,165,250,.25)}.schedule-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}.schedule-empty{grid-column:1/-1;text-align:center;color:var(--muted-text,#94a3b8);padding:30px;border:1px dashed rgba(148,163,184,.35);border-radius:20px}.schedule-pro-gate.hidden,.hidden{display:none!important}body.light-theme .field-wrap input,body.light-theme .field-wrap select,body.light-theme .field-wrap textarea,body.light-theme .schedule-filter-row input,body.light-theme .schedule-filter-row select{background:#fff;color:#0f172a;border-color:#cbd5e1}body.light-theme .schedule-card,body.light-theme .calendar-day,body.light-theme .schedule-summary-card{background:#fff;border-color:#dbe4ef;box-shadow:0 12px 28px rgba(15,23,42,.08)}body.light-theme .schedule-chip,body.light-theme .calendar-pill{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe}@media(max-width:760px){.schedules-page{padding:16px}.split-head,.schedule-toolbar{display:block}.schedule-summary-card{margin-top:14px}.schedule-form-grid{grid-template-columns:1fr}.schedule-calendar{gap:5px}.calendar-weekday{font-size:.68rem}.calendar-day{min-height:76px;border-radius:12px;padding:7px}.calendar-pill{font-size:.65rem;padding:4px 5px}.schedule-filter-row{display:block}.schedule-filter-row input,.schedule-filter-row select{margin-bottom:10px}.schedule-actions button,.schedule-toolbar-actions button{width:100%}}
.calendar-day{appearance:none;text-align:left;cursor:pointer;color:inherit}
.calendar-day:hover{transform:translateY(-1px);border-color:rgba(96,165,250,.55)}
.auto-chip{background:rgba(16,185,129,.16)!important;color:#a7f3d0!important;border-color:rgba(52,211,153,.25)!important}
.auto-schedule-card{border-color:rgba(52,211,153,.28)}
.schedule-note{font-size:.78rem;color:var(--muted-text,#94a3b8);align-self:center}
.schedule-day-modal.hidden{display:none!important}
.schedule-day-modal{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:18px}
.schedule-day-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.76);backdrop-filter:blur(12px)}
.schedule-day-card{position:relative;width:min(940px,100%);max-height:88vh;overflow:auto;border-radius:28px;border:1px solid rgba(148,163,184,.28);background:#0f172a;color:#e5e7eb;box-shadow:0 28px 90px rgba(0,0,0,.45);padding:22px}
.schedule-day-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}
.schedule-day-header h2{margin:4px 0}
.schedule-day-header p{margin:0;color:var(--muted-text,#94a3b8)}
.schedule-day-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
body.light-theme .schedule-day-card{background:#f8fafc;color:#0f172a;border-color:#dbe4ef}
@media(max-width:760px){.schedule-day-modal{align-items:flex-end;padding:0}.schedule-day-card{width:100%;max-height:86vh;border-radius:24px 24px 0 0;padding:16px}.schedule-day-header{display:block}.schedule-day-header button{width:100%;margin-top:12px}.schedule-day-list{grid-template-columns:1fr}}


/* Rev 1.3.8 - Stable calendar sizing when days contain many schedule items */
.schedule-calendar,
.calendar-grid,
#scheduleCalendar {
  align-items: stretch;
}

#scheduleCalendar {
  grid-auto-rows: minmax(118px, 118px);
}

.calendar-day {
  min-height: 118px;
  max-height: 118px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

.calendar-day strong {
  flex: 0 0 auto;
  font-size: 0.82rem;
  line-height: 1;
}

.calendar-pill {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 18px;
  max-height: 18px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.66rem;
  line-height: 18px;
  padding: 0 6px;
}

.calendar-pill.more-pill {
  font-weight: 700;
  text-align: center;
  opacity: 0.95;
}

@media (max-width: 760px) {
  #scheduleCalendar {
    grid-auto-rows: minmax(86px, 86px);
  }

  .calendar-day {
    min-height: 86px;
    max-height: 86px;
    padding: 5px;
    gap: 3px;
  }

  .calendar-day strong {
    font-size: 0.72rem;
  }

  .calendar-pill {
    min-height: 15px;
    max-height: 15px;
    line-height: 15px;
    font-size: 0.56rem;
    padding: 0 4px;
  }
}

@media (max-width: 430px) {
  #scheduleCalendar {
    grid-auto-rows: minmax(74px, 74px);
  }

  .calendar-day {
    min-height: 74px;
    max-height: 74px;
    padding: 4px;
  }

  .calendar-pill {
    font-size: 0.52rem;
  }
}
