/* Custom Application & Data Grid Theme */

:root {
  --grid-bg: #ffffff;
  --grid-header-bg: #f9fafb;
  --grid-header-color: #111827;
  --grid-border-color: #e5e7eb;
  --grid-row-hover: #f3f4f6;
  --grid-row-alt: #fcfcfc;
}

/* Tabulator custom styling aligned with Gray & Indigo */
.tabulator {
  font-family: inherit;
  font-size: 0.845rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: var(--grid-bg);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.tabulator .tabulator-header {
  background-color: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  color: #111827;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tabulator .tabulator-header .tabulator-col {
  background-color: #f9fafb;
  border-right: 1px solid #e5e7eb;
  padding: 8px 10px;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content {
  padding: 2px 0;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-title {
  font-weight: 600;
  color: #1f2937;
}

.tabulator .tabulator-row {
  background-color: #ffffff;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease;
}

.tabulator .tabulator-row:nth-child(even) {
  background-color: #fafafa;
}

.tabulator .tabulator-row:hover {
  background-color: #f3f4f6 !important;
}

.tabulator .tabulator-row .tabulator-cell {
  padding: 8px 10px;
  border-right: 1px solid #f3f4f6;
  color: #374151;
  font-variant-numeric: tabular-nums;
}

/* Tree Data expand/collapse toggle */
.tabulator-data-tree-branch {
  border-left: 2px solid #cbd5e1 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

.tabulator-data-tree-control {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 18px !important;
  height: 18px !important;
  background-color: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 4px;
  font-weight: 700;
  color: #4b5563;
  cursor: pointer;
  margin-right: 6px;
  transition: all 0.15s ease;
}

.tabulator-data-tree-control:hover {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4338ca !important;
}

/* Footer / Grand Total calculations */
.tabulator .tabulator-footer {
  background-color: #f3f4f6;
  border-top: 2px solid #d1d5db;
  font-weight: 700;
  color: #111827;
}

.tabulator .tabulator-footer .tabulator-calcs-holder {
  background-color: #f3f4f6 !important;
  border-top: none !important;
}

.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {
  background-color: #f3f4f6 !important;
  font-weight: 700 !important;
  color: #111827 !important;
}

.tabulator .tabulator-footer .tabulator-cell {
  font-weight: 700 !important;
  color: #111827 !important;
}

/* Custom modern scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #f9fafb;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Searchable Select custom dropdown enhancements */
.searchable-select {
  position: relative;
}

.searchable-select.z-50 {
  z-index: 50 !important;
}

.searchable-select .dropdown-panel {
  z-index: 9999 !important;
  animation: fadeInDown 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.searchable-select .options-list::-webkit-scrollbar {
  width: 5px;
}
.searchable-select .options-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
