/* ==============================================
   STUDENT SPHERE — Complete Stylesheet
   Font: Bricolage Grotesque (headings) + Outfit (body)
   Theme: Orange accent · Dark + Light modes
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ══════════════════════════════════════════════
   DARK THEME (default)  [data-theme="dark"]
══════════════════════════════════════════════ */
:root,
[data-theme="dark"] {
  --bg:        #0c0a09;
  --nav-bg:    rgba(12, 10, 9, 0.93);
  --panel:     #141210;
  --card:      #1a1512;
  --card2:     #201a16;
  --border:    #2e2420;
  --border2:   #3d3028;

  --accent:      #f97316;
  --accent-soft: rgba(249,115,22,0.13);
  --accent-glow: rgba(249,115,22,0.22);
  --accent-2:    #fb923c;

  --violet:    #c084fc;
  --green:     #34d399;
  --green-s:   rgba(52,211,153,0.12);
  --amber:     #fbbf24;
  --amber-s:   rgba(251,191,36,0.12);
  --rose:      #fb7185;
  --rose-s:    rgba(251,113,133,0.12);

  --white:     #fdf4ee;
  --text:      #c4a99a;
  --muted:     #6b5548;

  --shadow:    0 8px 40px rgba(0,0,0,0.55);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.4);
}

/* ══════════════════════════════════════════════
   LIGHT THEME  [data-theme="light"]
══════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:        #fdf6f0;
  --nav-bg:    rgba(255, 250, 245, 0.93);
  --panel:     #fff5ed;
  --card:      #ffffff;
  --card2:     #fef3e8;
  --border:    #f0d9c8;
  --border2:   #e8c9b0;

  --accent:      #ea6c0a;
  --accent-soft: rgba(234,108,10,0.10);
  --accent-glow: rgba(234,108,10,0.18);
  --accent-2:    #f97316;

  --violet:    #9333ea;
  --green:     #059669;
  --green-s:   rgba(5,150,105,0.10);
  --amber:     #d97706;
  --amber-s:   rgba(217,119,6,0.10);
  --rose:      #e11d48;
  --rose-s:    rgba(225,29,72,0.10);

  --white:     #1a0f08;
  --text:      #4a3728;
  --muted:     #9a7a68;

  --shadow:    0 8px 40px rgba(120,60,20,0.12);
  --shadow-sm: 0 2px 12px rgba(120,60,20,0.08);
}

/* ── Shared constants ── */
:root {
  --r:       12px;
  --r-sm:    8px;
  --r-xs:    6px;
  --t:       all 0.2s ease;
  --head:    'Bricolage Grotesque', sans-serif;
  --body:    'Outfit', sans-serif;
  --sidebar: 240px;
  --nav-h:   68px;
}

/* ── Smooth theme transition ── */
body, .nav, .sidebar, .card, .auth-box, .about-card,
.stat-box, .hcard, .nav-drawer, .form-control,
.item-row, .highlight-box, .profile-banner, .egg-box {
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--body); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--body); }
ul { list-style: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); color: var(--white); }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ── Helpers ── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 2rem; }
.pt-nav { padding-top: var(--nav-h); }

