:root {
  color-scheme: light;
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --text: #111827;
  --muted: #607080;
  --line: #d7dee8;
  --line-strong: #c4ccd8;
  --accent: #227947;
  --accent-dark: #145c35;
  --accent-soft: #e8f6ee;
  --chip-bg: #f2f5f7;
  --success-soft: #edf8ef;
  --success-text: #245c35;
  --warning-soft: #fff6df;
  --warning-text: #8a5b12;
  --error-soft: #fceeee;
  --error-text: #8b1f1f;
  --shadow: 0 20px 52px rgba(17, 24, 39, 0.085);
  --shadow-soft: 0 12px 30px rgba(17, 24, 39, 0.06);
  --shadow-hairline: 0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  max-width: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #fbfcfd 0, var(--bg) 340px, #edf2f0 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-width: 0;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02), 0 10px 30px rgba(17, 24, 39, 0.035);
  backdrop-filter: blur(18px);
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1240px;
  min-width: 0;
  margin: 0 auto;
  padding: 17px 28px 14px;
}

.topbar-brand-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.topbar-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
}

.topbar-brand:hover {
  text-decoration: none;
}

.topbar-brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: contain;
}

.topbar-brand span {
  display: grid;
  min-width: 0;
  line-height: 1.12;
}

.topbar-brand strong {
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.01em;
}

.topbar-brand small {
  color: var(--muted);
  font-size: 12.5px;
}

.topbar-heading {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 27px;
  line-height: 1.12;
}

h2 {
  font-size: 17px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #344152;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.nav a:hover {
  border-color: #c8ded1;
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-decoration: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 0;
}

.topbar-nav-rows {
  display: grid;
  gap: 9px;
  width: 100%;
  max-width: 1240px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 28px 16px;
}

.topbar-menu-toggle,
.topbar-menu-button {
  display: none;
}

