:root {
    --primary-500: #c03439;
    --primary-400: #CB5B5F;
    --primary-300: #D58184;
    --primary-200: #E0A8AA;
    --primary-100: #EACECF;
    --secondry-100: #F1F7F0;
    --error: #f64e60;
    --success: #198754;
}

.grid-cols-5 {
    grid-template-columns: repeat(5,minmax(0,1fr))
}


.grid-cols-6 {
    grid-template-columns: repeat(6,minmax(0,1fr))
}

.btn-primary {
    border-color: var(--primary-500);
    background-color: var(--primary-500);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.swal2-icon::before{
    font-size: inherit !important;
}

:is([dir=ltr] .swal2-popup .swal2-html-container) {
    padding-right: unset!important
}

:is([dir=rtl] .swal2-popup .swal2-html-container) {
    padding-left: unset!important
}

.text-center{
    text-align: center !important;
}

.swal2-popup .swal2-styled.swal2-confirm {
    background-color: var(--success);
}

.swal2-popup .swal2-styled.swal2-cancel {
    color: var(--error);
}

.swal2-popup .swal2-html-container {
    margin-top: 15px !important;
    color: #787878;
}

.swal2-popup .swal2-styled{
    min-width: 100px;
}

.switch input:empty~span:before {
	/*EEE5FF*/
    background-color: #DECCFF;
}
.form-control {
	border: 1px solid #D9D9D9;
}
.border-right-1 {
    border-right: 1px solid gainsboro;
}

/* sticky footer */
div.card-footer {
    position: sticky;
    left: 0;
    bottom: 0;
    width: 100%;

}
/* Hide Input Number Arrows */

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

.text-dark-50 {
	color: #646676!important;
}

/* Tree view css */
.k-checkbox.k-state-indeterminate, .k-checkbox:indeterminate {
    color: #3c3b90 !important;
}
.k-checkbox {
    color: #3c3b90 !important;
}
.k-checkbox:checked {
    color: #3c3b90 !important;
}
.k-checkbox:hover {
    color: #3c3b90 !important;
}
.k-checkbox:checked:focus {
    box-shadow: 0 0 3px 0 #3c3b90 !important;
    border-color: #3c3b90 !important;
}
.k-checkbox:focus {
    box-shadow: 0 0 3px 0 #3c3b90 !important;
    border-color: #3c3b90 !important;
}
.k-treeview-leaf.k-selected.k-hover, .k-treeview-leaf.k-selected:hover {
    background-color: #3c3b90 !important;
}
.k-treeview-leaf.k-selected {
    background-color: #3c3b90 !important;
}
/* ------------- */

/* Css class for Filter Info */
.filterInfo {
    text-align: center; 
    padding-bottom: 20px;
    font-size: 16px;
}
/* ------------- */

/*css class for remove filter data*/
.remove-filter:hover{
    text-decoration: line-through !important;
}
/*end remove filter*/

.select2-container--disabled{
    background-color: #f3f6f9;
    border-color: #f3f6f9;
    color: #3f4254;
    font-weight: 500 !important;
}

table.dataTable tbody tr:hover {
  background-color: #F3F6F9 !important;
}

table.table-separate tbody tr:hover {
  background-color: #F3F6F9 !important;
}
.error{
    color: var(--error)!important;
}

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

.peer:checked~.peer-checked\:bg-success {
    background-color: var(--success);
}

.file-upload-container:has(input.error) {
    border-color: var(--error)!important;
}

.select2-section-cus:has(select.error) .select2-selection__rendered {
    border-style: dashed!important;
    border-color: var(--error)!important;
}

.mw-300{
    max-width: 300px;
}

.sales_form #er_repeater input.form-input, .purchase_form #er_repeater input.form-input{
    padding-left: 10px;
    padding-right: 10px;
    min-width: 60px;
    font-weight: 500;
}

