/* ============================================================
   SJC ERP - Main Stylesheet
   St. Joseph's College (Autonomous), Tiruchirappalli
   ============================================================ */

/* ─── Google Fonts Import ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── CSS Variables ───────────────────────────────────────── */
:root {
  --primary:        #2563EB;
  --primary-dark:   #1E40AF;
  --primary-light:  #DBEAFE;
  --secondary:      #1E3A8A;
  --accent:         #F59E0B;
  --accent-light:   #FEF3C7;
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --danger:         #EF4444;
  --danger-light:   #FEE2E2;
  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --info:           #06B6D4;
  --info-light:     #CFFAFE;
  --purple:         #7C3AED;
  --purple-light:   #EDE9FE;

  --bg:             #F8FAFC;
  --bg-2:           #F1F5F9;
  --card-bg:        #FFFFFF;
  --sidebar-bg:     #0F172A;
  --sidebar-text:   rgba(255,255,255,0.75);
  --sidebar-active: rgba(255,255,255,0.12);
  --text:           #1E293B;
  --text-muted:     #64748B;
  --text-light:     #94A3B8;
  --border:         #E2E8F0;
  --border-2:       #CBD5E1;

  --radius-sm:      6px;
  --radius:         12px;
  --radius-lg:      18px;
  --radius-xl:      24px;

  --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:         0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md:      0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-lg:      0 20px 40px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.06);
  --shadow-card:    0 2px 12px rgba(37,99,235,0.07);

  --sidebar-w:      260px;
  --sidebar-w-col:  70px;
  --topbar-h:       64px;
  --transition:     0.25s ease;
  --font:           'Poppins', 'Inter', sans-serif;
}

/* Dark mode variables */
[data-theme="dark"] {
  --bg:             #0F172A;
  --bg-2:           #1E293B;
  --card-bg:        #1E293B;
  --text:           #F1F5F9;
  --text-muted:     #94A3B8;
  --text-light:     #64748B;
  --border:         #334155;
  --border-2:       #475569;
  --sidebar-bg:     #0B1120;
  --shadow-card:    0 2px 12px rgba(0,0,0,0.3);
}

/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

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

a { text-decoration: none; color: var(--primary); }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ─── Page Loader ─────────────────────────────────────────── */
#pageLoader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #1E3A8A 0%, #0F172A 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#pageLoader.hidden { opacity: 0; visibility: hidden; }
#pageLoader img { height: 75px; width: auto; filter: brightness(1.1); animation: loaderPulse 1.5s ease-in-out infinite; }
#pageLoader .loader-title { color: #FFF; font-size: 18px; font-weight: 700; letter-spacing: 0.5px; text-align: center; }
#pageLoader .loader-subtitle { color: rgba(255,255,255,0.6); font-size: 12px; text-align: center; margin-top: -12px; }
.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px;
  animation: loaderProgress 1.8s ease-in-out forwards;
}
@keyframes loaderPulse { 0%,100%{ transform: scale(1); opacity:1; } 50%{ transform: scale(1.05); opacity:0.9; } }
@keyframes loaderProgress { 0%{ width:0% } 80%{ width:90% } 100%{ width:100% } }

