/**
 * Custom Theme Color Override
 * Mengubah warna primary dari ungu ke hijau #4cc56e
 */

:root {
    --bs-primary: #4cc56e;
    --bs-primary-rgb: 76, 197, 110;
}

/* Primary Color Overrides */
.bg-primary,
.badge.bg-primary {
    background-color: #4cc56e !important;
}

.bg-gradient-primary {
    background-image: linear-gradient(
        310deg,
        #4cc56e 0%,
        #3aa55a 100%
    ) !important;
}

.text-primary,
.link-primary {
    color: #4cc56e !important;
}

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

.border-primary {
    border-color: #4cc56e !important;
}

/* Button Primary */
.btn-primary,
.btn.bg-gradient-primary {
    background-color: #4cc56e !important;
    border-color: #4cc56e !important;
}

.btn-primary:hover,
.btn.bg-gradient-primary:hover {
    background-color: #3aa55a !important;
    border-color: #3aa55a !important;
}

.btn-primary:focus,
.btn.bg-gradient-primary:focus {
    background-color: #3aa55a !important;
    border-color: #3aa55a !important;
    box-shadow: 0 0 0 0.2rem rgba(76, 197, 110, 0.5) !important;
}

.btn-primary:active,
.btn.bg-gradient-primary:active,
.btn-primary.active,
.btn.bg-gradient-primary.active {
    background-color: #329950 !important;
    border-color: #329950 !important;
}

.btn-outline-primary {
    color: #4cc56e !important;
    border-color: #4cc56e !important;
}

.btn-outline-primary:hover {
    background-color: #4cc56e !important;
    border-color: #4cc56e !important;
}

/* Alert Primary */
.alert-primary {
    background-color: rgba(76, 197, 110, 0.2) !important;
    border-color: #4cc56e !important;
    color: #329950 !important;
}

/* Icon Background Primary */
.icon-shape.bg-gradient-primary {
    background-image: linear-gradient(
        310deg,
        #4cc56e 0%,
        #3aa55a 100%
    ) !important;
}

/* Pagination Primary */
.pagination.pagination-primary .page-item.active > .page-link {
    background-color: #4cc56e !important;
    border-color: #4cc56e !important;
}

/* Nav Pills Primary */
.nav.nav-pills.nav-pills-primary .nav-link.active {
    background-color: #4cc56e !important;
}

/* Progress Bar Primary */
.progress-bar.bg-primary {
    background-color: #4cc56e !important;
}

/* Chart Line Color (untuk grafik) */
.chart-canvas {
    --chart-primary-color: #4cc56e;
}

