/* ===== CSS VARIABLES ===== */
:root {
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Dark Theme */
  --bg-base: #080c14;
  --bg-surface: #0d1220;
  --bg-card: #111827;
  --bg-card-hover: #161f30;
  --bg-input: #1a2235;
  --sidebar-bg: #0a0f1e;
  --sidebar-border: rgba(99,179,237,0.08);
  --navbar-bg: rgba(8,12,20,0.85);

  --text-primary: #f0f4ff;
  --text-secondary: #8899bb;
  --text-muted: #4a5875;
  --text-accent: #63b3ed;

  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;

  --border-subtle: rgba(255,255,255,0.06);
  --border-card: rgba(255,255,255,0.08);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(59,130,246,0.15);

  --sidebar-width: 260px;
  --sidebar-collapsed: 68px;
  --navbar-height: 64px;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-base: #f0f4f8;
  --bg-surface: #e8edf5;
  --bg-card: #ffffff;
  --bg-card-hover: #f7faff;
  --bg-input: #f1f5fb;
  --sidebar-bg: #0f172a;
  --sidebar-border: rgba(255,255,255,0.07);
  --navbar-bg: rgba(240,244,248,0.95);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-accent: #3b82f6;

  --border-subtle: rgba(0,0,0,0.06);
  --border-card: rgba(0,0,0,0.08);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 30px rgba(59,130,246,0.1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ===== LOADER ===== */
#page-loader {
  position: fixed; inset: 0;
  background: var(--bg-base);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 4px;
}
.loader-logo .logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: white;
  box-shadow: 0 0 30px rgba(59,130,246,0.4);
}
.loader-logo span {
  font-size: 26px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.loader-bar {
  width: 200px; height: 3px;
  background: var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 10px;
  animation: loaderFill 1.8s ease-in-out forwards;
}
@keyframes loaderFill { from { width: 0 } to { width: 100% } }
@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.9; }
}

/* ===== SIDEBAR ===== */
#sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: #0a0f1e;
  border-right: 1px solid rgba(99,179,237,0.08);
  z-index: 100;
  display: flex; flex-direction: column;
  transition: width 0.35s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  /* ââ FIX: removed animation delay that caused invisible state ââ */
  opacity: 1;
  transform: translateX(0);
}
/* Premium top glow */
#sidebar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 200px;
  background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
#sidebar > * { position: relative; z-index: 1; }
#sidebar.collapsed { width: var(--sidebar-collapsed); }

@keyframes sidebarSlideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Sidebar Header */
.sidebar-header {
  padding: 18px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: var(--navbar-height);
  flex-shrink: 0;
}
.logo-wrap {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white;
  box-shadow: 0 4px 12px rgba(59,130,246,0.35);
}
.logo-wrap img {
    width:100%;
  border-radius: 50%;
  border:1px solid white;
}
@keyframes logoBounce {
  from { transform: scale(0) rotate(-20deg); }
  to { transform: scale(1) rotate(0deg); }
}
.logo-text { overflow: hidden; transition: var(--transition); }
.logo-text h2 { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.9); white-space: nowrap; }
.logo-text p { font-size: 11px; color: rgba(255,255,255,0.35); white-space: nowrap; }
#sidebar.collapsed .logo-text { width: 0; opacity: 0; }

/* Sidebar Nav */
.sidebar-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 12px 8px;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3); text-transform: uppercase;
  padding: 10px 10px 4px;
  white-space: nowrap; overflow: hidden;
  transition: opacity 0.25s ease;
}
#sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 1px;
  color: rgba(255,255,255,0.55);
}
.nav-item::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px; height: 60%;
  background: var(--accent-blue);
  border-radius: 0 3px 3px 0;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item:hover::before { transform: translateY(-50%) scaleY(1); }
