:root {
  --primary: #2563EB;
  --secondary: #0F172A;
  --accent: #06B6D4;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --background: #F8FAFC;
  --surface: #ffffff;
  --surface-alt: #f8fbff;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0F172A;
  --muted: #64748b;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--surface-alt) 0%, #eef5ff 100%);
  color: var(--text);
}

body.dark-theme {
  background: linear-gradient(135deg, #020617 0%, #111827 100%);
  color: #e2e8f0;
}

.wrapper { display: flex; min-height: 100vh; }
.sidebar {
  width: 280px; min-height: 100vh; background: linear-gradient(145deg, var(--secondary) 0%, #14213d 100%); color: #fff; padding: 1rem 0.85rem; position: sticky; top: 0; box-shadow: 16px 0 44px rgba(15, 23, 42, 0.18);
}
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25); }
.sidebar .brand { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 0.8rem 1.1rem; font-weight: 700; font-size: 1.02rem; color: #fff; }
.sidebar .sidebar-section-title { padding: 0.7rem 0.9rem 0.35rem; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.58); }
.sidebar .nav-link { color: rgba(255,255,255,0.88); border-radius: 0.85rem; padding: 0.8rem 0.95rem; margin-bottom: 0.2rem; transition: all 0.25s ease; display: flex; align-items: center; gap: 0.75rem; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: rgba(255,255,255,0.13); color: #fff; transform: translateX(3px); }
.main-content { flex: 1; min-width: 0; }
.topbar { background: rgba(255,255,255,0.78); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); padding: 0.95rem 1.25rem; position: sticky; top: 0; z-index: 20; }
.topbar-pill { padding: 0.45rem 0.75rem; border-radius: 999px; background: rgba(37,99,235,0.08); color: var(--primary); font-weight: 600; font-size: 0.9rem; }
body.dark-theme .topbar { background: rgba(15, 23, 42, 0.82); color: #f8fafc; }
.card { border: 1px solid var(--border); border-radius: 1.15rem; box-shadow: var(--shadow); background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12); }
body.dark-theme .card { background: rgba(17,24,39,0.95); color: #e2e8f0; }
.stat-card { border-left: 4px solid var(--primary); }
.stat-card-primary { border-left-color: var(--primary); }
.stat-card-warning { border-left-color: var(--warning); }
.stat-card-success { border-left-color: var(--success); }
.stat-card-danger { border-left-color: var(--danger); }
.icon-bubble { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--primary); background: rgba(37,99,235,0.12); }
.hero-shell { background: linear-gradient(135deg, #ffffff 0%, #f4f9ff 100%); border: 1px solid rgba(37,99,235,0.12); }
.hero-shell .badge-soft { display: inline-block; padding: 0.35rem 0.75rem; border-radius: 999px; background: rgba(37,99,235,0.11); color: var(--primary); font-weight: 600; }
.page-title { font-weight: 700; color: var(--secondary); }
body.dark-theme .page-title { color: #fff; }
.table { border-collapse: separate; border-spacing: 0 0.55rem; }
.table thead th { border: 0; color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.table tbody tr { background: rgba(255,255,255,0.45); border-radius: 0.8rem; }
body.dark-theme .table tbody tr { background: rgba(30,41,59,0.7); }
.btn { border-radius: 0.8rem; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.module-card { text-decoration: none; color: inherit; display: block; min-height: 140px; border-radius: 1rem; padding: 1rem; background: linear-gradient(135deg, rgba(255,255,255,0.97), rgba(248,250,252,0.97)); border: 1px solid rgba(148,163,184,0.15); }
.module-card:hover { text-decoration: none; color: inherit; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
body.dark-theme .module-card { background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95)); }
.quick-action-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30; display: flex; flex-direction: column; gap: 0.6rem; }
.quick-action-fab .btn { width: 48px; height: 48px; border-radius: 50%; box-shadow: var(--shadow); }
.form-control, .form-select, .form-check-input { border-radius: 0.8rem; }
.badge { border-radius: 999px; }
@media (max-width: 991px) { .wrapper { display: block; } .sidebar { display: none; } .main-content { width: 100%; } }