/* Text Gradient Primary */
.text-gradient.text-primary {
    background-image: linear-gradient(
        310deg,
        #4cc56e 0%,
        #3aa55a 100%
    ) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Sidebar Active Link */
.sidenav[data-color="primary"] .navbar-nav > .nav-item .nav-link.active {
    background-color: #4cc56e !important;
}

/* Sidenav Background & Styling */
.sidenav {
    background-color: #ffffff !important;
}

.sidenav .navbar-brand-img,
.sidenav .navbar-brand {
    border-bottom: 1px solid rgba(76, 197, 110, 0.1) !important;
}

.sidenav .nav-link.active,
.sidenav .nav-link.active .icon {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
    color: #fff !important;
    box-shadow: 0 20px 27px 0 rgba(76, 197, 110, 0.15) !important;
}

.sidenav .nav-link:hover {
    background-color: rgba(76, 197, 110, 0.1) !important;
}

.sidenav .nav-link.active:before {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
}

/* Navbar */
.navbar-main {
    background-color: #ffffff !important;
}

.navbar-main .navbar-brand,
.navbar-main .nav-link {
    color: #344767 !important;
}

.navbar-main .nav-link:hover {
    color: #4cc56e !important;
}

/* Dropdown Menu Active */
.dropdown-item.active,
.dropdown-item:active {
    background-color: #4cc56e !important;
    color: #fff !important;
}

.dropdown-item:hover {
    background-color: rgba(76, 197, 110, 0.1) !important;
    color: #4cc56e !important;
}

/* Breadcrumb */
.breadcrumb-item.active {
    color: #4cc56e !important;
}

.breadcrumb-item a:hover {
    color: #4cc56e !important;
}

/* Card Header dengan Background Primary */
.card-header.bg-gradient-primary {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
}

/* Timeline */
.timeline .timeline-one-side:before {
    background: linear-gradient(
        to bottom,
        rgba(76, 197, 110, 0),
        #4cc56e,
        rgba(76, 197, 110, 0)
    ) !important;
}

.timeline .timeline-step {
    background-color: #4cc56e !important;
}

/* Input Group Text Primary */
.input-group-text.bg-gradient-primary {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
}

/* Switch/Toggle Primary */
.form-check-input:checked[type="checkbox"],
.form-switch .form-check-input:checked {
    background-color: #4cc56e !important;
    border-color: #4cc56e !important;
}

/* Spinner Primary */
.spinner-border.text-primary {
    color: #4cc56e !important;
}

.spinner-grow.text-primary {
    color: #4cc56e !important;
}

/* Scrollbar Thumb */
::-webkit-scrollbar-thumb {
    background-color: rgba(76, 197, 110, 0.5) !important;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #4cc56e !important;
}

/* Tab Primary */
.nav-tabs .nav-link.active {
    border-color: #4cc56e #4cc56e #fff !important;
    color: #4cc56e !important;
}

.nav-tabs .nav-link:hover {
    border-color: rgba(76, 197, 110, 0.3) !important;
    color: #4cc56e !important;
}

/* Accordion Primary */
.accordion-button:not(.collapsed) {
    background-color: rgba(76, 197, 110, 0.1) !important;
    color: #4cc56e !important;
}

/* Tooltip & Popover Primary */
.tooltip-inner {
    background-color: #4cc56e !important;
}

.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #4cc56e !important;
}

/* Modal Header Primary */
.modal-header.bg-gradient-primary {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
}

/* Stats Card Icon Background */
.icon-shape.bg-gradient-primary,
.icon.icon-shape.bg-gradient-primary {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
}

/* Footer Links */
.footer a:hover {
    color: #4cc56e !important;
}

/* Fixed Plugin Button */
.fixed-plugin .fixed-plugin-button {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
}

.fixed-plugin .btn.bg-gradient-primary.active {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
}

/* Waves Animation */
.waves-effect.waves-primary .waves-ripple {
    background-color: rgba(76, 197, 110, 0.3) !important;
}

/* Avatar Border Primary */
.avatar-group .avatar.border-primary {
    border-color: #4cc56e !important;
}

/* Calendar Events Primary */
.fc-event.fc-event-primary {
    background-color: #4cc56e !important;
    border-color: #4cc56e !important;
}

/* Choices.js Primary (Dropdown Select) */
.choices[data-type*="select-one"] .choices__inner,
.choices[data-type*="select-multiple"] .choices__inner {
    border-color: rgba(76, 197, 110, 0.3) !important;
}

.choices__item.choices__item--selectable.is-highlighted {
    background-color: #4cc56e !important;
}

/* Quill Editor Primary */
.ql-snow .ql-stroke.ql-fill {
    fill: #4cc56e !important;
}

.ql-toolbar.ql-snow .ql-picker-label:hover,
.ql-toolbar.ql-snow .ql-picker-item:hover {
    color: #4cc56e !important;
}

/* Sweet Alert Primary */
.swal2-styled.swal2-confirm {
    background-color: #4cc56e !important;
    border-color: #4cc56e !important;
}

.swal2-styled.swal2-confirm:hover {
    background-color: #3aa55a !important;
}

/* DataTables Primary */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #4cc56e !important;
    border-color: #4cc56e !important;
}

/* Select2 Primary */
.select2-container--default
    .select2-results__option--highlighted[aria-selected] {
    background-color: #4cc56e !important;
}

.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice {
    background-color: #4cc56e !important;
}

/* Range Slider Primary */
input[type="range"]::-webkit-slider-thumb {
    background-color: #4cc56e !important;
}

input[type="range"]::-moz-range-thumb {
    background-color: #4cc56e !important;
}

