:root {
  --brand: #1f3a8a;
  --brand-dark: #162d6e;
  --sidebar-w: 260px;
  --sidebar-bg: linear-gradient(180deg, #0f2057 0%, #1a347a 100%);
  --topbar-h: 56px;
}

body {
  background: #f0f2f8;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: .2px;
}

.card {
  border: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  border-radius: 10px;
}

.stat {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand);
}

.badge-soft {
  background: rgba(31, 58, 138, .08);
  color: var(--brand);
}

.table td,
.table th {
  vertical-align: middle;
}

/* ===== ADMIN  ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.admin-sidebar::-webkit-scrollbar {
  width: 5px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 8px;
}

.admin-sidebar .sidebar-brand {
  padding: 20px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.admin-sidebar .sidebar-brand a {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-sidebar .sidebar-brand .brand-icon {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, .12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.admin-sidebar .sidebar-section {
  padding: 16px 14px 6px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, .35);
}

.admin-sidebar .sidebar-nav {
  list-style: none;
  padding: 0 10px;
  margin: 0;
  flex: 1;
}

.admin-sidebar .sidebar-nav li {
  margin-bottom: 2px;
}

.admin-sidebar .sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all .18s ease;
  position: relative;
}

.admin-sidebar .sidebar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.admin-sidebar .sidebar-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, .13);
  font-weight: 600;
}

.admin-sidebar .sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: #6fa3ff;
  border-radius: 0 4px 4px 0;
}

.admin-sidebar .sidebar-nav .nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.admin-sidebar .sidebar-nav .nav-badge {
  margin-left: auto;
  font-size: .7rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 100, 100, .25);
  color: #ff9e9e;
  font-weight: 600;
}

.admin-sidebar .sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin-top: auto;
}

.admin-sidebar .sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .7);
  font-size: .82rem;
}

.admin-sidebar .sidebar-footer .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  flex-shrink: 0;
}

.admin-sidebar .sidebar-footer .user-name {
  font-weight: 600;
  color: #fff;
  font-size: .85rem;
}

.admin-sidebar .sidebar-footer .user-role {
  font-size: .72rem;
  color: rgba(255, 255, 255, .45);
}

.admin-sidebar .sidebar-footer-links {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.admin-sidebar .sidebar-footer-links a {
  flex: 1;
  text-align: center;
  padding: 5px 0;
  font-size: .72rem;
  color: rgba(255, 255, 255, .55);
  text-decoration: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  transition: all .15s;
}

.admin-sidebar .sidebar-footer-links a:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

/* Admin content area */
.admin-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .03);
}

.admin-topbar .topbar-title {
  font-weight: 600;
  font-size: .95rem;
  color: #374151;
}

.admin-topbar .topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-topbar .btn-sidebar-toggle {
  display: none;
  border: none;
  background: none;
  font-size: 1.3rem;
  color: #374151;
  padding: 4px 8px;
  cursor: pointer;
  margin-right: 12px;
}

.admin-body {
  flex: 1;
  padding: 24px 28px 32px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1035;
}

/* Danger zone card */
.danger-zone {
  border: 1px solid rgba(220, 53, 69, .2);
  background: rgba(220, 53, 69, .02);
}

.danger-zone .card-header-danger {
  background: rgba(220, 53, 69, .06);
  border-bottom: 1px solid rgba(220, 53, 69, .12);
  padding: 14px 20px;
  border-radius: 10px 10px 0 0;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.show {
    transform: translateX(0);
  }

  .sidebar-overlay.show {
    display: block;
  }

  .admin-content {
    margin-left: 0;
  }

  .admin-topbar .btn-sidebar-toggle {
    display: block;
  }

  .admin-body {
    padding: 16px;
  }
}

@media (min-width: 1500px) {

  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 1500px;
  }
}

@media (min-width: 1600px) {

  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 1600px;
  }
}

@media (min-width: 1700px) {

  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 1700px;
  }
}

@media (min-width: 1800px) {

  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 1800px;
  }
}