/* CodeHero Teacher Portal — flat, functional styling. No gradients. */

:root {
  color-scheme: light;
}

:root {
  --blue:   #2563EB;
  --orange: #EA8C00;
  --purple: #7C3AED;
  --teal:   #0D9488;
  --red:    #DC2626;
  --green:  #16A34A;
  --amber:  #D97706;

  --bg:      #F4F5F7;
  --card:    #FFFFFF;
  --border:  #E2E4E9;
  --text:    #1A1D23;
  --sub:     #6B7280;
  --sidebar: #14181F;
  --sidebar-text: #C7CBD3;
  --sidebar-active: #1F242E;

  /* CodeHero brand — pulled from the mobile app's hero identity */
  --hero-navy:        #0D1B2A;
  --hero-navy-deep:   #081119;
  --hero-panel:       #16283B;
  --hero-panel-border:#26384D;
  --hero-gold:        #F2A71B;
  --hero-gold-dark:   #DD8F0A;
  --hero-gold-ink:    #4A2E00;
  --hero-blue:        #2F6FEE;
  --hero-blue-dark:   #2454C2;
  --hero-ink-light:   #C9D6E4;
  --hero-teal:        #14B8A6;
  --hero-teal-dark:   #0D9488;
  --hero-purple:      #7C3AED;
  --hero-green:       #22C55E;
  --hero-red:         #F0554B;
}

.brand-font { font-family: 'Baloo 2', 'Segoe UI', sans-serif; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button, input, textarea, select { font-family: inherit; font-size: 14px; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  background: var(--card);
}
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1D4ED8; }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger { background: #fff; color: var(--red); border-color: #F3C6C6; }
.btn-danger:hover { background: #FEF2F2; }
.btn-ghost { background: transparent; color: var(--sidebar-text); border-color: #2A2F3A; }
.btn-ghost:hover { background: var(--sidebar-active); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: default; }

/* ── Login ───────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 56px 20px 40px;
  background:
    radial-gradient(ellipse 900px 500px at 50% -8%, #1B324B 0%, transparent 60%),
    linear-gradient(180deg, var(--hero-navy) 0%, var(--hero-navy-deep) 100%);
}

.login-hero { text-align: center; margin-bottom: 30px; }
.hero-logo {
  width: 210px;
  max-width: 58vw;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .5));
}
.hero-tagline {
  margin: 6px 0 0;
  color: var(--hero-ink-light);
  font-style: italic;
  font-size: 14.5px;
}

.login-box {
  width: 380px;
  max-width: 92vw;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 20px;
  padding: 28px 26px 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .4);
  text-align: left;
}
.portal-tag {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 12px;
  background: rgba(242, 167, 27, .12);
  color: var(--hero-gold);
  border: 1px solid rgba(242, 167, 27, .35);
  border-radius: 999px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-box form { text-align: left; }
.login-box label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--hero-ink-light);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 16px 0 7px;
}
.login-box label:first-of-type { margin-top: 0; }

.input-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--hero-gold) 0%, var(--hero-gold-dark) 100%);
}
.input-pill .input-icon { display: flex; flex-shrink: 0; color: var(--hero-gold-ink); opacity: .7; }
.login-box .input-pill input[type="email"],
.login-box .input-pill input[type="text"],
.login-box .input-pill input[type="password"] {
  flex: 1;
  width: auto;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--hero-gold-ink);
  font-weight: 600;
  font-size: 14.5px;
}
.input-pill input::placeholder { color: rgba(74, 46, 0, .55); font-weight: 500; }
.login-box .input-pill input:focus { outline: none; }
.pw-toggle {
  display: flex; flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: var(--hero-gold-ink); opacity: .65; padding: 4px;
}
.pw-toggle:hover { opacity: 1; }

.login-box .btn-hero {
  margin-top: 20px;
  height: 54px;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--hero-blue) 0%, var(--hero-blue-dark) 100%);
  color: #fff;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .05em;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 12px 24px rgba(47, 111, 238, .35);
  cursor: pointer;
}
.login-box .btn-hero:hover { filter: brightness(1.07); }
.login-box .btn-hero:disabled { opacity: .6; cursor: default; }
.btn-bracket { opacity: .55; font-weight: 400; }

.login-hint {
  margin: 18px 0 0;
  text-align: center;
  color: var(--hero-ink-light);
  opacity: .6;
  font-size: 11.5px;
}
.login-footer {
  margin-top: 28px;
  color: var(--hero-ink-light);
  opacity: .45;
  font-size: 12px;
}
.form-error {
  margin-top: 12px; padding: 9px 11px;
  background: rgba(220, 38, 38, .14); color: #FF9B93;
  border: 1px solid rgba(220, 38, 38, .4); border-radius: 8px;
  font-size: 12.5px;
}

/* ── App shell ───────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #131A24 0%, #0B0F16 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: radial-gradient(ellipse 220px 90px at 20% 0%, rgba(242, 167, 27, .10) 0%, transparent 70%);
}
.brand-mark {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1E3350 0%, #0E1926 75%);
  border: 2px solid var(--hero-teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .14), 0 4px 14px rgba(0, 0, 0, .45);
  padding: 5px;
}
.brand-mark img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(242, 167, 27, .55));
}
.brand-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-text {
  font-family: 'Baloo 2', sans-serif;
  letter-spacing: .01em;
  color: #fff;
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1;
}
.brand-text em {
  font-style: normal;
  color: var(--hero-gold);
}
.brand-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--hero-teal);
  opacity: .9;
}
.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: var(--sidebar-text);
  padding: 9px 11px 9px 9px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0;
  color: inherit; opacity: .85;
}
.nav-icon svg { width: 100%; height: 100%; display: block; }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(20, 184, 166, .16) 0%, rgba(20, 184, 166, .05) 100%);
  color: #fff; font-weight: 700;
  border-left-color: var(--hero-teal);
}
.nav-item.active .nav-icon { opacity: 1; color: var(--hero-teal); }
.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sidebar-user { color: #fff; font-size: 12.5px; font-weight: 600; margin-bottom: 8px; padding: 0 2px; }
.sidebar-user span { display: block; color: var(--sidebar-text); font-weight: 400; font-size: 11.5px; }

.menu-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  margin-right: 8px;
}
.menu-toggle svg { width: 18px; height: 18px; }
.sidebar-scrim { display: none; }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 { margin: 0; font-size: 18px; }
.topbar-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.view { padding: 24px 28px 60px; max-width: 1180px; margin: 0 auto; width: 100%; box-sizing: border-box; }

@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, .5);
  }
  .app.sidebar-open .sidebar { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .app.sidebar-open .sidebar-scrim {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 15;
  }
  .topbar { padding: 12px 14px; gap: 8px; }
  .topbar h1 { font-size: 15px; }
  .hero-title { font-size: 14.5px; gap: 7px; }
  .hero-title svg { width: 18px; height: 18px; }
  .view { padding: 16px 14px 40px; }
  .hero-add-btn, .icon-btn { width: 36px; height: 36px; }
}

/* ── Generic layout bits ─────────────────────────────── */
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.stat-card { display: flex; flex-direction: column; gap: 4px; }
.stat-card .stat-num { font-size: 26px; font-weight: 800; }
.stat-card .stat-label { font-size: 12px; color: var(--sub); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

.section-title { font-size: 14px; font-weight: 700; margin: 26px 0 10px; color: var(--text); }
.section-title:first-child { margin-top: 0; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 7px 13px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--card); color: var(--sub); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.tab.active { border-color: var(--blue); color: var(--blue); background: #EFF4FF; }

input[type=text], input[type=number], input[type=email], input[type=password], input[type=date], textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
}
textarea { resize: vertical; min-height: 70px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue); outline-offset: -1px; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--sub); margin-bottom: 5px; }
.field .req { color: var(--red); }

.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  margin-bottom: 8px;
}
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 700; font-size: 13.5px; }
.list-row .subtitle { color: var(--sub); font-size: 12px; margin-top: 2px; }
.list-row .actions { display: flex; gap: 6px; flex-shrink: 0; }

