/* ══════════════════════════════════════════════
   Edunexio Design System
   ══════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────── */
:root {
  --edu-primary:      #6366F1;
  --edu-primary-dk:   #4F46E5;
  --edu-primary-lt:   #EEF2FF;
  --edu-emerald:      #10B981;
  --edu-amber:        #F59E0B;
  --edu-red:          #EF4444;
  --edu-blue:         #3B82F6;
  --edu-teal:         #14B8A6;
  --edu-pink:         #EC4899;
  --edu-bg:           #F4F6FC;
  --edu-surface:      #FFFFFF;
  --edu-text:         #1E293B;
  --edu-muted:        #64748B;
  --edu-border:       #E2E8F0;
  --edu-border-lt:    #F1F5F9;
  --edu-sidebar:      #0F172A;
  --edu-sidebar-lt:   #1E293B;
  --edu-shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --edu-shadow:       0 4px 16px rgba(0,0,0,.08);
  --edu-shadow-lg:    0 10px 32px rgba(0,0,0,.14);
  --edu-r-sm:  6px;
  --edu-r:     10px;
  --edu-r-lg:  14px;
  --edu-r-xl:  20px;
}

/* ── Dark mode tokens ────────────────────────── */
[data-theme="dark"] {
  --edu-bg:        #0D1117;
  --edu-surface:   #161B22;
  --edu-text:      #E6EDF3;
  --edu-muted:     #8B949E;
  --edu-border:    #30363D;
  --edu-border-lt: #21262D;
  --edu-sidebar:   #010409;
  --edu-sidebar-lt:#0D1117;
  --edu-primary-lt:#1C1F3A;
  --edu-shadow-sm: 0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
  --edu-shadow:    0 4px 16px rgba(0,0,0,.4);
  --edu-shadow-lg: 0 10px 32px rgba(0,0,0,.5);
}

/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
:focus:not(:focus-visible) { outline: none; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--edu-bg);
  color: var(--edu-text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--edu-primary); text-decoration: none; }
a:hover { color: var(--edu-primary-dk); }

/* ── Buttons ──────────────────────────────────── */
.btn-edu {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-weight: 600; font-size: .82rem; padding: .45rem 1rem;
  border-radius: var(--edu-r-sm); border: 1.5px solid transparent;
  cursor: pointer; transition: all .16s; text-decoration: none;
  line-height: 1.4; white-space: nowrap; background: none;
}
.btn-edu:disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }
.btn-edu-sm { padding: .3rem .7rem; font-size: .78rem; }

.btn-edu-primary {
  background: var(--edu-primary); color: #fff; border-color: var(--edu-primary);
}
.btn-edu-primary:hover:not(:disabled) {
  background: var(--edu-primary-dk); border-color: var(--edu-primary-dk); color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.35); transform: translateY(-1px);
}

.btn-edu-outline {
  background: transparent; color: var(--edu-primary); border-color: var(--edu-border);
}
.btn-edu-outline:hover:not(:disabled) {
  background: var(--edu-primary-lt); border-color: var(--edu-primary); color: var(--edu-primary-dk);
}

.btn-edu-ghost {
  background: transparent; color: var(--edu-muted); border-color: var(--edu-border);
}
.btn-edu-ghost:hover:not(:disabled) {
  background: var(--edu-border-lt); color: var(--edu-text); border-color: #CBD5E1;
}

.btn-edu-success {
  background: var(--edu-emerald); color: #fff; border-color: var(--edu-emerald);
}
.btn-edu-success:hover:not(:disabled) {
  background: #059669; border-color: #059669; color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,.3);
}

.btn-edu-danger {
  background: var(--edu-red); color: #fff; border-color: var(--edu-red);
}
.btn-edu-danger:hover:not(:disabled) {
  background: #DC2626; border-color: #DC2626; color: #fff;
}

