/* CSS Custom Properties for Theming */
:root {
    --theme-color: #066FD1;
    --theme-color_rgb: 6, 111, 209;
    --theme-color-hover: #0559A0;
    --secondary-color: #6b7280;
    --background-color: #ffffff;
    --surface-color: #f1f6fa;
    --card_header_bg: #F8F8FF;
    --text-primary: #374151;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0284c7;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius-xs: 0.200rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;

    --bs-body-font-family: 'Public Sans', sans-serif;
}

[data-theme="dark"] {
    --theme-color: #3f99ec;
    --theme-color_rgb: 63, 153, 236;
    --theme-color-hover: #2c7cd3;
    --secondary-color: #9ca3af;
    --background-color: #1f2937;
    --surface-color: #111827;
    --card_header_bg: #16334c;
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --border-light: #374151;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
}
.text_color_default{
    color: var(--text-primary);
}
.bg_color_default{
    background-color: var(--background-color);
}

.bg_color_surface{
    background-color: var(--surface-color);
}


.trans_bg1{
    background: rgba(var(--theme-color_rgb), 0.1);
}

body {
    margin: 0;
    font-family: var(--bs-body-font-family);
    font-size: .9em;
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(47, 43, 61, 0)
}

/*FORM MISC*/
/* Unified styling for form elements */
.form-control,
.select2-container,
.select2-container--bootstrap-5 .select2-selection--single,
fieldset,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
select{
    background-color: var(--background-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: var(--bs-body-font-family);
}


/* Label styles */
.form-label,.switch-label{
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Focus styles */
.form-control:focus,
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
.select2-container--bootstrap-5 .select2-selection--single:focus {
    border-color: var(--theme-color);
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(6, 111, 209, 0.25); /* #066FD1 with opacity */
}

/* Disabled styles */
input:disabled,
textarea:disabled,
select:disabled,
.select2-container--disabled .select2-selection--single {
    background-color: var(--border-light);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Select2 styling adjustments */
.select2-container--bootstrap-5 .select2-selection--single {
    height: auto;
    display: flex;
    align-items: center;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
}

/* Arrow icon spacing in Select2 */
.select2-container--bootstrap-5 .select2-selection__arrow {
    top: 50%;
    transform: translateY(-50%);
    right: 0.75rem;
}

/* Placeholder in dark mode */
[data-theme="dark"] ::placeholder {
    color: var(--text-muted);
}

/* Placeholder in light mode */
::placeholder {
    color: var(--text-muted);
}



/*
Tag*/
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--theme-color) !important;
    color: #fff !important
}

.select2-container--default.select2-container--focus .select2-selection, .select2-container--default.select2-container--open .select2-selection {
    border-width: 2px;
    border-color: var(--theme-color) !important
}

.select2-primary .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: rgba(115, 103, 240, .16) !important;
    color: var(--theme-color) !important
}

.tagify--focus {
    border-color: var(--theme-color) !important
}

.tagify__dropdown__item--active {
    background: #7367f0 !important
}


/*
Switch*/
.sw_switch {
    display: inline-block;
}

.sw_switch input {
    display: none;
}

.sw_switch svg {
    transition: all 0.2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
    position: absolute;
    height: auto;
}

.sw_switch .sw_checkmark {
    width: 10px;
    color: rgb(0, 218, 80);
    transform: scale(0);
}

.sw_switch .sw_cross {
    width: 6px;
    color: rgb(131, 131, 131);
}

.sw_slider {
    box-sizing: border-box;
    width: 46px;
    height: 24px;
    background: rgb(131, 131, 131);
    border-radius: 999px;
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
    cursor: pointer;
}

