:root {
  /* Page & Background Palette */
  --bg-white: #ffffff;
  --bg-light-gray: #faf8f5; /* Institutional off-white */
  --bg-warm-radial: radial-gradient(circle at 85% 50%, #ffffff 0%, #fbf9f6 40%, #f4eee1 100%);

  /* Text Palette */
  --text-primary: #211719;
  --text-secondary: #5c5052;
  --text-muted: #807477;

  /* UB Brand Palette */
  --maroon-header: #5b0013;  /* Deep header maroon */
  --maroon-primary: #800000; /* Official UB Maroon */
  --maroon-dark: #4d0000;

  /* Institutional Gold Accents */
  --gold-500: #b8891d;
  --gold-400: #d4af37;
  --gold-100: #fff8df;

  /* State Colors */
  --error-color: #dc2626;
  --error-bg: #fef2f2;

  /* UI Borders & Fonts */
  --border-color: #e9dfda;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout Tokens */
  --container: 1180px;
  --radius-sm: 7px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --header-h: 76px;
}

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

html { 
  scroll-behavior: smooth; 
  scroll-padding-top: calc(var(--header-h) + 12px); 
}

body, h1, h2, h3, h4, p, figure { 
  margin: 0; 
}

img, svg, iframe, object { 
  max-width: 100%; 
  height: auto;
  display: block; 
}

button { 
  font: inherit; 
}

a { 
  color: inherit; 
}

ul { 
  list-style: none; 
  margin: 0; 
  padding: 0; 
}

body {
  background-color: var(--bg-light-gray);
  background-image: var(--bg-warm-radial);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

.skip-link {
  position: absolute; 
  left: -999px; 
  top: 0; 
  z-index: 200;
  background: var(--gold-400); 
  color: #1a0509; 
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0; 
  font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--maroon-primary);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.prose-measure { max-width: 62ch; }

/* ---------- Typography ---------- */
h1, h2, h3, .font-display { 
  font-family: var(--font-display); 
  font-weight: 600; 
  color: var(--text-primary); 
}

h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.15; letter-spacing: -0.005em; }
h3 { font-size: clamp(1.2rem, 1.5vw, 1.4rem); line-height: 1.25; }

p { color: var(--text-secondary); }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--maroon-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.section-kicker::before {
  content: "";
  width: 18px; 
  height: 3px;
  background: var(--gold-400);
  display: inline-block;
}

.section-head { 
  max-width: 640px; 
  margin-bottom: 40px; 
}

.section-head p { 
  color: var(--text-secondary); 
  font-size: 1.05rem; 
  margin-top: 10px; 
}

.section-head.center { 
  margin-left: auto; 
  margin-right: auto; 
  text-align: center; 
}

/* ---------- Global Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  min-height: 44px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.btn-primary:hover { 
  background: var(--maroon-dark); 
  border-color: var(--maroon-dark); 
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(128, 0, 0, 0.18);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--maroon-primary);
  color: var(--maroon-primary);
}

.btn-outline:hover { 
  background: var(--maroon-primary); 
  color: #ffffff; 
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.btn-ghost:hover { 
  background: rgba(0, 0, 0, 0.08); 
}

.btn-sm { padding: 6px 16px; font-size: 0.78rem; min-height: 36px; }
.btn-block { width: 100%; }

/* ---------- Unified Header Component ---------- */
.site-header {
  position: sticky; 
  top: 0; 
  z-index: 100;
  height: var(--header-h);
  display: flex; 
  align-items: center;
  background: var(--maroon-header);
  border-bottom: 3px solid var(--gold-400);
  box-shadow: 0 4px 18px rgba(91, 0, 19, 0.14);
}

.site-header .container { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 24px; 
}

.site-header nav {
  margin-left: auto;
}

.brand { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  text-decoration: none; 
}

.brand-mark { 
  width: 42px; 
  height: 42px; 
  flex-shrink: 0; 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.18));
}

.brand-mark img,
.brand-mark svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }

.brand-text strong { 
  font-family: var(--font-display); 
  font-size: 1.15rem; 
  color: #ffffff; 
  letter-spacing: -0.02em;
}

.brand-text span { 
  font-size: 0.68rem; 
  letter-spacing: 0.12em; 
  text-transform: uppercase; 
  color: var(--gold-400); 
  font-weight: 700; 
}

.nav-links {
  display: flex; 
  align-items: center; 
  gap: 28px;
  font-size: 0.82rem; 
  font-weight: 700; 
  letter-spacing: 0.04em; 
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  color: #ffffff;
  text-decoration: none !important;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #c89b3c;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #c89b3c;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.nav-links a.nav-login {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 7px 18px !important;
}

.nav-links a.nav-login:hover { 
  border-color: var(--gold-400); 
  color: var(--gold-400); 
}

.nav-links a.nav-login::after { display: none !important; }

.nav-actions { 
  display: flex; 
  align-items: center; 
}

.nav-toggle {
  display: none;
  width: 40px; 
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  align-items: center; 
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
}

@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  
  body.nav-open .nav-links {
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 16px;
    position: fixed; 
    top: var(--header-h); 
    left: 0; 
    right: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--maroon-header); 
    padding: 24px;
    border-bottom: 3px solid var(--gold-400);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
    z-index: 99;
  }

  body.nav-open .nav-links a {
    width: 100%;
    padding: 8px 0;
  }
}

/* ---------- Sections & Hero / Page Banners ---------- */
section { 
  padding: 80px 0; 
  position: relative; 
}

