@font-face {
  font-family: Inter;
  src: url("/assets/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  font-family: Inter, system-ui, sans-serif;
  color: #172339;
  background: #f3f5f9;
  --ink: #172339;
  --muted: #59687e;
  --subtle: #6b788d;
  --line: #e2e7ef;
  --surface: #fff;
  --accent: #5147d8;
  --accent-hover: #4238bd;
  --accent-light: #efedff;
  --navy: #172238;
  --green: #087653;
  --amber: #995700;
  --radius: 13px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #8b83fa;
  outline-offset: 2px;
}
.icon { width: 18px; height: 18px; flex: none; display: block; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.muted { color: var(--subtle); }

.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky;
  inset-block-start: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: #fff;
  padding: 25px 14px 18px;
}
.brand { display: flex; align-items: center; gap: 11px; margin: 0 7px 44px; }
.brand-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  color: #fff;
  border: 1px solid #8278fa;
  border-radius: 11px;
  background: linear-gradient(145deg, #7469f2, #5146d4);
  box-shadow: 0 3px 8px #070a202f, inset 0 1px 0 #ffffff2b;
}
.brand-icon .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.brand-text { display: grid; gap: 3px; }
.brand-text strong { font-size: 1.035rem; font-weight: 720; letter-spacing: -.025em; }
.brand-text span { color: #aebad0; font-size: .76rem; }
.primary-nav { display: grid; gap: 5px; }
.nav-label {
  color: #a4b2cc;
  font-size: .7rem;
  font-weight: 690;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 11px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: 100%;
  text-align: left;
  color: #c8d1e3;
  font-size: .875rem;
  font-weight: 520;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
}
.nav-item .icon { stroke-width: 1.8; }
.nav-item:hover { color: #fff; background: #222e47; }
.nav-item.active {
  background: #303457;
  color: #f5f3ff;
  border-color: #414570;
  font-weight: 630;
}
.nav-item.active .icon { color: #beb7ff; }
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #35405a;
  padding: 17px 5px 0;
  margin-top: auto;
}
.profile-avatar, .account-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  color: #f0ebff;
  background: #3b3b60;
  border: 1px solid #55537a;
  border-radius: 50%;
  font-size: .77rem;
  font-weight: 700;
}
.profile-text { display: grid; gap: 4px; min-width: 0; }
.profile-text strong { font-size: .855rem; font-weight: 640; }
.profile-text span { color: #afbad1; font-size: .75rem; }

.main-shell { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 63px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-inline: 29px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .875rem; }
.breadcrumbs strong { color: var(--ink); font-weight: 650; }
.breadcrumbs .icon { width: 14px; height: 14px; color: #8491a5; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 13px;
  text-decoration: none;
  white-space: nowrap;
  font-size: .875rem;
  font-weight: 640;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.button .icon { width: 16px; height: 16px; }
.button-outline { color: #344259; background: #fff; border-color: #dce3ed; }
.button-outline:hover { background: #f7f8fb; border-color: #c5cedd; }
.button-primary { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 2px 3px #26178113; }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button:disabled { opacity: .55; pointer-events: none; }
.account-picker { position: relative; }
.demo-toggle { min-height: 35px; padding-inline: 10px; }
.demo-toggle .icon { width: 14px; height: 14px; color: var(--subtle); }
.demo-dot { background: #7063e8; height: 7px; width: 7px; border-radius: 50%; flex: none; }
.account-menu {
  position: absolute;
  z-index: 6;
  inset-block-start: calc(100% + 9px);
  inset-inline-end: 0;
  width: 247px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 14px 32px #1b28402c;
}
.account-menu-title { padding: 7px 9px; color: var(--muted); font-size: .77rem; font-weight: 625; }
.account-option {
  display: grid;
  grid-template-columns: 33px 1fr auto;
  gap: 9px;
  align-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  width: 100%;
  padding: 7px;
  text-align: left;
  color: var(--ink);
}
.account-option:hover, .account-option[aria-current] { background: #f3f1ff; }
.account-avatar { width: 33px; height: 33px; border-color: #e2deff; background: #eae7ff; color: #5348c0; }
.account-option strong { display: block; font-size: .875rem; font-weight: 650; }
.account-option small { display: block; margin-top: 3px; font-size: .76rem; color: var(--muted); }
.account-check { color: var(--accent); width: 16px; height: 16px; }

.workspace { max-width: 1650px; margin: 0 auto; padding: 28px 29px 35px; }
.page-heading { margin-bottom: 24px; }
.eyebrow { color: #5549cb; font-size: .76rem; text-transform: uppercase; letter-spacing: .095em; font-weight: 725; }
.page-heading h1 {
  margin-top: 7px;
  font-size: clamp(2rem, 3vw, 2.48rem);
  line-height: 1.12;
  font-weight: 755;
  letter-spacing: -.05em;
}
.page-heading p { margin-top: 8px; color: var(--muted); font-size: 1rem; line-height: 1.45; }

.judge-grid { display: grid; grid-template-columns: minmax(192px, .72fr) minmax(0, 1.6fr) minmax(296px, 1fr); gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 5px #17233905; min-width: 0; }
.panel h2 { font-size: 1rem; font-weight: 710; letter-spacing: -.018em; }
.panel-heading-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.assignment-panel { display: flex; flex-direction: column; }
.assignment-heading { padding: 17px 15px 15px; border-bottom: 1px solid var(--line); }
.count-chip {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--accent-light);
  color: #5448c0;
  font-size: .77rem;
  line-height: 1.45;
  font-weight: 720;
}
.progress-summary { display: flex; justify-content: space-between; gap: 6px; margin: 15px 0 7px; color: var(--muted); font-size: .8rem; }
.progress-summary strong { color: var(--accent); font-weight: 720; }
.progress-bar {
  display: block;
  border: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 20px;
  overflow: hidden;
  background: #ecedf4;
  color: var(--accent);
}
.progress-bar::-webkit-progress-bar { background: #ecedf4; border-radius: 20px; }
.progress-bar::-webkit-progress-value { background: currentColor; border-radius: 20px; }
.progress-bar::-moz-progress-bar { background: currentColor; border-radius: 20px; }
.assignment-list { display: grid; gap: 3px; align-content: start; overflow: auto; max-height: 450px; padding: 8px; }
.assignment-item {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 12px 9px 12px 10px;
  min-height: 65px;
  text-align: left;
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
}
.assignment-item:hover { background: #f7f8fc; }
.assignment-item.selected { border-color: #dcd7ff; background: #f1efff; }
.assignment-item.selected::before {
  content: "";
  position: absolute;
  inset: 11px auto 11px -1px;
  width: 3px;
  background: var(--accent);
  border-radius: 3px;
}
.assignment-info { display: grid; min-width: 0; gap: 4px; }
.assignment-id { color: var(--subtle); font-size: .75rem; font-weight: 650; letter-spacing: .04em; }
.assignment-info strong { font-weight: 650; font-size: .875rem; overflow-wrap: anywhere; }
.selected .assignment-id { color: var(--accent); }
.queue-status { flex: none; }
.queue-status .icon { width: 16px; height: 16px; stroke-width: 1.75; }
.queue-pending { color: #a0aab9; }
.queue-draft { color: #b47019; }
.queue-submitted { color: #19906d; }
.queue-empty { padding: 12px 8px; color: var(--muted); font-size: .875rem; }

.recording-panel { display: flex; flex-direction: column; padding: 19px; }
.audition-heading { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.audition-heading > div { min-width: 0; }
.audition-meta { display: flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 680; font-size: .8rem; line-height: 1.3; }
.audition-meta > span { width: 4px; height: 4px; background: #a59ded; border-radius: 50%; }
.audition-heading h2 { font-size: clamp(1.26rem, 2vw, 1.54rem); font-weight: 740; letter-spacing: -.035em; margin: 5px 0 4px; overflow-wrap: anywhere; }
.audition-heading p { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  max-width: fit-content;
  color: #4d5a6d;
  background: #eef1f6;
  padding: 5px 8px;
  border-radius: 50px;
  font-size: .77rem;
  font-weight: 630;
  white-space: nowrap;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #8795a8; }
.status-draft { color: var(--amber); background: #fff2de; }
.status-draft .status-dot { background: #cf8b31; }
.status-submitted { color: var(--green); background: #e7f6ee; }
.status-submitted .status-dot { background: #329a73; }
.status-unassigned { color: #8e4b49; background: #fdeceb; }
.status-unassigned .status-dot { background: #ce7573; }
.video-label { display: flex; gap: 7px; align-items: center; margin-bottom: 9px; }
.video-label .icon { width: 16px; height: 16px; color: #64738b; stroke-width: 1.8; }
.video-label h3 { font-size: .875rem; font-weight: 655; }
.video-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  min-height: 192px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #26354f;
  background: radial-gradient(ellipse at 50% 42%, #263553, #172238 66%, #131e31);
}
.video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#c6d5ff25 .65px, transparent .65px);
  background-size: 15px 15px;
  mask-image: radial-gradient(ellipse, #0008, #0000 74%);
  pointer-events: none;
}
.video-frame iframe { position: absolute; inset: 0; border: 0; width: 100%; height: 100%; }
.video-empty { display: grid; justify-items: center; gap: 8px; padding: 12px; text-align: center; position: relative; }
.video-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  border: 1px solid #566386;
  border-radius: 16px;
  color: #d9e1ff;
  background: #374766;
  margin-bottom: 8px;
}
.video-symbol .icon { width: 24px; height: 24px; stroke-width: 1.55; }
.video-empty strong { color: #f2f5ff; font-size: .97rem; line-height: 1.3; font-weight: 660; }
.video-empty > span:last-child { color: #b7c4da; font-size: .81rem; line-height: 1.35; }
.video-link { font-size: .875rem; align-self: flex-end; margin-top: 8px; }
.reference-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f6f4ff;
  border: 1px solid #e9e4ff;
  border-radius: 9px;
  padding: 11px 10px;
  margin-top: 14px;
}
.reference-icon, .panel-icon {
  display: grid;
  place-items: center;
  background: #eeebff;
  color: var(--accent);
  border-radius: 8px;
  flex: none;
  width: 35px;
  height: 35px;
}
.reference-icon .icon, .panel-icon .icon { stroke-width: 1.85; }
.reference-text { display: grid; gap: 4px; min-width: 0; }
.reference-text strong { font-size: .875rem; font-weight: 670; }
.reference-text span { color: var(--muted); font-size: .77rem; line-height: 1.3; }
.button-reference { min-height: 33px; padding-inline: 10px; margin-left: auto; color: #5145c6; background: #fff; border-color: #ded8fc; font-size: .8rem; }
.button-reference:hover { background: #f5f2ff; border-color: #c8bffb; }
.audition-navigation { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 15px; margin-top: auto; line-height: 1.3; font-size: .81rem; color: var(--muted); }
.navigation-buttons { display: flex; gap: 6px; }
.icon-button {
  display: inline-grid;
  place-items: center;
  padding: 0;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 7px;
  border: 1px solid #dfe4ed;
  background: var(--surface);
  color: #495970;
}
.icon-button:hover { background: #f1f3fa; color: var(--ink); }
.icon-button:disabled { color: #aab3c2; background: #fafbfc; }
.icon-button .icon { width: 16px; height: 16px; stroke-width: 1.8; }

.score-panel { display: flex; flex-direction: column; }
.score-heading { display: flex; align-items: center; gap: 10px; padding: 16px 15px; border-bottom: 1px solid var(--line); }
.score-heading p { color: var(--muted); font-size: .79rem; margin-top: 3px; }
#score-form { display: flex; flex-direction: column; flex: 1; }
.score-fields { padding: 1px 15px 0; }
.score-field { display: flex; align-items: center; justify-content: space-between; min-height: 51px; gap: 9px; border-bottom: 1px solid #edf0f5; }
.score-field:last-of-type { border-bottom: 0; }
.score-field label, .notes-field label { font-weight: 590; font-size: .875rem; }
.points { display: flex; align-items: center; gap: 7px; }
.points > span { white-space: nowrap; font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.points input {
  appearance: textfield;
  width: 62px;
  height: 33px;
  min-width: 0;
  text-align: center;
  padding: 1px 4px;
  color: var(--ink);
  background: #fafbfe;
  border: 1px solid #dce3ee;
  border-radius: 7px;
  font-size: .93rem;
  font-weight: 670;
  font-variant-numeric: tabular-nums;
}
.points input::-webkit-inner-spin-button, .points input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.points input::placeholder { color: #748096; font-weight: 500; }
.points input[aria-invalid="true"] { border-color: #d86161; }
.points input:read-only { border-color: transparent; background: #f2f4f8; }
.notes-field { display: grid; gap: 7px; padding: 10px 15px 16px; }
.notes-field label { display: flex; justify-content: space-between; gap: 5px; }
.notes-field label span { font-size: .76rem; color: var(--subtle); font-weight: 450; }
.notes-field textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  padding: 8px 9px;
  line-height: 1.4;
  font-size: .875rem;
  color: var(--ink);
  border: 1px solid #dce3ee;
  border-radius: 7px;
  background: #fafbfe;
}
.notes-field textarea::placeholder { color: #748096; }
.form-error { margin: 0 15px 12px; color: #9b2732; font-size: .83rem; line-height: 1.35; }
.score-footer { border-top: 1px solid var(--line); padding: 13px 15px 15px; margin-top: auto; border-radius: 0 0 var(--radius) var(--radius); background: #fafaff; }
.total-score { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.total-score > div:first-child { display: grid; gap: 3px; }
.total-score strong { font-size: .875rem; font-weight: 690; }
.total-score span { font-size: .76rem; color: var(--muted); }
.total-points { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.total-points output { color: var(--accent); font-size: 1.87rem; line-height: 1.2; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
.total-points span { font-size: .82rem; }
.score-actions { display: flex; gap: 8px; }
.score-actions .button { flex: 1; min-height: 40px; padding-inline: 8px; }
.score-actions .button-primary { flex: 1.32; }
.no-assignments { grid-column: span 2; padding: 40px 18px; }
.empty-state { display: grid; gap: 12px; justify-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--ink); }
.empty-state p { max-width: 45ch; line-height: 1.45; font-size: .9rem; }

.admin-heading { display: flex; align-items: flex-end; gap: 16px; justify-content: space-between; }
.export-button { min-height: 41px; padding-inline: 13px; margin-bottom: 2px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.metric { display: flex; padding: 16px; align-items: flex-start; gap: 7px; justify-content: space-between; }
.metric > div { display: grid; gap: 5px; }
.metric > div > span { font-size: .875rem; color: var(--muted); font-weight: 585; }
.metric strong { font-size: 1.86rem; font-weight: 740; letter-spacing: -.05em; line-height: 1.15; }
.metric-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; flex: none; }
.metric-violet { color: #5b4bd0; background: #f0edff; }
.metric-green { color: #107757; background: #e7f6ef; }
.metric-amber { color: #9e6316; background: #fff2df; }
.metric-slate { color: #536a8a; background: #ebf1fa; }
.progress-panel { margin-bottom: 17px; padding: 16px; }
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 13px; }
.instrument-progress { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.instrument-progress + .instrument-progress { border-left: 1px solid var(--line); padding-left: 20px; }
.instrument-icon { display: grid; place-items: center; height: 35px; width: 35px; border-radius: 7px; color: #5547d3; background: #efedff; }
.instrument-icon.saxophone { background: #e8f4f3; color: #187b78; }
.instrument-progress-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 8px; margin-bottom: 7px; }
.instrument-progress-title strong { font-size: .875rem; font-weight: 660; }
.instrument-progress-title span { font-size: .79rem; color: var(--muted); }
.progress-bar.saxophone { color: #218b83; }
.table-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 15px; }
.table-tabs { display: flex; align-items: center; gap: 3px; background: #f1f3f8; padding: 3px; border-radius: 8px; }
.table-tabs button { min-height: 31px; padding: 0 11px; background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--muted); font-size: .875rem; font-weight: 620; }
.table-tabs button:hover { color: var(--ink); }
.table-tabs button[aria-pressed="true"] { background: #fff; color: var(--accent); border-color: #e6e9f1; box-shadow: 0 1px 2px #1b284013; }
.table-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 0; }
.search-field, .filter-field { position: relative; display: flex; align-items: center; }
.search-field input, .filter-field select {
  background: #fff;
  color: #35445b;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  min-height: 36px;
  font-size: .83rem;
}
.search-field input { width: 170px; padding: 0 8px 0 30px; }
.search-field input::placeholder { color: var(--subtle); }
.search-field .icon, .filter-field .icon { color: var(--subtle); width: 15px; height: 15px; position: absolute; pointer-events: none; }
.search-field .icon { left: 9px; }
.filter-field .icon { right: 8px; }
.filter-field select { appearance: none; padding: 0 28px 0 9px; }
.table-scroll { overflow: auto; }
.admin-table table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: .875rem; }
.admin-table thead { background: #f6f8fb; color: #57677d; font-size: .8rem; border-block: 1px solid #e7ebf2; }
.admin-table th, .admin-table td { padding: 10px 12px; }
.admin-table :is(th, td):first-child { padding-left: 16px; }
.admin-table :is(th, td):last-child { padding-right: 16px; text-align: right; }
.admin-table thead th { font-weight: 640; }
.admin-table tbody tr + tr { border-top: 1px solid #edf0f5; }
.admin-table tbody tr:hover { background: #fbfbff; }
.admin-table tbody th { font-weight: 600; }
.admin-table tbody th strong { display: block; line-height: 1.4; }
.admin-table small { color: var(--subtle); font-size: .76rem; font-weight: 450; }
.score-column { text-align: right; font-variant-numeric: tabular-nums; }
.button-table { min-height: 31px; font-size: .81rem; padding-inline: 9px; background: #fff; color: var(--accent); border-color: #e2dff6; }
.button-table:hover { background: #f3f1ff; }
.table-footer { color: var(--subtle); font-size: .8rem; padding: 11px 16px; border-top: 1px solid #e7ebf2; }
.admin-table .table-empty { text-align: center; color: var(--muted); padding: 22px 12px; }

.modal {
  max-height: calc(100dvh - 30px);
  width: min(440px, calc(100% - 28px));
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  box-shadow: 0 22px 80px #15213b42;
}
.modal::backdrop { background: #121c30a0; }
.modal-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal h2 { font-size: 1.29rem; letter-spacing: -.03em; }
.modal-subtitle { font-size: .875rem; color: var(--muted); margin-top: 5px; line-height: 1.4; }
#assignment-form { display: grid; gap: 8px; margin-top: 18px; }
#assignment-form label { font-size: .875rem; font-weight: 650; }
#assignment-form select { min-height: 40px; padding: 7px 9px; color: var(--ink); background: #fff; border: 1px solid #dce3ed; border-radius: 7px; }
#assignment-form .form-error { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.detail-scores { display: grid; margin: 13px 0 0; }
.detail-scores div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.detail-scores dd { margin: 0; white-space: nowrap; font-weight: 670; }
.detail-scores dd span { color: var(--muted); font-weight: 450; }
.detail-scores .detail-total { font-weight: 710; color: var(--accent); }
.detail-notes { padding: 11px 0; font-size: .875rem; line-height: 1.45; overflow-wrap: anywhere; }
.detail-notes p { color: var(--muted); white-space: pre-wrap; margin-top: 3px; }
.music-window {
  position: fixed;
  z-index: 8;
  inset: auto;
  margin: 0;
  padding: 0;
  width: min(650px, calc(100vw - 16px));
  min-width: min(320px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  min-height: 226px;
  max-height: calc(100dvh - 16px);
  border: 1px solid #d5ddee;
  border-radius: 12px;
  background: #f1f4fb;
  color: var(--ink);
  box-shadow: 0 16px 64px #101d3c50;
  resize: both;
  overflow: hidden;
}
.music-window[open] { display: flex; flex-direction: column; }
.music-header { display: flex; gap: 10px; align-items: center; background: #fff; border-bottom: 1px solid var(--line); padding: 10px; cursor: grab; user-select: none; touch-action: none; }
.music-window.dragging .music-header, .music-window.dragging .music-grip { cursor: grabbing; }
.music-header h2 { font-size: 1rem; line-height: 1.3; }
.music-header p { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.music-grip { cursor: grab; }
#close-music { margin-left: auto; }
.music-page { background: #fff; overflow: auto; margin: 10px; flex: 1; min-height: 100px; border: 1px solid var(--line); border-radius: 5px; }
.music-page img { width: 100%; display: block; }
.music-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 7px 12px; background: #fff; font-size: .79rem; color: var(--muted); }
.music-toolbar > span { display: flex; align-items: center; gap: 6px; }
.music-toolbar > span .icon { width: 15px; height: 15px; }
.zoom-controls { display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.zoom-controls .icon-button { height: 28px; width: 28px; }
.zoom-controls output { min-width: 40px; text-align: center; }
.toast {
  position: fixed;
  z-index: 10;
  bottom: 18px;
  right: 18px;
  max-width: min(360px, calc(100vw - 36px));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  color: #125c45;
  background: #f1fcf6;
  border: 1px solid #c9e6d9;
  border-radius: 8px;
  box-shadow: 0 4px 20px #10232221;
  font-size: .9rem;
  font-weight: 570;
}
.toast-error { color: #9b2732; background: #fff3f4; border-color: #f1d2d4; }
.loading-screen, .access-message {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  text-align: center;
  padding: 20px;
  color: var(--muted);
}
.access-message h1 { color: var(--ink); letter-spacing: -.04em; }
.loader { display: block; width: 32px; height: 32px; border-radius: 50%; border: 3px solid #dedbff; border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1250px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .topbar { padding-inline: 22px; }
  .workspace { padding-inline: 22px; }
  .judge-grid { gap: 13px; grid-template-columns: minmax(168px, .68fr) minmax(0, 1.6fr) minmax(270px, 1fr); }
  .recording-panel { padding: 15px; }
  .audition-heading { flex-wrap: wrap; }
  .audition-heading .status-badge { order: 2; }
  .metric { padding: 13px; }
  .table-heading { flex-wrap: wrap; }
}
@media (max-width: 1000px) {
  .shell { grid-template-columns: 178px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .judge-grid { grid-template-columns: minmax(0, 1.2fr) minmax(252px, 1fr); }
  .assignment-panel { grid-column: 1 / -1; }
  .assignment-heading { display: flex; gap: 8px 15px; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 12px; }
  .assignment-heading .progress-bar { flex: 1 0 100%; }
  .progress-summary { gap: 7px; margin: 0; }
  .assignment-list { display: flex; }
  .assignment-item { min-width: 135px; min-height: 55px; flex: 1; padding: 8px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-filters { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { position: relative; height: auto; padding: 11px 14px 9px; }
  .brand { margin: 0 0 9px; }
  .brand-icon { width: 35px; height: 35px; }
  .brand-icon .icon { width: 21px; height: 21px; }
  .primary-nav { display: flex; }
  .nav-item { width: auto; min-height: 36px; }
  .nav-label { display: none; }
  .sidebar-footer { position: absolute; top: 11px; right: 14px; padding: 0; border-top: 0; }
  .profile-text strong { font-size: .78rem; }
  .profile-text span { font-size: .72rem; }
  .profile-avatar { width: 30px; height: 30px; }
  .workspace { padding: 19px 13px 25px; }
  .topbar { padding-inline: 13px; min-height: 51px; position: relative; }
  .page-heading { margin-bottom: 15px; }
  .page-heading h1 { font-size: 2rem; }
  .page-heading p { font-size: .94rem; }
  .judge-grid { grid-template-columns: minmax(0, 1fr); }
  .no-assignments { grid-column: auto; }
  .recording-panel { padding: 13px; }
  .video-frame { min-height: 175px; }
  .admin-heading { align-items: flex-start; flex-wrap: wrap; gap: 9px; }
  .metrics-grid { gap: 8px; margin-bottom: 12px; }
  .metric-icon { width: 32px; height: 32px; }
  .progress-panel { padding: 12px; margin-bottom: 12px; }
  .progress-grid { gap: 12px; grid-template-columns: 1fr; }
  .instrument-progress + .instrument-progress { border-left: 0; padding-left: 0; }
  .table-heading { padding: 9px; }
  .search-field input { width: 150px; }
  .audition-heading { margin-bottom: 13px; }
}
@media (max-width: 375px) {
  .profile-text { display: none; }
  .reference-card { gap: 6px; }
  .reference-icon { display: none; }
  .table-filters { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Event workspaces */
.header-controls, .page-actions, .inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-controls { justify-content: flex-end; }
.header-controls select { max-width: 230px; }
.demo-picker select { color: var(--accent); border-color: #ddd8fc; background: #f7f5ff; }
.page-actions { justify-content: flex-end; }
.workspace .page-heading { align-items: flex-end; }
.section-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; }
.section-title h2 { font-size: 1.01rem; }
.section-title p { color: var(--muted); font-size: .875rem; line-height: 1.35; margin-top: 4px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; }
.overview-grid .panel { margin-bottom: 16px; padding: 18px; }
.overview-groups { display: grid; gap: 18px; margin-top: 17px; }
.overview-groups .instrument-progress + .instrument-progress { padding: 0; border: 0; }
.overview-facts { display: grid; gap: 0; padding: 0; margin: 10px 0 0; }
.overview-facts div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.overview-facts div:last-of-type { border-bottom: 0; }
.overview-facts dt { color: var(--muted); }
.overview-facts dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 650; }
.record-panel { padding: 17px; margin-bottom: 15px; }
.judging-settings { display: grid; gap: 16px 26px; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
.judging-settings h2 { grid-column: 1 / -1; }
.score-precision { min-width: 0; border: 0; padding: 0; margin: 0; }
.score-precision legend, .ranking-toggle { color: var(--ink); font-size: .875rem; font-weight: 650; }
.score-precision legend { margin-bottom: 8px; padding: 0; }
.precision-options { display: flex; flex-wrap: wrap; gap: 6px; }
.precision-options label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px;
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: .85rem;
}
.precision-options label:has(:checked) { background: var(--accent-light); border-color: #dcd7ff; color: var(--accent); }
.precision-options input { margin: 0; accent-color: var(--accent); }
.rankings-setting { padding-left: 21px; border-left: 1px solid var(--line); }
.ranking-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.ranking-toggle input {
  appearance: none; display: inline-flex; align-items: center; flex: none; width: 37px; height: 22px; margin: 0;
  padding: 2px; background: #e1e6ef; border: 1px solid #bac5d6; border-radius: 20px; cursor: pointer;
}
.ranking-toggle input::after { content: ""; width: 15px; height: 15px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px #15223b40; }
.ranking-toggle input:checked { background: var(--accent); border-color: var(--accent); justify-content: flex-end; }
.judging-settings p { margin-top: 8px; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.ranking-groups { display: grid; gap: 14px; }
.ranking-groups h3 { font-size: .94rem; margin-bottom: 7px; }
.ranking-groups td { font-variant-numeric: tabular-nums; }
.table-heading .inline-actions { min-width: 175px; }
.selection-count, .status-stack { font-size: .83rem; }
.status-stack { display: flex; gap: 5px; flex-wrap: wrap; }
.cell-note { display: block; margin-top: 3px; }
.wrap-cell { white-space: normal; min-width: 130px; }
.justify-end { justify-content: flex-end; }
.admin-table td .button { min-height: 31px; font-size: .81rem; }
.admin-table input[type="checkbox"], .check-field input { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: middle; }
.rubric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 15px; }
.rubric-card { padding: 17px; }
.rubric-card .detail-scores, .rubric-reference { margin-bottom: 12px; }
.rubric-reference { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.rubric-reference .icon { color: var(--accent); }
.text-link { display: inline-block; margin-top: 10px; font-size: .875rem; text-underline-offset: 3px; }
.allotment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 11px; margin-top: 13px; }
.allotment-card { display: grid; gap: 5px; justify-items: start; background: #fafbfe; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.allotment-card > span, .allotment-card small { color: var(--muted); font-size: .83rem; }
.allotment-card .button { margin-top: 5px; }
.notice { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 11px 13px; background: #fff6e8; border: 1px solid #f3ddbb; color: #71430a; border-radius: 8px; margin-bottom: 14px; font-size: .875rem; }
.notice ul { padding-left: 18px; margin: 0; }
.error-notice { background: #fff3f4; border-color: #eccdd4; color: #8e2732; }
.wide-empty { grid-column: span 2; }
.blank-panel { min-height: 190px; padding: 25px; line-height: 1.45; }
.wide-dialog { width: min(920px, calc(100% - 26px)); }
.dialog-content { display: grid; gap: 12px; margin: 15px 0 6px; }
.dialog-content .form-error { margin: 0; }
.form-field, .form-grid { display: grid; gap: 7px; min-width: 0; }
.form-field span, .scope-panel > strong { font-size: .875rem; font-weight: 650; }
.form-grid, .intake-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-field input, .form-field select, .seat-row > input, .import-preview input, .import-preview select {
  display: block; width: 100%; min-width: 0; min-height: 37px; padding: 6px 8px; border: 1px solid #dce3ed;
  color: var(--ink); background: #fff; border-radius: 7px; font-size: .875rem;
}
.form-field input[type="file"] { padding: 7px; }
.form-field input::file-selector-button {
  border: 1px solid #e3defd; border-radius: 5px; padding: 4px 7px; font: inherit; color: var(--accent); background: #f4f1ff; cursor: pointer;
}
.check-field { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: .875rem; }
.scope-panel { display: grid; gap: 8px; padding: 11px; background: #f7f8fc; border-radius: 8px; }
.seat-row { display: grid; grid-template-columns: minmax(0, 1fr) 85px; gap: 6px; }
.criteria-editor { display: grid; gap: 7px; }
.criterion-edit { display: grid; grid-template-columns: minmax(0, 1fr) 66px 32px 32px; gap: 6px; align-items: end; }
.criterion-edit .icon-button { margin-bottom: 2px; }
.rotate-up { transform: rotate(180deg); }
.import-preview { max-height: 45dvh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.import-preview:empty { display: none; }
.import-preview table, .preview-public, .public-ensemble table { width: 100%; text-align: left; border-collapse: collapse; font-size: .875rem; }
.import-preview th, .preview-public th, .public-ensemble th, .public-ensemble td, .preview-public td { padding: 9px; }
.import-preview thead, .preview-public thead, .public-ensemble thead { background: #f4f6fa; color: var(--muted); }
.import-preview td { min-width: 125px; padding: 5px; border-bottom: 1px solid var(--line); }
.import-preview td:last-child { min-width: 115px; white-space: normal; font-size: .83rem; }
.import-preview input + input, .import-preview select + input { margin-top: 3px; }
.row-error { color: #9b2732; }
[data-import-progress], [data-file-progress] { color: var(--muted); font-size: .875rem; }
.media-edit { display: grid; gap: 7px; background: #f7f8fc; padding: 11px; border-radius: 8px; }
.media-edit h3 { font-size: .94rem; }
.media-edit p { font-size: .85rem; overflow-wrap: anywhere; }
.backup-list { padding-left: 18px; margin: 0; }
.backup-list li { margin-bottom: 5px; color: var(--muted); }
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; }
[data-player-link] { display: flex; justify-content: flex-end; }
.music-page iframe { width: 100%; height: min(58dvh, 550px); border: 0; display: block; }
.music-toolbar a { min-height: 32px; }
.public-results { max-width: 830px; margin: 0 auto; padding: 38px 19px; }
.public-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 23px; }
.public-ensemble { padding: 15px; margin: 11px 0; }
.public-ensemble h2 { margin-bottom: 10px; }
.public-ensemble tbody tr + tr, .preview-public tbody tr + tr { border-top: 1px solid var(--line); }
.director-list { display: grid; gap: 9px; }
.director-card summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 9px; cursor: pointer; padding: 13px; list-style: none; }
.director-card summary::-webkit-details-marker { display: none; }
.director-card summary small { display: block; color: var(--muted); margin-top: 4px; font-size: .8rem; }
.director-card[open] summary { border-bottom: 1px solid var(--line); }
.director-card[open] summary .icon { transform: rotate(180deg); }
.director-total { font-size: .875rem; font-variant-numeric: tabular-nums; font-weight: 650; }
.director-detail { padding: 13px; }
.sign-in { display: grid; place-items: center; min-height: 100dvh; padding: 15px; }
.sign-in-card { width: min(430px,100%); display: grid; gap: 10px; padding: 23px; }
.sign-in-card h1 { font-size: 1.55rem; letter-spacing: -.045em; }
.sign-in-card p { color: var(--muted); line-height: 1.45; }
.sign-in-card form { display: grid; gap: 9px; }
[data-auth-status] { font-size: .875rem; }
@media (max-width: 1000px) {
  .rubric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 720px) {
  .header-controls select { max-width: 142px; }
  .workspace .page-heading { align-items: flex-start; }
  .page-actions { justify-content: flex-start; }
  .rubric-grid, .intake-grid { grid-template-columns: 1fr; }
  .wide-empty { grid-column: auto; }
  .director-card summary { grid-template-columns: minmax(0, 1fr) auto auto; }
  .director-total { display: none; }
  .primary-nav { flex-wrap: wrap; }
  .judging-settings { grid-template-columns: 1fr; }
  .rankings-setting { border-left: 0; border-top: 1px solid var(--line); padding: 13px 0 0; }
}
