:root {
  --primary: #ff612b;
  --secondary: #002677;
  --brand-cyan: #00bed5;
  --brand-line: #d4dfec;
  --brand-muted: #53647f;
}

.login-screen {
  width: min(1920px, 100%);
  grid-template-columns: minmax(390px, 27%) minmax(0, 1fr);
  overflow: hidden;
  font-family: Arial, sans-serif;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
  color: #002677;
  background: #fff;
}

.login-panel {
  min-height: 0;
  flex-direction: row;
  align-items: center;
  gap: 0;
  border: 0;
  padding: 22px 42px;
}

.login-content { width: 100%; max-width: 410px; margin: auto; }
.login-panel .brand-logo { display: block; width: 360px; max-width: 100%; height: 58px; object-fit: contain; object-position: left center; margin: 0 0 34px; }
.login-title { margin: 0 0 14px; color: #002677; font-size: 36px; font-weight: 700; line-height: 1.05; }
.login-subtitle { margin: 0 0 26px; color: #425983; font-size: 15px; line-height: 1.55; }
.login-panel .login-form { display: block; }
.login-panel .field { margin-bottom: 15px; }
.login-panel .field span { color: #002677; font-size: 12px; font-weight: 400; text-transform: none; line-height: normal; }
.login-panel .field input { width: 100%; height: 44px; min-height: 44px; border-radius: 8px; border: 1px solid #ccd7e7; padding: 0 13px; background: #fff; color: #002677; font-family: Arial; font-size: 15px; line-height: normal; box-shadow: none; }
.login-panel .btn.primary { display: block; width: 100%; height: 44px; min-height: 44px; border: 0; border-radius: 8px; padding: 0; background: #ff4f26; color: #fff; box-shadow: none; font-family: Arial; font-size: 15px; font-weight: 800; line-height: normal; }
.login-panel .btn.primary:hover { background: #e64b18; }
.login-error { min-height: 18px; margin-top: 8px; color: #b42318; font-size: 12px; }
.login-visual { display: grid; padding: 38px; background: linear-gradient(135deg, #f4f8ff, #fff7f3); }
.login-visual img { width: min(720px, 78%); max-height: 430px; height: auto; object-fit: contain; filter: none; }
.login-visual.login-artwork { position: relative; min-width: 0; min-height: 0; padding: 0; overflow: hidden; background: #061b44; }
.login-artwork img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: center 70%; }
.sidebar-branding .integrated-brand-logo { width: 100%; max-width: 208px; height: auto; }

.branded-judge-shell { background: #f3f7fb; color: #15253e; }
.branded-judge-shell .judge-direct-topbar { width: 100%; min-height: 80px; border-bottom: 1px solid var(--brand-line); background: #fff; }
.branded-judge-shell .judge-direct-header-inner { width: min(1880px, 100%); height: 80px; margin: auto; padding: 8px 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(160px, 1fr); gap: 24px; }
.branded-judge-shell .judge-direct-logo { width: min(400px, 100%); max-height: 54px; height: auto; filter: none; mix-blend-mode: normal; }
.branded-judge-shell .judge-direct-event-logo { width: min(290px, 100%); height: 64px; justify-self: center; }
.branded-judge-shell .judge-direct-actions { display: flex; justify-self: end; align-items: center; min-width: 0; max-width: 100%; gap: 12px; }
.branded-judge-shell .judge-direct-profile { color: #002677; gap: 12px; }
.branded-judge-shell .judge-direct-profile strong { font-size: 12px; font-weight: 500; }
.branded-judge-shell .judge-direct-avatar { width: 40px; height: 40px; border: 1px solid #bfd0e6; background: #f2f7fd; color: #002677; box-shadow: none; font-weight: 500; }
.branded-judge-shell .judge-direct-logout { display: inline-flex; flex-shrink: 0; align-items: center; gap: 6px; min-height: 36px; padding: 7px 10px; color: #002677; font-size: 12px; white-space: nowrap; }
.branded-judge-shell .judge-direct-logout svg { width: 16px; height: 16px; }
.branded-judge-shell .judge-main { width: min(1880px, 100%); padding: 20px 28px 40px; }
.branded-judge-shell .direct-score-workspace.direct-score-cards { max-width: none; }

.scoring-brief { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; border: 1px solid #becfe1; border-left: 6px solid #0066f5; padding: 9px 15px; color: #15253e; background: #fff; font-size: 12px; line-height: 1.55; box-shadow: 0 2px 6px #0026770a; }
.scoring-instructions { flex: 1; min-width: 0; }
.scoring-theme-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 12px; max-width: 44%; text-align: right; }
.scoring-theme-tools .theme-expand-all { min-height: 34px; padding: 6px 9px; gap: 5px; font-size: 12px; border-radius: 4px; }
.theme-expand-all svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transform: rotate(90deg); }
.theme-expand-all[aria-expanded="false"] svg { transform: rotate(-90deg); }
.scoring-brief p { margin: 0; }
.scoring-brief strong { color: #002677; font-weight: 600; }
.scoring-table-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; color: #596b82; font-size: 11px; }
.scoring-save-indicator { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.scoring-save-indicator > strong { font-size: 13px; font-weight: 700; line-height: 1.45; }
.scoring-save-indicator .connection { font-size: 11px; }
.criterion-description-list { margin: 6px 0 0; padding-left: 16px; line-height: 1.5; }
.criterion-description-list li + li { margin-top: 3px; }
.scoring-legend, .scoring-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.scoring-legend { gap: 16px; }
.scoring-legend i { width: 6px; height: 6px; border-radius: 50%; }
.scoring-legend .pending { background: #db524d; }
.scoring-legend .entered { background: #138047; }

.branded-judge-shell .direct-score-table-shell { border: 1px solid #becfe1; border-radius: 6px; background: #fff; box-shadow: none; overflow-x: auto; }
.branded-judge-shell .direct-score-table { display: table; width: 100%; min-width: max(1100px, calc(660px + var(--direct-criteria-count, 6) * 90px)); table-layout: auto; background: #fff; }
.branded-judge-shell .direct-score-table colgroup { display: table-column-group; }
.branded-judge-shell .direct-score-table thead { display: table-header-group; }
.branded-judge-shell .direct-score-table tbody { display: table-row-group; }
.branded-judge-shell .direct-score-table tbody[hidden] { display: none; }
.branded-judge-shell .direct-score-table .direct-theme-row th { height: 52px; padding: 0; background: #dceaff; text-align: left; }
.score-theme-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 52px; border: 0; padding: 14px 20px; background: transparent; color: #002677; font-size: 14px; font-weight: 700; text-align: left; line-height: 1.5; }
.score-theme-toggle > span { min-width: 0; overflow-wrap: anywhere; }
.score-theme-toggle svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.5; transform: rotate(90deg); }
.score-theme-toggle[aria-expanded="false"] svg { transform: none; }
.score-theme-toggle:focus-visible { outline: 2px solid #0066f5; outline-offset: -3px; }
.branded-judge-shell .direct-score-table tbody tr { display: table-row; border: 0; padding: 0; }
.branded-judge-shell .direct-score-table .direct-team-column { width: 4%; }
.branded-judge-shell .direct-score-table .direct-title-column { width: 18%; }
.branded-judge-shell .direct-score-table .direct-criterion-column { width: calc(44% / max(1, var(--direct-criteria-count, 1))); }
.branded-judge-shell .direct-score-table .direct-comment-column { width: 10%; }
.branded-judge-shell .direct-score-table .direct-sponsor-column { width: 9%; }
.branded-judge-shell .direct-score-table .direct-average-column { width: 7%; }
.branded-judge-shell .direct-score-table .direct-total-column { width: 8%; }
.branded-judge-shell .direct-score-table th { height: 76px; padding: 10px 6px; background: #f7faff; color: #203959; border-color: var(--brand-line); font-size: 10px; line-height: 1.45; font-weight: 800; text-align: center; overflow-wrap: normal; }
.branded-judge-shell .direct-score-table td { display: table-cell; height: 68px; padding: 9px 7px; border: 0; border-right: 1px solid #e0e7f0; border-bottom: 1px solid #e0e7f0; background: #fff; font-size: 12px; border-radius: 0; text-align: center; vertical-align: middle; }
.branded-judge-shell .direct-score-table tbody tr:nth-child(even) td { background: #fcfdff; }
.branded-judge-shell .direct-score-table td::before { display: none; }
.branded-judge-shell .direct-score-table .direct-team-cell { color: #002677; font-size: 11px; font-weight: 800; }
.branded-judge-shell .direct-score-table .direct-project-cell { text-align: left; }
.branded-judge-shell .direct-project-name { color: #15253e; font-size: 12px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.branded-judge-shell .direct-score-cell input { width: 42px; min-height: 34px; padding: 6px 0; border: 0; border-bottom: 2px solid #db524d; border-radius: 0; background: transparent; color: #25374f; font-size: 13px; font-weight: 400; }
.branded-judge-shell .direct-score-cell input.is-scored { border-bottom-color: #138047; }
.branded-judge-shell .direct-score-cell input:focus { outline: 2px solid #00bed5; outline-offset: 2px; background: #f3fbfd; }
.branded-judge-shell .direct-total-cell strong, .direct-average-cell strong { color: #002677; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.branded-judge-shell .direct-score-total { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.branded-judge-shell .direct-score-total > span { color: #61728a; font-size: 10px; }
.direct-review-comment { display: block; width: 100%; min-height: 46px; max-height: 120px; border: 1px solid #cbd8e7; border-radius: 4px; padding: 6px; color: #25374f; background: #fff; font-size: 11px; line-height: 1.45; resize: vertical; }
.direct-review-comment:focus { outline: 2px solid #00bed5; outline-offset: 1px; }
.direct-sponsor-options { display: flex; justify-content: center; gap: 5px; }
.direct-sponsor-option { min-width: 32px; min-height: 30px; border: 1px solid #ccd6e4; border-radius: 4px; padding: 5px 7px; background: #fff; color: #4e6079; font-size: 11px; font-weight: 500; }
.direct-sponsor-option.yes.active { background: #087d3c; border-color: #087d3c; color: #fff; }
.direct-sponsor-option.no.active { background: #657286; border-color: #657286; color: #fff; }
.direct-sponsor-option:focus-visible, .criterion-info:focus-visible { outline: 2px solid #0066f5; outline-offset: 3px; }
.table-heading-note { display: block; color: #6a7890; font-size: 10px; font-weight: 400; }
.criterion-heading-label { display: block; }
.criterion-heading-label > span { overflow-wrap: normal; word-break: normal; hyphens: none; }
.criterion-heading-line { display: block; white-space: nowrap; }
.branded-judge-shell .direct-score-table .direct-criterion-heading { position: relative; padding: 30px 6px 10px; text-align: center; }
.direct-criterion-heading .criterion-info { position: absolute; top: 6px; right: 6px; margin: 0; transform: none; }
.criterion-info { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; vertical-align: middle; margin-left: 3px; border: 0; border-radius: 50%; padding: 0; background: transparent; color: #0066f5; cursor: help; }
.criterion-info svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.criterion-info svg circle { fill: currentColor; }
.criterion-info svg path { stroke: #fff; }
.criterion-tooltip { position: fixed; z-index: 120; width: max-content; max-width: min(300px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 6px; background: #002677; color: #fff; font-size: 12px; line-height: 1.6; box-shadow: 0 6px 18px #00267726; white-space: pre-line; overflow-wrap: anywhere; pointer-events: none; }
.criterion-tooltip ul { margin: 0; padding-left: 18px; }
.criterion-tooltip li + li { margin-top: 5px; }
.criterion-tooltip[hidden] { display: none; }
.branded-judge-shell .score-detail-table-shell { margin: 0; width: 100%; }
.branded-judge-shell .score-detail-intro h1 { font-size: 24px; font-weight: 550; color: #002677; }
.branded-judge-shell .score-detail-intro h1 > span, .branded-judge-shell .score-detail-back { background: #ff612b; }
.branded-judge-shell .score-detail-actual input { border-bottom-color: #ff612b; }

.splash-overlay.branded-splash { background: #002677; }
.branded-splash .splash-artwork { display: block; width: 100%; height: 100%; object-fit: contain; }
.splash-overlay.color .splash-content img { animation: none; }
.splash-preview .preview-stage.branded-splash-preview { min-height: 0; aspect-ratio: 16 / 9; padding: 0; background: #002677; }
.splash-preview .branded-splash-preview img { width: 100%; height: 100%; max-height: none; object-fit: contain; }

@media (max-width: 1100px) {
  .scoring-brief { flex-wrap: wrap; }
  .scoring-instructions { flex-basis: 100%; }
  .scoring-theme-tools { width: 100%; max-width: none; }
  .branded-judge-shell .judge-direct-header-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; padding: 8px 18px; gap: 18px; }
  .branded-judge-shell .judge-direct-logo { width: 330px; }
  .branded-judge-shell .judge-direct-event-logo { width: 250px; }
  .branded-judge-shell .judge-direct-profile strong { display: none; }
  .branded-judge-shell .judge-main { padding: 18px; }
}

@media (max-width: 1000px) {
  .login-screen { grid-template-columns: 400px minmax(0, 1fr); }
  .login-panel { padding: 22px 28px; }
  .login-panel .brand-logo { width: 330px; }
}

@media (max-width: 760px) {
  .login-screen { grid-template-columns: minmax(0, 1fr); }
  .login-panel { min-height: 100vh; padding: 25px; }
  .login-content { max-width: 430px; }
  .login-panel .brand-logo { width: 360px; }
  .login-visual { display: none; }
  .branded-judge-shell .judge-direct-header-inner { grid-template-columns: minmax(0, 1fr) auto; height: 70px; padding: 8px 16px; gap: 12px; }
  .branded-judge-shell .judge-direct-topbar { min-height: 70px; }
  .branded-judge-shell .judge-direct-event-logo { display: none; }
  .branded-judge-shell .judge-direct-logo { width: min(340px, 100%); }
  .branded-judge-shell .judge-main { padding: 16px 12px 32px; }
  .scoring-brief { font-size: 11px; }
  .branded-judge-shell .score-detail-intro h1 { font-size: 20px; }
}
