:root {
  --brand: #2c5f7c;
  --brand-dark: #1e4258;
  --sidebar-width: 240px;
}

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

.app-navbar {
  background-color: var(--brand-dark);
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.app-wrapper {
  display: flex;
  min-height: calc(100vh - 56px);
}

.app-sidebar {
  width: var(--sidebar-width);
  background-color: #fff;
  border-right: 1px solid #e3e6ea;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  z-index: 1025;
}

.app-sidebar .nav-link {
  color: #3a4a54;
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
}

.app-sidebar .nav-link i { width: 20px; display: inline-block; }

.app-sidebar .nav-link:hover {
  background-color: #f0f4f7;
  color: var(--brand);
}

.app-sidebar .nav-link.active {
  background-color: #e7f0f5;
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 600;
}

.nav-section {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9aa5ac;
  padding: 0.9rem 1.1rem 0.25rem;
  font-weight: 700;
}

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

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 56px 0 0 0;
  background: rgba(0,0,0,0.4);
  z-index: 1020;
}

.stat-card {
  border: none;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; }
.stat-card .stat-label { font-size: 0.82rem; opacity: 0.9; }
.bg-grad-blue { background: linear-gradient(135deg,#2c5f7c,#4f8ba8); }
.bg-grad-green { background: linear-gradient(135deg,#1f8a5b,#3cb87f); }
.bg-grad-orange { background: linear-gradient(135deg,#c0722a,#e0964f); }
.bg-grad-red { background: linear-gradient(135deg,#b3403f,#d9645f); }

.card { border: none; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.table thead th { font-size: 0.78rem; text-transform: uppercase; color: #6c757d; border-bottom-width: 1px; }
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#1e4258,#2c5f7c); }
.login-card { width: 100%; max-width: 400px; border-radius: 14px; }

/* Mobile: sidebar becomes an off-canvas drawer */
@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    transform: translateX(-100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
  }
  .app-sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; }
}
