/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary:    #6366f1;
  --primary-dk: #4f46e5;
  --success:    #22c55e;
  --danger:     #ef4444;
  --warning:    #f59e0b;
  --info:       #3b82f6;
  --purple:     #8b5cf6;
  --dark:       #1e293b;
  --text:       #334155;
  --muted:      #64748b;
  --border:     #e2e8f0;
  --bg:         #f1f5f9;
  --white:      #ffffff;
  --sidebar-w:  260px;
  --topbar-h:   60px;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --trans:      all .25s ease;
}

html { font-size: 15px; overflow-x: hidden; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; min-width: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); }
img { max-width: 100%; height: auto; }

/* ── Auth Page ────────────────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); padding: 1rem; }
.auth-wrapper { width: 100%; max-width: 420px; }
.auth-card { background: var(--white); border-radius: var(--radius); padding: 1.75rem 1.25rem; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo i { font-size: 2.5rem; color: var(--primary); }
.auth-logo h1 { font-size: 1.6rem; color: var(--dark); }
.auth-logo p { color: var(--muted); font-size: .875rem; }

/* ── Dashboard Layout ────────────────────────────────────────────────────── */
.dashboard-page { display: flex; min-height: 100vh; overflow-x: hidden; }

/* Sidebar — hidden off-screen on mobile by default */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: var(--sidebar-w);
  background: var(--dark); color: #fff; display: flex; flex-direction: column;
  z-index: 1000; transition: transform .3s ease; overflow-y: auto; overflow-x: hidden;
  transform: translateX(-100%);
}
.sidebar.open { transform: translateX(0); }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 1.1rem; font-weight: 700; flex-shrink: 0; }
.sidebar-brand i { color: var(--primary); font-size: 1.4rem; }
.sidebar-nav { padding: .75rem 0; flex: 1; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem; color: rgba(255,255,255,.7); transition: var(--trans); font-size: .88rem; white-space: nowrap; overflow: hidden; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.08); color: #fff; border-left: 3px solid var(--primary); }
.nav-item i { width: 1.1rem; text-align: center; flex-shrink: 0; }

/* Sidebar overlay on mobile */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; }
.sidebar-overlay.show { display: block; }

