:root {
  --navy-dark: #0d1b3e;
  --navy: #16296b;
  --navy-light: #1e3a8a;
  --accent: #f5a623;
  --sidebar-width: 270px;
}

body { background: #f4f6fb; font-family: 'Segoe UI', Roboto, sans-serif; }

.app-wrapper { display: flex; min-height: 100vh; }

/* ---------- SIDEBAR ---------- */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--navy-dark);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 1030;
  transition: transform .25s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background:#fff; }
.brand-name { font-weight: 700; color: #fff; font-size: 15px; line-height: 1.2; }
.brand-session { font-size: 11px; color: #93a3c9; }

#menuSearch { background: rgba(255,255,255,.08); border: none; color: #fff; }
#menuSearch::placeholder { color: #93a3c9; }

.sidebar-nav .nav-link {
  color: #cbd5e1;
  padding: 10px 16px;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  border-radius: 0;
}
.sidebar-nav .nav-link i.bi { font-size: 16px; width: 20px; color: var(--accent); }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--navy-light); color: #fff; font-weight: 600; }
.sidebar-nav .chevron { transition: transform .2s; font-size: 11px; }
.sidebar-nav a[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.submenu { background: rgba(0,0,0,.15); }
.submenu .nav-link { padding: 8px 16px 8px 46px; font-size: 13.5px; }
.submenu .nav-link.active { background: var(--accent); color: #16296b; font-weight: 600; }
.small-chevron { font-size: 10px; margin-right: 6px; color: #64748b; }

.sidebar-footer { padding: 16px; margin-top: auto; }
.btn-support {
  background: var(--accent); color: #16296b; font-weight: 600; border: none;
  border-radius: 8px; padding: 10px;
}
.btn-support:hover { background: #ffb84d; color: #16296b; }

/* ---------- CONTENT ---------- */
.app-content { margin-left: var(--sidebar-width); flex: 1; min-width: 0; display:flex; flex-direction:column; }
.topbar {
  height: 60px; background: #fff; border-bottom: 1px solid #e5e9f2;
  position: sticky; top: 0; z-index: 1020;
}
.app-main { flex: 1; }
.app-footer { background: #fff; border-top: 1px solid #e5e9f2; }

/* ---------- DASHBOARD WIDGETS ---------- */
.stat-card {
  background: #fff; border-radius: 12px; padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border-left: 4px solid var(--accent);
  height: 100%;
}
.stat-card .stat-label { color: #6b7280; font-size: 13px; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: #16296b; }
.quick-card { background:#fff; border-radius:12px; padding:18px; box-shadow:0 1px 3px rgba(0,0,0,.06); height:100%; }
.quick-card .quick-label { color:#9ca3af; font-size:13px; }
.quick-card a { color: var(--navy-light); font-weight: 600; text-decoration:none; }
.quick-card a:hover { text-decoration:underline; }

/* ---------- TABLES / CARDS ---------- */
.card { border: none; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-header { background:#fff; border-bottom: 1px solid #eef1f7; font-weight:600; border-radius:12px 12px 0 0 !important; }
table.dataTable thead th { background:#f8f9fc; font-size: 13px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.show { transform: translateX(0); }
  .app-content { margin-left: 0; }
}
