:root {
  --primary: #f04b23;
  --secondary: #002677;
  --ink: #07143f;
  --muted: #5a668a;
  --line: #dfe5f0;
  --panel: #ffffff;
  --soft: #f6f8fc;
  --green: #088a29;
  --blue: #1267e8;
  --purple: #7552e8;
  --cyan: #0f9db5;
  --amber: #d58600;
  --danger: #b42318;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

a {
  color: var(--blue);
}

.app-shell {
  min-height: 100vh;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 460px) 1fr;
  background: #fff;
}

.login-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  border-right: 1px solid var(--line);
  padding: 48px;
}

.login-visual {
  display: grid;
  place-items: center;
  padding: 44px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 54%, #fff4ef 100%);
}

.login-visual img {
  width: min(760px, 92%);
  height: auto;
  filter: drop-shadow(0 20px 48px rgba(7, 20, 63, 0.12));
}

.brand-logo {
  width: 150px;
  height: auto;
}

.login-brand-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.login-event-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
}

.sidebar-branding {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.sidebar-branding img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.side-event-logo {
  width: 175px;
}

.login-title {
  margin: 0;
  color: var(--secondary);
  font-size: 32px;
  line-height: 1.1;
}

.login-portal-label {
  width: fit-content;
  border-left: 3px solid var(--primary);
  padding-left: 9px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.login-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-form,
.stack {
  display: grid;
  gap: 14px;
}

.hint-box {
  display: grid;
  gap: 6px;
  border: 1px solid #ffd3c5;
  border-radius: 8px;
  padding: 12px;
  background: #fff7f3;
  color: #7a2c18;
  font-size: 13px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span,
.field label,
.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea,
.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.field textarea,
.textarea {
  min-height: 78px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 103, 232, 0.14);
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--secondary);
  padding: 9px 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn.secondary {
  border-color: #d3dcf8;
  background: #eef4ff;
  color: var(--blue);
}

.btn.danger {
  border-color: #ffd1cb;
  background: #fff2f0;
  color: var(--danger);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
}

.btn.icon {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

.layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 28px 22px;
}

.side-logo {
  width: 118px;
  height: auto;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--secondary);
  padding: 12px;
  text-align: left;
  font-weight: 800;
}

.nav button.active,
.nav button:hover {
  background: #fff4ef;
  color: var(--primary);
}

.nav .nav-icon,
.icon-box {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 900;
}

.nav button.active .nav-icon {
  background: var(--primary);
  color: #fff;
}

.side-help {
  margin-top: auto;
  border: 1px solid #ffd3c5;
  border-radius: 8px;
  padding: 16px;
  background: #fff7f3;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 18px 30px;
  backdrop-filter: blur(10px);
}

.judge-shell .topbar {
  position: relative;
}

.page-title {
  margin: 0;
  color: var(--secondary);
  font-size: 26px;
  line-height: 1.2;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.top-actions,
.user-chip,
.row-actions,
.toolbar,
.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #eef4ff;
  color: var(--secondary);
  font-weight: 900;
}

.content {
  display: grid;
  gap: 18px;
  padding: 26px 30px 40px;
}

.panel,
.stat-card,
.table-shell,
.form-shell,
.summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(7, 20, 63, 0.05);
}

.panel,
.form-shell,
.summary-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title {
  margin: 0;
  color: var(--secondary);
  font-size: 18px;
}

.panel-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 14px;
}

.stat-card {
  display: grid;
  gap: 10px;
  min-height: 118px;
  padding: 16px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat-value {
  color: var(--secondary);
  font-size: 28px;
  font-weight: 900;
}

.stat-note {
  color: var(--muted);
  font-size: 12px;
}

.kpi-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 900;
}

.kpi-icon.orange {
  background: #fff4ef;
  color: var(--primary);
}

.kpi-icon.green {
  background: #eaf8ee;
  color: var(--green);
}

.kpi-icon.purple {
  background: #f1edff;
  color: var(--purple);
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--secondary);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: #172653;
}

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

.title-cell {
  min-width: 240px;
}

.title-cell strong,
.title-cell span {
  display: block;
}

.title-cell span {
  margin-top: 4px;
}

td.row-actions {
  display: table-cell;
  white-space: nowrap;
}

td.row-actions .btn + .btn {
  margin-left: 8px;
}

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

