/* actions.css */
/**
 * React Power Table - Actions Styles
 * Styling for row action buttons and dropdowns
 */

/* Actions container */
.rpt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-width: 100px;
  width: 100%;
  height: 100%;
  padding: 0;
  white-space: nowrap;
}

/* Position variants */
.rpt-actions--inline {
  white-space: nowrap;
}

.rpt-actions--dropdown {
  position: relative;
}

.rpt-actions--end {
  justify-content: flex-end;
}

.rpt-actions--center {
  justify-content: center;
}

.rpt-actions--start {
  justify-content: flex-start;
}

/* Show more button */
.rpt-actions-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  border: none;
  background-color: transparent;
  color: #6B7280;
  cursor: pointer;
  flex-shrink: 0; /* Prevent button from shrinking */
  transition: all 0.2s ease;
}

.rpt-actions-more-btn:hover {
  background-color: #F3F4F6;
  color: #1F2937;
}

.rpt-actions-more-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.rpt-actions-more-btn:active {
  transform: translateY(1px);
}

/* Action button */
.rpt-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.375rem;
  min-width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  flex-shrink: 0; /* Prevent button from shrinking */
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease,
              transform var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-action-btn:active {
  transform: translateY(1px);
}

.rpt-action-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

.rpt-action-btn-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Button variants */
.rpt-action-btn--default {
  background-color: var(--rpt-input-bg);
  border-color: var(--rpt-border-color);
  color: var(--rpt-text-color);
}

.rpt-action-btn--default:hover {
  background-color: var(--rpt-row-hover-bg);
  border-color: var(--rpt-border-hover-color);
}

.rpt-action-btn--outline {
  background-color: transparent;
  border-color: var(--rpt-border-color);
  color: var(--rpt-text-color);
}

.rpt-action-btn--outline:hover {
  background-color: var(--rpt-row-hover-bg);
  border-color: var(--rpt-border-hover-color);
}

.rpt-action-btn--primary {
  background-color: var(--rpt-primary);
  border-color: var(--rpt-primary);
  color: #ffffff;
}

.rpt-action-btn--primary:hover {
  background-color: var(--rpt-primary-dark);
  border-color: var(--rpt-primary-dark);
}

.rpt-action-btn--destructive {
  background-color: var(--rpt-danger);
  border-color: var(--rpt-danger);
  color: #ffffff;
}

.rpt-action-btn--destructive:hover {
  background-color: var(--rpt-danger-hover);
  border-color: var(--rpt-danger-hover);
}

.rpt-action-btn--ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--rpt-text-color);
}

.rpt-action-btn--ghost:hover {
  background-color: var(--rpt-row-hover-bg);
}

.rpt-action-btn--link {
  background-color: transparent;
  border-color: transparent;
  color: var(--rpt-primary);
  padding: 0;
  height: auto;
  text-decoration: none;
}

.rpt-action-btn--link:hover {
  text-decoration: underline;
}

/* Actions dropdown */
.rpt-actions-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  width: 180px;
  margin-top: 0.25rem;
  background-color: var(--rpt-bg-color);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 0.25rem 0;
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease;
}

.rpt-actions-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--rpt-text-color);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease;
}

.rpt-actions-dropdown-item:hover {
  background-color: var(--rpt-row-hover-bg);
}

.rpt-actions-dropdown-item:focus-visible {
  outline: none;
  background-color: var(--rpt-row-hover-bg);
}

.rpt-actions-dropdown-item--destructive {
  color: var(--rpt-danger);
}

/* Tooltip */
.rpt-tooltip-wrapper {
  position: relative;
  display: inline-flex; /* Keep tooltip wrapper inline */
}

.rpt-action-tooltip {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 0.35rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity var(--rpt-transition-duration) ease,
              transform var(--rpt-transition-duration) ease;
}

.rpt-action-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  margin-left: -4px;
  width: 8px;
  height: 8px;
  background-color: rgba(0, 0, 0, 0.8);
  transform: rotate(45deg);
}

.rpt-action-btn:hover .rpt-action-tooltip {
  opacity: 1;
}

[data-theme="dark"] .rpt-action-tooltip {
  background-color: rgba(255, 255, 255, 0.8);
  color: #000000;
}

[data-theme="dark"] .rpt-action-tooltip::after {
  background-color: rgba(255, 255, 255, 0.8);
}

/* Disabled state */
.rpt-action-btn:disabled,
.rpt-actions-dropdown-item:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Responsive styles for mobile */
@media (max-width: 640px) {
  .rpt-actions {
    flex-direction: row;
    gap: 2px;
  }
  
  .rpt-action-btn {
    width: 28px;
    height: 28px;
  }
}

/* For high contrast mode */
@media (forced-colors: active) {
  .rpt-action-btn {
    border: 1px solid CanvasText;
  }
  
  .rpt-action-btn:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}

/**
 * React Power Table - Actions Styles
 * Styling for action buttons and menus in the table rows
 */

/* Action row container */
.rpt-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 4px;
  flex-wrap: wrap;
  max-width: 225px;
}

/* Action row alignment variants */
.rpt-row-actions--left {
  justify-content: flex-start;
}

.rpt-row-actions--center {
  justify-content: center;
}

.rpt-row-actions--right {
  justify-content: flex-end;
}

/* Action button */
.rpt-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: transparent;
  border: none;
  border-radius: 4px;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.rpt-action-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

.rpt-action-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rpt-action-button:hover:not(:disabled) {
  background-color: rgba(0, 0, 0, 0.04);
}

.rpt-action-button:active {
  transform: translateY(1px);
}

/* Action button icon */
.rpt-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--rpt-transition-duration) ease;
  width: 16px;
  height: 16px;
}

.rpt-action-icon svg {
  width: 16px;
  height: 16px;
}

/* Action button label */
.rpt-action-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action button variants */
.rpt-action-button--primary {
  color: var(--rpt-primary);
  background-color: rgba(59, 130, 246, 0.1);
  border-color: transparent;
}

.rpt-action-button--primary:hover:not(:disabled) {
  background-color: rgba(59, 130, 246, 0.15);
}

.rpt-action-button--secondary {
  color: var(--rpt-muted-text);
  background-color: var(--rpt-btn-secondary-bg);
  border-color: transparent;
}

.rpt-action-button--secondary:hover:not(:disabled) {
  background-color: var(--rpt-btn-secondary-hover-bg);
  color: var(--rpt-text-color);
}

.rpt-action-button--danger {
  color: var(--rpt-danger);
  background-color: rgba(239, 68, 68, 0.1);
}

.rpt-action-button--success {
  color: var(--rpt-success);
  background-color: rgba(16, 185, 129, 0.1);
  border-color: transparent;
}

.rpt-action-button--success:hover:not(:disabled) {
  background-color: rgba(16, 185, 129, 0.15);
}

.rpt-action-button--warning {
  color: var(--rpt-warning);
  background-color: rgba(245, 158, 11, 0.1);
  border-color: transparent;
}

.rpt-action-button--warning:hover:not(:disabled) {
  background-color: rgba(245, 158, 11, 0.15);
}

.rpt-action-button--ghost {
  color: var(--rpt-text-color);
  background-color: transparent;
  border-color: transparent;
}

.rpt-action-button--ghost:hover:not(:disabled) {
  background-color: var(--rpt-row-bg-alt);
}

.rpt-action-button--outline {
  color: var(--rpt-text-color);
  background-color: transparent;
  border-color: var(--rpt-border-color);
}

.rpt-action-button--outline:hover:not(:disabled) {
  background-color: var(--rpt-row-bg-alt);
  border-color: var(--rpt-border-hover-color);
}

/* Icon-only action buttons */
.rpt-action-icon-only {
  padding: 0.375rem;
}

/* Dropdown toggle button */
.rpt-action-dropdown-toggle {
  padding: 0.375rem;
  border-radius: 0.25rem;
  color: var(--rpt-muted-text);
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--rpt-transition-duration) ease;
}

.rpt-action-dropdown-toggle:hover {
  background-color: var(--rpt-row-bg-alt);
  color: var(--rpt-text-color);
}

.rpt-action-dropdown-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

/* Tooltip for actions */
.rpt-action-tooltip {
  position: absolute;
  z-index: 50;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  background-color: var(--rpt-text-color);
  color: white;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--rpt-transition-duration) ease, transform var(--rpt-transition-duration) ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rpt-action-button:hover .rpt-action-tooltip,
.rpt-action-dropdown-toggle:hover .rpt-action-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0.25rem);
}

/* Actions dropdown menu */
.rpt-action-dropdown-menu {
  position: absolute;
  z-index: 50;
  right: 0;
  top: 100%;
  margin-top: 0.375rem;
  min-width: 10rem;
  background-color: var(--rpt-bg-color);
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--rpt-border-color);
  overflow: hidden;
}

/* Dropdown menu items */
.rpt-action-dropdown-items {
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.rpt-action-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--rpt-transition-duration) ease;
  color: var(--rpt-text-color);
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
}

.rpt-action-dropdown-item:hover {
  background-color: var(--rpt-row-bg-alt);
}

.rpt-action-dropdown-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

/* Special dropdown menu items */
.rpt-action-dropdown-item--danger {
  color: var(--rpt-danger);
}

.rpt-action-dropdown-item--danger:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

/* Dropdown divider */
.rpt-action-dropdown-divider {
  height: 1px;
  background-color: var(--rpt-border-color);
  margin: 0.25rem 0;
}

/* Action cell container */
.rpt-action-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem !important;
  white-space: nowrap;
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  overflow: visible;
  max-width: 225px;
}

.rpt-action-cell--center {
  justify-content: center;
}

.rpt-action-cell--left {
  justify-content: flex-start;
}

.rpt-action-cell--right {
  justify-content: flex-end;
}

.rpt-action-cell--fixed {
  position: sticky;
  right: 0;
  background-color: inherit;
  z-index: 5;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.05);
}

/* RTL Support */
[dir="rtl"] .rpt-row-actions--right {
  justify-content: flex-start;
}

[dir="rtl"] .rpt-row-actions--left {
  justify-content: flex-end;
}

[dir="rtl"] .rpt-action-dropdown-menu {
  right: auto;
  left: 0;
}

/* Action menu */
.rpt-action-menu {
  position: relative;
}

.rpt-action-menu-toggle {
  color: #6B7280;
}

.rpt-action-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 160px;
  background-color: var(--rpt-bg-color, #ffffff);
  border: 1px solid var(--rpt-border-color, #e2e8f0);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 4px 0;
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease;
}

[data-theme="dark"] .rpt-action-menu-dropdown {
  background-color: var(--rpt-bg-color, #1e293b);
  border-color: var(--rpt-border-color, #334155);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rpt-action-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--rpt-text-color, #1e293b);
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.rpt-action-menu-item:hover {
  background-color: var(--rpt-row-hover-bg, #f1f5f9);
}

[data-theme="dark"] .rpt-action-menu-item {
  color: var(--rpt-text-color, #e2e8f0);
}

[data-theme="dark"] .rpt-action-menu-item:hover {
  background-color: var(--rpt-row-hover-bg, #334155);
}

.rpt-action-menu-item:focus-visible {
  outline: none;
  background-color: var(--rpt-row-hover-bg, #f1f5f9);
}

.rpt-action-menu-item--destructive {
  color: var(--rpt-danger, #ef4444);
}

.rpt-action-menu-divider {
  height: 1px;
  background-color: var(--rpt-border-color, #e2e8f0);
  margin: 4px 0;
}

/* Responsive styles for action buttons */
@media (max-width: 768px) {
  .rpt-action-cell {
    padding: 0.375rem !important;
  }
  
  .rpt-action-btn,
  .rpt-modern-action-btn {
    width: 28px;
    height: 28px;
  }
  
  .rpt-action-icon {
    width: 14px;
    height: 14px;
  }
  
  .rpt-action-icon svg {
    width: 14px;
    height: 14px;
  }
}

/* Smaller screens */
@media (max-width: 640px) {
  .rpt-action-cell {
    max-width: 100%;
    min-width: 110px;
    padding: 0.25rem !important;
  }
  
  .rpt-row-actions {
    flex-wrap: wrap;
    gap: 2px;
    padding: 2px;
  }
  
  .rpt-action-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
}

/* Dark mode specific styles */
[data-theme="dark"] .rpt-action-btn {
  border-color: var(--rpt-border-color);
  background-color: transparent;
}

[data-theme="dark"] .rpt-action-btn--view {
  color: #60a5fa; /* blue-400 */
}

[data-theme="dark"] .rpt-action-btn--view:hover {
  color: #93c5fd; /* blue-300 */
  background-color: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .rpt-action-btn--edit {
  color: #fbbf24; /* amber-400 */
}

[data-theme="dark"] .rpt-action-btn--edit:hover {
  color: #fcd34d; /* amber-300 */
  background-color: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .rpt-action-btn--delete {
  color: #f87171; /* red-400 */
}

[data-theme="dark"] .rpt-action-btn--delete:hover {
  color: #fca5a5; /* red-300 */
  background-color: rgba(239, 68, 68, 0.2);
}

/* Animation classes for action buttons */
.rpt-action-appear {
  animation: rpt-action-appear 0.2s ease-out forwards;
}

@keyframes rpt-action-appear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Accessibility support */
@media (prefers-reduced-motion: reduce) {
  .rpt-action-btn,
  .rpt-action-tooltip,
  .rpt-action-appear {
    transition: none !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* High contrast mode support */
@media (forced-colors: active) {
  .rpt-action-btn {
    border: 1px solid ButtonText;
  }
  
  .rpt-action-menu-dropdown {
    border: 1px solid ButtonText;
  }
  
  .rpt-action-menu-divider {
    background-color: ButtonText;
  }
}


/* advanced-filter-panel.css */
/**
 * React Power Table - Advanced Filter Panel Styles
 * Redesigned for optimal UX and responsiveness
 */

/* Main filter panel container */
.rpt-advanced-filter-panel {
  width: 100%;
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  background-color: var(--rpt-bg-color);
  overflow: hidden;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}

.rpt-advanced-filter-panel:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Panel header with toggle */
.rpt-filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: var(--rpt-header-bg);
  border-bottom: 1px solid var(--rpt-border-color);
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color var(--rpt-transition-duration) ease;
}

.rpt-filter-panel-header:hover {
  background-color: var(--rpt-row-hover-bg);
}

.rpt-filter-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--rpt-text-color);
}

.rpt-filter-panel-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rpt-chevron {
  transition: transform var(--rpt-transition-duration) ease;
}

.rpt-chevron-up {
  transform: rotate(180deg);
}

/* Panel content */
.rpt-filter-panel-content {
  padding: 1rem;
  animation: rpt-slide-down 0.2s ease-out;
  max-height: 70vh;
  overflow-y: auto;
}

/* Filter presets section */
.rpt-filter-presets {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: var(--rpt-row-hover-bg);
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-border-color);
}

.rpt-presets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.rpt-presets-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rpt-text-color);
  margin: 0;
}

.rpt-presets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.rpt-preset-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
  max-width: 100%;
}

.rpt-preset-btn {
  display: flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: var(--rpt-bg-color);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  font-size: 0.75rem;
  color: var(--rpt-text-color);
  cursor: pointer;
  transition: all var(--rpt-transition-duration) ease;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpt-preset-btn:hover {
  border-color: var(--rpt-primary-light);
  background-color: var(--rpt-primary-bg);
}

.rpt-preset-active {
  background-color: var(--rpt-primary);
  color: white;
  border-color: var(--rpt-primary);
}

.rpt-preset-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rpt-preset-delete {
  width: 16px;
  height: 16px;
  min-width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--rpt-muted-color);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  margin-left: 4px;
  transition: all var(--rpt-transition-duration) ease;
}

.rpt-preset-delete:hover {
  color: var(--rpt-danger);
  background-color: var(--rpt-danger-bg);
}

/* Save preset section */
.rpt-preset-save {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.rpt-preset-name-input {
  flex: 1;
  height: 32px;
  padding: 0 0.75rem;
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  font-size: 0.75rem;
  background-color: var(--rpt-input-bg);
  color: var(--rpt-input-text);
  min-width: 0;
}

.rpt-preset-save-btn {
  padding: 0 0.75rem;
  height: 32px;
  background-color: var(--rpt-primary);
  border: none;
  border-radius: var(--rpt-border-radius);
  color: white;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              opacity var(--rpt-transition-duration) ease;
  white-space: nowrap;
}

.rpt-preset-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rpt-preset-save-btn:not(:disabled):hover {
  background-color: var(--rpt-primary-dark);
}

/* Filter search field */
.rpt-filter-search {
  position: relative;
  margin-bottom: 1rem;
}

.rpt-filter-search-input {
  width: 100%;
  height: 36px;
  padding: 0 0.75rem 0 2.25rem;
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-input-bg);
  color: var(--rpt-input-text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-filter-search-input:focus {
  border-color: var(--rpt-primary);
  box-shadow: 0 0 0 2px var(--rpt-primary-light);
}

.rpt-filter-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rpt-text-secondary);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

/* Active filters section */
.rpt-filters-main {
  margin-bottom: 1rem;
}

.rpt-filters-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.rpt-filters-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rpt-text-color);
  margin: 0;
}

.rpt-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rpt-filter-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  background-color: var(--rpt-bg-color);
  position: relative;
}

.rpt-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.rpt-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rpt-text-color);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.rpt-filter-remove {
  background: none;
  border: none;
  color: var(--rpt-muted-color);
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--rpt-transition-duration) ease;
}

.rpt-filter-remove:hover {
  color: var(--rpt-danger);
  background-color: var(--rpt-danger-bg);
}

.rpt-filter-control {
  position: relative;
}

.rpt-filter-input {
  width: 100%;
  height: 32px;
  padding: 0 0.5rem;
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  background-color: var(--rpt-input-bg);
  color: var(--rpt-input-text);
  font-size: 0.75rem;
  transition: border-color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-filter-input:focus {
  border-color: var(--rpt-primary);
  outline: none;
  box-shadow: 0 0 0 1px var(--rpt-primary-light);
}

.rpt-filter-select {
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 16px 12px;
  appearance: none;
}

/* Range inputs for number and date */
.rpt-filter-range {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.rpt-filter-range-input {
  flex: 1;
  min-width: 0;
}

.rpt-filter-range-separator {
  color: var(--rpt-text-color);
  line-height: 1;
  flex-shrink: 0;
}

/* Clear filter button */
.rpt-filter-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--rpt-muted-color);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--rpt-transition-duration) ease;
}

.rpt-filter-clear:hover {
  color: var(--rpt-danger);
  background-color: var(--rpt-danger-bg);
}

/* Empty filter state */
.rpt-filters-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--rpt-muted-color);
  font-size: 0.875rem;
  background-color: var(--rpt-row-hover-bg);
  border-radius: var(--rpt-border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.rpt-empty-filter-icon {
  width: 32px;
  height: 32px;
  color: var(--rpt-muted-color);
  opacity: 0.5;
}

/* Advanced filter control: filter groups */
.rpt-filter-groups {
  margin-top: 1.5rem;
}

.rpt-filter-group {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  background-color: var(--rpt-row-hover-bg);
}

.rpt-filter-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.rpt-group-operator-select {
  padding: 0.25rem 0.5rem;
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-input-bg);
  font-size: 0.75rem;
  height: 28px;
}

.rpt-group-remove {
  padding: 0.25rem 0.5rem;
  border: none;
  background-color: var(--rpt-danger-bg);
  color: var(--rpt-danger);
  border-radius: var(--rpt-border-radius);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--rpt-transition-duration) ease;
  height: 28px;
  display: flex;
  align-items: center;
}

.rpt-group-remove:hover {
  background-color: var(--rpt-danger);
  color: white;
}

.rpt-filter-group-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

/* Action buttons */
.rpt-filters-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rpt-add-group-btn {
  padding: 0.5rem 1rem;
  background-color: var(--rpt-bg-color);
  border: 1px dashed var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  color: var(--rpt-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--rpt-transition-duration) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
}

.rpt-add-group-btn:hover {
  background-color: var(--rpt-primary-bg);
  border-color: var(--rpt-primary-light);
}

.rpt-clear-filters-btn {
  padding: 0.5rem 1rem;
  background-color: var(--rpt-danger-bg);
  border: none;
  border-radius: var(--rpt-border-radius);
  color: var(--rpt-danger);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--rpt-transition-duration) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.rpt-clear-filters-btn:hover {
  background-color: var(--rpt-danger);
  color: white;
}

/* Status badges for filter condition */
.rpt-filter-condition-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  background: var(--rpt-primary-bg);
  color: var(--rpt-primary);
  margin-left: auto;
}

