/* ── Layout ─────────────────────────────────────────────────────────────── */

body {
  background-color: #f5f6fa;
  font-size: 0.9375rem;
}

#wrapper {
  min-height: calc(100vh - 56px);
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */

#sidebar {
  width: 240px;
  min-width: 240px;
  min-height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

#sidebar .nav-link {
  color: #495057;
  border-radius: 6px;
  margin: 1px 8px;
  padding: 7px 12px;
  font-size: 0.875rem;
  transition: background-color 0.15s, color 0.15s;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
  background-color: #e7f0ff;
  color: #0d6efd;
}

#sidebar .nav-link i {
  width: 20px;
}

.nav-section-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #adb5bd;
  padding: 12px 20px 4px;
  margin-top: 4px;
}

/* ── Main content ───────────────────────────────────────────────────────── */

#main-content {
  max-width: 1400px;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.card {
  border-radius: 10px;
}

.stat-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */

.table > :not(caption) > * > * {
  padding: 0.65rem 0.75rem;
}

/* ── Flash messages ─────────────────────────────────────────────────────── */

.flash-messages .alert {
  border-left: 4px solid;
}
.flash-messages .alert-success  { border-left-color: #198754; }
.flash-messages .alert-danger   { border-left-color: #dc3545; }
.flash-messages .alert-warning  { border-left-color: #ffc107; }
.flash-messages .alert-info     { border-left-color: #0dcaf0; }

/* ── Responsive: collapse sidebar on small screens ──────────────────────── */

@media (max-width: 767.98px) {
  #sidebar {
    display: none !important;
  }
}