.topbar-menu-content {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.topbar-operator-nav {
  min-width: 0;
}

.topbar-operator-nav .operator-nav {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-operator-nav .operator-nav::-webkit-scrollbar {
  display: none;
}

.topbar-operator-nav .operator-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #344152;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.topbar-operator-nav .operator-nav a:hover,
.topbar-operator-nav .operator-nav a.is-active {
  border-color: #c8ded1;
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-decoration: none;
}

.site-header-logout-form {
  flex: 0 0 auto;
  margin: 0;
}

.site-header-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.site-header-logout-button:hover {
  border-color: #b7d9c4;
  background: var(--accent-soft);
}

.content {
  width: calc(100% - 32px);
  max-width: 1240px;
  margin: 30px auto 60px;
}

.notice,
.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.notice {
  padding: 14px 16px;
  color: var(--muted);
  line-height: 1.5;
}

.section {
  margin-top: 18px;
  padding: 22px;
  box-shadow: var(--shadow-soft), var(--shadow-hairline);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding-bottom: 13px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.status-tile {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 64px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0, var(--surface-soft) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.status-tile span {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.status-tile strong {
  min-width: 0;
  color: var(--accent-dark);
  font-size: 24px;
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-width: 0;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 12px;
  min-width: 0;
  align-items: end;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 8px;
  min-width: 0;
}

.audit-filters {
  margin-bottom: 16px;
}

.table-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 12px;
}

.billing-selection-actions {
  min-height: 38px;
}

.billing-selection-status {
  font-weight: 700;
}

.billing-form {
  display: grid;
  gap: 14px;
}

.decision-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.decision-group legend {
  padding: 0 6px;
  color: var(--text);
  font-weight: 800;
}

.manual-adjustments-group {
  grid-template-columns: minmax(0, 1fr);
}

.manual-adjustment-list {
  display: grid;
  gap: 12px;
}

.manual-adjustment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  min-width: 0;
  align-items: end;
}

.form-helper {
  margin: 0;
  color: var(--muted);
}

.row-checkbox {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
}

.billing-selection-control {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  width: auto;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.queue-selection-control {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  width: auto;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.checkbox-control {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  width: auto;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.billing-select-all {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.billing-selection-disabled {
  color: var(--muted);
  cursor: help;
}

.billing-selection-note {
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}

button:disabled,
button:disabled:hover {
  border-color: var(--line-strong);
  background: #e6ebf1;
  color: var(--muted);
  cursor: not-allowed;
}

.subheading {
  margin-top: 18px;
}

label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea,
button {
  max-width: 100%;
  min-width: 0;
  border-radius: 6px;
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  padding: 9px 11px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
}

input,
select,
button {
  min-height: 38px;
}

textarea {
  min-height: 82px;
  resize: vertical;
}

button {
  border: 1px solid var(--accent);
  padding: 7px 13px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: normal;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.secondary-button {
  justify-self: start;
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--accent-dark);
}

.secondary-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.text-button:hover {
  text-decoration: none;
}

.notice-success {
  border-color: #7dbb8f;
  background: var(--success-soft);
  color: var(--success-text);
}

.notice-error {
  border-color: #e08a8a;
  background: var(--error-soft);
  color: var(--error-text);
}

.notice-warning {
  border-color: #e4c46d;
  background: #fff8df;
  color: #74531a;
}

.legacy-dashboard-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.legacy-dashboard-notice p {
  margin: 0;
}

.review-form {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 260px) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  align-items: end;
}

.upload-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 14px;
  min-width: 0;
  margin-top: 14px;
  align-items: end;
}

.checkbox-row {
  display: flex;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.checkbox-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.correction-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.program-group-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
  align-items: end;
}

.broadcast-compose-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.broadcast-compose-form .form-grid {
  grid-template-columns: repeat(2, minmax(min(280px, 100%), 1fr));
}

.broadcast-body-field,
.broadcast-subject-field {
  grid-column: 1 / -1;
}

.broadcast-body-field textarea {
  min-height: 220px;
}

.broadcast-status-group {
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
}

.broadcast-preview-summary {
  margin-bottom: 14px;
}

.broadcast-recipient-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.broadcast-recipient-table-wrap table {
  min-width: 960px;
}

.broadcast-review-table-wrap table {
  min-width: 1320px;
}

.broadcast-confirm-grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  margin-top: 14px;
  align-items: center;
}

.broadcast-confirm-check {
  color: var(--text);
}

.broadcast-index-actions {
  margin: 16px 0 0;
}

.broadcast-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  min-width: 0;
  margin: 0 0 16px;
}

.broadcast-detail-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.broadcast-detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.broadcast-detail-grid dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.broadcast-content-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(min(320px, 100%), 1fr));
  gap: 14px;
  min-width: 0;
}

.broadcast-content-review-grid h3,
.broadcast-html-preview h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.broadcast-content-review-grid pre {
  max-height: 340px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.broadcast-html-preview {
  margin-top: 14px;
}

.broadcast-html-preview iframe {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.broadcast-approve-actions {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(240px, 1fr);
  gap: 12px;
  margin-top: 14px;
  align-items: end;
}

.broadcast-approve-actions .checkbox-row {
  align-self: center;
}

.broadcast-cancel-actions,
.broadcast-cancel-all-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.danger-button {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #ffffff;
}

.danger-button:disabled {
  border-color: #f3b4b4;
  background: #f3b4b4;
}

.review-notes {
  grid-column: 1 / -1;
  min-width: 0;
}

.correction-notes-group {
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
}

.correction-helper,
.readonly-context {
  grid-column: 1 / -1;
  margin: 0;
}

.review-form button {
  justify-self: start;
  min-width: 180px;
}

.workflow-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 14px;
  min-width: 0;
}

.workflow-task {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.workflow-task-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.workflow-task h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: capitalize;
}

.workflow-details.details {
  gap: 8px;
}

.workflow-details.details div {
  grid-template-columns: minmax(95px, 120px) minmax(0, 1fr);
  gap: 10px;
}

.workflow-task-form {
  display: grid;
  gap: 10px;
}

.workflow-task-form button {
  justify-self: start;
  min-width: 130px;
}

.stripe-create-form {
  margin-top: 14px;
}

.payload-preview {
  display: grid;
  gap: 12px;
}

.payload-preview h3 {
  margin: 10px 0 0;
  color: #263344;
  font-size: 14px;
  letter-spacing: 0;
}

.payload-preview pre {
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  color: #263344;
  font: 12.5px/1.55 ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
  -webkit-overflow-scrolling: touch;
}

.table-wrapper {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
}

.data-table {
  min-width: 820px;
}

.registrations-table,
.submissions-table {
  min-width: 980px;
}

.row-registrations-table {
  min-width: 1520px;
  table-layout: fixed;
}

.row-registrations-table th,
.row-registrations-table td {
  padding: 11px 10px;
}

.row-col-billing,
.row-cell-billing {
  width: 120px;
  min-width: 120px;
}

.row-col-participant,
.row-cell-participant {
  width: 150px;
}

.row-col-compact,
.row-cell-compact {
  width: 86px;
}

.row-col-contact {
  width: 220px;
}

.row-col-program {
  width: 170px;
}

.row-col-group {
  width: 170px;
}

.row-col-status {
  width: 130px;
}

.row-col-warning {
  width: 170px;
}

.row-col-date {
  width: 140px;
}

.row-cell-participant a,
.row-cell-program {
  font-weight: 700;
}

.contacts-table {
  min-width: 760px;
}

.audit-table {
  min-width: 900px;
}

.invoices-table {
  min-width: 1640px;
}

.players-table {
  min-width: 760px;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

td {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #1f2937;
}

.money-cell,
.money-heading {
  text-align: right;
}

.money-cell,
.money-heading,
.money-value {
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}

th {
  background: #f8faf9;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:hover {
  background: #f5faf6;
}

tr:last-child td {
  border-bottom: 0;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 10px 12px;
  margin: 0;
}

.details div {
  display: grid;
  grid-template-columns: minmax(122px, 0.48fr) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0, #fbfcfd 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 650;
}

.section > h2,
.two-column h2 {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
}

.breakable,
.id-link,
.id-value,
.date-value,
.long-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.id-link,
.id-value,
.date-value {
  display: inline-block;
  max-width: 100%;
  padding: 1px 5px;
  border-radius: 5px;
  background: #f3f6f5;
  color: #263344;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  line-height: 1.45;
}

.copy-url-input {
  width: min(100%, 760px);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.date-value {
  color: #394453;
}

.cell-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compact-detail-list {
  display: grid;
  gap: 4px;
  margin: 0;
}

.compact-detail-list div {
  display: grid;
  grid-template-columns: minmax(92px, max-content) minmax(0, 1fr);
  gap: 8px;
}

.compact-detail-list dt {
  color: var(--muted);
  font-weight: 700;
}

.compact-detail-list-inline {
  margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.compact-detail-list-inline div {
  grid-template-columns: minmax(74px, max-content) minmax(0, 1fr);
}

.long-text {
  white-space: pre-wrap;
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.manual-gate-list {
  display: grid;
  gap: 8px;
}

.manual-gate-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(280px, 0.9fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.manual-gate-label,
.manual-gate-detail {
  margin: 0;
}

.manual-gate-label {
  font-weight: 800;
}

.manual-gate-detail {
  margin-top: 3px;
  color: var(--muted);
}

.manual-gate-form {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.manual-gate-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.manual-gate-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.inline-action-form {
  grid-column: 3;
  justify-self: start;
}

@media (max-width: 900px) {
  .manual-gate-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .inline-action-form {
    grid-column: auto;
  }

  .manual-gate-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.status-pill,
.reason-token,
.warning-token,
.boolean-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.status-pill {
  background: var(--accent-soft);
  border-color: #b9dfc5;
  color: var(--accent-dark);
}

.status-pill-pending-review {
  background: #edf2f7;
  border-color: #c9d3df;
  color: #425466;
}

.status-pill-accepted {
  background: var(--success-soft);
  border-color: #a9d6b4;
  color: var(--success-text);
}

.status-pill-needs-information,
.status-pill-waitlisted {
  background: var(--warning-soft);
  border-color: #e7c978;
  color: var(--warning-text);
}

.status-pill-declined,
.status-pill-cancelled,
.status-pill-duplicate {
  background: var(--error-soft);
  border-color: #e0a4a4;
  color: var(--error-text);
}

.reason-token,
.warning-token,
.boolean-pill {
  background: var(--chip-bg);
  color: #394453;
}

.warning-token {
  border-color: #e7c76b;
  background: #fff8df;
  color: #74531a;
}

.program-readiness-pill {
  margin-right: 6px;
}

.program-registration-summary {
  margin-top: 12px;
}

.program-capacity-summary {
  margin-top: 12px;
}

.program-registration-pill {
  margin-right: 6px;
}

.program-capacity-pill {
  margin-right: 6px;
}

.program-readiness-ready {
  background: var(--success-soft);
  border-color: #a9d6b4;
  color: var(--success-text);
}

.program-readiness-needs_attention {
  background: #fff8df;
  border-color: #e7c76b;
  color: #74531a;
}

.program-readiness-not_ready {
  background: var(--error-soft);
  border-color: #e0a4a4;
  color: var(--error-text);
}

.program-registration-open {
  background: var(--success-soft);
  border-color: #a9d6b4;
  color: var(--success-text);
}

.program-registration-scheduled {
  background: #eef5ff;
  border-color: #b9cdec;
  color: #294f7a;
}

.program-registration-needs_setup,
.program-registration-paused {
  background: #fff8df;
  border-color: #e7c76b;
  color: #74531a;
}

.program-registration-closed {
  background: var(--error-soft);
  border-color: #e0a4a4;
  color: var(--error-text);
}

.readiness-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.registration-panel {
  background: #fcfdfb;
}

.capacity-panel {
  background: #fbfcff;
}

.readiness-panel h3,
.readiness-panel p {
  margin: 0;
}

.capacity-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.capacity-metrics span,
.capacity-cell span,
.capacity-cell strong {
  display: inline-flex;
  min-width: 0;
  overflow-wrap: anywhere;
}

.capacity-metrics span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #394453;
  font-size: 13px;
  font-weight: 700;
}

.capacity-cell {
  display: grid;
  gap: 3px;
  min-width: 130px;
}

.capacity-cell span {
  color: var(--muted);
  font-size: 12px;
}

.program-capacity-available {
  background: var(--success-soft);
  border-color: #a9d6b4;
  color: var(--success-text);
}

.program-capacity-near_capacity {
  background: #fff8df;
  border-color: #e7c76b;
  color: #74531a;
}

.program-capacity-at_capacity {
  background: #eef5ff;
  border-color: #b9cdec;
  color: #294f7a;
}

.program-capacity-over_capacity {
  background: var(--error-soft);
  border-color: #e0a4a4;
  color: var(--error-text);
}

.program-capacity-unknown_capacity {
  background: var(--chip-bg);
  border-color: var(--line-strong);
  color: #394453;
}

.program-groups-table {
  min-width: 1120px;
}

.program-groups-table th,
.program-groups-table td {
  vertical-align: top;
}

.program-groups-table th:nth-child(1),
.program-groups-table td:nth-child(1) {
  min-width: 170px;
}

.program-groups-table th:nth-child(2),
.program-groups-table td:nth-child(2) {
  min-width: 105px;
}

.program-groups-table th:nth-child(6),
.program-groups-table td:nth-child(6) {
  min-width: 145px;
}

.program-group-save-button {
  white-space: nowrap;
}

.readiness-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.missing-group-badge {
  background: #fff7e6;
  border-color: #e4c46d;
  color: #765314;
}

.status-transition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.transition-arrow {
  color: var(--muted);
  font-weight: 700;
}

.empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
}

.waiver-detail-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.waiver-detail-callout {
  border-left: 4px solid #d99e1f;
  padding-block: 10px;
}

.waiver-detail-status-hero {
  border-color: #c9d8d3;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.waiver-detail-heading {
  align-items: start;
}

.waiver-detail-heading p,
.waiver-detail-panel-heading p {
  margin: 2px 0 0;
  color: var(--muted);
}

.waiver-detail-grid,
.waiver-detail-action-grid,
.waiver-detail-status-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.waiver-detail-grid-identity,
.waiver-detail-grid-email {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.waiver-detail-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.waiver-detail-status-tile {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.waiver-detail-status-tile strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.waiver-detail-status-good {
  border-color: #9ccfaa;
  background: var(--success-soft);
}

.waiver-detail-status-alert {
  border-color: #e4c46d;
  background: #fff8df;
}

.waiver-detail-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.waiver-detail-blocker-list,
.compact-list {
  margin: 0;
  padding-left: 18px;
}

.waiver-detail-blocker-list li + li,
.compact-list li + li {
  margin-top: 4px;
}

.waiver-detail-card {
  margin-top: 0;
}

.waiver-detail-medical-card {
  border-color: #dec15d;
  background: #fffdf7;
}

.waiver-detail-medical-list {
  gap: 8px;
}

.waiver-detail-medical-list div {
  padding: 10px;
  border: 1px solid rgba(222, 193, 93, 0.4);
  border-radius: 8px;
  background: #ffffff;
}

.waiver-detail-medical-list div:last-child {
  border-bottom: 1px solid rgba(222, 193, 93, 0.4);
}

.waiver-detail-medical-list .waiver-detail-medical-attention {
  border-color: #d7b94f;
  background: #fffaf0;
}

.waiver-detail-medical-value {
  display: grid;
  gap: 5px;
}

.waiver-detail-attention-label {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid #d7b94f;
  border-radius: 999px;
  background: #fff5d4;
  color: #6f5412;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.waiver-detail-muted-value {
  color: var(--muted);
}

.waiver-detail-final-form-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.waiver-final-form-shell .waiver-form {
  display: grid;
  gap: 12px;
}

.waiver-final-form-shell .card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.waiver-final-form-shell .card-heading {
  display: grid;
  gap: 4px;
}

.waiver-final-form-shell .card-heading h2 {
  margin: 0;
  font-size: 17px;
}

.waiver-final-form-shell .section-kicker,
.waiver-final-form-shell .summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.waiver-final-form-shell .section-intro,
.waiver-final-form-shell .field-hint {
  margin: 0;
  color: var(--muted);
}

.waiver-final-form-shell .section-copy {
  display: grid;
  gap: 8px;
  max-width: 76ch;
  color: #26343d;
}

.waiver-final-form-shell .section-copy p {
  margin: 0;
}

.waiver-final-form-shell label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.waiver-final-form-shell .field-stack,
.waiver-final-form-shell .signature-box {
  display: grid;
  gap: 12px;
}

.waiver-final-form-shell .signature-box {
  padding: 14px;
  border: 1px solid #cfe2df;
  border-radius: 8px;
  background: #ffffff;
}

.waiver-final-form-shell .checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 54px;
  padding: 13px;
  border: 1px solid #cbd3d9;
  border-radius: 8px;
  background: #f1f3f5;
  color: #44515b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: default;
}

.waiver-final-form-shell .checkbox-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.waiver-final-form-shell input,
.waiver-final-form-shell textarea,
.waiver-final-form-shell input:disabled,
.waiver-final-form-shell textarea:disabled {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd3d9;
  border-radius: 8px;
  background: #eef1f3;
  color: #34424d;
  cursor: not-allowed;
  font: inherit;
  opacity: 1;
}

.waiver-final-form-shell textarea {
  min-height: 96px;
  resize: vertical;
}

.waiver-final-form-shell input[type="checkbox"],
.waiver-final-form-shell input[type="checkbox"]:disabled {
  width: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: #63727c;
  flex: 0 0 auto;
}

.waiver-final-form-shell .medical-card {
  border-color: #dec15d;
  background: #fffdf7;
}

.waiver-final-form-shell .signature-card {
  border-color: #b7ddd8;
  background: #f8fbfa;
}

.waiver-detail-action-grid {
  grid-template-columns: minmax(0, 1fr);
}

.waiver-detail-action-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.waiver-detail-panel-heading {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.waiver-detail-panel-heading h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.waiver-detail-inline-callout {
  margin: 0;
  background: #ffffff;
  font-size: 13px;
}

.waiver-detail-compact-details {
  gap: 7px;
}

.waiver-detail-compact-details div {
  grid-template-columns: minmax(118px, 150px) minmax(0, 1fr);
  gap: 9px;
}

.waiver-detail-form.review-form,
.waiver-detail-form.upload-form {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  margin-top: 0;
}

.waiver-detail-form.review-form .button-row,
.waiver-detail-form.upload-form .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  align-items: end;
}

.waiver-detail-form.review-form button,
.waiver-detail-form.upload-form button {
  min-width: 0;
}

.waiver-detail-empty-state {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.42;
}

section.waiver-detail-empty-state {
  display: grid;
  gap: 3px;
}

.waiver-detail-empty-state strong {
  color: var(--text);
}

.waiver-detail-delivery-summary {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.waiver-detail-meta-card {
  background: #fbfcfd;
}

.waiver-detail-evidence-summary {
  color: #44505d;
  font-size: 13px;
}

.waiver-detail-timeline {
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 8px;
}

.waiver-detail-timeline div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

@media (max-width: 760px) {
  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .topbar-main {
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 12px;
  }

  .topbar-brand-title {
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar-brand img {
    width: 40px;
    height: 40px;
  }

  .topbar-heading {
    flex: 1 1 100%;
    padding-left: 0;
    border-left: 0;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .topbar-nav-rows {
    padding: 0 16px 14px;
  }

  .topbar-menu-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }

  .topbar-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    color: var(--accent-dark);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
  }

  .topbar-menu-content {
    display: none;
  }

  .topbar-menu-toggle:checked ~ .topbar-menu-content {
    display: grid;
  }

  .menu-icon {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 12px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .menu-icon::before {
    position: absolute;
    top: 3px;
    left: 0;
    width: 18px;
    border-top: 2px solid currentColor;
    content: "";
  }

  .nav,
  .topbar-operator-nav,
  .topbar-operator-nav .operator-nav {
    width: 100%;
    max-width: 100%;
  }

  .nav,
  .topbar-operator-nav .operator-nav {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .nav a,
  .topbar-operator-nav .operator-nav a {
    flex: 1 1 150px;
  }

  .content {
    width: calc(100% - 20px);
    margin-top: 16px;
  }

  .section {
    padding: 14px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .filters button,
  .review-form button,
  .workflow-task-form button {
    width: 100%;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .review-form {
    grid-template-columns: 1fr;
  }

  .program-group-form {
    grid-template-columns: 1fr;
  }

  .broadcast-compose-form .form-grid {
    grid-template-columns: 1fr;
  }

  .broadcast-recipient-table-wrap {
    overflow-x: visible;
    border: 0;
  }

  .broadcast-recipient-table-wrap table,
  .broadcast-recipient-table-wrap thead,
  .broadcast-recipient-table-wrap tbody,
  .broadcast-recipient-table-wrap tr,
  .broadcast-recipient-table-wrap th,
  .broadcast-recipient-table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .broadcast-recipient-table-wrap thead {
    display: none;
  }

  .broadcast-recipient-table-wrap tr {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  .broadcast-recipient-table-wrap td {
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .broadcast-recipient-table-wrap td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .broadcast-recipient-table-wrap td:nth-child(1)::before {
    content: "Select";
  }

  .broadcast-recipient-table-wrap td:nth-child(2)::before {
    content: "Parent/contact";
  }

  .broadcast-recipient-table-wrap td:nth-child(3)::before {
    content: "Email";
  }

  .broadcast-recipient-table-wrap td:nth-child(4)::before {
    content: "Programs";
  }

  .broadcast-recipient-table-wrap td:nth-child(5)::before {
    content: "Groups";
  }

  .broadcast-recipient-table-wrap td:nth-child(6)::before {
    content: "Statuses";
  }

  .broadcast-recipient-table-wrap td:nth-child(7)::before {
    content: "Registrations";
  }

  .broadcast-review-table-wrap td:nth-child(1)::before {
    content: "Approve";
  }

  .broadcast-review-table-wrap td:nth-child(2)::before {
    content: "Cancel";
  }

  .broadcast-review-table-wrap td:nth-child(3)::before {
    content: "Parent/contact";
  }

  .broadcast-review-table-wrap td:nth-child(4)::before {
    content: "Email";
  }

  .broadcast-review-table-wrap td:nth-child(5)::before {
    content: "Status";
  }

  .broadcast-review-table-wrap td:nth-child(6)::before {
    content: "Queued";
  }

  .broadcast-review-table-wrap td:nth-child(7)::before {
    content: "Attempts";
  }

  .broadcast-review-table-wrap td:nth-child(8)::before {
    content: "Provider";
  }

  .broadcast-review-table-wrap td:nth-child(9)::before {
    content: "Sent/failed";
  }

  .broadcast-review-table-wrap td:nth-child(10)::before {
    content: "Failure";
  }

  .broadcast-review-table-wrap td:nth-child(11)::before {
    content: "Registrations";
  }

  .broadcast-confirm-grid {
    grid-template-columns: 1fr;
  }

  .broadcast-content-review-grid,
  .broadcast-approve-actions {
    grid-template-columns: 1fr;
  }

  .program-group-form button {
    width: 100%;
  }

  .manual-adjustment-row {
    grid-template-columns: 1fr;
  }

  .details div {
    grid-template-columns: 1fr;
  }

  .workflow-details.details div {
    grid-template-columns: 1fr;
  }

  .waiver-detail-grid-identity,
  .waiver-detail-grid-email,
  .waiver-detail-status-grid {
    grid-template-columns: 1fr;
  }

  .waiver-detail-status-tile {
    min-height: 0;
  }

  .waiver-detail-compact-details div {
    grid-template-columns: 1fr;
  }

  .waiver-detail-form.review-form,
  .waiver-detail-form.upload-form {
    grid-template-columns: 1fr;
  }

  .waiver-detail-form.review-form button,
  .waiver-detail-form.upload-form button {
    width: 100%;
  }
}

@media print {
  .waiver-detail-status-hero,
  .waiver-detail-card,
  .waiver-detail-action-panel,
  .waiver-detail-status-tile,
  .waiver-detail-timeline div {
    background: #ffffff;
    box-shadow: none;
  }
}
