:root {
  --brand-dark: #1a1a2e;
  --brand-accent: #395837;
  --brand-light: #eeedfe;
  --sidebar-w: 260px;
}

* {
  box-sizing: border-box;
}
body {
  background: #f4f6fb;
  font-family: "Segoe UI", sans-serif;
  overflow-x: hidden;
}

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--brand-dark);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform 0.3s ease;

  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #ffffff15;
  text-decoration: none;
}
.sidebar-brand .brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  display: block;
}
.sidebar-brand .brand-tagline {
  font-size: 11px;
  color: #ffffff55;
}
.sidebar-section-label {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ffffff35;
  padding: 16px 20px 6px;
}
.sidebar .nav-link {
  color: #ffffffaa;
  padding: 9px 16px;
  border-radius: 8px;
  margin: 1px 10px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s;
  text-decoration: none;
}
.sidebar .nav-link i {
  font-size: 16px;
  width: 20px;
  flex-shrink: 0;
}
.sidebar .nav-link:hover {
  background: #ffffff12;
  color: #fff;
}
.sidebar .nav-link.active {
  background: var(--brand-accent);
  color: #fff;
}
.sidebar-footer {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid #ffffff12;
}
.sidebar-footer .user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.sidebar-footer .user-role {
  font-size: 11px;
  color: #ffffff55;
}

/* ── Topbar ──────────────────────────────────── */
.topbar {
  margin-left: var(--sidebar-w);
  background: #fff;
  border-bottom: 1px solid #e8eaf0;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
}
.topbar .page-heading {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: #1a1a2e;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* ── Main content ────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  padding: 24px;
  min-height: calc(100vh - 56px);
}

/* ── Cards ───────────────────────────────────── */
.card {
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #e8eaf0;
  border-radius: 12px 12px 0 0 !important;
}

/* ── Buttons ─────────────────────────────────── */
* {
  --bs-focus-ring-color: transparent !important;
  --bs-btn-active-bg: transparent !important;
  --bs-btn-active-border-color: transparent !important;
}
*:focus,
*:focus-visible,
*:active {
  outline: none !important;
  box-shadow: none !important;
}
.btn {
  outline: none !important;
  box-shadow: none !important;
}
.btn:focus,
.btn:active,
.btn:focus-visible,
.btn:active:focus,
.btn.active {
  box-shadow: none !important;
  outline: none !important;
  background-color: inherit !important;
  border-color: inherit !important;
}
.btn-primary {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}
.btn-primary:hover {
  background: #588e55;
  border-color: #000000;
}
.btn-primary:focus,
.btn-primary:active,
.btn-primary:active:focus,
.btn-primary.active {
  background: var(--brand-accent) !important;
  border-color: var(--brand-accent) !important;
  box-shadow: none !important;
}
.btn-outline-primary {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
}
.btn-outline-primary:hover {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary:active:focus {
  box-shadow: none !important;
}
.btn-outline-danger:focus,
.btn-outline-danger:active,
.btn-outline-danger:active:focus {
  box-shadow: none !important;
}
.btn-danger:focus,
.btn-danger:active {
  box-shadow: none !important;
}
.btn-secondary:focus,
.btn-secondary:active {
  box-shadow: none !important;
}
.form-control:focus,
.form-select:focus {
  box-shadow: none !important;
  border-color: var(--brand-accent);
}
a:focus,
a:focus-visible {
  outline: none !important;
}

/* ── Table ───────────────────────────────────── */
.table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  font-weight: 600;
  white-space: nowrap;
}
.table td {
  vertical-align: middle;
}
.table-responsive {
  border-radius: 0 0 12px 12px;
}

/* ── Avatar ──────────────────────────────────── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Sidebar overlay (mobile) ────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1039;
}
.sidebar-overlay.show {
  display: block;
}

/* ── Mobile breakpoint ───────────────────────── */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  }
  .topbar {
    margin-left: 0;
    padding: 12px 16px;
  }
  .main-content {
    margin-left: 0;
    padding: 16px;
  }
  .hamburger {
    display: block;
  }
}

/* ── Tablet tweaks ───────────────────────────── */
@media (min-width: 992px) and (max-width: 1199px) {
  :root {
    --sidebar-w: 220px;
  }
  .main-content {
    padding: 20px;
  }
}

/* ── Stat cards ──────────────────────────────── */
.stat-card {
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  padding: 18px 20px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 4px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: #1a1a2e;
}
.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ── Form tweaks ─────────────────────────────── */
.form-label {
  font-weight: 500;
  font-size: 13.5px;
  color: #374151;
}
.form-control,
.form-select {
  border-color: #e8eaf0;
  font-size: 14px;
  border-radius: 8px;
}

/* ── Alerts ──────────────────────────────────── */
.alert {
  border-radius: 10px;
  font-size: 14px;
}

/* ── Badge pills ─────────────────────────────── */
.badge {
  font-weight: 500;
  letter-spacing: 0.2px;
}


