/* Custom Green Theme for Metronic 8.2.6 */

/* Primary Colors */
:root {
    --kt-primary: #28a745 !important;
    --kt-primary-active: #1e7e34 !important;
    --kt-primary-light: #d4edda !important;
    --kt-primary-inverse: #ffffff !important;
}

/* Button Styles */
.btn-primary {
    background-color: var(--kt-primary) !important;
    border-color: var(--kt-primary) !important;
}

.btn-primary:hover {
    background-color: var(--kt-primary-active) !important;
    border-color: var(--kt-primary-active) !important;
}

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

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

/* Form Controls */
.form-control:focus {
    border-color: var(--kt-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.form-select:focus {
    border-color: var(--kt-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Links */
a {
    color: var(--kt-primary) !important;
}

a:hover {
    color: var(--kt-primary-active) !important;
}

/* Navigation */
.nav-link.active {
    background-color: var(--kt-primary) !important;
    color: var(--kt-primary-inverse) !important;
}

.nav-pills .nav-link.active {
    background-color: var(--kt-primary) !important;
}

/* Cards */
.card.border-primary {
    border-color: var(--kt-primary) !important;
}

.card-header.bg-primary {
    background-color: var(--kt-primary) !important;
}

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

.badge.text-bg-primary {
    background-color: var(--kt-primary) !important;
}

/* Progress Bars */
.progress-bar.bg-primary {
    background-color: var(--kt-primary) !important;
}

/* Alerts */
.alert-primary {
    color: #0f5132 !important;
    background-color: #d1e7dd !important;
    border-color: #badbcc !important;
}

/* Tables */
.table-primary {
    background-color: var(--kt-primary-light) !important;
}

.table-primary > th,
.table-primary > td {
    background-color: var(--kt-primary-light) !important;
}

/* List Groups */
.list-group-item-primary {
    color: #0f5132 !important;
    background-color: #d1e7dd !important;
}

/* Dropdown */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--kt-primary) !important;
}

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

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

.page-link:hover {
    color: var(--kt-primary-active) !important;
}

/* Modal */
.modal-header.bg-primary {
    background-color: var(--kt-primary) !important;
}

/* Custom Sidebar */
.sidebar {
    background: linear-gradient(180deg, #1e7e34 0%, #28a745 100%) !important;
}

.menu-item:hover {
    border-left-color: var(--kt-primary) !important;
}

.menu-item.active {
    border-left-color: var(--kt-primary) !important;
}

/* Custom Welcome Cards */
.welcome-card {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

/* Custom Stats Cards */
.stats-card {
    border-left: 4px solid var(--kt-primary) !important;
}

/* Custom Buttons */
.btn-success {
    background-color: var(--kt-primary) !important;
    border-color: var(--kt-primary) !important;
}

.btn-success:hover {
    background-color: var(--kt-primary-active) !important;
    border-color: var(--kt-primary-active) !important;
}

/* Custom Text Colors */
.text-primary {
    color: var(--kt-primary) !important;
}

/* Custom Background Colors */
.bg-primary {
    background-color: var(--kt-primary) !important;
}

/* Custom Border Colors */
.border-primary {
    border-color: var(--kt-primary) !important;
}

/* Custom Shadow */
.shadow-primary {
    box-shadow: 0 0.5rem 1rem rgba(40, 167, 69, 0.15) !important;
}

/* Custom Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--kt-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Custom Hover Effects */
.btn:hover {
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Custom Card Hover */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(40, 167, 69, 0.15) !important;
    transition: all 0.3s ease;
}

/* Custom Loading Spinner */
.spinner-border.text-primary {
    color: var(--kt-primary) !important;
}

/* Custom Checkbox and Radio */
.form-check-input:checked {
    background-color: var(--kt-primary) !important;
    border-color: var(--kt-primary) !important;
}

.form-check-input:focus {
    border-color: var(--kt-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Custom Switch */
.form-switch .form-check-input:checked {
    background-color: var(--kt-primary) !important;
    border-color: var(--kt-primary) !important;
}

/* Custom Range */
.form-range::-webkit-slider-thumb {
    background-color: var(--kt-primary) !important;
}

.form-range::-moz-range-thumb {
    background-color: var(--kt-primary) !important;
}

/* Custom Tooltip */
.tooltip-inner {
    background-color: var(--kt-primary) !important;
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--kt-primary) !important;
}

.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: var(--kt-primary) !important;
}

.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: var(--kt-primary) !important;
}

.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: var(--kt-primary) !important;
}

/* Custom Popover */
.popover-header {
    background-color: var(--kt-primary) !important;
    color: var(--kt-primary-inverse) !important;
}

/* Custom Toast */
.toast-header.bg-primary {
    background-color: var(--kt-primary) !important;
}

/* Custom Accordion */
.accordion-button:not(.collapsed) {
    background-color: var(--kt-primary-light) !important;
    color: var(--kt-primary) !important;
}

.accordion-button:focus {
    border-color: var(--kt-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Custom Tabs */
.nav-tabs .nav-link.active {
    color: var(--kt-primary) !important;
    border-color: var(--kt-primary) var(--kt-primary) #fff !important;
}

.nav-tabs .nav-link:hover {
    border-color: var(--kt-primary-light) var(--kt-primary-light) var(--kt-primary) !important;
}

/* Custom Breadcrumb */
.breadcrumb-item.active {
    color: var(--kt-primary) !important;
}

/* Custom Close Button */
.btn-close:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Custom Form Validation */
.was-validated .form-control:valid {
    border-color: var(--kt-primary) !important;
}

.was-validated .form-control:valid:focus {
    border-color: var(--kt-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.was-validated .form-select:valid {
    border-color: var(--kt-primary) !important;
}

.was-validated .form-select:valid:focus {
    border-color: var(--kt-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Custom Input Groups */
.input-group-text {
    background-color: var(--kt-primary-light) !important;
    border-color: var(--kt-primary) !important;
    color: var(--kt-primary) !important;
}

/* Custom Floating Labels */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--kt-primary) !important;
}

/* Custom Spinners */
.spinner-grow.text-primary {
    color: var(--kt-primary) !important;
}

/* Custom Offcanvas */
.offcanvas-header.bg-primary {
    background-color: var(--kt-primary) !important;
}

/* Custom Carousel */
.carousel-indicators [data-bs-target] {
    background-color: var(--kt-primary) !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(120deg) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar-thumb {
    background-color: var(--kt-primary) !important;
}

::-webkit-scrollbar-track {
    background-color: var(--kt-primary-light) !important;
}

/* Custom Selection */
::selection {
    background-color: var(--kt-primary) !important;
    color: var(--kt-primary-inverse) !important;
}

::-moz-selection {
    background-color: var(--kt-primary) !important;
    color: var(--kt-primary-inverse) !important;
}

/* Custom Green Gradient Sidebar Styles */

/* Sidebar Background Gradient */
.app-sidebar {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%) !important;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3) !important;
}

/* Sidebar Logo Area */
.app-sidebar-logo {
    background: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Menu Items */
.app-sidebar .menu-item .menu-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease !important;
}

.app-sidebar .menu-item .menu-link:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    transform: translateX(5px) !important;
}

/* Active Menu Item */
.app-sidebar .menu-item .menu-link.active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
    color: #ffffff !important;
    border-left: 4px solid #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Menu Icons */
.app-sidebar .menu-item .menu-icon i {
    color: rgba(255, 255, 255, 0.8) !important;
}

.app-sidebar .menu-item .menu-link:hover .menu-icon i,
.app-sidebar .menu-item .menu-link.active .menu-icon i {
    color: #ffffff !important;
}

/* Menu Titles */
.app-sidebar .menu-item .menu-title {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
}

.app-sidebar .menu-item .menu-link:hover .menu-title,
.app-sidebar .menu-item .menu-link.active .menu-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Sub Menu Items */
.app-sidebar .menu-sub .menu-item .menu-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding-left: 2.5rem !important;
}

.app-sidebar .menu-sub .menu-item .menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.app-sidebar .menu-sub .menu-item .menu-link.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-left: 3px solid #ffffff !important;
}

/* Menu Bullets */
.app-sidebar .menu-sub .menu-item .menu-bullet .bullet {
    background-color: rgba(255, 255, 255, 0.6) !important;
}

.app-sidebar .menu-sub .menu-item .menu-link:hover .menu-bullet .bullet,
.app-sidebar .menu-sub .menu-item .menu-link.active .menu-bullet .bullet {
    background-color: #ffffff !important;
}

/* Menu Accordion Arrows */
.app-sidebar .menu-item.menu-accordion .menu-arrow {
    color: rgba(255, 255, 255, 0.7) !important;
}

.app-sidebar .menu-item.menu-accordion .menu-link:hover .menu-arrow,
.app-sidebar .menu-item.menu-accordion .menu-link.active .menu-arrow {
    color: #ffffff !important;
}

/* Sub Menu Container */
.app-sidebar .menu-sub {
    background: rgba(0, 0, 0, 0.1) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Scrollbar Styling */
.app-sidebar .scroll-y::-webkit-scrollbar {
    width: 6px !important;
}

.app-sidebar .scroll-y::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 3px !important;
}

.app-sidebar .scroll-y::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 3px !important;
}

.app-sidebar .scroll-y::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* Sidebar Toggle Button */
.app-sidebar-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.app-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* Minimized Sidebar */
.app-sidebar-minimize .app-sidebar {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}

/* Mobile Sidebar */
@media (max-width: 991.98px) {
    .app-sidebar {
        background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%) !important;
    }
}

/* Animation for menu items */
.app-sidebar .menu-item .menu-link {
    position: relative !important;
    overflow: hidden !important;
}

.app-sidebar .menu-item .menu-link::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent) !important;
    transition: left 0.5s ease !important;
}

.app-sidebar .menu-item .menu-link:hover::before {
    left: 100% !important;
}

/* Enhanced shadow effect */
.app-sidebar::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 1px !important;
    height: 100% !important;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent) !important;
}
