.sidebar-menu li.dropdown.open > a i {
    color: var(--bs-light) !important;
}
.sidebar-menu li.dropdown.open > a .title {
    color: var(--bs-light) !important;
    font-weight: 500;
}
.sidebar-menu li.actived > a i {
    color: var(--bs-light) !important;
}
.sidebar-menu li.actived > a .title {
    color: var(--bs-light) !important;
    font-weight: 500;
}

/* Sidebar Logo - Ensure logo stays within container */
.sidebar-logo {
    overflow: hidden !important;
    max-width: 100% !important;
}

.sidebar-logo a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.sidebar-logo img {
    max-width: 100% !important;
    max-height: 65px !important;
    width: auto !important;
    /* height: auto !important; */
    object-fit: contain !important;
}

/* User Search Card */
.user-list .card {
    border: 1px solid #e7eaf3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-list .card-body {
    padding: 1.25rem 1.5rem;
}

.user-list .form-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

[data-theme="dark"] .user-list .form-label {
    color: #e9ecef;
}

.tree-view-toggle {
    z-index: 1 !important;
}

.zoom-controls .btn.btn-sm {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #f5f6ff !important;
    border-color: #c5cae9 !important;
    color: #5c6bc0 !important;
    font-size: inherit !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    transition: all 0.15s ease;
}

.zoom-controls .btn.btn-sm:hover {
    background: #e8eafc !important;
    border-color: #5c6bc0 !important;
    color: #3949ab !important;
}

.zoom-controls .btn.btn-sm:active {
    background: #eff1ff !important;
}

.zoom-controls .btn.btn-sm:focus,
.zoom-controls .btn.btn-sm:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.zoom-controls .btn.btn-sm i {
    font-size: 1.25rem;
    line-height: 1;
}

[data-theme="dark"] .zoom-controls .btn.btn-sm {
    background: #2d3238 !important;
    border-color: #4a5058 !important;
    color: #8b9aff !important;
}

[data-theme="dark"] .zoom-controls .btn.btn-sm:hover {
    background: #3a4048 !important;
    border-color: #7c8aff !important;
    color: #a8b4ff !important;
}

[data-theme="dark"] .zoom-controls .btn.btn-sm:active {
    background: #454c54 !important;
}

@media (max-width: 767.98px) {
    .zoom-controls {
        width: 100%;
        justify-content: center;
    }
    
    .zoom-controls .btn.btn-sm {
        flex: 1;
    }
}

#genealogy-tree {
    cursor: grab;
}

#genealogy-tree.dragging {
    cursor: grabbing;
    user-select: none;
}


.genealogy-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 200px;
    margin-bottom: 0.5rem;
}

.user-list .row {
    margin-left: 0;
    margin-right: 0;
}

.user-list .btn {
    min-width: 100px;
    white-space: nowrap;
}

/* Select2 Multiple Select - Responsive Full Width */
@media (max-width: 767.98px) {
    .col-md-auto select[multiple] + .select2-container,
    .col-md-auto select[multiple] + .select2-container.select2-container-choice {
        width: 100% !important;
        max-width: 100% !important;
    }
    .col-md-auto select[multiple] + .select2-container .select2-selection {
        width: 100% !important;
    }
}

/* Date Range Picker - Improved Dropdown Arrow/Caret Design */
.daterangepicker:before {
    border-bottom-color: #e7eaf3 !important;
    border-width: 8px !important;
    top: -8px !important;
}

.daterangepicker:after {
    border-bottom-color: #fff !important;
    border-width: 7px !important;
    top: -7px !important;
}

.daterangepicker.drop-up:before {
    border-top-color: #e7eaf3 !important;
    border-bottom: none !important;
    bottom: -8px !important;
}

.daterangepicker.drop-up:after {
    border-top-color: #fff !important;
    border-bottom: none !important;
    bottom: -7px !important;
}

/* Date Range Picker - Improved Ranges Dropdown Design */
.daterangepicker .ranges ul {
    padding: 0.5rem 0 !important;
}

.daterangepicker .ranges li {
    font-size: 0.875rem !important;
    padding: 0.625rem 1rem !important;
    margin: 0.125rem 0.5rem !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    color: #495057 !important;
    font-weight: 500 !important;
}

.daterangepicker .ranges li:hover {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.08) !important;
    color: var(--bs-primary) !important;
}

.daterangepicker .ranges li.active {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.2) !important;
}

/* Hide ranges with hidden-range class */
.daterangepicker .ranges li.hidden-range {
    display: none !important;
}