/* Animations */
@keyframes rpt-slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Badge for filter count */
.rpt-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
  height: 18px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  background-color: var(--rpt-primary);
  color: white;
  margin-left: 0.5rem;
}

/* Responsive styles */
@media (max-width: 768px) {
  .rpt-filter-panel-content {
    padding: 0.75rem;
  }

  .rpt-filters-grid {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
  }

  .rpt-filter-group-filters {
    grid-template-columns: 1fr;
  }

  .rpt-preset-save {
    flex-direction: column;
  }

  .rpt-preset-name-input {
    width: 100%;
  }

  .rpt-preset-save-btn {
    width: 100%;
  }
}

/* Better tablet UI */
@media (min-width: 769px) and (max-width: 1024px) {
  .rpt-filters-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .rpt-filter-group-filters {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* Landscape mobile optimization */
@media (max-width: 896px) and (orientation: landscape) {
  .rpt-filter-panel-content {
    max-height: 80vh;
  }
  
  .rpt-filters-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* button.css */
/**
 * React Power Table - Button Styles
 * Styling for buttons and button states
 */

/* Base button styles */
.rpt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  border-radius: var(--rpt-border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 0.5rem 1rem;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
  cursor: pointer;
  outline: none;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  overflow: hidden;
}

.rpt-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

.rpt-btn:disabled {
  opacity: 0.65;
  pointer-events: none;
}

/* Text content of button */
.rpt-btn-text {
  position: relative;
  z-index: 1;
  transition: opacity 0.2s;
}

/* Start and end icons */
.rpt-btn-start-icon,
.rpt-btn-end-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.rpt-btn:hover .rpt-btn-start-icon {
  transform: translateX(-2px);
}

.rpt-btn:hover .rpt-btn-end-icon {
  transform: translateX(2px);
}

/* Button variants */
.rpt-btn--default {
  background-color: var(--rpt-input-bg);
  border-color: var(--rpt-border-color);
  color: var(--rpt-text-color);
}

.rpt-btn--default:hover:not(:disabled) {
  background-color: var(--rpt-btn-default-hover-bg);
  border-color: var(--rpt-border-hover-color);
}

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

.rpt-btn--primary:hover:not(:disabled) {
  background-color: var(--rpt-primary-dark);
  border-color: var(--rpt-primary-dark);
}

.rpt-btn--destructive {
  background-color: var(--rpt-danger);
  border-color: var(--rpt-danger);
  color: white;
}

.rpt-btn--destructive:hover:not(:disabled) {
  background-color: var(--rpt-btn-danger-hover-bg);
  border-color: var(--rpt-btn-danger-hover-bg);
}

.rpt-btn--secondary {
  background-color: var(--rpt-btn-secondary-bg);
  border-color: var(--rpt-btn-secondary-bg);
  color: var(--rpt-btn-secondary-text);
}

.rpt-btn--secondary:hover:not(:disabled) {
  background-color: var(--rpt-btn-secondary-hover-bg);
  border-color: var(--rpt-btn-secondary-hover-bg);
}

.rpt-btn--outline {
  background-color: transparent;
  border-color: var(--rpt-border-color);
  color: var(--rpt-text-color);
}

.rpt-btn--outline:hover:not(:disabled) {
  background-color: var(--rpt-hover-bg);
  border-color: var(--rpt-border-hover-color);
}

.rpt-btn--ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--rpt-text-color);
}

.rpt-btn--ghost:hover:not(:disabled) {
  background-color: var(--rpt-hover-bg);
  color: var(--rpt-text-accent);
}

.rpt-btn--link {
  background-color: transparent;
  border-color: transparent;
  color: var(--rpt-primary);
  padding-left: 0;
  padding-right: 0;
  text-decoration: none;
}

.rpt-btn--link:hover:not(:disabled) {
  text-decoration: underline;
  background-color: transparent;
}

/* Button sizes */
.rpt-btn--xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.25;
}

