/* Custom CSS to override AdminLTE default colors with brand colors */

/* Brand Colors */
:root {
    --brand-primary: rgb(4, 62, 34);
    --brand-secondary: rgb(129, 184, 41);
    --brand-info: rgb(41, 128, 185);
    --brand-success: rgb(39, 174, 96);
    --brand-warning: rgb(243, 156, 18);
    --brand-danger: rgb(231, 76, 60);
    --brand-default: rgb(108, 117, 125);
    --brand-light: rgb(248, 249, 250);
    --brand-dark: rgb(52, 58, 64);
}

/* Primary color (dark green) */
.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: rgba(4, 62, 34, 0.9) !important;
    border-color: var(--brand-primary) !important;
}

.btn-outline-primary {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--brand-primary) !important;
    color: white !important;
}

/* Secondary color (light green) */
.btn-secondary {
    background-color: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
}

.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
    background-color: rgba(129, 184, 41, 0.9) !important;
    border-color: var(--brand-secondary) !important;
}

.btn-outline-secondary {
    color: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-outline-secondary:active {
    background-color: var(--brand-secondary) !important;
    color: white !important;
}

/* Info color (blue) */
.btn-info {
    background-color: var(--brand-info) !important;
    border-color: var(--brand-info) !important;
}

.btn-info:hover, .btn-info:focus, .btn-info:active {
    background-color: rgba(41, 128, 185, 0.9) !important;
    border-color: var(--brand-info) !important;
}

.btn-outline-info {
    color: var(--brand-info) !important;
    border-color: var(--brand-info) !important;
}

.btn-outline-info:hover, .btn-outline-info:focus, .btn-outline-info:active {
    background-color: var(--brand-info) !important;
    color: white !important;
}

/* Success color (green) */
.btn-success {
    background-color: var(--brand-success) !important;
    border-color: var(--brand-success) !important;
}

.btn-success:hover, .btn-success:focus, .btn-success:active {
    background-color: rgba(39, 174, 96, 0.9) !important;
    border-color: var(--brand-success) !important;
}

.btn-outline-success {
    color: var(--brand-success) !important;
    border-color: var(--brand-success) !important;
}

.btn-outline-success:hover, .btn-outline-success:focus, .btn-outline-success:active {
    background-color: var(--brand-success) !important;
    color: white !important;
}

/* Warning color (orange) */
.btn-warning {
    background-color: var(--brand-warning) !important;
    border-color: var(--brand-warning) !important;
}

.btn-warning:hover, .btn-warning:focus, .btn-warning:active {
    background-color: rgba(243, 156, 18, 0.9) !important;
    border-color: var(--brand-warning) !important;
}

.btn-outline-warning {
    color: var(--brand-warning) !important;
    border-color: var(--brand-warning) !important;
}

.btn-outline-warning:hover, .btn-outline-warning:focus, .btn-outline-warning:active {
    background-color: var(--brand-warning) !important;
    color: white !important;
}

/* Danger color (red) */
.btn-danger {
    background-color: var(--brand-danger) !important;
    border-color: var(--brand-danger) !important;
}

.btn-danger:hover, .btn-danger:focus, .btn-danger:active {
    background-color: rgba(231, 76, 60, 0.9) !important;
    border-color: var(--brand-danger) !important;
}

.btn-outline-danger {
    color: var(--brand-danger) !important;
    border-color: var(--brand-danger) !important;
}

.btn-outline-danger:hover, .btn-outline-danger:focus, .btn-outline-danger:active {
    background-color: var(--brand-danger) !important;
    color: white !important;
}

/* Default color (gray) */
.btn-default {
    background-color: var(--brand-default) !important;
    border-color: var(--brand-default) !important;
    color: white !important;
}

.btn-default:hover, .btn-default:focus, .btn-default:active {
    background-color: rgba(108, 117, 125, 0.9) !important;
    border-color: var(--brand-default) !important;
}

.btn-outline-default {
    color: var(--brand-default) !important;
    border-color: var(--brand-default) !important;
}

.btn-outline-default:hover, .btn-outline-default:focus, .btn-outline-default:active {
    background-color: var(--brand-default) !important;
    color: white !important;
}

/* Light color */
.btn-light {
    background-color: var(--brand-light) !important;
    border-color: var(--brand-light) !important;
    color: var(--brand-dark) !important;
}

.btn-light:hover, .btn-light:focus, .btn-light:active {
    background-color: rgba(248, 249, 250, 0.9) !important;
    border-color: var(--brand-light) !important;
}

.btn-outline-light {
    color: var(--brand-light) !important;
    border-color: var(--brand-light) !important;
}

.btn-outline-light:hover, .btn-outline-light:focus, .btn-outline-light:active {
    background-color: var(--brand-light) !important;
    color: var(--brand-dark) !important;
}

/* Dark color */
.btn-dark {
    background-color: var(--brand-dark) !important;
    border-color: var(--brand-dark) !important;
    color: white !important;
}

.btn-dark:hover, .btn-dark:focus, .btn-dark:active {
    background-color: rgba(52, 58, 64, 0.9) !important;
    border-color: var(--brand-dark) !important;
}

.btn-outline-dark {
    color: var(--brand-dark) !important;
    border-color: var(--brand-dark) !important;
}

.btn-outline-dark:hover, .btn-outline-dark:focus, .btn-outline-dark:active {
    background-color: var(--brand-dark) !important;
    color: white !important;
}

/* Link button */
.btn-link {
    color: var(--brand-primary) !important;
    text-decoration: none;
    background-color: transparent !important;
    border-color: transparent !important;
}

.btn-link:hover, .btn-link:focus, .btn-link:active {
    color: rgba(4, 62, 34, 0.8) !important;
    text-decoration: underline;
}

/* Card and other UI elements */
/* Primary */
.card-primary:not(.card-outline) > .card-header {
    background-color: var(--brand-primary) !important;
}

.card-primary.card-outline {
    border-top: 3px solid var(--brand-primary) !important;
}

.bg-primary {
    background-color: var(--brand-primary) !important;
}

.text-primary {
    color: var(--brand-primary) !important;
}

/* Secondary */
.card-secondary:not(.card-outline) > .card-header {
    background-color: var(--brand-secondary) !important;
}

.card-secondary.card-outline {
    border-top: 3px solid var(--brand-secondary) !important;
}

.bg-secondary {
    background-color: var(--brand-secondary) !important;
}

.text-secondary {
    color: var(--brand-secondary) !important;
}

/* Info */
.card-info:not(.card-outline) > .card-header {
    background-color: var(--brand-info) !important;
}

.card-info.card-outline {
    border-top: 3px solid var(--brand-info) !important;
}

.bg-info {
    background-color: var(--brand-info) !important;
}

.text-info {
    color: var(--brand-info) !important;
}

/* Success */
.card-success:not(.card-outline) > .card-header {
    background-color: var(--brand-success) !important;
}

.card-success.card-outline {
    border-top: 3px solid var(--brand-success) !important;
}

.bg-success {
    background-color: var(--brand-success) !important;
}

.text-success {
    color: var(--brand-success) !important;
}

/* Warning */
.card-warning:not(.card-outline) > .card-header {
    background-color: var(--brand-warning) !important;
}

.card-warning.card-outline {
    border-top: 3px solid var(--brand-warning) !important;
}

.bg-warning {
    background-color: var(--brand-warning) !important;
}

.text-warning {
    color: var(--brand-warning) !important;
}

/* Danger */
.card-danger:not(.card-outline) > .card-header {
    background-color: var(--brand-danger) !important;
}

.card-danger.card-outline {
    border-top: 3px solid var(--brand-danger) !important;
}

.bg-danger {
    background-color: var(--brand-danger) !important;
}

.text-danger {
    color: var(--brand-danger) !important;
}

/* Default */
.card-default:not(.card-outline) > .card-header {
    background-color: var(--brand-default) !important;
    color: white !important;
}

.card-default.card-outline {
    border-top: 3px solid var(--brand-default) !important;
}

.bg-default {
    background-color: var(--brand-default) !important;
    color: white !important;
}

.text-default {
    color: var(--brand-default) !important;
}

/* Light */
.card-light:not(.card-outline) > .card-header {
    background-color: var(--brand-light) !important;
    color: var(--brand-dark) !important;
}

.card-light.card-outline {
    border-top: 3px solid var(--brand-light) !important;
}

.bg-light {
    background-color: var(--brand-light) !important;
    color: var(--brand-dark) !important;
}

.text-light {
    color: var(--brand-light) !important;
}

/* Dark */
.card-dark:not(.card-outline) > .card-header {
    background-color: var(--brand-dark) !important;
    color: white !important;
}

.card-dark.card-outline {
    border-top: 3px solid var(--brand-dark) !important;
}

.bg-dark {
    background-color: var(--brand-dark) !important;
    color: white !important;
}

.text-dark {
    color: var(--brand-dark) !important;
}

/* Sidebar */
/* Sidebar background */
.sidebar-dark-primary {
    background-color: var(--brand-primary) !important;
}

/* Sidebar search input */
.sidebar-dark-primary .form-control-sidebar,
.sidebar-dark-primary .btn-sidebar,
.sidebar-dark-primary .form-control.form-control-sidebar,
.sidebar-dark-primary input.form-control-sidebar {
    background-color: rgba(10, 80, 45, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.sidebar-dark-primary .form-control-sidebar:focus,
.sidebar-dark-primary .btn-sidebar:focus,
.sidebar-dark-primary .form-control.form-control-sidebar:focus,
.sidebar-dark-primary input.form-control-sidebar:focus {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
}

/* Brand logo area in sidebar */
.brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

.brand-link .brand-image {
    box-shadow: 0 0 0 0.1rem rgba(255, 255, 255, 0.2) !important;
    background: #81b829;
    padding: 5px;
}

.brand-link .brand-text {
    color: white !important;
}

/* Sidebar scrollbar */
.os-theme-light > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

.os-theme-light > .os-scrollbar:hover > .os-scrollbar-track > .os-scrollbar-handle {
    background-color: rgba(255, 255, 255, 0.4) !important;
}

.os-theme-light > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle.active {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

/* Sidebar text and icons */
.sidebar-dark-primary .nav-sidebar .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Sidebar hover state */
.sidebar-dark-primary .nav-sidebar .nav-item .nav-link:hover {
    color: white !important;
    background-color: rgba(129, 184, 41, 0.3) !important;
}

/* Sidebar header */
.sidebar-dark-primary .nav-header {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Sidebar treeview */
.sidebar-dark-primary .nav-treeview > .nav-item > .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar-dark-primary .nav-treeview > .nav-item > .nav-link:hover {
    background-color: rgba(129, 184, 41, 0.2) !important;
    color: white !important;
}

.sidebar-dark-primary .nav-treeview > .nav-item > .nav-link.active {
    background-color: rgba(129, 184, 41, 0.6) !important;
    color: white !important;
}

/* Primary sidebar */
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: rgba(129, 184, 41, 0.8) !important;
}

/* Secondary sidebar */
.sidebar-dark-secondary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-secondary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--brand-secondary) !important;
}

/* Info sidebar */
.sidebar-dark-info .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-info .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--brand-info) !important;
}