.badge-pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 5px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
  text-transform: uppercase;
}
.pill-html { background: #FDF2E3; color: var(--orange); }
.pill-css  { background: #F1E8FE; color: var(--purple); }
.pill-locked   { background: #F3F4F6; color: var(--sub); }
.pill-unlocked { background: #E9F9EE; color: var(--green); }
.pill-present  { background: #E9F9EE; color: var(--green); }
.pill-absent   { background: #FEF2F2; color: var(--red); }
.pill-late     { background: #FEF6E7; color: var(--amber); }
.pill-excused  { background: #EFF4FF; color: var(--blue); }
.pill-submitted { background: #EFF4FF; color: var(--blue); }
.pill-graded    { background: #E9F9EE; color: var(--green); }
.pill-revision  { background: #FEF6E7; color: var(--amber); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--sub);
}
.empty-state .empty-icon { font-size: 34px; margin-bottom: 10px; }
.empty-state .empty-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }

.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border); }
.table th { background: var(--bg); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--sub); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #FAFBFC; }

/* ── Modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 24, 31, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 50;
}
.modal {
  background: var(--card);
  border-radius: 10px;
  width: 100%; max-width: 560px;
  border: 1px solid var(--border);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h2 { margin: 0; font-size: 15.5px; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--sub); }
.modal-body { padding: 18px 20px; max-height: 65vh; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }

.segment { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.segment button {
  padding: 7px 14px; border-radius: 6px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--sub); font-weight: 700; font-size: 12.5px; cursor: pointer;
}
.segment button.active { border-color: var(--blue); color: var(--blue); background: #EFF4FF; }

.loading { text-align: center; padding: 60px 0; color: var(--sub); font-size: 13px; }

.toast {
  position: fixed; bottom: 22px; right: 22px;
  background: var(--text); color: #fff;
  padding: 11px 18px; border-radius: 7px;
  font-size: 13px; font-weight: 600;
  z-index: 100;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }

.avatar-circle {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

.attendance-grid { display: flex; gap: 6px; }
.att-btn {
  padding: 5px 10px; border-radius: 5px; border: 1px solid var(--border);
  background: var(--card); font-size: 11.5px; font-weight: 700; cursor: pointer; color: var(--sub);
}
.att-btn.sel-present  { background: var(--green); color: #fff; border-color: var(--green); }
.att-btn.sel-absent   { background: var(--red); color: #fff; border-color: var(--red); }
.att-btn.sel-late     { background: var(--amber); color: #fff; border-color: var(--amber); }
.att-btn.sel-excused  { background: var(--blue); color: #fff; border-color: var(--blue); }

.mini-stats { display: flex; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.mini-stat { font-size: 12.5px; color: var(--sub); }
.mini-stat b { color: var(--text); font-size: 14px; }

.two-col { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.help-text { font-size: 11.5px; color: var(--sub); margin-top: 4px; }

/* ── Role pill / icon button (topbar) ───────────────────── */
.role-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 8px;
  background: rgba(20, 184, 166, .12);
  color: var(--hero-teal-dark);
  border: 1px solid rgba(20, 184, 166, .35);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--sub);
  cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--bg); color: var(--text); }
.topbar-bell { margin-left: auto; }

/* ═══════════════════════════════════════════════════════════
   Hero dark theme — reusable, opt-in via body.hero-page.
   Rolled out page-by-page; pages without this class keep the
   original light UI.
   ═══════════════════════════════════════════════════════════ */
body.hero-page {
  background: var(--hero-navy-deep);
  color-scheme: dark;
}
body.hero-page .main {
  background:
    radial-gradient(ellipse 1100px 460px at 50% -12%, #16283F 0%, transparent 60%),
    linear-gradient(180deg, var(--hero-navy) 0%, var(--hero-navy-deep) 100%);
  min-height: 100vh;
}
body.hero-page .topbar {
  background: rgba(13, 27, 42, .82);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
body.hero-page .topbar h1 { color: #fff; }
body.hero-page .menu-toggle {
  background: var(--hero-panel);
  border-color: var(--hero-panel-border);
  color: var(--hero-ink-light);
}
body.hero-page .icon-btn {
  background: var(--hero-panel);
  border-color: var(--hero-panel-border);
  color: var(--hero-ink-light);
}
body.hero-page .icon-btn:hover { background: var(--hero-panel-border); color: #fff; }
body.hero-page .role-pill {
  background: rgba(20, 184, 166, .14);
  color: var(--hero-teal);
  border-color: rgba(20, 184, 166, .4);
}
body.hero-page .view { max-width: 1080px; margin: 0 auto; }
body.hero-page .loading { color: var(--hero-ink-light); }

.dash-section-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--hero-ink-light); opacity: .6;
  margin: 26px 0 12px;
}
.dash-section-label:first-child { margin-top: 0; }

/* Welcome card */
.welcome-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 16px;
  padding: 18px 20px;
  position: relative;
}
.welcome-avatar {
  width: 62px; height: 62px; flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--hero-teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .12);
  background: linear-gradient(160deg, #1E3350 0%, #0E1926 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--hero-teal);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 22px;
}
.welcome-copy { min-width: 0; }
.welcome-hi { margin: 0; font-size: 12.5px; color: var(--hero-ink-light); opacity: .75; }
.welcome-name { margin: 2px 0 0; font-size: 19px; font-weight: 800; color: #fff; }
.welcome-gear {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--hero-panel-border);
  color: var(--hero-ink-light);
  text-decoration: none;
}
.welcome-gear:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.welcome-gear svg { width: 17px; height: 17px; }

/* Stat tiles */
.dash-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .dash-stat-grid { grid-template-columns: repeat(2, 1fr); } }
.dash-stat-tile {
  display: flex; align-items: center; gap: 13px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-left: 3px solid var(--tile-accent, var(--hero-teal));
  border-radius: 12px;
  padding: 15px 14px;
}
.dash-stat-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tile-accent, var(--hero-teal)) 18%, transparent);
  color: var(--tile-accent, var(--hero-teal));
}
.dash-stat-icon svg { width: 21px; height: 21px; }
.dash-stat-copy { min-width: 0; }
.dash-stat-num { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.1; }
.dash-stat-label { font-size: 12px; color: var(--hero-ink-light); opacity: .8; margin-top: 1px; }
.dash-stat-note { font-size: 10.5px; color: var(--hero-gold); font-weight: 700; margin-top: 3px; }

/* Attendance banner */
.dash-attendance-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--hero-panel);
  border: 1px solid rgba(242, 167, 27, .35);
  border-radius: 14px;
  padding: 15px 18px;
  margin-top: 14px;
}
.dash-attendance-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(242, 167, 27, .16); color: var(--hero-gold);
}
.dash-attendance-icon svg { width: 21px; height: 21px; }
.dash-attendance-copy { flex: 1; min-width: 0; }
.dash-attendance-title { font-size: 12px; color: var(--hero-ink-light); opacity: .85; }
.dash-attendance-num { font-size: 15px; font-weight: 800; color: #fff; margin-top: 1px; }
.dash-attendance-num b { color: var(--hero-green); font-size: 17px; }
.dash-attendance-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--hero-gold); font-weight: 700; font-size: 13px;
  text-decoration: none; white-space: nowrap;
}
.dash-attendance-link:hover { color: var(--hero-gold-dark); }
.dash-attendance-link svg { width: 15px; height: 15px; }