.small {
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 10px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.badge.green {
  background: #e8f7ed;
  color: var(--green);
}

.badge.gray {
  background: #f0f2f6;
  color: var(--muted);
}

.badge.orange {
  background: #fff1e6;
  color: #a94d00;
}

.badge.purple {
  background: #f1edff;
  color: var(--purple);
}

.badge.red {
  background: #fff2f0;
  color: var(--danger);
}

.progress {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  min-width: 126px;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6ebf3;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(56px, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 210px;
}

.bar-column {
  display: grid;
  gap: 8px;
  align-items: end;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.bar-column strong {
  color: var(--secondary);
}

.bar-v {
  width: 100%;
  min-height: 8px;
  border-radius: 8px 8px 0 0;
  background: var(--primary);
}

.list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.form-grid.compact .field {
  grid-column: span 2;
}

.form-grid.compact .field.wide {
  grid-column: span 3;
}

.form-grid .wide {
  grid-column: span 2;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.switches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.check-row.emphasis {
  border-color: #ffd3c5;
  background: #fff7f3;
  color: var(--secondary);
  font-weight: 800;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

input[type="color"] {
  height: 40px;
  padding: 4px;
}

.settings-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.settings-status-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
}

.settings-status-card strong {
  color: var(--secondary);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(440px, 0.98fr);
  gap: 16px;
  align-items: start;
}

.settings-card {
  display: grid;
  gap: 16px;
}

.settings-section {
  display: grid;
  gap: 12px;
}

.settings-section h3 {
  margin: 0;
  color: var(--secondary);
  font-size: 14px;
}

.switches.polished {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.switches.polished .check-row {
  min-height: 48px;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.splash-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: stretch;
}

.splash-preview {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.splash-preview.color {
  background: var(--preview-bg, #fff);
}

.preview-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.preview-topline strong {
  color: var(--secondary);
}

.preview-stage {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.preview-stage img {
  width: min(220px, 100%);
  height: auto;
}

.preview-stage p {
  margin: 0;
  color: var(--secondary);
  font-weight: 900;
}

.judge-shell {
  min-height: 100vh;
}

.judge-main {
  display: grid;
  gap: 20px;
}

.hero-strip {
  display: grid;
  grid-template-columns: 1.8fr repeat(4, minmax(140px, 1fr));
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.hero-item {
  display: grid;
  gap: 6px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}

.hero-item:first-child {
  border-left: 0;
  padding-left: 0;
}

.score-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

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

.criterion-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(240px, 1fr) minmax(260px, 1.2fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.criterion-title {
  display: flex;
  gap: 10px;
}

.criterion-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.score-control {
  display: grid;
  grid-template-columns: 40px 70px 40px;
  gap: 8px;
  align-items: center;
}

.range-wrap {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.score-number {
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}

.ai-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 40;
  width: min(720px, 100vw);
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 40px rgba(7, 20, 63, 0.18);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(7, 20, 63, 0.18);
}

.drawer-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  font-weight: 900;
}

.tabs button.active {
  border-color: var(--purple);
  color: var(--purple);
}

.suggestion {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.suggestion strong {
  color: var(--secondary);
}

.chat-log {
  display: grid;
  max-height: 320px;
  gap: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f9fbff;
}

.chat-msg {
  max-width: 82%;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.chat-msg.user {
  justify-self: end;
  background: #eef4ff;
}

.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #fff;
}

.splash-overlay.color {
  background: var(--splash-bg, #fff);
}

.splash-content {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 24px;
  text-align: center;
}

.splash-content img {
  width: min(760px, 88vw);
  height: auto;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.025);
  }
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.dot.ok {
  background: var(--green);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 110;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(7, 20, 63, 0.18);
  color: var(--secondary);
  padding: 12px 14px;
  font-weight: 800;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .stats-grid,
  .grid.four {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .score-layout,
  .grid.two,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .hero-strip {
    grid-template-columns: 1fr 1fr;
  }

  .hero-item {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 860px) {
  .login-screen,
  .layout {
    grid-template-columns: 1fr;
  }

  .login-panel {
    min-height: auto;
    border-right: 0;
    padding: 28px;
  }

  .login-visual {
    display: none;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-help {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .content {
    padding: 18px;
  }

  .stats-grid,
  .grid.three,
  .grid.four,
  .form-grid,
  .form-grid.compact,
  .switches,
  .settings-status,
  .switches.polished,
  .splash-editor {
    grid-template-columns: 1fr;
  }

  .form-grid .wide,
  .form-grid .full,
  .form-grid.compact .field,
  .form-grid.compact .field.wide {
    grid-column: auto;
  }

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

  .hero-strip {
    grid-template-columns: 1fr;
  }
}

/* Judge panel refresh */
:root {
  --judge-bg: #f7f9fd;
  --judge-ink: #06154b;
  --judge-muted: #53618b;
  --judge-line: #dfe6f3;
  --judge-blue: #276ef1;
  --judge-purple: #7657ff;
  --judge-shadow: 0 14px 42px rgba(7, 20, 63, 0.07);
}

body {
  background: var(--judge-bg);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.btn {
  min-height: 38px;
  border-radius: 7px;
  font-weight: 600;
}

.btn.primary {
  border-color: #ff4b1f;
  background: linear-gradient(180deg, #ff5228 0%, #f04416 100%);
  box-shadow: 0 8px 18px rgba(240, 75, 35, 0.18);
}

.btn.secondary {
  border-color: #ff6b45;
  background: #fff;
  color: #f04b23;
}

.field span,
.field label,
.label,
.stat-label,
.badge,
th {
  font-weight: 600;
  text-transform: none;
}

.judge-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 4%, rgba(39, 110, 241, 0.08), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(240, 75, 35, 0.08), transparent 26%),
    var(--judge-bg);
  color: var(--judge-ink);
}

.judge-topbar {
  min-height: 136px;
  border-bottom: 1px solid rgba(223, 230, 243, 0.84);
  background: rgba(255, 255, 255, 0.82);
  padding: 34px 34px 30px;
  backdrop-filter: blur(18px);
}

.judge-topbar.score-topbar {
  min-height: 96px;
  padding-block: 26px 20px;
}

.judge-brand-block,
.judge-title-block,
.judge-actions,
.profile-menu,
.review-metrics,
.ai-score-metrics,
.chat-input-row {
  display: flex;
  align-items: center;
}

.judge-brand-block {
  min-width: 0;
  gap: 28px;
}

.judge-logo {
  width: 142px;
  height: auto;
}

.judge-brand-divider {
  width: 1px;
  height: 58px;
  background: #aeb7cc;
}

.judge-title-block {
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
}

.judge-shell .page-title,
.score-page-title {
  color: var(--judge-ink);
  font-size: 30px;
  font-weight: 650;
  letter-spacing: 0;
}

.judge-shell .page-subtitle {
  color: #435184;
  font-size: 15px;
  font-weight: 400;
}

.notification-button,
.profile-menu {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--judge-ink);
}

.notification-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #ff4b1f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.profile-menu {
  gap: 14px;
  padding: 0;
  text-align: left;
}

.profile-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid #d5ddea;
  border-radius: 50%;
  background: linear-gradient(180deg, #f4f7fc, #e5ebf5);
  color: #53658f;
}

.profile-avatar svg {
  width: 35px;
  height: 35px;
  stroke-width: 1.45;
}

.profile-copy {
  display: grid;
  gap: 3px;
}

.profile-copy strong {
  color: #101536;
  font-size: 14px;
  font-weight: 650;
}

.profile-copy span {
  color: #64709b;
  font-size: 13px;
}

.judge-main {
  gap: 20px;
  padding: 20px 32px 44px;
}

.judge-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr)) minmax(250px, 1.32fr);
  gap: 16px;
  border: 1px solid var(--judge-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--judge-shadow);
  padding: 18px;
}

.judge-metric-card,
.judge-ai-card {
  display: flex;
  min-height: 94px;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--judge-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  padding: 18px 20px;
}

.judge-metric-card > span:last-child {
  display: grid;
  gap: 7px;
}

.judge-metric-card .stat-value {
  color: var(--judge-ink);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
}

.judge-metric-card .stat-value span {
  color: #30406d;
  font-size: 18px;
}

.judge-metric-card .stat-label,
.judge-table th {
  color: var(--judge-ink);
  font-size: 13px;
}

.kpi-icon {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  font-weight: 600;
}

.kpi-icon svg {
  width: 31px;
  height: 31px;
}

.kpi-icon.blue {
  background: #eaf2ff;
  color: #1162e8;
}

.kpi-icon.green {
  background: #eaf8ee;
  color: #0b9d31;
}

.kpi-icon.orange {
  background: #fff2e7;
  color: #f04b23;
}

.kpi-icon.purple {
  background: #f1eeff;
  color: #6747ff;
}

.judge-ai-card {
  justify-content: space-between;
  color: #321dff;
  text-align: left;
}

.judge-ai-card strong,
.judge-ai-card small {
  display: block;
}

.judge-ai-card strong {
  font-size: 15px;
  font-weight: 650;
}

.judge-ai-card small {
  margin-top: 10px;
  color: #4c5685;
  font-size: 13px;
}

.judge-table-shell {
  overflow: hidden;
  border: 1px solid var(--judge-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--judge-shadow);
}

.judge-table {
  min-width: 1120px;
}

.judge-table th,
.judge-table td {
  border-color: #e4ebf5;
  padding: 18px 22px;
}

.judge-table th {
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.judge-table td {
  color: #253464;
  font-size: 14px;
}

.rank-cell {
  color: var(--judge-ink);
  font-weight: 650;
}

.rank-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.favorite-star {
  width: 18px;
  height: 18px;
  background: #ff9d00;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 35%);
}

.judge-title-cell {
  min-width: 300px;
}

.judge-title-cell strong {
  color: #006cff;
  font-weight: 500;
  line-height: 1.55;
}

.judge-table .progress {
  min-width: 118px;
  grid-template-columns: auto 72px;
  color: var(--judge-ink);
  font-size: 14px;
}

.judge-table .bar {
  height: 6px;
  background: #e1e6ee;
}

.judge-table .bar span {
  background: #2774f3;
}

.avatar-stack {
  display: inline-flex;
  align-items: center;
  padding-left: 10px;
}

.mini-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  margin-left: -10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #dfe7f5;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(7, 20, 63, 0.16);
}

.mini-avatar.tone-0 {
  background: linear-gradient(140deg, #1c74a7, #f59363);
}

.mini-avatar.tone-1 {
  background: linear-gradient(140deg, #b15d47, #f1c9b5);
}

.mini-avatar.tone-2 {
  background: linear-gradient(140deg, #6a331d, #d8895a);
}

.mini-avatar.extra {
  background: #f3f6fb;
  color: var(--judge-ink);
}

.score-cell {
  color: #304c91;
  font-size: 17px;
  font-weight: 450;
}

.score-cell.own-score {
  color: var(--judge-ink);
  font-weight: 700;
}

.judge-table-action {
  min-width: 142px;
  border-color: #ff4b1f;
  color: #ff4b1f;
}

.judge-table-action.primary {
  color: #fff;
}

.table-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #e4ebf5;
  padding: 16px 22px 20px;
  color: #435184;
  font-size: 14px;
}

.pagination {
  display: flex;
  gap: 14px;
}

.pagination .btn.icon,
.rows-control select {
  border-color: #dce5f3;
}

.pagination .active-page {
  border-color: #2f7bff;
  color: #0e62ff;
}

.rows-control {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 16px;
}

.rows-control select {
  width: 88px;
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--judge-ink);
}

.judge-back {
  justify-self: start;
  min-height: auto;
  padding: 0;
  color: #3e4f83;
}

.score-page-title {
  margin: -4px 0 2px;
  font-size: 24px;
}

.hero-strip {
  grid-template-columns: minmax(360px, 1.85fr) repeat(4, minmax(132px, 1fr));
  align-items: center;
  gap: 0;
  border-radius: 16px;
  box-shadow: var(--judge-shadow);
  padding: 22px 18px;
}

.problem-card {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding-right: 22px;
}

.problem-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #ff9d54;
  color: #fff;
}

.problem-icon svg {
  width: 14px;
  height: 14px;
}

.problem-card strong,
.criterion-title strong,
.ai-assistant-strip strong,
.insight-block strong {
  color: var(--judge-ink);
  font-weight: 700;
}

.problem-card p {
  max-width: 560px;
  margin: 8px 0 10px;
  color: var(--judge-ink);
  font-size: 13px;
  line-height: 1.55;
}

.text-link {
  border: 0;
  background: transparent;
  color: #006cff;
  padding: 0;
  font-size: 12px;
  font-weight: 650;
}

.hero-item {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 7px;
  border-left: 1px solid var(--judge-line);
  padding: 0 22px;
}

.hero-item svg {
  color: #1c2d70;
}

.hero-item strong {
  color: var(--judge-ink);
  font-size: 17px;
  font-weight: 500;
}

.badge {
  min-height: 26px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.score-form-shell {
  display: grid;
  gap: 20px;
}

.score-layout {
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 22px;
  align-items: start;
}

.scoring-panel,
.review-summary-card,
.ai-recommendation-card,
.ai-assistant-strip,
.submit-strip {
  border-radius: 16px;
  box-shadow: var(--judge-shadow);
}

.scoring-panel .panel-head {
  padding: 0 4px;
}

.panel-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--judge-ink);
  font-weight: 700;
}

.criteria-list {
  gap: 8px;
}

.criterion-row {
  grid-template-columns: minmax(260px, 1.12fr) minmax(210px, 0.82fr) minmax(280px, 1.28fr);
  gap: 20px;
  border-radius: 13px;
  padding: 12px 14px;
}

.criterion-index {
  width: 24px;
  height: 24px;
  background: var(--criterion-color);
  font-size: 13px;
  font-weight: 700;
}

.criterion-title {
  align-items: flex-start;
}

.criterion-title p {
  margin: 8px 0 0;
  color: var(--judge-ink);
  font-size: 13px;
  line-height: 1.45;
}

.info-dot {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 1px solid #96a3c3;
  border-radius: 50%;
  color: #7380a2;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.score-control {
  grid-template-columns: 32px 76px 32px;
  justify-content: center;
  gap: 10px;
}

.score-control .btn.icon {
  width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f3f6fb;
  color: var(--judge-ink);
  font-size: 20px;
}

.score-number {
  height: 36px;
  border: 1px solid #dce5f3;
  border-radius: 9px;
  color: var(--judge-ink);
  font-size: 18px;
  font-weight: 700;
}

.range-wrap {
  gap: 7px;
}

.range-wrap input[type="range"] {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--criterion-color) 0 var(--score-pct), #dfe5ef var(--score-pct) 100%);
  accent-color: var(--criterion-color);
  appearance: none;
}

.range-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: transparent;
}

.range-wrap input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--criterion-color);
  appearance: none;
}

.range-wrap input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background: transparent;
}

.range-wrap input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--criterion-color);
}

.range-labels {
  color: #1c2d70;
  font-size: 12px;
}

.comment-field {
  gap: 8px;
}

.comment-field span {
  color: #415184;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
}

.comment-field textarea {
  min-height: 46px;
  border-color: #dce5f3;
  border-radius: 8px;
  color: var(--judge-ink);
  font-size: 12px;
  line-height: 1.45;
  resize: none;
}

.score-side {
  display: grid;
  gap: 18px;
}

.review-summary-card,
.ai-recommendation-card {
  padding: 22px;
}

.review-metrics {
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 22px;
}

.review-metrics > div {
  display: grid;
  min-width: 0;
  flex: 1;
  justify-items: center;
  gap: 4px;
  border-right: 1px solid #e4ebf5;
  text-align: center;
}

.review-metrics > div:last-child {
  border-right: 0;
}

.review-metrics strong {
  color: var(--judge-ink);
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
}

.review-metrics span {
  color: #1c2d70;
  font-size: 17px;
}

.review-metrics small {
  color: #52608c;
  font-size: 12px;
}

.summary-bar {
  height: 8px;
  margin-bottom: 12px;
}

.summary-bar span,
.ai-score-card .bar span {
  background: #704dff;
}

.insight-block {
  display: grid;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 15px 18px;
}

.insight-block + .insight-block {
  margin-top: 12px;
}

.insight-block.green {
  border-color: #dbefe3;
  background: #f3fbf5;
  color: #0b8a28;
}

.insight-block.orange {
  border-color: #ffd9c9;
  background: #fff8f4;
  color: #f04b23;
}

.insight-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--judge-ink);
  font-size: 13px;
  line-height: 1.45;
}

