:root {
  --sidebar-width: 260px;
  --brand: #4b38b3;
  --brand-dark: #3b2c8f;
  --bg-muted: #f4f5f9;
}

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-muted);
  color: #2b2b3c;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark);
}

.text-primary {
  color: var(--brand) !important;
}

/* ---------- Auth / login ---------- */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4b38b3 0%, #6f5bd6 100%);
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
}

.auth-logo {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo img {
  max-width: 160px;
  max-height: 72px;
  object-fit: contain;
}

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

.app-sidebar {
  width: var(--sidebar-width);
  background: #cfe4fb; /* light blue base */
  color: #1e3a5f;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
}

.sidebar-brand .brand-logo {
  max-width: 220px;
  max-height: 88px;
  object-fit: contain;
  background: transparent;
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav .nav-link {
  color: #24537f;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.sidebar-nav .nav-link:hover {
  background: rgba(30, 58, 95, 0.08);
  color: #14324f;
}

.sidebar-nav .nav-link.active {
  background: #3b82f6; /* stronger blue for the active item */
  color: #fff;
}

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

.app-topbar {
  background: #fff;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #e9e9f1;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-content {
  padding: 1.75rem;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
}
