:root {
  --gb-sidebar-bg: #0c1210;
  --gb-sidebar-bg-active: #17271d;
  --gb-sidebar-text: #a8b6ac;
  --gb-sidebar-text-active: #ffffff;
  --gb-primary: #16a34a;
  --gb-primary-dark: #12813a;
  --gb-content-bg: #f5f7f5;
  --gb-topbar-h: 62px;
  --gb-sidebar-w: 250px;
  --gb-font-size-base: 1rem;
  --gb-font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: var(--gb-content-bg);
  font-family: var(--gb-font-family);
  font-size: var(--gb-font-size-base);
  color: #14171a;
}

/* ---------- Sidebar ---------- */
.gb-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--gb-sidebar-w);
  background: var(--gb-sidebar-bg);
  overflow-y: auto;
  z-index: 1040;
  transition: transform .2s ease;
}
.gb-sidebar-brand {
  height: var(--gb-topbar-h);
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 0 1.1rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.gb-sidebar-brand .gb-logo-dot {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gb-primary), #0f3d24);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  overflow: hidden;
}
.gb-sidebar-brand .gb-logo-dot img { width: 100%; height: 100%; object-fit: cover; }
.gb-sidebar .nav-link {
  color: var(--gb-sidebar-text);
  padding: .55rem 1.1rem;
  font-size: .9rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: .65rem;
  border-left: 3px solid transparent;
}
.gb-sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.gb-sidebar .nav-link:hover {
  background: rgba(255,255,255,.04);
  color: var(--gb-sidebar-text-active);
}
.gb-sidebar .nav-link.active {
  background: var(--gb-sidebar-bg-active);
  color: var(--gb-sidebar-text-active);
  border-left-color: var(--gb-primary);
  font-weight: 600;
}

/* ---------- Sidebar nav groups (collapsible submenus) ---------- */
.gb-nav { padding-top: .5rem; }
.gb-nav-group { margin: 0 0 .1rem; }
.gb-nav-group-toggle {
  width: 100%;
  background: none;
  border: none;
  color: var(--gb-sidebar-text);
  padding: .55rem 1.1rem;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.gb-nav-group-toggle i.bi:first-child { font-size: 1.05rem; width: 20px; text-align: center; }
.gb-nav-group-toggle:hover { background: rgba(255,255,255,.04); color: var(--gb-sidebar-text-active); }
.gb-nav-group-toggle.active { color: var(--gb-sidebar-text-active); font-weight: 600; }
.gb-chevron { font-size: .75rem !important; width: auto !important; transition: transform .18s ease; }
.gb-nav-group-toggle[aria-expanded="true"] .gb-chevron { transform: rotate(180deg); }
.gb-nav-submenu {
  padding: .15rem 0 .4rem;
  position: relative;
}
.gb-nav-submenu::before {
  content: "";
  position: absolute;
  left: 1.75rem;
  top: 0;
  bottom: .5rem;
  width: 1px;
  background: rgba(255,255,255,.08);
}
.gb-nav-submenu .nav-link {
  padding: .45rem .8rem .45rem 2.5rem;
  font-size: .855rem;
  border-left: 3px solid transparent;
}
.gb-nav-submenu .nav-link.active {
  background: var(--gb-sidebar-bg-active);
  border-left-color: var(--gb-primary);
}

/* ---------- Topbar ---------- */
.gb-topbar {
  position: sticky;
  top: 0;
  height: var(--gb-topbar-h);
  background: #fff;
  border-bottom: 1px solid #e7eaf3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 1030;
}
.gb-page-title { font-weight: 600; font-size: 1.05rem; color: #1c2333; }

/* ---------- Layout wrapper ---------- */
.gb-wrapper { margin-left: var(--gb-sidebar-w); min-height: 100vh; }
.gb-content { padding: 1.5rem; }

.gb-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16,26,44,.45);
  z-index: 1035;
}

@media (max-width: 991.98px) {
  .gb-sidebar { transform: translateX(-100%); }
  .gb-sidebar.show { transform: translateX(0); }
  .gb-wrapper { margin-left: 0; }
  .gb-sidebar-backdrop.show { display: block; }
}

/* ---------- Cards / widgets ---------- */
.gb-card {
  background: #fff;
  border: 1px solid #e7eaf3;
  border-radius: .6rem;
  box-shadow: 0 1px 2px rgba(16,26,44,.04);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
a:hover > .gb-card {
  box-shadow: 0 6px 16px rgba(16,26,44,.09);
  transform: translateY(-2px);
  border-color: #d3daf0;
}
.gb-stat-card { padding: 1.1rem 1.25rem; }
.gb-stat-icon {
  width: 46px; height: 46px; border-radius: .6rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem; color: #fff;
}
.gb-stat-card .gb-stat-value { font-size: 1.5rem; font-weight: 700; color: #1c2333; }
.gb-stat-card .gb-stat-label { font-size: .8rem; color: #6b7690; }

.btn-primary {
  background-color: var(--gb-primary);
  border-color: var(--gb-primary);
}
.btn-primary:hover { background-color: var(--gb-primary-dark); border-color: var(--gb-primary-dark); }

.table thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7690;
  border-bottom-width: 1px;
  background: #f8f9fc;
}

.badge-soft-success { background: #e5f7ee; color: #14804a; }
.badge-soft-danger { background: #fdecec; color: #c0392b; }
.badge-soft-warning { background: #fff6e0; color: #9a7300; }
.badge-soft-secondary { background: #eef0f6; color: #58607a; }

/* ---------- Split-screen auth ---------- */
.gb-auth-split {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.gb-auth-marketing {
  background: linear-gradient(150deg, #0c1210, #123522 65%, var(--gb-primary));
  padding: 2.5rem 1.75rem;
  display: flex;
  align-items: center;
}
.gb-auth-marketing-inner { max-width: 480px; margin: 0 auto; }
.gb-auth-feature {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-bottom: 1.1rem;
}
.gb-auth-feature i {
  font-size: 1.2rem;
  color: #fff;
  background: rgba(255,255,255,.12);
  width: 40px; height: 40px;
  border-radius: .6rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gb-auth-form-panel {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.gb-auth-card { width: 100%; max-width: 380px; }

@media (min-width: 992px) {
  .gb-auth-split { flex-direction: row; }
  .gb-auth-marketing { width: 55%; padding: 3rem; }
  .gb-auth-form-panel { width: 45%; }
}