.rpt-btn--sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.rpt-btn--md {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.rpt-btn--lg {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
}

.rpt-btn--xl {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Button full width */
.rpt-btn--block {
  width: 100%;
  display: flex;
}

/* Elevated buttons */
.rpt-btn--elevated {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.rpt-btn--elevated:hover:not(:disabled) {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.rpt-btn--elevated:active:not(:disabled) {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}

/* Button group */
.rpt-btn-group {
  display: inline-flex;
}

.rpt-btn-group .rpt-btn {
  border-radius: 0;
  position: relative;
  margin-left: -1px;
}

.rpt-btn-group .rpt-btn:first-child {
  border-top-left-radius: var(--rpt-border-radius);
  border-bottom-left-radius: var(--rpt-border-radius);
  margin-left: 0;
}

.rpt-btn-group .rpt-btn:last-child {
  border-top-right-radius: var(--rpt-border-radius);
  border-bottom-right-radius: var(--rpt-border-radius);
}

.rpt-btn-group .rpt-btn:focus {
  z-index: 1;
}

/* Loading states - base */
.rpt-btn--loading {
  position: relative;
  cursor: wait;
}

.rpt-btn--loading .rpt-btn-text {
  visibility: visible;
  opacity: 0.6;
}

.rpt-btn--loading .rpt-btn-start-icon,
.rpt-btn--loading .rpt-btn-end-icon {
  opacity: 0;
}

/* Basic loader */
.rpt-btn-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Spinner loading (default) */
.rpt-btn--loading-spinner .rpt-btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: rpt-btn-spin 0.7s linear infinite;
}

.rpt-btn--xs.rpt-btn--loading-spinner .rpt-btn-loader,
.rpt-btn--sm.rpt-btn--loading-spinner .rpt-btn-loader {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.rpt-btn--lg.rpt-btn--loading-spinner .rpt-btn-loader,
.rpt-btn--xl.rpt-btn--loading-spinner .rpt-btn-loader {
  width: 20px;
  height: 20px;
  border-width: 3px;
}

@keyframes rpt-btn-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Dots loading animation */
.rpt-btn--loading-dots .rpt-btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rpt-btn--loading-dots .rpt-btn-loader span {
  width: 4px;
  height: 4px;
  margin: 0 1px;
  background-color: currentColor;
  border-radius: 50%;
  display: inline-block;
  animation: rpt-btn-dots 1.4s infinite ease-in-out both;
}

.rpt-btn--loading-dots .rpt-btn-loader span:nth-child(1) {
  animation-delay: -0.32s;
}

.rpt-btn--loading-dots .rpt-btn-loader span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes rpt-btn-dots {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Progress bar loading animation */
.rpt-btn--loading-progress::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.4);
  animation: rpt-btn-progress 1.5s ease-in-out infinite;
  width: 100%;
}

@keyframes rpt-btn-progress {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Slide loading animation */
.rpt-btn--loading-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 300%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  animation: rpt-btn-slide 1.5s infinite linear;
}

@keyframes rpt-btn-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

/* Circle loading animation */
.rpt-btn--loading-circle .rpt-btn-loader {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rpt-btn--loading-circle .rpt-btn-loader::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: rpt-btn-circle 0.75s linear infinite;
}

@keyframes rpt-btn-circle {
  to { transform: rotate(360deg); }
}

/* Pulse loading animation */
.rpt-btn--loading-pulse .rpt-btn-loader {
  width: 8px;
  height: 8px;
  background-color: currentColor;
  border-radius: 50%;
  opacity: 0.6;
  animation: rpt-btn-pulse 1s infinite alternate;
}

@keyframes rpt-btn-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

/* Wave loading animation */
.rpt-btn--loading-wave .rpt-btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.rpt-btn--loading-wave .rpt-btn-loader span {
  display: inline-block;
  width: 2px;
  height: 10px;
  margin: 0 1px;
  background-color: currentColor;
  border-radius: 1px;
  animation: rpt-btn-wave 1s ease-in-out infinite;
}

.rpt-btn--loading-wave .rpt-btn-loader span:nth-child(1) {
  animation-delay: -0.45s;
}

.rpt-btn--loading-wave .rpt-btn-loader span:nth-child(2) {
  animation-delay: -0.3s;
}

.rpt-btn--loading-wave .rpt-btn-loader span:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes rpt-btn-wave {
  0%, 100% {
    transform: scaleY(0.5);
  }
  50% {
    transform: scaleY(1.2);
  }
}

/* Style for loading text, slightly dimmed compared to normal text */
.rpt-btn--loading .rpt-btn-text {
  opacity: 0.8;
}

/* Make sure action buttons in dialog are properly styled */
.rpt-dialog-actions .rpt-btn {
  min-width: 90px;
  font-weight: 500;
}

.rpt-dialog-actions .rpt-btn--primary,
.rpt-dialog-actions .rpt-btn--destructive {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rpt-dialog-actions .rpt-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rpt-dialog-actions .rpt-btn:active:not(:disabled) {
  transform: translateY(0px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive styles */
@media (max-width: 640px) {
  .rpt-dialog-actions .rpt-btn {
    width: 100%;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .rpt-btn--loading-spinner .rpt-btn-loader,
  .rpt-btn--loading-circle .rpt-btn-loader::before,
  .rpt-btn--loading-dots .rpt-btn-loader span,
  .rpt-btn--loading-progress::after,
  .rpt-btn--loading-slide::before,
  .rpt-btn--loading-pulse .rpt-btn-loader,
  .rpt-btn--loading-wave .rpt-btn-loader span {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* checkbox.css */
/**
 * React Power Table - Checkbox Component Styles
 * Dedicated styling for checkbox components that works for both light and dark themes
 */

/* Checkbox container and wrapper */
.rpt-checkbox-container {
  display: inline-flex;
  flex-direction: column;
  position: relative;
  margin: 0.25rem 0;
}

.rpt-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  cursor: pointer;
}

/* Checkbox control - the visible part */
.rpt-checkbox-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--rpt-input-border, #d1d5db);
  border-radius: 4px;
  background-color: var(--rpt-bg, #ffffff);
  transition: all 0.2s ease;
  flex-shrink: 0;
  overflow: hidden;
}

/* States for the checkbox control */
.rpt-checkbox-control-checked {
  background-color: var(--rpt-primary, #3b82f6);
  border-color: var(--rpt-primary, #3b82f6);
}

.rpt-checkbox-control-indeterminate {
  background-color: var(--rpt-primary, #3b82f6);
  border-color: var(--rpt-primary, #3b82f6);
}

.rpt-checkbox-control-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Actual checkbox input (visually hidden but accessible) */
.rpt-checkbox {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

/* Checkbox sizes */
.rpt-checkbox-sm ~ .rpt-checkbox-control {
  width: 14px;
  height: 14px;
}

.rpt-checkbox-md ~ .rpt-checkbox-control {
  width: 16px;
  height: 16px;
}

.rpt-checkbox-lg ~ .rpt-checkbox-control {
  width: 18px;
  height: 18px;
}

/* Focus styles for better accessibility */
.rpt-checkbox:focus-visible ~ .rpt-checkbox-control {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-primary-focus, rgba(59, 130, 246, 0.2));
  border-color: var(--rpt-primary, #3b82f6);
}

/* Hover styles */
.rpt-checkbox-wrapper:hover .rpt-checkbox-control:not(.rpt-checkbox-control-checked):not(.rpt-checkbox-control-indeterminate) {
  border-color: var(--rpt-border-hover, #9ca3af);
}

.rpt-checkbox:hover ~ .rpt-checkbox-control:not(.rpt-checkbox-control-checked):not(.rpt-checkbox-control-indeterminate) {
  border-color: var(--rpt-primary, #3b82f6);
}

/* Disabled state */
.rpt-checkbox:disabled ~ .rpt-checkbox-control {
  background-color: var(--rpt-bg-secondary, #f3f4f6);
  border-color: var(--rpt-border, #e5e7eb);
  opacity: 0.6;
  cursor: not-allowed;
}

/* Label styles */
.rpt-checkbox-label {
  font-size: 0.875rem;
  color: var(--rpt-text, #171717);
  cursor: pointer;
  user-select: none;
}

.rpt-checkbox-label-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Description text */
.rpt-checkbox-description {
  display: block;
  font-size: 0.75rem;
  color: var(--rpt-text-secondary, #6b7280);
  margin-top: 0.125rem;
}

/* Error and help message */
.rpt-checkbox-message {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.rpt-checkbox-error-message {
  color: var(--rpt-error-text, #ef4444);
}

.rpt-checkbox-help-message {
  color: var(--rpt-text-secondary, #6b7280);
}

/* Error state */
.rpt-checkbox-error ~ .rpt-checkbox-control {
  border-color: var(--rpt-error-text, #ef4444);
}

/* Dark mode support */
.rpt-dark .rpt-checkbox-control,
[data-theme="dark"] .rpt-checkbox-control {
  border-color: var(--rpt-border, #374151);
  background-color: var(--rpt-bg, #1f2937);
}

.rpt-dark .rpt-checkbox-control-checked,
.rpt-dark .rpt-checkbox-control-indeterminate,
[data-theme="dark"] .rpt-checkbox-control-checked,
[data-theme="dark"] .rpt-checkbox-control-indeterminate {
  background-color: var(--rpt-primary, #3b82f6);
  border-color: var(--rpt-primary, #3b82f6);
}

.rpt-dark .rpt-checkbox-label,
[data-theme="dark"] .rpt-checkbox-label {
  color: var(--rpt-text, #f3f4f6);
}

.rpt-dark .rpt-checkbox-description,
[data-theme="dark"] .rpt-checkbox-description {
  color: var(--rpt-text-secondary, #9ca3af);
}

/* Special case for data tables - ensure checkboxes are visible in both header and rows */
.rpt-table .rpt-checkbox-control {
  background-color: var(--rpt-input-bg, #ffffff);
  border: 1.5px solid var(--rpt-input-border, #d1d5db);
}

.rpt-table .rpt-checkbox-control-checked,
.rpt-table .rpt-checkbox-control-indeterminate {
  background-color: var(--rpt-primary, #3b82f6);
  border-color: var(--rpt-primary, #3b82f6);
}

/* Ensure visibility in table header cells */
.rpt-head-cell .rpt-checkbox-control {
  background-color: var(--rpt-input-bg, #ffffff);
  border: 1.5px solid var(--rpt-input-border, #d1d5db);
}

.rpt-head-cell .rpt-checkbox-control-checked,
.rpt-head-cell .rpt-checkbox-control-indeterminate {
  background-color: var(--rpt-primary, #3b82f6);
  border-color: var(--rpt-primary, #3b82f6);
}

/* Fix for toolbar checkboxes */
.rpt-column-dropdown .rpt-checkbox-control {
  border: 1.5px solid var(--rpt-input-border-color);
  background-color: var(--rpt-input-bg);
}

.rpt-column-dropdown .rpt-checkbox-control-checked {
  background-color: var(--rpt-primary);
  border-color: var(--rpt-primary);
}

/* SVG Checkmark and Indeterminate */
.rpt-checkbox-check,
.rpt-checkbox-dash {
  display: block;
  color: white;
  width: 80%;
  height: 80%;
}

/* Ensure accessibility in all color schemes */
@media (forced-colors: active) {
  .rpt-checkbox-control {
    border: 1.5px solid CanvasText;
  }
  
  .rpt-checkbox-control-checked,
  .rpt-checkbox-control-indeterminate {
    border: 1.5px solid Highlight;
    background-color: Highlight;
  }
  
  .rpt-checkbox:focus-visible ~ .rpt-checkbox-control {
    outline: 2px solid CanvasText;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .rpt-checkbox-control,
  .rpt-checkbox-indicator {
    transition: none;
  }
}

/* column-visibility.css */
/**
 * React Power Table - Column Visibility Toggle Styles
 * Styles for the column visibility component
 */

/* Container */
.rpt-column-visibility {
  position: relative;
  display: inline-flex;
  z-index: 20; /* Lower than dropdown content */
}

/* Toggle button */
.rpt-column-visibility-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 36px;
  padding: 0 12px;
  background-color: var(--rpt-btn-secondary-bg, #f1f5f9);
  color: var(--rpt-btn-secondary-text, #1e293b);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
  cursor: pointer;
  white-space: nowrap;
}

.rpt-column-visibility-button:hover {
  background-color: var(--rpt-btn-secondary-hover-bg, #e2e8f0);
}

.rpt-column-visibility-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

/* Button variants */
.rpt-column-visibility-button.rpt-button-default {
  background-color: var(--rpt-primary);
  color: white;
  border-color: var(--rpt-primary);
}

.rpt-column-visibility-button.rpt-button-default:hover {
  background-color: var(--rpt-primary-dark);
}

.rpt-column-visibility-button.rpt-button-outline {
  background-color: transparent;
  color: var(--rpt-text-color);
  border-color: var(--rpt-border-color);
}

.rpt-column-visibility-button.rpt-button-outline:hover {
  border-color: var(--rpt-border-hover-color);
  background-color: var(--rpt-bg-hover);
}

.rpt-column-visibility-button.rpt-button-ghost {
  background-color: transparent;
  border-color: transparent;
}

.rpt-column-visibility-button.rpt-button-ghost:hover {
  background-color: var(--rpt-bg-hover);
}

/* Button sizes */
.rpt-column-visibility-button.rpt-button-sm {
  height: 30px;
  padding: 0 8px;
  font-size: 0.75rem;
}

.rpt-column-visibility-button.rpt-button-md {
  height: 36px;
  padding: 0 12px;
  font-size: 0.875rem;
}

.rpt-column-visibility-button.rpt-button-lg {
  height: 42px;
  padding: 0 16px;
  font-size: 1rem;
}

/* Button icon */
.rpt-column-visibility-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rpt-column-visibility-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Button text */
.rpt-column-visibility-text {
  display: flex;
  align-items: center;
}

.rpt-column-count {
  opacity: 0.8;
}

/* Dropdown */
.rpt-column-visibility-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0; 
  min-width: 200px;
  max-width: 280px;
  padding: 0.75rem;
  background-color: var(--rpt-bg-color);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
              0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 1001; /* Higher than action buttons and table content */
  transition: all var(--rpt-transition-duration) ease; /* Added transition for smooth appearance */
}

/* Dropdown positioning */
.rpt-dropdown-right {
  right: 0;
}

.rpt-dropdown-left {
  left: 0;
}

/* Dropdown header */
.rpt-column-visibility-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rpt-border-color);
}

.rpt-column-visibility-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rpt-text-color);
  margin: 0;
}

.rpt-column-visibility-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rpt-column-visibility-action-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: var(--rpt-primary);
  cursor: pointer;
  transition: color var(--rpt-transition-duration) ease;
  text-decoration: underline;
}

.rpt-column-visibility-action-btn:hover {
  color: var(--rpt-primary-dark);
}

/* Dropdown list with improved scrollbar */
.rpt-column-visibility-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rpt-scrollbar-thumb-color) var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
  padding: 0.5rem;
}

.rpt-column-visibility-list:hover {
  scrollbar-width: auto;
  scrollbar-color: var(--rpt-scrollbar-thumb-hover-color) var(--rpt-scrollbar-bg);
}

.rpt-column-visibility-list::-webkit-scrollbar {
  width: var(--rpt-scrollbar-width);
  background-color: var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-column-visibility-list:hover::-webkit-scrollbar {
  width: var(--rpt-scrollbar-hover-width);
}

.rpt-column-visibility-list::-webkit-scrollbar-track {
  background: var(--rpt-scrollbar-bg);
  border-radius: 10px;
}

.rpt-column-visibility-list::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 10px;
  transition: var(--rpt-scrollbar-transition);
}

.rpt-column-visibility-list::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

.rpt-column-visibility-empty {
  font-size: 0.875rem;
  color: var(--rpt-muted-text);
  margin: 0;
  padding: 0.5rem 0;
  text-align: center;
}

/* Column item */
.rpt-column-visibility-item {
  display: flex;
  align-items: center;
}

.rpt-column-visibility-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.5rem;
  border-radius: var(--rpt-border-radius);
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease;
}

.rpt-column-visibility-label:hover {
  background-color: var(--rpt-row-hover-bg);
}

/* Checkbox */
.rpt-column-visibility-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--rpt-primary);
}

/* Label text */
.rpt-column-visibility-label-text {
  font-size: 0.875rem;
  color: var(--rpt-text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* RTL support */
[dir="rtl"] .rpt-dropdown-right {
  right: auto;
  left: 0;
}

[dir="rtl"] .rpt-dropdown-left {
  left: auto;
  right: 0;
}

[dir="rtl"] .rpt-column-visibility-label {
  flex-direction: row-reverse;
}

/* High contrast mode */
@media (forced-colors: active) {
  .rpt-column-visibility-button {
    border: 1px solid CanvasText;
  }
  
  .rpt-column-visibility-dropdown {
    border: 1px solid CanvasText;
  }
  
  .rpt-column-visibility-action-btn {
    text-decoration: underline;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .rpt-column-visibility * {
    transition: none !important;
  }
}

/* Responsive styles */
@media (max-width: 640px) {
  .rpt-column-visibility-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: var(--rpt-border-radius) var(--rpt-border-radius) 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
  }
  
  .rpt-column-visibility-list {
    max-height: 50vh;
    flex: 1;
    overflow-y: auto;
  }
  
  .rpt-column-visibility-header {
    position: sticky;
    top: 0;
    background-color: var(--rpt-bg-color);
    z-index: 2;
  }
  
  .rpt-column-visibility-button {
    height: 36px;
    padding: 0 8px;
    font-size: 0.75rem;
  }
}

/* Fix for landscape mobile orientation */
@media (max-width: 896px) and (orientation: landscape) {
  .rpt-column-visibility-dropdown {
    position: absolute;
    max-height: 80vh;
    max-width: 90vw;
    width: 260px;
    left: auto;
    right: 0;
    bottom: auto;
    top: 100%;
    border-radius: var(--rpt-border-radius);
  }
  
  .rpt-column-visibility-list {
    max-height: 60vh;
  }
}

/* dialog.css */
/**
 * React Power Table - Dialog Styles
 * Styling for modal dialogs and their content
 */

/* Backdrop overlay */
.rpt-dialog-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000; /* Giảm z-index để toast có thể hiển thị trên dialog */
  padding: 1rem;
  overflow-y: auto;
  backdrop-filter: blur(2px);
  transition: opacity 0.2s ease-out;
}

/* Dialog window */
.rpt-dialog {
  background-color: var(--rpt-bg-color);
  border-radius: var(--rpt-border-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  z-index: 9001; /* Đảm bảo dialog có z-index thấp hơn toast */
}

/* Dialog animation states */
.rpt-dialog-open {
  animation: rpt-dialog-fade-in 0.2s ease-out;
}

.rpt-dialog-closing {
  animation: rpt-dialog-fade-out 0.2s ease-out;
}

/* Dialog header */
.rpt-dialog-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rpt-border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

/* Dialog title */
.rpt-dialog-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--rpt-title-color);
  line-height: 1.4;
}

/* Dialog description */
.rpt-dialog-description {
  margin: 0.5rem 0 0 0;
  font-size: 0.875rem;
  color: var(--rpt-description-color);
  line-height: 1.5;
}

/* Close button */
.rpt-dialog-close {
  padding: 0.5rem;
  margin: -0.5rem;
  background: transparent;
  border: none;
  color: var(--rpt-muted-text);
  cursor: pointer;
  border-radius: var(--rpt-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.rpt-dialog-close:hover {
  background-color: var(--rpt-row-hover-bg);
  color: var(--rpt-text-color);
}

.rpt-dialog-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

/* Close icon */
.rpt-dialog-close-icon {
  width: 16px;
  height: 16px;
}

/* Dialog content with improved scrollbar */
.rpt-dialog-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
  max-height: calc(90vh - 150px);
  scrollbar-width: thin;
  scrollbar-color: var(--rpt-scrollbar-thumb-color) var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-dialog-content:hover {
  scrollbar-width: auto;
  scrollbar-color: var(--rpt-scrollbar-thumb-hover-color) var(--rpt-scrollbar-bg);
}

.rpt-dialog-content::-webkit-scrollbar {
  width: var(--rpt-scrollbar-width);
  background-color: var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-dialog-content:hover::-webkit-scrollbar {
  width: var(--rpt-scrollbar-hover-width);
}

.rpt-dialog-content::-webkit-scrollbar-track {
  background: var(--rpt-scrollbar-bg);
  border-radius: 10px;
}

.rpt-dialog-content::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 10px;
  transition: var(--rpt-scrollbar-transition);
}

.rpt-dialog-content::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

/* Dialog footer */
.rpt-dialog-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-footer-bg);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0; /* Prevent footer from shrinking */
}

/* Dialog error message */
.rpt-dialog-error {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background-color: var(--rpt-status-danger-bg);
  color: var(--rpt-status-danger-text);
  border-radius: var(--rpt-border-radius);
  font-size: 0.875rem;
  border-left: 4px solid var(--rpt-danger);
}

/* Dialog loading overlay */
.rpt-dialog-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(1px);
}

.dark .rpt-dialog-loading-overlay {
  background-color: rgba(15, 23, 42, 0.6);
}

/* Dialog spinner */
.rpt-dialog-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  border-top-color: var(--rpt-primary);
  animation: rpt-spin 0.8s linear infinite;
}

/* Delete confirmation dialog */
.rpt-dialog-delete-confirmation {
  text-align: center;
  padding: 1rem 0.5rem;
}

.rpt-dialog-delete-warning {
  color: var(--rpt-danger);
  margin-top: 0.75rem;
  font-weight: 500;
}

/* Dialog types */
.rpt-dialog-create {
  border-top: 4px solid var(--rpt-primary);
}

.rpt-dialog-edit {
  border-top: 4px solid var(--rpt-info);
}

.rpt-dialog-delete {
  border-top: 4px solid var(--rpt-danger);
}

.rpt-dialog-view {
  border-top: 4px solid var(--rpt-success);
}

/* Dialog Form Styling */
.rpt-dialog-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rpt-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.rpt-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rpt-text-color);
}

.rpt-form-input {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--rpt-text-color);
  background-color: var(--rpt-input-bg);
  border: 1px solid var(--rpt-input-border-color);
  border-radius: var(--rpt-border-radius);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.rpt-form-input::placeholder {
  color: var(--rpt-input-placeholder-color);
  opacity: 1;
}

.rpt-form-input:focus {
  outline: none;
  border-color: var(--rpt-primary);
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

.rpt-form-error {
  font-size: 0.75rem;
  color: var(--rpt-danger);
  margin-top: 0.25rem;
}

/* Dialog actions - Fixed positioning at the bottom right */
.rpt-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  width: 100%;
  position: relative; /* Ensure proper stacking context */
}

/* Button styles specific for dialog actions - Make buttons more prominent */
.rpt-dialog-actions .rpt-btn {
  min-width: 90px;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--rpt-border-radius) - 2px);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.rpt-dialog-actions .rpt-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rpt-dialog-actions .rpt-btn:active:not(:disabled) {
  transform: translateY(0);
}

/* Dialog action positions */
.rpt-dialog-actions--right {
  justify-content: flex-end;
}

.rpt-dialog-actions--left {
  justify-content: flex-start;
}

.rpt-dialog-actions--center {
  justify-content: center;
}

.rpt-dialog-actions--split {
  justify-content: space-between;
}

/* Animation keyframes */
@keyframes rpt-dialog-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rpt-dialog-fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

@keyframes rpt-spin {
  to { transform: rotate(360deg); }
}

/* Dialog width variants */
.rpt-dialog-sm {
  max-width: 400px;
}

.rpt-dialog-md {
  max-width: 500px;
}

.rpt-dialog-lg {
  max-width: 640px;
}

.rpt-dialog-xl {
  max-width: 768px;
}

.rpt-dialog-2xl {
  max-width: 896px;
}

.rpt-dialog-full {
  max-width: 96vw;
}

/* For mobile devices - improve responsive behavior */
@media (max-width: 640px) {
  .rpt-dialog {
    width: 100%;
    max-width: none !important;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .rpt-dialog-backdrop{ 
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  
  .rpt-dialog-header {
    padding: 1rem;
    position: sticky;
    top: 0;
    background-color: var(--rpt-bg-color);
    z-index: 10;
  }
  
  .rpt-dialog-content {
    padding: 1rem;
    max-height: none;
    flex: 1;
  }
  
  .rpt-dialog-footer {
    padding: 1rem;
    position: sticky;
    bottom: 0;
    background-color: var(--rpt-bg-color);
    z-index: 10;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .rpt-dialog-actions {
    justify-content: space-between !important;
    width: 100%;
  }
  
  .rpt-dialog-actions .rpt-btn {
    flex: 1;
  }
}

/* Tablet optimization */
@media (min-width: 641px) and (max-width: 1024px) {
  .rpt-dialog {
    max-width: 90vw;
  }
}

/* Fix for landscape mobile orientation */
@media (max-width: 896px) and (orientation: landscape) {
  .rpt-dialog {
    max-height: 90vh;
    height: auto;
  }
  
  .rpt-dialog-content {
    max-height: 60vh;
  }
}

/* RTL support */
[dir="rtl"] .rpt-dialog-header,
[dir="rtl"] .rpt-dialog-footer,
[dir="rtl"] .rpt-dialog-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .rpt-dialog-actions--right {
  justify-content: flex-start;
}

[dir="rtl"] .rpt-dialog-actions--left {
  justify-content: flex-end;
}

/* Dialog with sticky footer */
.rpt-dialog-with-footer .rpt-dialog-content {
  max-height: calc(90vh - 210px);
}

.rpt-dialog-footer--sticky {
  position: sticky;
  bottom: 0;
  background-color: var(--rpt-bg-color);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  z-index: 2;
}

/* Make footer buttons better aligned always to the right */
.rpt-dialog-footer {
  justify-content: flex-end !important;
}

/* High contrast mode */
@media (forced-colors: active) {
  .rpt-dialog {
    border: 2px solid ButtonText;
  }
  
  .rpt-dialog-close {
    border: 1px solid ButtonText;
  }
}

/* Dialog container - đảm bảo không conflict với toast */
.rpt-dialog-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000; /* Thấp hơn toast z-index */
}

/* features.css */
/**
 * React Power Table - Essential Features CSS
 * Special CSS for key features that override default styling
 */

/* FIXED/STICKY HEADER CONTAINER - Critical for proper sticky behavior */
.rpt-table-container.rpt-fixed-header {
  position: relative;
  max-height: 70vh !important; /* Limit height to enable scrolling */
  overflow: hidden !important; /* Important: container should not scroll */
}

.rpt-table-container.rpt-fixed-header .rpt-scroll-container {
  max-height: 70vh !important; /* Scroll container handles vertical scroll */
  overflow: auto !important; /* Both horizontal and vertical scrolling */
}

/* Separate wrapper for sticky header */
.rpt-fixed-header .rpt-table-wrapper {
  overflow: visible !important; /* Allow header to stick out */
}

/* STICKY HEADER - Force header to be sticky */
.rpt-fixed-header thead,
.rpt-fixed-header .rpt-table-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background-color: var(--rpt-header-bg) !important;
}

.rpt-fixed-header thead th,
.rpt-fixed-header .rpt-table-head th,
.rpt-fixed-header .rpt-head-cell {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background-color: var(--rpt-header-bg) !important;
  /* Ensure header cells don't collapse */
  box-sizing: border-box !important;
  border-bottom: 1px solid var(--rpt-border-color) !important;
}

/* Fix for horizontal scrolling with sticky header */
.rpt-fixed-header thead th::after,
.rpt-fixed-header .rpt-table-head th::after,
.rpt-fixed-header .rpt-head-cell::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid var(--rpt-border-color);
}

/* ZEBRA STRIPING - Force alternate rows to be different color */
.rpt-zebra-striping tbody tr:nth-of-type(even),
.rpt-table.rpt-zebra-striping tbody tr:nth-of-type(even) {
  background-color: var(--rpt-row-bg-alt) !important;
}

/* HOVER EFFECT - Force row highlight on hover */
.rpt-table-hover tbody tr:hover,
.rpt-table.rpt-table-hover tbody tr:hover {
  background-color: var(--rpt-row-hover-bg) !important;
  cursor: pointer;
}

/* Make sure hover effect takes precedence over zebra striping */
.rpt-table.rpt-zebra-striping.rpt-table-hover tbody tr:hover,
.rpt-zebra-striping.rpt-table-hover tbody tr:hover {
  background-color: var(--rpt-row-hover-bg) !important;
}

/* BORDERED TABLE - Ensure borders are visible */
.rpt-table-bordered,
.rpt-table.rpt-table-bordered {
  border: 1px solid var(--rpt-border-color) !important;
}

.rpt-table-bordered th,
.rpt-table-bordered td,
.rpt-table.rpt-table-bordered th,
.rpt-table.rpt-table-bordered td {
  border: 1px solid var(--rpt-border-color) !important;
}

/* Ensure these styles apply even when nested within other containers */
table.rpt-table.rpt-zebra-striping tbody tr:nth-of-type(even) {
  background-color: var(--rpt-row-bg-alt) !important;
}

table.rpt-table.rpt-table-hover tbody tr:hover {
  background-color: var(--rpt-row-hover-bg) !important;
}

/* Add styles for Firefox which handles sticky differently */
@-moz-document url-prefix() {
  .rpt-fixed-header thead,
  .rpt-fixed-header .rpt-table-head {
    position: -moz-sticky !important;
  }
  
  .rpt-fixed-header thead th,
  .rpt-fixed-header .rpt-table-head th,
  .rpt-fixed-header .rpt-head-cell {
    position: -moz-sticky !important;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .rpt-fixed-header thead th,
  .rpt-fixed-header .rpt-head-cell {
    position: sticky !important;
    top: 0 !important;
  }
  .rpt-table-container.rpt-fixed-header {
    width: 100% !important; /* Allow full width on small screens */
  }
}

/**
 * React Power Table - Features Styles
 * CSS for various table features like batch actions
 */

/* Batch Actions Container */
.rpt-batch-actions-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  z-index: 1000;
  pointer-events: none; /* Allow clicking through the container */
}

/* Batch Actions Bar */
.rpt-batch-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background-color: var(--rpt-bg-color);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 0.75rem 1.5rem;
  min-width: 300px;
  max-width: 600px;
  pointer-events: auto; /* Enable interactions with the bar */
  margin-bottom: 1.5rem;
}

/* Dark theme support */
[data-theme="dark"] .rpt-batch-actions-bar {
  background-color: var(--rpt-bg-color);
  border-color: var(--rpt-border-color);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Batch actions text */
.rpt-batch-actions-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rpt-text-color);
}

/* Batch actions button container */
.rpt-batch-actions-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Batch action button base style */
.rpt-batch-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--rpt-border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Delete button */
.rpt-batch-action-delete {
  background-color: var(--rpt-danger-bg, rgba(239, 68, 68, 0.1));
  color: var(--rpt-danger, #ef4444);
  border: 1px solid transparent;
}

.rpt-batch-action-delete:hover {
  background-color: var(--rpt-danger, #ef4444);
  color: white;
}

/* Cancel button */
.rpt-batch-action-cancel {
  background-color: transparent;
  border: 1px solid var(--rpt-border-color);
  color: var(--rpt-text-color);
}

.rpt-batch-action-cancel:hover {
  background-color: var(--rpt-row-hover-bg);
  border-color: var(--rpt-border-hover-color);
}

/* Loading spinner styles */
.rpt-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: rpt-spin 0.8s linear infinite;
}

.rpt-spinner-sm {
  width: 0.875rem;
  height: 0.875rem;
  border-width: 1.5px;
}

@keyframes rpt-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .rpt-batch-actions-bar {
    width: calc(100% - 2rem);
    max-width: none;
    padding: 0.625rem 1rem;
    margin-bottom: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .rpt-batch-actions-buttons {
    width: 100%;
    justify-content: space-between;
  }
  
  .rpt-batch-action-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Fix for duplicate scrollbars */
.rpt-table-wrapper {
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Don't show scrollbar on the container if table wrapper handles it */
.rpt-container {
  overflow-x: hidden !important;
}

/* Let the table wrapper handle scrolling */
.rpt-table-container {
  overflow: hidden !important;
}

/* Make sure only one scrollbar appears */
.rpt-container::-webkit-scrollbar,
.rpt-table_container::-webkit-scrollbar {
  display: none !important;
}

.rpt-table-wrapper::-webkit-scrollbar {
  height: var(--rpt-scrollbar-width);
  background-color: var(--rpt-scrollbar-bg);
}

.rpt-table-wrapper:hover::-webkit-scrollbar {
  height: var(--rpt-scrollbar-hover-width);
}

/* form-components.css */
/* Base Form Components Styles
   These styles provide minimal, clean styling for the form components.
   All components use the 'rpt-' prefix to avoid conflicts with other libraries.
*/

/* ================================
   Common Variables
   ================================ */
:root {
  --rpt-primary: #3b82f6;
  --rpt-primary-hover: #2563eb;
  --rpt-primary-focus: rgba(59, 130, 246, 0.2);
  --rpt-primary-rgb: 59, 130, 246;
  --rpt-danger: #ef4444;
  --rpt-danger-hover: #dc2626;
  --rpt-danger-focus: rgba(239, 68, 68, 0.2);
  --rpt-destructive: #ef4444;
  --rpt-destructive-rgb: 239, 68, 68;
  --rpt-text: #171717;
  --rpt-text-secondary: #6b7280;
  --rpt-foreground: #1f2937;
  --rpt-muted-foreground: #6b7280;
  --rpt-border: #e5e7eb;
  --rpt-border-hover: #d1d5db;
  --rpt-input-border: #d1d5db;
  --rpt-bg: #ffffff;
  --rpt-input: #ffffff;
  --rpt-bg-hover: #f9fafb;
  --rpt-bg-secondary: #f3f4f6;
  --rpt-muted: #f9fafb;
  --rpt-disabled-opacity: 0.6;
  --rpt-focus-ring: 0 0 0 2px var(--rpt-primary-focus);
  --rpt-error-ring: 0 0 0 2px var(--rpt-danger-focus);
  --rpt-radius-sm: 4px;
  --rpt-radius-md: 6px;
  --rpt-radius-lg: 8px;
  --rpt-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --rpt-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --rpt-error-text: #ef4444;
  --rpt-input-height-sm: 32px;
  --rpt-input-height-md: 38px;
  --rpt-input-height-lg: 44px;
  --rpt-transition-fast: 150ms ease;
}

/* ================================
   Form Group
   ================================ */
.rpt-form-group {
  margin-bottom: 16px;
  width: 100%;
}

.rpt-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--rpt-text);
  margin-bottom: 6px;
}

.rpt-form-helper-text {
  display: block;
  font-size: 12px;
  color: var(--rpt-text-secondary);
  margin-top: 4px;
}

.rpt-form-error-message {
  display: block;
  font-size: 12px;
  color: var(--rpt-error-text);
  margin-top: 4px;
}

.rpt-form-required {
  color: var(--rpt-danger);
  margin-left: 2px;
}

/* ================================
   Button Component
   ================================ */
.rpt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  padding: 0 16px;
  height: 36px;
  border-radius: var(--rpt-radius-md);
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
}

.rpt-button:focus {
  outline: none;
  box-shadow: var(--rpt-focus-ring);
}

.rpt-button:focus-visible {
  outline: 2px solid var(--rpt-primary);
  outline-offset: 2px;
}

.rpt-button:disabled {
  opacity: var(--rpt-disabled-opacity);
  cursor: not-allowed;
}

/* Button variants */
.rpt-button-default,
.rpt-button-primary {
  background-color: var(--rpt-primary);
  color: white;
  border-color: var(--rpt-primary);
}

.rpt-button-default:hover:not(:disabled),
.rpt-button-primary:hover:not(:disabled) {
  background-color: var(--rpt-primary-hover);
  border-color: var(--rpt-primary-hover);
}

.rpt-button-destructive {
  background-color: var(--rpt-danger);
  color: white;
  border-color: var(--rpt-danger);
}

.rpt-button-destructive:hover:not(:disabled) {
  background-color: var(--rpt-danger-hover);
  border-color: var(--rpt-danger-hover);
}

.rpt-button-outline {
  background-color: transparent;
  color: var(--rpt-primary);
  border-color: var(--rpt-border);
}

.rpt-button-outline:hover:not(:disabled) {
  border-color: var(--rpt-primary);
  background-color: var(--rpt-bg-hover);
}

.rpt-button-secondary {
  background-color: var(--rpt-bg-secondary);
  color: var(--rpt-text);
  border-color: var(--rpt-border);
}

.rpt-button-secondary:hover:not(:disabled) {
  background-color: var(--rpt-border-hover);
}

.rpt-button-ghost {
  background-color: transparent;
  color: var(--rpt-text);
  border-color: transparent;
}

.rpt-button-ghost:hover:not(:disabled) {
  background-color: var(--rpt-bg-hover);
}

.rpt-button-link {
  background-color: transparent;
  color: var(--rpt-primary);
  border-color: transparent;
  text-decoration: underline;
}

.rpt-button-link:hover:not(:disabled) {
  color: var(--rpt-primary-hover);
}

/* Button sizes */
.rpt-button-size-xs {
  height: 24px;
  font-size: 11px;
  padding: 0 8px;
  border-radius: var(--rpt-radius-sm);
}

.rpt-button-size-sm {
  height: 30px;
  font-size: 12px;
  padding: 0 12px;
  border-radius: var(--rpt-radius-sm);
}

.rpt-button-size-md {
  height: 36px;
  font-size: 14px;
  padding: 0 16px;
}

.rpt-button-size-lg {
  height: 42px;
  font-size: 16px;
  padding: 0 20px;
  border-radius: var(--rpt-radius-lg);
}

.rpt-button-size-xl {
  height: 48px;
  font-size: 18px;
  padding: 0 24px;
  border-radius: var(--rpt-radius-lg);
}

.rpt-button-full-width {
  width: 100%;
}

/* Button loading state */
.rpt-button-loading {
  cursor: wait;
  position: relative;
  pointer-events: none;
}

.rpt-button-loading .rpt-button-text {
  visibility: hidden;
}

.rpt-button-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.rpt-spinner {
  width: 16px;
  height: 16px;
  animation: rpt-spin 1s linear infinite;
}

.rpt-spinner-track {
  opacity: 0.2;
}

.rpt-spinner-path {
  opacity: 0.8;
}

@keyframes rpt-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Button icons */
.rpt-button-start-icon {
  margin-right: 6px;
  display: flex;
  align-items: center;
}

.rpt-button-end-icon {
  margin-left: 6px;
  display: flex;
  align-items: center;
}

.rpt-button-text {
  display: inline-flex;
  align-items: center;
}

/* ================================
   Input Component
   ================================ */
.rpt-input-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.rpt-input-full-width {
  width: 100%;
}

.rpt-input-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--rpt-text);
  margin-bottom: 6px;
}

.rpt-input-label-disabled {
  opacity: var(--rpt-disabled-opacity);
  cursor: not-allowed;
}

.rpt-input-required::after {
  content: "*";
  color: var(--rpt-danger);
  margin-left: 2px;
}

.rpt-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.rpt-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--rpt-text);
  background-color: var(--rpt-bg);
  border: 1px solid var(--rpt-border);
  border-radius: var(--rpt-radius-md);
  transition: all 0.2s ease;
}

.rpt-input:hover:not(:disabled):not(.rpt-input-error) {
  border-color: var(--rpt-border-hover);
}

.rpt-input:focus {
  outline: none;
  border-color: var(--rpt-primary);
  box-shadow: var(--rpt-focus-ring);
}

.rpt-input:focus-visible {
  outline: 2px solid var(--rpt-primary);
  outline-offset: 1px;
}

.rpt-input::placeholder {
  color: var(--rpt-text-secondary);
  opacity: 0.7;
}

.rpt-input:disabled {
  opacity: var(--rpt-disabled-opacity);
  cursor: not-allowed;
  background-color: var(--rpt-bg-secondary);
}

/* Input variants */
.rpt-input-default {
  /* Default styling already applied above */
}

.rpt-input-filled {
  background-color: var(--rpt-bg-secondary);
  border-color: transparent;
}

.rpt-input-outline {
  background-color: transparent;
  border-color: var(--rpt-border);
}

.rpt-input-unstyled {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
}

.rpt-input-unstyled:focus {
  box-shadow: none;
}

/* Input with icons */
.rpt-input-with-left-icon .rpt-input {
  padding-left: 36px;
}

.rpt-input-with-right-icon .rpt-input {
  padding-right: 36px;
}

.rpt-input-left-icon,
.rpt-input-right-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 36px;
  color: var(--rpt-text-secondary);
  pointer-events: none;
}

.rpt-input-left-icon {
  left: 0;
}

.rpt-input-right-icon {
  right: 0;
}

/* Input sizes */
.rpt-input-size-sm {
  height: 30px;
  font-size: 12px;
}

.rpt-input-size-md {
  height: 36px;
  font-size: 14px;
}

.rpt-input-size-lg {
  height: 42px;
  font-size: 16px;
}

/* Input states */
.rpt-input-error {
  border-color: var(--rpt-error-text) !important;
}

.rpt-input-error:focus {
  box-shadow: var(--rpt-error-ring) !important;
}

.rpt-input-disabled {
  opacity: var(--rpt-disabled-opacity);
  cursor: not-allowed;
  background-color: var(--rpt-bg-secondary);
}

.rpt-input-error-message {
  color: var(--rpt-error-text);
  font-size: 12px;
  margin-top: 4px;
}

.rpt-input-help-text {
  color: var(--rpt-text-secondary);
  font-size: 12px;
  margin-top: 4px;
}

/* ================================
   Radio Component
   ================================ */
.rpt-radio-container {
  display: inline-flex;
  align-items: center;
  position: relative;
  user-select: none;
}

.rpt-radio-wrapper {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.rpt-radio {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  z-index: 1;
  cursor: pointer;
}

.rpt-radio-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--rpt-border);
  border-radius: 50%;
  background-color: var(--rpt-bg);
  transition: all 0.2s ease;
}

.rpt-radio:checked + .rpt-radio-icon {
  border-color: var(--rpt-primary);
}

.rpt-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--rpt-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rpt-radio:checked + .rpt-radio-icon .rpt-radio-dot {
  opacity: 1;
}

.rpt-radio:focus + .rpt-radio-icon {
  box-shadow: var(--rpt-focus-ring);
}

.rpt-radio:focus-visible + .rpt-radio-icon {
  outline: 2px solid var(--rpt-primary);
  outline-offset: 2px;
}

.rpt-radio:disabled + .rpt-radio-icon {
  opacity: var(--rpt-disabled-opacity);
  cursor: not-allowed;
}

.rpt-radio-label {
  font-size: 14px;
  color: var(--rpt-text);
  line-height: 1.5;
  cursor: pointer;
  margin-left: 8px;
}

.rpt-radio-label-disabled {
  opacity: var(--rpt-disabled-opacity);
  cursor: not-allowed;
}

.rpt-radio-description {
  display: block;
  font-size: 12px;
  color: var(--rpt-text-secondary);
  margin-top: 2px;
}

/* Radio sizes */
.rpt-radio-sm .rpt-radio-icon {
  width: 14px;
  height: 14px;
}

.rpt-radio-sm .rpt-radio-dot {
  width: 6px;
  height: 6px;
}

.rpt-radio-lg .rpt-radio-icon {
  width: 18px;
  height: 18px;
}

.rpt-radio-lg .rpt-radio-dot {
  width: 10px;
  height: 10px;
}

/* Radio states */
.rpt-radio-error .rpt-radio-icon {
  border-color: var(--rpt-error-text);
}

.rpt-radio-error:focus + .rpt-radio-icon {
  box-shadow: var(--rpt-error-ring);
}

.rpt-radio-disabled {
  opacity: var(--rpt-disabled-opacity);
  cursor: not-allowed;
}

.rpt-radio-message {
  font-size: 12px;
  margin-top: 4px;
}

.rpt-radio-error-message {
  color: var(--rpt-error-text);
}

.rpt-radio-help-message {
  color: var(--rpt-text-secondary);
}

/* ================================
   Select Component
   ================================ */
.rpt-select-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.rpt-select-full-width {
  width: 100%;
}

.rpt-select-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--rpt-text);
  margin-bottom: 6px;
}

.rpt-select-required::after {
  content: "*";
  color: var(--rpt-danger);
  margin-left: 2px;
}

.rpt-select-wrapper {
  position: relative;
  display: flex;
  width: 100%;
}

.rpt-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  padding: 0 2rem 0 0.75rem;
  border-radius: var(--rpt-radius-md);
  border: 1px solid var(--rpt-border);
  background-color: var(--rpt-bg);
  color: var(--rpt-text);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rpt-select:focus {
  outline: none;
  border-color: var(--rpt-primary);
  box-shadow: var(--rpt-focus-ring);
}

.rpt-select:disabled {
  opacity: var(--rpt-disabled-opacity);
  cursor: not-allowed;
  background-color: var(--rpt-bg-secondary);
}

/* Select variants */
.rpt-select-default {
  /* Default styling already applied above */
}

.rpt-select-outline {
  background-color: transparent;
}

.rpt-select-filled {
  background-color: var(--rpt-bg-secondary);
  border-color: transparent;
}

.rpt-select-unstyled {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* Select sizes */
.rpt-select-size-sm {
  height: 30px;
  font-size: 12px;
}

.rpt-select-size-md {
  height: 36px;
  font-size: 14px;
}

.rpt-select-size-lg {
  height: 42px;
  font-size: 16px;
}

.rpt-select-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--rpt-text-secondary);
}

.rpt-select-icon-svg {
  width: 16px;
  height: 16px;
}

/* Select states */
.rpt-select-error {
  border-color: var(--rpt-error-text);
}

.rpt-select-error:focus {
  box-shadow: 0 0 0 2px rgba(var(--rpt-destructive-rgb), 0.25);
}

.rpt-select-disabled {
  opacity: var(--rpt-disabled-opacity);
  cursor: not-allowed;
  background-color: var(--rpt-bg-secondary);
}

.rpt-select-loading {
  cursor: wait;
}

.rpt-select-error-message {
  color: var(--rpt-error-text);
  font-size: 12px;
  margin-top: 4px;
}

.rpt-select-help-text {
  color: var(--rpt-text-secondary);
  font-size: 12px;
  margin-top: 4px;
}

.rpt-select-spinner {
  animation: rpt-spin 0.6s linear infinite;
}

.rpt-select-spinner-track {
  opacity: 0.2;
}

.rpt-select-spinner-path {
  opacity: 0.8;
}

/* ================================
   Search Input Component
   ================================ */
.rpt-search-container {
  position: relative;
  width: 100%;
}

.rpt-search-full-width {
  width: 100%;
}

.rpt-search-wrapper {
  position: relative;
  width: 100%;
}

.rpt-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--rpt-radius-md, 6px);
  border: 1px solid var(--rpt-border, #e5e7eb);
  background-color: var(--rpt-bg, #ffffff);
  color: var(--rpt-text, #171717);
  font-size: 14px;
  transition: all 0.2s ease;
}

.rpt-search-input-with-left-icon {
  padding-left: 36px;
}

.rpt-search-input-with-right-icon {
  padding-right: 36px;
}

.rpt-search-input-with-clear {
  padding-right: 36px;
}

.rpt-search-input-with-right-icon.rpt-search-input-with-clear {
  padding-right: 64px;
}

.rpt-search-input:focus {
  outline: none;
  border-color: var(--rpt-primary, #3b82f6);
  box-shadow: 0 0 0 2px var(--rpt-primary-focus, rgba(59, 130, 246, 0.2));
}

.rpt-search-input:hover {
  border-color: var(--rpt-border-hover, #d1d5db);
}

.rpt-search-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 36px;
  color: var(--rpt-text-secondary, #6b7280);
  pointer-events: none;
}

.rpt-search-icon-left {
  left: 0;
}

.rpt-search-icon-right {
  right: 0;
}

.rpt-search-icon-svg {
  width: 16px;
  height: 16px;
}

.rpt-search-clear-button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
  border: none;
  background-color: transparent;
  color: var(--rpt-text-secondary, #6b7280);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.rpt-search-clear-button:hover {
  color: var(--rpt-text, #171717);
  background-color: var(--rpt-bg-hover, #f9fafb);
}

.rpt-search-clear-icon-svg {
  width: 14px;
  height: 14px;
}

/* Search variants */
.rpt-search-default {
  /* Default styling already applied above */
}

.rpt-search-filled {
  background-color: var(--rpt-bg-secondary, #f3f4f6);
  border-color: transparent;
}

.rpt-search-outline {
  background-color: transparent;
}

.rpt-search-minimal {
  border-color: transparent;
}

.rpt-search-minimal:focus {
  background-color: var(--rpt-bg-secondary, #f3f4f6);
}

/* Search sizes */
.rpt-search-size-sm {
  height: 30px;
  font-size: 12px;
  padding: 0 10px;
}

.rpt-search-size-md {
  height: 36px;
  font-size: 14px;
  padding: 0 12px;
}

.rpt-search-size-lg {
  height: 42px;
  font-size: 16px;
  padding: 0 14px;
}

.rpt-search-size-sm.rpt-search-input-with-left-icon {
  padding-left: 30px;
}

.rpt-search-size-sm.rpt-search-input-with-right-icon {
  padding-right: 30px;
}

.rpt-search-size-sm.rpt-search-input-with-clear {
  padding-right: 30px;
}

.rpt-search-size-lg.rpt-search-input-with-left-icon {
  padding-left: 42px;
}

.rpt-search-size-lg.rpt-search-input-with-right-icon {
  padding-right: 42px;
}

.rpt-search-size-lg.rpt-search-input-with-clear {
  padding-right: 42px;
}

.rpt-search-disabled {
  opacity: var(--rpt-disabled-opacity, 0.6);
  cursor: not-allowed;
  background-color: var(--rpt-bg-secondary, #f3f4f6);
}

/* ================================
   Dark Mode Support
   ================================ */
.rpt-dark {
  --rpt-primary: #3b82f6;
  --rpt-primary-hover: #60a5fa;
  --rpt-primary-focus: rgba(59, 130, 246, 0.2);
  --rpt-danger: #ef4444;
  --rpt-danger-hover: #f87171;
  --rpt-danger-focus: rgba(239, 68, 68, 0.2);
  --rpt-text: #f3f4f6;
  --rpt-text-secondary: #9ca3af;
  --rpt-border: #374151;
  --rpt-border-hover: #4b5563;
  --rpt-bg: #1f2937;
  --rpt-bg-hover: #374151;
  --rpt-bg-secondary: #111827;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 640px) {
  .rpt-form-group {
    margin-bottom: 12px;
  }
  
  .rpt-button {
    height: 40px; /* Slightly taller for better touch targets */
  }
  
  .rpt-input {
    height: 40px;
  }
  
  .rpt-select {
    height: 40px;
  }
  
  .rpt-search-input {
    height: 40px;
  }
}

/* ================================
   Accessibility
   ================================ */
@media (forced-colors: active) {
  .rpt-button:focus,
  .rpt-input:focus,
  .rpt-select:focus,
  .rpt-search-input:focus {
    outline: 2px solid CanvasText;
    outline-offset: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rpt-button,
  .rpt-input,
  .rpt-select,
  .rpt-search-input {
    transition: none;
  }
}

/**
 * React Power Table - Form Component Styles
 * Styling for form inputs, select boxes, and other form elements
 * Note: Checkbox styles have been moved to checkbox.css
 */

/* Common styles for form containers */
.rpt-input-container,
.rpt-select-container,
.rpt-search-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.rpt-input-container.rpt-input-full-width,
.rpt-select-container.rpt-select-full-width,
.rpt-search-container.rpt-search-full-width {
  width: 100%;
}

/* Common styles for form labels */
.rpt-input-label,
.rpt-select-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rpt-text-color);
  margin-bottom: 0.375rem;
  transition: color var(--rpt-transition-duration) ease;
}

.rpt-input-label-disabled,
.rpt-select-label-disabled {
  opacity: 0.6;
}

/* Required field indicator */
.rpt-input-required::after,
.rpt-select-required::after {
  content: "*";
  color: var(--rpt-danger);
  margin-left: 0.25rem;
}

/* Input styles */
.rpt-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* RTL Support */
[dir="rtl"] .rpt-input-with-left-icon .rpt-input {
  padding-left: 0.75rem;
  padding-right: 2.25rem;
}

[dir="rtl"] .rpt-input-with-right-icon .rpt-input {
  padding-right: 0.75rem;
  padding-left: 2.25rem;
}

[dir="rtl"] .rpt-input-left-icon {
  left: auto;
  right: 0;
}

[dir="rtl"] .rpt-input-right-icon {
  right: auto;
  left: 0;
}

[dir="rtl"] .rpt-search-icon-left {
  left: auto;
  right: 0.75rem;
}

[dir="rtl"] .rpt-search-icon-right {
  right: auto;
  left: 0.75rem;
}

[dir="rtl"] .rpt-search-clear-button {
  right: auto;
  left: 0.75rem;
}

[dir="rtl"] .rpt-search-icon-left {
  left: auto;
  right: 0;
}

[dir="rtl"] .rpt-search-icon-right {
  right: auto;
  left: 0;
}

[dir="rtl"] .rpt-search-clear-button {
  right: auto;
  left: 10px;
}

[dir="rtl"] .rpt-search-input-with-left-icon {
  padding-left: 12px;
  padding-right: 36px;
}

[dir="rtl"] .rpt-search-input-with-right-icon {
  padding-right: 12px;
  padding-left: 36px;
}

[dir="rtl"] .rpt-search-input-with-clear {
  padding-right: 12px;
  padding-left: 36px;
}

[dir="rtl"] .rpt-search-input-with-right-icon.rpt-search-input-with-clear {
  padding-right: 12px;
  padding-left: 64px;
}

/* Search in toolbar */
.rpt-toolbar .rpt-search-container {
  max-width: 300px;
  margin-left: auto;
}

.rpt-toolbar-search {
  position: relative;
  width: 100%;
  max-width: 300px;
}

.rpt-toolbar-search .rpt-search-input {
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-input-border-color);
  background-color: var(--rpt-input-bg);
  color: var(--rpt-text-color);
}

.rpt-toolbar-search .rpt-search-input:hover {
  border-color: var(--rpt-border-hover-color);
}

.rpt-toolbar-search .rpt-search-input:focus {
  border-color: var(--rpt-input-focus-border-color);
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

.rpt-toolbar-search .rpt-search-clear-button:hover {
  color: var(--rpt-danger);
}

/* Form Components Styles */

/* Checkbox */
.rpt-checkbox {
  position: relative;
  display: inline-block;
}

.rpt-checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.rpt-checkbox-indicator {
  position: relative;
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background: var(--rpt-color-background);
  border: 1px solid var(--rpt-color-border);
  border-radius: var(--rpt-radius-sm);
  cursor: pointer;
  transition: all var(--rpt-transition-fast);
}

.rpt-checkbox-input:checked + .rpt-checkbox-indicator {
  background: var(--rpt-color-primary);
  border-color: var(--rpt-color-primary);
}

.rpt-checkbox-input:indeterminate + .rpt-checkbox-indicator {
  background: var(--rpt-color-primary);
  border-color: var(--rpt-color-primary);
}

.rpt-checkbox-input:focus + .rpt-checkbox-indicator {
  outline: 2px solid var(--rpt-color-primary);
  outline-offset: 2px;
}

.rpt-checkbox-input:disabled + .rpt-checkbox-indicator {
  opacity: 0.5;
  cursor: not-allowed;
}

.rpt-checkbox-checkmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.75rem;
  height: 0.75rem;
  color: white;
  opacity: 0;
  transition: opacity var(--rpt-transition-fast);
}

.rpt-checkbox-input:checked + .rpt-checkbox-indicator .rpt-checkbox-checkmark,
.rpt-checkbox-input:indeterminate + .rpt-checkbox-indicator .rpt-checkbox-checkmark {
  opacity: 1;
}

/* Input Fields */
.rpt-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rpt-color-border);
  border-radius: var(--rpt-radius-md);
  font-size: var(--rpt-font-size-sm);
  background: var(--rpt-color-background);
  color: var(--rpt-color-text);
  transition: all var(--rpt-transition-fast);
}

.rpt-input:focus {
  outline: none;
  border-color: var(--rpt-color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rpt-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rpt-input--error {
  border-color: var(--rpt-color-error);
}

.rpt-input--error:focus {
  border-color: var(--rpt-color-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Select */
.rpt-select {
  position: relative;
  display: inline-block;
  width: 100%;
}

.rpt-select-control {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--rpt-color-border);
  border-radius: var(--rpt-radius-md);
  font-size: var(--rpt-font-size-sm);
  background: var(--rpt-color-background);
  color: var(--rpt-color-text);
  cursor: pointer;
  transition: all var(--rpt-transition-fast);
  appearance: none;
}

.rpt-select-control:focus {
  outline: none;
  border-color: var(--rpt-color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rpt-select-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.75rem;
  height: 0.75rem;
  color: var(--rpt-color-text-secondary);
  pointer-events: none;
}

/* Form Groups */
.rpt-form-group {
  margin-bottom: 1rem;
}

.rpt-form-group:last-child {
  margin-bottom: 0;
}

.rpt-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--rpt-font-size-sm);
  font-weight: 500;
  color: var(--rpt-color-text);
}

.rpt-form-label--required::after {
  content: '*';
  color: var(--rpt-color-error);
  margin-left: 0.25rem;
}

.rpt-form-error {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--rpt-font-size-xs);
  color: var(--rpt-color-error);
}

.rpt-form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--rpt-font-size-xs);
  color: var(--rpt-color-text-secondary);
}

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

.rpt-search-input-field {
  flex: 1;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  border: 1px solid var(--rpt-color-border);
  border-radius: var(--rpt-radius-md);
  font-size: var(--rpt-font-size-sm);
  background: var(--rpt-color-background);
  color: var(--rpt-color-text);
  transition: all var(--rpt-transition-fast);
}

.rpt-search-input-field:focus {
  outline: none;
  border-color: var(--rpt-color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rpt-search-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--rpt-color-text-secondary);
  pointer-events: none;
}

.rpt-search-input-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  background: none;
  border: none;
  color: var(--rpt-color-text-secondary);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rpt-search-input-clear:hover {
  color: var(--rpt-color-text);
}

/* index.css */
/**
 * React Power Table - Main Styles
 * Root CSS file that imports all component-specific styles
 */

/* 
 * Base styling reset and core styling for the library
 * These styles provide the foundation for all components
 */
/* Import core styling components - this is managed through the styles.ts entry point:
 * - theme.css - Core variables and theming utilities
 * - table.css - Main table structure and layout
 * - toolbar.css - Table toolbar and action buttons
 * - pagination.css - Pagination controls
 * - actions.css - Row action buttons styling
 * - button.css - Button components
 * - dialog.css - Modal dialogs for CRUD operations
 * - form-components.css - Form elements for filtering and editing
 * - column-visibility.css - Column visibility toggle controls
 * - checkbox.css - Custom checkbox styling
 * - loading.css - Loading spinner components
 * - loading-state.css - Loading state overlays and animations
 */

.rpt-container *,
.rpt-container *::before,
.rpt-container *::after {
  box-sizing: border-box;
}

.rpt-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  color: var(--rpt-text-color);
  line-height: 1.5;
  width: 100%;
  position: relative;
  background-color: var(--rpt-bg-color, #ffffff);
  border-radius: var(--rpt-border-radius); /* Added border-radius variable */
  min-width: 280px; /* Base minimum width for small devices */
  overflow-x: auto; /* Enable horizontal scrolling at container level */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  scrollbar-width: thin;
  scrollbar-color: var(--rpt-scrollbar-thumb-color) var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-container:hover {
  scrollbar-width: auto;
  scrollbar-color: var(--rpt-scrollbar-thumb-hover-color) var(--rpt-scrollbar-bg);
}

.rpt-container::-webkit-scrollbar {
  width: var(--rpt-scrollbar-width);
  height: var(--rpt-scrollbar-width);
  background-color: var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-container:hover::-webkit-scrollbar {
  width: var(--rpt-scrollbar-hover-width);
  height: var(--rpt-scrollbar-hover-width);
}

.rpt-container::-webkit-scrollbar-track {
  background: var(--rpt-scrollbar-bg);
  border-radius: 10px;
}

.rpt-container::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 10px;
  transition: var(--rpt-scrollbar-transition);
}

.rpt-container::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

/* Responsive image */
.rpt-container img {
  max-width: 100%;
  height: auto;
}

/* Visually hidden but accessible content */
.rpt-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Assistive text for screen readers */
.rpt-visually-hidden {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
}

/* Common transitions */
.rpt-transition {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-duration: var(--rpt-transition-duration);
  transition-timing-function: ease-in-out;
}

/* Action buttons styling - updated for flexible layout */
.rpt-action-cell {
  text-align: center !important;
  width: auto !important;
  min-width: auto !important;
  padding: 4px 8px !important;
  vertical-align: middle !important;
}

.rpt-action-header-cell {
  text-align: center !important;
  width: auto !important;
  min-width: auto !important;
}

/* Action buttons container */
.rpt-action-buttons-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

/* Improved action buttons */
.rpt-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border-radius: 4px;
  border: 1px solid var(--rpt-border-color, #e2e8f0);
  background-color: var(--rpt-bg-subtle, #f8fafc);
  color: var(--rpt-text-secondary, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.rpt-action-btn:hover {
  background-color: var(--rpt-bg-hover, #f1f5f9);
  border-color: var(--rpt-border-hover, #cbd5e1);
  color: var(--rpt-text-primary, #475569);
}

.rpt-action-btn--view {
  color: var(--rpt-primary, #2563eb);
  border-color: var(--rpt-primary-subtle, #bfdbfe);
}

.rpt-action-btn--edit {
  color: var(--rpt-warning, #ca8a04);
  border-color: var(--rpt-warning-subtle, #fef9c3);
}

.rpt-action-btn--delete {
  color: var(--rpt-destructive, #dc2626);
  border-color: var(--rpt-destructive-subtle, #fee2e2);
}

.rpt-action-btn--primary {
  color: var(--rpt-primary, #2563eb);
  border-color: var(--rpt-primary-subtle, #bfdbfe);
}

.rpt-action-btn--view:hover {
  background-color: var(--rpt-primary-bg-subtle, #dbeafe);
}

.rpt-action-btn--edit:hover {
  background-color: var(--rpt-warning-bg-subtle, #fef9c3);
}

.rpt-action-btn--delete:hover {
  background-color: var(--rpt-destructive-bg-subtle, #fee2e2);
}

.rpt-action-btn--primary:hover {
  background-color: var(--rpt-primary-bg-subtle, #dbeafe);
}

.rpt-action-btn .rpt-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.rpt-action-btn svg {
  width: 16px;
  height: 16px;
}

.rpt-action-label {
  margin-left: 4px;
}

/* Skeleton loading styles */
.rpt-skeleton {
  background: linear-gradient(90deg, 
    rgba(190, 190, 190, 0.2) 25%, 
    rgba(129, 129, 129, 0.24) 37%, 
    rgba(190, 190, 190, 0.2) 63%
  );
  background-size: 400% 100%;
  animation: rpt-skeleton-loading 1.4s ease-in-out infinite;
  border-radius: 4px;
}

.rpt-skeleton-text {
  height: 16px;
  width: 80%;
}

.rpt-skeleton-checkbox {
  height: 16px;
  width: 16px;
  border-radius: 2px;
}

.rpt-skeleton-actions {
  height: 32px;
  width: 100%;
  border-radius: 6px;
}

@keyframes rpt-skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Dark mode skeleton */
.dark .rpt-skeleton,
[data-theme="dark"] .rpt-skeleton {
  background: linear-gradient(90deg, 
    rgba(64, 64, 64, 0.2) 25%, 
    rgba(96, 96, 96, 0.24) 37%, 
    rgba(64, 64, 64, 0.2) 63%
  );
  background-size: 400% 100%;
}

/* Light and dark mode auto detection */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Dark mode variables defined in theme.css */
  }
}

/* Improved responsive classes */
@media (max-width: 640px) {
  .rpt-container {
    border-radius: calc(var(--rpt-border-radius) / 2); /* Smaller radius on mobile */
  }
  
  /* Optimize buttons for touch */
  .rpt-btn, .rpt-action-btn {
    min-height: 36px; /* Ensure touch target size meets standards */
  }
  
  /* Ensure tables don't overflow */
  .rpt-table-wrapper {
    margin-right: -1px;
    margin-left: -1px;
  }
  
  /* Ensure font size is readable on mobile */
  .rpt-text-xs {
    font-size: 0.75rem !important;
  }
}

/* Enhanced mobile landscape mode */
@media (max-width: 896px) and (orientation: landscape) {
  .rpt-container {
    max-height: 85vh;
  }
  
  /* Optimize dialogs for landscape */
  .rpt-dialog {
    max-height: 85vh;
    width: 90vw;
  }
}

/* Print styles - simplified for better printing */
@media print {
  .rpt-container {
    background-color: white !important;
    color: black !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  
  /* Ensure scrollbars don't print */
  .rpt-container::-webkit-scrollbar,
  .rpt-table-wrapper::-webkit-scrollbar,
  .rpt-dialog-content::-webkit-scrollbar {
    display: none !important;
  }
  
  /* Fix table layout for printing */
  .rpt-table {
    table-layout: auto !important;
    width: 100% !important;
  }
  
  /* Ensure borders print properly */
  .rpt-head-cell, .rpt-cell {
    border: 1px solid #000 !important;
  }
}

/* loading.css */
/**
 * React Power Table - Loading State Styles
 * CSS animations and states for loading indicators
 */

/* Spinner animation */
@keyframes rpt-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Pulse animation for skeletons */
@keyframes rpt-pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

/* Fade in animation */
@keyframes rpt-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Slide up animation for batch actions bar */
@keyframes rpt-slide-up {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Base loading container */
.rpt-loading-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

/* Loading overlay */
.rpt-loading-overlay {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

/* Loading overlay background with improved performance */
.rpt-loading-overlay-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, var(--backdrop-opacity, 0.6));
  z-index: 1;
  border-radius: inherit;
  backdrop-filter: blur(1px);
  will-change: opacity; /* Performance hint for browsers */
  transition: opacity 0.2s ease;
}

.dark .rpt-loading-overlay-background {
  background-color: rgba(15, 23, 42, var(--backdrop-opacity, 0.6));
}

/* Loading indicator positioned in center */
.rpt-loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading blur effect with reduced GPU impact */
.rpt-loading-blur > *:not(.rpt-loading-overlay-background):not(.rpt-loading-indicator) {
  filter: blur(2px);
  will-change: filter; /* Performance hint for browsers */
  transition: filter 0.2s ease;
}

/* Loading disabled state */
.rpt-loading-disabled {
  pointer-events: none !important;
  user-select: none !important;
}

/* Loading fade effect */
.rpt-loading-fade {
  animation: rpt-fade-in 0.2s ease forwards;
}

/* Loading sizes with consistent naming */
.rpt-loading--xs {
  width: 16px;
  height: 16px;
}

.rpt-loading--sm {
  width: 24px;
  height: 24px;
}

.rpt-loading--md {
  width: 32px;
  height: 32px;
}

.rpt-loading--lg {
  width: 40px;
  height: 40px;
}

.rpt-loading--xl {
  width: 48px;
  height: 48px;
}

/* Skeleton loading animation with reduced GPU impact */
.rpt-loading-skeleton {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--rpt-bg-color);
  min-height: 20px;
  border-radius: var(--rpt-border-radius);
}

/* More efficient skeleton animation */
.rpt-loading-skeleton-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--rpt-skeleton-color, rgba(0, 0, 0, 0.05)),
    transparent
  );
  will-change: transform; /* Performance hint for browsers */
  animation: rpt-loading-skeleton 1.5s ease-in-out infinite;
}

/* Dark mode skeleton colors */
.dark .rpt-loading-skeleton-content {
  background: linear-gradient(
    90deg,
    transparent,
    var(--rpt-skeleton-color, rgba(255, 255, 255, 0.05)),
    transparent
  );
}

@keyframes rpt-loading-skeleton {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Dialog specific loading styles */
.rpt-dialog-loading {
  position: relative;
  width: 100%;
  min-height: 150px;
}

/* Use CSS custom property for opacity */
.rpt-dialog-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, var(--backdrop-opacity, 0.6));
  border-radius: var(--rpt-border-radius);
  z-index: 1;
  backdrop-filter: blur(2px);
  transition: all 0.2s ease;
}

.dark .rpt-dialog-loading::before {
  background-color: rgba(15, 23, 42, var(--backdrop-opacity, 0.6));
}

/* Optimized loading indicator positioning */
.rpt-dialog-loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Dialog content with blur effect during loading */
.rpt-dialog-content-blur {
  filter: blur(2px);
  opacity: 0.7;
  pointer-events: none;
  will-change: filter, opacity; /* Performance hint */
  transition: all 0.2s ease;
}

/* Dialog skeleton loading with variable item support */
.rpt-dialog-skeleton {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

/* Consistent skeleton animation */
.rpt-dialog-skeleton-item {
  height: 1rem;
  background: linear-gradient(90deg, 
    rgba(226, 232, 240, 0.6) 25%, 
    rgba(203, 213, 225, 0.6) 37%, 
    rgba(226, 232, 240, 0.6) 63%
  );
  background-size: 400% 100%;
  animation: rpt-dialog-skeleton 1.4s ease infinite;
  border-radius: var(--rpt-border-radius-sm, 4px);
  will-change: background-position; /* Performance hint */
}

.dark .rpt-dialog-skeleton-item {
  background: linear-gradient(90deg, 
    rgba(55, 65, 81, 0.7) 25%, 
    rgba(75, 85, 99, 0.7) 37%, 
    rgba(55, 65, 81, 0.7) 63%
  );
}

/* Other skeleton variations */
.rpt-dialog-skeleton-item.rpt-skeleton-title {
  width: 70%;
  height: 1.5rem;
  margin-bottom: 0.5rem;
}

.rpt-dialog-skeleton-item.rpt-skeleton-input {
  height: 2.5rem;
}

.rpt-dialog-skeleton-item.rpt-skeleton-textarea {
  height: 5rem;
}

@keyframes rpt-dialog-skeleton {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* Table specific loading styles */
.rpt-table-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, var(--backdrop-opacity, 0.6));
  z-index: 50;
  border-radius: inherit;
  backdrop-filter: blur(1px);
  will-change: opacity; /* Performance hint */
}

.dark .rpt-table-loading {
  background-color: rgba(15, 23, 42, var(--backdrop-opacity, 0.6));
}

/* Loading indicator containers */
.rpt-table-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 51;
}

.rpt-table-loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.rpt-table-loading-text {
  font-size: 0.875rem;
  color: var(--rpt-text-color);
  margin-top: 0.25rem;
}

/* Optimized table loading blur effect */
.rpt-table-loading-blur .rpt-table {
  filter: blur(2px);
  opacity: 0.7;
  pointer-events: none;
  will-change: filter, opacity; /* Performance hint */
  transition: all 0.2s ease;
}

/* Reduced motion support */
.rpt-reduced-motion * {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-speed: 0.001ms;
  }
  
  .rpt-spin,
  .rpt-pulse,
  .rpt-fade-in,
  .rpt-slide-up,
  .rpt-loading-skeleton-content,
  .rpt-dialog-skeleton-item {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  
  .rpt-loading-blur > *,
  .rpt-table-loading-blur .rpt-table,
  .rpt-dialog-content-blur {
    filter: none !important;
    transition: none !important;
  }
}

/* Table skeleton loading */
.rpt-table-skeleton {
  width: 100%;
  overflow: hidden;
  background: var(--rpt-bg-color);
  border-radius: var(--rpt-border-radius);
  box-shadow: var(--rpt-shadow-sm);
}

.rpt-table-skeleton-header {
  display: flex;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-head-bg-color);
}

.rpt-table-skeleton-body {
  display: flex;
  flex-direction: column;
}

.rpt-table-skeleton-row {
  display: flex;
  border-bottom: 1px solid var(--rpt-border-color);
  padding: 0.75rem 1rem;
}

/* Optimized skeleton cells */
.rpt-table-skeleton-cell {
  flex: 1;
  height: 1.5rem;
  margin-right: 1rem;
  background: linear-gradient(90deg, 
    rgba(226, 232, 240, 0.6) 25%, 
    rgba(203, 213, 225, 0.6) 37%, 
    rgba(226, 232, 240, 0.6) 63%
  );
  background-size: 400% 100%;
  animation: rpt-table-skeleton 1.4s ease infinite;
  border-radius: 4px;
  will-change: background-position; /* Performance hint */
}

.dark .rpt-table-skeleton-cell {
  background: linear-gradient(90deg, 
    rgba(55, 65, 81, 0.7) 25%, 
    rgba(75, 85, 99, 0.7) 37%, 
    rgba(55, 65, 81, 0.7) 63%
  );
}

/* Header cells in skeleton */
.rpt-skeleton-header-cell {
  height: 1.75rem;
}

/* pagination.css */
/**
 * React Power Table - Pagination Styles
 * Styling for pagination controls with various sizes and states
 */

/* Pagination container */
.rpt-pagination-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 100%; /* Ensure the pagination takes full width like table */
  gap: 1rem;
  padding: 1rem;
  margin-top: auto;
  background-color: var(--rpt-footer-bg);
  color: var(--rpt-text-color);
  border-top: 1px solid var(--rpt-border-color);
  border-bottom-left-radius: var(--rpt-border-radius);
  border-bottom-right-radius: var(--rpt-border-radius);
  transition: background-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease;
  overflow-x: auto; /* Add horizontal scrolling capability */
  box-sizing: border-box;
  /* Force pagination to take the same width as the table when sticky header is enabled */
  position: relative;
  left: 0;
  right: 0;
}

/* When sticky header is enabled, ensure pagination aligns with table width */
.rpt-table-container .rpt-pagination-container {
  min-width: fit-content;
  width: 100%;
  max-width: none;
  flex-shrink: 0;
}

/* Ensure the pagination takes the same width as the table wrapper */
.rpt-table-wrapper + .rpt-pagination-container {
  min-width: fit-content !important;
  width: 100% !important;
}

/* Pagination info section */
.rpt-pagination-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--rpt-muted-text);
  white-space: nowrap; /* Prevent text wrapping */
}

/* Page size selector */
.rpt-page-size-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  flex-shrink: 0; /* Prevent shrinking */
}

.rpt-page-size-label {
  color: var(--rpt-muted-text);
  white-space: nowrap;
}

.rpt-page-size-select {
  min-width: 80px;
  padding: 0.375rem 0.75rem;
  padding-right: 2rem;
  font-size: 0.875rem;
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-input-border-color);
  background-color: var(--rpt-input-bg);
  color: var(--rpt-text-color);
  cursor: pointer;
  appearance: none;
  transition: border-color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease,
              background-color var(--rpt-transition-duration) ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
}

.rpt-page-size-select:hover {
  border-color: var(--rpt-border-hover-color);
}

.rpt-page-size-select:focus {
  outline: none;
  border-color: var(--rpt-primary);
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

/* Pagination controls */
.rpt-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

/* Page buttons */
.rpt-page-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.25rem;
  border-radius: var(--rpt-border-radius);
  background-color: transparent;
  border: 1px solid transparent;
  color: var(--rpt-text-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease,
              box-shadow var (--rpt-transition-duration) ease;
}

.rpt-page-button:hover {
  background-color: var(--rpt-row-hover-bg);
  border-color: var(--rpt-border-hover-color);
}

/* Previous and next page buttons */
.rpt-prev-button,
.rpt-next-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--rpt-border-radius);
  background-color: transparent;
  border: 1px solid var(--rpt-input-border-color);
  color: var(--rpt-text-color);
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-prev-button:hover,
.rpt-next-button:hover {
  background-color: var(--rpt-row-hover-bg);
  border-color: var(--rpt-border-hover-color);
}

.rpt-prev-button:focus,
.rpt-next-button:focus,
.rpt-page-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
  z-index: 1;
}

.rpt-prev-button:focus-visible,
.rpt-next-button:focus-visible,
.rpt-page-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

.rpt-prev-button:disabled,
.rpt-next-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--rpt-muted);
}

.rpt-prev-button svg,
.rpt-next-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Active page button */
.rpt-page-button.rpt-page-active {
  background-color: var(--rpt-primary);
  border-color: var(--rpt-primary);
  color: #ffffff;
  font-weight: 600;
}

.rpt-page-button.rpt-page-active:hover {
  background-color: var(--rpt-primary-dark);
  border-color: var(--rpt-primary-dark);
}

/* Page count status */
.rpt-page-count {
  padding: 0 0.5rem;
  font-size: 0.875rem;
  color: var(--rpt-text-color);
}

/* Ellipsis indicator */
.rpt-page-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  font-size: 0.875rem;
  color: var(--rpt-muted-text);
}

/* Jump to page input */
.rpt-jump-to-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  flex-shrink: 0; /* Prevent shrinking */
}

.rpt-jump-label {
  font-size: 0.875rem;
  color: var(--rpt-muted-text);
  white-space: nowrap;
}

.rpt-jump-input {
  width: 60px;
  padding: 0.375rem 0.5rem;
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-input-border-color);
  background-color: var(--rpt-input-bg);
  color: var(--rpt-text-color);
  font-size: 0.875rem;
  text-align: center;
  transition: border-color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-jump-input:hover {
  border-color: var(--rpt-border-hover-color);
}

.rpt-jump-input:focus {
  outline: none;
  border-color: var(--rpt-primary);
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

/* Compact pagination variant */
.rpt-pagination-compact {
  padding: 0.625rem 1rem;
}

.rpt-pagination-compact .rpt-page-button,
.rpt-pagination-compact .rpt-prev-button,
.rpt-pagination-compact .rpt-next-button {
  min-width: 1.75rem;
  height: 1.75rem;
  font-size: 0.75rem;
}

.rpt-pagination-compact .rpt-pagination-info,
.rpt-pagination-compact .rpt-page-size-label,
.rpt-pagination-compact .rpt-page-size-select,
.rpt-pagination-compact .rpt-jump-label,
.rpt-pagination-compact .rpt-jump-input {
  font-size: 0.75rem;
}

/* Pagination with border */
.rpt-pagination-bordered {
  border-top: 1px solid var(--rpt-border-color);
  border-bottom: 1px solid var(--rpt-border-color);
}

/* Simple pagination variant */
.rpt-pagination-simple {
  justify-content: flex-end;
}

.rpt-pagination-simple .rpt-pagination-info {
  margin-right: auto;
}

.rpt-pagination-simple .rpt-pagination-controls {
  gap: 0.5rem;
}

/* Stack pagination on small screens */
@media (max-width: 640px) {
  .rpt-pagination-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .rpt-pagination-info {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .rpt-pagination-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .rpt-page-size-selector {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.25rem;
  }

  .rpt-jump-to-page {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

/* When table has horizontal scroll, make pagination match the content width */
.rpt-table-wrapper.has-horizontal-scroll + .rpt-pagination-container {
  width: max-content !important;
  min-width: 100% !important;
}

/* This will make sure the pagination matches the exact width of the table */
@media (min-width: 1px) {
  .rpt-table-wrapper {
    width: auto;
    min-width: 100%;
  }
  
  .rpt-pagination-container {
    width: auto;
    min-width: 100%;
  }
}

/* RTL support */
[dir="rtl"] .rpt-page-size-select {
  padding-right: 0.75rem;
  padding-left: 2rem;
  background-position: left 0.5rem center;
}

[dir="rtl"] .rpt-jump-to-page {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* High contrast mode */
@media (forced-colors: active) {
  .rpt-page-button.rpt-page-active {
    border: 2px solid ButtonText;
  }
  
  .rpt-prev-button,
  .rpt-next-button {
    border: 1px solid ButtonText;
  }
  
  .rpt-prev-button:disabled,
  .rpt-next-button:disabled {
    opacity: 0.5;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .rpt-pagination-container * {
    transition: none !important;
  }
}

/* scrollbar.css */
/**
 * React Power Table - Custom Scrollbar Styles
 * Consistent scrollbar styling across components
 */

/* Global scrollbar styling - Base thin scrollbar */
.rpt-scrollable {
  scrollbar-width: thin;
  scrollbar-color: var(--rpt-scrollbar-thumb-color) var(--rpt-scrollbar-bg);
}

/* Webkit based browsers (Chrome, Safari, Edge) */
.rpt-scrollable::-webkit-scrollbar {
  width: var(--rpt-scrollbar-width, 6px);
  height: var(--rpt-scrollbar-width, 6px);
  background-color: var(--rpt-scrollbar-bg);
}

/* CRITICAL FIX: Remove hover effect on container - scrollbar width should only change when hovering the scrollbar itself */
/* This selector won't work in practice because you can't target scrollbar hover in CSS */
/* Instead, we'll use a different approach */

.rpt-scrollable::-webkit-scrollbar-track {
  background: var(--rpt-scrollbar-bg);
  border-radius: 10px;
}

.rpt-scrollable::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

/* Only change color on thumb hover, not width */
.rpt-scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

/* Scrollbar corner */
.rpt-scrollable::-webkit-scrollbar-corner {
  background: var(--rpt-scrollbar-bg);
}

/* Table wrapper scrollbar - more prominent for horizontal scrolling but no hover width change */
.rpt-table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: var(--rpt-scrollbar-bg);
}

/* REMOVE: No hover width change for table wrapper */
/* .rpt-table-wrapper::-webkit-scrollbar:hover - This doesn't work anyway */

.rpt-table-wrapper::-webkit-scrollbar-track {
  background: var(--rpt-scrollbar-bg);
  border-radius: 6px;
}

.rpt-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 6px;
  border: 1px solid var(--rpt-scrollbar-bg);
  transition: background-color 0.2s ease;
}

.rpt-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

/* Dialog content scrollbar */
.rpt-dialog-content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  background-color: var(--rpt-scrollbar-bg);
}

/* REMOVE: No hover width change */
/* .rpt-dialog-content::-webkit-scrollbar:hover - This doesn't work */

.rpt-dialog-content::-webkit-scrollbar-track {
  background: var(--rpt-scrollbar-bg);
  border-radius: 5px;
}

.rpt-dialog-content::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.rpt-dialog-content::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

/* Dropdown scrollbars - smaller and more subtle, NO hover width change */
.rpt-column-visibility-list::-webkit-scrollbar,
.rpt-column-dropdown::-webkit-scrollbar,
.rpt-export-dropdown-content::-webkit-scrollbar,
.rpt-action-dropdown-content::-webkit-scrollbar {
  width: 4px;
  height: 4px;
  background-color: transparent;
}

/* REMOVE: No hover width change for dropdowns */
/* All ::-webkit-scrollbar:hover selectors are removed */

.rpt-column-visibility-list::-webkit-scrollbar-track,
.rpt-column-dropdown::-webkit-scrollbar-track,
.rpt-export-dropdown-content::-webkit-scrollbar-track,
.rpt-action-dropdown-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

.rpt-column-visibility-list::-webkit-scrollbar-thumb,
.rpt-column-dropdown::-webkit-scrollbar-thumb,
.rpt-export-dropdown-content::-webkit-scrollbar-thumb,
.rpt-action-dropdown-content::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.rpt-column-visibility-list::-webkit-scrollbar-thumb:hover,
.rpt-column-dropdown::-webkit-scrollbar-thumb:hover,
.rpt-export-dropdown-content::-webkit-scrollbar-thumb:hover,
.rpt-action-dropdown-content::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

/* Firefox scrollbar - can't control width on hover, so keep consistent */
.rpt-scrollable {
  scrollbar-width: thin;
  scrollbar-color: var(--rpt-scrollbar-thumb-color) var(--rpt-scrollbar-bg);
}

/* Dark theme adjustments */
.dark-theme .rpt-scrollable,
[data-theme="dark"] .rpt-scrollable {
  scrollbar-color: var(--rpt-scrollbar-thumb-color-dark, #64748b) var(--rpt-scrollbar-bg-dark, #1e293b);
}

/* Container scrollbar improvements - NO hover width change */
.rpt-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  background-color: var(--rpt-scrollbar-bg);
}

/* REMOVE: No hover width change */
/* .rpt-container::-webkit-scrollbar:hover - This doesn't work */

.rpt-container::-webkit-scrollbar-track {
  background: var(--rpt-scrollbar-bg);
  border-radius: 6px;
}

.rpt-container::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.rpt-container::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

/* Utility classes */
.rpt-scrollbar-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.rpt-scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

.rpt-scrollable-x {
  overflow-x: auto;
  overflow-y: hidden;
}

.rpt-scrollable-y {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Mobile optimization - keep scrollbars thin on mobile */
@media (max-width: 640px) {
  .rpt-scrollable::-webkit-scrollbar,
  .rpt-table-wrapper::-webkit-scrollbar,
  .rpt-container::-webkit-scrollbar {
    width: 4px !important;
    height: 4px !important;
  }
  
  /* REMOVE: No hover effects on mobile */
}

/* Touch device optimization */
@media (pointer: coarse) {
  .rpt-scrollable,
  .rpt-table-wrapper,
  .rpt-container {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Slightly thicker scrollbars on touch devices but no hover effects */
  .rpt-scrollable::-webkit-scrollbar,
  .rpt-table-wrapper::-webkit-scrollbar,
  .rpt-container::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .rpt-scrollable::-webkit-scrollbar,
  .rpt-scrollable::-webkit-scrollbar-thumb,
  .rpt-table-wrapper::-webkit-scrollbar,
  .rpt_table-wrapper::-webkit-scrollbar-thumb,
  .rpt-container::-webkit-scrollbar,
  .rpt-container::-webkit-scrollbar-thumb {
    transition: none !important;
  }
}

/* Smooth scrolling */
.rpt-container,
.rpt-table-wrapper,
.rpt-dialog-content {
  scroll-behavior: smooth;
}

/* ALTERNATIVE APPROACH: Use JavaScript for hover detection on scrollbar */
/* This would require JavaScript implementation to detect actual scrollbar hover */
.rpt-scrollbar-hover-detected::-webkit-scrollbar {
  width: 12px !important;
  height: 12px !important;
}


/* settings.css */
/**
 * React Power Table - Settings Panel Styles
 */

/* Settings dropdown container */
.rpt-settings-dropdown {
  position: relative;
}

/* Settings button */
.rpt-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--rpt-toolbar-btn-height);
  width: var(--rpt-toolbar-btn-height);
  padding: 0;
  border-radius: var(--rpt-border-radius);
  color: var(--rpt-icon-color);
  background-color: var(--rpt-btn-bg);
  border: 1px solid var(--rpt-border-color);
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease;
}

.rpt-settings-btn:hover {
  color: var(--rpt-primary);
  border-color: var(--rpt-primary-light);
  background-color: var(--rpt-primary-bg);
}

.rpt-settings-btn--active {
  color: var(--rpt-primary);
  border-color: var(--rpt-primary);
  background-color: var(--rpt-primary-bg);
}

/* Settings panel */
.rpt-settings-panel {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: 260px;
  max-height: 80vh;
  overflow-y: auto;
  background-color: var(--rpt-bg-color);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  box-shadow: var(--rpt-shadow);
  z-index: 50;
}

/* Settings content with scrollbar */
.rpt-settings-content {
  max-height: 60vh;
  overflow-y: auto;
  padding: 0.5rem 0;
}

/* Settings section */
.rpt-settings-section {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rpt-border-color);
}

.rpt-settings-section:last-child {
  border-bottom: none;
}

/* Section title */
.rpt-settings-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--rpt-title-color);
}

/* Options group */
.rpt-settings-options-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

/* Checkbox group (different layout) */
.rpt-settings-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Radio option */
.rpt-settings-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem 0;
  min-width: 100px;
}

.rpt-settings-radio {
  margin: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--rpt-primary);
}

.rpt-settings-option-text {
  font-size: 0.875rem;
  color: var(--rpt-text-color);
}

/* Checkbox option */
.rpt-settings-option-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.rpt-settings-checkbox {
  margin: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--rpt-primary);
}

/* Table identifier input */
.rpt-settings-identifier-container {
  margin-bottom: 0.5rem;
}

.rpt-settings-identifier-input {
  width: 100%;
  height: 32px;
  padding: 0 0.75rem;
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-input-bg);
  color: var(--rpt-text-color);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-settings-identifier-input:focus {
  border-color: var(--rpt-primary);
  box-shadow: 0 0 0 1px var(--rpt-primary-light);
}

.rpt-settings-input-error {
  border-color: var(--rpt-danger) !important;
}

/* Help text and error */
.rpt-settings-identifier-help {
  font-size: 0.75rem;
  color: var(--rpt-muted-text);
  margin: 0.25rem 0 0.5rem;
}

.rpt-settings-identifier-error {
  font-size: 0.75rem;
  color: var(--rpt-danger);
  margin: 0.25rem 0 0.5rem;
}

/* Theme system detection label */
.rpt-settings-system-detection {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--rpt-muted-text);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Save button section */
.rpt-settings-actions {
  text-align: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rpt-border-color);
  margin-top: 0.5rem;
}

.rpt-settings-save-buttons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.rpt-settings-save-btn {
  padding: 0.5rem 1rem;
  background-color: var(--rpt-primary);
  color: white;
  border: none;
  border-radius: var(--rpt-border-radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease;
}

.rpt-settings-save-btn:hover {
  background-color: var(--rpt-primary-dark);
}

.rpt-settings-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rpt-settings-save-help {
  font-size: 0.75rem;
  color: var(--rpt-muted-text);
  margin: 0;
}

/* Load configurations section */
.rpt-saved-configurations {
  margin-top: 0.75rem;
  position: relative;
}

.rpt-load-config-btn {
  width: 100%;
  padding: 0.5rem;
  background-color: var(--rpt-btn-secondary-bg);
  color: var(--rpt-btn-secondary-text);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease;
}

.rpt-load-config-btn:hover {
  background-color: var(--rpt-btn-secondary-hover-bg);
}

/* Configurations panel */
.rpt-settings-configurations-panel {
  max-height: 300px;
  overflow-y: auto;
}

.rpt-configuration-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  background: none;
  border: none;
  font-size: 0.875rem;
  color: var(--rpt-text-color);
  cursor: pointer;
  border-radius: var(--rpt-border-radius);
  transition: background-color var(--rpt-transition-duration) ease;
}

.rpt-configuration-item:hover {
  background-color: var(--rpt-row-hover-bg);
}

.rpt-configuration-item-active {
  background-color: var(--rpt-primary-bg);
  color: var(--rpt-primary);
}

.rpt-configuration-active-indicator {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  background-color: var(--rpt-primary);
  color: white;
  border-radius: 9999px;
}

.rpt-empty-configurations {
  padding: 1rem;
  text-align: center;
  color: var(--rpt-muted-text);
  font-size: 0.875rem;
}

/* Media queries for responsive design */
@media (max-width: 640px) {
  .rpt-settings-panel {
    width: 290px;
    right: -100px;
  }
}

/* Support for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rpt-settings-btn,
  .rpt-settings-identifier-input,
  .rpt-settings-save-btn,
  .rpt-load-config-btn,
  .rpt-configuration-item {
    transition: none !important;
  }
}

/* table.css */
/**
 * React Power Table - Table Styles
 * Core styling for table structure and layout
 */

.rpt-table-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: var(--rpt-border-width) solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  background-color: var(--rpt-bg-color);
  min-width: 280px; /* Base minimum width */
}

/* Table wrapper to enable horizontal scrolling */
.rpt-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  margin-bottom: -1px; /* Compensate for bottom border */
  /* Show scrollbar shadows to indicate more content */
  background-image: 
    /* Right shadow */
    linear-gradient(to right, transparent, transparent),
    /* Left shadow */
    linear-gradient(to left, transparent, transparent);
  background-position: right center, left center;
  background-repeat: no-repeat;
  background-color: transparent;
  background-size: 15px 100%, 15px 100%;
  background-attachment: local, local;
  /* Don't restrict the wrapper width to allow natural table expansion */
  min-width: 0; /* Reset min-width */
  
  /* Add scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--rpt-scrollbar-thumb-color) var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-table-wrapper:hover {
  scrollbar-width: auto;
  scrollbar-color: var(--rpt-scrollbar-thumb-hover-color) var(--rpt-scrollbar-bg);
}

.rpt-table-wrapper::-webkit-scrollbar {
  width: var(--rpt-scrollbar-width);
  height: var(--rpt-scrollbar-width);
  background-color: var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-table-wrapper:hover::-webkit-scrollbar {
  width: var(--rpt-scrollbar-hover-width);
  height: var(--rpt-scrollbar-hover-width);
}

.rpt-table-wrapper::-webkit-scrollbar-track {
  background: var(--rpt-scrollbar-bg);
  border-radius: 10px;
}

.rpt-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 10px;
  transition: var(--rpt-scrollbar-transition);
}

.rpt-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

/* Core table styling */
.rpt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  table-layout: fixed; /* Fixed layout for better column control */
  /* Allow table to grow beyond container width if needed */
  min-width: 100%; /* Ensure table takes at least full width */
}

/* Table size variants */
.rpt-table-compact {
  font-size: 0.75rem; /* Smaller font */
}

.rpt-table-compact .rpt-head-cell,
.rpt-table-compact .rpt-cell {
  padding: 0.5rem 0.75rem; /* Reduced padding */
}

.rpt-table-large {
  font-size: 1rem; /* Larger font */
}

.rpt-table-large .rpt-head-cell,
.rpt-table-large .rpt-cell {
  padding: 1rem 1.25rem; /* Increased padding */
}

/* Table head styling */
.rpt-table-head {
  position: relative;
  background-color: var(--rpt-header-bg);
  border-bottom: var(--rpt-border-width) solid var(--rpt-border-color);
}

.rpt-table-head-row {
  background-color: var(--rpt-header-bg);
}

.rpt-head-cell.rpt-select-cell {
  text-align: center;
}

.rpt-head-cell.rpt-select-cell .rpt-cell-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rpt-head-cell {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--rpt-header-text-color);
  white-space: nowrap;
  position: relative;
  box-sizing: border-box;
  height: 100%;
  min-width: 180px !important; /* Force minimum width for all head cells */
  width: auto !important; /* Ensure width is auto and respects min-width */
}

/* Alignment variants for head cells */
.rpt-head-cell.rpt-align-left {
  text-align: left;
}

.rpt-head-cell.rpt-align-center {
  text-align: center;
}

.rpt-head-cell.rpt-align-right {
  text-align: right;
}

/* Table head cell content */
.rpt-cell-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Head cell with sorting */
.rpt-head-cell.rpt-sortable {
  cursor: pointer;
  user-select: none;
}

.rpt-head-cell.rpt-sortable:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .rpt-head-cell.rpt-sortable:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.rpt-sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

/* Table body styling */
.rpt-table-body {
  position: relative;
}

.rpt-row {
  background-color: var(--rpt-row-bg);
  border-bottom: var(--rpt-border-width) solid var(--rpt-border-color);
  transition: background-color var(--rpt-transition-duration) ease;
}

.rpt-row:last-child {
  border-bottom: none;
}

.rpt-row:hover {
  background-color: var(--rpt-row-hover-bg);
}

/* Row variants */
.rpt-row-alt {
  background-color: var(--rpt-row-bg-alt);
}

.rpt-row-selected {
  background-color: var(--rpt-row-selected-bg);
}

.rpt-row-selected:hover {
  background-color: var(--rpt-row-selected-bg);
  filter: brightness(0.98);
}

.rpt-row-updated {
  animation: highlight-row 2s ease-out;
}

@keyframes highlight-row {
  0% {
    background-color: var(--rpt-row-updated-bg);
  }
  100% {
    background-color: var(--rpt-row-bg);
  }
}

.rpt-row.rpt-clickable {
  cursor: pointer;
}

/* Table cell styling */
.rpt-cell {
  padding: 0.75rem 1rem;
  box-sizing: border-box;
  border-right: var(--rpt-border-width) solid transparent;
  vertical-align: middle;
  position: relative;
  height: 100%; /* Ensure all cells have the same height */
  overflow: hidden; /* Prevent overflow */
  min-width: 180px !important; /* Force minimum width for all cells */
  width: auto !important; /* Ensure width is auto and respects min-width */
}

/* Cell alignment variants */
.rpt-cell.rpt-align-left {
  text-align: left;
}

.rpt-cell.rpt-align-center {
  text-align: center;
}

.rpt-cell.rpt-align-right {
  text-align: right;
}

/* Cell truncation */
.rpt-cell-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px; /* Default max width, can be overridden */
}

/* Action buttons styling - updated for flexible layout */
.rpt-action-cell {
  text-align: center !important;
  width: auto !important;
  min-width: auto !important;
  padding: 4px 8px !important;
  vertical-align: middle !important;
  position: relative; /* Add position relative */
  z-index: 1; /* Lower z-index than dropdowns */
}

.rpt-action-header-cell {
  text-align: center !important;
  width: auto !important;
  min-width: auto !important;
  position: relative; /* Add position relative */
  z-index: 1; /* Lower z-index than dropdowns */
}

/* Action buttons container */
.rpt-action-buttons-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  position: relative; /* Add position relative */
  z-index: 1; /* Lower z-index than dropdowns */
}

/* Selection cell styles */
.rpt-select-cell {
  width: 48px !important; /* Fixed width for selection column */
  min-width: 48px !important; /* Match fixed width */
  max-width: 48px !important; /* Match fixed width */
  padding: 0.5rem 0.25rem !important;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
}

/* Table footer */
.rpt-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: var(--rpt-footer-bg);
  border-top: var(--rpt-border-width) solid var(--rpt-border-color);
}

/* Fix for table layout to enforce cell width */
.rpt-table-wrapper table {
  width: 100%; /* Ensure table takes full width */
  min-width: 100%; /* Ensure table can expand beyond container width */
}

.rpt-table colgroup col {
  min-width: 180px; /* Set column minimum width */
}

.rpt-table colgroup col.rpt-select-col {
  min-width: 48px;
  width: 48px;
}

.rpt-table colgroup col.rpt-action-col {
  min-width: 225px;
  width: 225px;
}

.rpt-table {
  border-collapse: separate; /* Important for fixed layout */
  border-spacing: 0;
}

/* Ensure width distribution */
.rpt-table-body {
  width: 100%;
}

/* Responsive table styles - maintain minimum widths */
@media (min-width: 768px) {
  .rpt-head-cell,
  .rpt-cell {
    min-width: 180px !important; /* Force minimum width for tablet */
  }
  
  .rpt-action-cell {
    max-width: 180px !important;
    min-width: 180px !important;
    width: 180px !important;
    padding: 0.375rem !important;
  }
  
  .rpt-action-header-cell {
    max-width: 180px !important;
    min-width: 180px !important;
    width: 180px !important;
  }
  
  .rpt-select-cell {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
  }
}

@media (min-width: 1024px) {
  .rpt-head-cell,
  .rpt-cell {
    min-width: 200px !important; /* Force minimum width for desktop */
  }
}

/* Responsive table styles - improve for mobile */
@media (max-width: 640px) {
  .rpt-table-container {
    max-width: 100vw;
    border-radius: calc(var(--rpt-border-radius) / 2); /* Reduced border-radius for mobile */
  }
  
  .rpt-head-cell,
  .rpt-cell {
    padding: 0.5rem;
    font-size: 0.75rem;
    min-width: 140px !important; /* Smaller min-width for mobile */
  }
  
  .rpt-table-footer {
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .rpt-cell-truncate {
    max-width: 140px;
  }
  
  .rpt-action-cell {
    max-width: 110px !important;
    min-width: 110px !important;
    width: 110px !important;
    padding: 0.25rem !important;
  }
  
  .rpt-action-header-cell {
    max-width: 110px !important;
    min-width: 110px !important;
    width: 110px !important;
  }
  
  .rpt-select-cell {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 0.25rem 0.125rem !important;
  }
}

/* Tablet view improvements */
@media (min-width: 641px) and (max-width: 1024px) {
  .rpt-head-cell,
  .rpt-cell {
    min-width: 160px !important; /* Moderate min-width for tablets */
  }
  
  .rpt-action-cell {
    max-width: 150px !important;
    min-width: 150px !important;
    width: 150px !important;
  }
  
  .rpt-action-header-cell {
    max-width: 150px !important;
    min-width: 150px !important;
    width: 150px !important;
  }
}

/* Optimize table layout for landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
  .rpt-table-container.rpt-fixed-header {
    max-height: 85vh !important; /* More height in landscape */
  }
  
  .rpt-table-container.rpt-fixed-header .rpt-scroll-container {
    max-height: 85vh !important;
  }
}

/* Empty state styling */
.rpt-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--rpt-muted-text);
}

.rpt-empty-icon {
  margin-bottom: 1rem;
  color: var(--rpt-border-color);
}

.rpt-empty-text {
  font-size: 0.875rem;
  max-width: 300px;
  margin: 0 auto;
}

/* Column resizer */
.rpt-column-resizer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  user-select: none;
  background-color: transparent;
  z-index: 10;
}

.rpt-column-resizer:hover,
.rpt-column-resizer:active {
  background-color: var(--rpt-primary);
  opacity: 0.5;
}

/* Status cell styling */
.rpt-status-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rpt-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.rpt-status-badge--success {
  background-color: var(--rpt-status-success-bg);
  color: var(--rpt-status-success-text);
}

.rpt-status-badge--warning {
  background-color: var(--rpt-status-warning-bg);
  color: var(--rpt-status-warning-text);
}

.rpt-status-badge--danger {
  background-color: var(--rpt-status-danger-bg);
  color: var(--rpt-status-danger-text);
}

.rpt-status-badge--info {
  background-color: var(--rpt-status-info-bg);
  color: var(--rpt-status-info-text);
}

.rpt-status-badge--neutral {
  background-color: var(--rpt-status-neutral-bg);
  color: var(--rpt-status-neutral-text);
}

/* High-contrast mode adjustments */
@media (forced-colors: active) {
  .rpt-table-container {
    border: 1px solid CanvasText;
  }
  
  .rpt-table-head,
  .rpt-row {
    border-bottom: 1px solid CanvasText;
  }
  
  .rpt-status-badge {
    border: 1px solid CanvasText;
  }
}

/* Print-friendly styles */
@media print {
  .rpt-table-container {
    overflow: visible;
    border: 1px solid #000;
  }
  
  .rpt-table-wrapper {
    overflow: visible;
  }
  
  .rpt-table {
    font-size: 10pt;
    border-collapse: collapse !important;
    table-layout: auto;
  }
  
  .rpt-head-cell,
  .rpt-cell {
    border: 1px solid #000 !important;
    padding: 4pt 8pt !important;
  }
  
  .rpt-sort-indicator,
  .rpt-column-resizer,
  .rpt-select-cell,
  .rpt-action-cell {
    display: none !important;
  }
}

/* Sticky header functionality */
.rpt-table-head.rpt-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* RTL Support */
[dir="rtl"] .rpt-head-cell,
[dir="rtl"] .rpt-cell {
  text-align: right;
}

[dir="rtl"] .rpt-head-cell.rpt-align-left {
  text-align: right;
}

[dir="rtl"] .rpt-head-cell.rpt-align-right {
  text-align: left;
}

[dir="rtl"] .rpt-cell.rpt-align-left {
  text-align: right;
}

[dir="rtl"] .rpt-cell.rpt-align-right {
  text-align: left;
}

/* Accessibility focus styles */
.rpt-table:focus-visible {
  outline: 2px solid var(--rpt-focus-color);
  outline-offset: 2px;
}

.rpt-row.rpt-focus-visible {
  outline: 2px solid var(--rpt-focus-color);
  outline-offset: -2px;
  position: relative;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .rpt-row,
  .rpt-row-updated {
    transition: none !important;
    animation: none !important;
  }
}

/* theme.css */
/**
 * React Power Table - Theme Variables
 * Core CSS variables for theming the table with light/dark mode support
 */

/* Base theme variables - light theme by default */
:root, [data-theme="light"] {
  /* Colors */
  --rpt-primary: #3b82f6;
  --rpt-primary-light: #93c5fd;
  --rpt-primary-dark: #2563eb;
  --rpt-success: #10b981;
  --rpt-warning: #f59e0b;
  --rpt-danger: #ef4444;
  --rpt-info: #3b82f6;
  
  /* Background colors */
  --rpt-bg-color: #ffffff;
  --rpt-toolbar-bg: #ffffff;
  --rpt-header-bg: #f8fafc;
  --rpt-footer-bg: #f8fafc;
  --rpt-row-bg: #ffffff;
  --rpt-row-bg-alt: #f8fafc;
  --rpt-row-hover-bg: #f1f5f9;
  --rpt-row-selected-bg: #eff6ff;
  --rpt-row-updated-bg: rgba(59, 130, 246, 0.08);
  
  /* Text colors */
  --rpt-text-color: #1e293b;
  --rpt-title-color: #0f172a;
  --rpt-description-color: #64748b;
  --rpt-header-text-color: #475569;
  --rpt-muted-text: #64748b;
  
  /* Border colors */
  --rpt-border-color: #e2e8f0;
  --rpt-border-hover-color: #cbd5e1;
  --rpt-focus-color: rgba(59, 130, 246, 0.5);
  --rpt-focus-shadow: rgba(59, 130, 246, 0.25);
  
  /* Form element colors */
  --rpt-input-bg: #ffffff;
  --rpt-input-border-color: #e2e8f0;
  --rpt-input-focus-border-color: #93c5fd;
  --rpt-input-placeholder-color: #94a3b8;
  
  /* Button colors */
  --rpt-btn-primary-bg: #3b82f6;
  --rpt-btn-primary-text: #ffffff;
  --rpt-btn-primary-hover-bg: #2563eb;
  --rpt-btn-secondary-bg: #f1f5f9;
  --rpt-btn-secondary-text: #1e293b;
  --rpt-btn-secondary-hover-bg: #e2e8f0;
  --rpt-btn-danger-bg: #ef4444;
  --rpt-btn-danger-text: #ffffff;
  --rpt-btn-danger-hover-bg: #dc2626;
  
  /* Status colors */
  --rpt-status-success-bg: #dcfce7;
  --rpt-status-success-text: #14532d;
  --rpt-status-warning-bg: #fef3c7;
  --rpt-status-warning-text: #78350f;
  --rpt-status-danger-bg: #fee2e2;
  --rpt-status-danger-text: #7f1d1d;
  --rpt-status-info-bg: #dbeafe;
  --rpt-status-info-text: #1e3a8a;
  --rpt-status-neutral-bg: #f3f4f6;
  --rpt-status-neutral-text: #374151;
  
  /* Measurements */
  --rpt-border-radius: 0.5rem;
  --rpt-border-width: 1px;
  --rpt-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  
  /* Transitions */
  --rpt-transition-duration: 0.2s;

  /* Scrollbar variables - Updated for better control */
  --rpt-scrollbar-width: 6px;
  --rpt-scrollbar-hover-width: 12px;
  --rpt-scrollbar-bg: rgba(0, 0, 0, 0.05);
  --rpt-scrollbar-thumb-color: rgba(0, 0, 0, 0.15);
  --rpt-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.3);
  --rpt-scrollbar-transition: width 0.2s ease, background-color 0.2s ease;
}

/* New theme container class to properly cascade theme styles */
.rpt-theme-container {
  width: 100%;
  height: 100%;
}

/* Dark theme variables */
.rpt-theme-dark, [data-theme="dark"] {
  /* Colors */
  --rpt-primary: #3b82f6;
  --rpt-primary-light: #2563eb;
  --rpt-primary-dark: #1d4ed8;
  --rpt-success: #10b981;
  --rpt-warning: #f59e0b;
  --rpt-danger: #ef4444;
  --rpt-info: #3b82f6;
  
  /* Background colors */
  --rpt-bg-color: #1e293b;
  --rpt-toolbar-bg: #1e293b;
  --rpt-header-bg: #0f172a;
  --rpt-footer-bg: #0f172a;
  --rpt-row-bg: #1e293b;
  --rpt-row-bg-alt: #1a2234;
  --rpt-row-hover-bg: #334155;
  --rpt-row-selected-bg: #1e3a8a;
  --rpt-row-updated-bg: rgba(59, 130, 246, 0.15);
  
  /* Text colors */
  --rpt-text-color: #e2e8f0;
  --rpt-title-color: #f8fafc;
  --rpt-description-color: #94a3b8;
  --rpt-header-text-color: #cbd5e1;
  --rpt-muted-text: #94a3b8;
  
  /* Border colors */
  --rpt-border-color: #334155;
  --rpt-border-hover-color: #475569;
  --rpt-focus-color: rgba(59, 130, 246, 0.5);
  --rpt-focus-shadow: rgba(59, 130, 246, 0.25);
  
  /* Form element colors */
  --rpt-input-bg: #1e293b;
  --rpt-input-border-color: #334155;
  --rpt-input-focus-border-color: #2563eb;
  --rpt-input-placeholder-color: #64748b;
  
  /* Button colors */
  --rpt-btn-primary-bg: #3b82f6;
  --rpt-btn-primary-text: #ffffff;
  --rpt-btn-primary-hover-bg: #2563eb;
  --rpt-btn-secondary-bg: #334155;
  --rpt-btn-secondary-text: #f1f5f9;
  --rpt-btn-secondary-hover-bg: #475569;
  --rpt-btn-danger-bg: #ef4444;
  --rpt-btn-danger-text: #ffffff;
  --rpt-btn-danger-hover-bg: #dc2626;
  
  /* Status colors */
  --rpt-status-success-bg: rgba(16, 185, 129, 0.2);
  --rpt-status-success-text: #a7f3d0;
  --rpt-status-warning-bg: rgba(245, 158, 11, 0.2);
  --rpt-status-warning-text: #fde68a;
  --rpt-status-danger-bg: rgba(239, 68, 68, 0.2);
  --rpt-status-danger-text: #fca5a5;
  --rpt-status-info-bg: rgba(59, 130, 246, 0.2);
  --rpt-status-info-text: #93c5fd;
  --rpt-status-neutral-bg: rgba(243, 244, 246, 0.1);
  --rpt-status-neutral-text: #e5e7eb;
  
  /* Measurements */
  --rpt-border-radius: 0.5rem;
  --rpt-border-width: 1px;
  --rpt-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  
  /* Transitions */
  --rpt-transition-duration: 0.2s;

  /* Scrollbar variables - Updated for better control */
  --rpt-scrollbar-thumb-color: rgba(255, 255, 255, 0.15);
  --rpt-scrollbar-thumb-hover-color: rgba(255, 255, 255, 0.3);
}

/* Theme variants */

/* Light mode variants */
.rpt-theme-light {
  /* Default light theme already defined in :root */
}

/* Primary variant - Light mode */
.rpt-theme-container.rpt-variant-primary {
  --rpt-header-bg: #eff6ff;
  --rpt-footer-bg: #eff6ff;
  --rpt-toolbar-bg: #eff6ff;
  --rpt-border-color: #bfdbfe;
  --rpt-border-hover-color: #93c5fd;
  --rpt-row-hover-bg: #dbeafe;
  --rpt-row-selected-bg: #bfdbfe;
}

/* Neutral variant - Light mode */
.rpt-theme-container.rpt-variant-neutral {
  --rpt-header-bg: #f1f5f9;
  --rpt-footer-bg: #f1f5f9;
  --rpt-toolbar-bg: #f1f5f9;
  --rpt-border-color: #cbd5e1;
  --rpt-border-hover-color: #94a3b8;
  --rpt-row-hover-bg: #e2e8f0;
  --rpt-row-selected-bg: #cbd5e1;
}

/* Custom variant - Light mode */
.rpt-theme-container.rpt-variant-custom {
  /* Custom variables can be defined by users */
}

/* Primary variant - Dark mode */
.rpt-theme-dark.rpt-variant-primary,
.rpt-theme-container.rpt-theme-dark.rpt-variant-primary {
  --rpt-header-bg: #1e3a8a;
  --rpt-footer-bg: #1e3a8a;
  --rpt-toolbar-bg: #1e3a8a;
  --rpt-border-color: #2563eb;
  --rpt-border-hover-color: #3b82f6;
  --rpt-row-hover-bg: #1e40af;
  --rpt-row-selected-bg: #1d4ed8;
}

/* Neutral variant - Dark mode */
.rpt-theme-dark.rpt-variant-neutral,
.rpt-theme-container.rpt-theme-dark.rpt-variant-neutral {
  --rpt-header-bg: #1f2937;
  --rpt-footer-bg: #1f2937;
  --rpt-toolbar-bg: #1f2937;
  --rpt-border-color: #4b5563;
  --rpt-border-hover-color: #6b7280;
  --rpt-row-hover-bg: #374151;
  --rpt-row-selected-bg: #4b5563;
}

/* Custom variant - Dark mode */
.rpt-theme-dark.rpt-variant-custom,
.rpt-theme-container.rpt-theme-dark.rpt-variant-custom {
  /* Custom variables can be defined by users */
}

/* Table style variants */
/* Default variant */
.rpt-table-variant-default {
  /* Default styles */
}

/* Modern variant */
.rpt-theme-container.rpt-table-variant-modern,
.rpt-table-variant-modern {
  --rpt-border-radius: 0.75rem;
  --rpt-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.rpt-theme-light .rpt-table-variant-modern,
.rpt-theme-container.rpt-theme-light.rpt-table-variant-modern {
  --rpt-header-bg: #ffffff;
  --rpt-border-color: #f1f5f9;
}

.rpt-theme-dark .rpt-table-variant-modern,
.rpt-theme-container.rpt-theme-dark.rpt-table-variant-modern {
  --rpt-header-bg: #111827;
  --rpt-border-color: #1f2937;
}

/* Minimal variant */
.rpt-theme-container.rpt-table-variant-minimal,
.rpt-table-variant-minimal {
  --rpt-border-radius: 0.25rem;
  --rpt-border-color: transparent;
}

.rpt-theme-light .rpt-table-variant-minimal,
.rpt-theme-container.rpt-theme-light.rpt-table-variant-minimal {
  --rpt-header-bg: transparent;
  --rpt-row-bg: transparent;
  --rpt-toolbar-bg: transparent;
  --rpt-footer-bg: transparent;
  --rpt-border-color: #f1f5f9;
}

.rpt-theme-dark .rpt-table-variant-minimal,
.rpt-theme-container.rpt-theme-dark.rpt-table-variant-minimal {
  --rpt-header-bg: transparent;
  --rpt-row-bg: transparent;
  --rpt-toolbar-bg: transparent;
  --rpt-footer-bg: transparent;
  --rpt-border-color: #2d3748;
}

/* Bordered variant */
.rpt-theme-container.rpt-table-variant-bordered,
.rpt-table-variant-bordered {
  --rpt-border-width: 1px;
}

.rpt-theme-light .rpt-table-variant-bordered,
.rpt-theme-container.rpt-theme-light.rpt-table-variant-bordered {
  --rpt-border-color: #e2e8f0;
}

.rpt-theme-dark .rpt-table-variant-bordered,
.rpt-theme-container.rpt-theme-dark.rpt-table-variant-bordered {
  --rpt-border-color: #334155;
}

/* Border radius variants */
.rpt-theme-container.rpt-radius-none,
.rpt-radius-none {
  --rpt-border-radius: 0;
}

.rpt-theme-container.rpt-radius-sm,
.rpt-radius-sm {
  --rpt-border-radius: 0.25rem;
}

.rpt-theme-container.rpt-radius-md,
.rpt-radius-md {
  --rpt-border-radius: 0.5rem;
}

.rpt-theme-container.rpt-radius-lg,
.rpt-radius-lg {
  --rpt-border-radius: 0.75rem;
}

.rpt-theme-container.rpt-radius-full,
.rpt-radius-full {
  --rpt-border-radius: 9999px;
}

/* System preference based theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not(.rpt-theme-light) {
    --rpt-bg-color: #1e293b;
    --rpt-toolbar-bg: #1e293b;
    --rpt-header-bg: #0f172a;
    --rpt-footer-bg: #0f172a;
    --rpt-row-bg: #1e293b;
    --rpt-row-bg-alt: #1a2234;
    --rpt-row-hover-bg: #334155;
    --rpt-row-selected-bg: #1e3a8a;
    --rpt-row-updated-bg: rgba(59, 130, 246, 0.15);
    
    --rpt-text-color: #e2e8f0;
    --rpt-title-color: #f8fafc;
    --rpt-description-color: #94a3b8;
    --rpt-header-text-color: #cbd5e1;
    --rpt-muted-text: #94a3b8;
    
    --rpt-border-color: #334155;
    --rpt-border-hover-color: #475569;
    
    --rpt-input-bg: #1e293b;
    --rpt-input-border-color: #334155;
    --rpt-input-placeholder-color: #64748b;
    
    --rpt-btn-secondary-bg: #334155;
    --rpt-btn-secondary-text: #f1f5f9;
    --rpt-btn-secondary-hover-bg: #475569;
    
    --rpt-status-success-bg: rgba(16, 185, 129, 0.2);
    --rpt-status-success-text: #a7f3d0;
    --rpt-status-warning-bg: rgba(245, 158, 11, 0.2);
    --rpt-status-warning-text: #fde68a;
    --rpt-status-danger-bg: rgba(239, 68, 68, 0.2);
    --rpt-status-danger-text: #fca5a5;
    --rpt-status-info-bg: rgba(59, 130, 246, 0.2);
    --rpt-status-info-text: #93c5fd;
    --rpt-status-neutral-bg: rgba(243, 244, 246, 0.1);
    --rpt-status-neutral-text: #e5e7eb;
  }
}

/* High contrast mode overrides */
@media (forced-colors: active) {
  :root {
    --rpt-border-color: CanvasText;
    --rpt-border-hover-color: Highlight;
    --rpt-primary: Highlight;
    --rpt-focus-color: Highlight;
  }
}

/* Adding global scrollbar styling */
.rpt-scrollable {
  scrollbar-width: thin;
  scrollbar-color: var(--rpt-scrollbar-thumb-color) var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-scrollable:hover {
  scrollbar-width: auto;
  scrollbar-color: var(--rpt-scrollbar-thumb-hover-color) var(--rpt-scrollbar-bg);
}

.rpt-scrollable::-webkit-scrollbar {
  width: var(--rpt-scrollbar-width);
  height: var(--rpt-scrollbar-width);
  background-color: var(--rpt-scrollbar-bg);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-scrollable:hover::-webkit-scrollbar {
  width: var(--rpt-scrollbar-hover-width);
  height: var(--rpt-scrollbar-hover-width);
}

.rpt-scrollable::-webkit-scrollbar-track {
  background: var(--rpt-scrollbar-bg);
  border-radius: 10px;
}

.rpt-scrollable::-webkit-scrollbar-thumb {
  background: var(--rpt-scrollbar-thumb-color);
  border-radius: 10px;
  transition: var(--rpt-scrollbar-transition);
}

.rpt-scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--rpt-scrollbar-thumb-hover-color);
}

/* toolbar.css */
/**
 * React Power Table - Toolbar Styles
 * Styling for table toolbar with search, filters, and actions
 */

/* Common variables that can be reused across elements */
:root {
  --rpt-toolbar-btn-height: 36px;
  --rpt-toolbar-btn-padding: 0.5rem 0.75rem;
  --rpt-toolbar-icon-size: 16px;
  --rpt-toolbar-gap: 0.75rem;
  --rpt-toolbar-badge-size: 18px;
}

/* Toolbar container */
.rpt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding:  1.5rem;
  border-bottom: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-toolbar-bg);
  border-top-left-radius: var(--rpt-border-radius);
  border-top-right-radius: var(--rpt-border-radius);
  gap: 0.75rem;
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease;
  position: relative; /* Add position relative */
  z-index: 10; /* Lower z-index than dropdowns */
}

/* Left section with title and description */
.rpt-toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-right: auto;
  max-width: 60%;
}

