:root {
  color-scheme: dark;
  --stage: #08070e;
  --surface: #131120;
  --surface-2: #1a1726;
  --field: rgba(255, 255, 255, 0.04);
  --field-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f5f3fb;
  --ink-soft: #cbc6da;
  --muted: #918ba4;
  --teal: #18c8c4;
  --danger: #ff6a9a;
  --success: #34e0a1;
  --grad: linear-gradient(100deg, #c01fd6 0%, #7b2bd6 26%, #18bfc6 62%, #2adf8c 100%);
  --grad-soft: linear-gradient(100deg, rgba(192, 31, 214, 0.16), rgba(24, 191, 198, 0.14) 62%, rgba(42, 223, 140, 0.16));
  --shadow: 0 28px 64px -30px rgba(0, 0, 0, 0.85);
  --radius: 16px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; }

body.admin-body {
  margin: 0;
  min-height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(50% 40% at 12% -8%, rgba(123, 43, 214, 0.22), transparent 70%),
    radial-gradient(45% 38% at 100% 0%, rgba(24, 191, 198, 0.14), transparent 70%),
    var(--stage);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }

.is-hidden { display: none !important; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.empty-state {
  margin: 0;
  padding: 40px 24px;
  color: var(--muted);
  text-align: center;
}
.empty-state.small { padding: 18px 12px; font-size: 0.9rem; }

.status { margin: 8px 0 0; min-height: 20px; font-weight: 600; font-size: 0.92rem; color: var(--muted); }
.status.success { color: var(--success); }
.status.error { color: var(--danger); }
.status.warning { color: #ffd38a; }

/* ---------- Buttons ---------- */
.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.btn:disabled { cursor: not-allowed; opacity: 0.58; transform: none; }

.btn-primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)), var(--grad);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 16px 38px -16px rgba(42, 223, 140, 0.5);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }

.btn-ghost {
  background: var(--field-strong);
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { color: #fff; border-color: rgba(24, 200, 196, 0.55); }

.btn-subtle-danger {
  padding: 7px 11px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.84rem;
}
.btn-subtle-danger:hover {
  color: var(--danger);
  border-color: rgba(255, 106, 154, 0.4);
  background: rgba(255, 106, 154, 0.07);
}

.icon-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink-soft);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { color: var(--teal); border-color: rgba(24, 200, 196, 0.55); }

/* ---------- Login ---------- */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(400px, 100%);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad);
}
.login-logo { display: block; width: 200px; max-width: 70%; height: auto; margin-bottom: 18px; }
.login-card h1 {
  margin: 0 0 22px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.6rem;
}
.login-card label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 0.9rem;
}
.login-card input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field);
  padding: 12px 14px;
  margin-bottom: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-card input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(24, 200, 196, 0.18);
}