/* ─── Layout Wrapper ──────────────────────────────────────── */
.erp-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  transition: width var(--transition), transform var(--transition);
  z-index: 1000;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  min-height: var(--topbar-h);
  flex-shrink: 0;
}
.sidebar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.sidebar-brand-text { overflow: hidden; transition: opacity 0.2s ease; }
.sidebar-brand-text .brand-name { color: #FFF; font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.sidebar-brand-text .brand-sub  { color: var(--accent); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; white-space: nowrap; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.sidebar-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 14px; font-weight: 700;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-info .user-name { color: #FFF; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info .user-role { color: var(--accent); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  color: rgba(255,255,255,0.3);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 14px 10px 6px;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #FFF; }
.nav-item.active { background: var(--primary); color: #FFF; box-shadow: 0 4px 15px rgba(37,99,235,0.4); }
.nav-item.active .nav-icon { color: #FFF; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-label { font-size: 13px; font-weight: 500; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #FFF;
  font-size: 9px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}
.nav-item.active .nav-badge { background: rgba(255,255,255,0.3); }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar.collapsed {
  width: var(--sidebar-w-col);
}
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-section-label { opacity: 0; pointer-events: none; }
.sidebar.collapsed .sidebar-brand { justify-content: center; }
.sidebar.collapsed .sidebar-user { justify-content: center; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }

/* ─── Sidebar Overlay (mobile) ────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  backdrop-filter: blur(4px);
}
.sidebar-overlay.show { display: block; }

/* ─── Main Content ────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.main-content.expanded { margin-left: var(--sidebar-w-col); }

/* ─── Topbar ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition);
}

.topbar-toggle {
  width: 38px; height: 38px;
  border: none;
  background: var(--bg-2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.topbar-toggle:hover { background: var(--primary-light); color: var(--primary); }

.topbar-breadcrumb { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.topbar-breadcrumb .page-title { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-breadcrumb .bc-sep { color: var(--text-light); font-size: 12px; }
.topbar-breadcrumb .bc-item { font-size: 12px; color: var(--text-muted); }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 14px;
  min-width: 220px;
  transition: all 0.2s;
}
.topbar-search:focus-within { border-color: var(--primary); background: var(--card-bg); box-shadow: 0 0 0 3px var(--primary-light); }
.topbar-search i { color: var(--text-muted); font-size: 13px; }
.topbar-search input {
  border: none; background: none; outline: none;
  font-size: 13px; color: var(--text); width: 100%;
  font-family: var(--font);
}
.topbar-search input::placeholder { color: var(--text-light); }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-btn {
  width: 38px; height: 38px;
  border: none; background: var(--bg-2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
  font-size: 16px; position: relative;
  transition: all 0.2s;
}
.topbar-btn:hover { background: var(--primary-light); color: var(--primary); }
.topbar-btn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--danger); border-radius: 50%;
  border: 1.5px solid var(--card-bg);
}

.topbar-profile {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.topbar-profile:hover { background: var(--bg-2); }
.topbar-profile .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 13px; font-weight: 700;
  border: 2px solid var(--primary-light);
}
.topbar-profile .profile-info .pname { font-size: 12px; font-weight: 600; color: var(--text); }
.topbar-profile .profile-info .prole { font-size: 10px; color: var(--text-muted); }

/* ─── Page Body ───────────────────────────────────────────── */
.page-body {
  flex: 1;
  padding: 28px;
}

/* ─── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.page-header-left .ph-title { font-size: 22px; font-weight: 700; color: var(--text); }
.page-header-left .ph-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-header-right { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, transform 0.2s, background var(--transition);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-body { padding: 24px; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--border); background: var(--bg-2); }

/* Stat Cards */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.blue::before   { background: var(--primary); }
.stat-card.green::before  { background: var(--success); }
.stat-card.yellow::before { background: var(--accent); }
.stat-card.red::before    { background: var(--danger); }
.stat-card.purple::before { background: var(--purple); }
.stat-card.teal::before   { background: var(--info); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.blue   { background: var(--primary-light); color: var(--primary); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.yellow { background: var(--accent-light);  color: var(--accent); }
.stat-icon.red    { background: var(--danger-light);  color: var(--danger); }
.stat-icon.purple { background: var(--purple-light);  color: var(--purple); }
.stat-icon.teal   { background: var(--info-light);    color: var(--info); }

.stat-info .stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-info .stat-value { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat-info .stat-change { font-size: 11px; color: var(--success); font-weight: 500; margin-top: 2px; }
.stat-info .stat-change.down { color: var(--danger); }

/* ─── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-warning { background: var(--accent-light);  color: #92400E; }
.badge-info    { background: var(--info-light);    color: #0E7490; }
.badge-purple  { background: var(--purple-light);  color: var(--purple); }
.badge-dark    { background: var(--bg-2);           color: var(--text-muted); }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.btn-sm  { padding: 6px 14px; font-size: 12px; }
.btn-lg  { padding: 12px 24px; font-size: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; }

.btn-primary  { background: var(--primary); color: #FFF; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 15px rgba(37,99,235,0.3); }

.btn-outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #FFF; }

.btn-secondary { background: var(--bg-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }

.btn-success { background: var(--success); color: #FFF; border-color: var(--success); }
.btn-success:hover { background: #059669; transform: translateY(-1px); }

.btn-danger  { background: var(--danger); color: #FFF; border-color: var(--danger); }
.btn-danger:hover { background: #DC2626; transform: translateY(-1px); }

.btn-accent  { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-accent:hover { background: #D97706; }

/* ─── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-control {
  display: block; width: 100%;
  padding: 9px 14px;
  font-size: 14px; font-family: var(--font);
  color: var(--text); background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); background: var(--card-bg); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control:disabled { opacity: 0.6; cursor: not-allowed; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ─── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; }
.table th {
  background: var(--bg-2); color: var(--text-muted);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 13px 16px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg-2); }

/* ─── Progress Bars ───────────────────────────────────────── */
.progress { height: 7px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; transition: width 1s ease; }
.progress-bar.blue   { background: linear-gradient(90deg, var(--primary), #60A5FA); }
.progress-bar.green  { background: linear-gradient(90deg, var(--success), #34D399); }
.progress-bar.yellow { background: linear-gradient(90deg, var(--accent), #FCD34D); }
.progress-bar.red    { background: linear-gradient(90deg, var(--danger), #F87171); }

/* ─── Alerts ──────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius);
  font-size: 13px; border: 1px solid;
}
.alert-primary { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.alert-success { background: var(--success-light); border-color: var(--success); color: #065F46; }
.alert-danger  { background: var(--danger-light);  border-color: var(--danger);  color: #991B1B; }
.alert-warning { background: var(--accent-light);  border-color: var(--accent);  color: #92400E; }

/* ─── Modals ──────────────────────────────────────────────── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 2000;
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal-backdrop.show { display: flex; animation: fadeIn 0.2s ease; }
.modal-box {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 90%; max-width: 560px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: slideUp 0.3s ease;
  border: 1px solid var(--border);
}
.modal-box.modal-lg { max-width: 800px; }
.modal-box.modal-sm { max-width: 420px; }
.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h5 { font-size: 16px; font-weight: 700; }
.modal-close-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 18px; padding: 4px; border-radius: var(--radius-sm); transition: all 0.2s; }
.modal-close-btn:hover { background: var(--danger-light); color: var(--danger); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ─── Tabs ────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 4px;
  flex-wrap: wrap;
}
.tab-btn {
  flex: 1; padding: 8px 14px;
  font-size: 13px; font-weight: 600;
  border: none; background: none;
  border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-muted);
  font-family: var(--font);
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 100px; text-align: center;
}
.tab-btn.active { background: var(--card-bg); color: var(--primary); box-shadow: var(--shadow-sm); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

/* ─── Toast Notifications ─────────────────────────────────── */
#toastContainer {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  min-width: 280px; max-width: 380px;
  animation: toastIn 0.3s ease;
}
.toast.toast-out { animation: toastOut 0.3s ease forwards; }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.info    .toast-icon { color: var(--primary); }
.toast.warning .toast-icon { color: var(--accent); }
.toast-text { flex: 1; font-size: 13px; color: var(--text); }
.toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 15px; padding: 2px; }
@keyframes toastIn  { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100px); opacity: 0; } }

/* ─── Dropdown ────────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute;
  top: calc(100% + 8px); right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px; z-index: 500;
  animation: fadeIn 0.15s ease;
  overflow: hidden;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 13px; color: var(--text);
  cursor: pointer; transition: background 0.15s;
}
.dropdown-item:hover { background: var(--bg-2); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ─── Utility ─────────────────────────────────────────────── */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: var(--accent)  !important; }
.text-muted   { color: var(--text-muted) !important; }
.fw-bold  { font-weight: 700 !important; }
.fw-600   { font-weight: 600 !important; }
.text-sm  { font-size: 12px !important; }
.text-xs  { font-size: 11px !important; }
.text-lg  { font-size: 17px !important; }
.text-xl  { font-size: 22px !important; }
.d-flex   { display: flex !important; }
.d-none   { display: none !important; }
.gap-1    { gap: 6px !important; }
.gap-2    { gap: 10px !important; }
.gap-3    { gap: 16px !important; }
.align-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end  { justify-content: flex-end !important; }
.flex-wrap    { flex-wrap: wrap !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.p-0  { padding: 0 !important; }
.w-100 { width: 100% !important; }

/* Grid */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ─── Divider ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ─── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; color: var(--text-light); }
.empty-state h5 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ─── Keyframes ───────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