section:nth-of-type(even),
.section-alt {
  background-color: var(--bg-light-gray);
}

section:nth-of-type(odd) {
  background-color: var(--bg-white);
}

.hero,
.page-banner {
  background:
    radial-gradient(circle at 85% 50%, #ffffff 0%, #fbf9f6 40%, #f4eee1 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -80px;
  top: -50px;
  border: 2px solid rgba(128,0,0,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(212,175,55,.05), 0 0 0 48px rgba(128,0,0,.025);
  pointer-events: none;
}

.hero-inner { 
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 100%;
  position: relative; 
  z-index: 1; 
}

.hero-content {
  max-width: 600px;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.hero-model {
  max-width: 68%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(91, 0, 19, 0.15));
}

.hero-tag {
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  padding: 6px 14px; 
  border-radius: 999px;
  background: rgba(128,0,0,.055); 
  border: 1px solid rgba(128,0,0,.16);
  font-size: 0.78rem; 
  font-weight: 700; 
  color: var(--maroon-primary);
  margin-bottom: 20px;
}

.hero-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400); 
  box-shadow: 0 0 0 4px rgba(212,175,55,.16);
  display: inline-block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.08;
}

.hero-subtitle {
  font-family: var(--font-display); 
  font-style: italic; 
  font-weight: 500;
  font-size: 1.25rem; 
  color: var(--maroon-primary);
  margin-top: 14px;
}

.hero-desc {
  margin-top: 16px; 
  font-size: 1.05rem; 
  color: var(--text-secondary);
}

.hero-actions {
  display: flex; 
  flex-wrap: wrap; 
  gap: 16px; 
  margin-top: 32px;
}

.hero-meta {
  display: flex; 
  gap: 32px; 
  margin-top: 48px; 
  flex-wrap: wrap;
}

.hero-meta div {
  padding-right: 22px; 
  border-right: 1px solid var(--border-color);
}
.hero-meta div:last-child { border-right: 0; }

.hero-meta div strong { 
  display: block; 
  font-family: var(--font-display); 
  font-size: 1.8rem; 
  color: var(--maroon-primary); 
}

.hero-meta div span { 
  font-size: 0.8rem; 
  color: var(--text-muted); 
}

/* ---------- Page Banner Layout Fix ---------- */
.page-banner .hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 720px;
}

.page-banner .section-kicker {
  margin-bottom: 0;
}

.page-banner .hero-desc {
  margin-top: 4px;
}

