/* =============================================
   MarutEdge ERP — Upgraded Master Design System
   File: /public/assets/css/erp.css
============================================= */

:root {
  --font-base: 'Inter', 'Noto Sans Gujarati', sans-serif;
  --font-gu: 'Noto Sans Gujarati', 'Inter', sans-serif;

  /* ── Midnight Blue Palette ── */
  --brand-primary:   #3b82f6;
  --brand-secondary: #6366f1;
  --brand-accent:    #22d3ee;
  --brand-success:   #10b981;
  --brand-warning:   #f59e0b;
  --brand-danger:    #ef4444;

  /* ── Sidebar ── */
  --sidebar-bg:      #252b36;
  --sidebar-text:    #ffffff;
  --sidebar-active:  #3b82f6;
  --sidebar-hover:   rgba(59,130,246,0.18);
  --sidebar-width:   260px;

  /* ── Body & Cards ── */
  --body-bg:         #c6c9d3;
  --card-bg:         #ffffff;
  --card-border:     #cbd1dd;
  --input-border:    #aab3c4;
  --muted-surface:   #eef1f6;
  --text-muted-c:    #5b6472;
  --text-main:       #0f172a;

  /* ── Topbar & Search ── */
  --topbar-bg:       #ffffff;
  --topbar-border:   #dbe1ea;
  --search-bg:       #eef1f6;
  --search-border:   #d3dae6;
  --search-text:     #0f172a;

  --erp-gu-bg:       #EEF2FF;
  --erp-gu-text:     #4338CA;

  --shadow-sm:       0 1px 2px rgba(16,24,40,.06), 0 2px 8px rgba(16,24,40,.07);
  --shadow-md:       0 8px 28px rgba(16,24,40,.14);
  --radius:          14px;
}

/* ── Dark Theme ── */
[data-bs-theme="dark"] {
  --body-bg:         #0d1117;
  --card-bg:         #161b22;
  --card-border:     #30363d;
  --input-border:    #454e5a;
  --muted-surface:   #1c2230;
  --text-muted-c:    #9aa4b2;
  --text-main:       #e6edf3;
  --sidebar-bg:      #1a1f2b;
  
  --topbar-bg:       #0d1117;
  --topbar-border:   #30363d;
  --search-bg:       #161b22;
  --search-border:   #30363d;
  --search-text:     #e6edf3;

  --erp-gu-bg:       #312E81;
  --erp-gu-text:     #A5B4FC;

  --shadow-sm:       0 1px 4px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md:       0 6px 28px rgba(0,0,0,.5);
}

/* =============================================
   2. BASE & RESET
============================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-base);
  background-color: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  transition: background-color .3s ease, color .3s ease;
}

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: #4338ca; }

/* =============================================
   3. SIDEBAR (With Collapse Fixes)
============================================= */
#sidebar {
  position: fixed;
  top: 64px; left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - 64px);
  background: var(--sidebar-bg);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

#sidebar.collapsed { transform: translateX(-100%); }