/* Quick actions */
.dash-action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .dash-action-grid { grid-template-columns: repeat(2, 1fr); } }
.dash-action-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 14px;
  padding: 22px 14px;
  color: #fff;
  text-decoration: none;
  transition: transform .12s ease, border-color .12s ease;
}
.dash-action-tile:hover { border-color: var(--tile-accent, var(--hero-teal)); transform: translateY(-1px); }
.dash-action-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tile-accent, var(--hero-teal)) 20%, transparent);
  color: var(--tile-accent, var(--hero-teal));
}
.dash-action-icon svg { width: 24px; height: 24px; }
.dash-action-label { font-size: 13px; font-weight: 700; }

/* Recent activity */
.dash-activity-card {
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 14px;
  padding: 46px 20px;
  text-align: center;
}
.dash-activity-icon {
  width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 50%;
  border: 1.5px solid var(--hero-panel-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--hero-ink-light);
}
.dash-activity-icon svg { width: 24px; height: 24px; }
.dash-activity-title { font-size: 14px; font-weight: 700; color: #fff; }
.dash-activity-sub { font-size: 12.5px; color: var(--hero-ink-light); opacity: .7; margin-top: 3px; }

/* ═══════════════════════════════════════════════════════════
   Hero toolbar — page title + primary action (used by
   Lessons and, going forward, other list pages)
   ═══════════════════════════════════════════════════════════ */
body.hero-page .topbar { gap: 10px; }
.hero-title {
  display: flex; align-items: center; gap: 9px;
  margin: 0; font-family: 'Baloo 2', sans-serif;
  font-weight: 700; font-size: 17px; letter-spacing: .02em;
  text-transform: uppercase; color: var(--hero-blue);
}
.hero-title svg { width: 21px; height: 21px; flex-shrink: 0; }
.hero-add-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 11px; border: none;
  background: linear-gradient(180deg, var(--hero-blue) 0%, var(--hero-blue-dark) 100%);
  color: #fff; cursor: pointer;
  box-shadow: 0 6px 16px rgba(47, 111, 238, .35);
}
.hero-add-btn:hover { filter: brightness(1.08); }
.hero-add-btn svg { width: 19px; height: 19px; }

