:root {
  --sidebar-width: 260px;
  --sidebar-bg: #0f2a3d;
  --sidebar-bg-2: #163a52;
  --accent: #2bb0a6;
  --accent-soft: rgba(43, 176, 166, 0.15);
  --page-bg: #f3f6f8;
  --text-muted: #6c7a86;
}

html, body {
  height: 100%;
}

body {
  background: var(--page-bg);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  overflow-y: auto;
  transition: transform 0.2s ease;
}

.sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand .brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
}

.sidebar-brand .brand-sub {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 0.15rem 0 0;
}

.sidebar .nav-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.55;
  padding: 1rem 1.25rem 0.35rem;
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.82);
  border-radius: 0.5rem;
  margin: 0.15rem 0.75rem;
  padding: 0.55rem 0.85rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .nav-link.active {
  color: #fff;
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.main-area {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e5ebf0;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar .page-heading {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

#page-content {
  padding: 1.25rem;
  flex: 1;
}

#page-content.loading {
  opacity: 0.55;
  pointer-events: none;
}

.card-stat {
  border: 0;
  border-radius: 0.85rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 42, 61, 0.06);
}

.card-stat .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sidebar-bg);
}

.card-stat .stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.table-panel {
  background: #fff;
  border-radius: 0.85rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 42, 61, 0.06);
  padding: 1rem;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-area {
    margin-left: 0;
  }

  .sidebar-backdrop.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1035;
  }
}
