.scorecard-chief-control-bar {
  width: 100%;
  min-height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #b42318;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-align: center;
}

.chief-control-room-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(7, 22, 16, 0.62);
}

.chief-control-room-backdrop[hidden] { display: none; }

.chief-control-room-sheet {
  width: min(100%, 650px);
  max-height: calc(100dvh - 32px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: #142c22;
  background: #fff;
  border: 2px solid var(--scorecard-theme-primary, #006747);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.chief-control-room-sheet > header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px 7px 12px;
  color: #fff;
  background: var(--scorecard-theme-primary, #006747);
}

.chief-control-room-sheet > header span,
.chief-control-room-sheet > header h2 { display: block; margin: 0; }
.chief-control-room-title { min-width: 0; flex: 1 1 auto; }
.chief-control-room-sheet > header .chief-control-room-title > span { font-size: 0.59rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; opacity: .82; }
.chief-control-room-sheet > header h2 { overflow: hidden; font-size: 0.96rem; line-height: 1.12; text-overflow: ellipsis; white-space: nowrap; }
.chief-control-room-sheet > header button { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; color: #fff; background: transparent; font-size: 1.3rem; line-height: 1; }
.chief-round-select { min-width: 116px; display: grid; gap: 1px; }
.chief-control-room-sheet > header .chief-round-select span { font-size: 0.56rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; opacity: .82; }
.chief-round-select select { width: 100%; min-height: 29px; border: 1px solid rgba(255,255,255,.72); border-radius: 6px; padding: 3px 24px 3px 7px; color: #142c22; background: #fff; font: inherit; font-size: .75rem; font-weight: 800; }
.chief-round-select select:disabled { color: #354940; opacity: .88; }

.chief-control-room-summary { display: grid; gap: 3px; padding: 12px 16px; border-bottom: 1px solid #d9e3dd; }
.chief-control-room-summary strong { color: var(--scorecard-theme-secondary, #183d2d); font-size: 1rem; }
.chief-control-room-summary span, .chief-control-room-summary small { color: #586b62; }

.chief-control-room-list { display: grid; align-content: start; gap: 8px; padding: 12px; overflow-y: auto; background: #f4f7f5; }
.chief-awards-card { width: 100%; min-height: 62px; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 12px; align-items: center; border: 1px solid var(--scorecard-theme-primary, #006747); border-left: 5px solid var(--scorecard-theme-secondary, #d8a520); border-radius: 8px; padding: 9px 12px; color: #142c22; background: #fff; text-align: left; font: inherit; }
.chief-awards-card > span { min-width: 0; display: grid; gap: 2px; }
.chief-awards-card small { color: #607069; font-size: .72rem; }
.chief-awards-card > span:first-child small { color: var(--scorecard-theme-secondary, #183d2d); font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.chief-awards-card strong { font-size: .92rem; }
.chief-awards-card-totals { justify-items: end; text-align: right; }
.chief-awards-card > b { color: var(--scorecard-theme-primary, #006747); font-size: 1.7rem; line-height: 1; }
.chief-control-pairing { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, auto) auto; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid #ccd9d2; border-left: 5px solid var(--scorecard-theme-secondary, #d8a520); border-radius: 8px; background: #fff; }
.chief-control-pairing.has-control { border-left-color: #b42318; }
.chief-control-pairing-main, .chief-control-pairing-status { min-width: 0; display: grid; gap: 3px; }
.chief-control-pairing-main span { overflow-wrap: anywhere; color: #52645b; font-size: 0.82rem; }
.chief-control-pairing-status { justify-items: start; }
.chief-control-pairing-status b { padding: 3px 8px; border-radius: 999px; font-size: 0.7rem; text-transform: uppercase; }
.chief-control-pairing-status b.final { color: #fff; background: #147a47; }
.chief-control-pairing-status b.draft { color: #7b2d23; background: #f7d8d3; }
.chief-control-pairing-status small { color: #6a7770; }
.chief-control-pairing-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.chief-control-pairing-actions a, .chief-control-pairing-actions button, .chief-control-room-sheet > footer button { min-height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--scorecard-theme-primary, #006747); border-radius: 6px; padding: 7px 11px; color: #fff; background: var(--scorecard-theme-primary, #006747); font: inherit; font-size: 0.78rem; font-weight: 850; text-decoration: none; }
.chief-control-pairing-actions .secondary, .chief-control-room-sheet > footer .secondary { color: var(--scorecard-theme-primary, #006747); background: #fff; }
.chief-control-pairing-actions .danger { border-color: #b42318; background: #b42318; }
.chief-control-empty { margin: 0; padding: 24px; text-align: center; }

.chief-control-room-sheet > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #d9e3dd; background: #fff; }
.chief-control-room-sheet > footer button:disabled { cursor: not-allowed; opacity: 0.45; }

.chief-summary-backdrop {
  position: fixed;
  inset: 0;
  z-index: 175;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(7, 22, 16, 0.72);
}

.chief-summary-backdrop[hidden] { display: none; }

.chief-summary-sheet {
  width: min(100%, 980px);
  max-height: calc(100dvh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: #142c22;
  background: #fff;
  border: 2px solid var(--scorecard-theme-primary, #006747);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.chief-summary-sheet > header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 8px 16px;
  color: #fff;
  background: var(--scorecard-theme-primary, #006747);
}
.chief-summary-sheet > header div { min-width: 0; display: grid; gap: 2px; }
.chief-summary-sheet > header span { overflow: hidden; font-size: .72rem; font-weight: 800; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; opacity: .9; }
.chief-summary-sheet > header h2 { overflow: hidden; margin: 0; font-size: 1.12rem; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
.chief-summary-sheet > header button { width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; color: #fff; background: transparent; font-size: 1.35rem; }
.chief-summary-table-wrap { overflow: auto; background: #f4f7f5; }
.chief-payout-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; background: #fff; font-size: .78rem; }
.chief-payout-table th, .chief-payout-table td { min-width: 0; border-right: 1px solid #dbe4df; border-bottom: 1px solid #dbe4df; padding: 7px 6px; text-align: center; vertical-align: middle; white-space: normal; }
.chief-payout-table thead th { position: sticky; top: 0; z-index: 2; height: 42px; color: var(--scorecard-theme-primary, #006747); background: #fff; border-bottom: 2px solid var(--scorecard-theme-primary, #006747); font-size: .68rem; line-height: 1.05; text-align: center; text-transform: uppercase; }
.chief-payout-table thead th > span { display: block; max-width: 100%; overflow-wrap: anywhere; }
.chief-payout-table .chief-name-column { width: 164px; min-width: 164px; max-width: 164px; position: sticky; left: 0; z-index: 1; text-align: left; background: #fff; }
.chief-payout-table thead .chief-name-column { z-index: 3; color: var(--scorecard-theme-primary, #006747); background: #fff; }
.chief-payout-table tbody .chief-name-column > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chief-payout-table .chief-pd-column { width: 42px; min-width: 42px; max-width: 42px; padding-inline: 3px; text-align: center; }
.chief-payout-table .chief-total-column { width: 70px; min-width: 70px; max-width: 70px; text-align: center; }
.chief-payout-table .chief-format-column { width: 78px; min-width: 68px; max-width: 88px; text-align: center; }
.chief-payout-table .chief-round-column { width: 64px; min-width: 64px; max-width: 64px; text-align: center; }
.chief-payout-table td.chief-format-column > span,
.chief-payout-table td.chief-round-column > span { display: block; overflow-wrap: anywhere; }
.chief-payout-table tbody tr:nth-child(even) td, .chief-payout-table tbody tr:nth-child(even) th { background: #f8faf9; }
.chief-payout-table .chief-summary-total { color: var(--scorecard-theme-primary, #006747); font-weight: 900; }
.chief-paid-toggle { display: inline-grid; place-items: center; color: #52645b; font-size: .68rem; font-weight: 750; }
.chief-paid-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--scorecard-theme-primary, #006747); }
.chief-pd-column .chief-paid-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chief-payout-table .chief-summary-empty { padding: 28px 16px; color: #65756d; text-align: center; }
.chief-summary-sheet > footer { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 8px 16px; border-top: 1px solid #d9e3dd; background: #fff; }
.chief-summary-sheet > footer span { color: #63736b; font-size: .72rem; }
.chief-summary-sheet > footer > div { display: flex; gap: 8px; }
.chief-summary-sheet > footer button { min-height: 34px; border: 1px solid var(--scorecard-theme-primary, #006747); border-radius: 6px; padding: 6px 14px; color: #fff; background: var(--scorecard-theme-primary, #006747); font: inherit; font-size: .78rem; font-weight: 850; }
.chief-summary-sheet > footer button.secondary { color: var(--scorecard-theme-primary, #006747); background: #fff; }
.chief-summary-sheet > footer button:disabled { cursor: not-allowed; opacity: .42; }

body[data-admin-theme="usa"] .chief-control-room-sheet { --scorecard-theme-primary: #002868; --scorecard-theme-secondary: #bf0a30; }
body[data-admin-theme="irish"] .chief-control-room-sheet { --scorecard-theme-primary: #169b62; --scorecard-theme-secondary: #ff883e; }
body[data-admin-theme="scoodle"] .chief-control-room-sheet { --scorecard-theme-primary: #2f6fe8; --scorecard-theme-secondary: #f6b51d; }
body[data-admin-theme="masters"] .chief-control-room-sheet { --scorecard-theme-primary: #006747; --scorecard-theme-secondary: #e2ba2f; }
body[data-admin-theme="usa"] .chief-summary-sheet { --scorecard-theme-primary: #002868; --scorecard-theme-secondary: #bf0a30; }
body[data-admin-theme="irish"] .chief-summary-sheet { --scorecard-theme-primary: #169b62; --scorecard-theme-secondary: #ff883e; }
body[data-admin-theme="scoodle"] .chief-summary-sheet { --scorecard-theme-primary: #2f6fe8; --scorecard-theme-secondary: #f6b51d; }
body[data-admin-theme="masters"] .chief-summary-sheet { --scorecard-theme-primary: #006747; --scorecard-theme-secondary: #e2ba2f; }

@media (max-width: 560px) {
  .chief-control-room-backdrop { padding: 10px; }
  .chief-control-room-sheet > header { gap: 7px; padding-left: 10px; }
  .chief-round-select { min-width: 108px; }
  .chief-control-pairing { grid-template-columns: minmax(0, 1fr) auto; }
  .chief-control-pairing-status { justify-items: end; text-align: right; }
  .chief-control-pairing-actions { grid-column: 1 / -1; }
  .chief-control-room-sheet > footer { position: sticky; bottom: 0; flex-wrap: wrap; }
  .chief-summary-backdrop { padding: 8px; }
  .chief-summary-sheet { max-height: calc(100dvh - 16px); }
  .chief-summary-sheet > header { min-height: 54px; padding-left: 12px; }
  .chief-payout-table { font-size: .76rem; }
  .chief-payout-table th, .chief-payout-table td { padding-block: 7px; }
  .chief-payout-table .chief-name-column { width: 144px; min-width: 144px; max-width: 144px; }
  .chief-summary-sheet > footer { align-items: stretch; flex-direction: column; }
  .chief-summary-sheet > footer > div { width: 100%; }
  .chief-summary-sheet > footer button { flex: 1 1 0; }
}