/* Title styling */
.rpt-toolbar-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--rpt-title-color);
  margin: 0;
  line-height: 1.4;
  transition: color var(--rpt-transition-duration) ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Description styling */
.rpt-toolbar-description {
  font-size: 0.875rem;
  color: var(--rpt-description-color);
  margin: 0;
  transition: color var(--rpt-transition-duration) ease;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Right section with actions */
.rpt-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--rpt-toolbar-gap);
  flex-wrap: wrap;
}

/* Search input container */
.rpt-toolbar-search {
  position: relative;
  max-width: 300px;
  flex-grow: 1;
}

/* Search input */
.rpt-toolbar-search-input {
  width: 100%;
  height: var(--rpt-toolbar-btn-height);
  padding-left: 2rem;
  padding-right: 2rem;
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-input-bg);
  color: var(--rpt-input-text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--rpt-transition-duration) ease,
              background-color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-toolbar-search-input:focus {
  border-color: var(--rpt-primary);
  box-shadow: 0 0 0 1px var(--rpt-primary-light);
}

/* Search icon */
.rpt-toolbar-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--rpt-icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--rpt-transition-duration) ease;
}

/* Clear search button */
.rpt-toolbar-search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  color: var(--rpt-muted-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transition: color var(--rpt-transition-duration) ease,
              background-color var(--rpt-transition-duration) ease;
}