.ai-recommendation-note {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid #ddd4ff;
  border-radius: 12px;
  background: #fbf9ff;
  padding: 16px;
}

.ai-recommendation-note p {
  margin: 0;
  color: var(--judge-ink);
  font-size: 13px;
  line-height: 1.45;
}

.ai-recommendation-note .btn {
  justify-self: start;
  border-color: #d7dfff;
  color: #1c5dff;
}

.score-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 22px;
  align-items: stretch;
}

.ai-assistant-strip {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 16px;
  border: 1px solid #ffd8c9;
  background: #fffaf7;
  padding: 18px 22px;
}

.ai-assistant-strip .kpi-icon {
  width: 38px;
  height: 38px;
  background: transparent;
}

.ai-assistant-strip p {
  margin: 5px 0 0;
  color: #334476;
  font-size: 13px;
}

.submit-strip {
  display: grid;
  align-content: center;
  gap: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.submit-strip .toolbar {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 14px;
}

.submit-strip .btn {
  min-height: 54px;
}

.submit-strip p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  justify-self: center;
}

.drawer-backdrop {
  background: rgba(5, 16, 50, 0.2);
  backdrop-filter: blur(2px);
}

.ai-drawer {
  inset: 16px 22px 16px auto;
  width: min(790px, calc(100vw - 44px));
  border: 1px solid #d7ddeb;
  border-radius: 16px;
  box-shadow: -18px 18px 54px rgba(7, 20, 63, 0.18);
}

.drawer-body {
  gap: 18px;
  padding: 28px;
}

.ai-drawer .panel-head {
  margin-bottom: 0;
}

.ai-drawer .panel-title {
  font-size: 24px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #53618b;
  font-weight: 500;
}

.tabs button.active {
  border-color: #7657ff;
  color: #7657ff;
}

.ai-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.ai-suggestion-column,
.ai-side-column {
  display: grid;
  gap: 12px;
}

.ai-suggestion-column h3,
.ai-score-card h3,
.ai-chat-preview h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--judge-ink);
  font-size: 16px;
}

.suggestion {
  grid-template-columns: 44px 1fr;
  gap: 14px;
  border-radius: 10px;
  padding: 14px;
}

.suggestion,
.suggestion > div {
  display: grid;
}

.suggestion > div {
  gap: 8px;
}

.suggestion-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  background: #f0edff;
  color: #7657ff;
}

.suggestion.tone-1 .suggestion-icon {
  background: #eaf8ee;
  color: #0b9d31;
}

.suggestion.tone-2 .suggestion-icon {
  background: #fff1e8;
  color: #f04b23;
}

.suggestion.tone-3 .suggestion-icon {
  background: #eaf2ff;
  color: #1267e8;
}

.suggestion strong {
  color: var(--judge-ink);
  font-size: 13px;
}

.suggestion span.muted {
  color: var(--judge-ink);
  font-size: 12px;
  line-height: 1.45;
}

.suggestion .btn {
  justify-self: start;
  min-height: 30px;
  padding: 5px 12px;
  color: #315dff;
  border-color: #cfd8ff;
}