/* Topbar */
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; width: 100%; }
.topbar { position: sticky; top: 0; height: var(--topbar-h); background: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; padding: 0 1rem; z-index: 100; box-shadow: var(--shadow); }
.sidebar-toggle { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: var(--muted); padding: .25rem; flex-shrink: 0; }
.topbar-title { flex: 1; font-weight: 600; color: var(--dark); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.topbar-user { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; overflow: hidden; max-width: 130px; }
.topbar-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-content { padding: 1rem; flex: 1; min-width: 0; overflow-x: hidden; }

/* Desktop sidebar always visible */
@media (min-width: 769px) {
  .sidebar { transform: translateX(0); position: fixed; }
  .main-wrapper { margin-left: var(--sidebar-w); }
  .sidebar-toggle { display: none; }
  .sidebar-overlay { display: none !important; }
  .main-content { padding: 1.5rem; }
  .topbar { padding: 0 1.5rem; }
  .auth-card { padding: 2.5rem 2rem; }
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; overflow: hidden; min-width: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: .5rem; }
.card-header h3 { font-size: .95rem; font-weight: 600; color: var(--dark); display: flex; align-items: center; gap: .5rem; }
.card-body { padding: 1rem; }
.card-body.p-0 { padding: 0; }

/* ── Stats Grid ──────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1rem; }
.stat-card { display: flex; align-items: center; gap: .75rem; padding: 1rem; border-radius: var(--radius); color: #fff; box-shadow: var(--shadow); min-width: 0; }
.stat-icon { font-size: 1.6rem; opacity: .9; flex-shrink: 0; }
.stat-info { min-width: 0; }
.stat-info h3 { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.stat-info p { font-size: .75rem; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-blue    { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-green   { background: linear-gradient(135deg, #22c55e, #15803d); }
.stat-orange  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-purple  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.stat-teal    { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.stat-indigo  { background: linear-gradient(135deg, #6366f1, #4338ca); }
.stat-emerald { background: linear-gradient(135deg, #10b981, #047857); }
.stat-rose    { background: linear-gradient(135deg, #f43f5e, #be123c); }
.stat-cyan    { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.stat-pink    { background: linear-gradient(135deg, #ec4899, #be185d); }
.stat-amber   { background: linear-gradient(135deg, #f59e0b, #b45309); }

@media (min-width: 480px)  { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 769px)  { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); } }

/* ── Dashboard grids ─────────────────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 769px) {
  .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); }
  .grid-2 { grid-template-columns: repeat(2,1fr); }
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 420px; }
.table th { background: var(--bg); color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .04em; padding: .65rem .75rem; text-align: left; white-space: nowrap; }
.table td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #f8fafc; }
.actions { white-space: nowrap; display: flex; gap: .3rem; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 8px; font-size: .85rem; font-weight: 500; border: none; cursor: pointer; transition: var(--trans); white-space: nowrap; touch-action: manipulation; }
.btn-primary  { background: var(--primary);  color: #fff; }
.btn-primary:hover  { background: var(--primary-dk); color: #fff; }
.btn-success  { background: var(--success);  color: #fff; }
.btn-success:hover  { background: #16a34a; color:#fff; }
.btn-danger   { background: var(--danger);   color: #fff; }
.btn-danger:hover   { background: #dc2626; color:#fff; }
.btn-info     { background: var(--info);     color: #fff; }
.btn-info:hover     { background: #2563eb; color:#fff; }
.btn-warning  { background: var(--warning);  color: #fff; }
.btn-warning:hover  { background: #d97706; color:#fff; }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover  { background: var(--bg); }
.btn-secondary { background: var(--muted); color: #fff; }
.btn-sm  { padding: .3rem .65rem; font-size: .78rem; }
.btn-xs  { padding: .18rem .45rem; font-size: .73rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .35rem; color: var(--dark); }
.form-control { width: 100%; padding: .55rem .85rem; border: 1.5px solid var(--border); border-radius: 8px; font-size: .875rem; color: var(--text); background: var(--white); transition: var(--trans); min-width: 0; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
textarea.form-control { resize: vertical; }
.form-grid   { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.form-grid-2 { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.form-actions { display: flex; gap: .75rem; padding-top: .5rem; flex-wrap: wrap; }
.form-row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .form-control { padding-left: 2.4rem; }
.toggle-pwd { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; }
.required { color: var(--danger); }
.checkbox-label { display: flex; align-items: center; gap: .4rem; font-size: .875rem; cursor: pointer; }
.filter-form { display: flex; gap: .75rem; flex-wrap: wrap; }
.filter-form .form-control { min-width: 0; flex: 1 1 140px; max-width: 100%; }
.section-title { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; border-bottom: 2px solid var(--border); padding-bottom: .4rem; margin-bottom: 1rem; }

@media (min-width: 600px) {
  .form-grid   { grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); }
  .form-grid-2 { grid-template-columns: repeat(2,1fr); }
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: .2rem .55rem; border-radius: 99px; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.badge-primary  { background: rgba(99,102,241,.12);  color: var(--primary); }
.badge-success  { background: rgba(34,197,94,.12);   color: #16a34a; }
.badge-danger   { background: rgba(239,68,68,.12);   color: #dc2626; }
.badge-warning  { background: rgba(245,158,11,.12);  color: #d97706; }
.badge-info     { background: rgba(59,130,246,.12);  color: #1d4ed8; }
.badge-purple   { background: rgba(139,92,246,.12);  color: #7c3aed; }
.badge-secondary{ background: rgba(100,116,139,.12); color: var(--muted); }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .875rem; }
.alert-success { background: rgba(34,197,94,.1);  color: #166534; border: 1px solid rgba(34,197,94,.3); }
.alert-danger  { background: rgba(239,68,68,.1);  color: #991b1b; border: 1px solid rgba(239,68,68,.3); }
.alert-info    { background: rgba(59,130,246,.1); color: #1e40af; border: 1px solid rgba(59,130,246,.3); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2000; padding: 0; align-items: flex-end; justify-content: center; }
.modal.open { display: flex; }
.modal-dialog { background: var(--white); border-radius: var(--radius) var(--radius) 0 0; width: 100%; max-width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: 0 -8px 40px rgba(0,0,0,.2); animation: slideUp .25s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--white); z-index: 1; }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-header button { background: none; border: none; font-size: 1.4rem; color: var(--muted); cursor: pointer; line-height: 1; padding: 0 .25rem; }
.modal-body   { padding: 1rem; }
.modal-footer { display: flex; gap: .75rem; padding: .875rem 1rem; border-top: 1px solid var(--border); flex-wrap: wrap; position: sticky; bottom: 0; background: var(--white); }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (min-width: 600px) {
  .modal { align-items: center; padding: 1rem; }
  .modal-dialog { border-radius: var(--radius); max-width: 560px; position: static; max-height: 90vh; }
  .modal-dialog.modal-sm { max-width: 380px; }
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; gap: .75rem; flex-wrap: wrap; }
.page-header h2 { font-size: 1.15rem; color: var(--dark); display: flex; align-items: center; gap: .5rem; }

/* ── Timetable ───────────────────────────────────────────────────────────── */
.timetable-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 600px)  { .timetable-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px)  { .timetable-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1200px) { .timetable-grid { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); } }
.timetable-day { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.timetable-day.today { border-top: 3px solid var(--primary); }
.day-header { background: var(--dark); color: #fff; padding: .6rem 1rem; font-weight: 600; font-size: .85rem; display: flex; align-items: center; justify-content: space-between; }
.today-badge { background: var(--primary); padding: .15rem .5rem; border-radius: 99px; font-size: .7rem; }
.timetable-slot { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.timetable-slot:last-child { border-bottom: 0; }
.slot-time { font-size: .75rem; color: var(--primary); font-weight: 600; }
.slot-course { font-weight: 600; font-size: .85rem; color: var(--dark); }
.slot-meta { font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.timetable-empty { padding: 1rem; text-align: center; color: var(--muted); font-size: .8rem; }

/* ── Attendance ──────────────────────────────────────────────────────────── */
.attendance-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 600px) { .attendance-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px) { .attendance-grid { grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); } }
.att-card { background: var(--white); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.att-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; flex-wrap: wrap; }
.att-code { font-weight: 700; color: var(--primary); }
.att-course { font-size: .875rem; }
.att-bar-wrap { background: var(--border); border-radius: 99px; height: 8px; margin: .5rem 0; overflow: hidden; }
.att-bar { height: 100%; background: var(--success); border-radius: 99px; transition: width .8s ease; }
.att-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem; }
.att-pct { font-size: 1.1rem; font-weight: 700; }
.att-controls { display: flex; gap: .5rem; flex-wrap: wrap; }
.att-radio { width: 18px; height: 18px; cursor: pointer; }
.mini-bar { background: var(--border); height: 6px; border-radius: 99px; width: 60px; display: inline-block; overflow: hidden; vertical-align: middle; }
.mini-bar-fill { height: 100%; border-radius: 99px; }
.bg-success { background: var(--success); }
.bg-danger  { background: var(--danger); }

/* ── Assignments ─────────────────────────────────────────────────────────── */
.assignments-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 600px) { .assignments-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px) { .assignments-grid { grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); } }
.assignment-card { background: var(--white); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); border-left: 4px solid var(--primary); min-width: 0; }
.assignment-card.overdue { border-left-color: var(--danger); }
.assignment-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; flex-wrap: wrap; gap: .25rem; }
.assignment-course { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.assignment-card h4 { font-size: .9rem; margin-bottom: .35rem; }
.assignment-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .75rem; font-size: .8rem; color: var(--muted); flex-wrap: wrap; gap: .4rem; }

