/* ===== VUMCA LMS Theme ===== */
:root {
  --bg-dark: #0a0e17;
  --bg-card: #111827;
  --bg-elevated: #1a2332;
  --cyan: #00f0ff;
  --cyan-dim: #00f0ff40;
  --purple: #a855f7;
  --purple-dim: #a855f740;
  --green: #00ff88;
  --red: #ff5b6e;
  --yellow: #ffd166;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #1e3a5f;
  --glow-cyan: 0 0 20px #00f0ff60, 0 0 40px #00f0ff30;
  --glow-purple: 0 0 20px #a855f760;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  background: linear-gradient(135deg, var(--cyan), #0077ff);
  color: #001018;
}
.btn:hover { box-shadow: var(--glow-cyan); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--cyan); }
.btn-ghost:hover { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.btn-purple { background: linear-gradient(135deg, var(--purple), #6b21a8); color: #fff; }
.btn-purple:hover { box-shadow: var(--glow-purple); }
.btn-danger { background: linear-gradient(135deg, var(--red), #b91c1c); color: #fff; }
.btn-danger:hover { box-shadow: 0 0 20px #ff5b6e60; }
.btn-small { padding: 8px 14px; font-size: 10px; }
.btn-sm { padding: 6px 12px; font-size: 11px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
  pointer-events: none; z-index: 9999;
}
.grid-bg {
  position: fixed; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ===== Auth pages ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-shell { width: 100%; max-width: 420px; }
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 34px;
  box-shadow: var(--glow-purple);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 1px;
  color: var(--text); margin-bottom: 26px;
}
.brand .logo-icon { color: var(--cyan); text-shadow: var(--glow-cyan); font-size: 20px; }
.brand .accent { color: var(--cyan); }
.brand small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--text-muted); font-size: 11px; letter-spacing: 2px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-display); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-dim); }
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #4b5a74; }

.auth-info {
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--bg-elevated);
  font-size: 13px;
  color: var(--text-muted);
}
.auth-info strong { color: var(--cyan); font-family: var(--font-display); font-size: 10px; letter-spacing: 1px; }
.auth-info code { color: var(--purple); background: var(--bg-dark); padding: 1px 6px; border-radius: 3px; font-size: 12px; }

.alert {
  padding: 12px 14px; border-radius: 6px; margin-bottom: 16px;
  font-size: 14px; border: 1px solid transparent;
}
.alert-error { background: rgba(255, 91, 110, 0.12); border-color: var(--red); color: var(--red); }
.alert-success { background: rgba(0, 255, 136, 0.1); border-color: var(--green); color: var(--green); }
.hidden { display: none !important; }

.back-link { display: block; text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-muted); }
.back-link:hover { color: var(--cyan); }