.form-input.error, .nice-select.error {
    border-style: dashed!important;
    border-color: var(--error)!important;
}

.table-scroll{
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}
.f-13{
    font-size: 13px !important;
}
.json-beautifier { white-space: pre; font-family: monospace; }
.p-8px{
    padding: 8px !important;
}
.border-bottom-dotted{
    border-bottom: 1px dotted !important;
}
.border-bottom-top-solid{
    border-bottom: 1px solid !important;
    border-top: 1px solid  !important;
}
.sans-serif-font{
    font-family: sans-serif !important;
}
.text-black{
    color: black !important;
}
.inactiveLink {
    pointer-events: none !important;
    cursor: default !important;
}
.border-collapse{
    border-collapse: collapse;
}
.select2-container--default .select2-results__option[aria-selected=true]{
    background: #c7ccdd !important;
    color: #3f4254 !important;
}
.select2-container--default .select2-results__option.select2-results__option--highlighted {
    background: #c7ccdd !important;
    color: #3F428B;
}

/* new custom css */



.font-lexend{
    font-family: 'Lexend', sans-serif;
}

.font-semibold {
    font-weight: 500;
}

label {
    font-weight: 500;
}

.bg-theme-500 {
    background: var(--primary-500);
}

.text-theme-500{
    color: var(--primary-500);
}

.bg-theme-400 {
    background: var(--primary-400);
}

.bg-theme-300 {
    background: var(--primary-300);
}

.bg-theme-200 {
    background: var(--primary-200);
}

.bg-theme-100 {
    background: var(--primary-100);
}

.bg-theme-light {
    background: #ffffff;
}

.form-input:focus, .form-multiselect:focus, .form-select:focus, .form-textarea:focus, .nice-select:focus, .nice-select .nice-select-search:focus {
    border-color: var(--primary-500);
}

.text-primary {
    color: var(--primary-500);
}

/* table tfoot tr, table thead tr {
    background-color: var(--secondry-100)!important;
} */

.sidebar .nav-item a div:first-child svg, .sidebar .nav-item button div:first-child svg {
    color: #070707 !important
}

.sidebar .nav-item>a.active, .sidebar .nav-item>button.active ,.sidebar .nav-item>button.active span, .sidebar .nav-item>button.active div:first-child svg {
    background-color: var(--primary-500);
    color: #ffffff !important;
}

.sidebar .nav-item>a.active, .sidebar .nav-item>a.active ,.sidebar .nav-item>a.active span, .sidebar .nav-item>a.active div:first-child svg {
    background-color: var(--primary-500);
    color: #ffffff !important;
}

.sidebar ul.sub-menu li a:hover, .sidebar ul.sub-menu li button:hover {
    background-color: #00000014;
    color: var(--primary-500);
    border-radius: 6px;
}

.sidebar ul.sub-menu li a:hover:before, .sidebar ul.sub-menu li button:hover:before {
    background-color: #ffffff !important;
}

.top-header-cs .bg-white-light\/40{
    background-color: #ffffff !important;
}

.top-header-cs .hover\:text-primary:hover {
    color: #3b6932 !important;
}


.error.text-danger{
    margin-left: 10px;
    margin-left: 5px;
    margin-top: 5px;
    font-size: 12px;
}

.btn-border-danger{
    --tw-border-opacity: 1;
    border-color: rgb(231 81 90/var(--tw-border-opacity));
    --tw-text-opacity: 1;
    color: rgb(231 81 90/var(--tw-text-opacity));
    --tw-shadow-color: #e7515a99;
    --tw-shadow: var(--tw-shadow-colored);
    cursor: pointer;
}

.btn-light {
    background: white;
    color: black;
    box-shadow: unset;
    border-color: #999999;
    border-radius: 50px
}