/* Active State untuk semua elemen interaktif */
a:active,
button:active,
.btn:active {
    color: #4cc56e !important;
}

/* Link Hover State Global */
a:hover:not(.btn):not(.nav-link) {
    color: #4cc56e !important;
}

/* Focus Visible untuk Accessibility */
*:focus-visible {
    outline-color: #4cc56e !important;
}

/* Form Control Focus */
.form-control:focus,
.form-select:focus {
    border-color: #4cc56e !important;
}

/* Checkbox & Radio Primary */
.form-check-input:checked {
    background-color: #4cc56e !important;
    border-color: #4cc56e !important;
}

/* Table Primary */
.table-primary {
    background-color: rgba(76, 197, 110, 0.1) !important;
}

/* List Group Item Primary */
.list-group-item-primary {
    background-color: rgba(76, 197, 110, 0.2) !important;
    color: #329950 !important;
}

/* Badge Primary */
.badge.badge-primary,
.badge.bg-gradient-primary {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
}

/* Card Background Mask Primary */
.card.card-background.card-background-mask-primary:after {
    background: linear-gradient(310deg, #4cc56e 0%, #3aa55a 100%) !important;
}

/* Blur Gradient Primary */
.blur-section.blur-gradient-primary {
    background: linear-gradient(
        310deg,
        rgba(76, 197, 110, 0.9) 0%,
        rgba(58, 165, 90, 0.9) 100%
    ) !important;
}

/* SVG Icon Primary */
svg.text-primary .color-foreground {
    fill: #4cc56e !important;
}

svg.text-primary .color-background {
    fill: rgba(76, 197, 110, 0.2) !important;
}

/* ============================================
   DARK MODE STYLES
   ============================================ */

body.dark-version {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Dark Mode - Cards */
body.dark-version .card {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: #3d3d3d !important;
}

body.dark-version .card-header {
    background-color: #2d2d2d !important;
    border-bottom-color: #3d3d3d !important;
}

body.dark-version .card-body {
    background-color: #2d2d2d !important;
}

body.dark-version .card-footer {
    background-color: #2d2d2d !important;
    border-top-color: #3d3d3d !important;
}

/* Dark Mode - Text */
body.dark-version .text-dark,
body.dark-version h1,
body.dark-version h2,
body.dark-version h3,
body.dark-version h4,
body.dark-version h5,
body.dark-version h6,
body.dark-version p,
body.dark-version .navbar-brand {
    color: #e0e0e0 !important;
}

body.dark-version .text-sm,
body.dark-version .text-xs,
body.dark-version small {
    color: #b0b0b0 !important;
}

body.dark-version .text-secondary {
    color: #909090 !important;
}

/* Dark Mode - Sidebar */
body.dark-version .sidenav {
    background-color: #1f1f1f !important;
}

body.dark-version .sidenav .navbar-nav .nav-link {
    color: #b0b0b0 !important;
}

body.dark-version .sidenav .navbar-nav .nav-link.active,
body.dark-version .sidenav .navbar-nav .nav-link:hover {
    background-color: #2d2d2d !important;
    color: #4cc56e !important;
}

body.dark-version .sidenav .navbar-brand {
    color: #e0e0e0 !important;
}

/* Dark Mode - Navbar */
body.dark-version .navbar-main {
    background-color: #2d2d2d !important;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.4) !important;
}

body.dark-version .navbar-main .nav-link {
    color: #b0b0b0 !important;
}

/* Dark Mode - Forms */
body.dark-version .form-control,
body.dark-version .form-select {
    background-color: #3d3d3d !important;
    border-color: #4d4d4d !important;
    color: #e0e0e0 !important;
}

body.dark-version .form-control:focus,
body.dark-version .form-select:focus {
    background-color: #3d3d3d !important;
    border-color: #4cc56e !important;
    color: #e0e0e0 !important;
}

body.dark-version .form-control::placeholder {
    color: #707070 !important;
}

body.dark-version .form-label {
    color: #b0b0b0 !important;
}

/* Dark Mode - Tables */
body.dark-version .table {
    color: #e0e0e0 !important;
}

body.dark-version .table thead th {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: #3d3d3d !important;
}

body.dark-version .table tbody td {
    background-color: #2d2d2d !important;
    border-color: #3d3d3d !important;
}

body.dark-version .table-striped tbody tr:nth-of-type(odd) {
    background-color: #353535 !important;
}

body.dark-version .table-hover tbody tr:hover {
    background-color: #3d3d3d !important;
}

/* Dark Mode - Buttons (keep primary green) */
body.dark-version .btn-outline-dark {
    border-color: #4d4d4d !important;
    color: #e0e0e0 !important;
}

body.dark-version .btn-outline-dark:hover {
    background-color: #3d3d3d !important;
    border-color: #4d4d4d !important;
    color: #e0e0e0 !important;
}

body.dark-version .btn-link {
    color: #4cc56e !important;
}

/* Dark Mode - Borders */
body.dark-version .border,
body.dark-version hr {
    border-color: #3d3d3d !important;
}

body.dark-version .horizontal {
    background-color: #3d3d3d !important;
}

/* Dark Mode - Alerts */
body.dark-version .alert {
    background-color: #3d3d3d !important;
    border-color: #4d4d4d !important;
}

body.dark-version .alert-success {
    background-color: rgba(76, 197, 110, 0.2) !important;
    border-color: #4cc56e !important;
    color: #4cc56e !important;
}

body.dark-version .alert-danger {
    background-color: rgba(234, 84, 85, 0.2) !important;
    border-color: #ea5455 !important;
    color: #ea5455 !important;
}

body.dark-version .alert-warning {
    background-color: rgba(255, 159, 67, 0.2) !important;
    border-color: #ff9f43 !important;
    color: #ff9f43 !important;
}

body.dark-version .alert-info {
    background-color: rgba(0, 207, 232, 0.2) !important;
    border-color: #00cfe8 !important;
    color: #00cfe8 !important;
}

/* Dark Mode - Badges */
body.dark-version .badge {
    background-color: #3d3d3d !important;
    color: #e0e0e0 !important;
}

/* Dark Mode - Modals */
body.dark-version .modal-content {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-version .modal-header {
    border-bottom-color: #3d3d3d !important;
}

body.dark-version .modal-footer {
    border-top-color: #3d3d3d !important;
}

/* Dark Mode - Dropdowns */
body.dark-version .dropdown-menu {
    background-color: #2d2d2d !important;
    border-color: #3d3d3d !important;
}

body.dark-version .dropdown-item {
    color: #e0e0e0 !important;
}

body.dark-version .dropdown-item:hover {
    background-color: #3d3d3d !important;
    color: #4cc56e !important;
}

/* Dark Mode - List Groups */
body.dark-version .list-group-item {
    background-color: #2d2d2d !important;
    border-color: #3d3d3d !important;
    color: #e0e0e0 !important;
}

body.dark-version .list-group-item:hover {
    background-color: #3d3d3d !important;
}

/* Dark Mode - Fixed Plugin Button */
body.dark-version .fixed-plugin-button {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-version .fixed-plugin .card {
    background-color: #2d2d2d !important;
}

/* Dark Mode - Footer */
body.dark-version .footer {
    background-color: #1f1f1f !important;
}

body.dark-version .footer .nav-link {
    color: #b0b0b0 !important;
}

/* Dark Mode - Breadcrumb */
body.dark-version .breadcrumb-item,
body.dark-version .breadcrumb-item a {
    color: #b0b0b0 !important;
}

body.dark-version .breadcrumb-item.active {
    color: #e0e0e0 !important;
}

/* Dark Mode - Page Header */
body.dark-version .page-header {
    background-color: #2d2d2d !important;
}

/* Dark Mode - Icons */
body.dark-version .icon {
    color: #e0e0e0 !important;
}

/* Dark Mode - Input Groups */
body.dark-version .input-group-text {
    background-color: #3d3d3d !important;
    border-color: #4d4d4d !important;
    color: #e0e0e0 !important;
}

/* Dark Mode - Progress */
body.dark-version .progress {
    background-color: #3d3d3d !important;
}