.auto-draft {
  border-color: #e4dbff;
  background: #fbf8ff;
}

.quick-prompts {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.quick-prompts div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-prompts .btn {
  min-height: 28px;
  padding: 5px 9px;
  color: #3f4b79;
  font-size: 11px;
}

.ai-score-card,
.ai-chat-preview {
  border-radius: 12px;
  box-shadow: none;
  padding: 16px;
}

.ai-score-metrics {
  gap: 18px;
  margin: 20px 0 12px;
}

.ai-score-metrics > div {
  display: grid;
  flex: 1;
  gap: 8px;
}

.ai-score-metrics span {
  color: #52608c;
  font-size: 12px;
}

.ai-score-metrics strong {
  color: #7657ff;
  font-size: 27px;
  font-weight: 500;
}

.ai-score-metrics small {
  color: #52608c;
  font-size: 14px;
}

.muted-bar span {
  background: #96a2bc;
}

.score-callout {
  border: 1px solid #e3ddff;
  border-radius: 8px;
  background: #fbf9ff;
  color: #7657ff;
  padding: 10px;
  font-size: 12px;
  text-align: center;
}

.comparison-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 28px minmax(88px, 1.35fr) 34px;
  align-items: center;
  gap: 8px;
  color: var(--judge-ink);
  font-size: 11px;
}

.comparison-row strong,
.comparison-row small {
  color: #1d2b68;
  font-weight: 650;
}

.mini-bars {
  position: relative;
  display: block;
  height: 12px;
}

.mini-bars i,
.mini-bars em {
  position: absolute;
  left: 0;
  height: 5px;
  border-radius: 99px;
}

.mini-bars i {
  top: 0;
  background: #7657ff;
}

.mini-bars em {
  bottom: 0;
  background: #dfe4ee;
}

.ai-chat-preview .panel-head {
  align-items: center;
}

.ai-chat-preview .panel-head h3 {
  font-size: 14px;
}

.chat-log {
  border-color: #e0e7f2;
  background: #fff;
}

.chat-log.preview {
  max-height: 220px;
  border: 0;
  padding: 0;
}

.chat-msg {
  border: 1px solid #e0e7f2;
  border-radius: 10px;
  color: var(--judge-ink);
  font-size: 12px;
  line-height: 1.45;
}

.chat-msg.user {
  background: #eff3fb;
}

.chat-input-row {
  gap: 8px;
}

.chat-input-row .input {
  min-height: 44px;
  border-radius: 10px;
}

.chat-input-row .btn.icon {
  width: 44px;
  min-height: 44px;
  border-radius: 10px;
}

.ai-compare-view,
.ai-chat-view {
  gap: 14px;
}

@media (max-width: 1240px) {
  .judge-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .judge-ai-card {
    grid-column: span 2;
  }

  .score-layout,
  .score-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .judge-topbar,
  .judge-topbar.score-topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 22px;
  }

  .judge-brand-block {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .judge-brand-divider {
    display: none;
  }

  .judge-main {
    padding: 18px;
  }

  .judge-stat-strip,
  .judge-ai-card,
  .hero-strip,
  .criterion-row,
  .ai-panel-grid,
  .ai-assistant-strip {
    grid-template-columns: 1fr;
  }

  .judge-ai-card {
    grid-column: auto;
  }

  .hero-item {
    border-left: 0;
    border-top: 1px solid var(--judge-line);
    padding: 16px 0 0;
  }

  .table-footer {
    grid-template-columns: 1fr;
  }

  .pagination,
  .rows-control {
    justify-self: start;
  }

  .review-metrics,
  .ai-score-metrics {
    align-items: stretch;
    flex-direction: column;
  }

  .review-metrics > div {
    border-right: 0;
    border-bottom: 1px solid #e4ebf5;
    padding-bottom: 12px;
  }

  .ai-drawer {
    inset: 10px;
    width: auto;
  }
}

/* iPad compact judge refinement */
.judge-shell {
  font-size: 13px;
}

.judge-shell .btn {
  min-height: 34px;
  border-radius: 6px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 500;
}

.judge-shell .btn.primary {
  box-shadow: 0 6px 14px rgba(240, 75, 35, 0.14);
}

.judge-topbar {
  min-height: 90px;
  padding: 18px 34px 14px;
}

.judge-topbar.score-topbar {
  min-height: 72px;
  padding: 14px 34px 12px;
}

.judge-brand-block {
  gap: 18px;
}

.judge-logo {
  width: 118px;
}

.judge-brand-divider {
  height: 38px;
}

.judge-shell .page-title {
  font-size: 24px;
  font-weight: 560;
}

.judge-shell .page-subtitle {
  margin-top: 2px;
  font-size: 12px;
}

.notification-button {
  width: 32px;
  height: 32px;
}

.notification-button svg {
  width: 17px;
  height: 17px;
}

.notification-badge {
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 600;
}

.profile-menu {
  gap: 11px;
}

.profile-avatar {
  width: 42px;
  height: 42px;
}

.profile-avatar svg {
  width: 25px;
  height: 25px;
}

.profile-copy strong {
  font-size: 12px;
  font-weight: 600;
}

.profile-copy span {
  font-size: 11px;
}

.judge-main {
  gap: 16px;
  padding: 16px 32px 34px;
}

.judge-stat-strip {
  gap: 14px;
  border-radius: 14px;
  padding: 14px;
}

.judge-metric-card,
.judge-ai-card {
  min-height: 76px;
  gap: 14px;
  border-radius: 11px;
  padding: 14px 16px;
}

.kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
}

.kpi-icon svg {
  width: 25px;
  height: 25px;
}

.judge-metric-card .stat-label,
.judge-table th {
  font-size: 11px;
  font-weight: 600;
}

.judge-metric-card .stat-value {
  font-size: 24px;
  font-weight: 450;
}

.judge-metric-card .stat-value span {
  font-size: 15px;
}

.judge-ai-card strong {
  font-size: 13px;
  font-weight: 600;
}

.judge-ai-card small {
  margin-top: 7px;
  font-size: 11px;
}

.judge-table th,
.judge-table td {
  padding: 14px 20px;
}

.judge-table td {
  font-size: 12px;
}

.judge-team-cell {
  width: 80px;
  color: var(--judge-ink);
  font-weight: 500;
}

.judge-title-cell strong {
  font-size: 13px;
  font-weight: 450;
}

.judge-table .progress {
  font-size: 12px;
}

.score-cell {
  font-size: 14px;
  font-weight: 400;
}

.score-cell.own-score,
.rank-cell {
  font-weight: 600;
}

.mini-avatar {
  width: 28px;
  height: 28px;
  font-size: 9px;
  font-weight: 600;
}

.badge {
  min-height: 22px;
  padding: 2px 9px;
  font-size: 11px;
}

.judge-table-action {
  min-width: 124px;
}

.table-footer {
  padding: 14px 20px;
  font-size: 13px;
}

.score-page-title {
  margin: -2px 0 0;
  font-size: 22px;
  font-weight: 600;
}

.hero-strip {
  border-radius: 13px;
  padding: 18px 18px;
}

.problem-card p {
  font-size: 12px;
  line-height: 1.48;
}

.problem-card strong,
.criterion-title strong,
.ai-assistant-strip strong,
.insight-block strong,
.panel-title {
  font-weight: 600;
}

.text-link {
  font-size: 11px;
  font-weight: 600;
}

.hero-item {
  min-height: 62px;
  gap: 6px;
  padding-inline: 20px;
}

.hero-item strong {
  font-size: 15px;
  font-weight: 450;
}

.panel,
.form-shell,
.summary-panel {
  padding: 16px;
}

.panel-title {
  font-size: 16px;
}

.score-layout,
.score-footer-grid {
  gap: 18px;
}

.criteria-list {
  gap: 7px;
}

.criterion-row {
  gap: 16px;
  border-radius: 11px;
  padding: 10px 12px;
}

.criterion-index {
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 600;
}

.criterion-title p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.38;
}