.hero-filter-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.hero-filter-row .hero-tabs { flex: 1; }
.hero-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--hero-panel-border);
  background: var(--hero-panel);
  color: var(--hero-ink-light);
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
}
.hero-tab svg { width: 14px; height: 14px; }
.hero-tab:hover { border-color: var(--hero-teal); color: #fff; }
.hero-tab.active {
  border-color: var(--hero-teal);
  background: rgba(20, 184, 166, .14);
  color: var(--hero-teal);
}
.hero-settings-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--hero-panel-border);
  color: var(--hero-ink-light);
  text-decoration: none;
}
.hero-settings-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.hero-settings-btn svg { width: 18px; height: 18px; }

/* ═══════════════════════════════════════════════════════════
   Lesson list (Manage Lessons)
   ═══════════════════════════════════════════════════════════ */
.lesson-section-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--hero-gold);
  margin: 24px 0 12px;
}
.lesson-section-title:first-child { margin-top: 0; }
.lesson-section-title svg { width: 15px; height: 15px; }

.lesson-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.lesson-badge {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .03);
  border: 1.5px solid var(--hero-panel-border);
  color: var(--hero-ink-light);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700; font-size: 15px;
}
.lesson-badge.locked {
  border-color: rgba(242, 167, 27, .55);
  color: var(--hero-gold);
  box-shadow: 0 0 0 3px rgba(242, 167, 27, .1);
}
.lesson-body { flex: 1; min-width: 0; }
.lesson-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.lesson-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  border: 1px solid transparent;
}
.lesson-pill svg { width: 10px; height: 10px; }
.lesson-pill.html { background: rgba(242, 167, 27, .12); color: var(--hero-gold); border-color: rgba(242, 167, 27, .35); }
.lesson-pill.css  { background: rgba(124, 58, 237, .14); color: #B79CFB; border-color: rgba(124, 58, 237, .4); }
.lesson-pill.locked { background: rgba(242, 167, 27, .18); color: var(--hero-gold); border-color: rgba(242, 167, 27, .5); }
.lesson-pill.activity { background: rgba(34, 197, 94, .14); color: var(--hero-green); border-color: rgba(34, 197, 94, .4); }
.lesson-title { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.35; }
.lesson-sub { font-size: 12px; color: var(--hero-ink-light); opacity: .65; margin-top: 4px; }
.lesson-actions {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  flex-shrink: 0;
}
.lesson-action-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid transparent;
  cursor: pointer;
}
.lesson-action-btn svg { width: 16px; height: 16px; }
.lesson-action-btn.state-lock { background: rgba(242, 167, 27, .16); color: var(--hero-gold); border-color: rgba(242, 167, 27, .35); }
.lesson-action-btn.state-unlock { background: rgba(255, 255, 255, .05); color: var(--hero-ink-light); border-color: var(--hero-panel-border); }
.lesson-action-btn.activity { background: rgba(20, 184, 166, .14); color: var(--hero-teal); border-color: rgba(20, 184, 166, .35); }
.lesson-action-btn.edit { background: rgba(47, 111, 238, .16); color: #7DA2F5; border-color: rgba(47, 111, 238, .4); }
.lesson-action-btn.delete { background: rgba(240, 85, 75, .14); color: var(--hero-red); border-color: rgba(240, 85, 75, .4); }
.lesson-action-btn:hover { filter: brightness(1.2); }

.hero-empty-state {
  text-align: center;
  padding: 50px 20px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 14px;
  color: var(--hero-ink-light);
}
.hero-empty-icon {
  width: 46px; height: 46px; margin: 0 auto 12px;
  border-radius: 50%;
  border: 1.5px solid var(--hero-panel-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--hero-ink-light);
}
.hero-empty-icon svg { width: 22px; height: 22px; }
.hero-empty-title { font-weight: 700; color: #fff; margin-bottom: 3px; font-size: 14px; }
.hero-empty-sub { font-size: 12.5px; opacity: .7; }

/* ═══════════════════════════════════════════════════════════
   Quizzes
   ═══════════════════════════════════════════════════════════ */
.quiz-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .quiz-layout { grid-template-columns: 1fr; } }

.quiz-lesson-list { display: flex; flex-direction: column; gap: 8px; }
.quiz-lesson-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--hero-panel);
  border: 1.5px solid var(--hero-panel-border);
  border-radius: 11px;
  padding: 11px 12px;
  cursor: pointer;
}
.quiz-lesson-item:hover { border-color: rgba(124, 58, 237, .5); }
.quiz-lesson-item.active { border-color: var(--hero-purple); background: rgba(124, 58, 237, .12); }
.quiz-lesson-num {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .05);
  color: var(--hero-ink-light);
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 11.5px;
}
.quiz-lesson-item.active .quiz-lesson-num { background: var(--hero-purple); color: #fff; }
.quiz-lesson-copy { min-width: 0; }
.quiz-lesson-title { font-size: 12.5px; font-weight: 700; color: #fff; line-height: 1.3; }
.quiz-lesson-course { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--hero-ink-light); opacity: .7; margin-top: 2px; }

.quiz-panel-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.quiz-panel-title { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--hero-ink-light); opacity: .75; }
.hero-pill-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px;
  border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(180deg, var(--hero-purple) 0%, #5F27C6 100%);
  color: #fff; font-size: 12.5px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(124, 58, 237, .3);
}
.hero-pill-btn:hover { filter: brightness(1.08); }
.hero-pill-btn svg { width: 15px; height: 15px; }

