/* ===================================================================
   MICRO GOAT MARKET — Stylesheet
   NMSU Economics Final Project Judging System
   Color palette: navy, teal, gold, coral
   =================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand colors */
  --navy:       #1B2A4A;
  --navy-deep:  #0F1C33;
  --navy-mid:   #243459;
  --teal:       #2E8B8B;
  --teal-light: #3AABAB;
  --teal-dark:  #1F6B6B;
  --teal-bg:    #EEF8F8;
  --gold:       #D4A843;
  --gold-light: #F5E4B0;
  --gold-dark:  #A67C2A;
  --coral:      #E05C4B;
  --coral-light:#FCE8E5;
  --coral-dark: #B83C2D;

  /* Neutrals */
  --text:       #1A1A2E;
  --text-dim:   #4A5568;
  --text-faint: #9AA3B0;
  --bg:         #F4F6FA;
  --surface:    #FFFFFF;
  --border:     #E2E8F0;
  --border-light: #EEF2F7;

  /* Semantic */
  --success:    #16A34A;
  --success-bg: #DCFCE7;
  --error:      #DC2626;
  --error-bg:   #FEE2E2;
  --warning:    #D97706;
  --warning-bg: #FEF3C7;

  /* Medals */
  --gold-medal:   #D4A843;
  --silver-medal: #94A3B8;
  --bronze-medal: #CD7F32;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.06);
  --shadow:     0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.07);
  --transition: 180ms ease;
  --navbar-h:   58px;
}

html {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums lining-nums;
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar-inner {
  display: flex;
  align-items: center;
  height: var(--navbar-h);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 8px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.navbar-logo-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.navbar-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.2px;
  white-space: nowrap;
  text-transform: uppercase;
}
.navbar-subtitle {
  font-size: 10px;
  opacity: 0.6;
  display: block;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 28px;
}

.nav-link {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition), opacity var(--transition);
  white-space: nowrap;
  opacity: 0.8;
  color: white;
}
.nav-link:hover {
  background: rgba(255,255,255,0.12);
  opacity: 1;
}
.nav-link.active {
  background: rgba(255,255,255,0.18);
  opacity: 1;
}

.navbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.judge-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(212,168,67,0.2);
  border: 1px solid rgba(212,168,67,0.35);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}
.judge-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--navy-deep);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px 0 12px;
}
.mobile-menu.open { display: flex; }
.mobile-link {
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: background var(--transition), color var(--transition);
}
.mobile-link:hover, .mobile-link.active {
  background: rgba(255,255,255,0.08);
  color: white;
}

/* --- Main Layout --- */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  min-height: calc(100vh - var(--navbar-h));
}

/* --- Page Loading --- */
.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 12px;
  color: var(--text-dim);
}

/* --- Spinner --- */
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.card-sm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
}
.card-accent {
  border-top: 3px solid var(--teal);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform 80ms ease, box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 2px 8px rgba(46,139,139,0.3);
}
.btn-primary:hover { background: var(--teal-dark); box-shadow: 0 4px 12px rgba(46,139,139,0.35); }

.btn-navy {
  background: var(--navy);
  color: white;
}
.btn-navy:hover { background: var(--navy-deep); }

.btn-gold {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-gold:hover { background: var(--gold-dark); }

.btn-coral {
  background: var(--coral);
  color: white;
}
.btn-coral:hover { background: var(--coral-dark); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-dim);
}
.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-bg);
}

.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover { background: #B91C1C; }

.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-lg { padding: 13px 30px; font-size: 15px; }

.btn-full { width: 100%; justify-content: center; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46,139,139,0.12);
}
.form-hint {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 5px;
}

/* --- Score Slider --- */
.score-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.score-item:hover { border-color: var(--teal-light); }

.score-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.score-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.score-item-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.5;
}
.score-display {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.score-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--teal);
  min-width: 2ch;
  text-align: center;
}
.score-max {
  font-size: 12px;
  color: var(--text-faint);
}

.score-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.score-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  transition: background var(--transition);
}
.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 2px 6px rgba(46,139,139,0.4);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}
.score-slider::-webkit-slider-thumb:hover {
  background: var(--teal-dark);
  box-shadow: 0 2px 10px rgba(46,139,139,0.5);
}
.score-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--teal);
  border: none;
  cursor: pointer;
}
.score-number-input {
  width: 60px;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition);
}
.score-number-input:focus { border-color: var(--teal); }

.score-track {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  border-radius: 4px;
  transition: width 0.2s ease;
}

/* --- Score Total Bar --- */
.total-bar {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0;
}
.total-label {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.total-value {
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
}
.total-max {
  font-size: 16px;
  opacity: 0.6;
}

/* --- Leaderboard --- */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  transition: box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--teal-light);
}
.project-card.rank-1 { border-left: 4px solid var(--gold-medal); }
.project-card.rank-2 { border-left: 4px solid var(--silver-medal); }
.project-card.rank-3 { border-left: 4px solid var(--bronze-medal); }

