/* Prevent Vue.js flickering */
[v-cloak] {
  display: none !important;
}

.main-menu .navbar-header .navbar-brand {
  margin-top: 0.6rem !important;
}
/* Define Variables */
:root {
  --sort-icon-color: #999;
  --active-color: #6e6b7b;
  --sort-icon-opacity: 0.4;
  --primary: #22b35c;
}

/* Sortable column styling */
th.sortable {
  cursor: pointer;
  position: relative;
  text-align: left;
}
th,
td {
  padding-left: 15px !important;
}

/* Sorting icons (both arrows always visible) */
th.sortable::before,
th.sortable::after {
  content: "";
  position: absolute;
  right: 5px;
  width: 1.42rem;
  height: 1.42rem;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: var(--sort-icon-opacity); /* Default faded */
  transition: opacity 0.2s ease-in-out; /* Smooth transition effect */
}

/* Up arrow */
th.sortable::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M7 10l5-5 5 5H7z"/></svg>');
  top: 25%;
}

/* Down arrow */
th.sortable::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M7 14h10l-5 5-5-5z"/></svg>');
  top: 35%;
}

/* Active sorting states */
th.sortable.sorted-asc::before,
th.sortable.sorted-desc::after {
  opacity: 1; /* Highlight active arrow */
}

/* Inactive arrows remain faded */
th.sortable.sorted-asc::after,
th.sortable.sorted-desc::before {
  opacity: var(--sort-icon-opacity); /* Faded */
}

/* Update active colors */
th.sortable.sorted-asc::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236E6B7B"><path d="M7 10l5-5 5 5H7z"/></svg>');
}

th.sortable.sorted-desc::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236E6B7B"><path d="M7 14h10l-5 5-5-5z"/></svg>');
}

/* Style for the options */
.custom-btn-option {
  background-color: #f8f9fa; /* Grey background for options */
  color: var(--active-color) !important;
}

.custom-btn:focus {
  border: none !important;
  outline: none !important;
}

.toast-message {
  font-size: 14px !important; /* Increases message size */
  line-height: 1.2 !important; /* Improves readability */
}
.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title {
  font-size: 16px !important;
  font-weight: bold;
  margin-bottom: 5px;
}
.jconfirm .jconfirm-box div.jconfirm-title-c {
  line-height: 5px;
  padding-bottom: 10px;
}
.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c i {
  vertical-align: middle;
  font-size: 2.8rem;
  margin-bottom: 10px;
}
.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-title-c {
  margin-bottom: 0px;
}
.jconfirm.jconfirm-modern .jconfirm-box {
  padding: 15px !important;
}
.jconfirm .jconfirm-box .jconfirm-buttons {
  padding-bottom: 0 !important;
}
.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-content {
  margin-bottom: 5px;
  color: #676d7d;
}
.jconfirm .jconfirm-box div.jconfirm-content-pane {
  margin-bottom: 5px;
}

/* Add a left indicator ONLY to the first <td> of the active row */
.table tbody tr.table-active td:first-child {
  position: relative;
}

/* Create the left indicator inside the first <td> */
.table tbody tr.table-active td:first-child::before {
  content: "";
  position: absolute;
  left: 0; /* Aligns to the left edge of the first td */
  top: 0;
  height: 100%; /* Matches the height of the first td */
  width: 2px; /* Thin left border */
  background-color: #22b35c; /* Primary blue highlight */
  pointer-events: none; /* Prevents interaction issues */
  z-index: 1; /* Ensures it stays visible */
}
.table-active,
.table-active > th,
.table-active > td {
  /* background-color: #e5f8edb3 !important; */
  background-color: #e5f8edb3 !important;
  /* border-bottom: 1px solid #d1d7d2 !important; */
}
.filter .filter-item:last-of-type {
  margin-right: 0 !important;
}

.clear-filter {
  text-decoration: underline !important;
}
.mt-minus-15 {
  margin-top: -15px !important;
}
.readonly-input {
  cursor: not-allowed !important;
  pointer-events: none !important; /* Prevent all interactions */
}
form input.error,
form select.error,
form select.error:focus,
form input.error:focus {
  border-color: #ea5455 !important;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  top: 10px !important;
  right: -2px !important;
  height: 20px;
}
.select2-container.is-invalid .select2-selection {
  border: 1px solid #ea5455 !important;
  border-radius: 0.25rem;
}

/* Highlight Select2 box when invalid */
.select2-container--default .select2-selection.is-invalid {
  border: 1px solid #ea5455 !important;
  border-radius: 0.25rem;
}