.quiz-q-card {
  display: flex; align-items: flex-start; gap: 13px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 13px;
  padding: 14px;
  margin-bottom: 10px;
}
.quiz-q-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--q-accent, var(--hero-blue)) 18%, transparent);
  color: var(--q-accent, var(--hero-blue));
}
.quiz-q-icon svg { width: 18px; height: 18px; }
.quiz-q-body { flex: 1; min-width: 0; }
.quiz-q-text { font-size: 13.5px; font-weight: 600; color: #fff; line-height: 1.4; }
.quiz-q-sub { font-size: 11.5px; color: var(--hero-ink-light); opacity: .7; margin-top: 4px; }
.quiz-q-del {
  width: 32px; height: 32px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid rgba(240, 85, 75, .4);
  background: rgba(240, 85, 75, .12); color: var(--hero-red); cursor: pointer;
}
.quiz-q-del svg { width: 15px; height: 15px; }
.quiz-q-del:hover { filter: brightness(1.2); }

.quiz-type-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border-radius: 11px;
  border: 1px solid var(--hero-panel-border);
  background: var(--hero-panel);
  cursor: pointer;
  margin-bottom: 8px;
}
.quiz-type-option:hover { border-color: var(--q-accent, var(--hero-purple)); }
.quiz-type-option .quiz-q-icon { width: 40px; height: 40px; }
.quiz-type-label { font-size: 13.5px; font-weight: 700; color: #fff; }

/* ═══════════════════════════════════════════════════════════
   Submissions
   ═══════════════════════════════════════════════════════════ */
.sub-row {
  display: flex; align-items: center; gap: 13px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 13px;
  padding: 13px 14px;
  margin-bottom: 10px;
  cursor: pointer;
}
.sub-row:hover { border-color: rgba(20, 184, 166, .4); }
.sub-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1E3350 0%, #0E1926 100%);
  border: 1.5px solid var(--hero-panel-border);
  color: var(--hero-teal);
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 13px;
}
.sub-body { flex: 1; min-width: 0; }
.sub-title { font-size: 13.5px; font-weight: 700; color: #fff; }
.sub-sub { font-size: 11.5px; color: var(--hero-ink-light); opacity: .7; margin-top: 3px; }
.sub-status {
  flex-shrink: 0;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid transparent;
}
.sub-status.submitted { background: rgba(242, 167, 27, .14); color: var(--hero-gold); border-color: rgba(242, 167, 27, .4); }
.sub-status.graded { background: rgba(34, 197, 94, .14); color: var(--hero-green); border-color: rgba(34, 197, 94, .4); }
.sub-status.revision { background: rgba(240, 85, 75, .14); color: var(--hero-red); border-color: rgba(240, 85, 75, .4); }

/* ═══════════════════════════════════════════════════════════
   Shared: gold topbar action pill (CSV export, etc.)
   ═══════════════════════════════════════════════════════════ */
.hero-outline-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1.5px solid rgba(242, 167, 27, .5);
  background: rgba(242, 167, 27, .08);
  color: var(--hero-gold);
  font-size: 12.5px; font-weight: 800;
  cursor: pointer;
  margin-left: auto;
}
.hero-outline-btn:hover { background: rgba(242, 167, 27, .16); }
.hero-outline-btn svg { width: 15px; height: 15px; }