/* ===== Dashboard layout ===== */
.dash {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 250px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar .side-brand { flex-shrink: 0; }
.sidebar .side-footer { flex-shrink: 0; }
.side-nav { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.sidebar .brand { margin-bottom: 22px; font-size: 14px; }
.side-brand { margin-bottom: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.side-brand .role-tag {
  display: inline-block; margin-top: 8px;
  font-family: var(--font-display); font-size: 9px; letter-spacing: 2px;
  padding: 4px 10px; border-radius: 20px;
  background: var(--purple-dim); color: var(--purple);
  border: 1px solid var(--purple);
}
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  background: transparent;
  width: 100%; text-align: left;
  font-family: var(--font-body);
}
.nav-item:hover { color: var(--text); background: var(--bg-elevated); }
.nav-item.active {
  color: var(--cyan);
  border-color: var(--border);
  background: var(--cyan-dim);
  box-shadow: inset 3px 0 0 var(--cyan);
}
.nav-item .nav-icon { width: 18px; text-align: center; }
.side-footer { margin-top: auto; }
.side-user {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  margin-bottom: 10px;
}
.side-user .su-name { font-weight: 600; font-size: 15px; }
.side-user .su-id { font-family: var(--font-display); font-size: 10px; letter-spacing: 1px; color: var(--cyan); }

.main {
  flex: 1;
  padding: 32px 36px;
  max-width: 1200px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px;
  flex-wrap: wrap; gap: 14px;
}
.topbar h1 {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  letter-spacing: 1px;
}
.topbar h1 .tag { display: block; font-family: var(--font-body); font-size: 12px; color: var(--cyan); letter-spacing: 3px; text-transform: uppercase; font-weight: 400; }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; right: -20px; top: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle, var(--cyan-dim), transparent 70%);
}
.stat-card .stat-num { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--cyan); text-shadow: var(--glow-cyan); }
.stat-card .stat-label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.stat-card.purple .stat-num { color: var(--purple); text-shadow: var(--glow-purple); }
.stat-card.green .stat-num { color: var(--green); text-shadow: 0 0 20px #00ff8860; }

/* Panels & cards */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 22px;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.panel-header h2 {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 1px;
  display: flex; align-items: center; gap: 10px;
}
.panel-header h2::before { content: '//'; color: var(--cyan); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  font-family: var(--font-display); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted);
  text-align: left; padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 12px; border-bottom: 1px solid #182439; vertical-align: middle; }
tbody tr:hover { background: rgba(0, 240, 255, 0.03); }
tbody tr:last-child td { border-bottom: none; }
td .muted { color: var(--text-muted); font-size: 13px; }
.table-actions { display: flex; gap: 8px; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.badge-cyan { background: var(--cyan-dim); color: var(--cyan); }
.badge-purple { background: var(--purple-dim); color: var(--purple); }
.badge-green { background: rgba(0, 255, 136, 0.12); color: var(--green); }
.badge-red { background: rgba(255, 91, 110, 0.12); color: var(--red); }
.badge-yellow { background: rgba(255, 209, 102, 0.12); color: var(--yellow); }

/* Course cards */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; gap: 10px;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--glow-cyan); }
.course-card .cc-top { display: flex; justify-content: space-between; align-items: center; }
.course-code { font-family: var(--font-display); font-size: 11px; color: var(--cyan); letter-spacing: 1px; }
.course-card h3 { font-size: 17px; font-weight: 600; }
.course-card p { font-size: 13px; color: var(--text-muted); flex: 1; }
.course-meta { display: flex; gap: 8px; flex-wrap: wrap; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(2, 6, 14, 0.82);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--glow-purple);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: var(--font-display); font-size: 15px; letter-spacing: 1px; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--red); }
.modal-body { padding: 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }

/* Quiz builder */
.qb-question {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--bg-elevated);
  position: relative;
}
.qb-question .qb-head { display: flex; gap: 10px; margin-bottom: 10px; }
.qb-question input[type="text"] { flex: 1; }
.opt-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.opt-row input { flex: 1; }
.opt-row select { width: 46px; }
.qb-remove { color: var(--red); background: none; border: none; cursor: pointer; font-size: 16px; }

/* Quiz taking */
.quiz-question {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
  background: var(--bg-elevated);
}
.quiz-question .qq-text { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.qq-options { display: flex; flex-direction: column; gap: 8px; }
.qq-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}
.qq-option:hover { border-color: var(--cyan); background: var(--cyan-dim); }
.qq-option input { accent-color: var(--cyan); }
.qq-option.selected { border-color: var(--purple); background: var(--purple-dim); }

/* Exam result review */
.review-correct { border-color: rgba(46, 213, 115, 0.45); }
.review-wrong { border-color: rgba(255, 71, 87, 0.4); }
.qq-option.review-answer { border-color: var(--green); background: rgba(46, 213, 115, 0.12); }
.qq-option.review-chosen { border-color: var(--red); background: rgba(255, 71, 87, 0.12); }
.result-hero .badge { font-size: 13px; padding: 5px 12px; }

/* Progress bars */
.progress { height: 8px; background: var(--bg-elevated); border-radius: 10px; overflow: hidden; min-width: 100px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--purple)); border-radius: 10px; }

/* Photo preview + ID card photo image */
.photo-preview { width: 64px; height: 72px; border: 2px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); color: var(--text-dim); font-size: 22px; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.photo-preview img, .id-photo-img { width: 100%; height: 100%; object-fit: cover; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; }

.btn-xs { padding: 2px 8px; font-size: 11px; }