.score-control {
  grid-template-columns: 30px 68px 30px;
  gap: 8px;
}

.score-control .btn.icon {
  width: 30px;
  min-height: 30px;
  font-size: 17px;
}

.score-number {
  height: 32px;
  font-size: 15px;
  font-weight: 600;
}

.comment-field span {
  font-size: 11px;
}

.comment-field textarea {
  min-height: 42px;
  font-size: 11px;
}

.review-summary-card,
.ai-recommendation-card {
  padding: 18px;
}

.review-metrics {
  margin: 20px 0 18px;
}

.review-metrics strong {
  font-size: 25px;
  font-weight: 450;
}

.review-metrics span {
  font-size: 15px;
}

.review-metrics small,
.insight-block ul,
.ai-recommendation-note p,
.ai-assistant-strip p {
  font-size: 12px;
}

.insight-block {
  border-radius: 10px;
  padding: 12px 14px;
}

.ai-recommendation-note {
  border-radius: 10px;
  padding: 14px;
}

.ai-assistant-strip {
  grid-template-columns: 40px minmax(0, 1fr) 104px;
  border-radius: 13px;
  padding: 15px 18px;
}

.submit-strip .btn {
  min-height: 48px;
}

.ai-drawer {
  inset: 14px 22px 14px auto;
  width: min(720px, calc(100vw - 44px));
  border-radius: 14px;
}

.drawer-body {
  gap: 15px;
  padding: 24px;
}

.ai-drawer .panel-title {
  font-size: 21px;
  font-weight: 600;
}

.tabs button {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 450;
}

.suggestion {
  gap: 12px;
  border-radius: 9px;
  padding: 12px;
}

.suggestion strong {
  font-size: 12px;
}

.suggestion span.muted,
.chat-msg,
.score-callout {
  font-size: 11px;
}

.score-fraction {
  display: inline;
  color: var(--judge-ink);
  white-space: nowrap;
}

.score-fraction strong {
  font-weight: 700;
}

.score-fraction span {
  color: #435184;
  font-weight: 400;
}

.score-cell .score-fraction {
  font-size: 12px;
}

.score-cell .score-fraction strong {
  font-size: 12px;
}

.score-cell .score-fraction span {
  font-size: 11px;
}

.review-metrics .summary-score strong {
  font-size: 28px;
  font-weight: 750;
}

.review-metrics .summary-score span {
  font-size: 16px;
}

.hero-strip {
  grid-template-columns: minmax(360px, 1.7fr) minmax(120px, 0.75fr) minmax(160px, 0.95fr) minmax(160px, 0.95fr) minmax(320px, 1.25fr);
}

.sponsor-hero-item {
  min-width: 300px;
}

.sponsor-toggle {
  display: grid;
  width: min(100%, 340px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.sponsor-toggle-button {
  min-height: 28px;
  border: 1px solid #dfe6f3;
  border-radius: 999px;
  background: #fff;
  color: #435184;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 500;
}

.sponsor-toggle-button.active {
  border-color: #cdeed8;
  background: #e8f7ed;
  color: #078a28;
}

.sponsor-toggle-button[data-value="Not-Sponsored"].active {
  border-color: #e1e5ec;
  background: #f0f2f6;
  color: #34406d;
}

.sponsor-toggle-button[data-value=""].active {
  border-color: #dfe6f3;
  background: #f8fafc;
  color: #667085;
}

/* Admin panel professional refresh */
.layout {
  grid-template-columns: 232px minmax(0, 1fr);
  background:
    linear-gradient(135deg, rgba(18, 103, 232, 0.045), transparent 38%),
    linear-gradient(315deg, rgba(240, 75, 35, 0.045), transparent 34%),
    #f6f9fd;
  color: #081646;
}

.layout .sidebar {
  overflow-y: auto;
  gap: 30px;
  border-right: 1px solid #e5ebf5;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 10px 0 34px rgba(7, 20, 63, 0.035);
  padding: 30px 22px;
}

.layout .side-logo {
  width: 175px;
}

.layout .nav {
  gap: 12px;
}

.layout .nav button {
  min-height: 58px;
  border-radius: 14px;
  color: #172653;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 500;
}

.layout .nav button.active,
.layout .nav button:hover {
  background: #fff;
  color: #f04b23;
  box-shadow: 0 12px 30px rgba(7, 20, 63, 0.06);
}

.layout .nav .nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: transparent;
  color: #06154b;
}

.layout .nav .nav-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.7;
}

.layout .nav button.active .nav-icon {
  background: linear-gradient(180deg, #ff5228 0%, #f04416 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(240, 75, 35, 0.22);
}

.layout .side-help {
  border-color: #ffd8cc;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff8f4, #ffffff);
  box-shadow: 0 10px 28px rgba(7, 20, 63, 0.05);
}

.layout .topbar {
  min-height: 74px;
  border-bottom: 1px solid #e5ebf5;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px 28px;
}

.layout .page-title {
  color: #06154b;
  font-size: 24px;
  font-weight: 600;
}

.layout .page-subtitle {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
}

.layout .content {
  gap: 18px;
  padding: 20px 28px 30px;
}

.layout .btn {
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 550;
}

.layout .btn.primary {
  box-shadow: 0 10px 20px rgba(240, 75, 35, 0.16);
}

.layout .panel,
.layout .stat-card,
.layout .table-shell,
.layout .form-shell,
.layout .summary-panel {
  border-color: #dde6f3;
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(7, 20, 63, 0.06);
}

.layout .panel,
.layout .form-shell,
.layout .summary-panel {
  padding: 20px;
}

.layout .panel-title {
  color: #06154b;
  font-size: 18px;
  font-weight: 600;
}

.avatar-mark {
  overflow: hidden;
  flex: 0 0 auto;
  text-transform: uppercase;
}

.avatar-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-mark > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.avatar.avatar-mark {
  width: 40px;
  height: 40px;
  font-size: 16px;
  font-weight: 600;
}

.profile-avatar.avatar-mark {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
}

.admin-stats-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
}

.admin-stats-grid .stat-card {
  min-height: 124px;
  align-content: start;
  gap: 8px;
  padding: 20px;
}

.admin-stats-grid .stat-label {
  color: #162a5d;
  font-size: 13px;
  font-weight: 600;
}

.admin-stats-grid .stat-value {
  color: #06154b;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.05;
}

.admin-stats-grid .stat-note {
  color: #30406d;
  font-size: 12px;
}

.admin-stats-grid .kpi-icon,
.admin-ai-panel .kpi-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.kpi-icon.amber {
  background: #fff4d9;
  color: #d58600;
}

.admin-dashboard-grid {
  display: grid;
  gap: 16px;
}

.admin-dashboard-grid.top {
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
}

.admin-dashboard-grid.bottom {
  grid-template-columns: minmax(250px, 0.78fr) minmax(340px, 1.08fr) minmax(340px, 1.25fr);
}

.admin-chart-panel {
  min-height: 284px;
}

.activity-line {
  display: grid;
  gap: 4px;
}

.activity-line svg {
  display: block;
  width: 100%;
  height: 210px;
}

.activity-line .chart-gridline {
  fill: none;
  stroke: #e4ebf5;
  stroke-width: 1;
}

.activity-line .chart-fill {
  fill: rgba(18, 103, 232, 0.1);
  stroke: none;
}

.activity-line polyline {
  fill: none;
  stroke: #1267e8;
  stroke-width: 3;
}

.activity-line circle {
  fill: #1267e8;
  stroke: #fff;
  stroke-width: 3;
}

.activity-line text {
  fill: #172653;
  stroke: none;
  font-size: 13px;
  font-weight: 500;
  text-anchor: middle;
}

.activity-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  color: #53618b;
  font-size: 12px;
  text-align: center;
}

.completion-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  justify-items: center;
  margin-bottom: 18px;
}

.admin-donut {
  display: grid;
  width: 148px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#2774f3 calc(var(--pct) * 1%), #f04b23 0 88%, #e5ebf5 0);
}

.admin-donut::before {
  content: "";
  position: absolute;
}