.btn-edu-action {
  width: 28px; height: 28px; padding: 0;
  background: transparent; border: 1.5px solid var(--edu-border);
  border-radius: var(--edu-r-sm); color: var(--edu-muted); font-size: .8rem;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-edu-action:hover { border-color: var(--edu-primary); color: var(--edu-primary); background: var(--edu-primary-lt); }
.btn-edu-action.del:hover  { border-color: var(--edu-red);   color: var(--edu-red);   background: #FEF2F2; }
.btn-edu-action.edit:hover { border-color: var(--edu-amber); color: var(--edu-amber); background: #FFFBEB; }
.btn-edu-action.view:hover { border-color: var(--edu-blue);  color: var(--edu-blue);  background: #EFF6FF; }

/* ── Cards ────────────────────────────────────── */
.edu-card {
  background: var(--edu-surface); border: 1px solid var(--edu-border);
  border-radius: var(--edu-r-lg); box-shadow: var(--edu-shadow-sm);
}
.edu-card-header {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--edu-border-lt);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  min-height: 52px;
}
.edu-card-title { font-size: .88rem; font-weight: 700; color: var(--edu-text); margin: 0; }
.edu-card-body  { padding: 1.25rem; }

/* ── Page header ──────────────────────────────── */
.edu-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem;
}
.edu-page-title    { font-size: 1.25rem; font-weight: 800; color: var(--edu-text); margin: 0 0 .15rem; line-height: 1.2; }
.edu-page-subtitle { font-size: .78rem; color: var(--edu-muted); margin: 0; }

/* ── Table ────────────────────────────────────── */
.table-edu {
  width: 100%; border-collapse: collapse; font-size: .83rem;
}
.table-edu thead th {
  background: #F8FAFF; border-bottom: 2px solid var(--edu-border);
  padding: .6rem 1rem; font-weight: 700; font-size: .71rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--edu-muted); white-space: nowrap;
}
.table-edu tbody tr {
  border-bottom: 1px solid var(--edu-border-lt); transition: background .1s;
}
.table-edu tbody tr:last-child { border-bottom: none; }
.table-edu tbody tr:hover { background: #FAFBFF; }
.table-edu td { padding: .75rem 1rem; vertical-align: middle; }

/* ── Badges ───────────────────────────────────── */
.edu-badge {
  display: inline-flex; align-items: center; padding: .18rem .6rem;
  border-radius: 99px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; line-height: 1.6;
}
.eb-success  { background: #DCFCE7; color: #15803D; }
.eb-danger   { background: #FEE2E2; color: #B91C1C; }
.eb-warning  { background: #FEF9C3; color: #A16207; }
.eb-info     { background: #DBEAFE; color: #1D4ED8; }
.eb-primary  { background: var(--edu-primary-lt); color: var(--edu-primary-dk); }
.eb-neutral  { background: #F1F5F9; color: #475569; }
.eb-teal     { background: #CCFBF1; color: #0F766E; }
.eb-pink     { background: #FCE7F3; color: #9D174D; }
.eb-amber    { background: #FEF3C7; color: #D97706; }

/* ── Stat cards ───────────────────────────────── */
.edu-stat {
  background: var(--edu-surface); border-radius: var(--edu-r-lg);
  padding: 1.4rem 1.5rem; box-shadow: var(--edu-shadow); border: 1px solid var(--edu-border);
  transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.edu-stat:hover { transform: translateY(-2px); box-shadow: var(--edu-shadow-lg); }
.edu-stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: .9rem;
}
.esi-violet  { background: #EEF2FF; color: var(--edu-primary); }
.esi-emerald { background: #D1FAE5; color: #059669; }
.esi-amber   { background: #FEF3C7; color: #D97706; }
.esi-blue    { background: #DBEAFE; color: #2563EB; }
.esi-pink    { background: #FCE7F3; color: #DB2777; }
.esi-teal    { background: #CCFBF1; color: #0D9488; }
.esi-red     { background: #FEE2E2; color: #DC2626; }
.edu-stat-label { font-size: .72rem; font-weight: 700; color: var(--edu-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3rem; }
.edu-stat-value { font-size: 1.9rem; font-weight: 800; color: var(--edu-text); line-height: 1; margin-bottom: .2rem; }
.edu-stat-sub   { font-size: .76rem; color: var(--edu-muted); }
.edu-stat-bg-icon {
  position: absolute; right: -10px; bottom: -10px;
  font-size: 5rem; opacity: .04; pointer-events: none; color: currentColor;
}

/* ── Welcome banner ───────────────────────────── */
.edu-welcome {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #818CF8 100%);
  border-radius: var(--edu-r-xl); padding: 2rem 2.5rem; color: white;
  position: relative; overflow: hidden; margin-bottom: 1.75rem;
}
.edu-welcome::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.08);
}
.edu-welcome::after {
  content: ''; position: absolute; bottom: -70px; right: 120px;
  width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.05);
}
.edu-welcome-title { font-size: 1.55rem; font-weight: 800; margin: 0 0 .3rem; position: relative; }
.edu-welcome-sub   { font-size: .88rem; opacity: .85; margin: 0; position: relative; }
.edu-welcome-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; position: relative; }
.btn-welcome {
  background: rgba(255,255,255,.18); color: white; border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--edu-r-sm); font-size: .81rem; font-weight: 600; padding: .4rem .9rem;
  transition: background .15s; display: inline-flex; align-items: center; gap: .35rem; text-decoration: none;
}
.btn-welcome:hover { background: rgba(255,255,255,.28); color: white; }

/* ── Modals ───────────────────────────────────── */
.edu-modal-bg {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px); z-index: 1050;
}
.edu-modal-wrap {
  position: fixed; inset: 0; z-index: 1055;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  pointer-events: none;
}
.edu-modal-wrap > * { pointer-events: all; }
.edu-modal-box {
  background: white; border-radius: var(--edu-r-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.2); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
}
.edu-modal-box.lg { max-width: 680px; }
.edu-modal-head {
  padding: 1.4rem 1.5rem 1rem; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--edu-border-lt);
}
.edu-modal-title { font-size: 1rem; font-weight: 800; margin: 0; }
.edu-modal-body  { padding: 1.25rem 1.5rem; }
.edu-modal-foot  {
  padding: 1rem 1.5rem; border-top: 1px solid var(--edu-border-lt);
  display: flex; justify-content: flex-end; gap: .5rem;
}

/* ── Empty / Loading ──────────────────────────── */
.edu-empty { text-align: center; padding: 3rem 1rem; color: var(--edu-muted); }
.edu-empty i { font-size: 2.5rem; display: block; margin-bottom: .75rem; opacity: .35; }
.edu-empty p { font-size: .85rem; margin: 0; }
.edu-loading { min-height: 220px; display: flex; align-items: center; justify-content: center; }

/* ── Avatar ───────────────────────────────────── */
.edu-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--edu-primary-lt); color: var(--edu-primary-dk);
  font-size: .72rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── Shell layout ─────────────────────────────── */
.edu-shell { display: flex; min-height: 100vh; }

.edu-sidebar {
  width: 240px; background: var(--edu-sidebar);
  display: flex; flex-direction: column; flex-shrink: 0;
  height: 100vh; overflow: hidden; position: fixed; left: 0; top: 0;
  z-index: 200; transition: transform .28s ease;
}
.edu-brand {
  display: flex; align-items: center; gap: .75rem; padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.edu-brand-icon {
  width: 36px; height: 36px; background: var(--edu-primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: white; flex-shrink: 0;
}
.edu-brand-name    { font-size: .95rem; font-weight: 800; color: white; line-height: 1.2; }
.edu-brand-tagline { font-size: .63rem; color: rgba(255,255,255,.38); }
.edu-nav {
  flex: 1;
  padding: .75rem .625rem;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.edu-nav::-webkit-scrollbar { width: 6px; }
.edu-nav::-webkit-scrollbar-track { background: transparent; }
.edu-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.2);
  border-radius: 3px;
}
.edu-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.35);
}
.edu-nav-label {
  font-size: .61rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.28); padding: .6rem .625rem .3rem; margin-top: .25rem;
}
.edu-nav-link {
  display: flex; align-items: center; gap: .75rem; padding: .56rem .75rem;
  border-radius: 8px; color: rgba(255,255,255,.58); text-decoration: none;
  font-size: .82rem; font-weight: 500; margin-bottom: 1px; transition: all .15s;
}
.edu-nav-link i { font-size: .95rem; width: 18px; text-align: center; flex-shrink: 0; }
.edu-nav-link:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.edu-nav-link.active {
  background: var(--edu-primary); color: white; font-weight: 600;
  box-shadow: 0 3px 10px rgba(99,102,241,.4);
}
.edu-sidebar-footer {
  padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: .6rem;
}
.edu-sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: white; font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.edu-sidebar-user      { flex: 1; min-width: 0; }
.edu-sidebar-user-name { font-size: .8rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.edu-sidebar-user-role { font-size: .66rem; color: rgba(255,255,255,.38); }
.btn-sidebar-logout {
  width: 28px; height: 28px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px; color: rgba(255,255,255,.6); display: flex; align-items: center;
  justify-content: center; font-size: .85rem; cursor: pointer; transition: all .15s; flex-shrink: 0; padding: 0;
}
.btn-sidebar-logout:hover { background: rgba(239,68,68,.25); border-color: rgba(239,68,68,.4); color: #FCA5A5; }

.edu-content {
  flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-width: 0; min-height: 100vh;
}
.edu-header {
  background: white; border-bottom: 1px solid var(--edu-border);
  padding: .75rem 1.5rem; display: flex; align-items: center; gap: 1rem;
  min-height: 56px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.edu-header-title { flex: 1; font-size: .9rem; font-weight: 700; color: var(--edu-text); margin: 0; }
.edu-main { flex: 1; padding: 1.5rem; }

.hamburger {
  background: none; border: 1px solid var(--edu-border); border-radius: 8px;
  font-size: 1.2rem; padding: .25rem .45rem; color: var(--edu-text); cursor: pointer; transition: background .12s;
}
.hamburger:hover { background: var(--edu-border-lt); }
.nav-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 190; backdrop-filter: blur(2px);
}

/* ── Forms ────────────────────────────────────── */
.form-control, .form-select {
  border-radius: var(--edu-r-sm); border-color: var(--edu-border); font-size: .84rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--edu-primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.form-label  { font-size: .79rem; font-weight: 600; margin-bottom: .3rem; }
.form-text   { font-size: .74rem; }
.input-group-text {
  background: #F8FAFF; border-color: var(--edu-border); color: var(--edu-muted); font-size: .84rem;
}

/* ── Pagination ───────────────────────────────── */
.edu-pagination {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: .5rem; padding: .85rem 1.25rem; border-top: 1px solid var(--edu-border-lt);
  font-size: .8rem; color: var(--edu-muted);
}
.edu-page-btns { display: flex; align-items: center; gap: .35rem; }
.edu-page-info { padding: .2rem .7rem; background: var(--edu-border-lt); border-radius: 6px; }

/* ── Misc ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--edu-border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #CBD5E1; }

.valid.modified:not([type=checkbox]) { outline: 1.5px solid var(--edu-emerald); border-radius: 4px; }
.invalid { outline: 1.5px solid var(--edu-red); border-radius: 4px; }
.validation-message { color: var(--edu-red); font-size: .75rem; margin-top: .2rem; }

.blazor-error-boundary {
  background: var(--edu-red); padding: 1rem 1rem 1rem 3rem; color: white;
  border-radius: var(--edu-r); margin: 1rem;
}
#blazor-error-ui { display: none; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 991.98px) {
  .edu-sidebar { transform: translateX(-100%); }
  .edu-sidebar.open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  .edu-content { margin-left: 0; }
  .edu-main { padding: 1rem; }
  .edu-welcome { padding: 1.5rem; }
  .edu-welcome-title { font-size: 1.25rem; }
}
@media (min-width: 992px) {
  .hamburger { display: none !important; }
  .nav-overlay { display: none !important; }
  .edu-sidebar { transform: none !important; }
}

/* ── Dark mode element overrides ─────────────── */
[data-theme="dark"] .edu-card           { background: var(--edu-surface); border-color: var(--edu-border); }
[data-theme="dark"] .edu-header         { background: var(--edu-surface); border-color: var(--edu-border); }
[data-theme="dark"] .edu-modal-box      { background: var(--edu-surface); }
[data-theme="dark"] .edu-modal-head,
[data-theme="dark"] .edu-modal-foot     { border-color: var(--edu-border); }
[data-theme="dark"] .edu-modal-title    { color: var(--edu-text); }
[data-theme="dark"] .edu-stat           { background: var(--edu-surface); border-color: var(--edu-border); }
[data-theme="dark"] .edu-stat-value     { color: var(--edu-text); }
[data-theme="dark"] .edu-notif-panel    { background: var(--edu-surface); border-color: var(--edu-border); }
[data-theme="dark"] .edu-notif-head     { border-color: var(--edu-border); }
[data-theme="dark"] .edu-notif-item     { border-color: var(--edu-border); }
[data-theme="dark"] .edu-notif-item:hover          { background: #1C2128; }
[data-theme="dark"] .edu-notif-item.unread         { background: #1C1F3A; }
[data-theme="dark"] .edu-notif-item.unread:hover   { background: #1E2147; }
[data-theme="dark"] .table-edu thead th { background: #1C2128; border-color: var(--edu-border); }
[data-theme="dark"] .table-edu tbody tr:hover       { background: #1C2128; }
[data-theme="dark"] .table-edu tbody tr             { border-color: var(--edu-border); }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select        { background: #0D1117; color: var(--edu-text); border-color: var(--edu-border); }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus  { background: #0D1117; color: var(--edu-text); }
[data-theme="dark"] .form-control::placeholder { color: var(--edu-muted); }
[data-theme="dark"] .input-group-text   { background: #1C2128; border-color: var(--edu-border); color: var(--edu-muted); }
[data-theme="dark"] .alert-danger       { background: #2D1B1B; border-color: #5F2020; color: #FCA5A5; }
[data-theme="dark"] .alert-warning      { background: #2D2100; border-color: #5F4100; color: #FCD34D; }
[data-theme="dark"] .msg-card:hover     { background: #1C2128; }
[data-theme="dark"] .msg-card.active    { background: #1C1F3A; }
[data-theme="dark"] .msg-bubble.inbound { background: #21262D; color: var(--edu-text); }
[data-theme="dark"] .eb-neutral         { background: #21262D; color: #8B949E; }
[data-theme="dark"] .btn-edu-ghost      { border-color: var(--edu-border); color: var(--edu-muted); }
[data-theme="dark"] .btn-edu-ghost:hover:not(:disabled) { background: #21262D; color: var(--edu-text); }
[data-theme="dark"] .btn-edu-outline    { border-color: var(--edu-border); color: #818CF8; }
[data-theme="dark"] .btn-edu-outline:hover:not(:disabled) { background: #1C1F3A; }
[data-theme="dark"] .btn-edu-action     { border-color: var(--edu-border); color: var(--edu-muted); }
[data-theme="dark"] .edu-page-info      { background: var(--edu-border); }
[data-theme="dark"] .dash-list-item     { border-color: var(--edu-border) !important; }
[data-theme="dark"] .dash-list-item:hover { background: #1C2128; }

/* ── Dashboard list items ─────────────────────── */
.dash-list-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.25rem; border-bottom: 1px solid var(--edu-border-lt);
  transition: background .12s;
}
.dash-list-item:last-child { border-bottom: none; }
.dash-list-item:hover { background: #FAFBFF; }
.dash-item-name { font-size: .84rem; }
.dash-item-sub  { font-size: .73rem; color: var(--edu-muted); }
.dash-item-amount { color: var(--edu-red); font-size: .84rem; white-space: nowrap; }

/* ── Welcome banner orbs ──────────────────────── */
.edu-welcome-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.edu-welcome-orb1 { width: 220px; height: 220px; background: rgba(255,255,255,.07); top: -60px; right: -40px; }
.edu-welcome-orb2 { width: 160px; height: 160px; background: rgba(255,255,255,.04); bottom: -60px; right: 140px; }

/* ── Dark mode toggle button ──────────────────── */
.dark-toggle {
  background: none; border: 1px solid var(--edu-border); border-radius: 50%;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  color: var(--edu-muted); cursor: pointer; font-size: .95rem; transition: all .15s;
}
.dark-toggle:hover { background: var(--edu-border-lt); color: var(--edu-primary); border-color: var(--edu-primary); }

/* ── Notification bell ────────────────────────── */
.edu-notif-wrap { position: relative; }
.edu-notif-btn {
  position: relative; background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--edu-muted); font-size: 1rem; transition: background .15s, color .15s;
}
.edu-notif-btn:hover { background: var(--edu-border-lt); color: var(--edu-primary); }
.edu-notif-badge {
  position: absolute; top: 1px; right: 1px;
  background: var(--edu-red); color: #fff;
  font-size: .6rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
  border: 2px solid #fff;
}
.edu-notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; background: #fff; border-radius: var(--edu-r);
  box-shadow: 0 8px 30px rgba(0,0,0,.12); border: 1px solid var(--edu-border-lt);
  z-index: 1000; overflow: hidden;
}
.edu-notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1rem; border-bottom: 1px solid var(--edu-border-lt);
  font-size: .85rem;
}
.btn-link-sm {
  background: none; border: none; cursor: pointer;
  color: var(--edu-primary); font-size: .75rem; font-weight: 500; padding: 0;
}
.btn-link-sm:hover { text-decoration: underline; }
.edu-notif-list { max-height: 360px; overflow-y: auto; }
.edu-notif-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; padding: 2rem 1rem;
  color: var(--edu-muted); font-size: .85rem;
}
.edu-notif-empty i { font-size: 1.5rem; }
.edu-notif-item {
  display: flex; gap: .75rem; padding: .85rem 1rem; cursor: pointer;
  transition: background .12s; border-bottom: 1px solid var(--edu-border-lt);
}
.edu-notif-item:last-child { border-bottom: none; }
.edu-notif-item:hover { background: #F8FAFC; }
.edu-notif-item.unread { background: #EEF2FF; }
.edu-notif-item.unread:hover { background: #E0E7FF; }
.edu-notif-icon {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
.ni-emerald { background: #D1FAE5; color: #059669; }
.ni-blue    { background: #DBEAFE; color: #2563EB; }
.ni-amber   { background: #FEF3C7; color: #D97706; }
.ni-violet  { background: #EDE9FE; color: #7C3AED; }
.ni-gray    { background: #F1F5F9; color: var(--edu-muted); }
.edu-notif-body { flex: 1; min-width: 0; }
.edu-notif-title { font-size: .82rem; font-weight: 600; color: var(--edu-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edu-notif-text  { font-size: .78rem; color: var(--edu-muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.edu-notif-time  { font-size: .72rem; color: #94A3B8; margin-top: 3px; }

/* ── Messages page ────────────────────────────── */
.msg-thread {
  display: flex; flex-direction: column; gap: .5rem;
  max-height: 420px; overflow-y: auto; padding: 1rem;
}
.msg-bubble {
  max-width: 72%; padding: .6rem .9rem; border-radius: 14px;
  font-size: .85rem; line-height: 1.5;
}
.msg-bubble.outbound {
  align-self: flex-end; background: var(--edu-primary); color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bubble.inbound {
  align-self: flex-start; background: #F1F5F9; color: var(--edu-dark);
  border-bottom-left-radius: 4px;
}
.msg-meta { font-size: .7rem; opacity: .7; margin-top: 3px; }
.msg-card {
  cursor: pointer; padding: .85rem 1rem; border-bottom: 1px solid var(--edu-border-lt);
  transition: background .12s;
}
.msg-card:hover { background: #F8FAFC; }
.msg-card.active { background: #EEF2FF; border-left: 3px solid var(--edu-primary); }
.msg-card.unread .msg-card-subject { font-weight: 700; }
.msg-card-subject { font-size: .85rem; color: var(--edu-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-card-preview { font-size: .78rem; color: var(--edu-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-card-time { font-size: .72rem; color: #94A3B8; }

/* ── Landing page ─────────────────────────────── */
.land-highlight {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}


/* ── Nav sub-links (Academic section) ───────────── */
.edu-nav-link.sub { padding-left: 2.5rem; font-size: .8rem; }

/* ── Report document (paper style) ──────────────── */
.rpt-paper-wrap {
  background: #dde3ea;
  padding: 2rem 1rem;
  border-radius: 10px;
}
.rpt-document {
  background: #fff;
  max-width: 780px;
  margin: 0 auto 2.5rem;
  padding: 2.5rem 3rem;
  border-top: 5px solid var(--edu-primary);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 32px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.07);
  font-size: .9rem;
  color: #1e293b;
  page-break-after: always;
}

/* Letterhead */
.rpt-letterhead {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.rpt-lh-logo {
  width: 52px; height: 52px; border-radius: 10px; flex-shrink: 0;
  background: var(--edu-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rpt-lh-name { font-size: 1.2rem; font-weight: 900; letter-spacing: .1em; color: #1e293b; line-height: 1.2; }
.rpt-lh-tag  { font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; color: #64748b; }
.rpt-lh-right { margin-left: auto; text-align: right; }
.rpt-lh-doc  { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--edu-primary); }
.rpt-lh-term { font-size: .8rem; color: #64748b; font-weight: 600; margin-top: 2px; }

/* Divider */
.rpt-rule { border: none; border-top: 1px solid #e2e8f0; margin: 1.1rem 0; }

/* Section */
.rpt-section { margin-bottom: .5rem; }
.rpt-section-label {
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em;
  color: var(--edu-primary); margin-bottom: .7rem; padding-bottom: .3rem;
  border-bottom: 2px solid #eef2ff;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

/* Student info grid */
.rpt-info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem 1.5rem;
}
.rpt-info-item { display: flex; flex-direction: column; gap: 1px; }
.rpt-info-lbl  { font-size: .63rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; }
.rpt-info-val  { font-size: .88rem; font-weight: 600; color: #1e293b; }

/* Subjects table */
.rpt-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.rpt-table th {
  background: var(--edu-primary); color: #fff; padding: .5rem .75rem;
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rpt-table th.tc, .rpt-table td.tc { text-align: center; }
.rpt-table tbody tr { border-bottom: 1px solid #f1f5f9; transition: background .1s; }
.rpt-table tbody tr:hover { background: #fafbff; }
.rpt-table td { padding: .5rem .75rem; vertical-align: middle; }
.rpt-table tfoot td {
  background: #f1f5f9; padding: .55rem .75rem;
  font-weight: 700; border-top: 2px solid #cbd5e1;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rpt-subj  { font-weight: 600; }
.rpt-muted { color: #94a3b8; }

/* Percentage badges */
.rpt-pct-badge {
  display: inline-block; padding: .2rem .55rem; border-radius: 20px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.pct-high { background: #dcfce7; color: #166534; }
.pct-mid  { background: #fef9c3; color: #854d0e; }
.pct-low  { background: #fee2e2; color: #991b1b; }

/* Grade badge */
.rpt-grade-badge {
  display: inline-block; padding: .2rem .5rem; border-radius: 4px;
  font-size: .75rem; font-weight: 700;
  background: #e0e7ff; color: #3730a3;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

/* Remarks */
.rpt-remarks-list { display: flex; flex-direction: column; gap: .55rem; }
.rpt-remark-row   { display: flex; gap: .5rem; font-size: .85rem; line-height: 1.55; padding: .35rem .5rem; background: #f8fafc; border-left: 3px solid var(--edu-primary); border-radius: 0 4px 4px 0; }
.rpt-remark-subj  { font-weight: 700; white-space: nowrap; color: #1e293b; min-width: 110px; }
.rpt-remark-text  { color: #475569; }

/* Summary boxes */
.rpt-summary-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.rpt-summary-box {
  flex: 1; min-width: 110px; text-align: center; padding: .9rem 1rem;
  border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rpt-sum-val   { font-size: 1.25rem; font-weight: 800; line-height: 1.2; color: #1e293b; }
.rpt-sum-lbl   { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; margin-top: .2rem; }
.rpt-pass      { color: #166534; }
.rpt-fail      { color: #991b1b; }

/* Signature */
.rpt-sigs { display: flex; gap: 2.5rem; justify-content: space-between; padding-top: .4rem; }
.rpt-sig  { flex: 1; }
.rpt-sig-line { border-bottom: 1.5px solid #64748b; height: 36px; margin-bottom: .4rem; }
.rpt-sig-lbl  { font-size: .68rem; color: #94a3b8; text-align: center; }

/* Document footer */
.rpt-footer {
  margin-top: 1.25rem; padding-top: .75rem; border-top: 1px solid #e2e8f0;
  display: flex; justify-content: space-between;
  font-size: .65rem; color: #94a3b8; letter-spacing: .02em;
}

/* ── Print overrides ─────────────────────────────── */
.print-only { display: none; }

@media print {
  .no-print  { display: none !important; }

  .edu-sidebar, .edu-header { display: none !important; }
  .edu-shell   { display: block !important; }
  .edu-content { margin: 0 !important; padding: 0 !important; width: 100% !important; }
  .edu-main    { padding: 0 !important; background: white !important; }
  body         { background: white !important; color: #000 !important; }

  .rpt-paper-wrap {
    background: white !important;
    padding: 0 !important;
  }
  .rpt-document {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 1.5cm 2cm !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border-top: 4px solid #6366f1 !important;
    page-break-after: always;
  }
  .rpt-table tbody tr:hover { background: none !important; }
  .rpt-remark-row { background: #f8f8f8 !important; }
  .rpt-summary-box { background: #f8f8f8 !important; border-color: #ccc !important; }
}

/* ── Session restore splash ──────────────────────── */
.edu-splash {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff; display: flex; align-items: center; justify-content: center;
}
[data-theme=dark] .edu-splash { background: #0f172a; }
.edu-splash-inner { text-align: center; }
.edu-splash-logo  {
  width: 72px; height: 72px; border-radius: 18px; margin: 0 auto .75rem;
  background: var(--edu-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.edu-splash-name    { font-size: 1.4rem; font-weight: 800; color: var(--edu-dark); letter-spacing: .06em; }
.edu-splash-spinner { width: 1.75rem; height: 1.75rem; margin-top: 1.25rem; }
