/**
 * Theme Override - Primary color: #314238 (dark green)
 */
:root,
[data-bs-theme="light"] {
    --bs-primary: #314238;
    --bs-primary-rgb: 49, 66, 56;
    --bs-primary-text-emphasis: rgb(19.6, 26.4, 22.4);
    --bs-primary-bg-subtle: rgb(232, 236, 234);
    --bs-primary-border-subtle: rgb(184, 196, 188);
    --bs-link-color: #314238;
    --bs-link-color-rgb: 49, 66, 56;
    --bs-link-hover-color: rgb(24.5, 33, 28);
    --bs-link-hover-color-rgb: 25, 33, 28;
    --bs-focus-ring-color: rgba(49, 66, 56, 0.25);
}

[data-bs-theme="dark"] {
    --bs-primary-text-emphasis: rgb(167.4, 177.6, 172);
    --bs-primary-bg-subtle: rgb(9.8, 13.2, 11.2);
    --bs-primary-border-subtle: rgb(73.5, 99, 84);
    --bs-link-color: rgb(167.4, 177.6, 172);
    --bs-link-color-rgb: 167, 178, 172;
    --bs-link-hover-color: rgb(186.2, 194.4, 189.6);
    --bs-link-hover-color-rgb: 186, 194, 190;
}

/* btn-primary - match primary color */
.btn-primary {
  --bs-btn-bg: #314238 !important;
  --bs-btn-border-color: #314238 !important;
  --bs-btn-hover-bg: #253029 !important;
  --bs-btn-hover-border-color: #253029 !important;
  --bs-btn-active-bg: #1e2720 !important;
  --bs-btn-active-border-color: #1e2720 !important;
  background-color: #314238 !important;
  border-color: #314238 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: #253029 !important;
  border-color: #253029 !important;
}

/* Gradient overrides */
.bg-gradient-primary {
    background-image: linear-gradient(310deg, #314238 0%, #4a5d52 100%) !important;
}

.text-gradient.text-primary {
    background-image: linear-gradient(310deg, #314238, #4a5d52) !important;
}

.btn.bg-gradient-primary:hover,
.btn.bg-gradient-primary:not(:disabled):not(.disabled).active,
.btn.bg-gradient-primary:not(:disabled):not(.disabled):active,
.show>.btn.bg-gradient-primary.dropdown-toggle {
    background-color: #314238 !important;
    border-color: #314238 !important;
}

.btn.bg-gradient-primary .btn.bg-outline-primary,
.fixed-plugin .btn.bg-gradient-primary:not(:disabled):not(.disabled):not(.active) {
    border-color: #314238 !important;
}

/* Sidebar active state - match primary color */
.navbar-vertical .navbar-nav>.nav-item .nav-link.active .icon,
.sidenav .navbar-nav>.nav-item .nav-link.active .icon {
    background: #314238 !important;
    background-image: linear-gradient(310deg, #314238 0%, #314238 100%) !important;
}

/* Sidenav data-color variants - ensure primary is used */
.sidenav[data-color="primary"] .navbar-nav>.nav-item>.nav-link.active .icon {
    background: #314238 !important;
    background-image: linear-gradient(310deg, #314238 0%, #314238 100%) !important;
}

/* Nav pills (member profile, etc.) - match primary color */
.nav.nav-pills.nav-pills-primary .nav-link.active,
.nav.nav-pills.nav-pills-primary .moving-tab .nav-link.active {
    background: #314238 !important;
    background-color: #314238 !important;
    color: #fff !important;
}

/* Vertical nav: one item per row, hide moving-tab (uses .nav-link.active instead) */
.nav.nav-pills.nav-pills-vertical.flex-column {
    flex-direction: column !important;
}
.nav.nav-pills.nav-pills-vertical.flex-column .moving-tab {
    display: none !important;
}

/* Text and icons using primary color */
.text-primary {
    color: #314238 !important;
}