:host {
  display: block;
}

/* Modern card wrapper */
.data-table-modern .box {
  border-radius: 1rem;
  border: 1px solid var(--color-defaultborder);
  background-color: var(--color-white);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

:host-context(.dark) .data-table-modern .box {
  border-color: color-mix(in srgb, #fff 10%, transparent);
  background-color: var(--color-bodybg);
}

.data-table-modern .box-header {
  // padding: 1rem 1.25rem;
  padding: 7px 20px;
  border-bottom: 1px solid var(--color-defaultborder);
}

:host-context(.dark) .data-table-modern .box-header {
  border-color: color-mix(in srgb, #fff 10%, transparent);
}

.data-table-modern .box-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-defaulttextcolor);
}

/* Search input */
.search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.brdr-clr {
  border: 1.5px solid #7c3deb !important;

}


.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-textmuted, #8c9097);
  font-size: 0.8125rem;
  pointer-events: none;
}

.data-table-modern .search-wrapper .form-control-sm {
  min-width: 180px;
  padding-left: 2.25rem !important;
  border-radius: 9999px;
  border-color: var(--color-defaultborder);
  background-color: var(--color-white);
  font-size: 0.8125rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.data-table-modern .search-wrapper .form-control-sm:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
  outline: none;
}

:host-context(.dark) .data-table-modern .search-wrapper .form-control-sm {
  background-color: var(--color-bodybg);
  border-color: color-mix(in srgb, #fff 10%, transparent);
  color: var(--color-defaulttextcolor);
}

/* Table body / wrapper */
.modern-table-body {
  padding: 0 !important;
}

.modern-table-wrapper {
  border-radius: 0 0 0.75rem 0.75rem;
}

/* Table */
.data-table-modern .table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}

.data-table-modern .table.table-bordered,
.data-table-modern .table.table-bordered thead th,
.data-table-modern .table.table-bordered tbody td {
  border: none;
}

.data-table-modern .table thead {
  // background: linear-gradient(
  //   135deg,
  //   #020617 0%,
  //   #172554 40%,
  //   #4338CA 75%,
  //   #7C3AED 100%
  // );
  background: #7C3AED;
  color: var(--color-white);
}

.data-table-modern .table thead th {
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  color: var(--color-white);
  background: transparent;
  border: none;
}

.data-table-modern .table tbody td {
  padding: 0.2rem 0.75rem;
  vertical-align: middle;
  color: var(--color-defaulttextcolor);
  border: none;
  font-size: 0.8125rem;
}

.data-table-modern .table tbody tr:hover {
  // background-color: var(--color-light);

  background-color: #e1d0ff;
}

:host-context(.dark) .data-table-modern .table tbody tr:hover {
  background-color: color-mix(in srgb, #fff 6%, transparent);
}

/* Inactive row action buttons border */
.data-table-modern .inactive-actions button {
  border: 1.5px solid #7c3deb !important;
}

/* Footer */
.data-table-modern .box-footer {
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--color-defaultborder);
  background-color: color-mix(in srgb, var(--color-primary) 3%, transparent);
}

:host-context(.dark) .data-table-modern .box-footer {
  border-color: color-mix(in srgb, #fff 10%, transparent);
  background-color: color-mix(in srgb, var(--color-primary) 6%, transparent);
}

/* Pagination */
.data-table-modern .ti-pagination {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.data-table-modern .ti-pagination li.page-item {
  display: inline-flex;
  border: 1px solid var(--color-primary);
  border-radius: 9999px;
}

.data-table-modern .ti-pagination li.page-item.disabled {
  opacity: 0.4;
}

.data-table-modern .ti-pagination li .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border-radius: 9999px;
  border: none;
  background-color: transparent;
  color: var(--color-defaulttextcolor);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  transition: all 0.15s ease;
}

.data-table-modern .ti-pagination li .page-link:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--color-primary) 10%, transparent);
  color: var(--color-primary);
}

.data-table-modern .ti-pagination li.active .page-link,
.data-table-modern .ti-pagination li .page-link.active {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

.data-table-modern .ti-pagination li.disabled .page-link {
  cursor: not-allowed;
  background-color: transparent;
}

:host-context(.dark) .data-table-modern .ti-pagination li .page-link {
  background-color: transparent;
  color: color-mix(in srgb, var(--color-defaulttextcolor) 80%, #fff);
}

:host-context(.dark) .data-table-modern .ti-pagination li .page-link:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--color-primary) 15%, transparent);
  color: var(--color-primary);
}

:host-context(.dark) .data-table-modern .ti-pagination li.active .page-link {
  color: var(--color-white);
  background-color: var(--color-primary);
}

/* Responsive scroll */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.table th,
.table td {
  vertical-align: middle;
}

/* Remove number spinner buttons for cleaner look (kept from original) */
.data-table-modern .custom-floating-input[type='number']::-webkit-inner-spin-button,
.data-table-modern .custom-floating-input[type='number']::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.data-table-modern .custom-floating-input[type='number'] {
  -moz-appearance: textfield;
}