/* Discussion / Q&A board */
.disc-post { border: 1px solid var(--border); border-left: 3px solid var(--purple); border-radius: 8px; padding: 12px; margin-bottom: 10px; background: var(--panel-bg); }
.disc-post.disc-reply { border-left-color: var(--cyan); margin-top: 8px; background: var(--bg-elevated); }
.disc-replies { margin: 10px 0 0 18px; padding-left: 10px; border-left: 2px solid var(--border); }
.disc-head { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.disc-body { font-size: 14px; line-height: 1.5; margin-bottom: 8px; white-space: pre-wrap; }
.disc-foot { display: flex; gap: 8px; }

/* Timetable week grid */
.timetable-grid { border-collapse: collapse; width: 100%; min-width: 760px; }
.timetable-grid th, .timetable-grid td { border: 1px solid var(--border); padding: 10px; text-align: left; vertical-align: top; }
.timetable-grid th { background: var(--bg-elevated); font-size: 12px; letter-spacing: 0.5px; }
.timetable-grid .tt-time-col { width: 90px; font-size: 13px; }
.tt-cell { background: var(--cyan-dim); border: 1px solid var(--cyan); border-radius: 6px; padding: 8px; margin-bottom: 6px; }
.tt-cell .tt-subject { font-weight: 700; font-size: 13px; }
.tt-cell .tt-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* Markbook */
.markbook-table { border-collapse: collapse; width: 100%; min-width: 900px; }
.markbook-table th, .markbook-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.markbook-table th { background: var(--bg-elevated); font-size: 12px; white-space: nowrap; }
.markbook-table th .muted { font-weight: 400; font-size: 11px; }

/* Attendance grid */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.att-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.att-card .att-name { font-weight: 600; font-size: 14px; }
.att-card .att-meta { font-size: 12px; color: var(--text-muted); margin: 4px 0 10px; }
.att-actions { display: flex; gap: 6px; }
.att-btn {
  flex: 1; padding: 6px; font-size: 11px; font-weight: 600;
  border-radius: 5px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted);
  transition: all 0.2s;
}
.att-btn.active-present { background: rgba(0,255,136,0.15); border-color: var(--green); color: var(--green); }
.att-btn.active-late { background: rgba(255,209,102,0.15); border-color: var(--yellow); color: var(--yellow); }
.att-btn.active-absent { background: rgba(255,91,110,0.15); border-color: var(--red); color: var(--red); }

/* Tabs */
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab-btn {
  padding: 10px 18px; background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--cyan); border-bottom-color: var(--cyan); text-shadow: var(--glow-cyan); }

.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--text-muted); font-size: 15px;
}
.empty-state .es-icon { font-size: 40px; color: var(--border); display: block; margin-bottom: 10px; }