/* ---------- Cards & Interactive Containers ---------- */
.about-stats div,
.journey-stage,
.feature-card,
.step-row,
.card-surface {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(33, 23, 25, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.about-stats div:hover,
.journey-stage:hover,
.feature-card:hover,
.step-row:hover,
.card-surface:hover {
  transform: translateY(-3px);
  border-color: rgba(128, 0, 0, 0.25);
  box-shadow: 0 10px 24px rgba(33, 23, 25, 0.08);
}

/* ---------- Grid Layouts & Feature Specs ---------- */
.about-grid {
  display: grid; 
  grid-template-columns: 1.1fr 0.9fr; 
  gap: 48px; 
  align-items: start;
}

.about-stats { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 16px; 
}

.about-stats div { padding: 24px 20px; }
.about-stats strong { 
  display: block; 
  font-family: var(--font-display); 
  font-size: 2.2rem; 
  color: var(--maroon-primary); 
}
.about-stats span { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }

.journey-track {
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 20px; 
  margin-top: 24px; 
}

.journey-stage { padding: 24px 20px; }
.journey-num {
  width: 44px; 
  height: 44px; 
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: var(--maroon-primary); 
  color: #ffffff;
  font-family: var(--font-display); 
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.journey-stage.is-current .journey-num { 
  background: var(--gold-400); 
  color: var(--maroon-dark); 
}

.feature-grid { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 20px; 
}
.feature-card { padding: 24px; }
.feature-icon {
  width: 42px; 
  height: 42px; 
  border-radius: 8px;
  background: rgba(128, 0, 0, 0.07); 
  border: 1px solid rgba(128, 0, 0, 0.08);
  display: flex; 
  align-items: center; 
  justify-content: center; 
  color: var(--maroon-primary);
  margin-bottom: 16px;
}


/* Guidelines Steps */
.steps-list { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.step-row { display: flex; gap: 20px; align-items: flex-start; padding: 24px; }
.step-num {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  color: var(--gold-400); background: var(--maroon-primary);
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}


/* Certificate & Call to Action Banner */
.certificate {
  background: linear-gradient(135deg, #fffaf0 0%, #faf8f5 100%);
  border: 1px solid #e8d7aa; border-radius: var(--radius-lg);
  padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 32px;
}

.cta-banner {
  background: linear-gradient(135deg, #5b0013 0%, #800000 72%, #5b0013 100%);
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: var(--radius-lg); padding: 48px; color: #ffffff;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  box-shadow: 0 14px 35px rgba(91,0,19,.15);
}
.cta-banner h2 { color: #ffffff; margin: 0; }
.cta-banner-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-banner .btn-primary { background: var(--gold-400); border-color: var(--gold-400); color: #3e2d00; }
.cta-banner .btn-primary:hover { background: #e0bb43; border-color: #e0bb43; }
.cta-banner .btn-outline { border-color: rgba(255,255,255,.65); color: #ffffff; background: transparent; }
.cta-banner .btn-outline:hover { background: #ffffff; color: var(--maroon-primary); }

/* ---------- Login Page Styling ---------- */
.login-shell {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; background: var(--bg-light-gray);
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 12px 32px rgba(33, 23, 25, 0.06);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.login-brand .brand-text strong {
  color: var(--maroon-primary);
  font-size: 1.15rem;
}

.login-brand .brand-text span {
  color: var(--gold-500);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.login-header {
  margin-bottom: 24px;
}

.login-card h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.15rem);
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-card .lede {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border-color); background: var(--bg-white);
  color: var(--text-primary); font-size: 0.95rem; transition: border-color 0.2s ease;
}
.field input:focus { outline: none; border-color: var(--maroon-primary); }

.login-submit {
  margin-top: 6px;
  min-height: 46px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.google-login-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.google-signin {
  width: 100%;
  min-height: 40px;
  display: flex;
  justify-content: center;
}

.google-signin > div {
  width: 100% !important;
  display: flex;
  justify-content: center;
}

.login-domain-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--bg-light-gray);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.login-note-icon {
  flex-shrink: 0;
  line-height: 1.35;
}

.login-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.login-foot a {
  color: var(--maroon-primary);
  font-weight: 700;
  text-decoration: none;
}

.login-foot a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
  }
}

/* ---------- Site Footer ---------- */
.site-footer { 
  background: var(--maroon-header); 
  border-top: 4px solid var(--gold-400); 
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 0 28px; 
}

.footer-grid { 
  display: grid; 
  grid-template-columns: 1.4fr 1fr 1fr 1fr; 
  gap: 32px; 
  padding-bottom: 40px; 
}

.footer-brand p { font-size: 0.88rem; margin-top: 12px; color: rgba(255, 255, 255, 0.7); }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 14px; }
.footer-col a { display: block; text-decoration: none; color: rgba(255, 255, 255, 0.8); font-size: 0.88rem; padding: 4px 0; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--gold-400); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; 
  padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8rem; color: rgba(255, 255, 255, 0.6);
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 860px) {
  .about-grid, .footer-grid { grid-template-columns: 1fr; }
  .journey-track { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .hero, .page-banner { padding-top: 68px; padding-bottom: 70px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { min-height: 280px; }
  .hero-meta div { border-right: 0; min-width: 42%; }
  .feature-grid { grid-template-columns: 1fr; }
  .step-row { flex-direction: column; gap: 12px; }
}

/* ==========================================================================
   INTERACTIVE COMPONENTS, TOAST & LEADERBOARD
   ========================================================================== */

/* ---------- Toast Notification System ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--maroon-header);
  color: #ffffff;
  border: 1px solid var(--gold-400);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 10px var(--gold-400);
  flex-shrink: 0;
}

/* ---------- Login Form Field Errors ---------- */
.field-error {
  display: none;
  color: var(--error-color);
  background: var(--error-bg);
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-top: 8px;
  font-weight: 600;
}

.field-error.show {
  display: block;
}



/* ==========================================================================
   ADMIN CONSOLE LAYOUT (LIGHT THEME FORMAT)
   ========================================================================== */

/* Light Admin Layout Base */
body.bg-admin-dark {
  background-color: #faf8f5;
  background-image: var(--bg-warm-radial);
  color: var(--text-primary);
}

.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: #faf8f5;
}

/* Sidebar Container */
.admin-sidebar {
  width: 260px;
  background-color: var(--maroon-header);
  border-right: 3px solid var(--gold-400);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 24px 16px;
  box-shadow: 4px 0 18px rgba(91, 0, 19, 0.1);
}

/* Sidebar Brand Header */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-brand .icon-shield-gold {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  stroke: var(--gold-400);
}

.brand-title-admin {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #ffffff;
}

/* Sidebar Navigation Items & Lettering Design */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-group-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-400);
  text-transform: uppercase;
  margin: 20px 0 8px 10px;
  opacity: 0.9;
}

/* Custom Styled Nav Buttons & Typography */
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s ease-in-out;
  position: relative;
}

/* Strict Icon Sizing Constraint */
.nav-item svg,
.nav-item img,
.nav-item i {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

/* Inner Text & Lettering Alignment */
.nav-item span,
.nav-item label,
.nav-item p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: inherit;
  margin: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateX(4px);
}

.nav-item:hover svg,
.nav-item:hover img,
.nav-item:hover i {
  stroke: var(--gold-400);
  transform: scale(1.08);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.24) 0%, rgba(128, 0, 0, 0.45) 100%);
  border: 1px solid var(--gold-400);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.nav-item.active svg,
.nav-item.active img,
.nav-item.active i {
  stroke: var(--gold-400);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 20%;
  height: 60%;
  width: 4px;
  background: var(--gold-400);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px var(--gold-400);
}

/* Main Content Area */
.admin-main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #faf8f5;
}

/* Admin Top Header */
.admin-header {
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background-color: #ffffff;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.admin-header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--maroon-primary);
  text-transform: uppercase;
}

.status-indicator-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #16a34a;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.4);
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.admin-header-actions a {
  color: var(--maroon-primary);
  font-weight: 700;
  text-decoration: none;
}

.admin-view-panel {
  padding: 32px;
}

.admin-view-panel.hidden {
  display: none;
}

/* Admin Dashboard Elements */
.admin-view-panel h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.admin-view-panel p.subhead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.metric-group {
  margin-bottom: 2rem;
}

.metric-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--maroon-primary);
  margin-bottom: 6px;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-val span {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #16a34a;
  font-weight: 700;
  margin-left: 6px;
}

/* ==========================================================================
   STUDENT PORTAL LAYOUT (LIGHT THEME FORMAT)
   ========================================================================== */

/* Page Background */
body.bg-student-grid {
  background-color: var(--bg-light-gray);
  background-image: var(--bg-warm-radial);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Header Navigation Bar */
.header-bar {
  height: 72px;
  background: var(--maroon-header);
  border-bottom: 3px solid var(--gold-400);
  box-shadow: 0 4px 18px rgba(91, 0, 19, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo .icon-shield {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  stroke: var(--gold-400);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-400);
  text-transform: uppercase;
}

/* Header Buttons & Icons */
.badge-season {
  font-size: 0.75rem;
  color: var(--gold-400);
  font-weight: 600;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-400);
  color: #3e2d00;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-outline-sm {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline-sm:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-mode-switch {
  color: var(--gold-400);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

/* Main Canvas Container */
.student-canvas {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.status-pill-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--maroon-primary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.4);
}

.student-canvas .hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-primary);
  line-height: 1.1;
}

.student-canvas .hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 6px;
}