.nav-item.active { background: rgba(59,130,246,0.18); color: #fff; }
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }
.nav-item .nav-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: rgba(255,255,255,0.5);
}
.nav-item:hover .nav-icon { color: #fff; }
.nav-item.active .nav-icon { background: rgba(59,130,246,0.2); color: var(--accent-blue); }
.nav-item .nav-label { font-size: 13px; font-weight: 500; flex: 1; transition: var(--transition); color: inherit; }
#sidebar.collapsed .nav-label,
#sidebar.collapsed .nav-arrow,
#sidebar.collapsed .nav-badge { opacity: 0; width: 0; }
.nav-arrow { font-size: 11px; color: rgba(255,255,255,0.3); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-item.open .nav-arrow { transform: rotate(90deg); }
.nav-badge {
  font-size: 10px; font-weight: 600;
  background: rgba(59,130,246,0.3);
  color: #93c5fd; padding: 2px 7px;
  border-radius: 20px;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

/* ââ Submenu ââ */
.submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}
.submenu.open { max-height: 600px; }

/* ââ Submenu item â FULL ROW clickable ââ */
.submenu-item {
  padding: 0 !important;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  color: rgba(255,255,255,0.4);
  transition: var(--transition);
  white-space: nowrap;
  margin-bottom: 1px;
  position: relative;
  display: flex;
  align-items: center;
}
.submenu-item::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
  margin-left: 20px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.submenu-item a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  padding: 7px 12px 7px 8px;
  text-decoration: none !important;
  color: inherit !important;
}
.submenu-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
}
.submenu-item:hover::before { background: var(--accent-blue); transform: scale(1.4); }
.submenu-item:hover a { color: rgba(255,255,255,0.85) !important; }
.submenu-item.active { color: #93c5fd; }
.submenu-item.active::before { background: var(--accent-blue); }
.submenu-item.active a { color: #93c5fd !important; }
#sidebar.collapsed .submenu { display: none; }

/* Sidebar Footer */
.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.user-card:hover { background: rgba(255,255,255,0.06); }
.user-avatar {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: white; font-weight: 600;
}
.user-avatar img {
    width: 100%; height:100%;   border-radius: 50%;
}
.user-info { overflow: hidden; transition: var(--transition); }
.user-info p { font-size: 13px; font-weight: 600; white-space: nowrap; color: rgba(255,255,255,0.85); }
.user-info span { font-size: 11px; color: rgba(255,255,255,0.35); white-space: nowrap; }
#sidebar.collapsed .user-info { width: 0; opacity: 0; }

/* Online dot */
.online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-green);
  margin-left: auto; flex-shrink: 0;
  box-shadow: 0 0 6px var(--accent-green);
  animation: onlinePulse 2s ease-in-out infinite;
  transition: opacity 0.3s ease;
}
@keyframes onlinePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}
#sidebar.collapsed .online-dot { opacity: 0; }