/* Success sidebar */
.sidebar-dark-success .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-success .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--brand-success) !important;
}

/* Warning sidebar */
.sidebar-dark-warning .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-warning .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--brand-warning) !important;
}

/* Danger sidebar */
.sidebar-dark-danger .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-danger .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--brand-danger) !important;
}

/* Dark sidebar */
.sidebar-dark-dark .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-dark .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--brand-dark) !important;
}

/* Background colors */
/* Main body background */
body {
    background-color: var(--brand-light) !important;
}

/* Content wrapper */
.content-wrapper {
    background-color: #f4f6f9 !important;
}

/* Content header */
.content-header {
    background-color: rgba(129, 184, 41, 0.1) !important;
}

/* Main content */
.content {
    background-color: transparent !important;
}

/* Card body */
.card-body {
    background-color: white !important;
}

/* Navbar */
.main-header.navbar.navbar-white.navbar-light {
    background-color: white !important;
    border-bottom: 1px solid rgba(4, 62, 34, 0.2) !important;
}

/* Navbar brand */
.navbar-brand {
    background-color: var(--brand-primary) !important;
    color: white !important;
}

/* Footer */
.main-footer {
    background-color: white !important;
    border-top: 1px solid rgba(4, 62, 34, 0.2) !important;
    color: var(--brand-primary) !important;
}