/* Date Range Picker - Apply Primary Theme Color to Grid */
.daterangepicker td.active,
.daterangepicker td.active:hover {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.daterangepicker td.in-range {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
    color: var(--bs-primary) !important;
}

.daterangepicker td.start-date,
.daterangepicker td.end-date {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.daterangepicker td.start-date.end-date {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

/* Bootstrap Datepicker - Apply Primary Theme Color (Light Theme) */
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.datepicker table tr td.highlighted {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
}

.datepicker table tr td.today.active,
.datepicker table tr td.today.active:hover,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled.active:hover {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.datepicker table tr td.selected,
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected.disabled:hover {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.datepicker table tr td span.active,
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active.disabled:hover {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.d-s-icon {
    color: var(--bs-light);
    background-color: var(--bs-primary);
    border-radius: 10px;
}

/* Modern Form Input Styles */
.form-control,
.form-select {
    border-radius: 8px !important;
    border: 1px solid #e7eaf3 !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.9375rem !important;
    transition: all 0.2s ease !important;
    background-color: #fff !important;
    color: #1e2022 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
    outline: none !important;
    background-color: #fff !important;
}

.form-control:hover:not(:disabled):not([readonly]),
.form-select:hover:not(:disabled) {
    border-color: #cbd5e0 !important;
}

.form-control::placeholder {
    color: #8c98a4 !important;
    opacity: 1 !important;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    background-color: #f8fafd !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* Modern Select Dropdown */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23677788' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center !important;
    background-size: 14px 10px !important;
    padding-right: 2.5rem !important;
    cursor: pointer !important;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
}

/* Form Control Sizes */
.form-control-sm,
.form-select-sm {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    border-radius: 6px !important;
}

.form-control-lg,
.form-select-lg {
    padding: 0.75rem 1.25rem !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
}

/* Textarea */
textarea.form-control {
    min-height: 100px !important;
    resize: vertical !important;
}

/* Checkbox and Radio Modern Styling */
.form-check-input {
    width: 1.125rem !important;
    height: 1.125rem !important;
    border: 2px solid #e7eaf3 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-top: 0.25rem !important;
}

.form-check-input[type="radio"] {
    border-radius: 50% !important;
}

.form-check-input:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
}

.form-check-input:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
}

.form-check-label {
    cursor: pointer !important;
    margin-left: 0.5rem !important;
    color: #1e2022 !important;
    font-size: 0.9375rem !important;
}

/* Input Group Modern Styling - border-radius set conditionally below */

.input-group > .form-control:focus,
.input-group > .form-select:focus {
    z-index: 3 !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
}

.input-group-text {
    padding: 0.5rem 1rem !important;
    font-size: 0.9375rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
}

/* Default styling for non-button input-group-text elements (span, div) */
span.input-group-text:not([class*="btn-"]),
div.input-group-text:not([class*="btn-"]) {
    border: 1px solid #e7eaf3 !important;
    background-color: #f8fafd !important;
    color: #677788 !important;
}

span.input-group-text:not([class*="btn-"]):hover,
div.input-group-text:not([class*="btn-"]):hover {
    background-color: #f1f5f9 !important;
}

/* Select2 inside input-group-text - match form-control height */
.input-group-text.input-select2 {
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    flex-shrink: 0 !important;
}

.input-group-text.input-select2 .select2-container {
    width: auto !important;
    align-self: stretch !important;
    display: inline-block !important;
}

.input-group-text.input-select2 .select2-container .select2-selection--single {
    height: auto !important;
    min-height: calc(0.5rem + 0.5rem + 1.5em + 2px) !important;
    border: none !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
}

.input-group-text.input-select2 .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 1.5 !important;
    padding: 0.5rem 0.75rem 0.5rem 0.75rem !important;
    padding-right: 2rem !important; /* Make room for arrow */
    display: flex !important;
    align-items: center !important;
    height: auto !important;
    width: auto !important;
}

.input-group-text.input-select2 .select2-container .select2-selection--single .select2-selection__rendered img {
    width: 20px !important;
    height: 15px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.input-group-text.input-select2 .select2-container .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 0.5rem !important;
    width: 24px !important;
    position: absolute !important;
    display: block !important;
}

.input-group-text.input-select2 .select2-container .select2-selection--single .select2-selection__arrow b {
    top: 50% !important;
    left: 50% !important;
    margin-left: -4px !important;
    margin-top: -2px !important;
    transform: translateY(-50%) !important;
    position: absolute !important;
    display: block !important;
}

/* Buttons with input-group-text - ensure button styles take precedence */
button.input-group-text.btn-primary,
button.input-group-text[class*="btn-"],
a.input-group-text[class*="btn-"] {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

button.input-group-text.btn-primary:hover,
button.input-group-text[class*="btn-"]:hover,
a.input-group-text[class*="btn-"]:hover {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.9) !important;
    border-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.9) !important;
}

/* Input Group Border Radius - Connected Elements */
/* Handle easy-autocomplete wrapper - input is inside .easy-autocomplete div */
.input-group > .easy-autocomplete {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

/* Input inside easy-autocomplete wrapper - remove right border-radius when followed by button */
.input-group > .easy-autocomplete:not(:last-child) input.form-control,
.input-group > .easy-autocomplete:not(:last-child) input {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* First element: left border-radius only, no right radius */
.input-group > .form-control:first-child,
.input-group > .form-select:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Remove right border-radius from any non-last element */
.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Specifically handle form-control when not last child */
.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Middle and last elements: no left border-radius */
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin-left: -1px !important;
}

/* Last element: right border-radius only */
.input-group > .form-control:last-child,
.input-group > .form-select:last-child,
.input-group > .input-group-text:last-child,
.input-group > button:last-child,
.input-group > .btn:last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group:not(.has-validation) > :last-child:not(.dropdown-toggle):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Input Group with Validation - adjust for feedback elements */
.input-group.has-validation > .form-control:not(:last-child),
.input-group.has-validation > .form-select:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group.has-validation > :nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Input Group Sizes */
.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
}

.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text,
.input-group-sm > .btn {
    border-radius: 6px !important;
}

.input-group-sm > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group-sm > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group-lg > .form-control,
.input-group-lg > .form-select,
.input-group-lg > .input-group-text {
    padding: 0.75rem 1.25rem !important;
    font-size: 1rem !important;
}

.input-group-lg > .form-control,
.input-group-lg > .form-select,
.input-group-lg > .input-group-text,
.input-group-lg > .btn {
    border-radius: 10px !important;
}

.input-group-lg > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group-lg > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Input Group Button Styling */
.input-group .btn {
    border-radius: 8px !important;
    z-index: 2 !important;
}

.input-group .btn:focus {
    z-index: 3 !important;
}

/* Validation States */
.form-control.is-valid,
.form-select.is-valid {
    border-color: #10b981 !important;
}

.form-control.is-valid:focus,
.form-select.is-valid:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #ef4444 !important;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Select2 - Apply only outline/shadow/focus styles from form-control/form-select */
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    border-radius: 8px !important;
    border: 1px solid #e7eaf3 !important;
    transition: all 0.2s ease !important;
}

.select2-container .select2-selection--single:hover,
.select2-container .select2-selection--multiple:hover {
    border-color: #cbd5e0 !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
    outline: none !important;
}



/* Normal Buttons - Match form-control height */
.btn:not(.btn-sm):not(.btn-lg):not(.btn-xs):not(.btn-switcher) {
    padding: 0.5rem 1rem !important;
    font-size: 0.9375rem !important;
    line-height: 1.5 !important;
    min-height: calc(0.5rem + 0.5rem + 1.5em + 2px) !important;
    box-sizing: border-box !important;
}

/* Small Button - Match form-control-sm height (for filters) */
/* .btn-sm {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    min-height: calc(0.5rem + 0.5rem + 1.5em + 2px) !important;
    box-sizing: border-box !important;
} */

/* Modern Button Secondary - Color Only */
.btn-secondary {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #495057 !important;
}

.btn-secondary:hover {
    background-color: #dee2e6 !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

.btn-secondary:focus,
.btn-check:focus + .btn-secondary {
    background-color: #dee2e6 !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

.btn-secondary:active,
.btn-secondary.active,
.btn-check:active + .btn-secondary,
.btn-check:checked + .btn-secondary {
    background-color: #d1d5db !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

.btn-secondary:disabled,
.btn-secondary.disabled {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #8c98a4 !important;
}

/* File Input Modern Styling */
.form-control[type="file"] {
    padding: 0.5rem !important;
}

.form-control[type="file"]::file-selector-button {
    padding: 0.5rem 1rem !important;
    margin-right: 1rem !important;
    border: none !important;
    border-radius: 6px !important;
    background-color: var(--bs-primary) !important;
    color: #fff !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.form-control[type="file"]::file-selector-button:hover {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.9) !important;
}

/* Date and Time Inputs */
.form-control[type="date"],
.form-control[type="time"],
.form-control[type="datetime-local"] {
    position: relative;
}

.form-control[type="date"]::-webkit-calendar-picker-indicator,
.form-control[type="time"]::-webkit-calendar-picker-indicator,
.form-control[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.form-control[type="date"]:focus::-webkit-calendar-picker-indicator,
.form-control[type="time"]:focus::-webkit-calendar-picker-indicator,
.form-control[type="datetime-local"]:focus::-webkit-calendar-picker-indicator {
    opacity: 1;
}
.select2-container-choice.select2-container .select2-search--inline .select2-search__field {
    margin-top: 10px;
}
.select2-container-choice.select2-container .select2-selection--multiple {
    min-height: 40.5px;
}
.select2-container .select2-selection--single {
    height: 40.5px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40.5px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40.5px;
}

/* Toggle Switch - Apply primary theme color */
.toggle-switch-input:checked + .toggle-switch-label {
    background-color: var(--bs-primary) !important;
}

/* Easy Autocomplete - Modern Dropdown Styling */
.easy-autocomplete-container ul {
    border-radius: 8px !important;
    border: 1px solid #e7eaf3 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    margin-top: 4px !important;
    padding: 4px 0 !important;
    background: #fff !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 265px !important;
}

.easy-autocomplete-container ul li,
.easy-autocomplete-container ul .eac-category {
    padding: 0.625rem 1rem !important;
    font-size: 0.9375rem !important;
    color: #1e2022 !important;
    border: none !important;
    border-bottom: 1px solid #f8f9fa !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}

.easy-autocomplete-container ul li:last-child {
    border-bottom: none !important;
    border-radius: 0 0 8px 8px !important;
}

.easy-autocomplete-container ul li:hover {
    background-color: #f8f9fa !important;
}

.easy-autocomplete-container ul li.selected {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
    color: var(--bs-primary) !important;
}

.easy-autocomplete-container ul li.selected:hover {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.15) !important;
}

.easy-autocomplete-container ul li b {
    font-weight: 600 !important;
    color: inherit !important;
}

/* Select2 Multiple Selection - Subtle Chip Improvements */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
    border: 1px solid rgba(var(--bs-primary-rgb, 59, 130, 246), 0.2) !important;
    color: var(--bs-primary) !important;
    transition: all 0.15s ease !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice:hover {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.15) !important;
    border-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.3) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--bs-primary) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--bs-primary) !important;
    opacity: 0.7 !important;
}

/* Select2 Dropdown - Minimal Improvements */
.select2-dropdown {
    border-radius: 8px !important;
    border: 1px solid #e7eaf3 !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
    color: var(--bs-primary) !important;
}

.select2-results__options[aria-multiselectable=true] .select2-results__option.select2-results__option--selected:before {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

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

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

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

/* Profile Cover - Very light primary color background */
.profile-cover-img-wrapper {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.05) !important;
}

/* Inspiring Modern Tabs - nav-custom2 */
.nav-custom2 {
    background-color: transparent !important;
    padding: 0.25rem 0 !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    gap: 0.25rem !important;
}

.nav-custom2 .nav-link {
    border: none !important;
    border-radius: 8px !important;
    color: #677788 !important;
    padding: 0.625rem 1.25rem !important;
    position: relative !important;
    background: transparent !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.nav-custom2 .nav-link:hover {
    color: var(--bs-primary) !important;
    background: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.08) !important;
}

.nav-custom2 .nav-link:not(.active) {
    color: #677788 !important;
    background: #f0f2f5 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

.nav-custom2 .nav-link.active {
    color: #fff !important;
    background: var(--bs-primary) !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.2) !important;
}

/* Badge visibility in nav-custom2 tabs */
.nav-custom2 .nav-link .badge {
    margin-left: 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 0.25rem 0.5rem !important;
    vertical-align: middle !important;
}

.nav-custom2 .nav-link:not(.active) .badge {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.nav-custom2 .nav-link.active .badge {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
}

.nav-custom2 {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.nav-custom2 .nav-link {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

@media (max-width: 576px) {
    .nav-custom2 .nav-link {
        padding: 0.5rem 0.875rem !important;
        font-size: 13px !important;
    }
}

.genealogy-tab {
    left: calc(50% + 140px) !important;
    transform: translateX(-50%) !important;
}

@media (max-width: 1200px) {
    .genealogy-tab {
        left: calc(50% + 100px) !important;
    }
}

@media (max-width: 992px) {
    .genealogy-tab {
        position: static !important;
        left: auto !important;
        transform: none !important;
        display: block !important;
        margin: 0 !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .genealogy-tab .nav-custom2 {
        display: inline-flex !important;
        min-width: max-content !important;
    }
}

/* #profile-setting-list - Light Theme */
#profile-setting-list .nav-link.active {
    color: var(--bs-primary) !important;
    background-color: transparent !important;
    border-color: var(--bs-primary) !important;
}

#profile-setting-list .nav-link.active .nav-icon {
    color: var(--bs-primary) !important;
}

/* Step Component Improvements */
.step .step-item {
    margin-bottom: 1.25rem !important;
}

.step .step-item:last-child {
    margin-bottom: 0 !important;
}

.step .step-content-wrapper {
    gap: 0.75rem !important;
}

.step .step-content .badge {
    margin-bottom: 0.5rem !important;
}

.step .step-content p:not(.step-comment) {
    margin-top: 0.25rem !important;
    font-size: 0.875rem !important;
}

/* Inspiring Modern Tabs - nav-custom */
.nav-custom {
    background-color: transparent !important;
    padding: 0.25rem 0 !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    gap: 0.25rem !important;
}

.nav-custom .nav-link {
    border: none !important;
    border-radius: 8px !important;
    color: #677788 !important;
    padding: 0.625rem 1.25rem !important;
    position: relative !important;
    background: transparent !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    margin: 0 !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.nav-custom .nav-link:hover {
    color: var(--bs-primary) !important;
    background: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.08) !important;
}

.nav-custom .nav-link:not(.active) {
    color: #677788 !important;
    background: #f0f2f5 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

.nav-custom .nav-link.active {
    color: #fff !important;
    background: var(--bs-primary) !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(var(--bs-primary-rgb, 59, 130, 246), 0.2) !important;
}

/* Small Tabs - For dropdown menus */
.nav-custom-sm .nav-link {
    padding: 0.5rem 0.875rem !important;
    font-size: 0.8125rem !important;
}

.nav-custom-sm {
    padding: 0.125rem 0 !important;
    gap: 0.125rem !important;
}

/* Modern Professional Card Design */
.card {
    border: 1px solid #e7eaf3 !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important; */
    box-shadow: none !important;
}

.card-header {
    padding: 1.25rem 1.5rem !important;
    background-color: transparent !important;
    border-bottom: none !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    position: relative !important;
}

.card-header-title {
    font-size: 1.0625rem !important;
    /* font-weight: 600 !important; */
    color: #343a40 !important;
    margin-bottom: 0 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.01em !important;
}

/* Elegant Table Design - Inspired by Modern Platforms */
.table-custom1 {
    border: 1px solid #e7eaf3 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background-color: #fff !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    display: table !important;
}

.table-responsive {
    border-radius: 8px !important;
}

.table-responsive .table-custom1 {
    border: 1px solid #e7eaf3 !important;
    margin-bottom: 0 !important;
}

.table-custom1 thead th {
    background-color: #fff !important;
    border-bottom: 1px solid #e7eaf3 !important;
    border-top: none !important;
    font-weight: 600 !important;
    font-size: 0.8125rem !important;
    color: #677788 !important;
    padding: 1rem 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.table-custom1 tbody td {
    padding: 1rem !important;
    border-bottom: 1px solid #f8f9fa !important;
    color: #1e2022 !important;
    font-size: 0.9375rem !important;
}

.table-custom1 tbody tr:last-child td {
    border-bottom: none !important;
}

.table-custom1 tbody tr:hover {
    background-color: #f8f9fa !important;
    transition: background-color 0.15s ease !important;
}

/* Avatar Soft Primary - Apply theme color */
.avatar-soft-primary .avatar-initials {
    color: var(--bs-primary) !important;
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1) !important;
}

/* Theme-Aware Text Color Utility */
.text-body-theme {
    color: var(--bs-body-color) !important;
}


/* Chart.js Dark Theme Styles */
[data-theme="dark"] canvas {
    color: var(--bs-body-color) !important;
}

/* Chart.js Tooltip - Dark Theme */
[data-theme="dark"] .chartjs-tooltip,
[data-theme="dark"] .chartjs-tooltip-key {
    background-color: var(--bs-gray-300) !important;
    color: var(--bs-body-color) !important;
    border-color: var(--bs-gray-400) !important;
}

[data-theme="dark"] .chartjs-tooltip-body {
    color: var(--bs-body-color) !important;
}

/* Chart.js Legend - Dark Theme */
[data-theme="dark"] .chartjs-legend li span {
    color: var(--bs-body-color) !important;
}

/* Modern Professional Toastr Styles - Premium Design */
:root {
    --toast-success-bg: #f0fdf4;
    --toast-success-accent: #10b981;
    --toast-success-text: #065f46;
    --toast-success-text-muted: #047857;
    
    --toast-error-bg: #fef2f2;
    --toast-error-accent: #ef4444;
    --toast-error-text: #991b1b;
    --toast-error-text-muted: #b91c1c;
    
    --toast-warning-bg: #fffbeb;
    --toast-warning-accent: #f59e0b;
    --toast-warning-text: #92400e;
    --toast-warning-text-muted: #b45309;
    
    --toast-info-bg: #eff6ff;
    --toast-info-accent: #3b82f6;
    --toast-info-text: #1e40af;
    --toast-info-text-muted: #2563eb;
    
    --toast-bg: #ffffff;
    --toast-text: #111827;
    --toast-text-muted: #6b7280;
    --toast-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --toast-shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
    --toast-success-bg: #064e3b;
    --toast-success-accent: #10b981;
    --toast-success-text: #6ee7b7;
    --toast-success-text-muted: #34d399;
    
    --toast-error-bg: #7f1d1d;
    --toast-error-accent: #ef4444;
    --toast-error-text: #fca5a5;
    --toast-error-text-muted: #f87171;
    
    --toast-warning-bg: #78350f;
    --toast-warning-accent: #f59e0b;
    --toast-warning-text: #fcd34d;
    --toast-warning-text-muted: #fbbf24;
    
    --toast-info-bg: #1e3a8a;
    --toast-info-accent: #3b82f6;
    --toast-info-text: #93c5fd;
    --toast-info-text-muted: #60a5fa;
    
    --toast-bg: var(--bs-gray-300);
    --toast-text: var(--bs-body-color);
    --toast-text-muted: var(--bs-gray-600);
    --toast-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --toast-shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Toast Container */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

/* Base Toast Styles */
#toast-container > .toast {
    pointer-events: auto;
    background-color: var(--toast-bg) !important;
    border: none !important;
    border-left: 4px solid transparent !important;
    border-radius: 8px !important;
    box-shadow: var(--toast-shadow) !important;
    padding: 0.875rem 1rem !important;
    min-width: 300px !important;
    max-width: 400px !important;
    margin-bottom: 0.625rem !important;
    opacity: 1 !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
    position: relative !important;
    overflow: hidden !important;
    background-image: none !important;
    font-family: inherit !important;
}

/* Fast close animation */
#toast-container > .toast.toast-removing,
#toast-container > .toast.removing,
#toast-container > .toast.fade-out,
#toast-container > .toast[style*="opacity: 0"],
#toast-container > .toast.animate-out {
    opacity: 0 !important;
    transform: translateX(100%) !important;
    transition: opacity 0.1s ease, transform 0.1s ease !important;
}

/* Override toastr default animation timing */
#toast-container > .toast {
    animation-duration: 0.15s !important;
}

#toast-container > .toast.ng-enter,
#toast-container > .toast.ng-leave {
    transition: all 0.15s ease !important;
}

#toast-container > .toast:hover {
    box-shadow: var(--toast-shadow-hover) !important;
}