.hero-tab.gold.active { border-color: var(--hero-gold); background: rgba(242, 167, 27, .14); color: var(--hero-gold); }

/* ═══════════════════════════════════════════════════════════
   Student Progress
   ═══════════════════════════════════════════════════════════ */
.progress-list-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 26px 0 12px;
}
.progress-list-head .dash-section-label { margin: 0; }
.progress-list-count { font-size: 12.5px; color: var(--hero-ink-light); opacity: .7; }

.progress-row {
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
}
.progress-row-top { display: flex; align-items: center; gap: 13px; }
.progress-row-body { flex: 1; min-width: 0; }
.progress-row-name { font-size: 14.5px; font-weight: 700; color: #fff; }
.progress-row-sub { font-size: 12px; color: var(--hero-ink-light); opacity: .7; margin-top: 2px; }
.progress-row-pills { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.progress-course-pill {
  padding: 3px 9px; border-radius: 7px;
  font-size: 11px; font-weight: 800;
  border: 1px solid transparent;
}
.progress-course-pill.h { background: rgba(47, 111, 238, .16); color: #7DA2F5; border-color: rgba(47, 111, 238, .4); }
.progress-course-pill.c { background: rgba(124, 58, 237, .16); color: #B79CFB; border-color: rgba(124, 58, 237, .4); }
.progress-chevron { width: 18px; height: 18px; color: var(--hero-ink-light); opacity: .6; flex-shrink: 0; }
.progress-bar-row { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.progress-bar-track { flex: 1; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--hero-teal) 0%, var(--hero-teal-dark) 100%); }
.progress-bar-frac { font-size: 11.5px; color: var(--hero-ink-light); opacity: .7; flex-shrink: 0; }

.progress-legend {
  text-align: center;
  font-size: 11.5px;
  color: var(--hero-ink-light);
  opacity: .65;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
}

/* ═══════════════════════════════════════════════════════════
   Add Students
   ═══════════════════════════════════════════════════════════ */
.students-summary-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 16px;
  padding: 18px 20px;
}
.students-summary-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 184, 166, .14); color: var(--hero-teal);
}
.students-summary-icon svg { width: 23px; height: 23px; }
.students-summary-num { font-size: 24px; font-weight: 800; color: #fff; line-height: 1.1; }
.students-summary-label { font-size: 12.5px; color: var(--hero-ink-light); opacity: .75; margin-top: 1px; }
.hero-solid-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 18px;
  border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(180deg, var(--hero-teal) 0%, var(--hero-teal-dark) 100%);
  color: #06231F; font-size: 13.5px; font-weight: 800;
  box-shadow: 0 6px 16px rgba(20, 184, 166, .3);
  white-space: nowrap;
}
.hero-solid-btn:hover { filter: brightness(1.06); }
.hero-solid-btn svg { width: 16px; height: 16px; }

.sections-card {
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 16px;
}
.sections-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.sections-card-head svg { width: 18px; height: 18px; color: var(--hero-teal); }
.sections-card-title { font-size: 14.5px; font-weight: 700; color: #fff; }
.sections-card-count { margin-left: auto; font-size: 12px; color: var(--hero-ink-light); opacity: .7; }
.sections-input-row { display: flex; gap: 10px; }
.sections-input-row input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, .22);
  border: 1.5px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  color: #fff; font-size: 13px;
  padding: 11px 13px;
  box-sizing: border-box;
}
.sections-input-row input::placeholder { color: var(--hero-ink-light); opacity: .5; }
.sections-input-row input:focus { outline: none; border-color: var(--hero-teal); }
.sections-add-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(180deg, var(--hero-teal) 0%, var(--hero-teal-dark) 100%);
  color: #06231F;
  display: flex; align-items: center; justify-content: center;
}
.sections-add-btn svg { width: 18px; height: 18px; }
.sections-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.section-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: rgba(20, 184, 166, .1);
  border: 1px solid rgba(20, 184, 166, .35);
  color: var(--hero-teal);
  font-size: 12.5px; font-weight: 700;
}
.section-chip button {
  width: 19px; height: 19px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(20, 184, 166, .22); color: var(--hero-teal);
  display: flex; align-items: center; justify-content: center;
}
.section-chip button svg { width: 10px; height: 10px; }

.students-list-head { font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--hero-ink-light); opacity: .6; margin: 22px 0 12px; }