/* Tables */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(129, 184, 41, 0.05) !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(4, 62, 34, 0.05) !important;
}

/* Form inputs */
.form-control:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(4, 62, 34, 0.25) !important;
}

/* Dropdown menus */
.dropdown-menu {
    background-color: white !important;
    border: 1px solid rgba(4, 62, 34, 0.15) !important;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(129, 184, 41, 0.1) !important;
    color: var(--brand-primary) !important;
}

/* Modal backgrounds */
.modal-content {
    background-color: white !important;
}

.modal-header {
    background-color: rgba(129, 184, 41, 0.1) !important;
    border-bottom: 1px solid rgba(4, 62, 34, 0.2) !important;
}

.modal-footer {
    background-color: rgba(248, 249, 250, 0.5) !important;
    border-top: 1px solid rgba(4, 62, 34, 0.2) !important;
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.pagination .page-link {
    color: var(--brand-primary) !important;
}

.pagination .page-link:hover {
    background-color: rgba(4, 62, 34, 0.1) !important;
}

/* Alerts */
.alert-primary {
    background-color: rgba(4, 62, 34, 0.1) !important;
    border-color: rgba(4, 62, 34, 0.2) !important;
    color: var(--brand-primary) !important;
}

.alert-secondary {
    background-color: rgba(129, 184, 41, 0.1) !important;
    border-color: rgba(129, 184, 41, 0.2) !important;
    color: var(--brand-secondary) !important;
}

/* Badges */
.badge-primary {
    background-color: var(--brand-primary) !important;
}

.badge-secondary {
    background-color: var(--brand-secondary) !important;
}

/* List groups */
.list-group-item.active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

/* Links */
a {
    color: var(--brand-primary);
}

a:hover {
    color: rgba(4, 62, 34, 0.8);
}