.admin-donut span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #06154b;
  text-align: center;
}

.admin-donut strong {
  font-size: 22px;
  font-weight: 500;
}

.admin-donut small {
  color: #53618b;
  font-size: 12px;
}

.completion-legend {
  display: grid;
  gap: 12px;
  width: 100%;
  color: #30406d;
  font-size: 13px;
}

.completion-legend span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.completion-legend i,
.consistency::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  content: "";
}

.blue-dot {
  background: #2774f3;
}

.orange-dot {
  background: #f04b23;
}

.gray-dot {
  background: #c7d0df;
}

.ranked-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: normal;
}

.rank-pill {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #edf3fb;
  color: #172653;
  font-size: 13px;
  font-weight: 600;
}

.ranked-list li:first-child .rank-pill {
  background: #ffc247;
  color: #fff;
}

.judge-activity-list li,
.judge-list-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.judge-activity-list li {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) minmax(90px, 0.9fr) auto;
}

.mini-profile-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #dce5f2;
  border-radius: 50%;
  background: #eef4ff;
  color: #06154b;
  font-size: 13px;
  font-weight: 600;
}

.mini-progress {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e7f0;
}

.mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2774f3;
}

.consistency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #30406d;
  font-size: 12px;
  font-weight: 500;
}

.consistency.high::before {
  background: #0b9d31;
}

.consistency.medium::before {
  background: #d58600;
}

.consistency.low::before {
  background: #d92d20;
}

.admin-ai-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  border: 1px solid #ffcabd;
  border-radius: 16px;
  background: linear-gradient(110deg, #fff7f3 0%, #fff 48%, #f5fbff 100%);
  box-shadow: 0 16px 40px rgba(7, 20, 63, 0.06);
  padding: 22px;
}

.admin-ai-panel h2 {
  margin: 10px 0 4px;
  color: #06154b;
  font-size: 18px;
  font-weight: 600;
}

.admin-table-shell table {
  min-width: 1080px;
}

.admin-table-shell th,
.admin-table-shell td {
  padding: 16px 18px;
}

.admin-table-shell .title-cell strong {
  color: #006cff;
  font-weight: 500;
}

.photo-upload-card {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 12px 16px;
  align-items: center;
  border: 1px dashed #c9d5e8;
  border-radius: 12px;
  background: #f8fbff;
  padding: 14px;
}

.judge-photo-preview {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid #dce5f2;
  border-radius: 50%;
  background: #eef4ff;
  color: #06154b;
  font-size: 26px;
  font-weight: 500;
}

.photo-upload-control {
  display: grid;
  gap: 8px;
}

.photo-upload-control span {
  color: #172653;
  font-size: 13px;
  font-weight: 600;
}

.photo-upload-control input {
  max-width: 320px;
  color: #30406d;
  font-size: 13px;
}

.photo-upload-card p {
  grid-column: 2;
  margin: -4px 0 0;
}

.danger-zone-card {
  grid-column: 1 / -1;
  border-color: #ffd1cb !important;
  background: linear-gradient(145deg, #fff8f5, #fff);
}

.danger-zone-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-top: 1px solid #ffdcd5;
  padding-top: 16px;
}

.danger-zone-body strong {
  display: block;
  color: #07143f;
  font-size: 15px;
  font-weight: 600;
}

.danger-zone-body p {
  margin: 5px 0 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(7, 20, 63, 0.42);
  padding: 24px;
  backdrop-filter: blur(6px);
}

.confirm-modal {
  display: grid;
  width: min(460px, 100%);
  gap: 14px;
  border: 1px solid #ffd1cb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(7, 20, 63, 0.26);
  padding: 26px;
}

.modal-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
}

.modal-icon.danger {
  background: #fff2f0;
  color: #b42318;
}

.modal-icon svg {
  width: 24px;
  height: 24px;
}

.confirm-modal h2 {
  margin: 0;
  color: #06154b;
  font-size: 22px;
  font-weight: 600;
}

.confirm-modal p {
  margin: 0;
  color: #30406d;
  line-height: 1.55;
}

.reset-confirm-field {
  display: grid;
  gap: 7px;
}

.reset-confirm-field span {
  color: #30406d;
  font-size: 12px;
}

.reset-confirm-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cad4e5;
  border-radius: 6px;
  padding: 8px 11px;
  color: #07143f;
  outline: none;
}

.reset-confirm-field input:focus {
  border-color: #f04b23;
  box-shadow: 0 0 0 3px rgba(240, 75, 35, 0.13);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #eef2f7;
  padding-top: 16px;
}

.admin-detail-header {
  display: grid;
  gap: 8px;
}

.admin-detail-header .btn {
  justify-self: start;
  padding-inline: 0;
}

.admin-detail-header h1 {
  margin: 0;
  color: #07143f;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

.admin-detail-header p {
  margin: 0;
  color: #53618b;
  font-size: 14px;
}

.admin-detail-header p span {
  color: #9aa6bd;
  padding-inline: 14px;
}

.admin-score-overview {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(220px, 0.92fr);
  gap: 16px;
  align-items: stretch;
}

.admin-score-kpi,
.admin-score-actions {
  border: 1px solid #dde6f3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(7, 20, 63, 0.06);
  padding: 20px;
}

.admin-score-kpi {
  display: grid;
  gap: 10px;
}

.admin-score-kpi strong {
  color: #172653;
  font-size: 14px;
  font-weight: 500;
}

.admin-score-kpi b {
  color: #06154b;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
}

.admin-score-kpi b span {
  color: #30406d;
  font-size: 16px;
  font-weight: 400;
}

.admin-score-kpi small {
  color: #53618b;
}

.trend-up {
  color: #088a29 !important;
}

.review-progress-kpi {
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
}

.review-progress-kpi b,
.review-progress-kpi small {
  display: block;
  margin-top: 8px;
}

.ring {
  display: grid;
  width: 72px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#2774f3 calc(var(--pct) * 1%), #e5ebf5 0);
}

.ring span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #172653;
  font-size: 16px;
  font-weight: 600;
}

.admin-score-actions {
  display: grid;
  gap: 12px;
  align-content: center;
}

.admin-score-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start;
}

.admin-score-main,
.admin-score-side {
  display: grid;
  gap: 16px;
}

.admin-tabs {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid #dde6f3;
  background: transparent;
}

.admin-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #30406d;
  padding: 12px 2px 14px;
  font-weight: 500;
}

.admin-tabs button.active {
  border-color: #f04b23;
  color: #07143f;
}

.judge-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.judge-score-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid #dde6f3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(7, 20, 63, 0.055);
  padding: 24px 18px 18px;
  text-align: center;
}

.judge-score-card.current {
  border-color: #ff6b45;
  background: linear-gradient(145deg, #fff7f3, #fff);
}

.current-reviewer {
  position: absolute;
  top: 12px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f04b23;
  font-size: 11px;
  font-weight: 600;
}

.current-reviewer svg {
  width: 14px;
  height: 14px;
}

.judge-score-avatar {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 3px solid #e5ebf5;
  border-radius: 50%;
  background: #eef4ff;
  color: #06154b;
  font-size: 30px;
  font-weight: 500;
}

.judge-score-card.current .judge-score-avatar {
  border-color: #16a34a;
}

.judge-score-card h3 {
  margin: 8px 0 0;
  color: #101536;
  font-size: 17px;
  font-weight: 600;
}

.judge-score-card p {
  margin: 0;
  color: #53618b;
  font-size: 13px;
}

.mini-status {
  color: #172653;
  font-size: 13px;
  font-weight: 500;
}

.judge-score-card hr {
  width: 100%;
  border: 0;
  border-top: 1px solid #e5ebf5;
  margin: 10px 0;
}

.judge-score-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #30406d;
  font-size: 13px;
  text-align: left;
}

.judge-score-row > strong {
  color: #07143f;
  font-weight: 500;
}

.judge-score-row .score-fraction strong {
  color: #07143f;
  font-size: 22px;
  font-weight: 650;
}