.btn-gold-lg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--maroon-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(128, 0, 0, 0.2);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-gold-lg:hover {
  background: var(--maroon-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(128, 0, 0, 0.3);
}

.btn-gold-lg .icon-swords {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Cards Base Surface */
.card-surface {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(33, 23, 25, 0.04);
}

/* Player Profile Card */
.player-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-main-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--maroon-primary);
  border: 2px solid var(--gold-400);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-level {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--maroon-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 2px 0;
}

.profile-email {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* XP Progress Bar */
.profile-xp-widget {
  width: 320px;
  max-width: 100%;
}

.xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.xp-title { color: var(--text-secondary); }
.xp-value { color: var(--maroon-primary); font-weight: 700; }

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: #e9dfda;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  border-radius: 999px;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Core Metrics Card */
.metrics-card {
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
}

.metric-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--maroon-primary);
}

.metric-divider {
  width: 1px;
  height: 36px;
  background: var(--border-color);
}

/* Quests & Activity List Items */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.badge-subtle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quest-list, .activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-item, .activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-light-gray);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.quest-info, .activity-details {
  display: flex;
  flex-direction: column;
}

.quest-title, .activity-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.quest-desc, .activity-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.badge-gold-pill, .xp-gain-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--maroon-primary);
  background: rgba(128, 0, 0, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(128, 0, 0, 0.15);
}

.activity-item {
  gap: 14px;
  justify-content: flex-start;
}

.activity-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(128, 0, 0, 0.08);
  color: var(--maroon-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.xp-gain-badge {
  margin-left: auto;
}

/* Responsive Adjustments */
@media (max-width: 860px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .header-bar {
    padding: 0 16px;
  }
}
/* ==========================================================================
   INNER PANELS ENHANCEMENTS (OVERVIEW, DIRECTORY & GAME REPORTS)
   ========================================================================== */

.panel-header {
  margin-bottom: 28px;
}

.panel-header h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.panel-header .subhead {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ---------- World Overview Grid ---------- */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 0 4px 14px rgba(33, 23, 25, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(128, 0, 0, 0.25);
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-val-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-neutral { background: #f3f4f6; color: #4b5563; }

/* Health Metrics */
.section-block {
  margin-top: 32px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.health-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.metric-progress-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 4px 14px rgba(33, 23, 25, 0.03);
}

.metric-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.metric-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.metric-percent {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--maroon-primary);
  font-size: 1.1rem;
}

.metric-highlight-card {
  background: linear-gradient(135deg, #ffffff 0%, #fffaf0 100%);
  border: 1px solid var(--gold-400);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.highlight-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-100);
  border: 1px solid var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.highlight-details {
  display: flex;
  flex-direction: column;
}

.highlight-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--maroon-primary);
  letter-spacing: 0.05em;
}

.highlight-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
}

.highlight-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Student Directory Table ---------- */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 360px;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 14px;
  stroke: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.search-box input:focus {
  outline: none;
  border-color: var(--maroon-primary);
}

.checkbox-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.admin-table-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(33, 23, 25, 0.04);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.admin-table th {
  background: var(--bg-light-gray);
  padding: 14px 20px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--text-primary);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: #fffaf5;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--maroon-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-alt {
  background: #3a2d30;
}

.user-name {
  font-weight: 700;
  color: var(--text-primary);
}

