/* Custom Color Overrides */
:root {
    /* Primary color override */
    --bs-primary: #2c844b !important;
    --bs-primary-rgb: 44, 132, 75 !important;
}

/* Override theme.min.css hardcoded primary colors */
.text-primary,
.link-primary,
a.text-primary,
a.link-primary {
    color: #2c844b !important;
}

.text-soft-primary {
    color: #a3d4b5 !important;
}

/* Background colors */
.bg-primary,
.badge.bg-primary,
.btn-primary,
.bg-blue {
    background-color: #2c844b !important;
}

.bg-soft-primary {
    background-color: #e6f4eb !important;
}

/* Border colors */
.border-primary,
.border-soft-primary {
    border-color: #2c844b !important;
}

/* Button styles */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #2c844b;
    --bs-btn-border-color: #2c844b;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #246b3d;
    --bs-btn-hover-border-color: #226639;
    --bs-btn-focus-shadow-rgb: 44, 132, 75;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #226639;
    --bs-btn-active-border-color: #206035;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #2c844b;
    --bs-btn-disabled-border-color: #2c844b;
}

.btn-outline-primary {
    --bs-btn-color: #2c844b;
    --bs-btn-border-color: #2c844b;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #2c844b;
    --bs-btn-hover-border-color: #2c844b;
    --bs-btn-focus-shadow-rgb: 44, 132, 75;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #2c844b;
    --bs-btn-active-border-color: #2c844b;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #2c844b;
    --bs-btn-disabled-bg: transparent;
    --bs-gradient: none;
}

/* Link colors */
.link-primary {
    color: #2c844b !important;
}

.link-primary:hover,
.link-primary:focus {
    color: #226639 !important;
}

/* Alert styles */
.alert-primary {
    --bs-alert-color: #1a4f2d;
    --bs-alert-bg: #d9f0e1;
    --bs-alert-border-color: #c9e8d5;
}

.alert-primary .alert-link {
    color: #143f24;
}

/* Table styles */
.table-primary {
    --bs-table-color: #000;
    --bs-table-bg: #d9f0e1;
    --bs-table-border-color: #c3d8cb;
    --bs-table-striped-bg: #cfe4d7;
    --bs-table-striped-color: #000;
    --bs-table-active-bg: #c3d8cb;
    --bs-table-active-color: #000;
    --bs-table-hover-bg: #c9ded1;
    --bs-table-hover-color: #000;
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}

/* List group styles */
.list-group-item-primary {
    color: #1a4f2d;
    background-color: #d9f0e1;
}

.list-group-item-primary.list-group-item-action:hover,
.list-group-item-primary.list-group-item-action:focus {
    color: #1a4f2d;
    background-color: #c3d8cb;
}

.list-group-item-primary.list-group-item-action.active {
    color: #fff;
    background-color: #1a4f2d;
    border-color: #1a4f2d;
}

/* Text background combinations */
.text-bg-primary {
    color: #fff !important;
    background-color: rgba(44, 132, 75, var(--bs-bg-opacity, 1)) !important;
}

/* Badge styles */
.badge.bg-primary {
    background-color: #2c844b !important;
}

/* Progress bar */
.progress-bar {
    background-color: #2c844b;
}

/* Form controls focus state */
.form-control:focus,
.form-select:focus {
    border-color: #2c844b;
    box-shadow: 0 0 0 0.25rem rgba(44, 132, 75, 0.25);
}

/* Pagination */
.page-link {
    color: #2c844b;
}

.page-link:hover {
    color: #226639;
    background-color: #e6f4eb;
    border-color: #dee2e6;
}

.page-link:focus {
    color: #226639;
    background-color: #e6f4eb;
    box-shadow: 0 0 0 0.25rem rgba(44, 132, 75, 0.25);
}

.page-item.active .page-link {
    background-color: #2c844b;
    border-color: #2c844b;
}

/* Nav pills */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #2c844b;
}

/* Dropdown hover states */
.dropdown-item.active,
.dropdown-item:active {
    background-color: #2c844b;
}

/* Sidebar and Navigation - Parent menus NEVER get background, only text color */
/* ANY menu with children (.nxl-hasmenu) - NO background at all */
.nxl-hasmenu > .nxl-link,
.nxl-hasmenu.active > .nxl-link,
.nxl-navbar .nxl-hasmenu > .nxl-link,
.nxl-navbar .nxl-hasmenu.active > .nxl-link,
.nxl-navigation .nxl-hasmenu > .nxl-link,
.nxl-navigation .nxl-hasmenu.active > .nxl-link {
    background-color: transparent !important;
}

/* Parent menu active state - ONLY text color, NO background */
.nxl-hasmenu.active > .nxl-link,
.nxl-hasmenu.active > .nxl-link * {
    color: #2c844b !important;
}

/* ONLY leaf menu items (items without children inside submenus) get green background */
.nxl-submenu .nxl-item:not(.nxl-hasmenu).active > a,
.nxl-submenu .nxl-item:not(.nxl-hasmenu).active > .nxl-link {
    background-color: #2c844b !important;
    color: #fff !important;
}

/* Make absolutely sure no active class adds background to any item */
.nxl-item.active,
.nxl-item.active > .nxl-link {
    background-color: transparent !important;
}

/* Parent menu icon gets green color when child is active */
.nxl-hasmenu.active > .nxl-link .nxl-micon {
    color: #2c844b !important;
}

/* Hover states - light background on hover only for non-parent items */
.nxl-submenu a:hover {
    background-color: rgba(44, 132, 75, 0.1) !important;
}

/* Card headers with primary */
.card-header.bg-primary {
    background-color: #2c844b !important;
}

/* Stats cards and widgets */
.card.border-primary {
    border-color: #2c844b !important;
}

/* DataTables and other components */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: #2c844b !important;
    border-color: #2c844b !important;
    color: #fff !important;
}

/* Select2 dropdown primary selections */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted {
    background-color: #2c844b !important;
}

/* Switch/Toggle primary */
.form-check-input:checked,
.form-switch .form-check-input:checked {
    background-color: #2c844b !important;
    border-color: #2c844b !important;
}

/* Range slider */
.form-range::-webkit-slider-thumb {
    background-color: #2c844b !important;
}

.form-range::-moz-range-thumb {
    background-color: #2c844b !important;
}

/* Tabs active state */
.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
    background-color: #2c844b !important;
    color: #fff !important;
}

/* Spinners and loaders */
.spinner-border.text-primary,
.spinner-grow.text-primary {
    color: #2c844b !important;
}

/* Tooltips */
.tooltip.bs-tooltip-primary .tooltip-inner {
    background-color: #2c844b !important;
}

/* Popovers */
.popover.bs-popover-primary .popover-header {
    background-color: #2c844b !important;
}

/* Modal headers */
.modal-header.bg-primary {
    background-color: #2c844b !important;
}