.rpt-toolbar-search-clear:hover {
  color: var(--rpt-danger);
  background-color: var(--rpt-danger-bg);
}

/* Toolbar section with action buttons */
.rpt-toolbar-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Basic button styling */
.rpt-toolbar-btn {
  height: var(--rpt-toolbar-btn-height);
  padding: var(--rpt-toolbar-btn-padding);
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-btn-bg);
  color: var(--rpt-btn-text);
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: border-color var(--rpt-transition-duration) ease,
              background-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-toolbar-btn:hover {
  border-color: var(--rpt-border-hover-color);
  background-color: var(--rpt-row-hover-bg);
}

.rpt-toolbar-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

.rpt-toolbar-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Filter button */
.rpt-filter-dropdown {
  position: relative;
}

.rpt-filter-btn {
  composes: rpt-toolbar-btn;
}

.rpt-filter-active {
  border-color: var(--rpt-primary);
  background-color: var(--rpt-primary);
  color: #ffffff;
}

.rpt-filter-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--rpt-transition-duration) ease;
}

/* Badge styling for filters and columns */
.rpt-filter-badge,
.rpt-column-toggle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--rpt-danger);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  height: 18px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 9px;
  margin-left: 0.25rem;
}

/* Column visibility toggle */
.rpt-column-visibility {
  position: relative;
  z-index: 50;
}