@media (max-width: 991.98px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.show { transform: translateX(0); }
}

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  text-decoration: none; min-height: 64px;
  white-space: nowrap; overflow: hidden; flex-shrink: 0;
  transition: all .3s ease;
}
.sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  background: var(--brand-primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.1rem; color: #fff;
}
.sidebar-brand .brand-name { font-size: .95rem; font-weight: 700; color: #fff; letter-spacing: .3px; }
.sidebar-brand .brand-name span { color: #a5b4fc; font-weight: 400; }

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.nav-category {
  font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,.3); padding: 14px 20px 6px; white-space: nowrap; overflow: hidden;
}

.sidebar-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  color: var(--sidebar-text); text-decoration: none; font-size: .875rem; font-weight: 500;
  border-radius: 8px; margin: 2px 10px; white-space: nowrap; overflow: hidden;
  transition: background .2s, color .2s; cursor: pointer;
}
.sidebar-link i { font-size: 1.05rem; flex-shrink: 0; text-align: center; width: 20px; }
.sidebar-link .link-text { flex: 1; }
.sidebar-link .badge-pill {
  background: rgba(79,70,229,.35); color: #a5b4fc; font-size: .65rem; padding: 2px 7px; border-radius: 20px; font-weight: 600;
}
.sidebar-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-link.active { background: var(--brand-primary); color: #fff; }
.sidebar-link.active i { color: #fff; }

.sidebar-footer {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center;
  gap: 10px; white-space: nowrap; overflow: hidden; flex-shrink: 0;
}
.sidebar-footer .user-info .name { font-size: .82rem; font-weight: 600; color: #fff; }
.sidebar-footer .user-info .role { font-size: .72rem; color: rgba(199,210,254,.6); }

/* --- CRITICAL BUG FIXES FOR COLLAPSED SIDEBAR --- */
#sidebar.collapsed .nav-category,
#sidebar.collapsed .sidebar-footer .user-info { display: none; }

/* Fix 1: Keep Brand Name and Logo visible but stacked */
#sidebar.collapsed .sidebar-brand { 
  flex-direction: column; 
  padding: 14px 4px; 
  gap: 6px; 
  justify-content: center; 
}
#sidebar.collapsed .sidebar-brand .brand-icon { 
  width: 30px; 
  height: 30px; 
  margin: 0 auto; 
  font-size: .95rem; 
}
#sidebar.collapsed .sidebar-brand .brand-name { 
  display: block; 
  font-size: .55rem; 
  white-space: normal; 
  text-align: center; 
  line-height: 1.1; 
}

/* Fix 2: Keep Icons visible and centered, hide link text */
#sidebar.collapsed .sidebar-link { 
  justify-content: center; 
  gap: 0; 
  margin: 2px 8px; 
  padding: 10px 0; 
}
#sidebar.collapsed .sidebar-link i { 
  display: block !important; 
  margin: 0 auto; 
  font-size: 1.1rem; 
}
#sidebar.collapsed .sidebar-link .link-text { 
  display: none; 
}
#sidebar.collapsed .sidebar-link .badge-pill { 
  display: none; 
}

/* =============================================
   4. MAIN LAYOUT WRAPPER & TOP NAVBAR
============================================= */
#mainWrapper {
  margin-left: var(--sidebar-width);
  padding-top: 64px;
  transition: margin-left .3s cubic-bezier(.4,0,.2,1);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
#mainWrapper.sidebar-collapsed { margin-left: 0; }
@media (max-width: 991.98px) { #mainWrapper { margin-left: 0 !important; } }

#topNavbar {
  position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 1050;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  height: 64px; display: flex; align-items: center;
  padding: 0 18px; gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: background .3s, border-color .3s;
}

.topbar-search { position: relative; flex: 1; max-width: 420px; }
.topbar-search input {
  width: 100%; background: var(--search-bg); border: 1px solid var(--search-border);
  color: var(--search-text); border-radius: 20px; padding: 8px 16px 8px 38px;
  font-size: 0.875rem; transition: all 0.25s ease;
}
.topbar-search input::placeholder { color: var(--text-muted-c); }
.topbar-search input:focus { outline: none; background: var(--card-bg); border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.topbar-search .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted-c); font-size: .95rem; pointer-events: none; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--card-border);
  background: var(--card-bg); color: var(--text-main);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s; position: relative;
}
.icon-btn:hover { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); transform: translateY(-1px); }
.icon-btn .notif-badge {
  position: absolute; top: 5px; right: 5px;
  width: 8px; height: 8px; background: var(--brand-danger);
  border-radius: 50%; border: 1.5px solid var(--topbar-bg);
}

.theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px; padding: 4px 6px;
  display: flex; align-items: center; gap: 4px;
  cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: background .3s, border-color .3s;
}
.theme-toggle .toggle-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; transition: background .2s, color .2s;
}
.theme-toggle .toggle-icon.active { background: var(--brand-primary); color: #fff; }

.user-avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 5px 10px 5px 5px;
  cursor: pointer; transition: border-color .2s;
}
.user-avatar-btn:hover { border-color: var(--brand-primary); }
.user-avatar-btn .uname { font-size: .8rem; font-weight: 600; color: var(--text-main); }
.user-avatar-btn .urole { font-size: .68rem; color: var(--text-muted-c); }