.student-account-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 11px;
}
.student-account-avatar {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1E3350 0%, #0E1926 100%);
  border: 1.5px solid var(--hero-panel-border);
  color: var(--hero-teal);
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 14px;
}
.student-account-body { flex: 1; min-width: 0; }
.student-account-name { font-size: 14.5px; font-weight: 700; color: #fff; }
.student-account-email { font-size: 12px; color: var(--hero-ink-light); opacity: .7; margin-top: 2px; }
.student-account-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini-pill {
  padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--hero-panel-border);
  color: var(--hero-ink-light);
}
.mini-pill.teal { background: rgba(20, 184, 166, .12); color: var(--hero-teal); border-color: rgba(20, 184, 166, .35); }
.mini-pill.blue { background: rgba(47, 111, 238, .14); color: #7DA2F5; border-color: rgba(47, 111, 238, .4); }

/* Avatar picker (Add Student modal + Settings) */
.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-picker-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  border-radius: 10px;
  border: 1.5px solid var(--hero-panel-border);
  background: var(--hero-navy-deep);
  cursor: pointer;
}
.avatar-picker-btn.active { border-color: var(--hero-teal); background: rgba(20, 184, 166, .14); box-shadow: 0 0 0 3px rgba(20, 184, 166, .12); }

/* ═══════════════════════════════════════════════════════════
   Settings
   ═══════════════════════════════════════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 760px) {
  .settings-grid { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 28px; }
}
.settings-col { display: flex; flex-direction: column; min-width: 0; }
.settings-profile-card {
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 18px;
  padding: 30px 24px;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}
.settings-avatar-wrap { position: relative; width: 92px; height: 92px; margin: 0 auto 16px; }
.settings-avatar {
  width: 92px; height: 92px; border-radius: 50%;
  border: 2.5px solid var(--hero-teal);
  box-shadow: 0 0 0 5px rgba(20, 184, 166, .12);
  background: linear-gradient(160deg, #1E3350 0%, #0E1926 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.settings-avatar-cam {
  position: absolute; bottom: 2px; right: 2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--hero-teal); color: #06231F;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--hero-navy);
}
.settings-avatar-cam svg { width: 14px; height: 14px; }
.settings-name { font-size: 19px; font-weight: 800; color: #fff; margin-top: 4px; }
.settings-role-pill {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  background: rgba(20, 184, 166, .14);
  color: var(--hero-teal);
  border: 1px solid rgba(20, 184, 166, .4);
  font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
}
.settings-role-pill svg { width: 11px; height: 11px; }
.settings-ghost-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(20, 184, 166, .4);
  background: rgba(20, 184, 166, .08);
  color: var(--hero-teal);
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
}
.settings-ghost-btn:hover { background: rgba(20, 184, 166, .16); }
.settings-ghost-btn svg { width: 15px; height: 15px; }
.settings-field { text-align: left; margin-top: 22px; }
.settings-field label { display: block; font-size: 11.5px; font-weight: 700; color: var(--hero-ink-light); opacity: .8; margin-bottom: 7px; }
.settings-field input {
  width: 100%;
  background: rgba(0, 0, 0, .22);
  border: 1.5px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  color: #fff; font-size: 14px;
  padding: 12px 14px;
  box-sizing: border-box;
}
.settings-field input::placeholder { color: var(--hero-ink-light); opacity: .45; }
.settings-field input:focus { outline: none; border-color: var(--hero-teal); box-shadow: 0 0 0 3px rgba(20, 184, 166, .15); }
.settings-field input:disabled { opacity: .55; }
.settings-save-btn {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px;
  padding: 13px;
  border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(180deg, var(--hero-teal) 0%, var(--hero-teal-dark) 100%);
  color: #06231F; font-size: 14px; font-weight: 800;
}
.settings-save-btn:hover { filter: brightness(1.06); }
.settings-save-btn svg { width: 16px; height: 16px; }

.settings-emoji-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 24px;
}
.settings-emoji-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.settings-emoji-btn {
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  border-radius: 12px;
  border: 1.5px solid var(--hero-panel-border);
  background: var(--hero-navy-deep);
  cursor: pointer;
}
.settings-emoji-btn.active { border-color: var(--hero-teal); background: rgba(20, 184, 166, .14); box-shadow: 0 0 0 3px rgba(20, 184, 166, .12); }

.settings-theme-card {
  width: 100%;
  box-sizing: border-box;
  display: flex; align-items: center; gap: 14px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 14px;
  padding: 15px 18px;
  margin-top: 24px;
}
.settings-theme-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(47, 111, 238, .16); color: #7DA2F5;
}
.settings-theme-icon svg { width: 19px; height: 19px; }
.settings-theme-copy { flex: 1; min-width: 0; }
.settings-theme-title { font-size: 13.5px; font-weight: 700; color: #fff; }
.settings-theme-sub { font-size: 11.5px; color: var(--hero-ink-light); opacity: .7; margin-top: 1px; }
.settings-theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(47, 111, 238, .45);
  background: rgba(47, 111, 238, .1);
  color: #7DA2F5;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.settings-theme-toggle svg { width: 14px; height: 14px; }

.settings-pw-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 24px;
}
.settings-pw-card .settings-field { margin-top: 14px; }
.settings-pw-card .settings-field:first-child { margin-top: 12px; }
.settings-pw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 16px;
  padding: 9px 18px;
  border-radius: 10px; cursor: pointer;
  background: rgba(47, 111, 238, .16);
  border: 1.5px solid rgba(47, 111, 238, .4);
  color: #7DA2F5; font-size: 13px; font-weight: 700;
  white-space: nowrap;
  box-sizing: border-box;
}
@media (max-width: 480px) { .settings-pw-btn { width: 100%; } }
.settings-pw-btn:hover { background: rgba(47, 111, 238, .24); }
.settings-pw-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.settings-system-card {
  width: 100%;
  box-sizing: border-box;
  margin-top: 24px;
  display: flex; gap: 12px;
}
.settings-system-stat {
  flex: 1;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.settings-system-num { font-size: 19px; font-weight: 800; color: #fff; }
.settings-system-label { font-size: 11px; color: var(--hero-ink-light); opacity: .7; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   Badges
   ═══════════════════════════════════════════════════════════ */
