@font-face {
  font-family: 'Phantom Sans';
  src: url('https://assets.hackclub.com/fonts/Phantom_Sans_0.7/Regular.woff2') format('woff2'),
       url('https://assets.hackclub.com/fonts/Phantom_Sans_0.7/Regular.woff') format('woff');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Phantom Sans';
  src: url('https://assets.hackclub.com/fonts/Phantom_Sans_0.7/Bold.woff2') format('woff2'),
       url('https://assets.hackclub.com/fonts/Phantom_Sans_0.7/Bold.woff') format('woff');
  font-weight: bold; font-style: normal; font-display: swap;
}

:root {
  --hc-red: #ec3750;
  --hc-orange: #ff8c37;
  --hc-yellow: #f1c40f;
  --hc-green: #33d6a6;
  --hc-blue: #338eda;
  --hc-purple: #a633d6;
  --hc-muted: #8492a6;

  --bg: #fbfbfd;
  --card: #ffffff;
  --border: #e6e9f0;
  --fill: #f4f5f9;
  --ink: #16181d;
  --slate: #3c4858;
  --muted: #8492a6;
  --rail: #16181d;

  --shadow-sm: 0 2px 8px rgba(20, 20, 30, 0.05);
  --shadow-md: 0 8px 20px rgba(20, 20, 30, 0.08);
  --shadow-lg: 0 20px 48px rgba(20, 20, 30, 0.14);
  --gradient-warm: linear-gradient(120deg, var(--hc-red), var(--hc-orange));
  --gradient-rainbow: linear-gradient(90deg, var(--hc-red), var(--hc-orange), var(--hc-yellow), var(--hc-green));

  --body-font: 'Phantom Sans', system-ui, sans-serif;
}

body.dark-mode {
  --bg: #121217;
  --card: #191920;
  --border: #2a2a33;
  --fill: #1e1e26;
  --ink: #f7f7fa;
  --slate: #cbd1dc;
  --muted: #8f97a8;
  --rail: #0c0c10;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--slate);
  font-family: var(--body-font);
  font-size: 15.5px;
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

h1, h2, h3 { font-family: var(--body-font); font-weight: bold; color: var(--ink); letter-spacing: -0.02em; }
h2 { font-size: 20px; margin: 0 0 14px; }
h3 { font-size: 16px; }

a { color: var(--hc-red); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; border-radius: 12px; }

/* ══════════ GUEST / HOMEPAGE ══════════ */
body.guest { background: var(--bg); }

.gtop {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px; max-width: 1100px; margin: 0 auto;
}
.gtop-brand { display: flex; align-items: center; gap: 10px; }
.gtop-brand img { width: 34px; border-radius: 8px; }
.gtop-brand span { font-weight: bold; font-size: 16px; color: var(--ink); }
.gtop-actions { display: flex; align-items: center; gap: 10px; }

.hero-wrap { padding: 56px 40px 64px; border-bottom: 1px solid var(--border); }
.hero-inner { max-width: 1000px; margin: 0 auto; text-align: left; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--fill); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: bold;
  color: var(--muted); margin-bottom: 22px;
}

.hero-title { font-size: 48px; line-height: 1.08; margin-bottom: 18px; max-width: 680px; }
.hero-title .accent {
  color: var(--hc-red);
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
  text-decoration-color: rgba(236,55,80,0.35);
}

.hero-sub { font-size: 17px; color: var(--muted); max-width: 560px; margin: 0 auto 30px; }

.hero-cta { display: flex; gap: 12px; margin-bottom: 32px; }

.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 24px; margin-top: 12px; max-width: 1080px; margin-left: auto; margin-right: auto; }
.hero-stat { text-align: center; }
.hero-stat strong { font-weight: 800; }
.hero-stat { min-width: 0; }
.hero-stat strong { display: block; font-size: 22px; color: var(--ink); }
.hero-stat span { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.section { max-width: 1000px; margin: 0 auto; padding: 56px 40px; }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 32px; }
.section-head h2 { font-size: 28px; margin-bottom: 8px; }
.section-head p { color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: bold; margin-bottom: 14px; color: var(--hc-red);
  background: var(--fill); border: 1px solid var(--border);
}
.feature-card h3 { margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 14px; }