.sw_circle {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: inherit;
    box-shadow: 1px 1px 2px rgba(146, 146, 146, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
    z-index: 1;
    position: absolute;
    left: 3px;
}

.sw_slider::before {
    content: "";
    position: absolute;
    width: 9px;
    height: 7px;
    left: 12px;
    background: #fff;
    border-radius: 1px;
    transition: all 0.2s ease-in-out;
}

.sw_switch input:checked + .sw_slider {
    background: rgb(0, 218, 80);
}

.sw_switch input:checked + .sw_slider .sw_checkmark {
    transform: scale(1);
}

.sw_switch input:checked + .sw_slider .sw_cross {
    transform: scale(0);
}

.sw_switch input:checked + .sw_slider::before {
    left: 25px;
}

.sw_switch input:checked + .sw_slider .sw_circle {
    left: 25px;
    box-shadow: -1px 1px 2px rgba(163, 163, 163, 0.45);
}


/*Select with search*/
.select2-container--bootstrap-5 .select2-selection--single {
    height: 38px !important;
    padding: 6px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    font-size: 1rem;
}

.select2-container--bootstrap-5 .select2-selection__arrow {
    height: 36px !important;
    top: 1px;
    right: 6px;
}

.select2-container--bootstrap-5 .select2-selection__clear {
    position: absolute;
    right: 10px;
    top: 6px;
}

/*Tag Inpouot*/
/* Label style */
.tag_label {
    font-weight: 500;
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

/* Wrapper for styling the box */
.tag_select-wrapper {
    padding: 0.75rem 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

/* Select2 container with Bootstrap 5 theme */
.select2-container--bootstrap-5 .select2-selection {
    background-color: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.95rem !important;
    min-height: 38px;
    box-shadow: none !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

/* Selected tags (choices) */
.select2-container--bootstrap-5 .select2-selection__choice {
    background-color: #e0f2fe;
    border: none;
    border-radius: 0.375rem;
    color: #0c4a6e;
    font-size: 0.875rem;
    padding: 2px 8px;
    margin-top: 4px;
}

.select2-container--bootstrap-5 .select2-selection__choice__remove {
    color: #0284c7;
    margin-right: 4px;
}

/*Datatable*/
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.bg-in-progress {
    background-color: #fd7e14 !important;
}

.bg-completed {
    background-color: #198754 !important;
}

.bg-inactive {
    background-color: #6c757d !important;
}

.bg-active {
    background-color: #e91e63 !important;
}

.action-btn {
    border: none;
    background: none;
    padding: 0.25rem;
    margin: 0 0.125rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out;
}

.action-btn:hover {
    background-color: #f8f9fa;
}

.edit-btn {
    color: #6f42c1;
}

.delete-btn {
    color: #dc3545;
}
.view-btn {
    color: #91dc35;
}

.breadcrumb-nav {
    color: #6c757d;
    font-size: 0.875rem;
}

.table-container {
    background: var(--background-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.dataTables_wrapper .dataTables_length select {
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
}

.priority-high {
    color: #dc3545;
    font-weight: 500;
}

.priority-medium {
    color: #fd7e14;
    font-weight: 500;
}

.priority-low {
    color: #198754;
    font-weight: 500;
}


/*
TAb Layout*/

.tab_nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tab_nav-item {
    margin-bottom: 0.25rem;
}

.tab_nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    border-radius: 0;
}

.tab_nav-link:hover {
    background: var(--border-light);
    color: var(--theme-color);
    text-decoration: none;
}

.tab_nav-item.active > .tab_nav-link {
    background: color-mix(in srgb, var(--theme-color) 10%, transparent);
    color: var(--theme-color);
    border-bottom: 3px solid var(--theme-color);
    border-left: transparent;
    border-right: transparent;
    border-top: transparent;
    border-radius: 0;
}

.tab_nav-link i {
    flex-shrink: 0;
    font-size: 1.25rem;
    min-width: 24px;
    transition: all 0.3s ease;
}
.tab_nav-link i:first-child {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.tab_nav-link span {
    flex: 1;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab_nav-link svg {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    min-width: 20px;
    text-align: center;
    transition: all 0.3s ease;
    stroke-width: 2;
}

.drag-handle {
    cursor: move;
    font-size: 18px;
    text-align: center;
    color: #888;
}


/*
Button*/

.btn-primary:not(:disabled):not(.disabled).active:focus, .btn-primary:not(:disabled):not(.disabled):active:focus, .show > .btn-primary.dropdown-toggle:focus,
.btn-secondary:not(:disabled):not(.disabled).active:focus, .btn-secondary:not(:disabled):not(.disabled):active:focus, .show > .btn-secondary.dropdown-toggle:focus,
.btn-success:not(:disabled):not(.disabled).active:focus, .btn-success:not(:disabled):not(.disabled):active:focus, .show > .btn-success.dropdown-toggle:focus,
.btn-info:not(:disabled):not(.disabled).active:focus, .btn-info:not(:disabled):not(.disabled):active:focus, .show > .btn-info.dropdown-toggle:focus,
.btn-danger:not(:disabled):not(.disabled).active:focus, .btn-danger:not(:disabled):not(.disabled):active:focus, .show > .btn-danger.dropdown-toggle:focus,
.btn-warning:not(:disabled):not(.disabled).active:focus, .btn-warning:not(:disabled):not(.disabled):active:focus, .show > .btn-warning.dropdown-toggle:focus,
.btn-secondary:not(:disabled):not(.disabled).active:focus, .btn-secondary:not(:disabled):not(.disabled):active:focus, .show > .btn-secondary.dropdown-toggle:focus,
.btn-dark:not(:disabled):not(.disabled).active:focus, .btn-dark:not(:disabled):not(.disabled):active:focus, .show > .btn-dark.dropdown-toggle:focus,
.btn-outline-primary:not(:disabled):not(.disabled).active:focus, .btn-outline-primary:not(:disabled):not(.disabled):active:focus, .show > .btn-outline-primary.dropdown-toggle:focus,
.btn-outline-success:not(:disabled):not(.disabled).active:focus, .btn-outline-success:not(:disabled):not(.disabled):active:focus, .show > .btn-outline-success.dropdown-toggle:focus,
.btn-outline-info:not(:disabled):not(.disabled).active:focus, .btn-outline-info:not(:disabled):not(.disabled):active:focus, .show > .btn-outline-info.dropdown-toggle:focus,
.btn-outline-danger:not(:disabled):not(.disabled).active:focus, .btn-outline-danger:not(:disabled):not(.disabled):active:focus, .show > .btn-outline-danger.dropdown-toggle:focus,
.btn-outline-warning:not(:disabled):not(.disabled).active:focus, .btn-outline-warning:not(:disabled):not(.disabled):active:focus, .show > .btn-outline-warning.dropdown-toggle:focus,
.btn-outline-secondary:not(:disabled):not(.disabled).active:focus, .btn-outline-secondary:not(:disabled):not(.disabled):active:focus, .show > .btn-outline-secondary.dropdown-toggle:focus,
.btn-outline-dark:not(:disabled):not(.disabled).active:focus, .btn-outline-dark:not(:disabled):not(.disabled):active:focus, .show > .btn-outline-dark.dropdown-toggle:focus {
    box-shadow: none;
}

.btn.focus, .btn:focus,
.btn-success:focus, .btn-info:focus,
.btn-danger:focus, .btn-warning:focus,
.btn-secondary:focus, .btn-dark:focus,
.btn-outline-success:focus, .btn-outline-info:focus,
.btn-outline-danger:focus, .btn-outline-warning:focus,
.btn-outline-secondary:focus, .btn-outline-dark:focus,
.btn-light-default:focus, .btn-light-primary:focus,
.btn-light-success:focus, .btn-light-info:focus,
.btn-light-danger:focus, .btn-light-warning:focus,
.btn-light-secondary:focus, .btn-light-dark:focus {
    box-shadow: none;
    font-weight: bold;

}

.btn-light-primary{
    color: #1b55e2;
    background: #f5f8fc;
    border: 1px solid #1b55e2;
}
.btn-light-primary:hover{
    border: 1px solid #1b55e2;
    box-shadow: none;
}

.btn-light-secondary{
    color: #5c1ac3;
    background: #f4f6f9;
    border: 1px solid #5c1ac3;
}
.btn-light-secondary:hover{
    border: 1px solid #5c1ac3;
    box-shadow: none;
}

.btn-light-success{
    color: #8dbf42;
    background: #f3faf6;
    border: 1px solid #8dbf42;
}
.btn-light-success:hover{
    border: 1px solid #8dbf42;
    box-shadow: none;
}


.btn-light-danger{
    color: #e7515a;
    background: #fdf6f7;
    border: 1px solid #e7515a;
}
.btn-light-danger:hover{
    border: 1px solid #e7515a;
    box-shadow: none;
}

.btn-light-warning{
    color: #e2a03f;
    background: #fefaf4;
    border: 1px solid #e2a03f;
}
.btn-light-warning:hover{
    border: 1px solid #e2a03f;
    box-shadow: none;
}

.btn-light-info{
    color: #2196f3;
    background: #f6fbfd;
    border: 1px solid #2196f3;
    font-weight: bold;
}
.btn-light-info:hover{
    border: 1px solid #2196f3;
    box-shadow: none;
}

.btn-light-dark{
    color: #3b3f5c;
    background: #f5f5f5;
    border: 1px solid #3b3f5c;
}
.btn-light-dark:hover{
    border: 1px solid #3b3f5c;
    box-shadow: none;
}

/*Form MISC*/
#form label{
    color: var(--text-primary);
}

#d_table tr td{
    color: var(--text-primary) !important;
}
card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card-header {
    background-color: var(--card_header_bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.3rem .8rem;
    font-weight: 600;
    color: var(--text-primary);
}
.card-body {
    padding: 1.5rem;
    color: var(--text-primary);
}
.card-footer {
    background-color: var(--card_header_bg);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    text-align: right;
}


.tab-pane.animate-slide {
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.4s ease-in-out;
}

.tab-pane.show.active.animate-slide {
    transform: translateY(0);
    opacity: 1;
}

.dropdown-menu {
    min-width: 230px;
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.6rem 1rem;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.notification-dropdown .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
}
.notification-dropdown .list-group-item:hover {
    background-color: #f9f9fb;
}
.notification-dropdown img,
.notification-dropdown .rounded-circle {
    flex-shrink: 0;
}

.tab_nav-link.active {
    background: color-mix(in srgb, var(--theme-color) 10%, transparent);
    color: var(--theme-color);
    border-bottom: 3px solid var(--theme-color);
    border-left: transparent;
    border-right: transparent;
    border-top: transparent;
    border-radius: 0;
}

.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
    background: color-mix(in srgb, var(--theme-color) 10%, transparent);
    color: var(--theme-color);
    border-bottom: 3px solid var(--theme-color);
    border-left: transparent;
    border-right: transparent;
    border-top: transparent;
    border-radius: 0;
}


/* Theme Customizer Styles */
.theme-customizer-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--theme-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transition: all 0.3s ease;
}

.theme-customizer-btn:hover {
    background-color: var(--theme-color-hover);
    transform: rotate(45deg);
}

.theme-customizer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background-color: var(--background-color);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1051;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
}

.theme-customizer.open {
    right: 0;
}

.customizer-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customizer-body {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.customizer-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.customizer-section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.color-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--text-primary);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--background-color), 0 0 0 4px var(--text-primary);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Boxed layout */
.boxed-layout {
    max-width: 1600px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Flat corners */
.flat-corners {
    --radius-xs: 0;
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --radius-full: 0;
}