.judge-score-row .score-fraction span {
  color: #30406d;
  font-size: 13px;
}

.criteria-comparison-admin {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.criteria-comparison-admin div {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(120px, 1.2fr) 44px;
  gap: 12px;
  align-items: center;
  color: #30406d;
  font-size: 12px;
}

.criteria-comparison-admin i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3e9f2;
}

.criteria-comparison-admin i::before {
  display: block;
  width: var(--bar);
  height: 100%;
  border-radius: inherit;
  background: var(--color);
  content: "";
}

.criteria-comparison-admin strong {
  color: #07143f;
  font-weight: 500;
  text-align: right;
}

.compact-side {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-side .panel {
  padding: 18px;
}

.compact-side h3,
.admin-score-side h3 {
  margin: 0;
  color: #172653;
  font-size: 14px;
  font-weight: 600;
}

.admin-big-number {
  display: block;
  margin-top: 18px;
  color: #06154b;
  font-size: 30px;
  font-weight: 500;
}

@media (max-width: 1320px) {
  .admin-stats-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .admin-dashboard-grid.top,
  .admin-dashboard-grid.bottom,
  .admin-score-overview,
  .admin-score-layout {
    grid-template-columns: 1fr;
  }

  .judge-score-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout .sidebar {
    position: static;
    height: auto;
  }

  .admin-stats-grid,
  .judge-score-grid,
  .admin-ai-panel,
  .completion-card,
  .photo-upload-card,
  .danger-zone-body {
    grid-template-columns: 1fr;
  }

  .photo-upload-card p {
    grid-column: auto;
  }
}

/* Compact direct-scoring judge screen */
.direct-scoring-shell {
  min-height: 100vh;
  background: #d9f7fb;
  color: #111827;
  font-size: 12px;
}

.judge-direct-topbar {
  width: min(1372px, 100%);
  min-height: 59px;
  margin: 0 auto;
  background: #ff5b2d;
}

.judge-direct-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  height: 59px;
  align-items: center;
  padding: 0 27px;
}

.judge-direct-logo {
  display: block;
  width: 107px;
  max-width: 100%;
  height: auto;
  max-height: 40px;
  object-fit: contain;
}

.judge-direct-event-logo {
  display: block;
  width: 190px;
  height: 47px;
  object-fit: contain;
  justify-self: center;
}

.judge-direct-profile {
  display: flex;
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 14px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
}

.judge-direct-profile strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.judge-direct-avatar {
  display: grid;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: #eef3fa;
  color: #0b1f50;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(60, 24, 8, 0.2);
}

.judge-direct-profile:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.direct-scoring-shell .judge-main {
  display: block;
  width: min(1372px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 27px 23px 80px;
}

.direct-score-workspace {
  width: 100%;
  container: direct-scoring / inline-size;
}

.direct-score-workspace.direct-score-cards {
  max-width: 1000px;
  margin: 0 auto;
}

.direct-score-table-shell {
  position: relative;
  width: 100%;
  border: 1px solid #d4d9dc;
  border-radius: 12px 12px 3px 3px;
  background: #fff;
  box-shadow: 0 4px 0 rgba(113, 113, 113, 0.14);
}

.direct-score-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #fff;
}

.direct-score-table .direct-team-column {
  width: 7%;
}

.direct-score-table .direct-title-column {
  width: 27%;
}

.direct-score-table .direct-criterion-column {
  width: calc(50% / max(1, var(--direct-criteria-count, 1)));
}

.direct-score-table .direct-criterion-heading {
  overflow-wrap: anywhere;
}

.direct-score-table .direct-sponsor-column {
  width: 10%;
}

.direct-score-table .direct-total-column {
  width: 6%;
}

.direct-score-table th,
.direct-score-table td {
  border-right: 1px solid #d4d9dc;
  border-bottom: 1px solid #d4d9dc;
}

.direct-score-table th:last-child,
.direct-score-table td:last-child {
  border-right: 0;
}

.direct-score-table tbody tr:last-child td {
  border-bottom: 0;
}

.direct-score-table th {
  height: 50px;
  color: #18202d;
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.18;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.direct-score-table td {
  height: 51px;
  color: #17202d;
  padding: 7px 9px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  vertical-align: middle;
}

.direct-team-cell {
  overflow-wrap: anywhere;
}

.direct-project-cell button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #006cff;
  padding: 0;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 1px;
  overflow-wrap: anywhere;
}

.direct-project-cell button:hover,
.direct-project-cell button:focus-visible {
  color: #004fc3;
}

.direct-project-cell button:focus-visible {
  border-radius: 2px;
  outline: 2px solid rgba(0, 108, 255, 0.28);
  outline-offset: 2px;
}

.direct-score-cell,
.direct-sponsor-cell,
.direct-total-cell {
  text-align: center;
}

.direct-score-cell input {
  width: 43px;
  max-width: 100%;
  height: 29px;
  border: 0;
  border-bottom: 1.5px solid #ff5b3a;
  border-radius: 0 0 4px 4px;
  outline: 0;
  background: transparent;
  color: #111827;
  padding: 3px 2px 2px;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  appearance: auto;
}

.direct-score-cell input::-webkit-inner-spin-button,
.direct-score-cell input::-webkit-outer-spin-button {
  margin: 0;
  appearance: auto;
}

.direct-score-cell input:focus {
  border-bottom-width: 2px;
  background: #fff6f2;
  box-shadow: 0 2px 0 rgba(255, 91, 45, 0.1);
}

.direct-score-cell input:disabled {
  border-bottom-color: #b7bec8;
  background: #f7f8fa;
}

.direct-score-cell input.is-scored {
  border-bottom-color: #078b08;
}

.direct-sponsor-select {
  width: 100%;
  max-width: 111px;
  min-height: 27px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  padding: 4px 5px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-align-last: center;
  appearance: none;
}

.direct-sponsor-select.is-sponsored {
  background: #078b08;
  color: #fff;
}

.direct-sponsor-select.is-not-sponsored {
  background: #eef0f4;
  color: #394565;
}

.direct-sponsor-select.is-unset {
  background: #f6f7f9;
  color: #6b7280;
}

.direct-sponsor-select:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 108, 255, 0.22);
}

.direct-score-total {
  display: inline-flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
}