.leader-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.leader-chip {
  display: flex; align-items: center; gap: 10px; background: var(--card);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 18px 8px 8px;
  box-shadow: var(--shadow-sm);
}
.leader-avatar {
  width: 34px; height: 34px; border-radius: 999px; background: var(--gradient-warm);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 13px; flex-shrink: 0;
}
.leader-chip strong { font-size: 13.5px; color: var(--ink); }
.leader-chip span { display: block; font-size: 11.5px; color: var(--muted); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.project-card img { border-radius: 0; aspect-ratio: 16/10; object-fit: cover; margin: 0; }
.project-card-body { padding: 16px; }
.project-card-body p { color: var(--muted); font-size: 13px; margin: 4px 0 8px; }
.link-list-inline a:not(:last-child)::after { content: "·"; margin-left: 8px; color: var(--muted); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.media-grid img { aspect-ratio: 4/3; object-fit: cover; }

.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item strong { display: block; color: var(--ink); margin-bottom: 4px; }
.faq-item p { color: var(--muted); font-size: 14px; }

.cta-band {
  max-width: 1000px; margin: 0 auto 56px; padding: 44px 40px; text-align: center;
  border-radius: 24px; background: var(--gradient-warm); color: #fff;
}
.cta-band h2 { color: #fff; font-size: 26px; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.9); margin-bottom: 20px; }
.cta-band .btn { background: #fff; color: var(--hc-red); border: none; }

.gfooter { text-align: center; padding: 30px 40px 50px; color: var(--muted); font-size: 13.5px; }
.gfooter a { color: var(--muted); }

/* ══════════ APP LAYOUT ══════════ */
.layout { display: flex; min-height: 100vh; background: var(--bg); }

.sidebar {
  width: 244px; flex-shrink: 0; background: var(--rail);
  display: flex; flex-direction: column; padding: 20px 0;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-logo { padding: 0 20px 20px; }
.brand-link { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-link img { width: 32px; border-radius: 7px; }
.brand-link span { font-weight: bold; font-size: 15px; color: #fff; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; flex: 1; overflow-y: auto; }
.nav-link {
  color: #9199a8; padding: 9px 12px; border-radius: 9px; font-weight: 500; font-size: 13.5px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: rgba(255,255,255,0.07); color: #fff; text-decoration: none; }
.nav-link.is-active {
  background: var(--gradient-warm); color: #fff;
  box-shadow: 0 4px 14px rgba(236,55,80,0.35);
}
.sidebar-label {
  font-size: 10.5px; color: #666d7a; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: bold; margin: 16px 12px 4px;
}
.sidebar-footer {
  margin: 8px 16px 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-user { color: #9199a8; font-size: 13px; }
.logout { color: var(--hc-red) !important; }
.theme-toggle {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); color: #fff;
  border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: bold;
  cursor: pointer; width: fit-content;
}
.theme-toggle:hover { border-color: var(--hc-red); }

.content { flex: 1; min-width: 0; padding: 34px 44px; }
.content-header { margin-bottom: 24px; }
.page-title { font-size: 25px; }
.content-inner { max-width: 1160px; }

/* ══════════ DASHBOARD WIDGETS ══════════ */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.welcome-banner {
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--hc-red);
  border-radius: 10px; padding: 22px 26px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.welcome-banner h2 { color: var(--ink); font-size: 21px; margin-bottom: 6px; }
.welcome-banner p { color: var(--muted); font-size: 13.5px; margin: 2px 0; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.card h2:first-child { margin-top: 0; }

.qa-row { display: flex; flex-wrap: wrap; gap: 8px; }
.qa-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--fill);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; color: var(--slate); transition: background 0.15s ease;
}
.qa-chip:hover { background: var(--border); text-decoration: none; }

.list-clean { list-style: none; }
.list-clean li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.list-clean li:last-child { border-bottom: none; }
.list-clean .meta { color: var(--muted); font-size: 12.5px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }
.stat-card:hover .stat-value { color: var(--hc-red); }
.stat-value { display: block; font: bold 28px var(--body-font); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 11.5px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; }

/* ══════════ SHARED PRIMITIVES ══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 9px 20px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--fill); color: var(--slate); text-decoration: none; font-weight: bold;
  font-size: 14px; cursor: pointer; transition: transform 0.125s ease-in-out, box-shadow 0.2s ease;
}
.btn:hover { transform: scale(1.04); text-decoration: none; }
.btn-primary { border: none; background: var(--gradient-warm); color: #fff; }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(236,55,80,0.35); color: #fff; }
.btn-small { min-height: 30px; padding: 5px 12px; font-size: 12px; }
.inline-form { display: inline; }

.form-card { max-width: 640px; display: grid; gap: 14px; }
.form-card label { display: grid; gap: 6px; color: var(--muted); font-weight: 500; font-size: 12.5px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--fill);
  color: var(--ink); font: inherit; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--hc-red); box-shadow: 0 0 0 3px rgba(236,55,80,0.12); }
textarea { min-height: 90px; resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-static { color: var(--muted); }
.toolbar, .search-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search-form input, .search-form select { width: auto; min-width: 180px; }

.data-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.data-table th, .data-table td { border-bottom: 1px solid var(--border); padding: 11px 14px; text-align: left; font-size: 13.5px; }
.data-table th { background: var(--fill); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; font-weight: bold; }
.data-table tr:last-child td { border-bottom: none; }

.badge { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: bold; background: var(--fill); color: var(--muted); }
.badge-success { background: rgba(51,214,166,0.16); color: #188362; }
body.dark-mode .badge-success { color: #4be3b4; }
.badge-danger { background: rgba(236,55,80,0.14); color: var(--hc-red); }
.text-danger { color: var(--hc-red); }
.photo-thumb { width: 100px; height: 70px; object-fit: cover; }
.screenshot-thumb { width: 130px; height: 90px; object-fit: cover; }

.login-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 48px 40px; text-align: center; max-width: 380px; margin: 10vh auto;
}
.login-logo { width: 84px; margin-bottom: 20px; }

@media (max-width: 980px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .content { padding: 22px; }
  .hero-title { font-size: 36px; }
}

/* ══════════ HOMEPAGE V2 — larger type, real hero, background texture ══════════ */

html { scroll-behavior: smooth; }

body.guest {
  font-size: 16.5px;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
  background-attachment: fixed;
}
body.dark-mode.guest { background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px); }

.gtop { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
body.dark-mode .gtop { background: rgba(18,18,23,0.85); }
.gtop-nav { display: flex; gap: 26px; }
.gtop-nav a { color: var(--slate); font-weight: 600; font-size: 14px; }
.gtop-nav a:hover { color: var(--hc-red); }

.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; max-width: 1080px; margin: 0 auto; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-eyebrow { font-size: 13.5px; }
.hero-title { font-size: 50px; }
.hero-sub { font-size: 18.5px; max-width: 540px; margin: 0 0 30px; text-align: left; }
.hero-stat strong { font-size: 30px; }
.hero-stat span { font-size: 13px; }

.hero-graphic { position: relative; height: 340px; }
.hg-card {
  position: absolute; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 18px 20px;
}
.hg-card-1 { top: 0; left: 0; width: 78%; }
.hg-card-2 { bottom: 0; right: 0; width: 62%; display: flex; flex-direction: column; gap: 6px; transform: rotate(-2deg); }
.hg-label { display: block; font-size: 11px; color: var(--muted); font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.hg-bignum { display: block; font-size: 26px; font-weight: bold; color: var(--ink); margin-bottom: 10px; }
.hg-bars { display: flex; align-items: flex-end; gap: 5px; height: 46px; }
.hg-bars span { flex: 1; background: var(--gradient-warm); border-radius: 3px; opacity: 0.85; }
.hg-title { font-size: 15px; font-weight: bold; color: var(--ink); }

.section-eyebrow {
  display: block; color: var(--hc-red); font-weight: bold; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
}
.section-head h2 { font-size: 30px; }
.section-head p { font-size: 16px; }
.feature-card h3 { font-size: 18px; }
.feature-card p { font-size: 15px; line-height: 1.55; }

.project-media { position: relative; overflow: hidden; }
.project-media img { border-radius: 0; margin: 0; transition: transform 0.35s ease; }
.project-card:hover .project-media img { transform: scale(1.06); }
.project-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; background: linear-gradient(to top, rgba(0,0,0,0.75), transparent 60%);
  opacity: 0; transition: opacity 0.25s ease;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay h3 { color: #fff; font-size: 16px; margin-bottom: 2px; }
.project-overlay span { color: rgba(255,255,255,0.85); font-size: 12.5px; }

.media-item { position: relative; border-radius: 12px; overflow: hidden; }
.media-item img { margin: 0; border-radius: 0; aspect-ratio: 4/3; object-fit: cover; transition: transform 0.3s ease; }
.media-item:hover img { transform: scale(1.05); }
.media-caption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 8px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff; font-size: 12px;
}

.gfooter-links { margin-bottom: 8px; }
.gfooter-links a { color: var(--muted); font-weight: 600; }


.project-card { border: 1px solid var(--border); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.project-card:hover { border-color: var(--hc-red); }
.project-ribbon {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--gradient-warm); color: #fff; font-size: 11px; font-weight: bold;
  padding: 4px 10px; border-radius: 999px; letter-spacing: 0.02em;
}
.project-card-title { font-size: 15px; margin-bottom: 6px; display: block; }
.project-card-body { padding: 16px 18px 18px; }


/* ══════════ TOP BAR (replaces sidebar) ══════════ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--rail); padding: 14px 32px; position: sticky; top: 0; z-index: 20;
}
.topbar .brand-link img { width: 30px; border-radius: 7px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar .sidebar-user { color: #9199a8; font-size: 13px; }
.topbar .btn { min-height: 32px; padding: 6px 14px; font-size: 13px; margin-bottom: 0; }

.content { max-width: 1160px; margin: 0 auto; padding: 34px 40px 60px; }

/* ══════════ NAV CARD GRID (dashboard as hub) ══════════ */
.nav-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.nav-card {
  display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.nav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hc-red); text-decoration: none; }
.nav-card-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--fill); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 12px; color: var(--hc-red);
}
.nav-card-label { font-weight: 700; font-size: 14px; color: var(--ink); }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 18px; }
  .content { padding: 22px 18px; }
}

/* ══════════ SIDEBAR — theme-aware override ══════════ */
.sidebar {
  width: 244px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 0; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand-link { color: var(--ink); }
.sidebar .brand-link span { color: var(--ink); }
.sidebar .nav-link { color: var(--muted); }
.sidebar .nav-link:hover { background: var(--fill); color: var(--ink); }
.sidebar .nav-link.is-active { background: var(--gradient-warm); color: #fff; }
.sidebar .sidebar-label { color: var(--muted); opacity: 0.75; }
.sidebar .sidebar-footer { border-top: 1px solid var(--border); }
.sidebar .sidebar-user { color: var(--muted); }
.sidebar .theme-toggle {
  background: var(--fill); border: 1px solid var(--border); color: var(--slate);
}
.sidebar .theme-toggle:hover { border-color: var(--hc-red); }

.content { flex: 1; min-width: 0; padding: 34px 44px; max-width: none; margin: 0; }

@media (max-width: 980px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .content { padding: 22px; }
}


/* ══════════ DASHBOARD RICHNESS — color, motion, texture ══════════ */

.content {
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
}
body.dark-mode .content { background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.card, .stat-card, .nav-card { animation: fadeUp 0.4s ease both; }
.dash-grid > div:nth-child(1) .card:nth-child(1) { animation-delay: 0.02s; }
.dash-grid > div:nth-child(1) .card:nth-child(2) { animation-delay: 0.08s; }
.dash-grid > div:nth-child(1) .card:nth-child(3) { animation-delay: 0.14s; }
.dash-grid > div:nth-child(2) .card:nth-child(1) { animation-delay: 0.06s; }
.dash-grid > div:nth-child(2) .card:nth-child(2) { animation-delay: 0.12s; }
.dash-grid > div:nth-child(2) .card:nth-child(3) { animation-delay: 0.18s; }
.welcome-banner { animation: fadeUp 0.35s ease both; }

:root {
  --cat-1: var(--hc-red);
  --cat-2: var(--hc-orange);
  --cat-3: var(--hc-blue);
  --cat-4: var(--hc-green);
  --cat-5: var(--hc-purple);
}
.qa-chip {
  font-weight: 700; background: var(--fill); border: 1px solid var(--border); color: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.qa-chip:hover { transform: translateY(-2px); border-color: var(--hc-red); background: var(--card); }

.list-clean.pending li { padding-left: 18px; position: relative; }
.list-clean.pending li::before {
  content: ""; position: absolute; left: 0; top: 15px; width: 7px; height: 7px;
  border-radius: 999px; background: var(--hc-orange);
}

.trend-chart { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 14px; }
.trend-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.trend-bar {
  width: 100%; max-width: 30px; border-radius: 5px 5px 2px 2px;
  background: var(--gradient-warm); min-height: 3px;
  animation: growBar 0.6s cubic-bezier(0.22,1,0.36,1) both;
  transform-origin: bottom;
}
@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.trend-bar-label { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.trend-bar-value { font-size: 10.5px; color: var(--ink); font-weight: 700; }
.stat-grid .stat-card { border-top: 3px solid var(--hc-red); }

/* ══════════ TYPOGRAPHY WEIGHT/SIZE FIX ══════════ */
body { font-size: 16px; font-weight: 500; color: var(--slate); }
.card p, .list-clean, .form-static, .data-table td { font-weight: 500; }
.data-table th { font-weight: 800; }
h2 { font-weight: 800; }
.stat-label, .sidebar-label { font-weight: 800; }
.nav-link { font-weight: 600; font-size: 14px; }
.page-title { font-weight: 800; }
.badge { font-weight: 800; }

/* ══════════ SIDEBAR — clean, no dots, styled scrollbar ══════════ */
.nav-link { padding: 10px 14px; }
.nav-link:hover { border-left: none; }
.nav-link.is-active { font-weight: 700; }

.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: var(--hc-red); }

/* ══════════ WELCOME BANNER — decorative graphic ══════════ */
.welcome-banner { position: relative; overflow: hidden; }

/* ══════════ CARD ICON BADGES ══════════ */
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-icon {
  width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 13px; color: #fff; flex-shrink: 0;
}

/* ══════════ COHESIVE PALETTE + REAL BANNER GRAPHIC ══════════ */

.welcome-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.welcome-banner-text { flex: 1; }
.welcome-banner-graphic { flex-shrink: 0; width: 130px; height: 90px; }
.welcome-banner-graphic svg { width: 100%; height: 100%; }

/* ══════════ DASHBOARD REFURBISH — hero spotlight, marker highlight, stickers ══════════ */

.home-hero-v2 {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px 34px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.home-hero-v2::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(circle 280px at var(--spot-x, 50%) var(--spot-y, 20%), rgba(236,55,80,0.09), transparent 70%);
  opacity: 0; transition: opacity 0.35s ease;
}
.home-hero-v2:hover::before { opacity: 1; }
.home-hero-v2 > * { position: relative; z-index: 1; }

.home-eyebrow {
  margin: 0; color: var(--hc-red); font-size: 12.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.home-hero-title {
  margin: 8px 0 0; font-size: clamp(26px, 3vw, 36px); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.12; color: var(--ink);
}
.marker-highlight {
  background: linear-gradient(100deg, rgba(236,55,80,0.30) 0%, rgba(255,140,55,0.32) 100%);
  background-repeat: no-repeat; background-size: 100% 40%; background-position: 0 90%;
  padding: 0 2px;
}
.home-hero-meta { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.home-hero-meta strong { color: var(--ink); font-weight: 800; }

.sticker-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.sticker {
  display: flex; flex-direction: column; gap: 2px; min-width: 108px;
  padding: 12px 16px 10px; background: var(--card);
  border: 2px solid var(--sticker-color, var(--hc-red));
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--sticker-color, var(--hc-red));
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease;
}
.sticker strong { font-size: 25px; line-height: 1; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.sticker span { font-size: 11.5px; font-weight: 800; color: var(--sticker-color, var(--hc-red)); text-transform: uppercase; letter-spacing: 0.03em; }
.sticker:nth-child(odd) { transform: rotate(-1.6deg); }
.sticker:nth-child(even) { transform: rotate(1.3deg); }
.sticker:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 3px 0 var(--sticker-color, var(--hc-red)), 0 10px 22px rgba(236,55,80,0.22);
}
.sticker-orange { --sticker-color: var(--hc-orange); }
.sticker-blue   { --sticker-color: var(--hc-blue); }
.sticker-green  { --sticker-color: var(--hc-green); }
.sticker-purple { --sticker-color: var(--hc-purple); }
.sticker-red    { --sticker-color: var(--hc-red); }

.welcome-banner-graphic { display: none; }


/* ══════════ EVENTS PAGE REFURBISH ══════════ */

.badge-blue { background: rgba(51,142,218,0.14); color: var(--hc-blue); }
.badge-purple { background: rgba(166,51,214,0.14); color: var(--hc-purple); }

.events-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.event-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; box-shadow: var(--shadow-sm); display: flex; gap: 16px;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }

.event-date-chip {
  flex-shrink: 0; width: 56px; height: 60px; border-radius: 12px;
  background: var(--gradient-warm); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.event-date-chip .month { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }
.event-date-chip .day { font-size: 22px; font-weight: 800; line-height: 1.1; }

.event-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.event-card-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.event-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.event-card-deadline { font-size: 12.5px; color: var(--muted); }
.event-card-deadline strong { color: var(--ink); }
.event-card-actions { display: flex; gap: 14px; margin-top: 4px; }
.event-card-actions a { font-size: 13px; font-weight: 700; }

.empty-state-card {
  background: var(--card); border: 1px dashed var(--border); border-radius: 16px;
  padding: 40px; text-align: center; color: var(--muted);
}
.empty-state-card h3 { color: var(--ink); margin-bottom: 6px; }

/* ══════════ EVENT FORM / ATTENDANCE REFURBISH ══════════ */

.form-panel {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px; box-shadow: var(--shadow-sm); max-width: 640px;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row-2 { grid-template-columns: 1fr; } }

.attendance-summary {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.attendance-summary strong { font-size: 22px; color: var(--hc-red); font-weight: 800; }
.attendance-summary .btn { margin-bottom: 0; }

.attendance-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.attendance-row:last-child { border-bottom: none; }
.attendance-name { font-weight: 600; font-size: 14px; color: var(--ink); }

.toggle-check { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-check input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-check .track {
  position: absolute; inset: 0; background: var(--border); border-radius: 999px;
  transition: background 0.2s ease; cursor: pointer;
}
.toggle-check .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 999px; transition: transform 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle-check input:checked + .track { background: var(--gradient-warm); }
.toggle-check input:checked + .track::after { transform: translateX(18px); }

.attendance-list-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }

/* ══════════ SUBMISSIONS REFURBISH ══════════ */

.file-input-wrap {
  border: 1.5px dashed var(--border); border-radius: 10px; padding: 16px;
  background: var(--fill); font-size: 13px; color: var(--muted);
}
.file-input-wrap input[type="file"] { background: transparent; border: none; padding: 0; }

.submission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.submission-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.submission-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }
.submission-card-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.submission-card-meta { font-size: 12.5px; color: var(--muted); }
.submission-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.submission-card-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.submission-card-links a { font-size: 12.5px; font-weight: 700; }

.member-chip { display: flex; align-items: center; gap: 8px; }
.member-avatar {
  width: 26px; height: 26px; border-radius: 999px; background: var(--gradient-warm); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0;
}

.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.screenshot-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

.hd-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 18px 0; }
.lang-badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* ══════════ ADMIN SUBMISSIONS TABLE FIX ══════════ */

.link-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.link-chip {
  display: inline-flex; align-items: center; gap: 4px; background: var(--fill);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
  font-size: 11.5px; font-weight: 700; color: var(--slate) !important; text-decoration: none !important;
}
.link-chip:hover { border-color: var(--hc-red); color: var(--hc-red) !important; }

.feature-btn-on { background: rgba(51,214,166,0.14); border-color: var(--hc-green); color: #188362 !important; }
body.dark-mode .feature-btn-on { color: var(--hc-green) !important; }
.feature-btn-off { background: var(--fill); }

.data-table td { vertical-align: middle; }

/* ══════════ ACTIVITY PAGE REFURBISH ══════════ */

.status-live { display: inline-flex; align-items: center; gap: 6px; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 999px; background: var(--hc-green);
  box-shadow: 0 0 0 0 rgba(51,214,166,0.6); animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(51,214,166,0.55); }
  70% { box-shadow: 0 0 0 9px rgba(51,214,166,0); }
  100% { box-shadow: 0 0 0 0 rgba(51,214,166,0); }
}

.activity-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.activity-project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px;
  box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.activity-project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }
.activity-project-name { font-weight: 800; font-size: 15px; color: var(--ink); }
.activity-project-hours { font-size: 22px; font-weight: 800; color: var(--hc-red); margin: 6px 0 10px; }
.lang-badges .badge { background: var(--fill); }

/* ══════════ RESOURCES & ANNOUNCEMENTS REFURBISH ══════════ */

.category-section { margin-bottom: 28px; }
.category-heading {
  font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--hc-red); margin-bottom: 12px;
}

.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.resource-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.resource-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }
.resource-card-title { font-weight: 800; font-size: 15px; color: var(--ink); }
.resource-card-desc { font-size: 13.5px; color: var(--muted); flex: 1; }
.resource-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }

.announcement-feed { display: flex; flex-direction: column; gap: 14px; }
.announcement-item {
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--hc-orange);
  border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; align-items: flex-start;
}
.announcement-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--hc-orange); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}
.announcement-body-text { flex: 1; }
.announcement-title { font-weight: 800; font-size: 15.5px; color: var(--ink); margin-bottom: 4px; }
.announcement-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ══════════ ANNOUNCEMENTS REBUILD — changelog style ══════════ */

.announcement-featured {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 28px 30px; margin-bottom: 22px; box-shadow: var(--shadow-md);
}
.announcement-featured::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--gradient-warm);
}
.announcement-featured-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--fill);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px;
  font-size: 11px; font-weight: 800; color: var(--hc-red); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 14px;
}
.announcement-featured h2 { font-size: 24px; margin: 0 0 10px; }
.announcement-featured p { font-size: 15.5px; color: var(--slate); line-height: 1.6; margin-bottom: 14px; }