/* ---------- App shell ---------- */
.admin {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 23, 38, 0.96), rgba(19, 17, 32, 0.92));
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 5;
}
.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--grad);
  opacity: 0.5;
}
.topbar-logo { height: 34px; width: auto; }
.topbar-title { margin-right: auto; color: var(--ink-soft); font-size: 0.84rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-tabs { display: flex; gap: 5px; margin-right: auto; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0, 0, 0, 0.12); }
.admin-tab { min-height: 34px; border: 0; border-radius: 8px; background: transparent; padding: 0 13px; color: var(--muted); font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.admin-tab.active { background: var(--grad-soft); color: var(--ink); }

/* ---------- Views ---------- */
.view, .control-view, .submissions-view { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.control-view { display: grid; grid-template-columns: 1fr; }
.submissions-view {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}
.submissions-pane {
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.012);
  overscroll-behavior: contain;
}
.submissions-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 18px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 11, 22, 0.94);
  backdrop-filter: blur(16px);
}
.submissions-head h1 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; font-weight: 600; }
.submissions-status { min-height: 24px; margin: 0; padding: 7px 18px 0; }
.submissions-list { display: grid; gap: 5px; padding: 12px; }
.submission-row {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 11px 12px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.submission-row:hover { background: rgba(255,255,255,.035); }
.submission-row.active { border-color: rgba(24,200,196,.42); background: var(--grad-soft); box-shadow: inset 3px 0 0 var(--teal); }
.submission-row-name, .submission-row-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submission-row-name { font-weight: 750; }
.submission-row-meta { margin-top: 3px; color: var(--muted); font-size: .76rem; }
.submissions-detail { background: radial-gradient(80% 36% at 0 0, rgba(123,43,214,.08), transparent 72%); }
.score-row-rank { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; font-size: .78rem; font-weight: 900; }
.score-row-value { display: grid; place-content: center; min-height: 46px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-variant-numeric: tabular-nums; text-align: center; }
.score-row-value strong { font-size: 1.05rem; line-height: 1; }
.score-row-value small { margin-top: 4px; color: var(--muted); font-size: .62rem; font-weight: 750; white-space: nowrap; }
button.score-row-value.complete { border: 1px solid rgba(24,200,196,.35); background: rgba(24,200,196,.08); cursor: pointer; }
.medal-gold .score-row-rank { border-color: rgba(224,178,72,.65); color: #f2d47e; }
.medal-silver .score-row-rank { border-color: rgba(188,198,216,.58); color: #d6dce7; }
.medal-bronze .score-row-rank { border-color: rgba(183,115,72,.62); color: #dba37d; }
.score-detail-dialog { width: min(900px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 26px; color: var(--ink); box-shadow: 0 32px 90px rgba(0,0,0,.85); }
.score-detail-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.score-detail-close { position: sticky; z-index: 2; top: 0; float: right; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 1.4rem; cursor: pointer; }
.score-detail-head { padding: 3px 56px 20px 0; border-bottom: 1px solid var(--line); }
.score-detail-head h2 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: clamp(1.5rem,3vw,2.2rem); font-weight: 600; }
.score-detail-total { display: block; margin-top: 10px; color: var(--teal); font-size: 2rem; }
.score-detail-totals span { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; }
.judge-score-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.judge-score-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.02); }
.judge-score-card > header { display: flex; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--grad-soft); }
.judge-score-card h3 { margin: 0; font-size: .95rem; }
.judge-score-card > div { padding: 6px 14px 10px; }
.judge-score-card p { display: grid; grid-template-columns: minmax(0,1fr) 34px; gap: 10px; margin: 0; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--ink-soft); font-size: .82rem; }
.judge-score-card p:last-child { border-bottom: 0; }
.judge-score-card p strong { color: var(--ink); text-align: right; }

/* ---------- Competition agenda ---------- */
.agenda-pane {
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  scrollbar-gutter: stable;
}
.agenda-pane, .detail-pane { overscroll-behavior: contain; }
.agenda-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 18px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 11, 22, 0.94);
  backdrop-filter: blur(16px);
}
.agenda-head h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.1;
}
.agenda-head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; }
.agenda-global-status { min-height: 24px; margin: 0; padding: 7px 22px 0; }
.agenda-load-error { margin: 24px; }
.agenda-list { padding: 14px 14px 18px; max-width: 1120px; margin: 0 auto; }

.agenda-section {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 17, 32, 0.72);
  box-shadow: 0 18px 42px -34px rgba(0, 0, 0, 0.9);
}
.agenda-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(115deg, rgba(123, 43, 214, 0.2), rgba(24, 191, 198, 0.08));
}
.agenda-section-exotic .agenda-section-head {
  background: linear-gradient(115deg, rgba(213, 42, 135, 0.19), rgba(123, 43, 214, 0.09));
}
.agenda-section-general .agenda-section-head {
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.07), rgba(24, 191, 198, 0.05));
}
.agenda-section-unscheduled .agenda-section-head {
  background: linear-gradient(115deg, rgba(255, 192, 86, 0.12), rgba(213, 42, 135, 0.06));
}
.agenda-section-note {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.agenda-section-head h2 {
  margin: 1px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
}
.agenda-section-count { color: var(--ink-soft); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }

.competition-group { border-bottom: 1px solid var(--line); }
.competition-group:last-child { border-bottom: 0; }
.competition-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px 11px;
  background: rgba(255, 255, 255, 0.025);
}
.competition-category {
  color: var(--teal);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.competition-group-head h3 { margin: 1px 0 0; color: var(--ink); font-size: 1rem; line-height: 1.2; }
.competition-count { color: var(--muted); font-size: 0.73rem; white-space: nowrap; }
.competition-group-items { padding: 5px; }

.schedule-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 4px 6px;
  border-radius: 10px;
  transition: background 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}