.direct-score-total strong {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.direct-score-total span {
  color: #596274;
  font-size: 9px;
  font-weight: 400;
}

.direct-save-state {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1400px) {
  .judge-direct-topbar,
  .direct-scoring-shell .judge-main {
    width: calc(100% - 32px);
  }

  .direct-scoring-shell .judge-main {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@container direct-scoring (max-width: 1050px) {
  .direct-score-table-shell {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .direct-score-table {
    display: block;
    background: transparent;
  }

  .direct-score-table colgroup,
  .direct-score-table thead {
    display: none;
  }

  .direct-score-table tbody {
    display: grid;
    gap: 16px;
  }

  .direct-score-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
    border: 1px solid #d4d9dc;
    border-radius: 12px;
    background: #fff;
  }

  .direct-score-table td {
    display: grid;
    min-width: 0;
    height: auto;
    gap: 6px;
    padding: 0;
    border: 0;
  }

  .direct-score-table td::before {
    content: attr(data-label);
    color: #596274;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .direct-team-cell,
  .direct-project-cell {
    grid-column: 1 / -1;
  }

  .direct-score-table .direct-team-cell {
    color: #0b1f50;
    font-size: 14px;
    font-weight: 600;
  }

  .direct-score-table .direct-score-cell {
    align-content: start;
    padding: 10px;
    border: 1px solid #e5edf0;
    border-radius: 8px;
    background: #f8fbfc;
  }

  .direct-score-cell input,
  .direct-sponsor-select,
  .direct-score-total {
    justify-self: center;
  }

  .direct-score-cell input {
    width: 64px;
    min-height: 34px;
  }

  .direct-score-table .direct-sponsor-cell,
  .direct-score-table .direct-total-cell {
    align-content: end;
    padding-top: 4px;
  }
}

@media (max-width: 700px) {
  .judge-direct-topbar,
  .direct-scoring-shell .judge-main {
    width: 100%;
  }

  .judge-direct-header-inner {
    padding: 0 16px;
    gap: 10px;
  }

  .judge-direct-logo {
    width: 94px;
  }

  .judge-direct-event-logo {
    width: 140px;
    height: 44px;
  }

  .judge-direct-profile strong {
    display: none;
  }

  .judge-direct-avatar {
    width: 38px;
    height: 38px;
  }

  .direct-scoring-shell .judge-main {
    padding: 18px 12px 48px;
  }

  .direct-score-table-shell {
    border-radius: 8px 8px 3px 3px;
  }
}

/* Reference-aligned detailed scoring screen */
.score-detail-shell .judge-main {
  padding-top: 22px;
}

.score-detail-form {
  width: 100%;
}

.score-detail-intro {
  margin-bottom: 18px;
}

.score-detail-intro h1 {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  color: #0a2c70;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
}

.score-detail-intro h1 > span {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  margin-top: 7px;
  background: #ff5b2d;
}

.score-detail-intro p {
  margin: 14px 28px 0;
  color: #17202d;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.score-detail-intro p strong {
  font-weight: 500;
}

.score-detail-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin: 0 20px 20px;
}

.score-detail-back {
  min-width: 56px;
  min-height: 35px;
  border: 0;
  border-radius: 999px;
  background: #ff5b2d;
  color: #fff;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 500;
}

.score-detail-back:hover {
  background: #e9471e;
}

.score-detail-back:focus-visible {
  outline: 3px solid rgba(255, 91, 45, 0.28);
  outline-offset: 3px;
}

.score-detail-save-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.score-detail-table-shell {
  width: calc(100% - 40px);
  overflow: hidden;
  margin: 0 20px;
  border: 1px solid #cfd4d8;
  border-radius: 8px;
  background: #fff;
}

.score-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.score-detail-criterion-column {
  width: 57.5%;
}

.score-detail-comment-column {
  width: 19%;
}

.score-detail-possible-column {
  width: 12.3%;
}

.score-detail-actual-column {
  width: 11.2%;
}

.score-detail-table th,
.score-detail-table td {
  border-right: 1px solid #cfd4d8;
  border-bottom: 1px solid #cfd4d8;
}

.score-detail-table th:last-child,
.score-detail-table td:last-child {
  border-right: 0;
}

.score-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.score-detail-table th {
  height: 38px;
  color: #202838;
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.score-detail-table td {
  height: 89px;
  color: #17202d;
  vertical-align: middle;
}

.score-detail-criterion {
  padding: 10px;
}

.score-detail-criterion strong {
  display: block;
  margin-bottom: 3px;
  color: #17202d;
  font-size: 14px;
  font-weight: 600;
}

.score-detail-criterion p {
  margin: 0;
  color: #17202d;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.38;
}

.score-detail-comment {
  padding: 10px 8px;
}

.score-detail-comment textarea {
  width: 100%;
  height: 61px;
  border: 0;
  border-left: 1.5px solid #ff5b3a;
  border-radius: 4px 0 0 4px;
  outline: 0;
  background: transparent;
  color: #17202d;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.4;
  resize: none;
}

.score-detail-comment textarea::placeholder {
  color: #7c8390;
  opacity: 1;
}

.score-detail-comment textarea:focus {
  background: #fff7f3;
  box-shadow: inset 2px 0 0 #ff5b3a;
}

.score-detail-possible,
.score-detail-actual {
  color: #17202d;
  font-size: 12px;
  text-align: center;
}

.score-detail-actual input {
  width: 54px;
  height: 34px;
  border: 0;
  border-bottom: 1.5px solid #ff5b3a;
  border-radius: 0 0 4px 4px;
  outline: 0;
  background: transparent;
  color: #111827;
  padding: 4px 2px 2px;
  font-size: 12px;
  text-align: center;
  appearance: textfield;
}

.score-detail-actual input::-webkit-inner-spin-button,
.score-detail-actual input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.score-detail-actual input:focus {
  border-bottom-width: 2px;
  background: #fff7f3;
}

.score-detail-comment textarea:disabled,
.score-detail-actual input:disabled {
  border-color: #aeb6c0;
  background: #f5f6f8;
}

.sponsorship-display-settings .btn {
  align-self: end;
  justify-self: start;
  text-decoration: none;
}

/* Admin scoring report */
.report-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 3px solid var(--primary);
}

.layout .content:has(.report-intro) {
  grid-template-columns: minmax(0, 1fr);
}

.report-breakdown-list,
.report-idea-panel,
.report-ranking-panel,
.report-intro > div {
  min-width: 0;
}

.report-breakdown-list {
  grid-template-columns: minmax(0, 1fr);
}

.report-intro .panel-title {
  display: block;
  margin: 5px 0 8px;
}

.report-intro .panel-note {
  max-width: 740px;
  line-height: 1.6;
}

.report-eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.report-freshness {
  margin: 12px 0 0;
  color: #06752d;
  font-size: 12px;
}

.report-freshness.is-stale {
  color: #935400;
}

.report-export-actions {
  display: grid;
  flex-shrink: 0;
  gap: 9px;
  max-width: 320px;
}

.report-export-actions .small {
  text-align: center;
  line-height: 1.5;
}

.report-export-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.report-table-scroll {
  position: relative;
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.report-table-scroll:focus-visible,
.report-score-comment summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.report-ranking-table {
  min-width: 850px;
}

.report-ranking-table thead,
.report-judge-table thead {
  background: #f5f8fc;
}

.report-ranking-table th,
.report-judge-table th {
  text-transform: none;
}

.report-ranking-table .report-ranking-judge {
  min-width: 110px;
  font-variant-numeric: tabular-nums;
}

.report-ranking-table .btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.report-total {
  color: var(--secondary);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
}

.report-cell-note,
.report-question-number {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.report-filters {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) minmax(180px, 1fr) minmax(140px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.report-breakdown-list {
  display: grid;
  gap: 18px;
}

.report-idea-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.report-idea-heading h3 {
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 650;
}

.report-idea-total {
  display: grid;
  gap: 3px;
  flex-shrink: 0;
  text-align: right;
}

.report-idea-total span,
.report-idea-total small {
  color: var(--muted);
  font-size: 11px;
}

.report-idea-total strong {
  color: var(--secondary);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.report-judge-table {
  min-width: 1120px;
}

.report-judge-table th,
.report-judge-table td {
  padding: 12px 14px;
}

.report-judge-table thead th {
  min-width: 120px;
  max-width: 180px;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.5;
}

.report-question-number {
  margin: 0 0 4px;
  color: var(--blue);
  font-weight: 650;
}

.report-judge-table .report-judge-name {
  min-width: 200px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.report-question-score {
  font-variant-numeric: tabular-nums;
}

.report-draft-row {
  background: #fffbf6;
}

.report-score-comment summary {
  width: fit-content;
  cursor: pointer;
  color: var(--blue);
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}

.report-score-comment p {
  min-width: 150px;
  max-width: 240px;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.report-saved-at {
  white-space: nowrap;
  font-size: 12px;
}

.report-table-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.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;
}

@media (max-width: 1180px) {
  .report-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-export-actions {
    width: 100%;
    max-width: none;
  }

  .report-metrics,
  .report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .report-metrics,
  .report-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-idea-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-idea-total {
    text-align: left;
  }

  .report-intro .btn {
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .judge-direct-header-inner {
    padding: 0 12px;
    gap: 8px;
  }

  .judge-direct-logo {
    width: 82px;
  }

  .judge-direct-event-logo {
    width: 120px;
    height: 42px;
  }
}

@media (max-width: 900px) {
  .score-detail-intro h1 {
    font-size: 22px;
  }

  .score-detail-intro p {
    margin-right: 8px;
    font-size: 13px;
  }

  .score-detail-table-shell {
    width: 100%;
    overflow-x: auto;
    margin-right: 0;
    margin-left: 0;
  }

  .score-detail-table {
    min-width: 980px;
  }
}