/* ════════════════════════════════════════════════
   NAVBAR
════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}
.nav-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.nav-brand-name {
  font-family: var(--head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}
.nav-brand-name em { font-style: normal; color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--r-xs);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: var(--t);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--white); background: var(--card); }
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}
.nav-username {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}
.role-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 20px;
}
.role-student { background: rgba(59,130,246,.12); color: #60a5fa; }
.role-faculty  { background: rgba(139,92,246,.12); color: var(--violet); }
.role-admin    { background: var(--rose-s); color: var(--rose); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  border-radius: var(--r-xs);
  transition: background .15s;
}
.hamburger:hover { background: var(--card); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
  box-shadow: var(--shadow);
}
.nav-drawer.open { display: flex; }
.nav-drawer a, .nav-drawer button {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--t);
  text-align: left;
  width: 100%;
}
.nav-drawer a:hover, .nav-drawer button:hover { background: var(--card); color: var(--white); }

/* ════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 9px 20px;
  min-height: 40px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  transition: var(--t);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-outline:hover { background: var(--card); color: var(--white); border-color: var(--border2); }

.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--card); color: var(--text); }

.btn-danger { background: var(--rose-s); color: var(--rose); border: 1px solid rgba(244,63,94,.2); }
.btn-danger:hover { background: var(--rose); color: #fff; }

.btn-success { background: var(--green-s); color: var(--green); border: 1px solid rgba(16,185,129,.2); }
.btn-success:hover { background: var(--green); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; border-radius: var(--r-xs); min-height: 32px; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ════════════════════════════════════════════════
   FORM ELEMENTS
════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  min-height: 42px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--white);
  font-family: var(--body);
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 10px var(--accent-glow);
}
.form-control::placeholder { color: var(--muted); }
.form-control option { background: var(--panel); }
select.form-control { cursor: pointer; }

/* ════════════════════════════════════════════════
   AUTH PAGES
════════════════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
}
.auth-box {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2rem;
}
.auth-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.auth-logo-name { font-family: var(--head); font-size: 1.3rem; font-weight: 700; color: var(--white); }
.auth-logo-name em { font-style: normal; color: var(--accent); }
.auth-box h2 {
  font-family: var(--head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.auth-box p.sub { color: var(--muted); font-size: 0.875rem; margin-bottom: 1.75rem; }
.auth-switch { text-align: center; font-size: 0.875rem; color: var(--muted); margin-top: 1.25rem; }
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════
   ALERTS / TOASTS
════════════════════════════════════════════════ */
.alert {
  padding: 10px 14px;
  border-radius: var(--r-xs);
  font-size: 0.855rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.alert-error   { background: var(--rose-s); border: 1px solid rgba(244,63,94,.25); color: #fda4af; }
.alert-success { background: var(--green-s); border: 1px solid rgba(16,185,129,.25); color: #6ee7b7; }
.alert-info    { background: var(--accent-soft); border: 1px solid rgba(249,115,22,.25); color: var(--accent-2); }
.alert-warning { background: var(--amber-s); border: 1px solid rgba(245,158,11,.3); color: #fcd34d; }

.toast-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  font-size: 0.855rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  max-width: 300px;
  animation: toastSlide .25s ease;
  pointer-events: all;
}
@keyframes toastSlide { from { opacity:0; transform:translateX(14px); } to { opacity:1; transform:none; } }
.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--rose); }
.toast-info    { border-left: 3px solid var(--accent); }

/* ════════════════════════════════════════════════
   LANDING PAGE — HERO
════════════════════════════════════════════════ */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 3rem 0 4rem;
}
.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: rgba(249,115,22,.04);
  pointer-events: none;
}
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, black 20%, transparent 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 100px;
  background: var(--accent-soft);
  border: 1px solid rgba(249,115,22,.2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2s ease infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.hero-title {
  font-family: var(--head);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
}
.hero-title .hl {
  display: block;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
}
.hero-desc {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 440px;
}
.hero-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.hstat-val {
  font-family: var(--head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.hstat-lbl { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }

/* Hero Right — feature cards */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.hcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  transition: var(--t);
  cursor: default;
}
.hcard:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.hcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 0.6rem; }
.hcard-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}
.ic-blue   { background: var(--accent-soft); }
.ic-violet { background: rgba(139,92,246,.12); }
.ic-green  { background: var(--green-s); }
.hcard-title { font-family: var(--head); font-weight: 700; font-size: 0.95rem; color: var(--white); }
.hcard-desc  { font-size: 0.83rem; color: var(--muted); line-height: 1.5; }
.hcard-tags  { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; }
.htag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 100px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ════════════════════════════════════════════════
   DASHBOARD
════════════════════════════════════════════════ */
.dash-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-h));
}

/* Sidebar */
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 1.25rem 0.875rem;
}
.sb-user {
  text-align: center;
  padding-bottom: 1.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.sb-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--head);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 0.65rem;
}
.sb-name  { font-family: var(--head); font-weight: 700; font-size: 0.9rem; color: var(--white); margin-bottom: 2px; }
.sb-email { font-size: 0.72rem; color: var(--muted); word-break: break-all; }
.sb-section-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 0.85rem 10px 0.3rem;
}
.sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--t);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.sb-item .sb-ico { font-size: 15px; flex-shrink: 0; }
.sb-item:hover  { background: var(--card); color: var(--white); }
.sb-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sb-bottom { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); }

/* Sidebar badge (pending approvals) */
.sb-badge {
  margin-left: auto;
  background: var(--amber);
  color: #000;
  font-size: .62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  line-height: 1.5;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
  display: inline-block;
}

/* Main area */
.dash-main { flex: 1; min-width: 0; padding: 2rem 2rem 3rem; overflow-x: hidden; }
.section { display: none; }
.section.active { display: block; animation: fadeUp 0.2s ease; }
@keyframes fadeUp { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }

.page-head { margin-bottom: 1.75rem; }
.page-title {
  font-family: var(--head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.page-sub { font-size: 0.875rem; color: var(--muted); margin-top: 3px; }

/* ════════════════════════════════════════════════
   CARDS / STATS
════════════════════════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card + .card { margin-top: 1.25rem; }
.card-title {
  font-family: var(--head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card:hover {
  box-shadow: 0 0 30px rgba(249,115,22,0.15), var(--shadow);
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.2rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: var(--t);
}
.stat-box:hover { border-color: var(--border2); transform: translateY(-1px); }
.stat-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s;
}
.stat-box:hover::before { opacity: 1; }
.stat-val {
  font-family: var(--head);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.5px;
}
.stat-lbl { font-size: 0.78rem; font-weight: 500; color: var(--muted); margin-top: 5px; }
.stat-bg-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.2rem;
  opacity: 0.06;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

/* ════════════════════════════════════════════════
   BADGES
════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-blue   { background: var(--accent-soft); color: var(--accent); }
.badge-violet { background: rgba(139,92,246,.12); color: var(--violet); }
.badge-green  { background: var(--green-s); color: var(--green); }
.badge-amber  { background: var(--amber-s); color: var(--amber); }
.badge-rose   { background: var(--rose-s); color: var(--rose); }
.badge-gray   { background: var(--panel); color: var(--muted); border: 1px solid var(--border); }

/* ════════════════════════════════════════════════
   PROGRESS BARS
════════════════════════════════════════════════ */
.prog-track { background: var(--panel); border-radius: 4px; height: 7px; overflow: hidden; margin-top: 6px; }
.prog-bar { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(.4,0,.2,1); }
.prog-green { background: var(--green); }
.prog-amber { background: var(--amber); }
.prog-rose  { background: var(--rose); }
.prog-blue  { background: var(--accent); }

/* ════════════════════════════════════════════════
   TABLES
════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
thead tr { background: var(--panel); }
th {
  padding: 11px 16px;
  text-align: left;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { background: var(--card); transition: background .15s; }
tbody tr:hover { background: var(--card2); }

/* Table action buttons */
.tbl-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }

/* ════════════════════════════════════════════════
   LIST ITEMS
════════════════════════════════════════════════ */
.item-list { display: flex; flex-direction: column; gap: 0.5rem; }
.item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  font-size: 0.86rem;
  transition: border-color .15s;
}
.item-row:hover { border-color: var(--border2); }
.item-row-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.item-row-right { flex-shrink: 0; display: flex; align-items: center; }
.item-row-icon  { font-size: 14px; flex-shrink: 0; }
.item-row-text  { color: var(--text); white-space: normal; word-break: break-word; }
.item-row-date  { font-size: 0.72rem; color: var(--muted); flex-shrink: 0; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); font-size: 0.875rem; }
.empty-ico { font-size: 2.2rem; display: block; margin-bottom: 0.6rem; opacity: 0.5; }

/* ════════════════════════════════════════════════
   PROFILE / DETAIL ROWS
════════════════════════════════════════════════ */
.profile-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 1.25rem;
}
.profile-av {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  font-family: var(--head); font-size: 1.4rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.profile-name  { font-family: var(--head); font-size: 1.3rem; font-weight: 700; color: var(--white); }
.profile-email { font-size: 0.84rem; color: var(--muted); margin: 2px 0 8px; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 1rem; }
.detail-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 3px; }
.detail-val   { font-size: 0.9rem; font-weight: 500; color: var(--text); }

.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem;
}
.info-row:last-child { border-bottom: none; }
.info-key { color: var(--muted); }
.info-val { font-weight: 600; color: var(--text); }

.score-big { text-align: center; padding: 1.5rem 0 1.25rem; }
.score-num {
  font-family: var(--head); font-size: 3.5rem; font-weight: 700;
  color: var(--white); line-height: 1; letter-spacing: -2px;
}
.score-label { font-size: 0.84rem; color: var(--muted); margin: 4px 0 1rem; }

/* ════════════════════════════════════════════════
   EASTER EGG
════════════════════════════════════════════════ */
.egg-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.85); backdrop-filter: blur(10px);
  display: none; place-items: center;
}
.egg-overlay.show { display: grid; }
.egg-box {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 20px; padding: 3rem 2.5rem; text-align: center;
  max-width: 360px; width: 90%;
  box-shadow: 0 0 60px var(--accent-soft), var(--shadow);
  animation: eggPop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes eggPop { from{opacity:0;transform:scale(.85)} to{opacity:1;transform:scale(1)} }
img.egg-icon {
  width: 80px; height: 80px; display: block; margin: 0 auto 1.5rem;
  border-radius: 18px; object-fit: contain;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 4px 20px var(--accent-glow);
}
span.egg-icon { font-size: 3.5rem; display: block; margin-bottom: 1rem; }
.egg-box h2 { font-family: var(--head); font-size: 1.7rem; font-weight: 700; color: var(--white); margin-bottom: 0.4rem; }
.egg-box h2 span { color: var(--accent); }
.egg-box p { color: var(--muted); font-size: 0.875rem; margin-bottom: 0.4rem; }
.egg-dev { font-family: var(--head); font-size: 1.1rem; font-weight: 600; color: var(--violet); margin-top: 0.4rem; margin-bottom: 1.5rem; }

/* ════════════════════════════════════════════════
   ABOUT PAGE  (moved from about-dev.html <style>)
════════════════════════════════════════════════ */
.about-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.about-hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 3rem 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.about-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0 0;
}
.about-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.about-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.about-section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.about-section-card h3 {
  font-family: var(--head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.team-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.team-member:last-child { border-bottom: none; }
.team-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(249,115,22,.2);
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  font-family: var(--head);
}
.team-name { font-weight: 600; font-size: 0.875rem; color: var(--white); line-height: 1.3; }
.team-role { font-size: 0.75rem; color: var(--muted); margin-top: 1px; }

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text);
}
.feature-item:last-child { border-bottom: none; }
.feature-check { color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.arch-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1.25rem;
  height: 100%;
}
.arch-icon  { font-size: 2rem; margin-bottom: .75rem; display: block; }
.arch-title { font-family: var(--head); font-weight: 700; font-size: .95rem; color: var(--white); margin-bottom: .5rem; }
.arch-badge { display: inline-flex; padding: 2px 10px; border-radius: 100px; font-size: .7rem; font-weight: 700; margin-bottom: .875rem; }
.arch-desc  { font-size: .82rem; color: var(--muted); line-height: 1.65; }
.arch-desc strong { color: var(--text); font-weight: 600; }