.project-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.project-rank {
  font-size: 24px;
  font-weight: 900;
  width: 36px;
  flex-shrink: 0;
  text-align: center;
}
.project-rank.rank-1 { color: var(--gold-medal); }
.project-rank.rank-2 { color: var(--silver-medal); }
.project-rank.rank-3 { color: var(--bronze-medal); }
.project-rank-num { color: var(--text-faint); }

.project-info { flex: 1; }
.project-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.project-team {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 2px;
}
.project-total-score {
  font-size: 28px;
  font-weight: 900;
  color: var(--navy);
}
.project-total-max { font-size: 13px; color: var(--text-faint); }

/* Category breakdown bars */
.category-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.cat-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.cat-bar-label {
  width: 180px;
  flex-shrink: 0;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.cat-bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.cat-bar-score {
  width: 40px;
  text-align: right;
  font-weight: 700;
  color: var(--text-dim);
}

/* --- Stats Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-value {
  font-size: 36px;
  font-weight: 900;
  color: var(--navy);
  display: block;
}
.stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* --- Section Headers --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}
.section-subtitle {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* --- Hero Banner --- */
.hero-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--teal-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 40px 40px;
  color: white;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(46,139,139,0.12);
}
.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 30%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(212,168,67,0.07);
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 8px;
}
.hero-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
}
.hero-desc {
  font-size: 14px;
  opacity: 0.75;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* --- Rubric Reference --- */
.rubric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.rubric-item {
  background: var(--teal-bg);
  border: 1px solid rgba(46,139,139,0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.rubric-item-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--teal-dark);
  margin-bottom: 4px;
}
.rubric-item-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}
.rubric-item-max {
  display: inline-block;
  background: var(--teal);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  margin-top: 6px;
}

/* --- Status Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-open {
  background: var(--success-bg);
  color: var(--success);
}
.badge-closed {
  background: var(--error-bg);
  color: var(--error);
}
.badge-teal {
  background: var(--teal-bg);
  color: var(--teal-dark);
}
.badge-gold {
  background: var(--gold-light);
  color: var(--gold-dark);
}
.badge-navy {
  background: rgba(27,42,74,0.1);
  color: var(--navy);
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-success { background: var(--teal-dark); }
.toast-error   { background: var(--coral-dark); }
.toast-info    { background: var(--navy); }

/* --- Success Animation --- */
.success-banner {
  background: var(--success-bg);
  border: 1.5px solid var(--success);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  animation: popIn 0.3s ease;
}
.success-icon { font-size: 48px; margin-bottom: 12px; }
.success-title { font-size: 20px; font-weight: 800; color: var(--success); margin-bottom: 8px; }
.success-text  { font-size: 14px; color: var(--text-dim); }

@keyframes popIn {
  0%   { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1);    opacity: 1; }
}

/* --- Canvas Charts --- */
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

/* --- Admin Table --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dim);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.data-table .td-name { font-weight: 600; color: var(--text); }

/* --- Empty / Error States --- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-faint);
  font-size: 14px;
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.msg-error {
  background: var(--error-bg);
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
}
.msg-success {
  background: var(--success-bg);
  border: 1px solid var(--success);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
}

/* --- Admin Login Modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11,18,33,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } }
.modal-title { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--text-faint); margin-bottom: 24px; }

/* --- Already Scored Banner --- */
.already-scored {
  background: var(--warning-bg);
  border: 1.5px solid var(--warning);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  color: var(--warning);
}

/* --- API Banner --- */
.api-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--coral);
  color: white;
  padding: 10px 20px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 9998;
  font-size: 13px;
}

/* --- Loading Inline --- */
.loading-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 13px;
  padding: 20px 0;
}

/* --- Grid Helpers --- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

/* --- Utility --- */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.text-sm { font-size: 12px; }
.font-bold { font-weight: 700; }
.font-heavy { font-weight: 900; }

/* --- Score page layout --- */
.score-page-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.score-sidebar {
  position: sticky;
  top: calc(var(--navbar-h) + 20px);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .score-page-layout { grid-template-columns: 1fr; }
  .score-sidebar { position: static; }
  .cat-bar-label { width: 120px; }
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .hamburger { display: flex; }
  .hero-title { font-size: 24px; }
  .hero-banner { padding: 28px 24px; }
  .main-content { padding: 20px 16px 60px; }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .total-bar { flex-direction: column; gap: 4px; text-align: center; }
  .project-card-header { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .three-col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cat-bar-label { display: none; }
  .rubric-grid { grid-template-columns: 1fr; }
}

/* --- Judge ID entry overlay --- */
.join-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.join-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}
.join-logo { margin: 0 auto 24px; }
.join-title { font-size: 28px; font-weight: 900; color: var(--navy); margin-bottom: 8px; }
.join-sub { font-size: 14px; color: var(--text-dim); margin-bottom: 32px; line-height: 1.6; }

/* --- Tabs --- */
.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.tab-btn {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  color: var(--text-dim);
  transition: background var(--transition), color var(--transition);
  text-align: center;
}
.tab-btn.active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.tab-btn:hover:not(.active) { color: var(--navy); }

/* --- Admin section --- */
.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.admin-section-header {
  padding: 16px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}
.admin-section-body { padding: 20px 24px; }

/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* --- Info row --- */
.info-row {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.info-row strong { color: var(--text); }