/* Toast Types with Colored Backgrounds */
#toast-container > .toast-success {
    background-color: var(--toast-success-bg) !important;
    border-left-color: var(--toast-success-accent) !important;
}

#toast-container > .toast-error {
    background-color: var(--toast-error-bg) !important;
    border-left-color: var(--toast-error-accent) !important;
}

#toast-container > .toast-warning {
    background-color: var(--toast-warning-bg) !important;
    border-left-color: var(--toast-warning-accent) !important;
}

#toast-container > .toast-info {
    background-color: var(--toast-info-bg) !important;
    border-left-color: var(--toast-info-accent) !important;
}

/* Toast Title */
#toast-container > .toast .toast-title {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: var(--toast-text) !important;
    margin-bottom: 0.125rem !important;
    line-height: 1.4 !important;
    letter-spacing: -0.01em !important;
}

#toast-container > .toast-success .toast-title {
    color: var(--toast-success-text) !important;
}

#toast-container > .toast-error .toast-title {
    color: var(--toast-error-text) !important;
}

#toast-container > .toast-warning .toast-title {
    color: var(--toast-warning-text) !important;
}

#toast-container > .toast-info .toast-title {
    color: var(--toast-info-text) !important;
}

/* Toast Message */
#toast-container > .toast .toast-message {
    font-size: 0.8125rem !important;
    color: var(--toast-text-muted) !important;
    line-height: 1.5 !important;
    text-transform: none !important;
    margin: 0 !important;
}

