:root {
  --ink: #2f3a44;
  --muted: #6a747e;
  --line: #dce4eb;
  --panel: #fff;
  --soft: #f6f9fb;
  --accent: #71879a;
  --accent-dark: #536a7d;
  --danger: #a94141;
  --danger-soft: #f8e4e4;
  --warning: #9a6b25;
  --warning-soft: #f8edda;
  --good: #35724a;
  --good-soft: #e3f1e7;
  --shadow: 0 10px 32px rgba(39, 49, 59, 0.08);
  font-family: "Segoe UI", Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(22, 131, 247, 0.3);
  outline-offset: 2px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 13px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand {
  color: var(--accent-dark);
  font-size: 19px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.brand span {
  color: var(--muted);
}
.main-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.nav-button,
.segmented button {
  border: 0;
  border-radius: 7px;
  padding: 10px 15px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.nav-button.active,
.segmented button.active {
  background: #e8eef2;
  color: var(--ink);
}
.button {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 11px 17px;
  font-weight: 800;
  background: #edf2f5;
  color: var(--ink);
}
.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 7px 18px rgba(83, 106, 125, 0.2);
}
.button.ghost {
  background: #fff;
  border-color: var(--line);
}
.button.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.button.small {
  padding: 8px 11px;
  font-size: 13px;
}
.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 64px;
}
.workspace {
  display: none;
}
.workspace.active {
  display: block;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 20px;
}
.page-head h1 {
  margin: 0;
  color: #66798b;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1;
}
.page-head p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.filters,
.inline-create {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 18px;
  margin-bottom: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
}
label {
  display: block;
  color: #4e5964;
  font-weight: 700;
}
label span,
.filters label span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}
input,
select {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #aeb8c2;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.search-field {
  flex: 1;
}
.filters label:not(.search-field) {
  min-width: 190px;
}
.inline-create label {
  flex: 1;
}
.state-card {
  padding: 22px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.state-card[hidden] {
  display: none;
}
.card-list,
.source-list {
  display: grid;
  gap: 10px;
}
.data-card {
  display: grid;
  grid-template-columns:
    minmax(170px, 1fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr)
    auto;
  align-items: center;
  gap: 18px;
  padding: 17px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(39, 49, 59, 0.05);
}
.data-card h3 {
  margin: 0 0 5px;
  font-size: 18px;
}
.data-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.badge {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf2f5;
  color: #53606b;
  font-size: 12px;
  font-weight: 900;
}
.badge.active,
.badge.completed,
.badge.v2 {
  background: var(--good-soft);
  color: var(--good);
}
.badge.blocked,
.badge.abandoned {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge.assigned,
.badge.in_progress {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge.legacy,
.badge.cancelled {
  background: #eef0f2;
  color: #66717c;
}
.pager {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
}
.pager button {
  min-width: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}
.pager button.active {
  background: var(--accent);
  color: #fff;
}
.source-row {
  display: grid;
  grid-template-columns: 1fr 120px 180px;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.source-meta {
  color: var(--muted);
  font-size: 13px;
}
.segmented {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
}
.notice {
  position: fixed;
  right: 22px;
  top: 78px;
  z-index: 50;
  max-width: 440px;
  padding: 13px 16px;
  border-radius: 8px;
  background: #263846;
  color: #fff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}
.notice.error {
  background: #8d3434;
}
.dialog {
  width: min(920px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 28px 90px rgba(18, 37, 50, 0.28);
  overflow: auto;
}
.dialog::backdrop {
  background: rgba(24, 40, 52, 0.58);
}
.small-dialog {
  max-width: 560px;
}
.dialog > form,
.dialog > div {
  padding: 28px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.dialog h2 {
  margin: 0;
  font-size: 28px;
}
.icon-button {
  border: 0;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  color: var(--muted);
}
.dialog label + label {
  margin-top: 16px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.detail-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.detail-section:first-of-type {
  border-top: 0;
}
.detail-section h3 {
  margin: 0 0 14px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.detail-item {
  padding: 12px;
  background: #f7f9fb;
  border-radius: 7px;
}
.detail-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}
.credentials {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}
.credential-message {
  width: 100%;
  min-height: 132px;
  padding: 14px 16px;
  resize: none;
  border: 1px solid #aeb8c2;
  border-radius: 7px;
  background: #f7f9fb;
  color: var(--ink);
  font:
    700 15px/1.55 "Segoe UI",
    Arial,
    sans-serif;
}
.credentials .button {
  min-height: 46px;
  white-space: nowrap;
}
.participant-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.compact-access {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f9fb;
}
.compact-access-values {
  display: grid;
  gap: 2px;
}
.compact-access code {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}
.assignment-row {
  display: grid;
  grid-template-columns: 90px 130px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.scores {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.score {
  padding: 11px;
  text-align: center;
  background: #f2f5f7;
  border-radius: 7px;
}
.score strong {
  display: block;
  font-size: 20px;
}
.quality {
  padding: 13px;
  border-radius: 7px;
  background: var(--warning-soft);
  color: #76511d;
}
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafb 0 52%, #eaf1f4 52%);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(40px, 8vw, 120px);
  width: min(1120px, calc(100% - 40px));
  margin: auto;
}
.login-brand img {
  width: 190px;
  margin-bottom: 56px;
}
.login-brand h1 {
  font-size: clamp(48px, 6vw, 78px);
  line-height: 0.94;
  margin: 0 0 28px;
  text-transform: uppercase;
}
.login-brand > p:last-child {
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}
.login-card {
  padding: clamp(28px, 5vw, 52px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.login-card h2 {
  font-size: 32px;
  margin: 0 0 28px;
}
.login-card label {
  margin: 18px 0;
}
.login-card button {
  width: 100%;
  margin-top: 8px;
}
.back {
  display: block;
  margin-top: 24px;
  color: var(--muted);
  text-decoration: none;
}
.error {
  padding: 12px 14px;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger);
}
@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 11px 14px;
  }
  .main-nav {
    grid-column: 1/-1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .brand {
    font-size: 15px;
  }
  .admin-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }
  .page-head,
  .filters,
  .inline-create {
    display: block;
  }
  .page-head .button,
  .filters label,
  .inline-create .button {
    width: 100%;
    margin-top: 12px;
  }
  .data-card,
  .source-row,
  .assignment-row {
    grid-template-columns: 1fr;
  }
  .card-actions {
    justify-content: flex-start;
  }
  .detail-grid,
  .credentials,
  .scores {
    grid-template-columns: 1fr;
  }
  .participant-head {
    align-items: flex-start;
  }
  .participant-head-actions {
    align-items: flex-end;
  }
  .compact-access {
    display: grid;
    justify-items: start;
  }
  .compact-access .button {
    width: 100%;
  }
  .dialog > form,
  .dialog > div {
    padding: 20px;
  }
  .login-shell {
    grid-template-columns: 1fr;
    padding: 28px 0;
  }
  .login-brand {
    display: none;
  }
}

/* Sprint 2: product composition */
:root {
  --ink: #172b3a;
  --muted: #536878;
  --accent: #1769aa;
  --accent-dark: #0f548d;
  --soft: #f3f7fa;
}
.button {
  min-height: 44px;
}
.button.primary {
  background: var(--accent);
  box-shadow: 0 7px 18px rgba(23, 105, 170, 0.2);
}
.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #f2b84b;
  outline-offset: 2px;
  box-shadow: none;
}
.page-head h1 {
  color: var(--ink);
}
.row-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.participant-row,
.result-row {
  grid-template-columns:
    minmax(250px, 1.35fr) minmax(160px, 0.8fr) minmax(180px, 0.8fr)
    auto;
  padding: 15px 18px;
  border-radius: 12px;
  box-shadow: none;
}
.row-identity p,
.row-source p,
.row-status p,
.row-date p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
}
.row-open {
  white-space: nowrap;
}

.overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin: 10px 0 28px;
}
.overview-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02;
}
.overview-head p:last-child {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.overview-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.overview-metrics button {
  display: grid;
  gap: 8px;
  min-height: 178px;
  padding: 24px;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 14px;
  background: #fff;
}
.overview-metrics button:hover {
  border-color: #8bb9dc;
  transform: translateY(-1px);
}
.overview-metrics span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.overview-metrics strong {
  font-size: 48px;
  line-height: 1;
}
.overview-metrics small {
  align-self: end;
  color: var(--muted);
  font-size: 14px;
}
.overview-next {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) 1.3fr;
  gap: 30px;
  margin-top: 22px;
  padding: 28px;
  border-radius: 14px;
  background: #102a43;
  color: #fff;
}
.overview-next h2 {
  margin: 0;
  font-size: 28px;
}
.overview-next .eyebrow {
  color: #8fc8f1;
}
.overview-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.overview-actions button {
  min-height: 112px;
  padding: 17px;
  text-align: left;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}
.overview-actions strong,
.overview-actions span {
  display: block;
}
.overview-actions span {
  margin-top: 7px;
  color: #d7e5ef;
  font-size: 13px;
  line-height: 1.4;
}

.participant-sheet {
  width: min(780px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px 0 0 20px;
}
.participant-sheet::backdrop {
  background: rgba(16, 42, 67, 0.5);
  backdrop-filter: blur(2px);
}
.participant-sheet #participantContent {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}
.participant-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px max(28px, calc((100% - 680px) / 2)) 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.participant-head h2 {
  max-width: 620px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.sheet-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
}
.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f4f7f9;
  font-size: 28px;
  line-height: 1;
}
.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 28px 36px;
}
.sheet-body > section,
.sheet-body > form {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
}
.detail-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.detail-section h3,
.one-time-access h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}
.section-kicker {
  margin: 0 0 5px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.detail-section .section-heading {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
}
.detail-section .section-heading > div {
  grid-column: span 8;
}
.detail-section .section-heading > .button {
  grid-column: span 4;
  width: 100%;
}
.access-section {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
}
.compact-access {
  max-width: 420px;
}
.access-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.one-time-access {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 22px;
  margin: 22px 0 0;
  border: 2px solid #d4a53c;
  border-radius: 12px;
  background: #fff9e9;
}
.one-time-access[hidden] {
  display: none;
}
.one-time-access p:not(.section-kicker) {
  margin: 7px 0 0;
  color: #614a1c;
  line-height: 1.45;
}
.one-time-access .button {
  justify-self: start;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 22px;
}
.service-grid > label {
  grid-column: span 4;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 22px;
}
.profile-grid > label {
  grid-column: span 6;
}
.service-grid > label,
.profile-grid > label {
  display: grid;
  grid-template-rows: 22px 46px;
  align-self: start;
  align-content: start;
  margin-top: 0;
}
.participant-sheet .service-grid > label,
.participant-sheet .profile-grid > label {
  margin-top: 0;
}
.service-grid > label > span,
.profile-grid > label > span {
  height: 22px;
  margin: 0;
  line-height: 16px;
}
.service-grid input,
.service-grid select,
.profile-grid input,
.profile-grid select {
  height: 46px;
  min-height: 46px;
}
.sheet-empty {
  display: grid;
  gap: 7px;
  padding: 22px;
  color: var(--muted);
  border: 1px dashed #b9c6d0;
  border-radius: 10px;
  background: #f7fafc;
  line-height: 1.45;
}
.sheet-empty strong {
  color: var(--ink);
}
.assignments-section .assignment-row {
  grid-template-columns: minmax(170px, 0.7fr) 1fr auto;
  gap: 18px;
  padding: 16px 0;
}
.assignment-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.assignment-summary {
  display: grid;
  gap: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.login-shell {
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: clamp(44px, 7vw, 90px);
  width: min(980px, calc(100% - 40px));
}
.login-brand img {
  width: 150px;
  margin-bottom: 34px;
}
.login-brand h1 {
  max-width: 560px;
  margin: 0 0 20px;
  color: var(--ink);
  font-size: clamp(40px, 5vw, 58px);
  line-height: 1.02;
  text-transform: none;
}
.login-brand h1 span {
  color: var(--accent);
  white-space: nowrap;
}
.login-card {
  padding: 36px;
  border-radius: 16px;
}
.login-card h2 {
  margin-bottom: 22px;
}
.login-card form {
  display: grid;
  gap: 16px;
}
.login-card label {
  display: grid;
  gap: 8px;
  margin: 0;
}
.login-card label span {
  margin: 0;
}
.login-card button {
  margin-top: 2px;
}

@media (max-width: 760px) {
  .overview-head {
    display: block;
    margin-top: 0;
  }
  .overview-head .button {
    width: 100%;
    margin-top: 18px;
  }
  .overview-head h1 {
    font-size: 38px;
  }
  .overview-metrics {
    grid-template-columns: 1fr;
  }
  .overview-metrics button {
    min-height: 116px;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .overview-metrics strong {
    grid-column: 2;
    grid-row: 1/3;
    font-size: 42px;
  }
  .overview-metrics small {
    align-self: auto;
  }
  .overview-next {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .overview-actions {
    grid-template-columns: 1fr;
  }
  .overview-actions button {
    min-height: 88px;
  }
  .participant-row,
  .result-row {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 18px;
  }
  .participant-row > div:not(:last-child),
  .result-row > div:not(:last-child) {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  .row-open,
  .participant-row .card-actions,
  .result-row .card-actions {
    width: 100%;
  }
  .participant-sheet {
    width: 100vw;
    border-radius: 0;
  }
  .participant-head {
    position: sticky;
    top: 0;
    padding: 18px 16px 15px;
  }
  .participant-head h2 {
    font-size: 25px;
  }
  .sheet-subtitle {
    font-size: 13px;
  }
  .sheet-body {
    padding: 0 16px 36px;
  }
  .access-section {
    grid-template-columns: 1fr;
  }
  .compact-access {
    width: 100%;
    align-items: start;
  }
  .detail-section .section-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .detail-section .section-heading > div,
  .detail-section .section-heading > .button {
    grid-column: 1;
  }
  .detail-section .section-heading .button {
    width: 100%;
  }
  .service-grid,
  .profile-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 20px;
  }
  .service-grid > label,
  .profile-grid > label {
    grid-column: 1;
  }
  .assignments-section .assignment-row {
    grid-template-columns: 1fr;
  }
  .assignments-section .card-actions,
  .assignments-section .button {
    width: 100%;
  }
  .login-shell {
    grid-template-columns: 1fr;
    align-content: center;
    width: min(100% - 24px, 440px);
    padding: 20px 0;
  }
  .login-brand {
    display: block;
  }
  .login-brand img {
    width: 112px;
    margin-bottom: 18px;
  }
  .login-brand .eyebrow,
  .login-brand > p:last-child {
    display: none;
  }
  .login-brand h1 {
    margin: 0;
    font-size: 29px;
  }
  .login-card {
    padding: 26px 22px;
  }
}
@media (min-width: 761px) and (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 11px 18px;
  }
  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    overflow-x: auto;
  }
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .filters .search-field {
    grid-column: 1 / -1;
  }
  .filters label:not(.search-field) {
    min-width: 0;
  }
  .participant-row,
  .result-row {
    grid-template-columns: 1fr 1fr;
  }
  .participant-row .card-actions,
  .result-row .card-actions,
  .participant-row .row-open,
  .result-row .row-open {
    width: 100%;
  }
}
@media (max-width: 350px) {
  .admin-shell {
    width: calc(100% - 16px);
  }
  .topbar {
    gap: 10px;
    padding-inline: 9px;
  }
  .topbar > * {
    min-width: 0;
  }
  .main-nav {
    width: 100%;
    max-width: calc(100vw - 18px);
  }
  .nav-button {
    padding-inline: 11px;
  }
  .participant-head {
    padding-inline: 12px;
  }
  .sheet-body {
    padding-inline: 12px;
  }
  .login-shell {
    width: calc(100% - 16px);
  }
  .login-card {
    padding-inline: 18px;
  }
}
.confirm-field {
  margin-top: 16px;
}
.confirm-field[hidden] {
  display: none;
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.danger-zone h3 {
  color: var(--danger);
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
#printArea {
  display: none;
}
@media print {
  @page {
    size: A4;
    margin: 12mm;
  }
  body > *:not(#printArea) {
    display: none !important;
  }
  body {
    background: #fff !important;
  }
  #printArea {
    display: block;
    color: #1d2731;
    font-size: 12px;
  }
  #printArea * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    margin-bottom: 14px;
    border-bottom: 2px solid #1d2731;
  }
  .print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
  }
  .print-brand img {
    height: 38px;
  }
  #printArea h1 {
    margin: 0 0 10px;
    font-size: 22px;
  }
  .print-facts {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
  }
  .print-facts .detail-item {
    flex: 1;
    padding: 8px 10px;
  }
  .print-chart {
    margin-bottom: 14px;
    break-inside: avoid;
  }
  .print-chart .admin-line-chart {
    min-width: 0;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    break-inside: avoid;
  }
  .print-table th,
  .print-table td {
    padding: 4px 8px;
    border-bottom: 1px solid #d5dbe1;
    text-align: left;
  }
  .print-table .code,
  .print-table .score {
    font-weight: 800;
  }
  .print-table .score {
    text-align: center;
  }
  .print-table .score.manic {
    background: #ffd800;
  }
  .print-note {
    margin-top: 8px;
    color: #5b6670;
    font-size: 11px;
  }
}
