:root {
  --app-bg: #f4f6fa;
  --app-sidebar: #0f1420;
  --app-sidebar-text: #aab3c5;
  --app-sidebar-active: #1d2638;
  --app-primary: #0d6efd;
  --app-border: #e5e9f0;
}

body {
  background: var(--app-bg);
  font-size: .925rem;
}

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

.auth-bg {
  background: linear-gradient(135deg, #0f1420 0%, #1d2638 55%, #0d6efd 140%);
  min-height: 100vh;
}

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
}

.auth-card .brand-icon.big {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--app-primary);
  color: #fff;
  font-size: 1.6rem;
}

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--app-sidebar);
  color: var(--app-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.app-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem 1.1rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.app-sidebar .sidebar-brand .brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--app-primary);
  color: #fff;
  font-size: 1.1rem;
}

.app-sidebar .sidebar-collapse {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.app-sidebar .sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: .6rem 0;
  min-width: 0;
}

.app-sidebar .nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #8b96ad;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .7rem;
  font-weight: 600;
  padding: .7rem 1.15rem .45rem;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,.04);
  background: none;
}

.app-sidebar .nav-group-toggle:hover {
  color: #fff;
}

.app-sidebar .nav-group-toggle .nav-group-chevron {
  font-size: .7rem;
  transition: transform .2s ease;
}

.app-sidebar .nav-group-toggle[aria-expanded="false"] .nav-group-chevron {
  transform: rotate(-90deg);
}

.app-sidebar .nav-group-items {
  flex-wrap: nowrap;
}

.app-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--app-sidebar-text);
  padding: .55rem 1.15rem;
  font-size: .9rem;
  border-left: 3px solid transparent;
}

.app-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.04);
}

.app-sidebar .nav-link.active {
  color: #fff;
  background: var(--app-sidebar-active);
  border-left-color: var(--app-primary);
}

.app-sidebar .nav-link .icon {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  background: #fff;
  border-bottom: 1px solid var(--app-border);
  padding: .7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-content {
  padding: 1.5rem;
  flex: 1;
}

.app-footer {
  padding: .9rem 1.5rem;
  color: #8b93a7;
  font-size: .8rem;
  border-top: 1px solid var(--app-border);
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
}

.stat-card .card-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  color: #6c757d;
  font-size: .8rem;
}

.table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6c757d;
}

.pagination-sm .page-link {
  font-size: .8rem;
}

@media (max-width: 991.98px) {
  .app-wrapper { flex-direction: column; }
  .app-sidebar { width: 100%; height: auto; position: static; }
  .app-sidebar .sidebar-collapse:not(.show) { display: none; }
  .app-sidebar .sidebar-brand { justify-content: space-between; }
}