/* ── Courses ─────────────────────────────────────────────────────────────── */
.courses-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 600px) { .courses-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px) { .courses-grid { grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); } }
.course-card { background: var(--white); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); min-width: 0; }
.course-card-header { display: flex; justify-content: space-between; margin-bottom: .5rem; flex-wrap: wrap; gap: .25rem; }
.course-code { font-weight: 700; color: var(--primary); }
.course-credits { font-size: .8rem; color: var(--muted); }
.course-card h4 { margin-bottom: .25rem; font-size: .9rem; }
.course-stats { font-size: .8rem; color: var(--muted); margin: .4rem 0 .75rem; }
.course-card-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.course-item { display: flex; align-items: center; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: .4rem; }
.course-item:last-child { border-bottom: 0; }
.course-info { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.course-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* ── Announcements ───────────────────────────────────────────────────────── */
.announce-card { background: var(--bg); border-radius: 8px; padding: .875rem; margin-bottom: .75rem; }
.announce-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; flex-wrap: wrap; }
.announce-item { padding: .75rem 0; border-bottom: 1px solid var(--border); }
.announce-item:last-child { border-bottom: 0; }

/* ── Events ──────────────────────────────────────────────────────────────── */
.event-item { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.event-item:last-child { border-bottom: 0; }
.event-date { background: var(--primary); color: #fff; padding: .3rem .55rem; border-radius: 6px; font-size: .73rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* ── Quick actions ───────────────────────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; }
@media (min-width: 480px) { .quick-actions { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 769px) { .quick-actions { grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); } }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .875rem .5rem; background: var(--bg); border-radius: 8px; color: var(--text); font-size: .78rem; font-weight: 500; transition: var(--trans); text-align: center; }
.quick-btn:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.quick-btn i { font-size: 1.2rem; }

/* ── GPA ─────────────────────────────────────────────────────────────────── */
.gpa-display { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.gpa-circle { width: 72px; height: 72px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-weight: 700; flex-shrink: 0; }
.gpa-circle span { font-size: 1.3rem; line-height: 1; }
.gpa-circle small { font-size: .65rem; opacity: .85; }
.gpa-good { background: linear-gradient(135deg, #22c55e, #15803d); }
.gpa-avg  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.gpa-poor { background: linear-gradient(135deg, #ef4444, #dc2626); }
.grade-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; font-weight: 700; font-size: .82rem; color: #fff; flex-shrink: 0; }
.grade-a { background: #22c55e; } .grade-b { background: #3b82f6; } .grade-c { background: #f59e0b; }
.grade-d { background: #f97316; } .grade-f { background: #ef4444; }

/* ── Transcript ──────────────────────────────────────────────────────────── */
.transcript-card { max-width: 900px; margin: 0 auto; }
.transcript-header { text-align: center; padding: 1.5rem 1rem; border-bottom: 2px solid var(--dark); }
.transcript-header h2 { font-size: 1.2rem; }
.student-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .875rem 1rem; background: var(--bg); font-size: .82rem; }
@media (min-width: 600px) { .student-info-grid { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); } }
.transcript-semester { padding: .875rem 1rem; border-bottom: 1px solid var(--border); }
.transcript-semester h4 { font-weight: 600; color: var(--primary); margin-bottom: .5rem; font-size: .9rem; }
.sem-gpa-row td { background: var(--bg); font-weight: 600; }
.transcript-footer { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1rem; flex-wrap: wrap; gap: 1rem; }
.cgpa-box { background: var(--dark); color: #fff; padding: .875rem 1.25rem; border-radius: 8px; text-align: center; }
.cgpa-box strong { display: block; font-size: 1.8rem; }
.transcript-sig { text-align: right; color: var(--muted); font-size: .875rem; }

/* ── Profile ─────────────────────────────────────────────────────────────── */
.avatar-xs { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); }
.avatar-placeholder { width: 88px; height: 88px; border-radius: 50%; background: var(--bg); border: 3px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); margin: 0 auto; }
.profile-detail { display: flex; align-items: flex-start; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .875rem; flex-wrap: wrap; }
.profile-detail:last-child { border-bottom: 0; }
.profile-detail i { color: var(--primary); width: 1.1rem; text-align: center; flex-shrink: 0; margin-top: .2rem; }

/* ── Nav group (admin submenu) ───────────────────────────────────────────── */
.nav-group-toggle { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1.25rem; color: rgba(255,255,255,.7); cursor: pointer; font-size: .88rem; transition: var(--trans); }
.nav-group-toggle > div { display: flex; align-items: center; gap: .75rem; }
.nav-group-toggle > div i { width: 1.1rem; text-align: center; }
.nav-group-toggle:hover, .nav-group-toggle.active { background: rgba(255,255,255,.08); color: #fff; border-left: 3px solid #800000; }
.nav-chevron { font-size: .7rem; transition: transform .25s ease; }
.nav-group.open .nav-chevron { transform: rotate(180deg); }
.nav-sub { display: none; background: rgba(0,0,0,.2); }
.nav-group.open .nav-sub { display: block; }
.nav-sub-item { display: flex; align-items: center; gap: .6rem; padding: .5rem 1.25rem .5rem 2.6rem; color: rgba(255,255,255,.6); font-size: .82rem; transition: var(--trans); }
.nav-sub-item i { font-size: .75rem; width: .9rem; }
.nav-sub-item:hover, .nav-sub-item.active { color: #fff; background: rgba(255,255,255,.06); }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--muted); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.small        { font-size: .8rem; }
.mb-1         { margin-bottom: .25rem; }
.mb-2         { margin-bottom: .5rem; }
.mb-3         { margin-bottom: 1rem; }
.mt-1         { margin-top: .25rem; }
.mt-2         { margin-top: .5rem; }
.mt-3         { margin-top: 1rem; }
.mt-4         { margin-top: 1.5rem; }
.p-3          { padding: 1rem; }
.w-100        { width: 100%; }
.d-flex       { display: flex; }
.gap-2        { gap: .5rem; }
.flex-wrap    { flex-wrap: wrap; }
.align-center { align-items: center; }
.link-muted   { color: var(--muted); font-size: .875rem; }
.link-muted:hover { color: var(--primary); }

/* ── Print ───────────────────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .btn, .filter-form, .card-header .btn, #pwa-banner { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  body { background: #fff; }
}