.hero-info-banner {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.hero-info-banner svg {
  width: 34px; height: 34px; flex-shrink: 0;
  padding: 8px; box-sizing: border-box;
  border-radius: 10px;
  background: rgba(20, 184, 166, .14); color: var(--hero-teal);
}
.hero-info-banner span { font-size: 12.5px; color: var(--hero-ink-light); opacity: .85; line-height: 1.5; }

.prog-summary-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 14px;
}
.prog-summary-row .dash-section-label { margin: 0; }
.prog-count-badge {
  min-width: 26px; height: 26px; padding: 0 8px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800;
  background: rgba(20, 184, 166, .16); color: var(--hero-teal);
  border: 1px solid rgba(20, 184, 166, .4);
}

.hero-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 800;
  background: linear-gradient(180deg, var(--hero-teal) 0%, var(--hero-teal-dark) 100%);
  color: #06201C;
  box-shadow: 0 8px 20px rgba(20, 184, 166, .3);
}
.hero-cta-btn svg { width: 16px; height: 16px; }
.hero-cta-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hero-empty-cta { margin-top: 4px; }

.badge-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--hero-panel);
  border: 1px solid var(--hero-panel-border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.badge-card:hover {
  border-color: rgba(20, 184, 166, .4);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}
.badge-card-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: linear-gradient(155deg, rgba(242, 167, 27, .18), rgba(242, 167, 27, .06));
  border: 1.5px solid rgba(242, 167, 27, .35);
  overflow: hidden;
}
.badge-card-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.badge-card-body { flex: 1; min-width: 160px; }
.badge-card-name { font-size: 15px; font-weight: 700; color: #fff; }
.badge-card-sub { font-size: 12px; color: var(--hero-ink-light); opacity: .7; margin-top: 4px; }
.badge-card-xp { color: var(--hero-gold); font-weight: 700; opacity: 1; }
.badge-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
.badge-act-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.badge-act-btn svg { width: 15px; height: 15px; }
.badge-act-btn.award  { background: rgba(242, 167, 27, .14); color: var(--hero-gold); border-color: rgba(242, 167, 27, .4); }
.badge-act-btn.edit   { background: rgba(47, 111, 238, .16); color: #7DA2F5; border-color: rgba(47, 111, 238, .4); }
.badge-act-btn.delete { background: rgba(240, 85, 75, .14); color: var(--hero-red); border-color: rgba(240, 85, 75, .4); }
.badge-act-btn:hover { filter: brightness(1.2); transform: translateY(-1px); }

/* Icon picker inside the New/Edit Badge modal: tabs between emoji-grid and image upload */
.badge-icon-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.badge-icon-tab {
  flex: 1; padding: 8px 10px; text-align: center;
  border-radius: 9px; border: 1.5px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .18); color: var(--hero-ink-light); opacity: .75;
  font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.badge-icon-tab.active { border-color: var(--hero-teal); color: var(--hero-teal); background: rgba(20, 184, 166, .14); opacity: 1; }

.badge-icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .18);
  cursor: pointer;
}
.badge-icon-btn.active { border-color: var(--hero-gold); background: rgba(242, 167, 27, .16); box-shadow: 0 0 0 3px rgba(242, 167, 27, .12); }

.badge-upload-zone {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px dashed rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .12);
}
.badge-upload-preview {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: rgba(255, 255, 255, .05);
  border: 1.5px solid rgba(255, 255, 255, .12);
  overflow: hidden;
}
.badge-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.badge-upload-copy { flex: 1; min-width: 0; }
.badge-upload-label { font-size: 12.5px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.badge-upload-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-upload-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px; font-weight: 700;
  border: 1.5px solid rgba(47, 111, 238, .4);
  background: rgba(47, 111, 238, .16); color: #7DA2F5;
  cursor: pointer;
}
.badge-upload-btn.remove { border-color: rgba(240, 85, 75, .4); background: rgba(240, 85, 75, .14); color: var(--hero-red); }
.badge-upload-btn svg { width: 13px; height: 13px; }
.badge-upload-hint { font-size: 11px; color: var(--hero-ink-light); opacity: .6; margin-top: 6px; }

.badge-award-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  cursor: pointer;
  transition: background .12s ease;
}
.badge-award-row:hover { background: rgba(255, 255, 255, .06); }