#toast-container > .toast-success .toast-message {
    color: var(--toast-success-text-muted) !important;
}

#toast-container > .toast-error .toast-message {
    color: var(--toast-error-text-muted) !important;
}

#toast-container > .toast-warning .toast-message {
    color: var(--toast-warning-text-muted) !important;
}

#toast-container > .toast-info .toast-message {
    color: var(--toast-info-text-muted) !important;
}

#toast-container > .toast .toast-message:first-letter {
    text-transform: uppercase !important;
}

/* Toast Close Button */
#toast-container > .toast .toast-close-button {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    opacity: 0.8 !important;
    text-shadow: none !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0.375rem !important;
    line-height: 1 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
    font-family: Arial, sans-serif !important;
}

#toast-container > .toast .toast-close-button:hover {
    opacity: 1 !important;
    color: #1f2937 !important;
    background-color: rgba(0, 0, 0, 0.12) !important;
    transform: scale(1.05) !important;
}

#toast-container > .toast .toast-close-button:active {
    transform: scale(0.95) !important;
}

/* Dark Theme - Toast Close Button */
[data-theme="dark"] #toast-container > .toast .toast-close-button {
    background: rgba(255, 255, 255, 0.18) !important;
    color: var(--bs-gray-300) !important;
    opacity: 1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] #toast-container > .toast .toast-close-button:hover {
    background-color: rgba(255, 255, 255, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    transform: scale(1.05) !important;
}