.nice-select .current{
    font-weight: 600;
    color: black;
}
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple{
    border: unset!important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered, .select2-container .select2-selection--multiple .select2-selection__rendered{
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    background-color: #fff;
    border-radius: 5px;
    border: solid 1px #e8e8e8;
    box-sizing: border-box;
    clear: both;
    cursor: pointer;
    display: block !important;
    float: left;
    font-family: inherit;
    font-size: 14px;
    font-weight: normal;
    height: 38px;
    line-height: 36px!important;
    outline: none;
    padding-left: 18px !important;
    padding-right: 30px !important;
    position: relative;
    text-align: left !important;
    transition: all .2s ease-in-out;
    user-select: none;
    white-space: nowrap !important;
    width: 100%;
    font-weight: 600;
}

.select2-container .select2-search--inline .select2-search__field{
    margin-top: unset !important;
    margin-left: unset !important;
    height: auto !important;
}
.select2-container .select2-selection--multiple .select2-selection__rendered{
    /* display: flex !important; */
    padding: 0px 10px !important;
    height: auto;
    padding-bottom: 4px !important;
}

.disabled-container {
    pointer-events: none;
}

.disabled-container .select2-selection__rendered {
    background: #f7f7f7 !important;
}

.file-title{
    color: var(--primary-500);
    font-size: 10px;
    text-align: left;
}

.file-name{
    font-size: 14px;
}

.select2-container--disabled .select2-selection__rendered{
    background: #f7f7f7 !important;
}

.select2-container .select2-selection--multiple .select2-selection__rendered .select2-search--inline{
    margin-left: 5px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{
    padding: 0 8px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice{
    padding-left: 40px !important;
    padding-right: 10px !important;
    line-height: 27px !important;
    max-height: 28px !important;
    margin-top: 4px !important;
    float: left;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 25px !important;
    top: 6px !important;
    right: 10px !important;
    width: 20px !important;
}

.select2-container--open .select2-dropdown--below {
    border-top: 1px solid #e0e6ed !important;
    border: 1px solid #e0e6ed;
    border-radius: 5px!important;
    overflow: hidden;
}

.select2-container--open .select2-dropdown--above{
    border-bottom: 1px solid #e0e6ed !important;
    border: 1px solid #e0e6ed;
    border-radius: 5px!important;
    overflow: hidden;
}

input:focus-visible {
    outline: none!important;
}


.select2-results__option {
    padding: 0!important;
    cursor: pointer;
    font-weight: 400;
    line-height: 40px;
    list-style: none;
    outline: none;
    padding-left: 18px!important;
    padding-right: 29px!important;
    text-align: left;
    transition: all .2s;
}

.select2-container--default .select2-results__option.select2-results__option--highlighted {
    background: #f6f6f6 !important;
    color: #000000!important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: #f6f6f6 !important;
    color: #000000 !important;
    font-weight: 600;
}


/* file upload */
.file-upload-container {
    text-align: center;
    border: 1px dashed #e0e6ed;
    border-radius: 10px;
    background: #e0e6ed21;
    padding: 0 10px;
  }
  .upload-section {
    width: 100%;
    cursor: pointer;
    margin-bottom: 10px;
  }
  
  .image-container {
    position: relative;
  }
  
  .uploaded-image {
    width: 70px;
    height: 70px;
    margin: 0 auto;
  }
  

  
  .hidden-input {
    /* display: none; */

    visibility: hidden;
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .upload-text {
    /* margin-bottom: 10px; */
    margin: 0px 10px 5px;
  }

  .upload-text  .sm-text{
    font-weight: 300;
    font-size: 12px;
  }


  input[readonly] {
    background-color: #f7f7f7;
  }
  
  .flatpickr-day.selected{
    background: var(--primary-500) !important;
    color: #fff!important;
    border-color: var(--primary-500)!important;
  }

  .flatpickr-weekdays{
    background: var(--primary-500) !important;
  }

  span.flatpickr-weekday{
    color: #fff!important;
  }
  .flatpickr-days{
    padding-top: 5px;
    background: var(--primary-100);
  }

  .flatpickr-day.today {
    border-color:var(--primary-500);
}

/* edit btn on the table  */

.dt-edit-text {
    text-decoration: none;
    color: var(--primary-500);
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-right: 25px; /* Space for the icon */
}

.dt-edit-text::before {
    content: url('../assets/images/icons/edit.svg'); /* Use the path to your SVG icon */
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-60%);
    width: 16px; /* Adjust the width of the icon */
    height: 16px; /* Adjust the height of the icon */
    opacity: 0; /* Initially hide the icon */
    transition: opacity 0.3s ease; /* Add a smooth transition effect */
}

.dt-edit-text:hover::before {
    opacity: 1;
}
.float-left{
    float: left !important;
}
#swal2-html-container{
    margin-top:20px !important;  
}
.swal2-icon-content{
    display: none !important;
}

.file-view-sec{
    border: 1px solid #e8e8e8;
    padding: 10px;
    border-radius: 0.375rem;
    background: #fafafa;
}

.file-view-sec label{
    background: #e8e8e8;
    padding: 5px 10px;
    border-radius: 0.3rem;
    margin: 0;
    
}

.file-view-sec .work-order-file-link {
    padding: 0 10px;
}

.peer:checked~.peer-checked\:bg-primary{
    background-color: rgb(0 128 0/var(--tw-bg-opacity));
}

.sec-titles label {
    border-radius: 0.375rem;
    background: var(--primary-500);
    padding: 12px 10px;
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.hover-icons:hover svg {
    fill: white !important;
}

.repeater-error .error.text-danger{
    font-size: 8px;
    margin: 0;
}

.bottom-cbm-row{
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 9999;
    padding: 20px;
    box-shadow: 0px 0px 5px #b5b5b5;
    background: white;
    width: 100%;
}

.fileCustomPadding{
    padding-top: 5px;
    padding-bottom: 5px;
}

.dataTable-pagination .active a {
    background-color: #000000;
}

.dataTable-pagination a:hover {
    background-color: #c03439 !important;
}

.min-w-130 {
    min-width: 130px;
}

.min-w-80 {
    min-width: 80px;
}

#addStock label.error {
    display: none !important;
}

.jsAtten label.error{
    margin: 1px 5px;
    font-size: 10px;
}

.flex-form {
    display: flex;
    align-items: center;
}

.flex-form .input {
    margin-right: 10px;
}

.flex-form .action_button {
    display: flex;
    align-items: center;
}

.flex-form .action_button button {
    margin-right: 10px;
}

.border-radius-0{
    border-radius: 0 !important;
}

.flatpickr-monthSelect-month.selected, .flatpickr-monthSelect-month.startRange, .flatpickr-monthSelect-month.endRange {
    background-color: var(--primary-500) !important;
    box-shadow: none;
    color: #fff;
    border-color: var(--primary-500) !important;
}


.tile-orange {
    color: #d88714;
    background-color: #ede1d4;
    border-color: #ede1d4;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}


.tile-blue {
    color: #1452d8;
    background-color: #d4e0ed;
    border-color: #d4e0ed;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.line-through {
    text-decoration-color: var(--primary-500);
    text-decoration-thickness: 2px;
}

.todos .dataTable-bottom{
    margin: 0px 10px;
    padding-bottom: 15px;
}

.todolist .active-user{
    background: linear-gradient(45deg, #000000, #a0a0a0);
    color: white;
}

.cs-amt-tile{
    float: right;
    margin-left: 10px;
    height: 100%;
    padding: 9px;
}


/* datatable style */
.dataTable-table thead tr th {
    font-size: .875rem;
    font-weight: 500 !important;
    border-bottom: none !important ;
  }


  .dataTable-input-cs, .dataTable-selector-cs{
    width: auto;
    background-color: #fff !important;
    color: #0e1726;
    border-color: #e0e6ed !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    border-width: 1px !important;
    outline: none !important;
  }

  .dataTable-selector-cs{
    margin-left: 15px;
  }


  .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 100px !important;
    border: 1px solid #b6b6b6 !important;
    margin-left: 5px !important;
}

    .dataTables_wrapper .dataTables_paginate .paginate_button:hover{
        background: var(--primary-300) !important ;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{
        background: #ffffff !important;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{
        color: #dbdbdb !important;
    }


    .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{ 
        background: var(--primary-400) !important ;
        color: #ffffff !important;
    }
    
    
/* Also remove any sorting-specific background images */
    table.dataTable thead .sorting,
    table.dataTable thead .sorting_asc,
    table.dataTable thead .sorting_desc {
        background-image: none !important;
    }

    
    .dataTable thead th.sorting::after {
        content: '▲▼'; /* Icons for both directions when unsorted */
        color: #cccccc;
        font-size: 10px;
        margin-left: 5px;
    }
    
    /* Custom icon for ascending sort */
    .dataTable thead th.sorting_asc::after {
        content: '▲'; /* Icon for ascending */
        color: var(--primary-500);
        font-size: 10px;
        margin-left: 5px;
    }
    
    /* Custom icon for descending sort */
    .dataTable thead th.sorting_desc::after {
        content: '▼'; /* Icon for descending */
        color: var(--primary-500);
        font-size: 10px;
        margin-left: 5px;
    }

    /* datatable end */

    .delete-icon{
        color: red;
    }

 /* Drawer Styles */
#challanDrawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 700px; /* Adjust width as needed */
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
    border-left: 2px solid #ddd;
    display: flex;
    flex-direction: column;
}

/* When drawer is active */
#challanDrawer.active {
    transform: translateX(0);
}

/* Drawer header (Fixed at top) */
#challanDrawer .drawer-header {
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Close button */
#challanDrawer .close-btn {
    font-size: 20px;
    cursor: pointer;
    color: #555;
}

#challanDrawer .close-btn:hover {
    color: red;
}