.dropdown-menu { background-color: var(--card-bg); border: 1px solid var(--card-border); }
.dropdown-item { color: var(--text-main); font-size: .85rem; }
.dropdown-item:hover, .dropdown-item:focus { background-color: var(--muted-surface); color: var(--brand-primary); }
.dropdown-divider { border-top-color: var(--card-border); }

/* =============================================
   5. MAIN CONTENT & TYPOGRAPHY
============================================= */
#mainContent { flex: 1; padding: 28px 28px 40px; max-width: 1400px; width: 100%; margin: 0 auto; }
.section-title { font-size: 1.35rem; font-weight: 800; color: var(--text-main); letter-spacing: -.3px; }
.text-muted-c { color: var(--text-muted-c) !important; }
.erp-breadcrumb .breadcrumb { font-size: .8rem; margin: 0; background: transparent; padding: 0; font-weight: 500;}
.erp-breadcrumb .breadcrumb-item a { color: var(--brand-primary); text-decoration: none; }
.erp-breadcrumb .breadcrumb-item.active { color: var(--text-muted-c); }
.text-gu { font-family: var(--font-gu) !important; }

/* =============================================
   6. CARDS & KPI
============================================= */
.erp-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: background .3s, border-color .3s, box-shadow .2s; margin-bottom: 24px;
}
.erp-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand-primary); }
.erp-card .card-head, .erp-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--card-border);
}
.erp-card .card-head h6, .erp-card-title {
  font-size: 1rem; font-weight: 700; color: var(--text-main); margin: 0;
}
.erp-card .card-body, .erp-card-body { padding: 20px; }
.erp-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.kpi-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px 22px; position: relative;
  display: flex; align-items: center; gap: 18px; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, background .3s, border-color .3s;
  overflow: hidden;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-primary); }
.kpi-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; border-radius: var(--radius) 0 0 var(--radius);
}
.kpi-students::before { background: #3b82f6; } .kpi-teachers::before { background: #0ea5e9; }
.kpi-attend::before   { background: #10b981; } .kpi-revenue::before  { background: #f59e0b; }

.kpi-card .kpi-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}
.kpi-students .kpi-icon { background: rgba(59,130,246,.12);  color: #3b82f6; }
.kpi-teachers .kpi-icon { background: rgba(14,165,233,.12);  color: #0ea5e9; }
.kpi-attend   .kpi-icon { background: rgba(16,185,129,.12);  color: #10b981; }
.kpi-revenue  .kpi-icon { background: rgba(245,158,11,.12);  color: #f59e0b; }

.kpi-card .kpi-body { flex: 1; min-width: 0; }
.kpi-card .kpi-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--text-muted-c); margin-bottom: 5px; }
.kpi-card .kpi-number { font-size: 1.85rem; font-weight: 800; color: var(--text-main); line-height: 1; letter-spacing: -1px; }

/* =============================================
   7. FORMS, INPUTS & BUTTONS
============================================= */
.btn-brand, .erp-btn, .erp-btn-primary {
  background: var(--brand-primary); color: #fff; border: none; border-radius: 10px; font-weight: 600; font-size: .875rem; padding: 9px 20px; transition: background .2s, transform .15s, box-shadow .2s; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn-brand:hover, .erp-btn:hover, .erp-btn-primary:hover { background: #4338ca; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.35); }

.btn-brand-outline, .erp-btn-outline {
  background: transparent; border: 1.5px solid var(--card-border); color: var(--text-main); border-radius: 10px; font-weight: 600; font-size: .875rem; padding: 9px 20px; transition: background .2s, border-color .2s, color .2s, transform .15s; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn-brand-outline:hover, .erp-btn-outline:hover { background: var(--muted-surface); border-color: var(--brand-primary); color: var(--brand-primary); transform: translateY(-1px); }

.btn-icon-sq { width: 38px; height: 38px; border-radius: 10px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

.erp-form-group { margin-bottom: 14px; }
.erp-label, .filter-label {
  display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted-c); margin-bottom: 6px;
}
.erp-label.gu { font-family: var(--font-gu); text-transform: none; font-size: .85rem; }
.erp-label .req { color: var(--brand-danger); margin-left: 3px; }

.erp-input, .erp-select, .erp-textarea {
  background: var(--card-bg); border: 1.5px solid var(--input-border); border-radius: 10px;
  padding: 10px 14px; font-size: .875rem; color: var(--text-main); width: 100%;
  transition: border-color .2s, box-shadow .2s, background .3s; font-family: var(--font-base);
}
.erp-input::placeholder { color: var(--text-muted-c); }
.erp-input:focus, .erp-select:focus, .erp-textarea:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); background: var(--card-bg); }
.erp-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}

.erp-input-group { position: relative; }
.erp-input-group .erp-input { padding-left: 38px; }
.erp-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted-c); font-size: .95rem; pointer-events: none; }
.erp-error-msg { font-size: .8rem; color: var(--brand-danger); margin-top: 4px; display: none; }
.erp-error-msg.show { display: block; }