.email-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.email-text {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.domain-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.tag-ub { background: var(--gold-100); color: var(--maroon-primary); border: 1px solid rgba(212, 175, 55, 0.3); }
.tag-external { background: #f3f4f6; color: var(--text-muted); }

.course-code {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-active { background: #e6f4ea; color: #137333; }
.status-open { background: #fef3c7; color: #b45309; }

.btn-table-action {
  color: var(--maroon-primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
}

.btn-table-action:hover {
  text-decoration: underline;
}

.text-right {
  text-align: right;
}

/* ---------- Game Reports Feed ---------- */
.reports-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ticket-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--maroon-primary);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 0 4px 14px rgba(33, 23, 25, 0.04);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ticket-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 4px;
}

.tag-issue { background: #fef2f2; color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.2); }

.ticket-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ticket-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.ticket-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  gap: 16px;
  flex-wrap: wrap;
}

.reporter-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--maroon-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-actions {
  display: flex;
  gap: 10px;
}


/* ==========================================================================
   ADMIN CONSOLE — UI POLISH & MICRO-INTERACTIONS
   Gold/Shield theme enhancements: animations, typography, badges, empty states
   ========================================================================== */

/* ---------- 1. LIVE Pulse Animation ---------- */
@keyframes pulse-live {
  0%   { box-shadow: 0 0 0 0   rgba(22, 163, 74, 0.55); }
  60%  { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(22, 163, 74, 0);    }
}

.status-indicator-live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #16a34a;
  animation: pulse-live 1.8s ease-out infinite;
  flex-shrink: 0;
}

/* ---------- 2. Sidebar Nav Micro-Interactions ---------- */
.nav-item {
  transition: background 0.18s ease, color 0.18s ease,
              transform 0.18s ease, border-color 0.18s ease,
              box-shadow 0.18s ease;
}

.nav-item svg {
  transition: stroke 0.18s ease, transform 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  transform: translateX(4px);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav-item:hover svg {
  stroke: var(--gold-400);
  transform: scale(1.1);
}

.nav-item:active {
  transform: translateX(2px) scale(0.98);
}

/* Gold glow indicator bar for active nav item */
.nav-item.active {
  background: linear-gradient(135deg, rgba(212,175,55,0.22) 0%, rgba(128,0,0,0.42) 100%);
  border: 1px solid rgba(212, 175, 55, 0.7);
  box-shadow: 0 4px 16px rgba(0,0,0,0.22), inset 0 1px 0 rgba(212,175,55,0.15);
}

.nav-item.active svg {
  stroke: var(--gold-400);
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

/* ---------- 3. Button Micro-Interactions ---------- */
.btn-gold-sm,
.btn-outline-dark-sm,
.btn-mode-switch-dark {
  transition: all 0.2s ease;
}

/* Gold action button */
.btn-gold-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--gold-400);
  color: #3e2d00;
  border: 1px solid var(--gold-400);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
}

.btn-gold-sm:hover {
  background: #e0bb43;
  border-color: #e0bb43;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
}

.btn-gold-sm:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.2);
}

/* Dark outline button */
.btn-outline-dark-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline-dark-sm:hover {
  border-color: var(--maroon-primary);
  color: var(--maroon-primary);
  background: rgba(128, 0, 0, 0.04);
  transform: translateY(-1px);
}

/* Mode switch link */
.btn-mode-switch-dark {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--maroon-primary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(128, 0, 0, 0.18);
}

.btn-mode-switch-dark:hover {
  background: rgba(128, 0, 0, 0.06);
  border-color: var(--maroon-primary);
  transform: translateY(-1px);
}

/* Admin avatar button */
.admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--maroon-primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold-400);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: default;
}

.admin-avatar:hover {
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
  transform: scale(1.06);
}

/* Metric stat cards */
.admin-card-surface,
.metric-stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-card-surface {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(33, 23, 25, 0.04);
  color: var(--text-primary);
}

.admin-card-surface:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(33, 23, 25, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
}

.metric-stat-card {
  padding: 22px 24px;
}

/* ---------- 4. Typography Hierarchy ---------- */
/* View panel headers */
.view-header {
  margin-bottom: 28px;
}

.view-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.view-description {
  font-size: 0.96rem;
  color: var(--text-secondary);
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.5;
  max-width: 600px;
}