.select2-selection__clear {
  display: block !important;
  font-size: 1.2rem;
  color: #9a98a3;
  cursor: pointer;
  margin-right: 6px;
}

.select2-container--default .select2-selection--single {
  border: 1px solid #d8d6de !important;
  border-radius: 0.357rem !important;
  font-size: 1rem !important;
  color: #6e6b7b !important;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: #7d7b89 !important;
}
.select2-container--default
  .select2-selection--single.is-invalid
  .select2-selection__arrow
  i {
  color: #ea5455 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
  background: #4caf50;
  border-color: #8bc34a;
}
/* .bg-label-success {
  background-color: rgb(40, 199, 111) !important;
  color: #fff !important;
} */

.bg-label-success {
  background-color: color-mix(in sRGB, #fff 84%, #28c76f) !important;
  color: #28c76f !important;
}
.bg-label-danger {
  background-color: color-mix(in sRGB, #fff 85%, #ff4c51) !important;
  color: #ff4c51 !important;
}
.text-bg-danger {
  color: #fff !important;
  background-color: #ff4c51 !important;
}
.text-bg-success {
  color: #fff !important;
  background-color: #28c76f !important;
}
.text-bg-info {
  color: #fff !important;
  background-color: #00cfe8 !important;
}
.text-bg-warning {
  color: #fff !important;
  background-color: #ff9f43 !important;
}
.bg-label-warning {
  background-color: color-mix(in sRGB, #fff 85%, #ff9f43) !important;
  color: #ff9f43 !important;
}
.bg-label-info {
  background-color: color-mix(in sRGB, #fff 85%, #00cfe8) !important;
  color: #00cfe8 !important;
}
.bg-label-primary {
  background-color: color-mix(in sRGB, #fff 85%, #7367f0) !important;
  color: #7367f0 !important;
}
.bg-label-secondary {
  background-color: color-mix(in sRGB, #fff 85%, #82868b) !important;
  color: #82868b !important;
}
.bg-label-pink {
  background-color: color-mix(in sRGB, #fff 85%, #ea5455) !important;
  color: #ea5455 !important;
}
.me-0 {
  margin-inline-end: 0 !important;
}

.me-50 {
  margin-inline-end: 0.125rem !important;
}

.me-1 {
  margin-inline-end: 0.25rem !important;
}

.me-1_5 {
  margin-inline-end: 0.375rem !important;
}

.me-2 {
  margin-inline-end: 0.5rem !important;
}

.me-3 {
  margin-inline-end: 0.75rem !important;
}

.me-4 {
  margin-inline-end: 1rem !important;
}

.me-5 {
  margin-inline-end: 1.25rem !important;
}

.me-6 {
  margin-inline-end: 1.5rem !important;
}

.me-7 {
  margin-inline-end: 1.75rem !important;
}

.me-8 {
  margin-inline-end: 2rem !important;
}

.me-9 {
  margin-inline-end: 2.25rem !important;
}

.me-10 {
  margin-inline-end: 2.5rem !important;
}

.me-11 {
  margin-inline-end: 2.75rem !important;
}

.me-12 {
  margin-inline-end: 3rem !important;
}
.avatar-sm {
  height: 28px;
  width: 28px;
  line-height: 2px;
}
.filter-box {
  border-top: 1px solid #ebe9f1;
}
.table-responsive.adjust-height {
  min-height: 60vh;
}
.select2-caret {
  position: absolute !important;
  right: 0.75rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  pointer-events: none;
  color: #d8d6de !important;
  height: 1rem !important;
  width: 1rem !important;
  font-size: 1rem !important;
}
.select2-container--classic .select2-selection--multiple,
.select2-container--default .select2-selection--multiple {
  min-height: 37.98px !important;
  border-radius: 0.357rem !important;
  border: 1px solid #d8d6de !important;
}
strong.select2-results__group {
  color: #226e46;
}
/* Wrapper makes both sides equal height */
.split-wrapper {
  display: flex;
  height: 100%;
  min-height: 300px;
}

/* Left and right equal columns */
.split-left,
.split-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Vertical divider */
.vertical-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, #ccc, transparent);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  margin: 0 10px;
}

/* Scrollable area */
.scroll-section {
  overflow-y: auto;
  max-height: 58vh;
  padding-right: 15px;
}

/* Mobile view: stack vertically */
@media (max-width: 767.98px) {
  .split-wrapper {
    flex-direction: column;
  }
  .vertical-divider {
    display: none;
  }
}