[data-theme="dark"] #toast-container > .toast .toast-close-button:active {
    transform: scale(0.95) !important;
    background-color: rgba(255, 255, 255, 0.22) !important;
}

/* Toast Links */
#toast-container a {
    font-weight: 600 !important;
    color: var(--bs-primary) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

#toast-container a:hover {
    color: var(--bs-primary) !important;
    text-decoration: underline !important;
    opacity: 0.8 !important;
}

/* Toast Normal Padding Override */
#toast-container > div.toast-normal {
    padding: 0.875rem 1rem !important;
}

/* Semantic Color Classes - Theme-Aware */
/* PRIMARY - Uses theme primary color */
.c-primary, .cH-primary:hover { color: var(--bs-primary) !important; }
.bgc-primary, .bgcH-primary:hover { background-color: var(--bs-primary) !important; }
.bdc-primary, .bdcH-primary:hover { border-color: var(--bs-primary) !important; }

/* SUCCESS - Theme-aware */
.c-success, .cH-success:hover { color: var(--bs-success) !important; }
.bgc-success, .bgcH-success:hover { background-color: var(--bs-success) !important; }
.bdc-success, .bdcH-success:hover { border-color: var(--bs-success) !important; }

/* DANGER - Theme-aware */
.c-danger, .cH-danger:hover { color: var(--bs-danger) !important; }
.bgc-danger, .bgcH-danger:hover { background-color: var(--bs-danger) !important; }
.bdc-danger, .bdcH-danger:hover { border-color: var(--bs-danger) !important; }

