:root {
  --sidebar-width: 250px;
  --brand: #6d28d9;
  --brand-dark: #5b21b6;
  --bg: #f4f5f9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: #1f2430;
}

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

.app-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1e1b3a, #2a2550);
  color: #d9d6f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  transition: transform .2s ease;
  z-index: 1000;
}

.sidebar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  padding: 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sidebar-nav { display: flex; flex-direction: column; padding: 0 .75rem 2rem; }

.sidebar-nav a {
  color: #cfcbe8;
  text-decoration: none;
  padding: .6rem .75rem;
  border-radius: .5rem;
  margin-bottom: .15rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .92rem;
}

.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: var(--brand); color: #fff; }

.nav-section {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8f8ab8;
  padding: 1rem .75rem .35rem;
}

.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-navbar {
  background: #fff;
  border-bottom: 1px solid #e6e6ee;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 900;
}

.navbar-title { font-weight: 600; font-size: 1.05rem; flex: 1; }
.navbar-user a { color: #333; text-decoration: none; font-size: .9rem; }
.sidebar-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; }

.app-content { padding: 1.5rem; }

.card {
  border: none;
  border-radius: .75rem;
  box-shadow: 0 1px 3px rgba(20,20,50,.06);
}

.stat-card { padding: 1.25rem; border-radius: .75rem; color: #fff; }
.stat-card .stat-label { font-size: .8rem; opacity: .85; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; margin-top: .25rem; }
.stat-card.bg-purple { background: linear-gradient(135deg,#7c3aed,#5b21b6); }
.stat-card.bg-green { background: linear-gradient(135deg,#059669,#047857); }
.stat-card.bg-red { background: linear-gradient(135deg,#dc2626,#b91c1c); }
.stat-card.bg-blue { background: linear-gradient(135deg,#2563eb,#1d4ed8); }

.table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7280;
  border-bottom-width: 1px;
}

.badge-status { text-transform: capitalize; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#1e1b3a,#5b21b6);
}

.login-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

@media (max-width: 991px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.show { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .sidebar-toggle { display: block; }
}
