/* Compact admin layout. Judge-facing screens retain their own styles. */
html:has(#dashboard-scores-dialog[open]) { overflow: hidden; }
.dashboard-scores-dialog { width: min(1440px, calc(100vw - 32px)); max-width: none; max-height: 88dvh; margin: auto; padding: 0; border: 1px solid #d4dfec; border-radius: 8px; background: #fff; color: #002677; box-shadow: 0 12px 40px #07143f33; }
.dashboard-scores-dialog[open] { display: flex; flex-direction: column; }
.dashboard-scores-dialog::backdrop { background: #07143f66; }
.dashboard-scores-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 18px 20px 12px; }
.dashboard-scores-header h2 { margin: 6px 0 0; font-size: 18px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.dashboard-scores-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding: 0 20px 14px; border-bottom: 1px solid #e0e7f0; color: #53647f; font-size: 12px; }
.dashboard-scores-summary strong { margin-left: 6px; color: #002677; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dashboard-scores-body { min-height: 0; overflow: auto; padding: 16px 20px; }
.dashboard-scores-dialog .report-table-scroll { border-radius: 6px; }
.dashboard-scores-dialog .report-table-note { margin-bottom: 0; }

.layout .dashboard-ranking { min-width: 0; }
.layout .dashboard-ranking .panel-head { flex-wrap: wrap; }
.layout .dashboard-ranking-freshness { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.layout .dashboard-ranking-freshness > .muted { margin-left: auto; }
.layout .dashboard-ranking-status { margin: 0; color: #087d3c; font-size: 11px; line-height: 1.5; }
.layout .dashboard-ranking-status::before { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: currentColor; content: ""; }
.layout .dashboard-ranking-status.is-stale { color: #9b5411; }
.layout .dashboard-ranking .report-ranking-table { min-width: 1080px; text-align: center; background: #fff; }
.layout .dashboard-ranking .report-ranking-table th,
.layout .dashboard-ranking .report-ranking-table td { border-right: 1px solid #e0e7f0; padding: 12px 10px; font-size: 12px; vertical-align: middle; text-align: center; }
.layout .dashboard-ranking .report-ranking-table thead th { min-width: 80px; font-size: 11px; font-weight: 500; background: #f7faff; text-align: center; }
.layout .dashboard-ranking .report-ranking-table tbody tr:nth-child(even) { background: #fcfdff; }
.layout .dashboard-ranking .report-ranking-table th:last-child,
.layout .dashboard-ranking .report-ranking-table td:last-child { border-right: 0; }
.layout .dashboard-ranking .report-ranking-table .dashboard-theme { min-width: 150px; max-width: 220px; text-align: left; line-height: 1.5; overflow-wrap: anywhere; }
.layout .dashboard-ranking .report-ranking-table .dashboard-idea { min-width: 240px; max-width: 380px; color: #002677; text-align: left; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.layout .dashboard-ranking .dashboard-team { color: #53647f; white-space: nowrap; }
.layout .dashboard-ranking .report-ranking-judge { min-width: 95px; }
.layout .dashboard-ranking .report-total { white-space: nowrap; font-weight: 600; }
.dashboard-rank { display: inline-flex; min-width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; color: #546887; font-weight: 500; }
.dashboard-rank.is-first { background: #fff0e5; color: #b7471e; }
.admin-list-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; font-size: 12px; }
.layout .form-shell { scroll-margin-top: 90px; }
.dashboard-scores-dialog .report-question-score,
.dashboard-scores-dialog .report-total,
.dashboard-scores-dialog .report-saved-at,
.dashboard-scores-dialog .report-judge-table thead th:nth-child(n+3):nth-last-child(n+3) { text-align: center; }
.dashboard-sort-button { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; margin-left: 3px; padding: 0; border: 0; border-radius: 3px; color: #506482; background: transparent; font-size: 16px; }
.dashboard-sort-button:hover { color: #002677; background: #e5eef8; }
.dashboard-sort-button:focus-visible { outline: 2px solid #0066f5; outline-offset: 2px; }
[aria-sort="descending"] .dashboard-sort-button, [aria-sort="ascending"] .dashboard-sort-button { color: #002677; background: #e8f6f9; }

.admin-login-screen {
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  font-size: 13px;
}

.admin-login-screen .login-panel {
  gap: 18px;
  padding: 32px;
}

.admin-login-screen .login-brand-row {
  gap: 10px;
}

.admin-login-screen .brand-logo,
.admin-login-screen .login-event-logo {
  width: 120px;
}

.admin-login-screen .login-title {
  font-size: 24px;
  line-height: 1.25;
}

.admin-login-screen .login-form,
.admin-login-screen .stack {
  gap: 10px;
}

.admin-login-screen .field > span {
  font-weight: 500;
  text-transform: none;
}

.admin-login-screen .field input,
.admin-login-screen .btn {
  min-height: 36px;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
}

.admin-login-screen .btn {
  font-weight: 500;
}

.admin-login-screen .hint-box {
  gap: 4px;
  padding: 10px;
  font-size: 12px;
}

.admin-login-screen .login-visual img {
  width: min(520px, 80%);
  filter: none;
}

.layout {
  --admin-border: #e1e7ef;
  --admin-radius: 8px;
  --admin-shadow: 0 1px 3px rgba(7, 20, 63, 0.04);
  grid-template-columns: 200px minmax(0, 1fr);
  background: #f6f8fb;
  font-size: 13px;
  line-height: 1.45;
}

.layout .sidebar {
  gap: 16px;
  padding: 18px 12px;
  background: #fff;
  border-color: var(--admin-border);
  box-shadow: none;
}

.layout .sidebar-branding {
  gap: 2px;
  padding: 0 6px;
}

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

.layout .side-event-logo {
  width: 148px;
}

.layout .nav {
  gap: 4px;
}

.layout .nav button {
  min-height: 38px;
  gap: 8px;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
}

.layout .nav button:hover,
.layout .nav button.active {
  background: #fff2ec;
  color: #c63e18;
  box-shadow: none;
}

.layout .nav .nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.layout .nav .nav-icon svg {
  width: 18px;
  height: 18px;
}

.layout .nav button.active .nav-icon {
  background: transparent;
  color: inherit;
  box-shadow: none;
}

.layout .side-help {
  border-radius: 6px;
  background: #fafbfd;
  border-color: var(--admin-border);
  padding: 10px;
  box-shadow: none;
  font-size: 12px;
}

.layout .side-help p {
  margin: 5px 0 8px;
}

.layout .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 30%, 400px) minmax(0, 1fr);
  align-items: center;
  min-height: 62px;
  gap: 12px;
  padding: 10px 20px;
  background: #fff;
  border-color: var(--admin-border);
}

.layout .admin-page-heading { min-width: 0; }
.layout .admin-topbar-brand { display: block; width: 400px; max-width: 100%; height: 34px; object-fit: contain; justify-self: center; }
.layout .topbar .top-actions { justify-self: end; justify-content: flex-end; flex-wrap: nowrap; min-width: 0; }
.layout .admin-profile-dropdown { position: relative; min-width: 0; }
.layout .admin-profile-toggle { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 4px; color: #002677; list-style: none; cursor: pointer; }
.layout .admin-profile-toggle::-webkit-details-marker { display: none; }
.layout .admin-profile-toggle:focus-visible { outline: 2px solid #0066f5; outline-offset: 3px; }
.layout .admin-profile-toggle .avatar { flex-shrink: 0; }
.layout .admin-profile-toggle > svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; transform: rotate(90deg); }
.layout .admin-profile-dropdown[open] .admin-profile-toggle > svg { transform: rotate(-90deg); }
.layout .admin-profile-copy { display: grid; gap: 2px; min-width: 0; max-width: 160px; text-align: left; }
.layout .admin-profile-copy > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layout .admin-profile-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 240px; max-width: calc(100vw - 24px); padding: 12px; border: 1px solid #d4dfec; border-radius: 6px; background: #fff; box-shadow: 0 6px 20px #07143f1a; }
.layout .admin-profile-details { display: grid; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid #e0e7f0; overflow-wrap: anywhere; }
.layout .admin-profile-menu .btn { width: 100%; margin-top: 8px; justify-content: flex-start; text-align: left; }

.layout .page-title {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
}

.layout .page-subtitle {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.4;
}

.layout .top-actions,
.layout .user-chip {
  gap: 8px;
  font-size: 12px;
}

.layout .avatar.avatar-mark {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.layout .content {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 16px 20px 24px;
}

.layout .content > *,
.layout .panel,
.layout .form-shell,
.layout .stat-card,
.layout .settings-grid > * {
  min-width: 0;
}

.layout .panel,
.layout .stat-card,
.layout .table-shell,
.layout .form-shell,
.layout .summary-panel,
.layout .admin-score-kpi,
.layout .admin-score-actions,
.layout .judge-score-card,
.layout .admin-ai-panel {
  border-radius: var(--admin-radius);
  border-color: var(--admin-border);
  box-shadow: var(--admin-shadow);
}

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

.layout .panel-head {
  gap: 10px;
  margin-bottom: 10px;
}

.layout .panel-title {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.layout .panel-note {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.layout .small {
  font-size: 11px;
  line-height: 1.4;
}

.layout .btn {
  min-height: 32px;
  gap: 6px;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  box-shadow: none;
}

.layout .btn.primary {
  box-shadow: none;
}

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

.layout .btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.layout .toolbar,
.layout .row-actions {
  gap: 8px;
}

.layout .form-shell > .toolbar {
  margin-top: 12px;
}

.layout .badge {
  min-height: 21px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 500;
}

.layout .grid,
.layout .form-grid {
  gap: 10px;
}

.layout .field {
  min-width: 0;
  gap: 4px;
}

.layout .field > span,
.layout .field > label,
.layout .label {
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
}

.layout .field input,
.layout .field select,
.layout .field textarea,
.layout .input,
.layout .select,
.layout .textarea {
  min-height: 32px;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 13px;
  line-height: 1.4;
}

.layout .field textarea,
.layout .textarea {
  min-height: 64px;
}

.layout input[type="color"] {
  height: 32px;
  padding: 3px;
}

.layout .table-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}

.layout table {
  min-width: 720px;
  font-size: 12px;
  line-height: 1.45;
}

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

.layout .presentation-order-table table {
  min-width: 960px;
  table-layout: fixed;
}

.layout .presentation-order-table th:nth-child(1) { width: 44px; }
.layout .presentation-order-table th:nth-child(3) { width: 90px; }
.layout .presentation-order-table th:nth-child(4) { width: 160px; }
.layout .presentation-order-table th:nth-child(5) { width: 112px; }
.layout .presentation-order-table th:nth-child(6) { width: 100px; }
.layout .presentation-order-table th:nth-child(7) { width: 88px; }
.layout .presentation-order-table th:nth-child(8) { width: 136px; }
.layout .presentation-order-table .title-cell { max-width: none; overflow-wrap: anywhere; }
.layout .presentation-order-table td:nth-child(7) { white-space: nowrap; }

.theme-membership { min-width: 0; margin: 0; border: 0; padding: 0; }
.theme-membership legend { margin-bottom: 8px; color: #002677; font-size: 13px; font-weight: 600; }
.theme-idea-list { max-height: 460px; overflow-y: auto; border-top: 1px solid #d4dfec; border-bottom: 1px solid #d4dfec; }
.theme-idea-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 4px; border-bottom: 1px solid #e0e7f0; cursor: pointer; }
.theme-idea-option:last-child { border-bottom: 0; }
.theme-idea-option input { width: 16px; height: 16px; flex-shrink: 0; margin: 3px 0 0; accent-color: var(--primary); }
.theme-idea-option > span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }

.layout th,
.layout td,
.layout .admin-table-shell th,
.layout .admin-table-shell td {
  padding: 9px 10px;
}

.layout thead th {
  background: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
}

.layout .title-cell {
  min-width: 190px;
  max-width: 340px;
}

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

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

.layout .judge-list-cell {
  min-width: 160px;
  gap: 8px;
}

.layout .mini-profile-avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.layout .kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

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

.layout .list {
  gap: 8px;
  font-size: 12px;
}

.layout .list li {
  gap: 8px;
  padding-bottom: 8px;
}

.layout .photo-upload-card {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  padding: 10px;
  border-radius: 6px;
}

.layout .judge-photo-preview {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.layout .photo-upload-control {
  min-width: 0;
  gap: 5px;
}

.layout .photo-upload-control span,
.layout .photo-upload-control input {
  max-width: 100%;
  font-size: 12px;
}

.layout .settings-status {
  gap: 10px;
}

.layout .settings-status-card {
  gap: 3px;
  padding: 10px 12px;
  border-radius: 6px;
}

.layout .settings-status-card strong {
  font-size: 13px;
  font-weight: 600;
}

.layout .settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.layout .settings-card {
  gap: 12px;
}

.layout .settings-section {
  gap: 8px;
}

.layout .settings-section h3 {
  margin: 0;
  font-size: 13px;
}

.layout .switches.polished {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.layout .check-row {
  min-height: 34px;
  gap: 7px;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
}

.layout .check-row input {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

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

.layout .form-grid.compact .check-row {
  grid-column: span 3;
  align-self: end;
  font-weight: 500;
}

.layout .sponsorship-display-settings .btn {
  grid-column: 1 / -1;
  white-space: normal;
}

.layout .settings-actions {
  gap: 8px;
  margin-top: 0;
  padding-top: 10px;
}

.layout .splash-editor {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.layout .splash-preview {
  min-width: 0;
  min-height: 150px;
  border-radius: 6px;
}

.layout .preview-topline {
  padding: 7px 10px;
  font-size: 11px;
}

.layout .preview-stage {
  gap: 8px;
  padding: 12px;
}

.layout .preview-stage img {
  width: 160px;
  max-width: 100%;
  max-height: 65px;
  object-fit: contain;
}

.layout .preview-stage p {
  margin: 0;
  font-size: 13px;
}

.layout .danger-zone-body {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding-top: 10px;
}

.layout .danger-zone-body strong {
  font-size: 13px;
}

.layout .modal-backdrop {
  padding: 16px;
}

.layout .confirm-modal {
  width: min(420px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  gap: 10px;
  padding: 18px;
  border-radius: 8px;
  font-size: 13px;
}

.layout .confirm-modal h2 {
  font-size: 18px;
}

.layout .modal-icon {
  width: 34px;
  height: 34px;
}

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

.layout .reset-confirm-field input {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 13px;
}

.layout .modal-actions {
  gap: 8px;
  padding-top: 10px;
}

.layout .report-intro {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.layout .report-intro .panel-note {
  line-height: 1.45;
}

.layout .report-export-actions {
  width: auto;
  max-width: 275px;
  gap: 6px;
}

.layout .report-freshness,
.layout .report-table-note {
  margin-top: 8px;
  font-size: 11px;
}

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

.layout .report-filters {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
}

.layout .report-breakdown-list {
  gap: 12px;
}

.layout .report-idea-heading {
  gap: 12px;
  margin-bottom: 12px;
}

.layout .report-idea-heading h3 {
  font-size: 15px;
  line-height: 1.4;
}

.layout .report-idea-total strong {
  font-size: 21px;
}

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

.layout .report-total {
  font-size: 14px;
}

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

.layout .report-judge-table th,
.layout .report-judge-table td {
  padding: 8px 10px;
}

.layout .report-judge-table thead th {
  min-width: 90px;
  max-width: 160px;
  font-size: 11px;
}

.layout .report-judge-table .report-judge-name {
  min-width: 160px;
  font-size: 12px;
}

.layout .report-table-scroll {
  border-radius: 6px;
}

.layout .empty {
  padding: 18px;
}

@media (max-width: 1100px) {
  .layout .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout .report-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout .report-export-actions {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .layout .report-export-actions > span {
    grid-column: 1 / -1;
    text-align: left;
  }

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

@media (max-width: 1180px) {
  .layout .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .layout .admin-topbar-brand { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 860px) {
  .admin-login-screen {
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    background: #f6f8fb;
    padding: 20px;
  }

  .admin-login-screen .login-panel {
    width: min(400px, 100%);
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #fff;
    padding: 24px;
  }

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

  .layout .sidebar {
    position: static;
    height: auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .layout .sidebar-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0;
  }

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

  .layout .side-event-logo {
    width: 125px;
  }

  .layout .nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .layout .nav button {
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    padding: 6px 9px;
    white-space: nowrap;
  }

  .layout .side-help {
    display: none;
  }

  .layout .topbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }

  .layout .content {
    padding: 14px;
  }

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

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

  .layout .form-grid .wide,
  .layout .form-grid .full,
  .layout .form-grid.compact .check-row {
    grid-column: 1 / -1;
  }

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

@media (max-width: 600px) {
  .layout .admin-profile-copy { display: none; }

  .admin-login-screen {
    padding: 12px;
  }

  .admin-login-screen .login-panel {
    padding: 20px;
  }

  .layout .page-title {
    font-size: 18px;
  }

  .layout .page-subtitle,
  .layout .user-chip > span:not(.avatar) {
    display: none;
  }

  .layout .topbar,
  .layout .content {
    padding: 10px 12px;
  }

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

  .layout .btn {
    min-height: 36px;
  }

  .layout .field input,
  .layout .field select {
    min-height: 36px;
  }

  .layout .form-grid,
  .layout .form-grid.compact,
  .layout .switches,
  .layout .switches.polished,
  .layout .settings-status,
  .layout .grid.two,
  .layout .grid.three {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout .form-grid > *,
  .layout .form-grid.compact .field,
  .layout .form-grid.compact .field.wide,
  .layout .photo-upload-card p {
    grid-column: auto;
  }

  .layout .photo-upload-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout .check-row,
  .layout .switches.polished .check-row {
    min-height: 38px;
  }

  .layout .danger-zone-body {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .layout .danger-zone-body > .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

  .layout .report-filters,
  .layout .report-export-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout .report-idea-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

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

  .layout .panel-head {
    flex-wrap: wrap;
  }

  .layout .modal-actions {
    flex-wrap: wrap;
  }
}
/* Compact admin dashboard and presentation scoring widgets. */
.layout .admin-dashboard,
.layout .admin-dashboard-grid,
.layout .admin-score-main,
.layout .admin-score-side {
  min-width: 0;
  gap: 8px;
}

.layout .admin-dashboard .panel,
.layout .admin-score-side .panel,
.layout .admin-score-kpi,
.layout .admin-score-actions,
.layout .judge-score-card {
  min-width: 0;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
  padding: 12px;
}

.layout .admin-dashboard .panel-head,
.layout .admin-score-side .panel-head {
  min-height: 24px;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 10px;
}

.layout .admin-dashboard .panel-title,
.layout .admin-score-side .panel-title {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}

.layout .admin-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.layout .stat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  grid-template-rows: auto auto auto;
  min-width: 0;
  min-height: 92px;
  align-content: start;
  gap: 4px 8px;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
  padding: 12px;
}

.layout .stat-label {
  grid-column: 1;
  grid-row: 1;
  color: #56657b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.layout .stat-value {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  color: #18263f;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.4px;
}

.layout .stat-note {
  grid-column: 1 / -1;
  grid-row: 3;
  color: #69778a;
  font-size: 10px;
  line-height: 1.35;
}

.layout .stat-card .kpi-icon,
.layout .admin-ai-panel .kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.layout .stat-card .kpi-icon {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  justify-self: end;
}

.layout .stat-card .kpi-icon svg,
.layout .admin-ai-panel .kpi-icon svg {
  width: 18px;
  height: 18px;
}

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

.layout .admin-chart-panel {
  min-height: 0;
}

.layout .activity-line {
  gap: 2px;
}

.layout .activity-line svg {
  height: 170px;
}

.layout .activity-line text {
  font-size: 12px;
}

.layout .activity-labels {
  font-size: 10px;
  line-height: 1.3;
}

.layout .admin-dashboard .chart-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-height: 0;
  gap: 8px;
  align-items: end;
}

.layout .admin-dashboard .bar-column {
  min-width: 0;
  gap: 4px;
  font-size: 10px;
  line-height: 1.3;
}

.layout .admin-dashboard .bar-column > span {
  min-height: 26px;
  overflow-wrap: anywhere;
}

.layout .admin-dashboard .bar-column > strong {
  font-size: 11px;
}

.layout .admin-dashboard .bar-v {
  width: 70%;
  margin-inline: auto;
  border-radius: 3px 3px 0 0;
}

.layout .completion-card {
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  justify-items: stretch;
  margin-bottom: 8px;
}

.layout .admin-donut {
  width: 100px;
}

.layout .admin-donut span {
  width: 72px;
  height: 72px;
  align-content: center;
  gap: 2px;
}

.layout .admin-donut strong {
  font-size: 16px;
  line-height: 1.15;
  font-weight: 600;
}

.layout .admin-donut small {
  font-size: 10px;
}

.layout .completion-legend {
  gap: 8px;
  font-size: 11px;
}

.layout .completion-legend span {
  gap: 6px;
}

.layout .completion-legend i,
.layout .consistency::before {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
}

.layout .admin-dashboard .list,
.layout .admin-score-side .list {
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.layout .admin-dashboard .list li,
.layout .admin-score-side .list li {
  min-width: 0;
  gap: 8px;
  border-color: #edf0f5;
  padding-bottom: 6px;
}

.layout .admin-dashboard .list li:last-child,
.layout .admin-score-side .list li:last-child {
  padding-bottom: 0;
}

.layout .ranked-list li > span:nth-child(2),
.layout .judge-activity-list li > span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.layout .ranked-list strong,
.layout .judge-activity-list strong {
  font-size: 12px;
  font-weight: 600;
}

.layout .rank-pill {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 11px;
}

.layout .ranked-list li:first-child .rank-pill {
  background: #fff0cd;
  color: #8d6207;
}

.layout .judge-activity-list li {
  grid-template-columns: 28px minmax(0, 1fr) minmax(36px, 0.45fr) auto;
}

.layout .judge-activity-list .mini-profile-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.layout .judge-activity-list .consistency {
  gap: 4px;
  font-size: 10px;
}

.layout .judge-activity-list .mini-progress {
  height: 4px;
}

.layout .admin-ai-panel {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  gap: 10px;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
  padding: 12px;
}

.layout .admin-ai-panel > div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
}

.layout .admin-ai-panel h2 {
  margin: 0;
  color: #18263f;
  font-size: 14px;
  font-weight: 600;
}

.layout .admin-ai-panel > div > p {
  grid-column: 1 / -1;
  margin: 3px 0;
  font-size: 11px;
  line-height: 1.4;
}

.layout .admin-ai-panel .row-actions {
  grid-column: 1 / -1;
  gap: 6px;
  margin-top: 3px;
}

.layout .admin-ai-panel .list {
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.layout .admin-ai-panel .list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  border-color: #edf0f5;
  padding-bottom: 6px;
}

.layout .admin-ai-panel .list li:last-child {
  padding-bottom: 0;
}

.layout .admin-ai-panel .list .small {
  font-size: 10px;
}

.layout .admin-detail-header {
  gap: 4px;
}

.layout .admin-detail-header h1 {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.layout .admin-detail-header p {
  font-size: 12px;
  line-height: 1.4;
}

.layout .admin-detail-header p span {
  padding-inline: 6px;
}

.layout .admin-score-overview {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 8px;
}

.layout .admin-score-kpi {
  align-content: start;
  gap: 6px;
}

.layout .admin-score-kpi strong {
  font-size: 11px;
  font-weight: 500;
}

.layout .admin-score-kpi b {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 600;
}

.layout .admin-score-kpi b span {
  font-size: 13px;
}

.layout .admin-score-kpi small {
  font-size: 10px;
  line-height: 1.35;
}

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

.layout .review-progress-kpi b {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.35;
}

.layout .review-progress-kpi small {
  margin-top: 4px;
}

.layout .review-progress-kpi .ring {
  width: 48px;
}

.layout .review-progress-kpi .ring span {
  width: 36px;
  height: 36px;
  font-size: 11px;
}

.layout .admin-score-actions {
  gap: 6px;
}

.layout .admin-score-actions .btn {
  justify-content: flex-start;
  min-width: 0;
  white-space: normal;
  text-align: left;
  font-size: 11px;
}

.layout .admin-score-layout {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 8px;
}

.layout .admin-tabs {
  gap: 16px;
  overflow-x: auto;
}

.layout .admin-tabs button {
  flex-shrink: 0;
  border-bottom-width: 2px;
  padding: 8px 0;
  font-size: 12px;
  line-height: 1.3;
}

.layout .judge-score-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, max(190px, calc((100% - 16px) / 3))), 1fr));
  min-width: 0;
  gap: 8px;
}

.layout .judge-score-card {
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 190px;
  align-content: start;
  justify-items: start;
  gap: 2px 8px;
  padding: 20px 12px 10px;
  text-align: left;
}

.layout .judge-score-card.current {
  border-color: #efbcae;
  background: #fff;
}

.layout .current-reviewer {
  top: 5px;
  right: 10px;
  left: auto;
  gap: 3px;
  font-size: 9px;
  line-height: 1.2;
}

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

.layout .judge-score-avatar {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  border-width: 1px;
  font-size: 16px;
}

.layout .judge-score-card h3 {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}

.layout .judge-score-card p {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  align-self: start;
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout .judge-score-card .mini-status {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.4;
}

.layout .judge-score-card hr {
  grid-column: 1 / -1;
  margin: 4px 0;
}

.layout .judge-score-row {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 20px;
  gap: 6px;
  font-size: 11px;
  line-height: 1.35;
}

.layout .judge-score-row > strong {
  font-size: 10px;
  text-align: right;
}

.layout .judge-score-row .score-fraction strong {
  font-size: 18px;
  line-height: 1.15;
}

.layout .judge-score-row .score-fraction span {
  font-size: 11px;
}

.layout .judge-score-card > .btn {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 28px;
  margin-top: 3px;
  padding: 4px 8px;
  font-size: 11px;
}

.layout .judge-score-card > .btn svg {
  width: 13px;
  height: 13px;
}

.layout .admin-score-side h3 {
  font-size: 12px;
  line-height: 1.35;
}

.layout .criteria-comparison-admin {
  gap: 8px;
  margin-top: 10px;
}

.layout .criteria-comparison-admin div {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 25px;
  gap: 6px;
  font-size: 10px;
  line-height: 1.4;
}

.layout .criteria-comparison-admin i {
  height: 4px;
}

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

.layout .compact-side .panel {
  padding: 12px;
}

.layout .admin-big-number {
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 600;
}

.layout .compact-side p {
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.4;
}

@media (min-width: 620px) {
  .layout .admin-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .layout .admin-score-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 700px) {
  .layout .admin-dashboard-grid.bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout .admin-dashboard-grid.bottom > .panel:last-child {
    grid-column: 1 / -1;
  }

  .layout .admin-ai-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout .admin-ai-panel > div {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1000px) {
  .layout .admin-ai-panel {
    grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
  }

  .layout .admin-ai-panel > div {
    grid-column: auto;
  }
}

@media (min-width: 1050px) {
  .layout .admin-dashboard-grid.top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (min-width: 1100px) {
  .layout .admin-score-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (min-width: 1180px) {
  .layout .admin-stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .layout .admin-score-overview {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .layout .admin-dashboard-grid.bottom {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1.15fr);
  }

  .layout .admin-dashboard-grid.bottom > .panel:last-child {
    grid-column: auto;
  }
}

@media (max-width: 399px) {
  .layout .completion-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
  }

  .layout .admin-donut {
    width: 88px;
  }

  .layout .admin-donut span {
    width: 64px;
    height: 64px;
  }

  .layout .judge-activity-list li {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .layout .judge-activity-list .mini-progress {
    grid-column: 2;
    grid-row: 2;
  }

  .layout .judge-activity-list .consistency {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}