/* ===== OVERLAY (mobile) ===== */
#sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* ===== NAVBAR ===== */
/* ââ FIX: animation removed â was keeping navbar invisible on some browsers ââ */
#navbar {
  position: fixed; top: 0; right: 0;
  left: var(--sidebar-width);
  height: var(--navbar-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 90;
  display: flex !important;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  transition: left 0.35s cubic-bezier(0.4,0,0.2,1);
  /* animation: navbarDrop ... REMOVED â caused invisible navbar bug */
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}
@keyframes navbarDrop {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
#sidebar.collapsed ~ #navbar { left: var(--sidebar-collapsed); }

.hamburger {
  width: 36px; height: 36px;
  border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.hamburger:hover { background: var(--border-subtle); }
.hamburger span {
  display: block; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.hamburger span:nth-child(1) { width: 20px; }
.hamburger span:nth-child(2) { width: 14px; }
.hamburger span:nth-child(3) { width: 17px; }
.hamburger.open span:nth-child(1) { width: 18px; transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { width: 18px; transform: translateY(-7px) rotate(-45deg); }

.page-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.page-breadcrumb { font-size: 12px; color: var(--text-muted); }

.nav-spacer { flex: 1; }

.search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 14px;
  transition: var(--transition);
  width: 220px;
}
.search-wrap:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
  width: 260px;
}
.search-wrap input {
  background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 13px; width: 100%;
  font-family: var(--font-main);
}
.search-wrap input::placeholder { color: var(--text-muted); }
.search-wrap i { color: var(--text-muted); font-size: 13px; }

.nav-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
  position: relative;
  flex-shrink: 0;
}
.nav-btn:hover { background: var(--border-subtle); color: var(--text-primary); transform: translateY(-1px); }
.nav-btn .badge {
  position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px;
  background: var(--accent-red);
  border-radius: 50%; font-size: 9px;
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  animation: badgePop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes badgePop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* Theme Toggle */
.theme-toggle {
  width: 52px; height: 28px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  cursor: pointer; position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}
[data-theme="light"] .theme-toggle { background: #dbeafe; border-color: var(--accent-blue); }
.theme-toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  box-shadow: 0 2px 8px rgba(59,130,246,0.4);
}
[data-theme="light"] .theme-toggle-knob { transform: translateX(24px); }
.theme-toggle-knob::before { content: 'ð'; }
[data-theme="light"] .theme-toggle-knob::before { content: 'âï¸'; }

/* ===== MAIN CONTENT ===== */
#main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--navbar-height);
  padding: 28px 28px;
  min-height: calc(100vh - var(--navbar-height));
  transition: margin-left 0.35s cubic-bezier(0.4,0,0.2,1);
}
#sidebar.collapsed ~ #navbar ~ #main-content { margin-left: var(--sidebar-collapsed); }

/* ===== SECTIONS ===== */
.section { display: none; animation: sectionIn 0.45s cubic-bezier(0.4,0,0.2,1) both; }
.section.active { display: block; }
@keyframes sectionIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease, background 0.3s ease;
  opacity: 0; transform: translateY(20px);
}
.stat-card.animated {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease, background 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  background: var(--bg-card-hover);
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.blue::before   { background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); }
.stat-card.green::before  { background: linear-gradient(90deg, var(--accent-green), #34d399); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink)); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--accent-orange), #fbbf24); }
.stat-card.red::before    { background: linear-gradient(90deg, var(--accent-red), #f87171); }
.stat-card.cyan::before   { background: linear-gradient(90deg, var(--accent-cyan), #67e8f9); }

.stat-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px;
}
.stat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.stat-card.blue .stat-icon   { background: rgba(59,130,246,0.12);  color: var(--accent-blue); }
.stat-card.green .stat-icon  { background: rgba(16,185,129,0.12);  color: var(--accent-green); }
.stat-card.purple .stat-icon { background: rgba(139,92,246,0.12);  color: var(--accent-purple); }
.stat-card.orange .stat-icon { background: rgba(245,158,11,0.12);  color: var(--accent-orange); }
.stat-card.red .stat-icon    { background: rgba(239,68,68,0.12);   color: var(--accent-red); }
.stat-card.cyan .stat-icon   { background: rgba(6,182,212,0.12);   color: var(--accent-cyan); }

.stat-trend { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.stat-trend.up   { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.stat-trend.down { background: rgba(239,68,68,0.12);  color: var(--accent-red); }
.stat-number {
  font-size: 28px; font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1;
}
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.stat-sub   { font-size: 11px; color: var(--text-muted);     margin-top: 8px; }

/* Ripple */
.ripple-container { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ripple {
  position: absolute; border-radius: 50%;
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
  background: rgba(255,255,255,0.08);
}
@keyframes rippleEffect { to { transform: scale(4); opacity: 0; } }

/* ===== GRID LAYOUTS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }

/* ===== CARD ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  opacity: 0; transform: translateY(16px);
}
.card.animated { opacity: 1; transform: translateY(0); }
.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.card-body { padding: 20px; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text-muted);
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
td {
  padding: 13px 14px;
  font-size: 13.5px; color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: var(--transition);
}
/* ââ tbody rows animate in, thead always visible ââ */
tr { transition: background 0.2s ease; }
tbody tr { opacity: 1; transform: none; }
tbody tr.row-animated { opacity: 1; transform: none; }
thead tr { opacity: 1 !important; transform: none !important; }
tr:hover td { background: rgba(255,255,255,0.02); color: var(--text-primary); }
.td-name { display: flex; align-items: center; gap: 10px; }
.td-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: white; flex-shrink: 0;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
}
.badge-green  { background: rgba(16,185,129,0.12);  color: var(--accent-green); }
.badge-blue   { background: rgba(59,130,246,0.12);  color: var(--accent-blue); }
.badge-orange { background: rgba(245,158,11,0.12);  color: var(--accent-orange); }
.badge-red    { background: rgba(239,68,68,0.12);   color: var(--accent-red); }
.badge-purple { background: rgba(139,92,246,0.12);  color: var(--accent-purple); }

/* ===== PROGRESS BAR ===== */
.progress-bar-wrap { margin: 6px 0; }
.progress-bar-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-secondary); margin-bottom: 6px;
}
.progress-bar-track {
  height: 6px; background: var(--border-subtle);
  border-radius: 10px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 10px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  font-family: var(--font-main);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59,130,246,0.4); }
.btn-ghost {
  background: var(--border-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ===== MINI CHART ===== */
.mini-chart { display: flex; align-items: flex-end; gap: 4px; height: 48px; }
.mini-bar {
  flex: 1; border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--accent-blue), var(--accent-cyan));
  opacity: 0.7; width: 0;
  animation: barGrow 0.8s cubic-bezier(0.4,0,0.2,1) forwards;
  transform-origin: bottom;
}
@keyframes barGrow { from { height: 0 !important; } }

/* ===== ACTIVITY FEED ===== */
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  opacity: 0; transform: translateX(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.activity-item.animated { opacity: 1; transform: translateX(0); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.activity-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.activity-content span { font-size: 11px; color: var(--text-muted); }

/* ===== QUICK STATS ===== */
.quick-stat {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.quick-stat:last-child { border-bottom: none; }
.quick-stat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.quick-stat-info { flex: 1; }
.quick-stat-info p { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.quick-stat-info span { font-size: 11px; color: var(--text-muted); }
.quick-stat-val { font-size: 15px; font-weight: 700; font-family: var(--font-mono); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  width: 100%; max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 8px; border: none;
  background: var(--border-subtle); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.modal-body { padding: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 14px;
  font-family: var(--font-main);
  outline: none; transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ===== TOAST ===== */
#toast-container {
  position: fixed; top: 80px; right: 20px;
  z-index: 300; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  font-size: 13.5px;
  animation: toastSlideIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 320px;
}
.toast.removing { animation: toastSlideOut 0.3s ease forwards; }
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(120%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut { to { opacity: 0; transform: translateX(120%); } }
.toast-icon  { font-size: 18px; flex-shrink: 0; }
.toast-msg   { flex: 1; color: var(--text-primary); }
.toast-close { color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 2px; }
.toast-close:hover { color: var(--text-primary); }

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  animation: fadeSlideDown 0.4s ease both;
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section-header h1 { font-size: 24px; font-weight: 800; color: var(--text-primary); }
.section-header p  { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.header-actions    { display: flex; gap: 10px; }

/* ===== CAMPAIGN CARD ===== */
.campaign-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
  opacity: 0; transform: translateY(8px);
}
.campaign-card.animated { opacity: 1; transform: translateY(0); }
.campaign-card:hover { background: var(--bg-card-hover); }
.campaign-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.campaign-img {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.campaign-name   { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.campaign-meta   { font-size: 11px; color: var(--text-muted); }
.campaign-amounts {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
  margin-top: 8px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ===== CHART BAR ===== */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding: 0 4px; }
.bar-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-chart-bar {
  width: 100%; border-radius: 6px 6px 0 0;
  background: linear-gradient(to top, var(--accent-blue), var(--accent-cyan));
  opacity: 0.8; height: 0;
  transition: height 1s cubic-bezier(0.4,0,0.2,1);
}
.bar-chart-label { font-size: 10px; color: var(--text-muted); white-space: nowrap; }

/* ===== DONUT CHART ===== */
.donut-wrap { display: flex; align-items: center; gap: 20px; padding: 10px 0; }
.donut-svg  { flex-shrink: 0; }
.donut-legend { flex: 1; }
.legend-item {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; font-size: 12px; color: var(--text-secondary);
}
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* ===== BOTTOM BAR ===== */
/*.custom-bottom-bar { display: none; }*/
/*.bottom-item {*/
/*  display: flex; flex-direction: column;*/
/*  align-items: center; justify-content: center;*/
/*  text-decoration: none !important; flex: 1; height: 100%;*/
/*}*/
/*.icon-box { font-size: 20px; margin-bottom: 2px; transition: transform 0.2s ease; }*/
/*.bottom-item:hover .icon-box { transform: translateY(-2px); }*/
/*.bottom-label { font-size: 11px; font-weight: 600; color: #4b5563; margin-top: 2px; }*/

/*.menu-center-wrapper {*/
/*  position: relative; top: -8px;*/
/*  display: flex; flex-direction: column; align-items: center;*/
/*}*/
/*.label-menu { margin-top: -18px; font-size: 11px; font-weight: 600; color: #4b5563; line-height: 1; }*/

/*.bottom-menu-center-btn {*/
/*  width: 65px; height: 80px;*/
/*  background: #0a7e6b; border-radius: 50%;*/
/*  display: flex; justify-content: center; align-items: center;*/
/*  cursor: pointer; transform: translateY(-25px);*/
/*  transition: 0.5s !important; border: 6px solid #fff;*/
/*}*/
/*.bottom-menu-center-btn:hover { transform: scale(1.1); background-color: #096d5d; }*/
/*.bottom-menu-center-btn i { color: white; }*/
/*.bottom-label-menu { margin-top: 6px; }*/

/*.text-warning { color: #f59e0b !important; }*/
/*.text-success { color: #10b981 !important; }*/
/*.text-info    { color: #3b82f6 !important; }*/
/*.text-danger  { color: #ef4444 !important; }*/


.custom-bottom-bar { display: none; }

@media (max-width: 768px) {
  .custom-bottom-bar {
    display: flex;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 16px;
    width: auto;
    height: 82px;
    background: rgba(255, 255, 255, 0.96);
    border: 2px solid rgba(37, 99, 235, 0.18);
    border-radius: 32px;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
    z-index: 9999;
    padding: 0;
  }

  .custom-bottom-bar::before,
  .custom-bottom-bar::after {
    content: "";
    position: absolute;
    left: 34px;
    right: 34px;
    height: 3px;
    border-radius: 20px;
  }

  .custom-bottom-bar::before {
    top: -2px;
    background: linear-gradient(90deg, transparent, #2563eb, #7c3aed, transparent);
  }

  .custom-bottom-bar::after {
    bottom: -2px;
    background: linear-gradient(90deg, transparent, #7c3aed, #2563eb, transparent);
  }

  body { padding-bottom: 110px; }
  .sidebar-footer { padding-bottom: 120px; }
}

.bottom-item {
  width: 62px;
  height: 58px;
  text-align: center;
  text-decoration: none !important;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: 0.25s ease;
  flex: unset;
}

.bottom-item i {
  font-size: 21px;
  margin-bottom: 6px;
  color: #64748b;
}

.bottom-item:hover,
.bottom-item.active {
  background: #eff6ff;
  color: #2563eb;
}

.bottom-item:hover i,
.bottom-item.active i {
  color: #2563eb;
}

/* Override icon-box for bottom bar */
.custom-bottom-bar .icon-box {
  background: none !important;
  box-shadow: none !important;
  width: auto;
  height: auto;
  border-radius: 0;
  font-size: 21px;
  margin-bottom: 6px;
}

.bottom-label {
  font-size: 10.5px;
  font-weight: 700;
  color: inherit;
  margin-top: 0;
}

/* Center diamond button */
.menu-center-wrapper {
  position: relative;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.label-menu { display: none; }

.bottom-menu-center-btn {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  border: 6px solid #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  transform: translateY(-28px) rotate(45deg);
  box-shadow: 0 15px 32px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  transition: 0.35s ease;
  position: relative;
  text-decoration: none !important;
}

.bottom-menu-center-btn::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 28px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  opacity: 0.18;
  z-index: -1;
  animation: pulseGlow 1.8s infinite;
}

.bottom-menu-center-btn i {
  transform: rotate(-45deg);
  transition: transform 0.35s ease;
  font-size: 18px !important;
  margin-bottom: 0 !important;
  color: #fff !important;
}

.bottom-menu-center-btn:hover i {
  /* hover pe rotate nahi, sirf click pe */
}

.bottom-menu-center-btn:hover i {
  transform: rotate(45deg);
}

@keyframes pulseGlow {
  0%   { transform: scale(0.95); opacity: 0.25; }
  50%  { transform: scale(1.12); opacity: 0.08; }
  100% { transform: scale(0.95); opacity: 0.25; }
}

.text-warning { color: #64748b !important; }
.text-success { color: #64748b !important; }
.text-info    { color: #64748b !important; }
.text-danger  { color: #64748b !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  #sidebar {
    transform: translateX(-100%) !important;
    width: var(--sidebar-width) !important;
  }
  #sidebar.mobile-open {
    transform: translateX(0) !important;
    animation: sidebarSlideIn 0.35s ease;
  }
  #navbar        { left: 0 !important; }
  #main-content  { margin-left: 0 !important; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .custom-bottom-bar {
    display: flex;
    position: fixed; bottom: 15px; left: 15px; right: 15px;
    width: auto; height: 70px;
    background-color: #ffffff;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
    justify-content: space-around; align-items: center;
    z-index: 9999; border-radius: 20px; padding: 10px;
  }
  body { padding-bottom: 80px; }
  .sidebar-footer { padding-bottom: 100px; }
}

@media (max-width: 560px) {
  #main-content  { padding: 16px; }
  .stats-grid    { grid-template-columns: 1fr 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .search-wrap   { display: none; }
  .page-breadcrumb { display: none; }
  .custom-bottom-bar { display: flex; }
}

@media (max-width: 360px) {
  .search-wrap     { display: none; }
  .page-breadcrumb { display: none; }
}