.rpt-column-toggle-btn {
  composes: rpt-toolbar-btn;
}

.rpt-column-toggle-btn--active {
  border-color: var(--rpt-primary);
  background-color: var(--rpt-primary);
  color: #ffffff;
}

.rpt-column-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

/* Common dropdown styles */
.rpt-column-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 240px;
  background-color: var(--rpt-bg-color);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 1000; /* Increase z-index to be above everything */
  overflow-y: auto;
  max-height: 400px;
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease;
  animation: rpt-fade-in 0.2s ease-out;
}

/* Fix for column dropdown near right edge of screen */
.rpt-column-visibility .rpt-column-dropdown {
  right: 0;
  left: auto;
  z-index: 1001; /* Even higher for column visibility */
}

/* Special case for export dropdown - position from left */
.rpt-export-dropdown .rpt-column-dropdown {
  left: 0;
  right: auto;
  z-index: 1001; /* Higher z-index for export dropdown */
}

.rpt-settings-dropdown .rpt-column-dropdown {
  right: 0;
  left: auto;
  z-index: 1001; /* Higher z-index for settings dropdown */
}

.rpt-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-bottom: 1px solid var(--rpt-border-color);
  position: sticky;
  top: 0;
  background-color: var(--rpt-header-bg);
  z-index: 1;
}