/* Toast */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  padding: 14px 20px; border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--glow-cyan);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 320px;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.error { border-color: var(--red); color: var(--red); box-shadow: 0 0 20px #ff5b6e40; }

/* Mobile */
.menu-btn {
  display: none;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border); color: var(--cyan);
  border-radius: 6px; padding: 8px 12px; font-size: 18px; cursor: pointer;
  line-height: 1;
}
.side-backdrop {
  position: fixed; inset: 0; z-index: 1040;
  background: rgba(2, 6, 14, 0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.dash.sidebar-open .side-backdrop { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .dash { flex-direction: row; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; max-width: 85vw;
    z-index: 1100;
    height: 100vh;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: none;
    padding: 20px 18px;
  }
  .dash.sidebar-open .sidebar { transform: translateX(0); box-shadow: 0 0 50px rgba(0, 240, 255, 0.18); }
  .side-footer { display: block; }
  .side-footer .btn { width: 100%; }
  .main { padding: 16px 14px 72px; }
  .topbar { gap: 10px; margin-bottom: 20px; }
  .topbar h1 { flex: 1 1 100%; font-size: 17px; }
  .topbar h1 .tag { font-size: 11px; }
  .topbar .field { margin-bottom: 0 !important; width: 100%; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-num { font-size: 22px; }
  .panel { padding: 16px; }
  .panel-header { margin-bottom: 14px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  table { font-size: 13px; }
  .form-grid { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: 1fr; gap: 12px; }
  .att-grid { grid-template-columns: 1fr; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: none; width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .modal-header { padding: 16px 18px; }
  .modal-body { padding: 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .btn { padding: 12px 16px; }
  .tab-bar { -webkit-overflow-scrolling: touch; }
  #toast { left: 16px; right: 16px; bottom: 16px; max-width: none; text-align: center; }
  .chart-grid { grid-template-columns: 1fr; }
  .bar-val { display: none; }
  .sheet-foot { flex-direction: column; align-items: flex-start; gap: 14px; }
  .id-row { flex-direction: column; }
  .rc-course-head { flex-direction: column; gap: 4px; }
  .topbar h1 { padding-left: 8px; }
  .topbar-tools { width: 100%; display: flex; align-items: flex-end; gap: 10px; }
  .topbar-tools .field { flex: 1; }
}

@media (max-width: 480px) {
  .auth-card { padding: 26px 20px; }
  .auth-page { padding: 20px 12px; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .stat-card .stat-num { font-size: 19px; }
  .table-actions { flex-wrap: wrap; }
  .adm-card { padding: 22px 16px; }
}

/* Receipt & certificate — A4 printable sheet */
.print-sheet {
  background: #fff;
  color: #111;
  padding: 22px;
  border-radius: 8px;
}
.sheet-head { text-align: center; padding-bottom: 10px; }
.sheet-brand { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: 1px; color: #0b1030; }
.sheet-accent { color: #0e7490; }
.sheet-org { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #555; margin-top: 2px; }
.sheet-addr { font-size: 11px; color: #666; margin-top: 2px; }
.sheet-rule { border-bottom: 3px double #0b1030; margin: 12px 0; }
.sheet-doctitle { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: 3px; color: #0b1030; margin-top: 4px; }
.sheet-docno { font-size: 11px; color: #444; margin-top: 4px; }
.sheet-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.sheet-table th, .sheet-table td { border: 1px solid #bbb; padding: 8px 10px; font-size: 12px; text-align: left; }
.sheet-table th { background: #f0f0f0; color: #222; width: 34%; font-weight: 600; }
.sheet-table td { color: #111; }
.sheet-amount { font-size: 16px; font-weight: 700; color: #0e7490; }
.sheet-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 26px; }
.sheet-sign { font-size: 12px; color: #333; border-top: 1px solid #555; padding-top: 6px; min-width: 160px; }
.sheet-note { font-size: 10px; color: #777; text-align: right; line-height: 1.5; }
.sheet-muted { color: #666; font-weight: 400; }
.sheet-certframe { border: 3px double #0b1030; border-radius: 6px; padding: 16px; margin-top: 8px; }
.sheet-certbody { text-align: center; padding: 28px 10px; }
.sheet-certsub { color: #444; font-size: 13px; margin: 6px 0; }
.sheet-certname { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin: 16px 0; color: #0b1030; text-transform: uppercase; letter-spacing: 3px; border-bottom: 2px solid #0b1030; display: inline-block; padding: 0 24px 6px; }
.sheet-certcourse { font-size: 16px; font-weight: 700; color: #0e7490; margin: 8px 0; }

.notify-form .form-grid select[multiple] { min-height: 130px; }

/* Dashboard charts */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.chart-card { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.chart-card h3 { font-family: var(--font-display); font-size: 13px; letter-spacing: 2px; color: var(--cyan); margin-bottom: 12px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 0 4px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar { width: 100%; max-width: 46px; background: linear-gradient(180deg, var(--purple), var(--cyan)); border-radius: 4px 4px 0 0; min-height: 3px; transition: height .3s; }
.bar-lbl { font-size: 10px; color: var(--text-muted); margin-top: 6px; white-space: nowrap; }
.bar-val { font-size: 10px; color: var(--cyan); margin-bottom: 4px; }
.donut-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.legend { font-size: 12px; color: var(--text-muted); margin: 4px 0; }
.legend b { color: var(--text); }

/* Notice cards */
.notice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.notice-card { background: var(--panel-bg); border: 1px solid var(--border); border-left: 3px solid var(--cyan); border-radius: 8px; padding: 14px; }
.notice-card h3 { font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; color: var(--cyan); margin-bottom: 6px; }
.notice-card .nc-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.notice-card .nc-body { font-size: 13px; color: var(--text); line-height: 1.5; white-space: pre-wrap; }
.notice-card .nc-actions { margin-top: 10px; display: flex; gap: 8px; }

/* Student / parent portals */
.notice-list { display: flex; flex-direction: column; gap: 12px; }
.notice-item { background: var(--panel-bg); border: 1px solid var(--border); border-left: 3px solid var(--purple); border-radius: 8px; padding: 14px; }
.notice-item h3 { font-family: var(--font-display); font-size: 14px; color: var(--purple); margin-bottom: 4px; }
.notice-item .ni-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.notice-item .ni-body { font-size: 13px; color: var(--text); line-height: 1.6; white-space: pre-wrap; }

/* Public admission page */
.adm-body { background: radial-gradient(1200px 600px at 50% -10%, #160b3d, #06060f 60%); min-height: 100vh; padding: 40px 16px; }
.adm-card { max-width: 560px; margin: 0 auto; background: rgba(13, 18, 44, 0.85); border: 1px solid var(--border); border-radius: 12px; padding: 28px; box-shadow: 0 0 40px rgba(120, 80, 255, 0.15); }
.adm-card .brand { text-align: center; margin-bottom: 6px; }
.adm-card .adm-sub { text-align: center; font-size: 12px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; }

/* ID card sheet */
.id-card { background: #fff; color: #111; border-radius: 10px; padding: 18px; max-width: 620px; margin: 0 auto; border: 2px solid #0b1030; }
.id-top { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #0e7490; padding-bottom: 10px; margin-bottom: 12px; }
.id-brand { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: #0b1030; letter-spacing: 1px; }
.id-brand .accent { color: #0e7490; }
.id-photo { width: 74px; height: 84px; border: 1px solid #999; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: #f2f4f8; color: #666; font-size: 26px; font-weight: 700; }
.id-name { font-size: 18px; font-weight: 700; color: #0b1030; margin-bottom: 2px; }
.id-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.id-facts { flex: 1; }
.id-fact { font-size: 12px; color: #333; padding: 3px 0; border-bottom: 1px dotted #ccc; }
.id-fact b { color: #0b1030; }
.id-tag { display: inline-block; background: #0b1030; color: #fff; font-size: 10px; letter-spacing: 2px; padding: 4px 10px; border-radius: 3px; margin-top: 8px; }
.id-foot { margin-top: 12px; display: flex; justify-content: space-between; font-size: 10px; color: #666; border-top: 1px dashed #bbb; padding-top: 8px; }

/* Report card sheet */
.rc-wrap { font-size: 12px; }
.rc-student { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 2px; }
.rc-student h2 { font-family: var(--font-display); font-size: 18px; color: #0b1030; }
.rc-course { border: 1px solid #ccc; border-radius: 6px; margin: 10px 0; overflow: hidden; }
.rc-course-head { background: #0b1030; color: #fff; padding: 8px 12px; font-weight: 700; display: flex; justify-content: space-between; }
.rc-course-head .rc-grade { color: #7ef0d0; }
.rc-course table { width: 100%; border-collapse: collapse; }
.rc-course th, .rc-course td { border: 1px solid #ddd; padding: 6px 8px; font-size: 11px; text-align: left; }
.rc-course th { background: #f0f0f0; color: #222; }
.rc-overall { display: flex; gap: 14px; justify-content: space-around; background: #eef5ff; border: 1px solid #cfe0f5; border-radius: 6px; padding: 10px; margin-top: 8px; font-weight: 700; color: #0b1030; }

@page { size: A4; margin: 10mm; }

@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .scanlines, .grid-bg, .sidebar, .side-nav, .side-brand, .side-footer,
  .topbar, .modal-close, .modal-header, .modal-actions, .toast { display: none !important; }
  .dash { display: block; }
  .main { padding: 0; margin: 0; }
  .modal-overlay { position: static; padding: 0; background: #fff !important; display: block; }
  .modal { max-width: none; width: 100%; max-height: none; overflow: visible; box-shadow: none; border: none; border-radius: 0; }
  .modal-body { padding: 0; }
  body * { visibility: hidden; }
  .print-sheet, .print-sheet * { visibility: visible; }
  .print-sheet { position: absolute; left: 0; top: 0; width: 100%; border: none; box-shadow: none; border-radius: 0; padding: 0 4mm; }
}