.about-cta { display: flex; gap: .875rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* Legacy about-card (kept for backward compat) */
.about-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 3rem 2.5rem; text-align: center; box-shadow: var(--shadow);
}
.about-logo {
  width: 96px; height: 96px; border-radius: 20px; object-fit: contain;
  display: block; margin: 0 auto 1.25rem;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 30px var(--accent-glow);
}
.about-role { font-size: 0.9rem; color: var(--accent); font-weight: 600; margin-bottom: 1.25rem; }
.about-desc { font-size: 0.9rem; color: var(--text); line-height: 1.75; max-width: 460px; margin: 0 auto 2rem; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; }
.tag {
  padding: 4px 12px; border-radius: 100px; font-size: 0.77rem; font-weight: 600;
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  transition: var(--t);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════ */
footer { border-top: 1px solid var(--border); padding: 1.75rem 2rem; text-align: center; font-size: 0.8rem; color: var(--muted); }
footer span { color: var(--accent); }

/* ════════════════════════════════════════════════
   THEME TOGGLE BUTTON
════════════════════════════════════════════════ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--border2);
  cursor: pointer;
  font-size: 16px;
  transition: var(--t);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: rotate(15deg) scale(1.05);
}
.theme-toggle:active { transform: scale(0.93); }
.theme-toggle .t-icon { display: block; line-height: 1; transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), opacity 0.25s; }
.theme-toggle.spinning .t-icon { transform: rotate(360deg) scale(0.6); opacity: 0; }

/* ════════════════════════════════════════════════
   LIGHT MODE OVERRIDES
════════════════════════════════════════════════ */
[data-theme="light"] body { color: var(--text); }
[data-theme="light"] .nav-links a:hover  { background: #fce7d6; color: var(--white); }
[data-theme="light"] .nav-links a.active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
[data-theme="light"] .nav-drawer a:hover,
[data-theme="light"] .nav-drawer button:hover { background: #fce7d6; color: var(--white); }
[data-theme="light"] .btn-outline { color: var(--text); border-color: var(--border2); }
[data-theme="light"] .btn-outline:hover { background: #fce7d6; color: var(--accent); border-color: var(--accent); }
[data-theme="light"] .btn-ghost { color: var(--muted); }
[data-theme="light"] .btn-ghost:hover { background: #fce7d6; color: var(--text); }
[data-theme="light"] .form-control { background: #fff8f3; border-color: var(--border); color: var(--white); }
[data-theme="light"] .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
[data-theme="light"] .form-control::placeholder { color: var(--muted); }
[data-theme="light"] .hcard:hover { box-shadow: 0 8px 30px rgba(180,80,20,.1); }
[data-theme="light"] ::-webkit-scrollbar-track { background: #fdf6f0; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--border2); }
[data-theme="light"] .stat-box::before { background: var(--accent); }
[data-theme="light"] tbody tr { background: var(--card); }
[data-theme="light"] tbody tr:hover { background: #fff5ed; }
[data-theme="light"] .sb-item:hover { background: #fce7d6; color: var(--accent); }
[data-theme="light"] .tag { background: #fff5ed; border-color: var(--border2); color: var(--muted); }
[data-theme="light"] .tag:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .item-row:hover { border-color: var(--accent); }
[data-theme="light"] footer { background: #fff5ed; }

/* ════════════════════════════════════════════════
   DASHBOARD-SPECIFIC: FORM GRIDS & UPLOAD
════════════════════════════════════════════════ */
.add-user-form { max-width: 720px; width: 100%; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bulk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.upload-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }

.sem-selector-wrap { display: flex; align-items: center; gap: .75rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .6rem 1rem; margin-bottom: .25rem; flex-wrap: wrap; }
.sem-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.sem-select { width: auto !important; min-width: 180px; padding: 6px 12px; font-size: .875rem; }

.file-upload-area {
  border: 2px dashed var(--border2);
  border-radius: var(--r-sm);
  padding: 1.25rem 1.5rem;
  text-align: center; cursor: pointer;
  transition: var(--t); color: var(--muted); font-size: .875rem;
  display: flex; align-items: center; justify-content: center; gap: .75rem;
}
.file-upload-area:hover,
.file-upload-area.dragover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.file-upload-icon { font-size: 1.4rem; flex-shrink: 0; }

/* Pending section accent */
#sec-pending .card { border-color: rgba(245,158,11,.18); }
.pending-row-exit { animation: rowFade .35s ease forwards; }
@keyframes rowFade { to { opacity: 0; transform: translateX(16px); } }

/* Sidebar toggle — dashboard pages */
#sb-toggle { display: none; margin-left: auto; }

/* Sidebar backdrop */
.sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 899; background: rgba(0,0,0,.45); }
.sidebar-backdrop.show { display: block; }

/* Glow accent utility */
.glow { box-shadow: 0 0 20px var(--accent-glow); }

/* ════════════════════════════════════════════════
   RESPONSIVE — TABLET LANDSCAPE (≤1024px)
════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .dash-main { padding: 1.75rem 1.5rem 3rem; }
}

/* ════════════════════════════════════════════════
   RESPONSIVE — SIDEBAR OVERLAY (≤900px)
════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -105%; top: var(--nav-h);
    z-index: 900; width: 280px;
    height: calc(100vh - var(--nav-h));
    transition: left .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 32px rgba(0,0,0,.55);
    overflow-y: auto;
  }
  .sidebar.open { left: 0; }
  #sb-toggle { display: flex; }
  .dash-layout { flex-direction: column; }
  /* Hero: single column, show hero-right stacked below */
  .hero-inner  { grid-template-columns: 1fr; gap: 2rem; }
  .hero-right  { display: flex; flex-direction: column; gap: 0.75rem; }
  .grid-2      { grid-template-columns: 1fr; }
  .bulk-grid   { grid-template-columns: 1fr; }
  /* About grid */
  .about-stats-row { grid-template-columns: repeat(2, 1fr); }
  .about-grid-2    { grid-template-columns: 1fr; }
  .about-grid-3    { grid-template-columns: 1fr 1fr; }
}

/* ════════════════════════════════════════════════
   RESPONSIVE — TABLET PORTRAIT (≤768px)
════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .nav { padding: 0 1rem; gap: 0.75rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-brand-name { font-size: 1rem; }

  .hero { padding: 2rem 0 3rem; }
  .hero-title { font-size: clamp(1.9rem, 6vw, 2.6rem); text-align: center; }
  .hero-desc  { font-size: 0.92rem; text-align: center; }
  .hero-left  { text-align: center; }
  .hero-btns  { flex-direction: column; align-items: center; }
  .hero-btns .btn { width: 100%; max-width: 320px; }
  .hero-stats { gap: 1.25rem; justify-content: center; }

  .auth-box { padding: 1.75rem 1.25rem; }
  .about-hero-card { padding: 2rem 1.25rem; }

  .dash-main  { padding: 1.25rem 0.875rem 2.5rem; }
  .page-title { font-size: 1.35rem; }
  .stat-row   { grid-template-columns: repeat(2, 1fr); }
  .score-num  { font-size: 2.8rem; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-username { display: none; }
  .role-tag  { display: none; }

  .profile-banner { flex-direction: column; text-align: center; gap: 1rem; }
  .item-row { flex-wrap: wrap; gap: 0.5rem; }
  .form-row-2   { grid-template-columns: 1fr; }
  .upload-row-2 { grid-template-columns: 1fr; }
  .tbl-actions  { flex-wrap: wrap; gap: 4px; }
}

/* ════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤600px)
════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .container { padding: 0 1rem; }
  .nav { padding: 0 0.875rem; gap: 0.5rem; }
  .nav-brand-icon { width: 30px; height: 30px; }
  /* Keep only theme toggle + hamburger in public nav-right on mobile */
  .nav > .nav-right > a.btn { display: none; }
  .nav > .nav-right > button { display: inline-flex !important; }

  .nav-drawer a, .nav-drawer button { padding: 13px 14px; font-size: 0.95rem; }

  .hero { padding: 1.5rem 0 2.5rem; }
  .hero-title { font-size: clamp(1.65rem, 7vw, 2.2rem); letter-spacing: -.5px; }
  .hero-chip  { font-size: 0.7rem; }
  .hstat-val  { font-size: 1.3rem; }
  /* Show hero-right on mobile as a scrollable list */
  .hero-right { display: flex; flex-direction: column; gap: 0.75rem; }

  .stat-row  { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-val  { font-size: 1.5rem; }
  .stat-box  { padding: 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 0.875rem; }

  .card { padding: 1.1rem; }
  .auth-box { padding: 1.5rem 1rem; border-radius: var(--r-sm); max-width: 100%; }
  .auth-box h2 { font-size: 1.25rem; }

  .about-wrap { padding: 1.5rem 1rem 3rem !important; }
  .about-hero-card { padding: 1.5rem 1rem; }
  .about-stats-row { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .about-grid-3    { grid-template-columns: 1fr; }
  .about-section-card { padding: 1.1rem; }

  .dash-main { padding: 1rem 0.75rem 2rem; }
  .page-title { font-size: 1.2rem; }
  .page-sub   { font-size: 0.8rem; }
  .sidebar { width: 85vw; max-width: 300px; }
  .score-num { font-size: 2.4rem; }
  .detail-grid { grid-template-columns: 1fr; }

  .toast-wrap { left: 0.75rem; right: 0.75rem; bottom: 1rem; }
  .toast      { max-width: 100%; }

  .profile-av   { width: 52px; height: 52px; font-size: 1.1rem; }
  .profile-name { font-size: 1.1rem; }
  .tag { font-size: 0.73rem; padding: 4px 10px; }
  th, td { padding: 9px 12px; font-size: 0.8rem; }

  .table-wrap table td:nth-child(3) {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .item-row { flex-direction: column; align-items: flex-start; }
  .item-row-right { width: 100%; justify-content: flex-end; margin-top: 6px; }

  #nav-right { display: flex; align-items: center; gap: 4px; }
  #nav-right .nav-username { display: none; }
  #nav-right .role-tag     { display: none; }
}

/* ════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤480px)
════════════════════════════════════════════════ */
@media (max-width: 480px) {
  :root { --nav-h: 56px; }
  .nav-brand-name { font-size: 0.95rem; }
  .hero { padding: 1.5rem 0 2.5rem; }
  .hero-title { font-size: clamp(1.5rem, 8vw, 2rem); }
  .hero-desc  { font-size: 0.87rem; }
  .hero-stats { gap: 1rem; }
  .hstat-val  { font-size: 1.2rem; }
  .hstat-lbl  { font-size: 0.72rem; }
  .hero-btns .btn { width: 100%; }
  .nav { gap: 0.4rem; }
  .nav-right { gap: 4px; }
  .nav-brand-icon { width: 28px; height: 28px; }

  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .stat-val  { font-size: 1.35rem; }
  .stat-lbl  { font-size: 0.72rem; }
  .stat-box  { padding: 0.875rem 0.75rem; }
  .stat-bg-icon { font-size: 1.6rem; }

  .card { padding: 0.875rem; }
  .card-title { font-size: 0.88rem; }
  .auth-page { padding: 1rem 0.75rem; }
  .auth-box  { padding: 1.25rem 0.875rem; }
  .sb-avatar { width: 44px; height: 44px; font-size: 0.95rem; }
  .dash-main { padding: 0.875rem 0.625rem 2rem; }
  .page-title { font-size: 1.1rem; }
  .form-control { font-size: 0.875rem; padding: 9px 12px; }
  .btn-lg { padding: 11px 20px; font-size: 0.92rem; }
  .score-num { font-size: 2rem; }
  .egg-box { padding: 2rem 1.25rem; }
  .egg-box h2 { font-size: 1.35rem; }
  .item-row { padding: 9px 10px; }
  .item-row-text { font-size: 0.82rem; }
  .info-row { font-size: 0.82rem; padding: 8px 0; }
}

/* ════════════════════════════════════════════════
   RESPONSIVE — EXTRA SMALL (≤360px)
════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .nav-brand-name { display: none; }
  .stat-row  { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 1.4rem; }
  .auth-box  { padding: 1rem 0.75rem; }
  .card      { padding: 0.75rem; }
  .dash-main { padding: 0.75rem 0.5rem 1.5rem; }
  .sb-avatar { width: 44px; height: 44px; font-size: 0.95rem; }
  .sidebar   { width: 88vw; }
}

/* ════════════════════════════════════════════════
   HOMEPAGE — New Sections
   (appended — uses existing CSS variables only)
════════════════════════════════════════════════ */

/* ── Hero App Strip ── */
.hero-app-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.hero-app-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── App Download Button ── */
.btn-app {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: var(--t);
  color: var(--white);
}
.btn-app:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.btn-app-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
.btn-app-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.btn-app-sub  { font-size: 0.68rem; color: var(--muted); }
.btn-app-main { font-size: 0.92rem; font-weight: 700; color: var(--white); }
.btn-app-lg {
  padding: 0.85rem 1.4rem;
  border-radius: var(--r);
}
.btn-app-lg .btn-app-icon { font-size: 1.8rem; }
.btn-app-lg .btn-app-main { font-size: 1rem; }

/* ── hstat (separate from hstat-val to avoid conflicts) ── */
.hstat { display: flex; flex-direction: column; }

/* ── Homepage section shared ── */
.hp-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}
.hp-section-alt {
  background: var(--panel);
}
.hp-section-head {
  text-align: center;
  margin-bottom: 3rem;
}
.hp-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.hp-title {
  font-family: var(--head);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 0.875rem;
  letter-spacing: -0.5px;
}
.hp-sub {
  font-size: 0.95rem;
  color: var(--text);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Features Grid ── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.4rem 1.25rem;
  transition: var(--t);
}
.feat-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.feat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  display: block;
}
.feat-name {
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.feat-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Steps Grid ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.step-card {
  text-align: center;
  padding: 1.5rem 1rem;
}
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 0 0 6px var(--accent-soft);
}
.step-title {
  font-family: var(--head);
  font-weight: 700;
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.step-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Download Section ── */
.hp-download-section {
  background: var(--panel);
}
.hp-download-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hp-download-text .hp-title { text-align: left; }
.hp-download-text .hp-sub   { text-align: left; margin: 0 0 2rem; }
/* Download section — button visibility split */
.hp-download-btns-mobile  { display: none; }
.hp-download-btns-desktop { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hp-download-visual {
  display: flex;
  justify-content: center;
}

/* ── Phone Mockup ── */
.phone-mock {
  width: 190px;
  background: var(--card);
  border: 2px solid var(--border2);
  border-radius: 28px;
  padding: 1.25rem 0.875rem;
  box-shadow: var(--shadow);
}
.phone-notch {
  width: 70px;
  height: 18px;
  background: var(--bg);
  border-radius: 0 0 12px 12px;
  margin: 0 auto 0.875rem;
  border: 2px solid var(--border2);
  border-top: none;
}
.phone-screen {
  background: var(--bg);
  border-radius: 12px;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ps-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--card2);
  width: 100%;
}
.ps-accent { background: var(--accent); width: 60%; }
.ps-mini-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font-size: 0.62rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ps-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ps-dot-orange { background: var(--accent); }
.ps-dot-green  { background: var(--green); }
.ps-dot-violet { background: var(--violet); }

/* ════════════════════════════════════════════════
   FILE VIEWER — FULLSCREEN FIX (Goal 3)
════════════════════════════════════════════════ */
.file-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9990;
  display: none;
  flex-direction: column;
}
.file-viewer-overlay.show { display: flex; }
.file-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 1rem;
  flex-wrap: wrap;
}
.file-viewer-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.file-viewer-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.fv-zoom-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-xs);
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--t);
  font-weight: 700;
}
.fv-zoom-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.fv-zoom-label {
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 36px;
  text-align: center;
}
.file-viewer-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #111;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
}
.fv-img-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 100%;
}
.fv-img-wrap img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.fv-pdf-wrap {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.fv-pdf-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--white);
  min-height: 300px;
}
.file-viewer-frame-wrap {
  width: 100%;
  height: 100%;
}
.file-viewer-frame {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 60px);
  border: none;
  display: block;
}

/* ════════════════════════════════════════════════
   NOTICE BOARD — Styles
════════════════════════════════════════════════ */
.notice-ticker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-glow);
  border-radius: var(--r-sm);
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.notice-ticker-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.notice-ticker-text {
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notice-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}
.notice-card:last-child { margin-bottom: 0; }
.notice-card:hover { border-color: var(--accent-glow); }
.notice-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.notice-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  flex: 1;
}
.notice-card-body {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 0.65rem;
  white-space: pre-wrap;
}
.notice-card-meta { font-size: 0.75rem; color: var(--muted); }
.notice-card-mini {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.notice-card-mini:last-child { border-bottom: none; }
.notice-mini-title { font-size: 0.85rem; font-weight: 600; color: var(--white); margin-bottom: 2px; }
.notice-mini-meta  { font-size: 0.72rem; color: var(--muted); }

/* ── Notice section top placement (student overview) ── */
.notices-highlight {
  margin-bottom: 1.25rem;
}

/* ════════════════════════════════════════════════
   SUBMISSION BADGES & ASSIGNMENT ROW
════════════════════════════════════════════════ */
.badge-green  { background: var(--green-s);  color: var(--green); border: 1px solid rgba(52,211,153,.3); }
.badge-rose   { background: var(--rose-s);   color: var(--rose);  border: 1px solid rgba(251,113,133,.3); }
.badge-amber  { background: var(--amber-s);  color: var(--amber); border: 1px solid rgba(251,191,36,.3); }

.asgn-row {
  padding: 0.875rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.asgn-row:last-child { margin-bottom: 0; }
.asgn-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.asgn-row-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Pending badge in sidebar ── */
.sb-item .sb-badge {
  margin-left: auto;
  background: var(--amber);
  color: #000;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
  display: none;
}

/* ── Alert warning ── */
.alert-warning {
  background: var(--amber-s);
  border-color: rgba(251,191,36,.35);
  color: #fcd34d;
}

/* ════════════════════════════════════════════════
   RESPONSIVE — Homepage New Sections
════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .feat-grid   { grid-template-columns: repeat(2, 1fr); }
  .steps-grid  { grid-template-columns: repeat(2, 1fr); }
  .hp-download-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }
  .hp-download-text    { order: 0; text-align: center; width: 100%; }
  .hp-download-text .hp-label { text-align: center; }
  .hp-download-text .hp-title { text-align: center !important; }
  .hp-download-text .hp-sub   { text-align: center !important; }
  .hp-download-visual  { order: 1; }
  .hp-download-btns-desktop { display: none !important; }
  .hp-download-btns-mobile  {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    order: 2;
    width: 100%;
  }
}
@media (max-width: 768px) {
  .hp-section { padding: 3.5rem 0; }
  .hp-section-head { margin-bottom: 2rem; }
  .hp-download-btns { flex-direction: column; align-items: center; }
  .notice-ticker { display: none; }
  .file-viewer-frame { min-height: calc(100vh - 56px); }
}
@media (max-width: 600px) {
  .feat-grid  { grid-template-columns: 1fr; gap: 0.75rem; }
  .steps-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .hp-title   { font-size: clamp(1.4rem, 6vw, 1.8rem); }
  .hp-sub     { font-size: 0.88rem; }
  .phone-mock { width: 160px; }
  .hp-download-inner { gap: 2rem; }
  .hero-app-strip { flex-direction: column; align-items: flex-start; }
  .asgn-row-top { flex-direction: column; }
}
@media (max-width: 480px) {
  .hp-section { padding: 2.5rem 0; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card  { padding: 1rem 0.5rem; }
  .feat-card  { padding: 1rem; }
  .file-viewer-header { padding: 0.6rem 0.875rem; }
  .fv-zoom-btn { width: 28px; height: 28px; font-size: 0.9rem; }
}

/* ── Submission Control Bar (faculty) ── */
.item-row-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: .5rem;
  overflow: hidden;
}
.item-row-wrap .item-row {
  border: none;
  margin: 0;
  border-radius: 0;
}
.sub-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .5rem .75rem;
  background: var(--panel);
  border-top: 1px solid var(--border);
  font-size: .8rem;
}
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  user-select: none;
}
.toggle-label input[type="checkbox"] { display: none; }
.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--border2);
  border-radius: 11px;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.25s;
}
.toggle-label input:checked + .toggle-track { background: var(--accent); }
.toggle-label input:checked + .toggle-track .toggle-thumb { left: 21px; }

