.calendar-occurrence-editor,
.calendar-recurrence-editor {
  margin: 18px 0;
  border: 1px solid #4a3a1d;
  border-radius: 15px;
  background: linear-gradient(145deg, #18140d, #121216 62%);
  padding: 14px;
}

.calendar-occurrence-editor > header,
.calendar-recurrence-editor > header {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.calendar-occurrence-editor > header b,
.calendar-recurrence-editor > header b {
  font-size: 14px;
  color: #f5d481;
}

.calendar-occurrence-editor > header span,
.calendar-recurrence-editor > header span {
  font-size: 11px;
  color: #aaa59b;
}

.calendar-occurrence-editor .form-grid,
.calendar-recurrence-editor .form-grid {
  margin: 0;
}

.calendar-series-notice {
  display: grid;
  gap: 2px;
  border: 1px solid #38556d;
  background: #101d27;
  color: #acd7f5;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 14px;
}

.calendar-series-notice span,
.calendar-recurrence-editor label > small {
  font-size: 10px;
  color: #91a9ba;
}

.calendar-weekday-picker {
  border: 0;
  padding: 0;
  margin: 14px 0 0;
}

.calendar-weekday-picker legend {
  font-size: 13px;
  font-weight: 900;
  color: #c8c2b7;
  margin-bottom: 5px;
}

.calendar-weekday-picker > p {
  margin: 0 0 10px;
  color: #aaa59b;
  font-size: 11px;
  line-height: 1.5;
}

.calendar-weekday-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.calendar-weekday-presets button {
  border: 1px solid #4d463b;
  border-radius: 999px;
  background: #1b1b20;
  color: #d7d1c6;
  padding: 7px 11px;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.calendar-weekday-presets button:hover,
.calendar-weekday-presets button:focus-visible {
  border-color: var(--gold);
  color: #ffd16b;
}

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

.calendar-weekday-options label {
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #18181c;
  min-height: 58px;
  padding: 7px 3px;
  cursor: pointer;
}

.calendar-weekday-options input {
  width: 18px;
  height: 18px;
  margin: 0 0 3px;
}

.calendar-weekday-options span {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-weekday-options label:has(input:checked) {
  border-color: var(--gold);
  background: #2b200c;
  color: #ffd16b;
}

.calendar-recurrence-preview {
  margin: 12px 0 0;
  border-radius: 10px;
  background: #0e0e11;
  padding: 10px;
  color: #c3b895;
  font-size: 11px;
}

.calendar-series-edit-help {
  margin: 8px 0 0;
  border: 1px solid #2f654c;
  border-radius: 10px;
  background: #102119;
  color: #9fe0be;
  padding: 10px;
  font-size: 11px;
  line-height: 1.45;
}

.calendar-recurrence-editor [hidden] {
  display: none !important;
}

.production-master-schedule {
  margin-bottom: 30px;
  border: 1px solid #4a3a1d;
  border-radius: 18px;
  background: linear-gradient(145deg, #18140d, #101013 64%);
  padding: 18px;
}

.production-master-schedule > .section-head {
  align-items: center;
  margin-bottom: 14px;
}

.production-master-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.production-schedule-quick-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: left;
}

.production-schedule-quick-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.production-schedule-quick-card h3,
.production-schedule-quick-card p {
  margin: 0;
}

.production-schedule-quick-card h3 {
  font-size: 17px;
}

.production-schedule-quick-card p,
.production-schedule-quick-card small {
  color: var(--muted);
}

.production-schedule-quick-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.production-schedule-quick-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.production-schedule-quick-card dt {
  color: #8f8a80;
  font-size: 10px;
  text-transform: uppercase;
}

.production-schedule-quick-card dd {
  margin: 0;
  text-align: right;
  font-size: 11px;
}

@media (max-width: 1000px) {
  .production-master-schedule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .calendar-weekday-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-weekday-options label {
    min-height: 52px;
  }

  .calendar-weekday-presets button {
    min-height: 40px;
    flex: 1 1 calc(50% - 7px);
  }

  .production-master-schedule-grid {
    grid-template-columns: 1fr;
  }
}