/* WARNING - Theme-aware */
.c-warning, .cH-warning:hover { color: var(--bs-warning) !important; }
.bgc-warning, .bgcH-warning:hover { background-color: var(--bs-warning) !important; }
.bdc-warning, .bdcH-warning:hover { border-color: var(--bs-warning) !important; }

/* INFO - Theme-aware */
.c-info, .cH-info:hover { color: var(--bs-info) !important; }
.bgc-info, .bgcH-info:hover { background-color: var(--bs-info) !important; }
.bdc-info, .bdcH-info:hover { border-color: var(--bs-info) !important; }

/* SECONDARY - Theme-aware */
.c-secondary, .cH-secondary:hover { color: var(--bs-secondary) !important; }
.bgc-secondary, .bgcH-secondary:hover { background-color: var(--bs-secondary) !important; }
.bdc-secondary, .bdcH-secondary:hover { border-color: var(--bs-secondary) !important; }

/* Dashboard Icon Styles */
.d-s-icon {
    width: 47px !important;
    height: 47px !important;
    font-size: 18px !important;
    color: #2196f3;
}

.d-s-icon .fa-solid {
    padding-top: 15px;
}

/* Date Range Switcher Styles - Cute Design Similar to Theme Mode */
.date-range-switcher {
    position: relative;
}

.date-range-switcher .btn-group {
    display: inline-flex;
    position: relative;
    background-color: #f8fafc;
    padding: 2px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    gap: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    height: auto;
    align-items: center;
}

.date-range-switcher .btn-switcher {
    flex: 1;
    padding: 19px 14px;
    border: none;
    border-radius: 50px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    outline: none !important;
    height: 32px;
    line-height: 1.2;
}

.date-range-switcher .btn-switcher:focus,
.date-range-switcher .btn-switcher:focus-visible,
.date-range-switcher .btn-switcher:active {
    outline: none !important;
    box-shadow: none !important;
}

.date-range-switcher .btn-switcher::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bs-primary);
    border-radius: 50px;
    opacity: 0;
    transform: scale(0.96);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25), 0 1px 3px rgba(59, 130, 246, 0.15);
}

.date-range-switcher .btn-switcher.active::before {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.15), 0 1px 2px rgba(59, 130, 246, 0.1);
}

.date-range-switcher .btn-switcher:hover:not(.active) {
    color: #334155;
    background-color: rgba(0, 0, 0, 0.04);
}

.date-range-switcher .btn-switcher.active {
    color: #ffffff;
    font-weight: 600;
}

.date-range-switcher .btn-switcher.active:hover {
    color: #ffffff;
}

.date-range-switcher .btn-switcher i {
    font-size: 9px;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.date-range-switcher .btn-switcher.active i {
    opacity: 1;
    color: #ffffff;
}

.date-range-switcher .btn-switcher span {
    display: inline-block;
    position: relative;
    z-index: 1;
    font-size: 14px;
}

/* Dark Theme Support */
[data-theme="dark"] .date-range-switcher .btn-group {
    background-color: #2d3138;
    border-color: #3d4249;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .date-range-switcher .btn-switcher {
    color: #8c98a4;
}

[data-theme="dark"] .date-range-switcher .btn-switcher:hover:not(.active) {
    color: #e9ecef;
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .date-range-switcher .btn-switcher.active {
    color: #ffffff;
}

[data-theme="dark"] .date-range-switcher .btn-switcher.active::before {
    background-color: var(--bs-primary);
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2), 0 1px 2px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .date-range-switcher .btn-switcher.active i {
    color: #ffffff;
}

/* Responsive Sidebar Close Button and Overlay */
.d-responsive-block {
    display: none !important;
}

@media (max-width: 991px) {
    .d-responsive-block {
        display: block !important;
    }
    
    .sidebar-logo .mobile-toggle {
        padding-right: 15px;
    }
    
    .sidebar-logo .mobile-toggle a {
        color: #72777a;
        font-size: 20px;
    }
    
    .sidebar-logo .mobile-toggle a:hover {
        color: var(--bs-primary);
    }
    
    [data-theme="dark"] .sidebar-logo .mobile-toggle a {
        color: #adb5bd;
    }
    
    [data-theme="dark"] .sidebar-logo .mobile-toggle a:hover {
        color: var(--bs-primary);
    }
    
    /* Sidebar Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 899;
    }
    
    .is-collapsed .sidebar-overlay {
        display: block;
    }
}


/* Profile Highlight Card - Modern Design */
.profile-highlight-card {
    height: 100%;
}

.profile-highlight-card .card-body {
    padding: 0.875rem 1rem;
}

.profile-highlight-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.profile-highlight-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-highlight-package .profile-highlight-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.profile-highlight-rank .profile-highlight-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
}

.profile-highlight-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.profile-highlight-icon i {
    font-size: 1.25rem;
}

.profile-highlight-title {
    flex: 1;
    min-width: 0;
}

.profile-highlight-label {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 0.125rem;
}

.profile-highlight-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.profile-highlight-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-highlight-stat {
    display: flex;
    flex-direction: column;
    padding: 0.375rem 0.625rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 6px;
    min-width: 80px;
}

.profile-highlight-stat-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.profile-highlight-stat-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
    margin-top: 0.125rem;
}

.profile-highlight-package .profile-highlight-stat {
    border-left: 2px solid rgba(59, 130, 246, 0.5);
}

.profile-highlight-rank .profile-highlight-stat {
    border-left: 2px solid rgba(16, 185, 129, 0.5);
}

.profile-highlight-network .profile-highlight-stat {
    border-left: 2px solid rgba(99, 102, 241, 0.5);
}

.profile-highlight-network .profile-highlight-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.profile-highlight-network .profile-highlight-icon i {
    color: #6366f1;
}

.profile-highlight-binary .profile-highlight-stat {
    border-left: 2px solid rgba(245, 158, 11, 0.5);
}

.profile-highlight-binary .profile-highlight-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.profile-highlight-binary .profile-highlight-icon i {
    color: #f59e0b;
}

.profile-highlight-action {
    display: flex;
    align-items: center;
}

/* Dark Theme */
[data-theme="dark"] .profile-highlight-header {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .profile-highlight-package .profile-highlight-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
}

[data-theme="dark"] .profile-highlight-rank .profile-highlight-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
}