.rpt-column-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  color: var(--rpt-title-color);
}

.rpt-column-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rpt-column-action-btn {
  background: none;
  border: none;
  color: var(--rpt-muted-color);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.rpt-column-action-btn:hover {
  color: var(--rpt-primary);
  background-color: var(--rpt-primary-bg);
}

.rpt-column-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
}

.rpt-column-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  transition: background-color var(--rpt-transition-duration) ease;
  border-radius: var(--rpt-border-radius);
}

.rpt-column-item:hover {
  background-color: var(--rpt-row-hover-bg);
}

.rpt-column-checkbox {
  margin-right: 0.5rem;
}

.rpt-column-label {
  font-size: 0.875rem;
  color: var(--rpt-text-color);
}

/* Dropdown item style */
.rpt-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  font-size: 0.875rem;
  color: var(--rpt-text-color);
  cursor: pointer;
  border-radius: var(--rpt-border-radius);
  transition: background-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease;
}

.rpt-dropdown-item:hover {
  background-color: var(--rpt-row-hover-bg);
  color: var(--rpt-text-hover-color);
}

/* Export button and dropdown positioning */
.rpt-export-dropdown {
  position: relative;
}

.rpt-export-btn {
  composes: rpt-toolbar-btn;
}

.rpt-export-icon {
  width: 16px;
  height: 16px;
}