.schedule-row:hover { background: rgba(255, 255, 255, 0.035); }
.schedule-row.active { background: var(--grad-soft); box-shadow: inset 3px 0 0 var(--teal); }
.schedule-row.active.medal-gold, .schedule-row.active.medal-silver, .schedule-row.active.medal-bronze { box-shadow: inset 3px 0 0 var(--teal); }
.schedule-row.saving { opacity: 0.68; }
.schedule-row.medal-gold { background: linear-gradient(90deg, rgba(224,178,72,.16), transparent 68%); box-shadow: inset 3px 0 #e0b248; }
.schedule-row.medal-silver { background: linear-gradient(90deg, rgba(188,198,216,.12), transparent 68%); box-shadow: inset 3px 0 #bdc6d6; }
.schedule-row.medal-bronze { background: linear-gradient(90deg, rgba(183,115,72,.13), transparent 68%); box-shadow: inset 3px 0 #b77348; }

/* Rank + score cluster overlaid on each performance row */
.schedule-status { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.schedule-status .score-row-rank { width: 26px; height: 26px; }
/* Score box sizes to its widest line ("Art. 44.2"), so it can never clip. */
.schedule-score { min-width: max-content; min-height: 44px; padding: 3px 9px; white-space: nowrap; }
.schedule-score-pending { min-width: 34px; color: var(--muted); font-weight: 800; text-align: center; }
.schedule-time-field { display: block; }
.schedule-time-field input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 7px 4px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-align: center;
}
.schedule-time-field input:hover { border-color: var(--line-strong); }
.schedule-time-field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(24, 200, 196, 0.15);
  background: rgba(24, 200, 196, 0.07);
}
.schedule-select {
  display: block;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 7px 5px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.schedule-select:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; border-radius: 7px; }
.schedule-name { display: block; color: var(--ink); font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
.schedule-meta { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
/* Disclosure chevron: fixed-size square so the glyph rotates about its own centre. */
.schedule-disclosure {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.schedule-disclosure:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.schedule-disclosure:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.schedule-disclosure[aria-expanded="true"] { color: var(--teal); }
.schedule-chevron {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  transform-origin: 50% 50%;
  transition: transform 0.18s ease;
}
.schedule-disclosure[aria-expanded="true"] .schedule-chevron { transform: rotate(-180deg); }
@media (prefers-reduced-motion: reduce) {
  .schedule-chevron { transition: none; }
}
.schedule-history {
  grid-column: 2 / -1;
  width: 100%;
  padding: 12px 10px 14px 5px;
  border-top: 1px solid var(--line);
}
.schedule-history-title {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.schedule-history-entry + .schedule-history-entry { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.schedule-history-entry h4 { margin: 0 0 4px; color: var(--ink); font-size: 0.82rem; }
.schedule-history-text { margin: 0; max-width: 78ch; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.65; white-space: pre-line; }
.schedule-review {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 192, 86, 0.4);
  border-radius: 50%;
  background: rgba(255, 192, 86, 0.1);
  color: #ffd38a;
  font-size: 0.7rem;
  font-weight: 900;
}

.schedule-event {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: calc(100% - 10px);
  margin: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  padding: 11px 13px;
  color: var(--ink-soft);
  text-align: left;
  cursor: default;
}
.schedule-event-break { border-style: dashed; background: rgba(24, 200, 196, 0.035); }
.schedule-event-awards { background: rgba(192, 31, 214, 0.06); }
.schedule-event-time { display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.schedule-event-time strong { color: var(--teal); }
.event-time-prefix { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; }
.schedule-event-label { font-size: 0.79rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

.agenda-detail { background: radial-gradient(80% 36% at 0 0, rgba(123, 43, 214, 0.08), transparent 72%); }
.agenda-context-header { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.agenda-context-header h2, .agenda-event-detail-card h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.08;
}
.agenda-context-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; margin-top: 12px; color: var(--ink-soft); font-size: 0.84rem; }
.agenda-time-chip { padding: 5px 9px; border: 1px solid rgba(24, 200, 196, 0.35); border-radius: 8px; background: rgba(24, 200, 196, 0.09); color: var(--teal); font-weight: 900; font-variant-numeric: tabular-nums; }
.agenda-review-note { margin: 14px 0 0; padding: 10px 12px; border: 1px solid rgba(255, 192, 86, 0.25); border-radius: 9px; background: rgba(255, 192, 86, 0.07); color: #ffd9a0; font-size: 0.84rem; }
.submission-choice { margin: 18px 0 0; }
.submission-choice:empty { display: none; }
.submission-choice-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.submission-choice-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.submission-choice-button { border: 1px solid var(--line-strong); border-radius: 9px; background: var(--field); padding: 8px 11px; color: var(--ink-soft); text-align: left; cursor: pointer; }
.submission-choice-button small { display: block; color: var(--muted); font-size: 0.7rem; }
.submission-choice-button.active { border-color: rgba(24, 200, 196, 0.5); background: rgba(24, 200, 196, 0.09); color: #fff; }
.agenda-submission-detail { margin-top: 22px; }
.agenda-event-detail-card { max-width: 620px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow); }
.agenda-event-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border: 1px solid rgba(24, 200, 196, 0.35); border-radius: 14px; background: rgba(24, 200, 196, 0.09); color: var(--teal); font-weight: 900; }
.agenda-event-detail-time { margin: 12px 0 22px; color: var(--teal); font-size: 1.3rem; font-weight: 900; font-variant-numeric: tabular-nums; }

.unscheduled-list { display: grid; gap: 4px; padding: 6px; }
.unscheduled-row {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 11px 13px;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}
.unscheduled-row:hover, .unscheduled-row.active { background: rgba(255, 192, 86, 0.08); color: #fff; }
.unscheduled-row.active { box-shadow: inset 3px 0 0 #ffd38a; }
.unscheduled-name { font-weight: 700; }
.unscheduled-category { overflow: hidden; color: var(--muted); font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Detail ---------- */
.detail-pane { overflow-y: auto; padding: 26px 30px 60px; }

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.detail-header h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.05;
}
.detail-sub { margin: 10px 0 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-proposal { color: var(--ink-soft); font-style: italic; }
.detail-date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.detail-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.detail-action-status {
  max-width: 220px;
  margin: 0;
  text-align: right;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(24, 200, 196, 0.12);
  border: 1px solid rgba(24, 200, 196, 0.3);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}
.chip-cat { background: rgba(123, 43, 214, 0.18); border-color: rgba(123, 43, 214, 0.4); }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }

/* Ficha técnica highlight row */
.ficha {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 22px 0 6px;
}
.ficha-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.ficha-label { color: var(--muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.ficha-value { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; font-weight: 600; }
.ficha-note { color: var(--ink-soft); font-size: 0.85rem; }

.detail-sections { margin-top: 26px; display: grid; gap: 22px; }
.detail-block h3 {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.detail-text { margin: 0; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.detail-text.muted { color: var(--muted); font-style: italic; }
.detail-audio {
  display: block;
  width: 100%;
  max-width: 520px;
  accent-color: var(--teal);
  border-radius: 4px;
}
.detail-audio-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(24, 200, 196, 0.5);
  word-break: break-word;
}
.detail-audio-link:hover { color: var(--teal); border-color: var(--teal); }
.audio-admin {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.audio-admin-hint { color: var(--muted); font-size: 0.8rem; }
.audio-admin-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.audio-admin-bar {
  flex: 1 1 auto;
  max-width: 320px;
  height: 6px;
  border-radius: 3px;
  background: var(--field-strong);
  overflow: hidden;
}
.audio-admin-bar-fill { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.15s ease; }
.audio-admin-progress-text { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.audio-admin .status { width: 100%; margin: 0; }

.detail-drawing {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
}

.detail-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.detail-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
}
.detail-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.detail-table tr:last-child td { border-bottom: 0; }
.detail-table .row-num { color: var(--muted); width: 34px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 12px; }
  .submissions-view { grid-template-columns: 1fr; grid-template-rows: minmax(0, 38%) minmax(0, 62%); }
  .submissions-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  #view-agenda {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 58%) minmax(0, 42%);
  }
  .agenda-pane { max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .agenda-head { position: static; }
  .submissions-head { position: static; }
  .detail-pane { padding: 20px; }
  .detail-header { flex-direction: column; }
  .detail-actions { align-items: flex-start; }
  .detail-action-status { text-align: left; }
  .judge-score-details { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { padding: 10px 14px; }
  .topbar-title { display: none; }
  .topbar { gap: 9px; }
  .admin-tabs { order: 3; width: 100%; }
  .admin-tab { flex: 1; }
  .agenda-list { padding: 10px 8px 50px; }
  .agenda-head { padding: 18px 16px 14px; flex-direction: column; align-items: stretch; gap: 12px; }
  .agenda-head-actions { flex-wrap: wrap; }
  .agenda-head-actions .btn { flex: 1 1 auto; }
  .agenda-section-head { align-items: flex-start; }
  .schedule-row { grid-template-columns: 58px minmax(0, 1fr) auto 26px; gap: 6px; padding-inline: 4px; }
  .schedule-disclosure { width: 26px; height: 26px; }
  .schedule-time-field input { font-size: 0.85rem; }
  .schedule-meta { display: none; }
  .schedule-status { gap: 6px; }
  .competition-group-head { align-items: flex-start; }
  .competition-count { white-space: normal; text-align: right; }
  .score-detail-dialog { padding: 18px; }
}