[data-theme="dark"] .profile-highlight-label {
    color: #9ca3af;
}

[data-theme="dark"] .profile-highlight-name {
    color: #f9fafb;
}

[data-theme="dark"] .profile-highlight-stat {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

[data-theme="dark"] .profile-highlight-package .profile-highlight-stat {
    border-left-color: rgba(59, 130, 246, 0.6);
}

[data-theme="dark"] .profile-highlight-rank .profile-highlight-stat {
    border-left-color: rgba(16, 185, 129, 0.6);
}

[data-theme="dark"] .profile-highlight-network .profile-highlight-stat {
    border-left-color: rgba(99, 102, 241, 0.6);
}

[data-theme="dark"] .profile-highlight-network .profile-highlight-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0.1) 100%);
}

[data-theme="dark"] .profile-highlight-network .profile-highlight-icon i {
    color: #818cf8;
}

[data-theme="dark"] .profile-highlight-binary .profile-highlight-stat {
    border-left-color: rgba(245, 158, 11, 0.6);
}

[data-theme="dark"] .profile-highlight-binary .profile-highlight-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0.1) 100%);
}

[data-theme="dark"] .profile-highlight-binary .profile-highlight-icon i {
    color: #fbbf24;
}

[data-theme="dark"] .profile-highlight-stat-value {
    color: #f3f4f6;
}

[data-theme="dark"] .profile-highlight-stat-label {
    color: #9ca3af;
}