/* Fix export dropdown position */
.rpt-export-dropdown .rpt-column-dropdown {
  right: 0; /* Position from right side instead of left */
  left: auto;
  width: 180px; /* More appropriate width for export options */
}

/* Special case for export dropdown near left edge of screen */
@media (max-width: 640px) {
  .rpt-export-dropdown .rpt-column-dropdown {
    left: 0;
    right: auto;
  }
}

/* Refresh button */
.rpt-refresh-btn {
  height: 36px;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--rpt-icon-color);
  background-color: var(--rpt-btn-bg);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  cursor: pointer;
  transition: color var(--rpt-transition-duration) ease,
              background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease,
              transform var(--rpt-transition-duration) ease;
}

.rpt-refresh-btn:hover {
  color: var(--rpt-primary);
  border-color: var(--rpt-primary-light);
  background-color: var(--rpt-primary-bg);
}

.rpt-refresh-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--rpt-focus-shadow);
}

.rpt-refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rpt-refresh-icon {
  width: 16px;
  height: 16px;
}

.rpt-refresh-spin {
  animation: rpt-spin 1s linear infinite;
}

@keyframes rpt-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Add button styles */
.rpt-add-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: var(--rpt-border-radius);
  background-color: var(--rpt-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-add-button:hover {
  background-color: var(--rpt-primary-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rpt-add-button-icon {
  font-size: 1rem;
  line-height: 1;
  font-weight: bold;
}

/* Selection bar styling - improved positioning */
.rpt-toolbar-with-selection {
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 0.75rem;
}

.rpt-toolbar-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--rpt-selection-bg, rgba(59, 130, 246, 0.1));
  padding: 0.75rem;
  border-radius: var(--rpt-border-radius);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 40;
}

/* New batch actions floating bar */
.rpt-batch-actions-bar {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--rpt-bg-color);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 1000;
  min-width: 300px;
  max-width: 90%;
  animation: rpt-slide-up 0.3s ease-out;
}

@keyframes rpt-slide-up {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.rpt-batch-actions-text {
  font-weight: 500;
  color: var(--rpt-text-color);
}

.rpt-batch-actions-buttons {
  display: flex;
  gap: 0.5rem;
}

.rpt-batch-action-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--rpt-border-radius);
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease;
}

.rpt-batch-action-delete {
  background-color: var(--rpt-danger-bg);
  color: var(--rpt-danger);
  border: none;
}

.rpt-batch-action-delete:hover {
  background-color: var(--rpt-danger);
  color: #ffffff;
}

.rpt-batch-action-cancel {
  background: none;
  border: 1px solid var(--rpt-border-color);
  color: var(--rpt-text-color);
}

.rpt-batch-action-cancel:hover {
  background-color: var(--rpt-row-hover-bg);
}

/* Filter panel */
.rpt-filter-panel {
  position: absolute;
  width: 100%;
  top: calc(100% + 5px);
  left: 0;
  padding: 1rem;
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-input-bg);
  animation: rpt-slide-down 0.3s ease-out;
  z-index: 100;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.rpt-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.rpt-filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  gap: 0.5rem;
}

/* Enhanced Advanced Filter Panel */
.rpt-advanced-filter-panel {
  width: 100%;
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  background-color: var(--rpt-bg-color);
  overflow: hidden;
  margin-top: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow var(--rpt-transition-duration) ease;
  position: relative;
  z-index: 30; /* Lower than dropdowns but higher than table content */
}

/* Advanced Filter Panel scrollbar improvements */
.rpt-advanced-filter-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--rpt-scrollbar-thumb-color) var(--rpt-scrollbar-bg);
}

.rpt-advanced-filter-panel:hover {
  scrollbar-width: auto;
  scrollbar-color: var(--rpt-scrollbar-thumb-hover-color) var(--rpt-scrollbar-bg);
}

.rpt-advanced-filter-panel::-webkit-scrollbar {
  width: var(--rpt-scrollbar-width);
  height: var(--rpt-scrollbar-width);
  transition: var(--rpt-scrollbar-transition);
}

.rpt-advanced-filter-panel:hover::-webkit-scrollbar {
  width: var(--rpt-scrollbar-hover-width);
  height: var(--rpt-scrollbar-hover-width);
}

.rpt-advanced-filter-panel:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.rpt-filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: var(--rpt-header-bg);
  border-bottom: 1px solid var(--rpt-border-color);
  cursor: pointer;
  user-select: none;
}

.rpt-filter-panel-header:hover {
  background-color: var(--rpt-row-hover-bg);
}

.rpt-filter-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--rpt-text-color);
}

.rpt-filter-panel-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rpt-chevron {
  transition: transform var(--rpt-transition-duration) ease;
}

.rpt-chevron-up {
  transform: rotate(180deg);
}

.rpt-filter-panel-content {
  padding: 1rem;
  animation: rpt-slide-down 0.3s ease-out;
}

.rpt-filter-search {
  position: relative;
  margin-bottom: 1rem;
}

.rpt-filter-search-input {
  width: 100%;
  height: 36px;
  padding: 0 0.75rem 0 2.25rem;
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-input-bg);
  color: var(--rpt-input-text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-filter-search-input:focus {
  border-color: var(--rpt-primary);
  box-shadow: 0 0 0 1px var(--rpt-primary-light);
}

.rpt-filter-search .rpt-filter-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rpt-text-secondary);
  pointer-events: none;
}

.rpt-filter-presets {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: var(--rpt-row-hover-bg);
  border-radius: var(--rpt-border-radius);
}

.rpt-presets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rpt-preset-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  position: relative;
}

.rpt-preset-btn {
  padding: 0.25rem 0.5rem;
  background-color: var(--rpt-bg-color);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  font-size: 0.75rem;
  color: var (--rpt-text-color);
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease;
}

.rpt-preset-btn:hover {
  border-color: var(--rpt-primary-light);
  background-color: var(--rpt-primary-bg);
}

.rpt-preset-active {
  background-color: var(--rpt-primary);
  color: white;
  border-color: var(--rpt-primary);
}

.rpt-preset-delete {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--rpt-muted-color);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  font-weight: bold;
  transition: color var(--rpt-transition-duration) ease,
              background-color var(--rpt-transition-duration) ease;
}

.rpt-preset-delete:hover {
  color: var(--rpt-danger);
  background-color: var(--rpt-danger-bg);
}

.rpt-preset-save {
  display: flex;
  gap: 0.5rem;
}

.rpt-preset-name-input {
  flex: 1;
  height: 30px;
  padding: 0 0.5rem;
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  font-size: 0.75rem;
  background-color: var(--rpt-input-bg);
  color: var(--rpt-input-text);
}

.rpt-preset-save-btn {
  padding: 0 0.5rem;
  height: 30px;
  background-color: var(--rpt-primary);
  border: none;
  border-radius: var(--rpt-border-radius);
  color: white;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              opacity var(--rpt-transition-duration) ease;
}

.rpt-preset-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rpt-filters-main {
  margin-bottom: 1rem;
}

.rpt-filters-empty {
  padding: 1rem;
  text-align: center;
  color: var(--rpt-muted-color);
  font-size: 0.875rem;
  background-color: var(--rpt-row-hover-bg);
  border-radius: var(--rpt-border-radius);
}

.rpt-filter-groups {
  margin-top: 1.5rem;
}

.rpt-filter-group {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  background-color: var(--rpt-row-hover-bg);
}

.rpt-filter-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.rpt-group-operator-select {
  padding: 0.25rem 0.5rem;
  border-radius: var(--rpt-border-radius);
  border: 1px solid var(--rpt-border-color);
  background-color: var(--rpt-input-bg);
  font-size: 0.75rem;
}

.rpt-group-remove {
  padding: 0.25rem 0.5rem;
  border: none;
  background-color: var(--rpt-danger-bg);
  color: var(--rpt-danger);
  border-radius: var(--rpt-border-radius);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease;
}

.rpt-group-remove:hover {
  background-color: var(--rpt-danger);
  color: white;
}

.rpt-filter-group-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.rpt-add-group-btn {
  width: 100%;
  padding: 0.5rem;
  background-color: var(--rpt-bg-color);
  border: 1px dashed var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  color: var(--rpt-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              border-color var(--rpt-transition-duration) ease;
}

.rpt-add-group-btn:hover {
  background-color: var(--rpt-primary-bg);
  border-color: var(--rpt-primary-light);
}

.rpt-clear-filters-btn {
  padding: 0.5rem 1rem;
  background-color: var(--rpt-danger-bg);
  border: none;
  border-radius: var(--rpt-border-radius);
  color: var(--rpt-danger);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color var(--rpt-transition-duration) ease,
              color var(--rpt-transition-duration) ease;
}

.rpt-clear-filters-btn:hover {
  background-color: var(--rpt-danger);
  color: white;
}

/* Individual filter styling */
.rpt-filter {
  margin-bottom: 0.75rem;
}

.rpt-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rpt-text-color);
  margin-bottom: 0.25rem;
}

.rpt-filter-control {
  position: relative;
}

.rpt-filter-input {
  width: 100%;
  height: 30px;
  padding: 0 0.5rem;
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  background-color: var(--rpt-input-bg);
  color: var(--rpt-input-text);
  font-size: 0.75rem;
  transition: border-color var(--rpt-transition-duration) ease,
              box-shadow var(--rpt-transition-duration) ease;
}

.rpt-filter-input:focus {
  border-color: var(--rpt-primary);
  outline: none;
  box-shadow: 0 0 0 1px var(--rpt-primary-light);
}

.rpt-filter-select {
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 16px 12px;
  appearance: none;
}

.rpt-filter-number-range,
.rpt-filter-date-range {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.rpt-filter-range-separator {
  color: var(--rpt-text-color);
  line-height: 1;
}

.rpt-filter-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--rpt-muted-color);
  font-size: 0.875rem;
  font-weight: bold;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: color var(--rpt-transition-duration) ease,
              background-color var(--rpt-transition-duration) ease;
}

.rpt-filter-clear:hover {
  color: var(--rpt-danger);
  background-color: var(--rpt-danger-bg);
}

/* Advanced Filter Dropdown Panels */
.rpt-advanced-filter-preset-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 280px;
  background-color: var(--rpt-bg-color);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 100;
  margin-top: 0.5rem;
  animation: rpt-fade-in 0.2s ease-out;
  overflow: hidden;
}

.rpt-advanced-filter-presets {
  position: relative;
}

/* Additional dropdown styles for any new dropdown in the toolbar */
.rpt-toolbar-dropdown {
  position: relative;
}

.rpt-toolbar-dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background-color: var(--rpt-bg-color);
  border: 1px solid var(--rpt-border-color);
  border-radius: var(--rpt-border-radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 100;
  margin-top: 0.5rem;
  animation: rpt-fade-in 0.2s ease-out;
  overflow: hidden;
}

/* Toolbar size variations */
.rpt-toolbar--sm {
  padding: 0.625rem 0.75rem;
  gap: 0.5rem;
}

.rpt-toolbar--sm .rpt-toolbar-title {
  font-size: 1rem;
}

.rpt-toolbar--lg {
  padding: 1.25rem 1.5rem;
}

/* Toolbar visual variations */
.rpt-toolbar--bg-gray {
  background-color: var(--rpt-header-bg);
}

.rpt-toolbar--borderless {
  border-bottom: none;
}

.rpt-toolbar--shadow {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-bottom: none;
}

/* Animations */
@keyframes rpt-slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rpt-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .rpt-toolbar {
    padding: 0.75rem;
  }

  .rpt-toolbar-left {
    max-width: 100%;
  }
  
  .rpt-toolbar-search {
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .rpt-toolbar {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .rpt-toolbar-left {
    max-width: 100%;
    width: 100%;
  }
  
  .rpt-toolbar-search {
    max-width: 100%;
    width: 100%;
  }
  
  /* Fix toolbar buttons on mobile */
  .rpt-toolbar-btn, .rpt-filter-btn, .rpt-export-btn {
    height: 38px; /* Larger touch target */
    font-size: 0.75rem;
  }
  
  .rpt-toolbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .rpt-toolbar-section {
    flex-wrap: wrap;
  }
  
  /* Ensure dropdowns are positioned correctly on mobile */
  .rpt-column-dropdown {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    position: fixed;
    bottom: 0;
    top: auto;
    border-radius: var(--rpt-border-radius) var(--rpt-border-radius) 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    max-height: 80vh;
    margin: 0;
    z-index: 1000;
  }
  
  .rpt-toolbar-title {
    font-size: 1rem;
    line-height: 1.3;
  }
  
  .rpt-toolbar-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
  }
  
  /* Fix spacing between buttons on mobile */
  .rpt-column-list {
    max-height: 60vh;
    overflow-y: auto;
  }
}

/* Tablet optimization */
@media (min-width: 769px) and (max-width: 1024px) {
  .rpt-toolbar {
    padding: 1rem;
  }
  
  .rpt-toolbar-right {
    flex-wrap: wrap;
  }
  
  /* Position dropdowns better on tablets */
  .rpt-column-dropdown {
    max-width: 400px;
    right: 0;
    left: auto;
  }
}

/* Fix for landscape mobile orientation */
@media (max-width: 896px) and (orientation: landscape) {
  .rpt-column-dropdown {
    position: absolute;
    max-height: 70vh;
    max-width: 90vw;
    width: 300px;
    left: auto;
    right: 0;
    bottom: auto;
    top: 100%;
    border-radius: var(--rpt-border-radius);
  }
  
  .rpt-column-list {
    max-height: 50vh;
  }
}

/* Dark mode overrides */
.dark-theme .rpt-toolbar-btn,
.dark-theme .rpt-filter-input,
.dark-theme .rpt-preset-btn {
  border-color: var(--rpt-border-color-dark);
  background-color: var(--rpt-btn-bg-dark);
  color: var(--rpt-btn-text-dark);
}

.dark-theme .rpt-filter-panel,
.dark-theme .rpt-advanced-filter-panel {
  border-color: var(--rpt-border-color-dark);
  background-color: var(--rpt-bg-color-dark);
}

.dark-theme .rpt-filter-panel-header {
  background-color: var(--rpt-header-bg-dark);
  border-color: var(--rpt-border-color-dark);
}

