.schedule-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.schedule-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.schedule-tabs,
.schedule-date-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-tabs button,
.schedule-date-nav button {
  font-weight: 800;
}

.schedule-tabs button.active {
  background: #0f2d4a;
  color: white;
  border-color: #0f2d4a;
}

.daily-hero {
  background: white;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.daily-kicker {
  color: #57606a;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.daily-hero h2 {
  margin: 4px 0 0 0;
  font-size: 28px;
}

.daily-summary-inline {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-weight: 800;
  color: #57606a;
}

.daily-summary-inline strong {
  color: #0f2d4a;
  font-size: 24px;
  margin-right: 4px;
}

.daily-summary-inline .danger,
.daily-summary-inline .danger strong {
  color: #cf222e;
}

.daily-games {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.schedule-game-card {
  background: white;
  border: 1px solid #d8dee4;
  border-left: 8px solid #d8dee4;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  gap: 18px;
  align-items: center;
}

.schedule-game-card.assigned {
  border-left-color: #2da44e;
}

.schedule-game-card.open {
  border-left-color: #cf222e;
}

.game-time {
  font-size: 26px;
  font-weight: 900;
  color: #0f2d4a;
}

.game-status {
  margin-top: 6px;
  font-weight: 900;
  font-size: 14px;
}

.game-status.assigned {
  color: #116329;
}

.game-status.open {
  color: #cf222e;
}

.game-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.game-meta span {
  background: #f6f8fa;
  color: #57606a;
  font-weight: 900;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-card-main h3 {
  margin: 0 0 8px 0;
  font-size: 23px;
}

.game-crew-line {
  font-weight: 800;
  color: #24292f;
}

.game-crew-line.missing {
  color: #cf222e;
}

.game-warning-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.game-warning {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}

.game-warning.danger {
  background: #ffebe9;
  color: #cf222e;
}

.game-warning.notice {
  background: #fff8c5;
  color: #7d4e00;
}

.game-card-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.game-card-actions button,
.assign-drawer-actions button,
.schedule-table button {
  padding: 9px 13px;
  border: none;
  border-radius: 9px;
  background: #2389e8;
  color: white;
  cursor: pointer;
  font-weight: 900;
}

.game-card-actions button.secondary,
.assign-drawer-actions .secondary {
  background: #6e7781;
}

.quick-assign-panel {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  background: #f6f8fa;
  padding: 10px;
  border-radius: 12px;
  max-width: 420px;
}

.quick-assign-panel.hidden {
  display: none;
}

.quick-assign-panel select {
  flex: 1;
  min-width: 0;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid #d0d7de;
  background: white;
  font-weight: 800;
}

.quick-assigned-panel {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
  background: #f6f8fa;
  padding: 10px;
  border-radius: 12px;
  max-width: 420px;
}

.quick-assigned-panel span {
  font-weight: 800;
  color: #57606a;
}

.quick-assigned-panel strong {
  color: #0f2d4a;
}

.quick-assigned-panel button {
  padding: 8px 12px;
  border: none;
  border-radius: 9px;
  background: #2389e8;
  color: white;
  cursor: pointer;
  font-weight: 900;
}

.empty-state,
.all-games-header {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(16,24,40,0.06);
}

.all-games-header h2 {
  margin: 0 0 4px 0;
}

.all-games-header p {
  margin: 0;
  color: #57606a;
  font-weight: 700;
}

.schedule-table-wrap {
  background: white;
  border-radius: 16px;
  overflow: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  margin-top: 14px;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
  padding: 13px;
  border-bottom: 1px solid #eaeef2;
  text-align: left;
  white-space: nowrap;
}

.schedule-table th {
  background: #f6f8fa;
  font-weight: 900;
}

.table-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}

.table-status.assigned {
  background: #dafbe1;
  color: #116329;
}

.table-status.open {
  background: #ffebe9;
  color: #cf222e;
}

#assign-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.assign-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.assign-drawer {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 390px;
  background: white;
  padding: 22px;
  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.assign-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.assign-drawer-header h2 {
  margin: 0;
}

.assign-drawer-header button {
  border: none;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.assign-game-summary,
.assign-warning-box {
  background: #f6f8fa;
  border-radius: 12px;
  padding: 13px;
  line-height: 1.5;
}

.assign-drawer label {
  font-weight: 900;
}

.assign-drawer select {
  padding: 11px;
  border-radius: 9px;
  border: 1px solid #d0d7de;
  font-size: 16px;
}

.assign-warning-box h3 {
  margin: 0 0 8px 0;
  font-size: 15px;
}

.assign-warning {
  padding: 9px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-weight: 800;
  font-size: 14px;
}

.assign-warning:last-child {
  margin-bottom: 0;
}

.assign-warning.success {
  background: #dafbe1;
  color: #116329;
}

.assign-warning.notice {
  background: #fff8c5;
  color: #7d4e00;
}

.assign-warning.conflict {
  background: #ffebe9;
  color: #cf222e;
}

.assign-warning.info {
  background: #ddf4ff;
  color: #0969da;
}

.assign-drawer-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 950px) {
  .schedule-game-card {
    grid-template-columns: 1fr;
  }

  .game-card-actions {
    justify-content: flex-start;
  }

  .assign-drawer {
    width: 100%;
  }

  .quick-assign-panel {
    max-width: 100%;
  }

  .quick-assigned-panel {
    max-width: 100%;
  }
}
.quick-assign-assigned {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef6ff;
  border: 1px solid #cfe3ff;
}

.assigned-label {
  font-weight: 800;
  color: #1f4e79;
}

.small-btn {
  padding: 7px 10px;
  font-size: 0.85rem;
}

.hidden {
  display: none !important;
}

.assign-feedback {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #1f7a3f;
}
.workload-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.workload-badge.normal {
  background: #dafbe1;
  color: #116329;
}

.workload-badge.busy {
  background: #fff8c5;
  color: #7d4e00;
}

.workload-badge.overloaded {
  background: #ffebe9;
  color: #cf222e;
}
.crew-workload-panel {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  margin-bottom: 18px;
}

.crew-workload-header h3 {
  margin: 4px 0 0 0;
  font-size: 22px;
}

.empty-workload {
  margin-top: 12px;
  color: #57606a;
  font-weight: 800;
}

.crew-workload-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.crew-workload-item {
  border: 1px solid #d8dee4;
  border-left: 6px solid #2da44e;
  border-radius: 12px;
  padding: 12px;
  background: #f6f8fa;
}

.crew-workload-item.busy {
  border-left-color: #bf8700;
}

.crew-workload-item.overloaded {
  border-left-color: #cf222e;
}

.crew-workload-item strong {
  display: block;
  color: #0f2d4a;
  font-size: 16px;
}

.crew-workload-item span {
  color: #57606a;
  font-weight: 800;
  font-size: 13px;
}

.crew-workload-games {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.crew-assigned {
  color: #24292f;
  font-weight: 700;
}

.crew-open {
  color: #cf222e;
  font-weight: 800;
}
.crew-workload-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  margin: 18px 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.crew-workload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.crew-workload-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  background: #f9fafb;
}

.crew-workload-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.crew-workload-main h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.crew-workload-main p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.workload-badge {
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
}

.workload-light {
  color: #166534;
  background: #dcfce7;
}

.workload-balanced {
  color: #1d4ed8;
  background: #dbeafe;
}

.workload-heavy {
  color: #991b1b;
  background: #fee2e2;
}

.crew-workload-stats {
  display: flex;
  gap: 18px;
  margin-top: 14px;
}

.crew-workload-stats div {
  display: flex;
  flex-direction: column;
}

.crew-workload-stats strong {
  font-size: 20px;
  color: #111827;
}

.crew-workload-stats span {
  font-size: 12px;
  color: #6b7280;
  font-weight: 700;
}
.crew-workload-card {
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.crew-workload-card.selected {
  outline: 3px solid #2563eb;
  background: #eff6ff;
}

.workload-busy {
  color: #92400e;
  background: #fef3c7;
}

.schedule-filter-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
  font-weight: 700;
}

.schedule-filter-notice button {
  margin-left: 10px;
  border: none;
  background: transparent;
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
}
.crew-workload-main h4 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crew-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.crew-status-dot.workload-light {
  background: #22c55e;
}

.crew-status-dot.workload-balanced {
  background: #3b82f6;
}

.crew-status-dot.workload-busy {
  background: #f59e0b;
}

.crew-status-dot.workload-heavy {
  background: #ef4444;
}

/* Compact operational Daily View */
.daily-overview-grid {
  display: grid;
  margin-bottom: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.daily-overview-grid > section {
  min-height: 170px;
}

.daily-hero {
  display: grid;
  padding: 9px 14px 0;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  box-shadow: none;
  gap: 6px;
  margin: 0;
}

.daily-hero > div:first-child {
  text-align: center;
}

.schedule-toolbar-date-step {
  display: none;
}

.daily-date-heading {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.daily-date-heading > div {
  text-align: center;
}

.daily-assignment-status {
  margin: 2px 0 0;
  color: #44546a;
  font-size: 0.92rem;
  font-weight: 650;
}

.schedule-readiness-panel {
  display: flex;
  min-height: 100%;
  margin: 0;
  padding: 14px 16px;
  border-radius: 8px;
  box-shadow: none;
  flex-direction: column;
}

.schedule-readiness-panel .panel-header {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.schedule-readiness-panel h3 { margin: 4px 0; }
.schedule-readiness-action { margin-top: auto; align-self: flex-end; }

.daily-hero h2 {
  font-size: 1.35rem;
}

.daily-summary-inline {
  display: grid;
  margin-inline: -16px;
  border-top: 1px solid #d7dee8;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.daily-summary-metric {
  display: flex;
  min-height: 56px;
  padding: 5px 9px;
  border-right: 1px solid #d7dee8;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.daily-summary-metric:last-child {
  border-right: 0;
}

.daily-summary-metric small {
  color: #667085;
  font-size: 0.75rem;
  font-weight: 700;
}

.daily-summary-inline .daily-summary-metric strong {
  margin: 2px 0 0;
  color: #172033;
  font-size: 1.45rem;
}

.daily-summary-inline .status-good strong { color: #18794e; }
.daily-summary-inline .status-watch strong { color: #8a4b08; }
.daily-summary-inline .status-danger strong { color: #b42318; }

.schedule-calendar {
  padding: 9px 12px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  box-shadow: none;
}

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

.schedule-calendar header h3 {
  margin: 0;
  font-size: 1rem;
}

.schedule-calendar-weekdays,
.schedule-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.schedule-calendar-weekdays span {
  padding: 3px;
  color: #667085;
  font-size: 0.67rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.schedule-calendar-day {
  display: flex;
  position: relative;
  min-height: 34px;
  border: 1px solid #c8d3df;
  background: #fff;
  color: #172033;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.schedule-calendar-day:hover,
.schedule-calendar-day:focus-visible {
  z-index: 1;
  background: #eef4ff;
  outline: 2px solid #175cd3;
}

.schedule-calendar-day.outside-month { color: #98a2b3; }
.schedule-calendar-day.past-date:not(.selected) { background: #e9edf2; }
.schedule-calendar-day.selected { background: #0f2a44; color: #fff; }
.schedule-calendar-day.has-games:not(.selected) { color: #175cd3; }
.schedule-calendar-day.no-games:not(.selected):not(.outside-month) { color: #172033; }
.schedule-calendar-day small {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 0.58rem;
}

.crew-workload-panel {
  padding: 14px 16px;
  border-radius: 8px;
  box-shadow: none;
}

.crew-workload-list-compact {
  display: grid;
  margin-top: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.crew-workload-row {
  display: grid;
  width: 100%;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  background: transparent;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.crew-workload-row.selected {
  background: #eff6ff;
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.crew-workload-row .crew-workload-main { align-items: center; }
.crew-workload-row .crew-workload-stats { margin: 0; gap: 10px; }
.crew-workload-row .crew-workload-stats strong { font-size: 0.95rem; }
.crew-workload-row .crew-workload-stats span { font-size: 0.65rem; }
.crew-workload-row .workload-badge { padding: 3px 6px; font-size: 0.68rem; }

.daily-assignment-grid {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.daily-assignment-grid .crew-workload-panel {
  margin: 0;
}

.daily-assignment-grid .crew-workload-list-compact {
  grid-template-columns: minmax(0, 1fr);
}

.daily-assignment-grid .crew-workload-row {
  display: flex;
  padding: 10px 3px;
  align-items: center;
  gap: 9px;
}

.crew-workload-sentence {
  color: #172033;
  font-size: 0.92rem;
  line-height: 1.35;
}

.crew-workload-sentence > span {
  color: #667085;
}

.daily-games-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.daily-games { gap: 8px; }

.schedule-game-card {
  padding: 10px 12px;
  border-left-width: 4px;
  border-radius: 8px;
  box-shadow: none;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 12px;
}

.schedule-game-card .game-time { font-size: 1.15rem; }
.schedule-game-card .game-status { font-size: 0.72rem; }
.schedule-game-card .game-meta { margin-bottom: 3px; }
.schedule-game-card .game-meta span { padding: 2px 5px; font-size: 0.65rem; }
.schedule-game-card .game-card-main h3 { margin-bottom: 3px; font-size: 1rem; }
.schedule-game-card .game-crew-line { font-size: 0.78rem; }
.schedule-game-card .quick-assign-panel,
.schedule-game-card .quick-assigned-panel { margin-top: 6px; padding: 5px 7px; }
.schedule-game-card .game-card-actions button { padding: 6px 9px; }

@media (max-width: 640px) {
  .daily-overview-grid { grid-template-columns: 1fr; }
  .daily-summary-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-summary-metric:nth-child(2) { border-right: 0; }
  .crew-workload-list-compact { grid-template-columns: 1fr; }
  .daily-assignment-grid { grid-template-columns: 1fr; }
  .schedule-game-card { grid-template-columns: 1fr; }
  .daily-date-heading { gap: 8px; }
  .daily-date-step { padding-inline: 8px; font-size: 0.78rem; }
}
.open-games-panel{

margin:18px 0;

padding:20px;

background:#fff;

border-radius:16px;

border:1px solid #e5e7eb;

box-shadow:0 8px 24px rgba(15,23,42,.05);

}

.open-game-card{

display:flex;

justify-content:space-between;

align-items:center;

padding:14px 0;

border-bottom:1px solid #ececec;

}

.open-game-card:last-child{

border-bottom:none;

}

.recommended-row{

display:flex;

align-items:center;

gap:20px;

}

.recommendation-pill{

padding:5px 10px;

border-radius:999px;

font-size:12px;

font-weight:700;

display:inline-block;

margin-bottom:6px;

}

.recommendation-pill.excellent{

background:#dcfce7;

color:#166534;

}

.recommendation-pill.good{

background:#dbeafe;

color:#1d4ed8;

}

.recommendation-pill.review{

background:#fee2e2;

color:#991b1b;
}

.daily-overview-grid .schedule-readiness-panel {
  display: flex;
  min-height: 170px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  box-shadow: none;
  flex-direction: column;
}

/* Readable Schedule typography without increasing component spacing. */
.schedule-page {
  font-size: 17px;
}

.schedule-page .schedule-tabs button,
.schedule-page .schedule-date-nav button {
  font-size: 0.95rem;
}

.daily-hero {
  align-items: stretch;
  justify-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}

.daily-hero > div:first-child {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-column: 1;
}

.daily-kicker { font-size: 0.82rem; }
.daily-hero h2 { font-size: 1.55rem; }

.daily-hero .daily-summary-inline {
  position: relative;
  left: -16px;
  width: calc(100% + 32px);
  margin-inline: 0;
  grid-column: 1;
  justify-self: stretch;
}

.daily-section-heading {
  display: flex;
  min-height: 42px;
  margin-bottom: 8px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.daily-section-heading h3 {
  margin: 0;
  font-size: 1.12rem;
}

.daily-section-heading p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 0.9rem;
}

.crew-workload-section {
  min-width: 0;
}

.crew-workload-section .crew-workload-panel {
  margin: 0;
}

.daily-summary-metric small { font-size: 0.85rem; }
.daily-summary-inline .daily-summary-metric strong { font-size: 1.62rem; }
.schedule-readiness-panel h3,
.crew-workload-panel h3,
.daily-games-title { font-size: 1.12rem; }
.schedule-readiness-panel p,
.crew-workload-panel .panel-header p { font-size: 0.94rem; }
.schedule-calendar header h3 { font-size: 1.12rem; }
.schedule-calendar-weekdays span { font-size: 0.84rem; }
.schedule-calendar-day { font-size: 1.02rem; }
.schedule-calendar-day small { font-size: 0.75rem; }
.crew-workload-sentence { font-size: 1rem; }
.schedule-game-card .game-time { font-size: 1.25rem; }
.schedule-game-card .game-status { font-size: 0.8rem; }
.schedule-game-card .game-meta span { font-size: 0.74rem; }
.schedule-game-card .game-card-main h3 { font-size: 1.08rem; }
.schedule-game-card .game-crew-line { font-size: 0.9rem; }
.schedule-game-card .game-card-actions button { font-size: 0.9rem; }

.all-games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.all-games-header h2,
.all-games-header p {
  margin: 0;
}

.all-games-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.all-games-filters .button.active {
  border-color: var(--slate-teal, #087f91);
  background: var(--slate-teal, #087f91);
  color: #fff;
}

@media (max-width: 760px) {
  .all-games-header {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Milestone 7.6 schedule-specific phone safeguards. */
@media (max-width: 820px) {
  .daily-assignment-grid { flex-direction: column; }
  .daily-assignment-grid > * { width: 100%; }
}

@media (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  .daily-assignment-grid { flex-direction: column; }
  .daily-assignment-grid > * { width: 100%; }
}

@media (max-width: 600px) {
  .schedule-date-nav, .schedule-toolbar, .schedule-view-controls, .all-games-filters {
    align-items: stretch; flex-wrap: wrap;
  }
  .schedule-date-nav > *, .schedule-toolbar button, .schedule-view-controls button { min-height: 44px; }
  .schedule-filter-grid { grid-template-columns: 1fr; }
  .schedule-calendar { overflow-x: auto; }
  .schedule-calendar-grid { min-width: 560px; }
  .schedule-game-card { grid-template-columns: 1fr; grid-template-areas: "when" "details" "crew" "status" "actions"; }
  .schedule-game-card .game-card-actions { display: grid; grid-template-columns: 1fr; }
  .schedule-game-card .game-card-actions button { width: 100%; min-height: 44px; }
  #game-editor-overlay { padding: 8px; }
  .game-editor-modal { width: 100%; max-height: calc(100dvh - 16px); }
  .game-editor-modal .assign-drawer-header, .game-editor-form { padding: 14px; }
  .game-editor-form .assign-drawer-actions { display: grid; grid-template-columns: 1fr; }
}

/* Schedule alignment with the shared Sky Teal theme. */
.schedule-calendar-day:hover,
.schedule-calendar-day:focus-visible {
  background: #e9f7f9;
  outline-color: var(--slate-teal, #087f91);
}

.schedule-calendar-day.selected {
  background: var(--slate-navy, #0f2742);
  color: #fff;
}

.schedule-calendar-day.has-games:not(.selected) {
  color: var(--slate-teal, #087f91);
}

.crew-workload-row:hover {
  background: #edf8f9;
}

.crew-workload-row.selected {
  background: #ddf3f6;
  outline-color: var(--slate-teal, #087f91);
}

.schedule-filter-notice {
  border-color: #9bdde7;
  background: #eaf7f9;
  color: var(--slate-deep-teal, #07596b);
}

.schedule-advanced-filters { margin: 0 0 10px; padding: 10px 12px; border-top: 4px solid #22aabd; }
.schedule-advanced-filters header { display: flex; margin-bottom: 7px; align-items: center; justify-content: space-between; }
.schedule-advanced-filters h3 { margin: 0; }
.schedule-filter-grid { display: grid; grid-template-columns: repeat(9, minmax(105px, 1fr)); gap: 7px; }
.schedule-filter-grid label { display: grid; gap: 3px; color: #526b7a; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.schedule-filter-grid input,
.schedule-filter-grid select { width: 100%; min-width: 0; min-height: 34px; padding: 5px 7px; border: 1px solid #a9ced6; border-radius: 5px; background: #fff; color: #13283f; font: inherit; text-transform: none; }
@media (max-width: 1200px) { .schedule-filter-grid { grid-template-columns: repeat(5, minmax(120px, 1fr)); } }
@media (max-width: 760px) { .schedule-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.daily-assignment-grid {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: flex-start;
}

.daily-assignment-grid > * {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
}

.daily-assignment-grid .crew-workload-section,
.daily-assignment-grid > div:last-child {
  display: flex;
  flex-direction: column;
}

.daily-assignment-grid .crew-workload-panel,
.daily-assignment-grid .daily-games {
  flex: 1;
}

.schedule-game-card {
  grid-template-columns: 78px minmax(0, 1fr) minmax(90px, 0.85fr) auto;
  min-height: 70px;
  padding-block: 6px;
  gap: 8px;
}

.schedule-game-card .game-card-main .game-crew-line,
.schedule-game-card .game-card-main .workload-badge {
  display: none;
}

.game-card-crew {
  display: grid;
  gap: 4px;
  align-self: center;
}

.game-card-crew span {
  display: grid;
  grid-template-columns: minmax(42px, auto) minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
}

.game-card-crew small {
  color: #526b7a;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.game-card-crew strong,
.game-card-crew-link {
  color: #07596b;
  font-size: 0.9rem;
}

.game-card-crew-link {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
}

.game-card-crew-link:hover,
.game-card-crew-link:focus-visible {
  color: #0b91a5;
}

.schedule-game-card .game-card-actions button {
  width: 48px;
  min-height: 58px;
  padding: 4px 5px;
  line-height: 1.05;
}

.game-card-crew.missing strong {
  color: #8a4b08;
}

.daily-summary-inline .daily-summary-metric strong {
  font-size: 1.78rem;
}

/* Final compact Daily Schedule geometry. */
.daily-hero {
  min-height: 0;
  padding: 9px 14px 0;
  gap: 6px;
}

.daily-hero > div.daily-date-heading:first-child {
  display: grid;
  width: 100%;
  grid-template-columns: auto auto auto;
  grid-column: 1;
  gap: 64px;
  align-items: center;
  justify-content: initial;
  justify-content: center;
}

.daily-hero > .daily-date-heading > div {
  text-align: center;
}

.daily-hero .daily-summary-inline {
  left: -14px;
  width: calc(100% + 28px);
}

@media (max-width: 500px) {
  .daily-assignment-grid {
    flex-direction: column;
  }

  .daily-assignment-grid > * {
    width: 100%;
  }

  .daily-hero > div.daily-date-heading:first-child {
    gap: 12px;
  }
}

/* Slate command-center treatment for the Daily Schedule summary. */
.daily-hero {
  margin-bottom: 16px;
  border-color: #74aeba;
  border-top: 4px solid #22aabd;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7, 31, 53, .12);
}

.daily-hero .daily-summary-inline {
  padding: 4px;
  border-top: 0;
  background: #d5e5e9;
  gap: 4px;
}

.daily-hero .daily-summary-metric {
  border: 1px solid #19425d;
  border-radius: 6px;
  background: linear-gradient(145deg, #123b58, #0b2943);
}

.daily-hero .daily-summary-metric small,
.daily-hero .daily-summary-metric strong {
  color: #fff;
}

.daily-hero .daily-summary-metric.status-good strong {
  color: #19a55a;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}

.daily-hero .daily-summary-metric.status-watch strong,
.daily-hero .daily-summary-metric.status-danger strong {
  color: #d92d20;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}

.schedule-calendar {
  margin-bottom: 16px;
}

/* Milestone 6.7: compact admin schedule presentation. */
.all-games-card {
  padding: 0;
  overflow: hidden;
}

.all-games-card .all-games-header {
  display: flex;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  background: linear-gradient(135deg, #123b58, #07596b);
}

.all-games-card .all-games-header h2,
.all-games-card .all-games-header p { margin: 0; color: inherit; }
.all-games-card .all-games-header p { margin-top: 2px; opacity: .82; }
.all-games-card .schedule-table-wrap { margin: 0; border: 0; border-radius: 0; }
.all-games-card .schedule-table tbody tr { cursor: default; }
.all-games-card .schedule-table tbody tr:hover { background: inherit; }

.schedule-past-toggle {
  display: inline-flex;
  min-height: 34px;
  padding: 5px 10px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 6px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.schedule-past-toggle input { width: 16px; height: 16px; margin: 0; accent-color: #22aabd; }
.schedule-past-toggle:focus-within { outline: 3px solid #f5c451; outline-offset: 2px; }
.schedule-calendar-day.outside-month { color: #475467; }
.schedule-calendar-day.has-games:not(.selected) small { color: #07596b; }

.daily-assignment-grid > .crew-workload-section { flex: 0 1 36%; }
.daily-assignment-grid > div:last-child { flex: 1 1 64%; }

.schedule-game-card {
  grid-template-columns: 92px minmax(170px, 1fr) minmax(130px, .7fr);
  grid-template-areas: "when details crew" "status actions actions";
  padding: 10px 12px;
  gap: 8px 14px;
}

.schedule-game-card .game-card-left { grid-area: when; }
.schedule-game-card .game-card-main { grid-area: details; }
.schedule-game-card .game-card-crew { grid-area: crew; }
.schedule-game-card .game-status { grid-area: status; }
.schedule-game-card .game-card-actions { grid-area: actions; display: flex; justify-content: flex-end; gap: 7px; }
.schedule-game-card .game-card-actions button { width: auto; min-height: 34px; padding: 6px 10px; line-height: 1.2; }
.schedule-game-card .game-date { color: #526b7a; font-size: .78rem; font-weight: 800; }
.schedule-game-card .game-time { margin-top: 2px; font-size: 1rem; font-weight: 900; }
.schedule-game-card .game-meta { margin-bottom: 2px; }
.schedule-game-card .game-level { color: #07596b; font-weight: 900; }
.schedule-game-card .game-location { margin-top: 3px; color: #526b7a; font-size: .82rem; }
.game-card-crew.missing { color: #8a4b08; font-size: .88rem; }

#game-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  padding: 24px;
  place-items: center;
}

#game-editor-overlay > .assign-drawer-backdrop { position: absolute; inset: 0; background: rgba(5, 22, 35, .65); }
.game-editor-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #74aeba;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(4, 24, 39, .35);
}

.game-editor-modal .assign-drawer-header { position: sticky; top: 0; z-index: 1; padding: 16px 20px; background: #123b58; color: #fff; }
.game-editor-modal .assign-drawer-header h2 { margin: 0; color: inherit; }
.game-editor-form { display: grid; grid-template-columns: minmax(110px, .35fr) minmax(0, 1fr); padding: 20px; align-items: center; gap: 10px 14px; }
.game-editor-form > label { font-weight: 800; color: #29465b; }
.game-editor-form > input,
.game-editor-form > select { width: 100%; min-height: 40px; }
.game-editor-form > hr,
.game-editor-form > .assignment-status-preview,
.game-editor-form > .game-editor-note,
.game-editor-form > .assign-drawer-actions { grid-column: 1 / -1; }
.game-editor-form .assign-drawer-actions { display: flex; padding-top: 14px; border-top: 1px solid #d5e5e9; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.assignment-game-summary { display: grid; margin: 5px 0 0; gap: 2px; }
.assignment-game-summary span { font-size: .88rem; }

@media (max-width: 760px) {
  .all-games-card .all-games-header { align-items: stretch; flex-direction: column; }
  .all-games-filters { justify-content: flex-start; }
  .daily-assignment-grid { flex-direction: column; }
  .daily-assignment-grid > * { width: 100%; }
  .schedule-game-card { grid-template-columns: 82px 1fr; grid-template-areas: "when details" "crew crew" "status status" "actions actions"; }
  .schedule-game-card .game-card-actions { justify-content: flex-start; flex-wrap: wrap; }
  #game-editor-overlay { padding: 10px; }
  .game-editor-modal { max-height: calc(100vh - 20px); }
  .game-editor-form { grid-template-columns: 1fr; padding: 16px; }
  .game-editor-form > hr,
  .game-editor-form > .assignment-status-preview,
  .game-editor-form > .game-editor-note,
  .game-editor-form > .assign-drawer-actions { grid-column: 1; }
}