/* Scrollable Drawer Content */
#challanDetails {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Drawer footer (Fixed at bottom) */
#challanDrawer .drawer-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
    background: #f8f9fa;
    font-weight: bold;
    text-align: center;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Table Styling */
#challanDetails table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#challanDetails th, #challanDetails td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

#challanDetails th {
    background-color: #f2f2f2;
}

/* Dark Overlay */
#drawerOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 9998; /* Below the drawer */
    display: none;
}

/* Show overlay when drawer is active */
#drawerOverlay.active {
    display: block;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
.blink {
    animation: blink 1s infinite;
}


@keyframes rowBlinkGreen {
    0% { background-color: rgba(255, 255, 255, 0.1); } /* Light Green */
    50% { background-color: rgba(156, 156, 156, 0.3); } /* Darker Green */
    100% { background-color: rgba(0, 255, 0, 0.1); }
}

@keyframes rowBlinkOrange {
    0% { background-color: rgba(255, 165, 0, 0.1); } /* Light Orange */
    50% { background-color: rgba(255, 165, 0, 0.3); } /* Darker Orange */
    100% { background-color: rgba(255, 165, 0, 0.1); }
}

@keyframes rowBlinkGray {
    0% { background-color: rgba(240, 240, 240, 0.1); } /* Light Gray */
    50% { background-color: rgba(160, 160, 160, 0.3); } /* Medium Gray */
    100% { background-color: rgba(200, 200, 200, 0.1); } /* Soft Gray */
}

/* ✅ Green Blink for 1 Day Left */
tr:has(td .blink-success) {
    animation: blink 1s infinite;
}

/* ✅ Orange Blink for 2 Days Left */
tr:has(td .blink-warning) {
    animation: blink 1s infinite;
}


/* ✅ Orange Blink for 2 Days Left */
tr:has(td .blink-today) {
    animation: rowBlinkGray 1s infinite;
}