/* Profile Links Section */
.profile-link-item {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.profile-link-item:last-child {
    border-bottom: none;
}

@media (min-width: 768px) {
    .profile-link-item {
        border-bottom: none;
        border-right: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .profile-link-item:last-child {
        border-right: none;
    }
}

.profile-link-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.5rem;
}

.profile-link-url {
    font-size: 0.8125rem;
    color: #6c757d;
    word-break: break-all;
    line-height: 1.5;
}

[data-theme="dark"] .profile-link-item {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .profile-link-url {
    color: #9ca3af;
}

/* Theme-aware table highlight */
.bg-table-highlight {
    background-color: rgba(34, 197, 94, 0.1) !important;
}

[data-theme="dark"] .bg-table-highlight {
    background-color: rgba(34, 197, 94, 0.15) !important;
}

/* Responsive Header Navbar - Margin Fixes */
@media (max-width: 991px) {
    .header.navbar .nav-left {
        margin-left: 0 !important;
    }
    
    .header.navbar .nav-right > li.dropdown.mR-15,
    .header.navbar .nav-right > li.mR-15 {
        margin-right: 0 !important;
    }
}

/* Responsive Header Dropdowns - Prevent Cutoff */
@media (max-width: 767px) {
    /* Left side dropdowns - align to left edge */
    .header.navbar .nav-left .dropdown-menu {
        left: 0 !important;
        right: auto !important;
        transform: none !important;
    }
    
    /* Right side dropdowns - align to right edge */
    .header.navbar .nav-right .dropdown-menu {
        left: auto !important;
        right: 0 !important;
        transform: none !important;
    }
    
    /* Notification dropdown - constrain width */
    .header.navbar .nav-right .notifications .dropdown-menu {
        width: calc(100vw - 20px) !important;
        max-width: 360px !important;
        right: -10px !important;
    }
    
    /* User profile dropdown */
    .header.navbar .nav-right > li.dropdown:last-child .dropdown-menu {
        right: 0 !important;
        min-width: 180px !important;
    }
}

@media (max-width: 576px) {
    /* Full width dropdowns on very small screens */
    .header.navbar .nav-right .notifications .dropdown-menu {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none !important;
        top: 60px !important;
    }
}

/* Responsive Design for Date Range Switcher */
@media (max-width: 992px) {
    .mB-20.mL-2.peers {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .mB-20.mL-2.peers .peer {
        width: 100%;
    }
    
    .mB-20.mL-2.peers .peer.peer-greed {
        margin-bottom: 10px;
    }
    
    .date-range-switcher {
        width: auto;
    }
    
    .date-range-switcher .btn-group {
        width: auto;
        justify-content: center;
    }
    
    .date-range-switcher .btn-switcher {
        font-size: 13px;
    }
    
    .date-range-switcher .btn-switcher span {
        font-size: 15px;
    }
    
    .date-range-switcher .btn-switcher i {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .date-range-switcher .btn-switcher {
        flex: 1;
        padding: 6px 10px;
        font-size: 13px;
        min-height: 32px;
    }
    
    .date-range-switcher .btn-switcher span {
        font-size: 15px;
    }
    
    .date-range-switcher .btn-switcher i {
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .date-range-switcher .btn-switcher {
        padding: 5px 8px;
        font-size: 12px;
        min-height: 30px;
        gap: 4px;
    }
    
    .date-range-switcher .btn-switcher span {
        font-size: 14px;
    }
    
    .date-range-switcher .btn-switcher i {
        font-size: 9px;
    }
    
    .date-range-switcher .btn-group {
        gap: 2px;
        padding: 2px;
    }
}

/* Focus States for Accessibility */
.date-range-switcher .btn-switcher:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Professional Link Items Design */
.link-item {
    padding: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.link-item:last-child {
    margin-bottom: 0;
}

.link-item .form-label {
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 8px;
    font-weight: 600;
}

.link-item .form-label i {
    font-size: 15px;
}

.link-item .input-group {
    margin-bottom: 8px;
}

.link-item .input-group .form-control {
    font-size: 10px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
    background-color: #f9fafb;
    border-color: #e5e7eb;
    color: #1f2937;
    padding: 0.375rem 0.5rem;
}

.link-item .input-group .form-control:focus {
    background-color: #ffffff;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.link-item .input-group .btn {
    min-width: 38px;
    padding: 0.375rem 0.5rem;
    border-left: none;
}

.link-item .input-group .btn i {
    font-size: 12px;
}

.share-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.share-buttons .btn {
    padding: 0.25rem 0.5rem;
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    border-width: 1.5px;
}

.share-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-buttons .btn i {
    font-size: 14px;
}

/* Social Media Icon Colors - Official Brand Colors */
.share-btn {
    border-width: 1.5px;
    background-color: transparent;
    border-color: #e5e7eb;
    color: #6b7280;
}

/* WhatsApp - Official Brand Color #25D366 */
.share-btn-whatsapp {
    color: #25D366;
}

.share-btn-whatsapp:hover {
    background-color: #25D366;
    border-color: #25D366;
    color: #ffffff;
}

/* Facebook - Official Brand Color #4267B2 */
.share-btn-facebook {
    color: #4267B2;
}

.share-btn-facebook:hover {
    background-color: #4267B2;
    border-color: #4267B2;
    color: #ffffff;
}

/* X (formerly Twitter) - Official Brand Color #000000 */
.share-btn-twitter {
    color: #000000;
}

.share-btn-twitter:hover {
    background-color: #000000;
    border-color: #000000;
    color: #ffffff;
}

/* LinkedIn - Official Brand Color #0077B5 */
.share-btn-linkedin {
    color: #0077B5;
}

.share-btn-linkedin:hover {
    background-color: #0077B5;
    border-color: #0077B5;
    color: #ffffff;
}

[data-theme="dark"] .share-btn {
    border-color: #3d4249;
    color: #9ca3af;
}

[data-theme="dark"] .link-item .form-label {
    color: #e9ecef;
}

[data-theme="dark"] .link-item .input-group .form-control {
    background-color: #1e2022;
    border-color: #3d4249;
    color: #e9ecef;
}

[data-theme="dark"] .link-item .input-group .form-control:focus {
    background-color: #2d3138;
    border-color: var(--bs-primary);
}

.sidebar-menu li > a > .icon-holder i {
    line-height: 1.6;
    font-size: 20px;
}
.sidebar-menu > li > a {
    display: flex;
    align-items: center;
}

.tree-btn-up {
    color: var(--bs-primary) !important;
    background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
    border: none !important;
}

.tree-btn-up:hover {
    color: #fff !important;
    background-color: var(--bs-primary) !important;
}

[data-theme="dark"] .tree-btn-up {
    color: #fff !important;
    background-color: rgba(var(--bs-primary-rgb), 0.3) !important;
}

[data-theme="dark"] .tree-btn-up:hover {
    background-color: var(--bs-primary) !important;
}

/* Dash Card Growth Indicator */
.dash-card-growth {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.dash-card-growth i {
    margin-right: 0.25rem;
}

/* Admin Footer - Similar to login page */
.admin-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    position: relative;
    background: transparent;
}

.admin-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--bs-primary-rgb, 59, 130, 246), 0.3), transparent);
}

[data-theme="dark"] .admin-footer::before {
    background: linear-gradient(90deg, transparent, rgba(var(--bs-primary-rgb, 59, 130, 246), 0.4), transparent);
}

.admin-footer-text {
    font-size: 0.8125rem;
    color: #8c98a4;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

[data-theme="dark"] .admin-footer-text {
    color: var(--bs-gray-600);
}

.admin-footer-text .company-name {
    color: var(--bs-primary);
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.admin-footer-text .company-name:hover {
    opacity: 0.8;
}

[data-theme="dark"] .admin-footer-text .company-name {
    color: var(--bs-primary);
}

/* Warning Color Improvements - Darker and More Visible, Theme-Aware */
/* Badge Soft Warning - Make darker and distinguishable from danger */
.badge-soft-warning {
    color: #d97706 !important;
    background-color: rgba(var(--bs-warning-rgb), 0.15) !important;
}

/* Button Outline Warning - Darker orange/amber, Theme-Aware */
.btn-outline-warning {
    color: var(--bs-warning) !important;
    border-color: var(--bs-warning) !important;
}

.btn-outline-warning:hover {
    color: #fff !important;
    background-color: var(--bs-warning) !important;
    border-color: var(--bs-warning) !important;
}

.btn-outline-warning:focus,
.btn-check:focus + .btn-outline-warning {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-warning-rgb), 0.5) !important;
}

.btn-outline-warning:active,
.btn-outline-warning.active,
.btn-check:checked + .btn-outline-warning,
.btn-check:active + .btn-outline-warning {
    color: #fff !important;
    background-color: #d97706 !important;
    border-color: #d97706 !important;
}

.btn-outline-warning:disabled,
.btn-outline-warning.disabled {
    color: var(--bs-warning) !important;
    background-color: transparent !important;
    opacity: 0.6 !important;
}

/* Login Page Language Switcher */
.login-language-switcher {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}

.login-language-switcher .dropdown {
    position: relative;
}

.login-lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.login-lang-toggle.no-after::after {
    display: none !important;
}

.login-lang-arrow {
    display: flex;
    align-items: center;
}

.login-lang-toggle:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #333;
    transform: translateY(-1px);
    text-decoration: none;
}

.login-lang-arrow i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.login-lang-toggle[aria-expanded="true"] .login-lang-arrow i {
    transform: rotate(180deg);
}

.login-lang-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.login-lang-name {
    font-weight: 500;
}

.login-lang-dropdown {
    min-width: 180px;
    margin-top: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0.25rem 0;
    background-color: #fff;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: none;
}

.login-lang-dropdown.show {
    display: block;
}

.login-lang-dropdown li {
    list-style: none;
    margin: 0;
}

.login-lang-dropdown form {
    margin: 0;
    display: block;
}

.login-lang-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.login-lang-item:hover {
    background-color: rgba(var(--bs-primary-rgb, 59, 130, 246), 0.1);
    color: #333;
    text-decoration: none;
}

.login-lang-item img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .login-language-switcher {
        top: 1rem;
        right: 1rem;
    }
    
    .login-lang-name {
        display: none;
    }
    
    .login-lang-toggle {
        padding: 0.5rem;
    }
}

/* Progress - Theme Aware Background */
.progress {
    background-color: #e9ecef !important;
}