/* =============================================
   8. TABLES & AVATARS
============================================= */
.erp-table { font-size: .855rem; color: var(--text-main); width: 100%; margin-bottom: 0; }
.erp-table thead th { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 14px 18px; white-space: nowrap; border-bottom: 2px solid var(--card-border); background: var(--muted-surface); color: var(--text-muted-c); }
.erp-table tbody td { padding: 14px 18px; vertical-align: middle; border-bottom: 1px solid var(--card-border); }
.erp-table tbody tr { transition: background .15s; }
.erp-table tbody tr:hover { background: rgba(79,70,229,.04); }

.avatar-sm {
  width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: var(--brand-primary);
  display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.avatar-xs {
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover; background: var(--brand-primary);
  display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: #fff; flex-shrink: 0;
}

.badge-active, .badge-success   { background: rgba(16,185,129,.12); color: #059669; font-weight: 600; padding: 4px 10px; border-radius: 20px; font-size: .75rem;}
.badge-pending, .badge-warning  { background: rgba(245,158,11,.12);  color: #d97706; font-weight: 600; padding: 4px 10px; border-radius: 20px; font-size: .75rem;}
.badge-inactive, .badge-danger { background: rgba(239,68,68,.12);   color: #dc2626; font-weight: 600; padding: 4px 10px; border-radius: 20px; font-size: .75rem;}
.badge-primary, .erp-badge     { background: rgba(59,130,246,.12); color: var(--brand-primary); font-weight: 600; padding: 4px 10px; border-radius: 20px; font-size: .75rem; display: inline-flex; align-items: center;}
.badge-gu { background: var(--erp-gu-bg); color: var(--erp-gu-text); font-family: var(--font-gu); font-weight: 600; padding: 4px 10px; border-radius: 20px; font-size: .75rem;}

[data-bs-theme="dark"] .badge-active, [data-bs-theme="dark"] .badge-success   { background: rgba(16,185,129,.2);  color: #6ee7b7; }
[data-bs-theme="dark"] .badge-pending, [data-bs-theme="dark"] .badge-warning  { background: rgba(245,158,11,.2);  color: #fcd34d; }
[data-bs-theme="dark"] .badge-inactive, [data-bs-theme="dark"] .badge-danger { background: rgba(239,68,68,.2);   color: #fca5a5; }

.action-btn {
  width: 32px; height: 32px; border-radius: 8px; background: transparent; border: 1px solid transparent;
  color: var(--text-muted-c); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: background .2s, color .2s, border-color .2s;
}
.action-btn:hover { background: var(--muted-surface); color: var(--brand-primary); border-color: var(--card-border); }

/* =============================================
   9. UTILITIES, TOASTS & OVERLAYS
============================================= */
#sidebarOverlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1039; }
#sidebarOverlay.show { display: block; }

.erp-empty { text-align: center; padding: 48px 20px; color: var(--text-muted-c); }
.erp-empty i { font-size: 42px; margin-bottom: 14px; display: block; opacity: 0.35; }
.erp-empty h4 { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.erp-empty p { font-size: .875rem; margin-bottom: 16px; }

#toastContainer { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.erp-toast {
  min-width: 300px; background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-md);
  display: flex; align-items: flex-start; gap: 12px; animation: slideInToast .3s ease; font-size: .875rem;
}
.erp-toast .toast-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 3px; flex-shrink: 0; }
.erp-toast .toast-title { font-weight: 700; font-size: .875rem; color: var(--text-main); }
.erp-toast .toast-msg   { font-size: .8rem; color: var(--text-muted-c); margin-top: 2px; }
.erp-toast .toast-close { margin-left: auto; cursor: pointer; color: var(--text-muted-c); background: none; border: none; font-size: 1rem; padding: 0; }
@keyframes slideInToast { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ── KPI / stat cards (erp-kpi-*) ── */
:root, [data-bs-theme="dark"] {
  --erp-primary: var(--brand-primary);
  --erp-success: var(--brand-success);
  --erp-warning: var(--brand-warning);
  --erp-danger:  var(--brand-danger);
  --erp-accent:  #0ea5e9;
}
.erp-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.erp-kpi {
  border: 1px solid var(--card-border); background: var(--card-bg);
  border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.erp-kpi-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted-c); margin-bottom: 6px; }
.erp-kpi-value { font-size: 1.9rem; font-weight: 800; color: var(--text-main); line-height: 1; letter-spacing: -1px; }
.erp-kpi-sub   { font-size: .76rem; color: var(--text-muted-c); margin-top: 6px; }

/* =============================================
   10. RESPONSIVE MEDIA QUERIES
============================================= */
@media (max-width: 992px) {
  .erp-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .erp-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  #mainContent { padding: 16px; }
  .erp-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .erp-card-grid { grid-template-columns: 1fr; }
  .erp-card .card-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 480px) {
  .erp-kpi-grid { grid-template-columns: 1fr; }
}
@media print {
  #sidebar, #topNavbar, .theme-toggle, .user-avatar-btn, .btn-brand, .erp-btn, .app-footer, .no-print { display: none !important; }
  #mainWrapper { margin-left: 0 !important; }
  body { background: white !important; color: black !important; }
  .erp-card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
}
/* =============================================
   Top-navbar brand (moved out of the sidebar)
============================================= */
.navbar-brand-top {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: 6px; white-space: nowrap;
}
.navbar-brand-top .brand-badge {
  width: 34px; height: 34px; background: var(--brand-primary);
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; flex-shrink: 0;
}
.navbar-brand-top .brand-txt { font-size: 1.02rem; font-weight: 800; color: var(--text-main); letter-spacing: .3px; }
.navbar-brand-top .brand-txt span { color: var(--brand-primary); font-weight: 500; }
@media (max-width: 480px) { .navbar-brand-top .brand-txt { display: none; } }

/* =============================================
   Teacher sidenav items (erp-nav-* -> themed like sidebar-link)
============================================= */
.erp-nav-section {
  font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,.32); padding: 14px 20px 6px; white-space: nowrap; overflow: hidden;
}
.erp-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  color: var(--sidebar-text); text-decoration: none; font-size: .875rem; font-weight: 500;
  border-radius: 8px; margin: 2px 10px; white-space: nowrap; overflow: hidden;
  transition: background .2s, color .2s;
}
.erp-nav-item i { font-size: 1.05rem; flex-shrink: 0; text-align: center; width: 20px; }
.erp-nav-item span { flex: 1; }
.erp-nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.erp-nav-item.active { background: var(--brand-primary); color: #fff; }
.erp-nav-item.active i { color: #fff; }