.announcement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.announcement-tile {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.announcement-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }
.announcement-tile-title { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.announcement-tile-body { font-size: 13px; color: var(--muted); flex: 1; }

/* ══════════ PROFILE PAGE REFURBISH ══════════ */

.profile-hero {
  display: flex; align-items: center; gap: 20px; background: var(--card);
  border: 1px solid var(--border); border-radius: 18px; padding: 28px 30px;
  margin-bottom: 20px; box-shadow: var(--shadow-md);
}
.profile-avatar-lg {
  width: 68px; height: 68px; border-radius: 999px; background: var(--gradient-warm); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800;
  flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.profile-hero-name { font-size: 24px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.profile-hero-email { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* ══════════ ADMIN SUMMARY FULL REBUILD ══════════ */

.summary-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 30px; }
.summary-stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
  border-top: 3px solid var(--kpi-color, var(--hc-red));
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease;
}
.summary-stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.summary-stat-icon {
  width: 32px; height: 32px; border-radius: 9px; background: var(--kpi-color, var(--hc-red)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.summary-stat-value { font-size: 28px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-stat-label { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-row { display: flex; align-items: center; gap: 12px; }
.rank-badge {
  width: 26px; height: 26px; border-radius: 999px; background: var(--fill); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800;
  color: var(--muted); flex-shrink: 0;
}
.rank-row:nth-child(1) .rank-badge { background: var(--gradient-warm); color: #fff; border: none; }
.rank-name { width: 150px; flex-shrink: 0; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.rank-bar-track { flex: 1; height: 10px; background: var(--fill); border-radius: 999px; overflow: hidden; }
.rank-bar-fill { height: 100%; background: var(--gradient-warm); border-radius: 999px; transition: width 0.6s cubic-bezier(0.22,1,0.36,1); }
.rank-hours { width: 56px; text-align: right; font-weight: 800; font-size: 13px; color: var(--ink); flex-shrink: 0; }

.section-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 10px; }
@media (max-width: 560px) { .section-compare { grid-template-columns: 1fr; } }
.section-compare-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-sm);
}
.section-compare-card .sc-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.section-compare-card .sc-hours { font-size: 26px; font-weight: 800; color: var(--ink); }
.section-compare-card .sc-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sc-boys .sc-label { color: var(--hc-blue); }
.sc-girls .sc-label { color: var(--hc-purple); }

.split-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin: 16px 0 6px; background: var(--fill); }
.split-bar-boys { background: var(--hc-blue); }
.split-bar-girls { background: var(--hc-purple); }
.split-bar-caption { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 700; }

.feed-list { display: flex; flex-direction: column; }
.feed-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.feed-row:last-child { border-bottom: none; }
.feed-title { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.feed-time { font-size: 12px; color: var(--muted); flex-shrink: 0; }

.warn-list { display: flex; flex-direction: column; gap: 10px; }
.warn-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.warn-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--hc-orange); flex-shrink: 0; }

/* ══════════ ADMIN SUMMARY — EXTRA INSIGHTS ══════════ */

.next-event-spotlight {
  display: flex; align-items: center; gap: 18px; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.next-event-countdown {
  flex-shrink: 0; width: 68px; height: 68px; border-radius: 14px; background: var(--gradient-warm);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.next-event-countdown strong { font-size: 22px; font-weight: 800; line-height: 1; }
.next-event-countdown span { font-size: 9.5px; text-transform: uppercase; font-weight: 800; letter-spacing: 0.04em; }
.next-event-info-title { font-size: 15.5px; font-weight: 800; color: var(--ink); }
.next-event-info-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.health-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-sm);
}
.health-card-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.adoption-bar-track { height: 8px; background: var(--fill); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.adoption-bar-fill { height: 100%; background: var(--gradient-warm); border-radius: 999px; transition: width 0.6s ease; }
.health-card-value { font-size: 22px; font-weight: 800; color: var(--ink); }
.health-card-sub { font-size: 12px; color: var(--muted); }

/* ══════════ ADMIN SUMMARY FIX — cohesive palette + radial graphic ══════════ */

.summary-stat-card { border-top: 3px solid var(--hc-red) !important; }
.summary-stat-icon { background: var(--hc-red) !important; }
.summary-stat-card:nth-child(even) .summary-stat-icon { background: var(--hc-orange) !important; }
.summary-stat-card:nth-child(even) { border-top-color: var(--hc-orange) !important; }

.radial-wrap { display: flex; align-items: center; gap: 16px; }
.radial-svg { flex-shrink: 0; }
.radial-svg .track { fill: none; stroke: var(--border); stroke-width: 8; }
.radial-svg .fill { fill: none; stroke: url(#radialGradient); stroke-width: 8; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.8s cubic-bezier(0.22,1,0.36,1); }
.radial-svg text { font-size: 15px; font-weight: 800; fill: var(--ink); }

/* ══════════ ADMIN SUMMARY FIX — consolidated color, real icon glyphs ══════════ */

.summary-stat-card, .summary-stat-icon { --kpi-color: var(--hc-red) !important; }
.kpi-icon-svg { width: 16px; height: 16px; }

/* ══════════ MEMBERS PAGE — CARD GRID REDESIGN ══════════ */

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.member-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.member-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-warm);
}
.member-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }

.member-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.member-avatar-xl {
  width: 44px; height: 44px; border-radius: 999px; background: var(--gradient-warm); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; flex-shrink: 0;
}
.member-card-name { font-weight: 800; font-size: 15.5px; color: var(--ink); }
.member-card-email { font-size: 12px; color: var(--muted); }

.member-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.member-card-meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.member-card-actions { display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.member-card-actions .btn { margin-bottom: 0; flex: 1; }

/* ══════════ ADMIN SUBMISSIONS — CARD GRID REDESIGN ══════════ */

.admin-sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.admin-sub-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow-sm); position: relative;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.admin-sub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }
.admin-sub-card.is-featured { border-color: var(--hc-green); }

.admin-sub-ribbon {
  position: absolute; top: -8px; right: 14px; background: var(--gradient-warm); color: #fff;
  font-size: 10.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.02em;
}

.admin-sub-title { font-size: 16px; font-weight: 800; color: var(--ink); margin: 10px 0 4px; }
.admin-sub-event { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.admin-sub-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.admin-sub-date { font-size: 11.5px; color: var(--muted); }

/* ══════════ MEMBER ACTIVITY — CARD GRID REDESIGN ══════════ */

.activity-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.activity-admin-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow-sm); transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.activity-admin-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }
.activity-admin-card.is-active-now { border-color: var(--hc-green); }

.aa-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.aa-stats-row { display: flex; gap: 10px; margin: 12px 0; }
.aa-stat { flex: 1; background: var(--fill); border-radius: 10px; padding: 10px; text-align: center; }
.aa-stat-value { display: block; font-size: 18px; font-weight: 800; color: var(--ink); }
.aa-stat-label { font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }

/* ══════════ SIDEBAR MAJOR REBUILD ══════════ */

.layout { padding: 16px; gap: 16px; align-items: flex-start; }
.sidebar {
  width: 240px; border-radius: 20px; border: 1px solid var(--border);
  box-shadow: var(--shadow-md); height: calc(100vh - 32px); top: 16px;
}
.content { padding: 8px 8px 40px; }

.sidebar-nav { padding: 4px 10px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; }
.nav-link svg { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; }
.nav-link.is-active svg { stroke: #fff; }

.sidebar-footer-user { display: flex; align-items: center; gap: 10px; padding: 0 16px 10px; }
.sidebar-footer-avatar {
  width: 32px; height: 32px; border-radius: 999px; background: var(--gradient-warm); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.sidebar-footer-actions { display: flex; gap: 8px; padding: 0 16px; }
.sidebar-footer-actions .theme-toggle { flex: 1; text-align: center; }
.sidebar-footer-actions .logout-btn {
  flex: 1; text-align: center; background: rgba(236,55,80,0.12); border: 1px solid transparent;
  color: var(--hc-red) !important; border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 800;
  text-decoration: none;
}
.sidebar-footer-actions .logout-btn:hover { background: rgba(236,55,80,0.22); text-decoration: none; }

@media (max-width: 980px) {
  .layout { flex-direction: column; padding: 12px; }
  .sidebar { width: 100%; height: auto; position: static; }
}

/* ══════════ APPROVAL STATUS BADGE ══════════ */
.badge-warning { background: rgba(255,140,55,0.16); color: #b35a1a; }
body.dark-mode .badge-warning { color: var(--hc-orange); }

.review-actions { display: flex; gap: 10px; margin: 0 0 12px; }
.review-actions .inline-form { flex: 1; margin: 0; }
.review-actions .inline-form button,
.review-actions > a.btn-reject {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  margin: 0; padding: 8px 16px; border-radius: 9px; font-weight: 800; font-size: 13px;
}
.review-actions > a.btn-reject { flex: 1; }
.review-actions .inline-form button.btn-approve {
  background: var(--hc-green) !important; border: none !important; color: #fff !important;
}
.review-actions > a.btn-reject {
  background: var(--hc-red) !important; border: none !important; color: #fff !important;
}

.admin-sub-card .link-chips { margin-bottom: 14px; }
.review-actions { margin-top: 4px; }

/* ══════════ DARK MODE ONLY — LOCKED ══════════ */
:root {
  --bg: #121217;
  --card: #191920;
  --border: #2a2a33;
  --fill: #1e1e26;
  --ink: #f7f7fa;
  --slate: #cbd1dc;
  --muted: #8f97a8;
  --rail: #0c0c10;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.5);
}

/* ══════════ DEPARTMENT PICKER — proper checkbox list styling ══════════ */
.dept-picker {
  display: flex; flex-direction: column; gap: 2px; background: var(--fill);
  border: 1px solid var(--border); border-radius: 10px; padding: 6px; max-height: 220px; overflow-y: auto;
}
.form-card label.dept-picker-item {
  display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px;
  color: var(--ink) !important; font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.dept-picker-item:hover { background: var(--card); }
.dept-picker-item input { width: auto !important; flex-shrink: 0; accent-color: var(--hc-red); }

/* ══════════ LIVE ADDITIONS — count-up, radial rings, network canvas ══════════ */

.radial-svg circle.fill { transition: stroke-dashoffset 0.1s linear; }

.live-network-wrap {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 24px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.live-network-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.live-network-header h2 { margin: 0; }
.live-network-header span { font-size: 12.5px; color: var(--muted); }
#liveNetwork { width: 100%; height: 140px; display: block; }

/* ══════════ LEADERBOARD REBUILD ══════════ */

.lb-tabs { display: flex; gap: 8px; margin-bottom: 20px; }

.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.podium-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 16px; text-align: center; box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(12px); animation: podiumIn 0.45s cubic-bezier(.22,1,.36,1) forwards;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.podium-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
@keyframes podiumIn { to { opacity: 1; transform: translateY(0); } }
.podium-card.rank-1 { order: 2; border-color: #d4af37; padding-top: 8px; }
.podium-card.rank-2 { order: 1; margin-top: 20px; }
.podium-card.rank-3 { order: 3; margin-top: 28px; }

.podium-medal {
  width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; margin: 0 auto 10px; color: #1a1408;
}
.podium-card.rank-1 .podium-medal { background: linear-gradient(135deg, #ffe08a, #d4af37); width: 52px; height: 52px; font-size: 20px; }
.podium-card.rank-2 .podium-medal { background: linear-gradient(135deg, #e8e8ec, #b0b3ba); }
.podium-card.rank-3 .podium-medal { background: linear-gradient(135deg, #e8b384, #b87333); }

.podium-avatar {
  width: 44px; height: 44px; border-radius: 999px; background: var(--gradient-warm); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto 8px;
}
.podium-name { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.podium-value { font-size: 20px; font-weight: 800; color: var(--hc-red); }

.lb-list { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 8px; box-shadow: var(--shadow-sm); }
.lb-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px;
  opacity: 0; transform: translateX(-8px); animation: lbRowIn 0.4s cubic-bezier(.22,1,.36,1) forwards;
  transition: background 0.15s ease;
}
.lb-row:hover { background: var(--fill); }
@keyframes lbRowIn { to { opacity: 1; transform: translateX(0); } }

.lb-rank { width: 26px; text-align: center; font-weight: 800; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.lb-bar-track { flex: 1; height: 8px; background: var(--fill); border-radius: 999px; overflow: hidden; }
.lb-bar-fill { height: 100%; background: var(--gradient-warm); border-radius: 999px; width: 0; transition: width 0.7s cubic-bezier(.22,1,.36,1); }
.lb-value { width: 60px; text-align: right; font-weight: 800; font-size: 13.5px; color: var(--ink); flex-shrink: 0; }


/* ══════════ ACHIEVEMENTS ══════════ */

.achievement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.achievement-badge {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 16px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.achievement-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.achievement-badge.locked { opacity: 0.4; filter: grayscale(1); }
.achievement-glyph {
  display: flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 999px; margin: 0 auto 12px; font-size: 22px; color: #fff;
}
.ach-red .achievement-glyph { background: var(--hc-red); }
.ach-orange .achievement-glyph { background: var(--hc-orange); }
.ach-blue .achievement-glyph { background: var(--hc-blue); }
.ach-green .achievement-glyph { background: var(--hc-green); }
.ach-purple .achievement-glyph { background: var(--hc-purple); }
.achievement-name { display: block; font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.achievement-desc { display: block; font-size: 11.5px; color: var(--muted); }

/* ══════════ MOBILE RESPONSIVE OVERHAUL ══════════ */

.mobile-menu-toggle {
  display: none; background: var(--fill); border: 1px solid var(--border); color: var(--ink);
  border-radius: 8px; padding: 8px; cursor: pointer;
}
.mobile-menu-toggle svg { width: 20px; height: 20px; display: block; }

@media (max-width: 860px) {
  .layout { flex-direction: column; padding: 0; gap: 0; }

  .sidebar {
    width: 100%; height: auto; border-radius: 0; position: sticky; top: 0; z-index: 30;
    padding: 12px 0;
  }
  .sidebar-logo { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
  .mobile-menu-toggle { display: inline-flex; }

  .sidebar-nav, .sidebar-footer {
    display: none; max-height: 0; overflow: hidden;
  }
  .sidebar.mobile-open .sidebar-nav,
  .sidebar.mobile-open .sidebar-footer {
    display: flex; max-height: none; margin-top: 10px;
  }
  .sidebar.mobile-open .sidebar-nav { flex-direction: column; }

  .content { padding: 16px; }
  .content-header { margin-bottom: 14px; }
  .page-title { font-size: 20px; }

  /* Grids: force single column on small screens regardless of minmax */
  .dash-grid, .podium, .section-compare, .form-row-2,
  .hero-grid, .health-grid { grid-template-columns: 1fr !important; }

  .podium-card.rank-1, .podium-card.rank-2, .podium-card.rank-3 {
    order: initial; margin-top: 0;
  }

  .stat-grid, .summary-stat-grid, .feature-grid, .event-grid, .submission-grid,
  .member-grid, .project-grid, .resource-grid, .announcement-grid,
  .admin-sub-grid, .activity-admin-grid, .achievement-grid, .media-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-title { font-size: 30px !important; }
  .hero-sub { font-size: 16px !important; }
  .hero-stats { gap: 24px !important; justify-content: space-around !important; }
  .home-hero-title { font-size: 24px !important; }

  .gtop { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .gtop-nav { display: none; }
  .section { padding: 36px 16px; }

  .welcome-banner, .home-hero-v2 { padding: 20px !important; }
  .sticker-row { gap: 10px; }
  .sticker { min-width: 90px; padding: 10px 12px 8px; }

  .toolbar, .search-form, .events-toolbar { flex-direction: column; align-items: stretch; }
  .search-form input, .search-form select { width: 100%; }

  .form-panel, .login-card { padding: 20px; margin: 0; border-radius: 12px; }
  .form-card { max-width: 100%; }

  .data-table th, .data-table td { padding: 9px 10px; font-size: 12.5px; }
  .member-chip { width: auto !important; }

  .lb-tabs { flex-wrap: wrap; }
  .review-actions { flex-direction: row; }

  .card-head { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 24px !important; }
  .stat-value, .summary-stat-value { font-size: 22px !important; }
  .btn { padding: 8px 14px; font-size: 12.5px; }
  .content { padding: 12px; }
  .content-inner { max-width: 100%; }
}


/* ══════════ CHALLENGES — REFURBISH ══════════ */

.toolbar-group { display: flex; gap: 8px; flex-wrap: wrap; }
.events-toolbar .btn { margin-bottom: 0; }

.challenge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 28px; }
.challenge-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.challenge-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-warm); }
.challenge-card.is-past::before { background: var(--border); }
.challenge-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--hc-red); }

.challenge-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.challenge-theme { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--hc-red); }
.challenge-title { font-size: 18px; font-weight: 800; color: var(--ink); margin: 0; line-height: 1.25; }
.challenge-objective {
  font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.challenge-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.challenge-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.challenge-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.challenge-actions .btn { margin-bottom: 0; }
.challenge-admin-note { font-size: 12px; font-weight: 700; color: var(--hc-orange); }
.penalty-note { font-size: 12px; color: var(--hc-red); font-weight: 700; margin: 0; }

.countdown-chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.chip-open { background: rgba(255,140,55,0.16); color: var(--hc-orange); }
.chip-overdue { background: rgba(236,55,80,0.14); color: var(--hc-red); }
.chip-done { background: rgba(51,214,166,0.16); color: var(--hc-green); }

/* Submit page */
.challenge-submit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.challenge-brief {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px;
  box-shadow: var(--shadow-sm); position: sticky; top: 16px;
}
.brief-title { font-size: 22px; margin: 6px 0 10px; }
.brief-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 14px 0 4px; }
.brief-text { font-size: 14px; color: var(--slate); line-height: 1.6; margin: 0; white-space: pre-line; }
.late-banner { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: rgba(236,55,80,0.12); color: var(--hc-red); font-size: 13px; font-weight: 700; }
.challenge-submit-form { max-width: none; }
.field-hint { font-size: 11.5px; color: var(--muted); font-weight: 500; }

/* My results */
.result-list { display: flex; flex-direction: column; gap: 14px; }
.result-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px;
}
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.result-score { text-align: right; flex-shrink: 0; }
.result-score strong { font-size: 34px; font-weight: 800; color: var(--hc-red); line-height: 1; }
.result-score span { font-size: 13px; color: var(--muted); font-weight: 700; margin-left: 3px; }
.score-rows { display: grid; gap: 8px; }
.score-row { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 12px; }
.score-label { font-size: 12.5px; font-weight: 700; color: var(--slate); }
.score-meter { display: flex; gap: 5px; }
.score-meter span { flex: 1; height: 8px; border-radius: 999px; background: var(--fill); }
.score-meter span.on { background: var(--gradient-warm); }
.score-num { font-size: 12px; font-weight: 800; color: var(--ink); text-align: right; }
.feedback-box { background: var(--fill); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.feedback-box p { margin: 0; font-size: 13.5px; color: var(--slate); line-height: 1.55; }
.feedback-box .brief-label { margin-top: 0; margin-bottom: 4px; }

/* Judging */
.judge-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.rubric-panel { max-width: none; }
.rubric-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.rubric-row:first-child { padding-top: 0; }
.rubric-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rubric-name { font-weight: 800; color: var(--ink); font-size: 14.5px; }
.rubric-desc { font-size: 12px; color: var(--muted); font-weight: 500; }
.form-card .score-picker { display: flex; gap: 6px; flex-shrink: 0; }
.form-card .score-picker label { position: relative; display: block; cursor: pointer; gap: 0; }
.form-card .score-picker input { position: absolute; opacity: 0; width: 0 !important; height: 0 !important; padding: 0 !important; border: 0 !important; margin: 0; }
.form-card .score-picker span {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--fill); border: 1px solid var(--border); font-weight: 800; font-size: 14px; color: var(--muted);
  transition: all 0.15s ease;
}
.form-card .score-picker label:hover span { border-color: var(--hc-red); color: var(--ink); }
.form-card .score-picker input:checked + span { background: var(--gradient-warm); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(236,55,80,0.3); }
.form-card .score-picker input:focus-visible + span { outline: 2px solid var(--hc-red); outline-offset: 2px; }
.live-total { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-radius: 12px; background: var(--fill); border: 1px solid var(--border); }
.live-total > span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.live-total strong { font-size: 26px; font-weight: 800; color: var(--hc-red); }
.evidence-row { display: flex; gap: 10px; margin-bottom: 12px; }

/* Challenge leaderboard */
.challenge-lb .lb-value { width: 84px; }
.lb-extra { width: 78px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: right; flex-shrink: 0; }
.lb-row.is-you { background: rgba(236,55,80,0.08); }
.podium-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* Department rankings */
.rank-compare-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rank-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 14px; box-shadow: var(--shadow-sm); }
.rank-card-head { padding: 0 8px 8px; }
.rank-card-head h2 { margin: 0; font-size: 16px; }
.rank-card-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px; align-items: center; padding: 10px 8px; border-radius: 10px; }
.rank-card-row.is-mine { background: rgba(236,55,80,0.08); }
.rank-card-row.is-first .rank-badge { background: var(--gradient-warm); color: #fff; border: none; }
.rank-card-name { font-size: 13.5px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.rank-card-value { font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.rank-card-bar { grid-column: 2 / 4; }
.you-tag { margin-left: 6px; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--hc-red); color: #fff; vertical-align: middle; }
@media (max-width: 1100px) { .rank-compare-grid { grid-template-columns: 1fr; } }

/* Dashboard challenge card */
.dash-challenge { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.dash-challenge:last-of-type { border-bottom: none; }
.dash-challenge-title { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.dash-challenge-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dash-challenge-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.dash-challenge-side .btn { margin-bottom: 0; }

/* Mobile */
@media (max-width: 860px) {
  .challenge-grid, .challenge-submit-grid, .judge-grid, .rank-compare-grid { grid-template-columns: 1fr !important; }
  .challenge-brief { position: static; }
  .score-row { grid-template-columns: 100px 1fr 36px; }
  .rubric-row { flex-direction: column; align-items: flex-start; }
  .result-head { flex-direction: column; }
  .result-score { text-align: left; }
  .lb-extra { display: none; }
  .events-toolbar .toolbar-group { width: 100%; }
  .events-toolbar > .btn { width: 100%; }
}