/* Metric labels */
.stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--maroon-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Trend badges inline with values */
.stat-trend {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.stat-trend.positive { background: #dcfce7; color: #15803d; }
.stat-trend.warning  { background: #fef3c7; color: #b45309; }
.stat-trend.neutral  { background: #f3f4f6; color: #4b5563; }

/* Card subtitle / section heading inside cards */
.card-subtitle {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

/* Table header typography */
.admin-table th {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Player name in table */
.player-name {
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--text-primary);
}

/* Email address */
.email-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Timestamps & secondary meta */
.ticket-time,
.meta-timestamp {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Ticket reporter line */
.ticket-reporter {
  font-size: 0.87rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.ticket-reporter strong {
  color: var(--text-primary);
  font-weight: 700;
}

.ticket-reporter small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ---------- 5. Progress bar inside cards ---------- */
.bar-track-dark {
  width: 100%;
  height: 8px;
  background: var(--bg-light-gray);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill-gold {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500) 0%, var(--gold-400) 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.health-item {
  margin-bottom: 16px;
}

.health-item:last-child {
  margin-bottom: 0;
}

.health-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.health-meta .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--maroon-primary);
  font-size: 0.95rem;
}

.health-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.text-gold {
  color: var(--gold-500);
  font-weight: 700;
}

/* ---------- 6. Status & Domain Badges (crisp pills) ---------- */

/* UB Mail verified badge */
.badge-verified-ub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--maroon-primary);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* External email warning badge */
.badge-warning-ext {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Course / section badge */
.badge-course {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(128, 0, 0, 0.07);
  color: var(--maroon-primary);
  border: 1px solid rgba(128, 0, 0, 0.14);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

/* Active status dot + label */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-dot.active {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}

.status-dot.inactive {
  background: #9ca3af;
}

/* Technical Issue ticket tag */
.badge-ticket-tech {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Action link in table */
.link-action {
  color: var(--maroon-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.link-action:hover {
  color: var(--maroon-dark);
  text-decoration: underline;
}

/* ---------- 7. Admin Metrics Row Layout ---------- */
.admin-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

/* ---------- 8. World Health Card ---------- */
.world-health-card {
  padding: 28px;
}

/* ---------- 9. Table Controls ---------- */
.table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.input-dark {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-dark:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.search-icon {
  position: absolute;
  left: 13px;
  stroke: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.toggle-filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.toggle-filter-label input[type="checkbox"] {
  accent-color: var(--maroon-primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ---------- 10. Table Wrapper & Pagination ---------- */
.table-wrapper {
  padding: 0;
  overflow: hidden;
}

.table-wrapper .admin-table {
  border-radius: 0;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-pagination-nav,
.btn-pagination-page {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pagination-nav:hover:not(:disabled),
.btn-pagination-page:hover {
  border-color: var(--maroon-primary);
  color: var(--maroon-primary);
  background: rgba(128, 0, 0, 0.04);
}

.btn-pagination-page.active {
  background: var(--maroon-primary);
  border-color: var(--maroon-primary);
  color: #ffffff;
}

.btn-pagination-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-ellipsis {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0 4px;
}

/* Small avatar */
.avatar-sm-gold {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--maroon-primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
}

.avatar-dark-accent {
  background: #3a2d30;
}

.player-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.email-col {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- 11. EMPTY STATES ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 32px;
  gap: 16px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-light-gray);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.empty-state-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--text-muted);
  flex-shrink: 0;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.empty-state-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.55;
  margin: 0;
}

.empty-state-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  margin-top: 4px;
  background: var(--maroon-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.empty-state-action:hover {
  background: var(--maroon-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(128, 0, 0, 0.2);
}

.empty-state-action-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.empty-state-action-ghost:hover {
  border-color: var(--maroon-primary);
  color: var(--maroon-primary);
}

.empty-state-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}


/* ==========================================================================
   V2 ADDITIONS: game connection, student page, play page, polish
   (Everything above is the original stylesheet.)
   ========================================================================== */

/* ---------- Header: links that depend on who is signed in ---------- */
.nav-links [data-show]:not(.is-visible) { display: none !important; }
.nav-links li { display: flex; align-items: center; }
.nav-user { gap: 10px; }
.nav-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold-400); color: #1a0509;
  font-size: 0.72rem; font-weight: 800; flex-shrink: 0;
}
.nav-username { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; color: #ffffff; }
.nav-logout {
  background: transparent; border: 1px solid rgba(255,255,255,0.3); border-radius: 999px;
  padding: 7px 18px; cursor: pointer; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: #ffffff;
  transition: border-color .2s ease, color .2s ease;
}
.nav-logout:hover { border-color: var(--gold-400); color: var(--gold-400); }
.nav-links a.nav-play {
  background: var(--gold-400); color: #3e2d00; border-radius: 999px; padding: 7px 18px !important;
}
.nav-links a.nav-play:hover { background: #e0bb43; color: #3e2d00; }
.nav-links a.nav-play::after { display: none; }

/* ---------- Hero ---------- */
.hero-actions { align-items: center; }
.hero-note { flex-basis: 100%; font-size: 0.9rem; color: var(--text-muted); margin-top: -4px; }
.hero-welcome { margin-top: 18px; font-weight: 600; color: var(--maroon-primary); }
.hero-visual { position: relative; }
.hero-students {
  max-height: 460px; width: auto;
  filter: drop-shadow(0 18px 30px rgba(91, 0, 19, 0.18));
}
.hero-brahmmy {
  position: absolute; left: 2%; bottom: 6%;
  display: flex; align-items: center; gap: 10px;
  background: #ffffff; border: 1px solid var(--border-color); border-radius: 999px;
  padding: 6px 16px 6px 6px; box-shadow: 0 10px 24px rgba(33, 23, 25, 0.12);
  font-size: 0.85rem; font-weight: 700; color: var(--maroon-primary);
}
.hero-brahmmy img { width: 46px; height: 46px; }
.hero-glow {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.28) 0%, rgba(212,175,55,0) 70%);
  z-index: -1;
}

/* ---------- Campuses ---------- */
.campus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.campus-card {
  background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-md);
  padding: 20px; border-top: 4px solid var(--maroon-primary);
  box-shadow: 0 4px 16px rgba(33, 23, 25, 0.04);
}
.campus-card h3 { font-size: 1.1rem; }
.campus-card p { font-size: 0.9rem; margin-top: 6px; }
.campus-card .campus-tag {
  display: inline-block; margin-top: 12px; font-size: 0.72rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--gold-500);
}

/* ---------- Leaderboard ---------- */
.lb-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center; }
.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center;
  padding: 12px 16px; background: var(--bg-white); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); font-size: 0.92rem;
}
.lb-rank {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-light-gray); font-weight: 800; color: var(--text-secondary);
}
.lb-row.top1 .lb-rank { background: var(--gold-400); color: #3e2d00; }
.lb-row.top2 .lb-rank { background: #d9d9d9; color: #333; }
.lb-row.top3 .lb-rank { background: #d8a37a; color: #3b2410; }
.lb-row.is-me { border-color: var(--gold-400); background: var(--gold-100); }
.lb-name { font-weight: 700; color: var(--text-primary); }
.lb-name em { font-style: normal; color: var(--maroon-primary); font-size: .8rem; }
.lb-level { font-size: 0.78rem; color: var(--text-muted); }
.lb-points { font-weight: 800; color: var(--maroon-primary); }
.lb-empty { padding: 18px; color: var(--text-muted); text-align: center; border: 1px dashed var(--border-color); border-radius: var(--radius-sm); }

/* ---------- Toast error ---------- */
.toast.is-error .dot { background: #dc2626; box-shadow: 0 0 10px #dc2626; }

/* ---------- Login ---------- */
.google-btn {
  width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #ffffff; border: 1.5px solid var(--border-color); border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.95rem; color: var(--text-primary); cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.google-btn:hover { border-color: var(--maroon-primary); box-shadow: 0 6px 16px rgba(33,23,25,.08); transform: translateY(-1px); }
.google-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.google-btn svg { width: 20px; height: 20px; }
.login-hint { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-top: 8px; }
.staff-login { margin-top: 18px; border-top: 1px solid var(--border-color); padding-top: 14px; }
.staff-login summary {
  cursor: pointer; font-size: 0.82rem; font-weight: 700; color: var(--text-secondary);
  list-style: none; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.staff-login summary::-webkit-details-marker { display: none; }
.staff-login summary::after { content: "▾"; font-size: .75rem; }
.staff-login[open] summary::after { content: "▴"; }
.staff-login form { margin-top: 14px; }

/* ---------- Modals ---------- */
.modal {
  display: none; position: fixed; inset: 0; z-index: 500; padding: 16px;
  background: rgba(26, 5, 9, 0.45); align-items: center; justify-content: center;
}
.modal.open { display: flex; }
.modal-card {
  position: relative; width: 100%; max-width: 500px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: #ffffff; border-radius: var(--radius-lg); padding: 30px;
  border: 2px solid var(--gold-400); box-shadow: 0 24px 48px rgba(0,0,0,.18);
}
.modal-card h2 { font-size: 1.5rem; color: var(--maroon-primary); margin-bottom: 4px; }
.modal-card > p { font-size: 0.9rem; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-light-gray); border: 1px solid var(--border-color); cursor: pointer;
  font-size: 1rem; color: var(--text-muted);
}
.field textarea, .field select {
  width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border-color);
  background: var(--bg-white); color: var(--text-primary); font: inherit; font-size: 0.95rem;
}
.field textarea { min-height: 110px; resize: vertical; }
.field textarea:focus, .field select:focus { outline: none; border-color: var(--maroon-primary); }
.detail-box { background: var(--gold-100); border: 1px solid var(--gold-400); border-radius: 10px; padding: 18px; margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(212,175,55,.5); }
.detail-grid span { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.detail-grid strong { font-family: var(--font-display); font-size: 1.25rem; color: var(--maroon-primary); }

/* ---------- Shared bits ---------- */
.muted { color: var(--text-muted); }
.small { font-size: 0.82rem; }
.status-muted { background: #f3f4f6; color: #6b7280; }
code { background: var(--bg-light-gray); border: 1px solid var(--border-color); padding: 1px 6px; border-radius: 4px; font-size: .85em; }

/* ---------- Student page ---------- */
.student-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, #5b0013 0%, #800000 72%, #5b0013 100%);
  border-radius: var(--radius-lg); padding: 32px; color: #ffffff; position: relative; overflow: hidden;
  border: 1px solid rgba(212,175,55,.35); box-shadow: 0 14px 35px rgba(91,0,19,.15);
}
.student-hero h1 { color: #ffffff; font-size: clamp(1.9rem, 4vw, 2.7rem); }
.student-hero p { color: rgba(255,255,255,.8); margin-top: 6px; }
.student-hero .status-pill-online { color: var(--gold-400); }
.student-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.student-hero .btn-primary { background: var(--gold-400); border-color: var(--gold-400); color: #3e2d00; }
.student-hero .btn-primary:hover { background: #e0bb43; border-color: #e0bb43; }
.student-hero .btn-outline { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.student-hero .btn-outline:hover { background: #fff; color: var(--maroon-primary); }
.student-hero-mascot { position: absolute; right: 18px; bottom: -30px; width: 150px; opacity: .14; pointer-events: none; }
.progress-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.progress-level { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--maroon-primary); line-height: 1.2; }
.stage-pill {
  display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--gold-100); border: 1px solid var(--gold-400); font-size: .72rem; font-weight: 800; color: #6d4c00;
}
.stage-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0 12px; }
.stage-track li {
  text-align: center; font-size: .72rem; font-weight: 700; padding: 8px 4px; border-radius: 6px;
  background: var(--bg-light-gray); border: 1px solid var(--border-color); color: var(--text-muted);
}
.stage-track li.done { background: rgba(128,0,0,.08); color: var(--maroon-primary); border-color: rgba(128,0,0,.2); }
.stage-track li.current { background: var(--maroon-primary); color: #ffffff; border-color: var(--maroon-primary); }
.award-banner {
  margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fffaf0, #fff3cf); border: 1px solid var(--gold-400);
  font-weight: 700; color: #6d4c00;
}
.profile-line { display: flex; align-items: center; gap: 16px; }
.help-actions { display: flex; flex-direction: column; gap: 10px; }
.help-actions .btn { justify-content: flex-start; }
.card-surface:hover { transform: none; }

/* ---------- Play page ---------- */
body.play-page { background: #1a0509; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.play-bar {
  height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 20px; background: var(--maroon-header); border-bottom: 3px solid var(--gold-400);
}
.play-bar .brand-mark { width: 34px; height: 34px; }
.play-bar .brand-text strong { font-size: 1rem; }
.play-who { color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 600; text-align: center; }
.play-actions { display: flex; gap: 8px; }
.play-actions a, .play-actions button {
  background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 999px;
  padding: 6px 16px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; cursor: pointer;
}
.play-actions a:hover, .play-actions button:hover { border-color: var(--gold-400); color: var(--gold-400); }
.stage { position: relative; flex: 1; }
#unity-canvas { width: 100%; height: 100%; display: block; background: #1a0509; }
.loader {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center;
  background: radial-gradient(circle at 50% 45%, #7a1630 0%, #4d0f1f 55%, #2a0711 100%);
}
.loader.hidden { display: none; }
.loader img { width: 120px; animation: bob 2.4s ease-in-out infinite; }
.loader h2 { color: #ffffff; }
.loader h2 span { color: var(--gold-400); }
.loader .bar { width: min(420px, 80vw); height: 10px; background: rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; }
#bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); transition: width .3s ease; }
#loader-text { color: rgba(255,255,255,.85); max-width: 520px; }
.loader.has-error #loader-text { color: #ffd7d7; }
.loader.has-error img { animation: none; }
.loader-tip { color: rgba(255,255,255,.55); font-size: .82rem; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Admin additions ---------- */
body.is-guarded .admin-layout { visibility: hidden; }
.admin-view-panel h1.view-title { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.nav-count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  background: var(--gold-400); color: #3e2d00; font-size: .72rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-count:empty { display: none; }
.sidebar-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); }
.sidebar-foot a { color: rgba(255,255,255,.75); font-size: .85rem; text-decoration: none; display: block; padding: 6px 10px; }
.sidebar-foot a:hover { color: var(--gold-400); }
.sidebar-toggle { display: none; }
.admin-metrics-row { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat-sub { display: block; margin-top: 8px; font-size: .78rem; color: var(--text-muted); }
.health-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.health-summary div { background: var(--bg-light-gray); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 14px; }
.health-summary strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--maroon-primary); }
.health-summary span { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.table-msg { text-align: center; padding: 28px !important; color: var(--text-muted) !important; }
.table-msg.error { color: var(--error-color) !important; }
.row-click { cursor: pointer; }
.page-indicator { font-size: .82rem; color: var(--text-muted); font-weight: 700; padding: 0 6px; }
.report-ticket { border-left: 4px solid #dc2626; }
.report-ticket.tone-amber { border-left-color: #b45309; }
.report-ticket.tone-gold { border-left-color: var(--gold-400); }
.report-ticket:hover { transform: none; }
.badge-ticket {
  display: inline-flex; padding: 4px 10px; border-radius: 6px; font-size: .7rem; font-weight: 900;
  letter-spacing: .06em; text-transform: uppercase;
  background: rgba(220,38,38,.08); color: #dc2626; border: 1px solid rgba(220,38,38,.25);
}
.badge-ticket.tone-amber { background: rgba(245,158,11,.1); color: #b45309; border-color: rgba(245,158,11,.3); }
.badge-ticket.tone-gold { background: rgba(212,175,55,.12); color: #8a6512; border-color: rgba(212,175,55,.4); }
.ticket-title { margin: 12px 0 8px; font-size: 1.15rem; }
.ticket-desc { font-size: .92rem; margin-bottom: 14px; white-space: pre-wrap; }

@media (max-width: 940px) {
  .campus-grid { grid-template-columns: 1fr 1fr; }
  .lb-wrap { grid-template-columns: 1fr; gap: 24px; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 12px 16px; border-right: 0; border-bottom: 3px solid var(--gold-400); }
  .sidebar-brand { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
  .sidebar-toggle {
    display: inline-flex; margin-left: auto; background: rgba(255,255,255,.1); color: #fff;
    border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 700;
  }
  .admin-sidebar .sidebar-nav, .admin-sidebar .sidebar-foot { display: none; }
  body.sidebar-open .admin-sidebar .sidebar-nav, body.sidebar-open .admin-sidebar .sidebar-foot { display: flex; flex-direction: column; margin-top: 12px; }
  .admin-header { padding: 0 16px; }
  .admin-view-panel { padding: 20px 16px; }
  .table-wrapper { overflow-x: auto; }
}
@media (max-width: 700px) {
  .campus-grid { grid-template-columns: 1fr; }
  .hero-students { max-height: 340px; }
  .lb-row { grid-template-columns: 34px 1fr auto; }
  .lb-level { display: none; }
  .play-who { display: none; }
  .health-summary { grid-template-columns: 1fr; }
  .stage-track { grid-template-columns: 1fr 1fr; }
}

/* ---------- Controls list (How to Play) ---------- */
.controls-list { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 18px; }
.controls-list li { display: flex; align-items: center; gap: 10px; }
.controls-list span { color: var(--text-secondary); font-size: 0.95rem; }
kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 4px 10px;
  background: var(--maroon-primary); color: #fff; border-radius: 6px; font-size: 0.78rem; font-weight: 700;
  font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.04em; box-shadow: 0 2px 0 var(--maroon-dark);
  white-space: nowrap;
}
button.admin-avatar { cursor: pointer; padding: 0; font-family: inherit; }

/* ---------- Small fixes ---------- */
ol.lb-list { list-style: none; margin: 0; padding: 0; }
.hero-meta { gap: 22px; flex-wrap: nowrap; }
.hero-meta div { padding-right: 18px; }
.stage-status {
  display: inline-block; margin-top: 12px; font-size: 0.72rem; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; color: var(--gold-500);
}
.detail-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.detail-grid.cols-3 strong { font-size: 1.05rem; }
@media (max-width: 700px) {
  .hero-meta { flex-wrap: wrap; }
  .detail-grid.cols-3 { grid-template-columns: 1fr 1fr; }
}
