:root {
  --brand: #5b3df0;
  --brand-dark: #4326c9;
  --bg: #f4f5fb;
  --sidebar-bg: #1c1730;
  --sidebar-active: #5b3df0;
  --card-border: #e6e6f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: #23213a;
}

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

.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: #fff;
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  padding: 0 20px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 10px;
}

.sidebar-nav .nav-link {
  color: rgba(255,255,255,.75);
  padding: 11px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid transparent;
  font-size: .93rem;
}

.sidebar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}

.sidebar-nav .nav-link.active {
  color: #fff;
  background: rgba(91,61,240,.25);
  border-left-color: var(--brand);
  font-weight: 600;
}

.content {
  flex: 1;
  min-width: 0;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--card-border);
  padding: 16px 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.page-body {
  padding: 24px 28px 40px;
}

.card {
  border: 1px solid var(--card-border);
  border-radius: 10px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid var(--card-border);
  height: 100%;
}

.stat-card .stat-label {
  color: #6b6880;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 4px;
}

.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91,61,240,.1);
  color: var(--brand);
  font-size: 1.2rem;
}

.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-brand:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.table-responsive {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

table.data-table thead {
  background: #f0eefd;
}

table.data-table thead th {
  white-space: nowrap;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #514e6b;
  border-bottom-width: 1px;
}

table.data-table td {
  white-space: nowrap;
  font-size: .87rem;
  vertical-align: middle;
}

.badge-active {
  background: #16a34a;
}

.badge-inactive {
  background: #9ca3af;
}

.upload-drop {
  border: 2px dashed #c9c5f0;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  background: #fbfaff;
}

@media (max-width: 768px) {
  .sidebar { position: fixed; left: -230px; transition: left .2s; z-index: 20; }
  .sidebar.open { left: 0; }
  .page-body { padding: 16px; }
}