/* ── btn-danger ── */
.btn-danger {
  background: transparent;
  color: var(--rose);
  border: 1px solid var(--rose);
}
.btn-danger:hover { background: var(--rose-s); }

/* ── badge-gray ── */
.badge-gray { background: var(--panel); color: var(--muted); border: 1px solid var(--border); }

/* ════════════════════════════════════════════════
   PROFILE SYSTEM
════════════════════════════════════════════════ */

/* ── Profile Avatar (photo) ── */
.profile-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  display: block;
}
.profile-av-initials {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--head);
  font-weight: 800;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--accent);
  flex-shrink: 0;
}
.profile-photo-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--t);
}
.profile-photo-btn:hover { background: var(--accent-dark, #d97706); }
.profile-photo-input { display: none; }

/* ── Profile Header Banner ── */
.profile-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.profile-banner-info { flex: 1; min-width: 0; }
.profile-name  { font-family: var(--head); font-weight: 800; font-size: 1.2rem; color: var(--white); margin-bottom: 0.2rem; }
.profile-email { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }

/* ── Profile Edit Form ── */
.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.profile-form-grid .form-group { margin: 0; }
.profile-form-full { grid-column: 1 / -1; }

/* ── Profile View Card ── */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.profile-modal-overlay.show { display: flex; }
.profile-modal-box {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}
.profile-modal-title { font-family: var(--head); font-weight: 700; font-size: 1rem; color: var(--white); }
.profile-modal-body  { padding: 1.25rem; }
.profile-modal-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.profile-modal-av {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-modal-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ── Detail List (for profile view) ── */
.profile-detail-list { display: flex; flex-direction: column; gap: 0; }
.profile-detail-row {
  display: flex;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.profile-detail-row:last-child { border-bottom: none; }
.profile-detail-key {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  min-width: 130px;
  flex-shrink: 0;
}
.profile-detail-val {
  font-size: 0.85rem;
  color: var(--white);
  word-break: break-word;
}
.profile-detail-val.empty-val { color: var(--muted); font-style: italic; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .profile-form-grid { grid-template-columns: 1fr; }
  .profile-banner { flex-direction: column; text-align: center; align-items: center; }
  .profile-modal-banner { flex-direction: column; text-align: center; align-items: center; }
  .profile-detail-key { min-width: 100px; font-size: 0.75rem; }
}
