/* Funky canvas bundle - generated Sun Dec 21 22:02:46 2025 */
/* css/fonts.css */
/* ==========================================================================
   Local Font Definitions - Inter & JetBrains Mono
   ========================================================================== */

/* Inter - UI Font
   Weights: 300 (Light), 400 (Regular), 500 (Medium), 600 (SemiBold), 700 (Bold)
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/inter/Inter-Light.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter/Inter-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
}

/* JetBrains Mono - Monospace Font for Tabular Data
   Weights: 400 (Regular), 500 (Medium), 600 (SemiBold)
   ========================================================================== */

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/JetBrainsMono-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/JetBrainsMono-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2') format('woff2');
}

/* css/datatables-funky.css */
/* ============================================
   Funky DataTables Styling - Phase 2A Professional Redesign
   Bloomberg/Reuters-style enterprise tables
   Theme-aware with professional information density
   ============================================ */

/* ============================================
   DATATABLE THEME VARIABLES
   Using --pro-* variables from custom.css
   ============================================ */
:root {
  /* DataTable-specific variables that map to theme */
  --dt-bg-primary: var(--pro-bg-primary, #0d1117);
  --dt-bg-secondary: var(--pro-bg-secondary, #161b22);
  --dt-bg-header: var(--pro-bg-tertiary, #21262d);
  --dt-bg-hover: var(--pro-bg-elevated, #2d333b);
  --dt-border-color: var(--pro-border-color, #30363d);
  --dt-text-primary: var(--pro-text-primary, #e6edf3);
  --dt-text-secondary: var(--pro-text-secondary, #8b949e);
  --dt-accent: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  
  /* Phase 2A: Professional row striping */
  --dt-row-even: var(--pro-bg-primary, #0d1117);
  --dt-row-odd: var(--pro-bg-secondary, #161b22);
  --dt-row-hover: var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.08));
  --dt-row-selected: var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.15));
  
  /* Phase 2A: New professional table variables */
  --dt-header-bg: var(--pro-bg-tertiary, #1c2128);
  --dt-header-text: var(--pro-text-secondary, #8b949e);
  --dt-header-border: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  --dt-cell-padding-y: 10px;
  --dt-cell-padding-x: 12px;
  --dt-font-size: 13px;
  --dt-header-font-size: 11px;
  --dt-border-width: 1px;
}

/* Light theme overrides for DataTables */
[data-theme="light"] {
  --dt-bg-primary: var(--pro-bg-primary);
  --dt-bg-secondary: var(--pro-bg-secondary);
  --dt-bg-header: var(--pro-bg-tertiary);
  --dt-bg-hover: var(--pro-bg-tertiary);
  --dt-border-color: var(--pro-border-color);
  --dt-text-primary: var(--pro-text-primary);
  --dt-text-secondary: var(--pro-text-secondary);
  --dt-accent: var(--user-accent, var(--pro-accent-primary));
  
  /* Light theme row colors */
  --dt-row-even: var(--pro-bg-elevated);
  --dt-row-odd: var(--pro-bg-secondary);
  --dt-row-hover: var(--pro-accent-primary-muted);
  --dt-row-selected: var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.12));
  --dt-header-bg: var(--pro-bg-secondary);
  --dt-header-text: var(--pro-text-secondary);
}

/* Even Funkier theme overrides for DataTables */
[data-theme="even-funkyer"] {
  --dt-bg-primary: var(--pro-bg-primary);
  --dt-bg-secondary: var(--pro-bg-secondary);
  --dt-bg-header: var(--pro-bg-elevated);
  --dt-bg-hover: var(--pro-accent-primary-muted);
  --dt-border-color: rgba(255, 0, 255, 0.5);
  --dt-text-primary: var(--pro-text-primary);
  --dt-text-secondary: var(--pro-text-secondary);
  --dt-accent: var(--pro-accent-primary);
  
  /* Funkier row colors */
  --dt-row-even: var(--pro-bg-primary);
  --dt-row-odd: var(--pro-bg-tertiary);
  --dt-row-hover: var(--pro-accent-primary-muted);
  --dt-row-selected: rgba(255, 0, 255, 0.2);
  --dt-header-bg: var(--pro-bg-elevated);
  --dt-header-text: var(--pro-accent-primary);
  --dt-header-border: var(--pro-accent-primary);
}

/* ============================================
   HEADER ACTIONS BAR - Phase 2A Professional
   Primary responsive rules are in buttons.css
   ============================================ */

/* Note: .funky-header-actions base styles are in buttons.css */

.funky-search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.funky-search-box input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  background: var(--dt-bg-secondary);
  border: 1px solid var(--dt-border-color);
  border-radius: 4px;
  color: var(--dt-text-primary);
  font-size: 13px;
  height: var(--btn-height-md, 36px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.funky-search-box input:focus {
  outline: none;
  border-color: var(--dt-accent);
  box-shadow: 0 0 0 2px var(--user-accent-muted, rgba(47, 129, 247, 0.15));
}

.funky-search-box input::placeholder {
  color: var(--dt-text-secondary);
}

[data-theme="even-funkyer"] .funky-search-box input:focus {
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 2px var(--pro-accent-primary-muted);
}

.funky-search-box::after {
  content: '🔍';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.4;
  pointer-events: none;
}

/* Date range and filter controls */
.funky-date-filter,
.funky-client-filter,
.funky-date-range {
  min-width: 150px;
}

.funky-date-filter select,
.funky-client-filter select {
  padding: 8px 12px;
  background: var(--dt-bg-secondary);
  border: 1px solid var(--dt-border-color);
  border-radius: 4px;
  color: var(--dt-text-primary);
  font-size: 13px;
}

.funky-date-range input {
  padding: 8px 12px;
  background: var(--dt-bg-secondary);
  border: 1px solid var(--dt-border-color);
  border-radius: 4px;
  color: var(--dt-text-primary);
  font-size: 13px;
}

/* Professional Button Styling */
.btn-funky {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-funky-primary {
  background: var(--dt-accent);
  color: white;
  box-shadow: none;
}

[data-theme="even-funkyer"] .btn-funky-primary {
  background: linear-gradient(135deg, var(--pro-accent-primary), var(--pro-accent-secondary));
  box-shadow: 0 2px 8px var(--pro-accent-primary-muted);
}

.btn-funky-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--user-accent-muted, rgba(47, 129, 247, 0.3));
}

.btn-funky-secondary {
  background: var(--dt-bg-secondary);
  color: var(--dt-text-primary);
  border: 1px solid var(--dt-border-color);
}

.btn-funky-secondary:hover {
  border-color: var(--dt-accent);
  background: var(--dt-bg-hover);
}

/* Warning and Danger button variants */
.btn-funky-warning {
  background: var(--pro-accent-warning, #d29922);
  color: white;
}

.btn-funky-warning:hover {
  filter: brightness(1.1);
}

.btn-funky-danger {
  background: var(--pro-accent-danger, #f85149);
  color: white;
}

.btn-funky-danger:hover {
  filter: brightness(1.1);
}

.btn-funky-success {
  background: var(--pro-accent-success, #3fb950);
  color: white;
}

.btn-funky-success:hover {
  filter: brightness(1.1);
}

/* ============================================
   FILTER TOOLBAR - Phase 2C
   Unified filter controls above tables
   ============================================ */

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  margin-bottom: 16px;
  align-items: center;
}

.filter-toolbar.collapsed {
  padding: 8px 16px;
}

.filter-toolbar.collapsed .filter-group {
  display: none;
}

.filter-toolbar.collapsed .filter-toggle-btn {
  transform: rotate(180deg);
}

/* Filter Groups */
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pro-text-muted, #6e7681);
  white-space: nowrap;
}

.filter-divider {
  width: 1px;
  height: 24px;
  background: var(--pro-border-color, #30363d);
  margin: 0 4px;
}

/* Filter Toggle Button (mobile) */
.filter-toggle-btn {
  display: none;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 4px;
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-toggle-btn:hover {
  border-color: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  color: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
}

/* Saved Filters Dropdown */
.saved-filter-dropdown {
  position: relative;
  flex-shrink: 0;
}

.saved-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--form-control-padding, 0.375rem 0.75rem);
  height: var(--form-control-height, 38px);
  background: var(--pro-bg-tertiary, #21262d);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 4px;
  color: var(--pro-text-primary, #e6edf3);
  font-size: var(--btn-font-md, 0.8125rem);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-width: max-content;
}

.saved-filter-btn:hover {
  border-color: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
}

.saved-filter-btn.has-active {
  border-color: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.1));
}

.saved-filter-btn .filter-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-filter-btn .caret {
  font-size: 10px;
  opacity: 0.6;
  flex-shrink: 0;
}

.saved-filter-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  box-shadow: var(--pro-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.4));
  z-index: 1000;
  display: none;
}

.saved-filter-menu.show {
  display: block;
  animation: dropdownSlideIn 0.15s ease;
}

.saved-filter-menu-header {
  padding: 8px 12px;
  border-bottom: 1px solid var(--pro-border-color, #30363d);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pro-text-muted, #6e7681);
}

.saved-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.saved-filter-item:hover {
  background: var(--pro-bg-hover, #1c2128);
}

.saved-filter-item.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
}

.saved-filter-item .filter-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.saved-filter-item .filter-star {
  color: var(--pro-accent-warning, #d29922);
  font-size: 12px;
}

.saved-filter-item .filter-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--pro-text-primary, #e6edf3);
}

.saved-filter-item .filter-delete {
  opacity: 0;
  padding: 2px 6px;
  color: var(--pro-accent-danger, #f85149);
  cursor: pointer;
  transition: opacity 0.1s ease;
}

.saved-filter-item:hover .filter-delete {
  opacity: 1;
}

.saved-filter-menu-actions {
  padding: 8px 12px;
  border-top: 1px solid var(--pro-border-color, #30363d);
  display: flex;
  gap: 8px;
}

.saved-filter-menu-actions .btn-funky {
  flex: 1;
  justify-content: center;
  font-size: 12px;
  padding: 6px 10px;
}

/* Quick Status Filters */
.status-filter-group {
  display: flex;
  gap: 4px;
}

.status-filter-btn {
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid var(--pro-border-color, #30363d);
  background: transparent;
  color: var(--pro-text-secondary, #8b949e);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-filter-btn:hover {
  border-color: var(--pro-text-secondary, #8b949e);
  background: var(--pro-bg-tertiary, #21262d);
}

.status-filter-btn.active {
  background: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  border-color: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  color: white;
}

.status-filter-btn .count {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 4px;
}

/* ============================================
   BULK ACTION BAR - Phase 2C
   Appears when items are selected
   ============================================ */

.bulk-action-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--user-accent-muted, rgba(47, 129, 247, 0.15)), var(--user-accent-muted-subtle, rgba(47, 129, 247, 0.05)));
  border: 1px solid var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  border-radius: 6px;
  margin-bottom: 12px;
  animation: slideInDown 0.2s ease;
}

.bulk-action-bar.show {
  display: flex;
}

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

.bulk-action-bar .selection-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.bulk-action-bar .selection-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  color: white;
  font-weight: 600;
  font-size: 13px;
  border-radius: 14px;
}

.bulk-action-bar .selection-label {
  color: var(--pro-text-primary, #e6edf3);
  font-size: 13px;
}

.bulk-action-bar .bulk-actions {
  display: flex;
  gap: 8px;
}

.bulk-action-bar .btn-funky {
  font-size: 12px;
  padding: 6px 12px;
}

.bulk-action-bar .clear-selection {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 4px;
  color: var(--pro-text-secondary, #8b949e);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bulk-action-bar .clear-selection:hover {
  border-color: var(--pro-accent-danger, #f85149);
  color: var(--pro-accent-danger, #f85149);
}

/* Column Visibility Dropdown Enhancements */
.dt-button-collection {
  background: var(--pro-bg-secondary, #161b22) !important;
  border: 1px solid var(--pro-border-color, #30363d) !important;
  border-radius: 6px !important;
  box-shadow: var(--pro-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.4)) !important;
  padding: 8px 0 !important;
}

.dt-button-collection .dt-button {
  display: flex !important;
  align-items: center !important;
  width: 100%;
  min-height: 32px;
  padding: 8px 12px !important;
  background: transparent !important;
  border: none !important;
  color: var(--pro-text-primary, #e6edf3) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s ease;
  gap: 8px;
}

/* Text span vertical alignment */
.dt-button-collection .dt-button span {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.4 !important;
}

.dt-button-collection .dt-button:hover {
  background: var(--pro-bg-hover, #1c2128) !important;
}

.dt-button-collection .dt-button.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15)) !important;
}

.dt-button-collection .dt-button.active::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  font-size: 12px;
  line-height: 1;
  color: var(--pro-accent-success, #3fb950);
}

.dt-button-collection .dt-button-divider {
  height: 1px;
  background: var(--pro-border-color, #30363d);
  margin: 4px 0;
}

/* Column visibility quick actions */
.colvis-quick-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pro-border-color, #30363d);
  margin-bottom: 4px;
}

.colvis-quick-actions button {
  flex: 1;
  padding: 4px 8px;
  font-size: 11px;
  background: var(--pro-bg-tertiary, #21262d);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 4px;
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  transition: all 0.1s ease;
}

.colvis-quick-actions button:hover {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

/* Mobile Filter Toolbar */
@media (max-width: 768px) {
  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .filter-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-divider {
    display: none;
  }
  
  .status-filter-group {
    flex-wrap: wrap;
  }
  
  .bulk-action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  /* Saved filter button - full width on mobile */
  .saved-filter-dropdown {
    width: 100%;
  }
  
  .saved-filter-btn {
    width: 100%;
    justify-content: space-between;
  }
  
  .saved-filter-menu {
    width: 100%;
  }
  
  .bulk-action-bar .bulk-actions {
    flex-wrap: wrap;
  }
}

/* Light Theme Overrides */
[data-theme="light"] .filter-toolbar {
  background: var(--pro-bg-secondary, #f6f8fa);
  border-color: var(--pro-border-color, #d0d7de);
}

[data-theme="light"] .saved-filter-menu {
  background: var(--pro-bg-primary, #ffffff);
  border-color: var(--pro-border-color, #d0d7de);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .bulk-action-bar {
  background: linear-gradient(135deg, var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.1)), var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.02)));
}

[data-theme="light"] .dt-button-collection {
  background: var(--pro-bg-primary, #ffffff) !important;
  border-color: var(--pro-border-color, #d0d7de) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

/* Even Funkier Theme Overrides */
[data-theme="even-funkyer"] .filter-toolbar {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--funkier-neon-cyan, #00ffff);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

[data-theme="even-funkyer"] .saved-filter-btn.has-active {
  border-color: var(--funkier-neon-pink, #ff00ff);
  background: rgba(255, 0, 255, 0.1);
  box-shadow: 0 0 8px rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .status-filter-btn.active {
  background: linear-gradient(135deg, var(--pro-accent-primary), var(--pro-accent-secondary));
  border-color: transparent;
  box-shadow: 0 0 10px var(--pro-accent-primary-muted);
}

[data-theme="even-funkyer"] .bulk-action-bar {
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.15), rgba(0, 255, 255, 0.1));
  border-color: var(--funkier-neon-pink, #ff00ff);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.2);
}

[data-theme="even-funkyer"] .bulk-action-bar .selection-count {
  background: linear-gradient(135deg, var(--pro-accent-primary), var(--pro-accent-secondary));
  box-shadow: 0 0 10px var(--pro-accent-primary-muted);
}

/* DataTables Core Styling */
.dataTables_wrapper {
  color: var(--dt-text-primary);
  position: relative;
  overflow: visible !important;
  font-size: var(--dt-font-size);
}

/* Ensure button containers don't clip dropdowns */
.dataTables_wrapper .dt-buttons {
  position: relative;
  z-index: 10;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px;
}

/* Ensure dt-buttons are center aligned not bottom aligned */
.dataTables_wrapper .dt-buttons .btn-funky,
.dataTables_wrapper .dt-buttons .dt-button,
.dataTables_wrapper .dt-buttons .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  line-height: 1;
  height: var(--btn-height-md, 36px);
  padding: var(--btn-padding-md, 8px 16px);
  vertical-align: middle;
}

.dataTables_wrapper .dt-buttons .btn i,
.dataTables_wrapper .dt-buttons .btn .fas,
.dataTables_wrapper .dt-buttons .btn .far,
.dataTables_wrapper .dt-buttons .btn .bi,
.dataTables_wrapper .dt-buttons .dt-button i,
.dataTables_wrapper .dt-buttons .dt-button .fas,
.dataTables_wrapper .dt-buttons .dt-button .far {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: auto;
}

table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: var(--dt-font-size);
  line-height: 1.4;
}

/* ============================================
   PROFESSIONAL TABLE HEADERS - Phase 2A
   Bloomberg-style compact headers
   ============================================ */
table.dataTable thead th {
  background: var(--dt-header-bg);
  color: var(--dt-header-text);
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--dt-header-font-size);
  letter-spacing: 0.5px;
  padding: var(--dt-cell-padding-y) var(--dt-cell-padding-x);
  border: none;
  border-bottom: 2px solid var(--dt-header-border);
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
  vertical-align: middle;
}

/* Sort indicator styling */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
  cursor: pointer;
  position: relative;
  padding-right: 24px;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  opacity: 0.5;
}

table.dataTable thead th.sorting::after {
  content: '⇅';
  opacity: 0.3;
}

table.dataTable thead th.sorting_asc::after {
  content: '↑';
  opacity: 1;
  color: var(--dt-accent);
}

table.dataTable thead th.sorting_desc::after {
  content: '↓';
  opacity: 1;
  color: var(--dt-accent);
}

/* ============================================
   PROFESSIONAL TABLE ROWS - Phase 2A
   Alternating stripes with subtle hover
   ============================================ */
table.dataTable tbody td {
  padding: var(--dt-cell-padding-y) var(--dt-cell-padding-x);
  border-bottom: var(--dt-border-width) solid var(--dt-border-color);
  color: var(--dt-text-primary);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s ease;
}

table.dataTable tbody tr {
  transition: background-color 0.15s ease;
}

/* Alternating row striping */
table.dataTable tbody tr:nth-child(odd) {
  background: var(--dt-row-odd);
}

table.dataTable tbody tr:nth-child(even) {
  background: var(--dt-row-even);
}

/* Hover state */
table.dataTable tbody tr:hover {
  background: var(--dt-row-hover) !important;
}

/* Selected row state */
table.dataTable tbody tr.selected {
  background: var(--dt-row-selected) !important;
}

table.dataTable tbody tr.selected td {
  color: var(--dt-text-primary);
}

/* Remove old transform hover effect for professional look */
table.dataTable tbody tr:hover {
  transform: none;
}

/* Custom Cell Styling */
.client-code,
.item-code {
  font-family: 'Courier New', monospace;
  background: var(--pro-bg-secondary);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-orange);
}

.client-name,
.item-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--pro-text-primary);
}

/* ============================================
   BADGE STYLING - Phase 2A Professional
   ============================================ */
.badge-funky {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-block;
}

.badge-active {
  background: rgba(63, 185, 80, 0.15);
  color: var(--pro-accent-success, #3fb950);
  border: 1px solid rgba(63, 185, 80, 0.4);
}

.badge-inactive {
  background: rgba(248, 81, 73, 0.15);
  color: var(--pro-accent-danger, #f85149);
  border: 1px solid rgba(248, 81, 73, 0.4);
}

.badge-warning {
  background: rgba(210, 153, 34, 0.15);
  color: var(--pro-accent-warning, #d29922);
  border: 1px solid rgba(210, 153, 34, 0.4);
}

.badge-info {
  background: rgba(88, 166, 255, 0.15);
  color: var(--pro-accent-info, #58a6ff);
  border: 1px solid rgba(88, 166, 255, 0.4);
}

/* ============================================
   ACTION BUTTONS - Phase 2A Professional
   ============================================ */
.action-buttons {
  display: flex;
  gap: 4px;
}

.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  font-size: 14px;
}

/* Focus states for accessibility */
.btn-icon:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.4));
}

.btn-icon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.4));
}

/* Touch target sizing for mobile */
@media (pointer: coarse) {
  .btn-icon {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
}

/* Icon rotation on hover for refresh/sync buttons */
.btn-icon .fa-sync-alt:hover,
.btn-funky .fa-sync-alt:hover,
.btn-icon:hover .fa-sync-alt,
.btn-funky:hover .fa-sync-alt {
  animation: spin-once 0.5s ease;
}

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

.btn-edit {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
}

.btn-edit:hover {
  background: rgba(139, 92, 246, 0.3);
}

.btn-delete {
  background: rgba(248, 81, 73, 0.15);
  color: var(--pro-accent-danger, #f85149);
}

.btn-delete:hover {
  background: rgba(248, 81, 73, 0.3);
}

.btn-view {
  background: rgba(88, 166, 255, 0.15);
  color: var(--pro-accent-info, #58a6ff);
}

.btn-view:hover {
  background: rgba(88, 166, 255, 0.3);
}

.btn-clone {
  background: rgba(63, 185, 80, 0.15);
  color: var(--pro-accent-success, #3fb950);
}

.btn-clone:hover {
  background: rgba(63, 185, 80, 0.3);
}

.btn-history {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-history:hover {
  background: rgba(139, 92, 246, 0.3);
}

/* ============================================
   DATATABLE CONTROLS - Phase 2A Professional
   Compact, clean control styling
   ============================================ */
.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
  color: var(--dt-text-secondary);
  font-size: var(--dt-font-size);
}

.dataTables_info {
  color: var(--dt-text-secondary);
  font-size: 12px;
  padding: 12px 0;
}

.dataTables_length {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dataTables_length label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.dataTables_length select,
.dataTables_filter input {
  background: var(--dt-bg-secondary);
  border: 1px solid var(--dt-border-color);
  color: var(--dt-text-primary);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dataTables_length select:focus,
.dataTables_filter input:focus {
  outline: none;
  border-color: var(--dt-accent);
  box-shadow: 0 0 0 2px var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.15));
}

.dataTables_filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dataTables_filter label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.dataTables_filter input {
  min-width: 200px;
}

/* Pagination - Professional compact style */
.dataTables_paginate {
  padding: 12px 0;
}

.dataTables_paginate .paginate_button {
  color: var(--dt-text-primary) !important;
  background: var(--dt-bg-secondary);
  border: 1px solid var(--dt-border-color);
  border-radius: 4px;
  padding: 6px 12px;
  margin: 0 2px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}

.dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: var(--dt-bg-hover) !important;
  border-color: var(--dt-accent) !important;
  color: var(--dt-accent) !important;
}

.dataTables_paginate .paginate_button.current {
  background: var(--dt-accent) !important;
  border-color: var(--dt-accent) !important;
  color: white !important;
  font-weight: 600;
}

.dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Remove old pagination hover effects */
.dataTables_paginate .paginate_button:hover {
  transform: none;
}

.dataTables_processing {
  background: var(--dt-bg-secondary) !important;
  color: var(--dt-accent) !important;
  border: 1px solid var(--dt-border-color) !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  padding: 12px 20px !important;
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--dt-accent);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* ============================================
   STATS CARDS - Phase 2A Professional
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--dt-bg-secondary);
  border: 1px solid var(--dt-border-color);
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.15s ease;
}

.stat-card:hover {
  border-color: var(--dt-accent);
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dt-text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--dt-text-primary);
  font-variant-numeric: tabular-nums;
}

.stat-icon {
  font-size: 20px;
  float: right;
  opacity: 0.4;
}

/* ============================================
   MODAL STYLING - Phase 2A Professional
   ============================================ */
.modal-content {
  background: var(--dt-bg-secondary);
  border: 1px solid var(--dt-border-color);
  border-radius: 8px;
  color: var(--dt-text-primary);
}

.modal-header {
  border-bottom: 1px solid var(--dt-border-color);
  background: var(--dt-bg-header);
  border-radius: 8px 8px 0 0;
}

.modal-footer {
  border-top: 1px solid var(--dt-border-color);
  background: var(--dt-bg-header);
}

.form-label {
  color: var(--dt-text-secondary);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-control {
  background: var(--dt-bg-primary);
  border: 1px solid var(--dt-border-color);
  color: var(--dt-text-primary);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  background: var(--dt-bg-primary);
  border-color: var(--dt-accent);
  color: var(--dt-text-primary);
  box-shadow: 0 0 0 2px var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.15));
  outline: none;
}

.form-control::placeholder {
  color: var(--dt-text-secondary);
  opacity: 0.6;
}

.form-select {
  background: var(--dt-bg-primary);
  border: 1px solid var(--dt-border-color);
  color: var(--dt-text-primary);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select:focus {
  background: var(--dt-bg-primary);
  border-color: var(--dt-accent);
  color: var(--dt-text-primary);
  box-shadow: 0 0 0 2px var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.15));
  outline: none;
}

.form-check-input {
  background-color: var(--dt-bg-primary);
  border-color: var(--dt-border-color);
}

.form-check-input:checked {
  background-color: var(--dt-accent);
  border-color: var(--dt-accent);
}

.form-check-label {
  color: var(--dt-text-primary);
}

/* ============================================
   DataTables Buttons Column Visibility Dropdown
   ============================================ */
.dt-button-collection {
  background: var(--dt-bg-secondary) !important;
  border: 1px solid var(--dt-border-color) !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  padding: 6px !important;
  min-width: 180px !important;
  z-index: 9999 !important;
}

.dt-button-collection .dt-button {
  background: transparent !important;
  color: var(--dt-text-primary) !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 8px 12px !important;
  margin: 1px 0 !important;
  text-align: left !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  transition: background-color 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 32px !important;
}

/* Text content vertical alignment fix */
.dt-button-collection .dt-button span {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.4 !important;
  vertical-align: middle !important;
}

.dt-button-collection .dt-button:hover {
  background: var(--dt-bg-hover) !important;
  color: var(--dt-accent) !important;
}

.dt-button-collection .dt-button.active {
  background: var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.1)) !important;
  color: var(--dt-accent) !important;
  font-weight: 500 !important;
}

/* Checkbox styling in column visibility */
.dt-button-collection .dt-button::before {
  content: '☐' !important;
  font-size: 14px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 16px !important;
  height: 16px !important;
  color: var(--dt-text-secondary) !important;
}

.dt-button-collection .dt-button.active::before {
  content: '☑' !important;
  color: var(--dt-accent) !important;
}

/* Dropdown arrow - removed for cleaner look */
.dt-button-collection::before {
  display: none !important;
}

/* Button collection background overlay */
.dt-button-background {
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(2px) !important;
}

/* Export buttons styling */
.dt-buttons {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

.dt-buttons .btn-funky {
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: var(--btn-height-md, 36px) !important;
  line-height: 1 !important;
}

/* Small button variant for DataTables buttons */
.btn-funky.btn-sm {
  padding: var(--btn-padding-sm, 6px 12px) !important;
  height: var(--btn-height-sm, 28px) !important;
  font-size: 13px !important;
}

/* Column visibility button icon */
.dt-button.buttons-collection i.fa-columns {
  margin-right: 5px;
}

/* CSV/Excel button icons */
.dt-button i.fa-file-csv,
.dt-button i.fa-file-excel {
  margin-right: 5px;
}

/* Hover effect for collection items */
.dt-button-collection .dt-button span {
  transition: all 0.2s ease;
}

/* Two column layout for larger collections */
@media (min-width: 992px) {
  .dt-button-collection.two-column {
    column-count: 2 !important;
    column-gap: 10px !important;
    min-width: 400px !important;
  }
  
  .dt-button-collection.two-column .dt-button {
    break-inside: avoid !important;
  }
}

/* Scrollable collection for many columns */
.dt-button-collection {
  max-height: 400px !important;
  overflow-y: auto !important;
}

.dt-button-collection::-webkit-scrollbar {
  width: 8px;
}

.dt-button-collection::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary);
  border-radius: 4px;
}

.dt-button-collection::-webkit-scrollbar-thumb {
  background: var(--primary-orange);
  border-radius: 4px;
}

.dt-button-collection::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Animation for dropdown appearance */
@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dt-button-collection {
  animation: dropdownSlideIn 0.2s ease !important;
}

/* Responsive adjustments - DataTables specific */
@media (max-width: 768px) {
  /* Note: funky-header-actions responsive is handled in buttons.css */
  
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-wrap: wrap;
  }
  
  .dt-button-collection {
    max-width: calc(100vw - 40px) !important;
    left: 20px !important;
    right: 20px !important;
  }
  
  .dt-buttons {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .dt-buttons .btn-funky {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 120px;
  }
}

/* ============================================
   RESPONSIVE ROW EXPANSION (Phase 2B)
   ============================================ */

/* Expand/Collapse Control Column */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
  content: '+';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pro-text-secondary, #8b949e);
  background: var(--pro-bg-tertiary, #21262d);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 4px;
  transition: all 0.2s ease;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:hover::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:hover::before {
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  background: var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.1));
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control::before {
  content: '−';
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  background: var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.15));
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

/* Child Row Container */
table.dataTable > tbody > tr.child {
  background: var(--pro-bg-tertiary, #21262d) !important;
}

table.dataTable > tbody > tr.child:hover {
  background: var(--pro-bg-tertiary, #21262d) !important;
}

table.dataTable > tbody > tr.child td.child {
  padding: 0;
  border-left: 3px solid var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

/* Child Row Details List */
table.dataTable > tbody > tr.child ul.dtr-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  margin: 0;
  padding: 12px 16px;
  list-style: none;
  width: 100%;
}

table.dataTable > tbody > tr.child ul.dtr-details > li {
  display: flex;
  align-items: flex-start;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pro-border-color, #30363d);
  background: transparent;
  transition: background 0.15s ease;
}

table.dataTable > tbody > tr.child ul.dtr-details > li:hover {
  background: rgba(255, 255, 255, 0.02);
}

table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
  border-bottom: none;
}

/* Field Label (Title) */
table.dataTable > tbody > tr.child span.dtr-title {
  flex-shrink: 0;
  min-width: 120px;
  max-width: 160px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pro-text-muted, #6e7681);
  padding-right: 12px;
}

/* Field Value (Data) */
table.dataTable > tbody > tr.child span.dtr-data {
  flex: 1;
  font-size: var(--dt-font-size, 13px);
  color: var(--pro-text-primary, #e6edf3);
  word-break: break-word;
}

/* Empty values */
table.dataTable > tbody > tr.child span.dtr-data:empty::after {
  content: '—';
  color: var(--pro-text-muted, #6e7681);
}

/* Badges in child rows */
table.dataTable > tbody > tr.child .badge,
table.dataTable > tbody > tr.child .status-badge {
  font-size: 10px;
  padding: 2px 6px;
}

/* Action buttons in child rows */
table.dataTable > tbody > tr.child .btn-funky {
  font-size: 11px;
  padding: 4px 8px;
}

/* Animation for expand/collapse */
table.dataTable > tbody > tr.child {
  animation: childRowExpand 0.2s ease-out;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  table.dataTable > tbody > tr.child {
    animation: none;
  }
  
  table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
  table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    transition: none;
  }
}

/* Touch-friendly targets on mobile */
@media (max-width: 768px) {
  table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
  table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
    padding-left: 40px;
  }
  
  table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
  table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    width: 28px;
    height: 28px;
    font-size: 18px;
    left: 6px;
  }
  
  table.dataTable > tbody > tr.child ul.dtr-details {
    grid-template-columns: 1fr;
    padding: 8px 12px;
  }
  
  table.dataTable > tbody > tr.child ul.dtr-details > li {
    flex-direction: column;
    gap: 4px;
    padding: 10px 8px;
  }
  
  table.dataTable > tbody > tr.child span.dtr-title {
    min-width: auto;
    max-width: none;
    margin-bottom: 2px;
  }
}

/* Light Theme Overrides for Child Rows */
[data-theme="light"] table.dataTable > tbody > tr.child {
  background: var(--pro-bg-tertiary, #eaeef2) !important;
}

[data-theme="light"] table.dataTable > tbody > tr.child ul.dtr-details > li {
  border-bottom-color: var(--pro-border-color, #d0d7de);
}

[data-theme="light"] table.dataTable > tbody > tr.child ul.dtr-details > li:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
[data-theme="light"] table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
  background: var(--pro-bg-secondary, #f6f8fa);
  border-color: var(--pro-border-color, #d0d7de);
  color: var(--pro-text-secondary, #656d76);
}

/* Even Funkier Theme Overrides for Child Rows */
[data-theme="even-funkyer"] table.dataTable > tbody > tr.child {
  background: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="even-funkyer"] table.dataTable > tbody > tr.child td.child {
  border-left-color: var(--funkier-neon-pink, #ff00ff);
  box-shadow: inset 3px 0 10px rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] table.dataTable > tbody > tr.child ul.dtr-details > li {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="even-funkyer"] table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
[data-theme="even-funkyer"] table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--funkier-neon-cyan, #00ffff);
  color: var(--funkier-neon-cyan, #00ffff);
  text-shadow: 0 0 5px var(--funkier-neon-cyan, #00ffff);
}

[data-theme="even-funkyer"] table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control::before,
[data-theme="even-funkyer"] table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control::before {
  background: rgba(255, 0, 255, 0.2);
  border-color: var(--funkier-neon-pink, #ff00ff);
  color: var(--funkier-neon-pink, #ff00ff);
  text-shadow: 0 0 8px var(--funkier-neon-pink, #ff00ff);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

[data-theme="even-funkyer"] table.dataTable > tbody > tr.child span.dtr-title {
  color: var(--funkier-neon-cyan, #00ffff);
  text-shadow: 0 0 3px rgba(0, 255, 255, 0.5);
}


/* ============================================
   PHASE 2D: TABLE FOOTER AGGREGATIONS
   Totals, averages, counts for numeric columns
   ============================================ */

/* Footer aggregation container */
table.dataTable tfoot.dt-footer-aggregation {
  background: var(--dt-header-bg, #1c2128);
  border-top: 2px solid var(--dt-accent, #2f81f7);
}

table.dataTable tfoot.dt-footer-aggregation tr {
  background: var(--dt-header-bg, #1c2128);
}

table.dataTable tfoot.dt-footer-aggregation th,
table.dataTable tfoot.dt-footer-aggregation td {
  padding: var(--dt-cell-padding-y, 10px) var(--dt-cell-padding-x, 12px);
  border-top: none;
  border-bottom: none;
  font-size: var(--dt-font-size, 13px);
  vertical-align: middle;
}

/* Aggregation label (SUM, AVG, COUNT) */
.agg-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dt-text-secondary, #8b949e);
  margin-bottom: 2px;
}

/* Aggregation value */
.agg-value {
  display: block;
  font-family: var(--pro-font-mono, monospace);
  font-weight: 600;
  font-size: var(--dt-font-size, 13px);
  color: var(--dt-accent, #2f81f7);
  font-variant-numeric: tabular-nums;
}

/* Positive/negative value styling in aggregations */
.agg-value.positive {
  color: var(--pro-accent-success, #3fb950);
}

.agg-value.negative {
  color: var(--pro-accent-danger, #f85149);
}

/* Light theme overrides for aggregations */
[data-theme="light"] table.dataTable tfoot.dt-footer-aggregation {
  background: var(--dt-header-bg, #f6f8fa);
  border-top-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

[data-theme="light"] table.dataTable tfoot.dt-footer-aggregation tr {
  background: var(--dt-header-bg, #f6f8fa);
}

[data-theme="light"] .agg-label {
  color: var(--dt-text-secondary, #57606a);
}

[data-theme="light"] .agg-value {
  color: var(--user-accent, var(--pro-accent-primary, #0969da));
}

/* Even Funkier theme overrides for aggregations */
[data-theme="even-funkyer"] table.dataTable tfoot.dt-footer-aggregation {
  background: rgba(0, 0, 0, 0.6);
  border-top: 2px solid var(--funkier-neon-pink, #ff00ff);
  box-shadow: inset 0 2px 20px rgba(255, 0, 255, 0.2);
}

[data-theme="even-funkyer"] table.dataTable tfoot.dt-footer-aggregation tr {
  background: transparent;
}

[data-theme="even-funkyer"] .agg-label {
  color: var(--funkier-neon-cyan, #00ffff);
  text-shadow: 0 0 3px rgba(0, 255, 255, 0.5);
}

[data-theme="even-funkyer"] .agg-value {
  color: var(--funkier-neon-pink, #ff00ff);
  text-shadow: 0 0 5px rgba(255, 0, 255, 0.7);
}


/* ============================================
   PHASE 2D: CONDITIONAL FORMATTING CLASSES
   Apply visual styles based on cell values
   ============================================ */

/* Positive values (green) */
.cf-positive {
  color: var(--pro-accent-success, #3fb950) !important;
}

.cf-positive-bg {
  background-color: var(--pro-accent-success-muted, rgba(63, 185, 80, 0.15)) !important;
  color: var(--pro-accent-success, #3fb950) !important;
}

/* Negative values (red) */
.cf-negative {
  color: var(--pro-accent-danger, #f85149) !important;
}

.cf-negative-bg {
  background-color: var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.15)) !important;
  color: var(--pro-accent-danger, #f85149) !important;
}

/* Warning values (orange/yellow) */
.cf-warning {
  color: var(--pro-accent-warning, #d29922) !important;
}

.cf-warning-bg {
  background-color: var(--pro-accent-warning-muted, rgba(210, 153, 34, 0.15)) !important;
  color: var(--pro-accent-warning, #d29922) !important;
}

/* Neutral values (gray) */
.cf-neutral {
  color: var(--pro-text-muted, #6e7681) !important;
}

.cf-neutral-bg {
  background-color: rgba(110, 118, 129, 0.1) !important;
  color: var(--pro-text-muted, #6e7681) !important;
}

/* Highlight values (blue accent) */
.cf-highlight {
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7)) !important;
}

.cf-highlight-bg {
  background-color: var(--user-accent-muted, var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.15))) !important;
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7)) !important;
}

/* Info values (cyan/light blue) */
.cf-info {
  color: var(--pro-accent-info, #58a6ff) !important;
}

.cf-info-bg {
  background-color: var(--pro-accent-info-muted, rgba(88, 166, 255, 0.15)) !important;
  color: var(--pro-accent-info, #58a6ff) !important;
}

/* Bold text */
.cf-bold {
  font-weight: 700 !important;
}

/* Muted/dimmed text */
.cf-muted {
  opacity: 0.5 !important;
  color: var(--pro-text-muted, #6e7681) !important;
}

/* Italic text */
.cf-italic {
  font-style: italic !important;
}

/* Strikethrough */
.cf-strikethrough {
  text-decoration: line-through !important;
}

/* Data bar visualization (horizontal bar based on value) */
.cf-bar {
  position: relative;
  z-index: 1;
}

.cf-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--user-accent-muted, var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.2)));
  z-index: -1;
  transition: width 0.3s ease;
}

.cf-bar[data-bar-width="10"]::before { width: 10%; }
.cf-bar[data-bar-width="20"]::before { width: 20%; }
.cf-bar[data-bar-width="30"]::before { width: 30%; }
.cf-bar[data-bar-width="40"]::before { width: 40%; }
.cf-bar[data-bar-width="50"]::before { width: 50%; }
.cf-bar[data-bar-width="60"]::before { width: 60%; }
.cf-bar[data-bar-width="70"]::before { width: 70%; }
.cf-bar[data-bar-width="80"]::before { width: 80%; }
.cf-bar[data-bar-width="90"]::before { width: 90%; }
.cf-bar[data-bar-width="100"]::before { width: 100%; }

/* Data bar color variants */
.cf-bar.cf-bar-success::before {
  background: var(--pro-accent-success-muted, rgba(63, 185, 80, 0.25));
}

.cf-bar.cf-bar-danger::before {
  background: var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.25));
}

.cf-bar.cf-bar-warning::before {
  background: var(--pro-accent-warning-muted, rgba(210, 153, 34, 0.25));
}

/* Icon prefixes */
.cf-icon-up::before {
  content: '▲ ';
  color: var(--pro-accent-success, #3fb950);
  font-size: 0.7em;
}

.cf-icon-down::before {
  content: '▼ ';
  color: var(--pro-accent-danger, #f85149);
  font-size: 0.7em;
}

.cf-icon-check::before {
  content: '✓ ';
  color: var(--pro-accent-success, #3fb950);
}

.cf-icon-x::before {
  content: '✗ ';
  color: var(--pro-accent-danger, #f85149);
}

.cf-icon-warning::before {
  content: '⚠ ';
  color: var(--pro-accent-warning, #d29922);
}

.cf-icon-star::before {
  content: '★ ';
  color: var(--pro-accent-warning, #d29922);
}

/* Even Funkier theme overrides for conditional formatting */
[data-theme="even-funkyer"] .cf-positive,
[data-theme="even-funkyer"] .cf-positive-bg {
  color: var(--pro-accent-success) !important;
  text-shadow: 0 0 5px var(--pro-accent-success-muted);
}

[data-theme="even-funkyer"] .cf-positive-bg {
  background-color: rgba(0, 255, 136, 0.15) !important;
}

[data-theme="even-funkyer"] .cf-negative,
[data-theme="even-funkyer"] .cf-negative-bg {
  color: var(--pro-accent-danger) !important;
  text-shadow: 0 0 5px var(--pro-accent-danger-muted);
}

[data-theme="even-funkyer"] .cf-negative-bg {
  background-color: rgba(255, 51, 102, 0.15) !important;
}

[data-theme="even-funkyer"] .cf-highlight,
[data-theme="even-funkyer"] .cf-highlight-bg {
  color: var(--funkier-neon-cyan, #00ffff) !important;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

[data-theme="even-funkyer"] .cf-highlight-bg {
  background-color: rgba(0, 255, 255, 0.15) !important;
}

[data-theme="even-funkyer"] .cf-bar::before {
  background: rgba(255, 0, 255, 0.2);
}

[data-theme="even-funkyer"] .cf-icon-up::before {
  color: var(--pro-accent-success);
  text-shadow: 0 0 3px var(--pro-accent-success-muted);
}

[data-theme="even-funkyer"] .cf-icon-down::before {
  color: var(--pro-accent-danger);
  text-shadow: 0 0 3px var(--pro-accent-danger-muted);
}

/* ============================================
   PHASE 8: SMART DATATABLE ROW ANIMATIONS
   Real-time update visual feedback
   ============================================ */

/* Row highlight animations */
@keyframes dt-row-flash-success {
  0% { background-color: rgba(var(--pro-accent-success-rgb, 46, 160, 67), 0.35); }
  100% { background-color: transparent; }
}

@keyframes dt-row-flash-warning {
  0% { background-color: rgba(var(--pro-accent-warning-rgb, 210, 153, 34), 0.35); }
  100% { background-color: transparent; }
}

@keyframes dt-row-flash-danger {
  0% { background-color: rgba(var(--pro-accent-danger-rgb, 248, 81, 73), 0.35); }
  100% { background-color: transparent; }
}

@keyframes dt-row-removal {
  0% { 
    opacity: 1; 
    transform: translateX(0);
    max-height: 60px;
  }
  100% { 
    opacity: 0; 
    transform: translateX(-30px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Highlight classes - applied dynamically by JavaScript */
.dt-row-highlight-success {
  animation: dt-row-flash-success 1.5s ease-out;
}

.dt-row-highlight-warning {
  animation: dt-row-flash-warning 1.5s ease-out;
}

.dt-row-highlight-danger {
  animation: dt-row-flash-danger 1.5s ease-out;
}

.dt-row-removing {
  animation: dt-row-removal 0.3s ease-out forwards;
  overflow: hidden;
}

/* Theme-specific highlight colors */
[data-theme="light"] .dt-row-highlight-success {
  animation: dt-row-flash-success 1.5s ease-out;
}

[data-theme="even-funkyer"] .dt-row-highlight-success {
  animation-name: dt-row-flash-funkier-success;
}

@keyframes dt-row-flash-funkier-success {
  0% { 
    background-color: rgba(0, 255, 136, 0.4);
    box-shadow: inset 0 0 20px rgba(0, 255, 136, 0.3);
  }
  100% { 
    background-color: transparent;
    box-shadow: none;
  }
}

[data-theme="even-funkyer"] .dt-row-highlight-warning {
  animation-name: dt-row-flash-funkier-warning;
}

@keyframes dt-row-flash-funkier-warning {
  0% { 
    background-color: rgba(255, 255, 0, 0.4);
    box-shadow: inset 0 0 20px rgba(255, 255, 0, 0.3);
  }
  100% { 
    background-color: transparent;
    box-shadow: none;
  }
}

[data-theme="even-funkyer"] .dt-row-highlight-danger {
  animation-name: dt-row-flash-funkier-danger;
}

@keyframes dt-row-flash-funkier-danger {
  0% { 
    background-color: rgba(255, 51, 102, 0.4);
    box-shadow: inset 0 0 20px rgba(255, 51, 102, 0.3);
  }
  100% { 
    background-color: transparent;
    box-shadow: none;
  }
}

/* Data refresh indicator */
.dt-refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--pro-accent-primary);
  background: var(--pro-accent-primary-muted);
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dt-refresh-indicator.active {
  opacity: 1;
}

.dt-refresh-indicator .spinner-border {
  width: 12px;
  height: 12px;
  border-width: 2px;
}
/* css/spa.css */
/* ============================================
   SPA.CSS - Single Page Application Styles
   Loading indicators, transitions, skeletons
   ============================================ */

/* ============================================
   SPA LOADING INDICATOR
   ============================================ */

/* Top progress bar - spans full viewport width */
.spa-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.spa-progress-bar.active {
  opacity: 1;
}

.spa-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  border-radius: 0 2px 2px 0;
  transition: width 0.2s ease;
}

.spa-progress-bar.active::before {
  animation: spa-progress 2s ease-in-out forwards;
}

.spa-progress-bar.complete::before {
  width: 100%;
  transition: width 0.1s ease;
}

@keyframes spa-progress {
  0% { width: 0%; }
  20% { width: 30%; }
  50% { width: 60%; }
  80% { width: 80%; }
  100% { width: 90%; }
}

/* Pulsing glow effect on progress bar */
.spa-progress-bar.active::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--pro-shimmer-color, rgba(255, 255, 255, 0.3)), transparent);
  animation: spa-progress-glow 1s ease-in-out infinite;
}

@keyframes spa-progress-glow {
  0%, 100% {
    opacity: 0;
    transform: translateX(-100px);
  }
  50% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Full overlay - used for longer loads */
.spa-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pro-overlay-bg, rgba(0, 0, 0, 0.5));
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.spa-loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Initial load overlay - solid background to hide layout flash */
.spa-loading-overlay.initial-load {
  background: var(--pro-bg-primary, #1a1a2e);
  backdrop-filter: none;
}

.spa-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--pro-border-color);
  border-top-color: var(--user-accent, var(--pro-accent-primary));
  border-radius: 50%;
  animation: spa-spin 0.8s linear infinite;
}

.spinner-text {
  color: var(--pro-text-primary);
  font-size: var(--pro-font-size-sm);
  font-weight: 500;
}

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

/* SPA loading state - disable interactions */
body.spa-loading {
  pointer-events: none;
}

body.spa-loading .main-wrapper {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

/* ============================================
   SPA PAGE TRANSITIONS
   Smooth animations when navigating between pages
   ============================================ */

/* Content container transitions */
#spaContent {
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

/* Fade out state - applied before content swap */
#spaContent.spa-transitioning-out {
  opacity: 0;
  transform: translateY(-8px);
}

/* Fade in state - applied after content swap */
#spaContent.spa-transitioning-in {
  opacity: 0;
  transform: translateY(8px);
}

/* Animate to visible state */
#spaContent.spa-content-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skeleton loading placeholders for content */
.spa-skeleton {
  background: linear-gradient(
    90deg,
    var(--pro-bg-tertiary) 25%,
    var(--pro-bg-elevated) 50%,
    var(--pro-bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: spa-skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.spa-skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
  width: 100%;
}

.spa-skeleton-text:last-child {
  width: 70%;
}

.spa-skeleton-title {
  height: 1.5em;
  width: 40%;
  margin-bottom: 1em;
}

.spa-skeleton-card {
  height: 120px;
  margin-bottom: 1em;
}

.spa-skeleton-table {
  height: 300px;
}

@keyframes spa-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Stagger animation for child elements */
#spaContent.spa-content-visible > .card,
#spaContent.spa-content-visible > .row > .col > .card,
#spaContent.spa-content-visible > .row > [class*="col-"] > .card,
#spaContent.spa-content-visible > .container > .card,
#spaContent.spa-content-visible > .container-fluid > .card {
  animation: spa-fade-in-up 0.25s ease-out backwards;
}

#spaContent.spa-content-visible > .card:nth-child(1),
#spaContent.spa-content-visible > .row > .col:nth-child(1) > .card,
#spaContent.spa-content-visible > .row > [class*="col-"]:nth-child(1) > .card {
  animation-delay: 0s;
}

#spaContent.spa-content-visible > .card:nth-child(2),
#spaContent.spa-content-visible > .row > .col:nth-child(2) > .card,
#spaContent.spa-content-visible > .row > [class*="col-"]:nth-child(2) > .card {
  animation-delay: 0.05s;
}

#spaContent.spa-content-visible > .card:nth-child(3),
#spaContent.spa-content-visible > .row > .col:nth-child(3) > .card,
#spaContent.spa-content-visible > .row > [class*="col-"]:nth-child(3) > .card {
  animation-delay: 0.1s;
}

#spaContent.spa-content-visible > .card:nth-child(4),
#spaContent.spa-content-visible > .row > .col:nth-child(4) > .card,
#spaContent.spa-content-visible > .row > [class*="col-"]:nth-child(4) > .card {
  animation-delay: 0.15s;
}

@keyframes spa-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  #spaContent,
  #spaContent.spa-transitioning-out,
  #spaContent.spa-transitioning-in,
  #spaContent.spa-content-visible {
    transition: none;
    transform: none;
    animation: none;
  }
  
  #spaContent.spa-content-visible > .card,
  #spaContent.spa-content-visible > .row > .col > .card,
  #spaContent.spa-content-visible > .row > [class*="col-"] > .card {
    animation: none;
  }
  
  .spa-skeleton {
    animation: none;
  }
}

/* css/layout.css */
/* ============================================
   LAYOUT.CSS - Page Layout & Structure
   Sidebar, main wrapper, top header, content
   ============================================ */

/* ============================================
   COLLAPSIBLE SIDEBAR SYSTEM
   ============================================ */

:root {
  --sidebar-width-expanded: 260px;
  --sidebar-width-collapsed: 56px;
  --sidebar-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Navigation Position System */
  --nav-height-horizontal: 56px;
  --nav-position: left; /* left | top | right | bottom */
}

/* ============================================
   SIDEBAR BASE STYLES (Default: Left Position)
   ============================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width-expanded);
  height: 100vh;
  background: var(--pro-bg-secondary);
  border-right: 1px solid var(--pro-border-color);
  padding: 0;
  z-index: 1030; /* Below modal backdrop (1040) and modal (1050) */
  transition: width var(--sidebar-transition), transform 0.3s ease, opacity 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed,
.sidebar.sidebar-collapsed {
  width: var(--sidebar-width-collapsed);
  overflow: visible;
}

.sidebar.collapsed .sidebar-logo-text,
.sidebar.sidebar-collapsed .sidebar-logo-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
  display: none;
}

.sidebar.collapsed .sidebar-header,
.sidebar.sidebar-collapsed .sidebar-header {
  padding: 15px 8px;
  display: flex;
  justify-content: center;
  padding-left: 12px;
}

.sidebar.collapsed .vinyl-record,
.sidebar.sidebar-collapsed .vinyl-record {
  width: 32px;
  height: 32px;
}

.sidebar.collapsed .vinyl-record::before,
.sidebar.sidebar-collapsed .vinyl-record::before {
  width: 8px;
  height: 8px;
}

.sidebar.collapsed .record-label,
.sidebar.sidebar-collapsed .record-label {
  font-size: 5px;
}

.sidebar.collapsed .nav-section-title,
.sidebar.sidebar-collapsed .nav-section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}



/* Sidebar Header */
.sidebar-header {
  padding: 25px 20px;
  background: var(--pro-bg-tertiary);
  border-bottom: 1px solid var(--pro-border-color);
}

.sidebar-logo {
  font-size: 24px;
  font-weight: 800;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.sidebar-logo-text {
  transition: opacity var(--sidebar-transition), width var(--sidebar-transition);
  white-space: nowrap;
}

/* Vinyl Record Logo */
.sidebar-logo .vinyl-record {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, #1a1a1a 0%, #1a1a1a 30%, white 30%, white 32%, #1a1a1a 32%, #1a1a1a 100%);
  border-radius: 50%;
  position: relative;
  animation: vinylSpin 3s linear infinite;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.sidebar-logo .vinyl-record::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
}

.sidebar-logo .record-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6px;
  color: var(--pro-text-inverse, #1a1a1a);
  font-weight: bold;
  text-align: center;
  line-height: 1;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* CSS Tooltips for Collapsed Sidebar */
.sidebar.sidebar-collapsed .nav-link {
  position: relative;
}

.sidebar.sidebar-collapsed .nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--pro-bg-elevated);
  color: var(--pro-text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1001;
  box-shadow: var(--pro-shadow-lg);
  pointer-events: none;
}

.sidebar.sidebar-collapsed .nav-link::before {
  content: '';
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: var(--pro-bg-elevated);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sidebar.sidebar-collapsed .nav-link:hover::after,
.sidebar.sidebar-collapsed .nav-link:hover::before {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   MAIN CONTENT WRAPPER
   ============================================ */
.main-wrapper {
  margin-left: var(--sidebar-width-expanded);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--sidebar-transition);
  position: relative;
}

.main-wrapper.sidebar-collapsed,
.sidebar-collapsed ~ .main-wrapper,
body.sidebar-is-collapsed .main-wrapper {
  margin-left: var(--sidebar-width-collapsed);
}

/* Top Header */
.top-header {
  background: var(--pro-bg-secondary);
  border-bottom: 1px solid var(--pro-border-color);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--pro-text-primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pro-accent-success, #10b981);
  animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--user-accent, var(--pro-accent-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: white;
}

/* Header Right - consistent spacing */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Header Badge - matching height */
.header-badge {
  height: 36px;
  padding: 0 12px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  font-size: 12px;
  color: var(--pro-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* User Menu - matching height */
.user-menu {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-menu:hover {
  border-color: var(--user-accent, var(--pro-accent-primary));
  transform: translateY(-2px);
}

.user-menu.active {
  border-color: var(--user-accent, var(--pro-accent-primary));
  background: var(--pro-bg-secondary);
}

.user-menu-avatar {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--pro-accent-primary) 0%, var(--pro-accent-purple) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

.user-menu-name {
  font-weight: 500;
  font-size: 14px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-arrow {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.user-menu.active .user-menu-arrow {
  transform: rotate(180deg);
}

/* User Menu Dropdown */
.user-menu-dropdown {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 260px;
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.user-menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.user-menu-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--pro-bg-elevated);
}

.user-menu-dropdown-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--pro-accent-primary) 0%, var(--pro-accent-purple) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

.user-menu-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.user-menu-dropdown-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--pro-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-dropdown-email {
  font-size: 12px;
  color: var(--pro-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-dropdown-divider {
  height: 1px;
  background: var(--pro-border-color);
  margin: 0;
}

.user-menu-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--pro-text-primary);
  text-decoration: none;
  transition: background 0.15s ease;
  cursor: pointer;
}

.user-menu-dropdown-item:hover {
  background: var(--pro-bg-elevated);
  color: var(--pro-text-primary);
  text-decoration: none;
}

.user-menu-dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--pro-text-secondary);
}

.user-menu-dropdown-item:hover i {
  color: var(--user-accent, var(--pro-accent-primary));
}

.user-menu-dropdown-item span {
  font-size: 14px;
}

.user-menu-dropdown-item-danger {
  color: var(--pro-status-error);
}

.user-menu-dropdown-item-danger i {
  color: var(--pro-status-error);
}

.user-menu-dropdown-item-danger:hover {
  background: rgba(248, 81, 73, 0.1);
  color: var(--pro-status-error);
}

.user-menu-dropdown-item-danger:hover i {
  color: var(--pro-status-error);
}

/* Main Content Area */
.main-content {
  padding: 1em;
  flex: 1;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   NAVIGATION POSITION SYSTEM
   Supports: left (default), top, right, bottom
   ============================================ */

/* ============================================
   RIGHT NAVIGATION POSITION
   Mirror of left sidebar, but on right side
   ============================================ */
[data-nav-position="right"] .sidebar {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--pro-border-color);
}

[data-nav-position="right"] .main-wrapper {
  margin-left: 0;
  margin-right: var(--sidebar-width-expanded);
}

[data-nav-position="right"] .main-wrapper.sidebar-collapsed,
[data-nav-position="right"] .sidebar-collapsed ~ .main-wrapper,
[data-nav-position="right"].sidebar-is-collapsed .main-wrapper {
  margin-right: var(--sidebar-width-collapsed);
}

/* Right sidebar toggle button position */
[data-nav-position="right"] .sidebar-toggle {
  right: auto;
}

[data-nav-position="right"] .sidebar-toggle .toggle-icon {
  transform: rotate(180deg);
}

[data-nav-position="right"] .sidebar.collapsed .sidebar-toggle .toggle-icon,
[data-nav-position="right"] .sidebar.sidebar-collapsed .sidebar-toggle .toggle-icon {
  transform: rotate(0deg);
}

/* Flyout positioning for right sidebar */
[data-nav-position="right"] .nav-flyout {
  left: auto;
  right: calc(100% + 8px);
  transform-origin: right center;
  transform: translateX(4px) scale(0.98);
}

/* Flyout visible state for right sidebar */
[data-nav-position="right"] .sidebar.collapsed .nav-group:hover .nav-flyout,
[data-nav-position="right"] .sidebar.collapsed .nav-standalone:hover .nav-flyout {
  transform: translateX(0) scale(1);
}

/* Flyout arrow for right sidebar */
[data-nav-position="right"] .nav-flyout::before {
  left: auto;
  right: -6px;
  border-right-color: transparent;
  border-left-color: var(--pro-border-color);
  border-right: none;
  border-left: 6px solid var(--pro-border-color);
}

[data-nav-position="right"] .nav-flyout::after {
  left: auto;
  right: -4px;
  border-right-color: transparent;
  border-left-color: var(--pro-bg-elevated);
  border-right: none;
  border-left: 5px solid var(--pro-bg-elevated);
}

/* Invisible bridge for right sidebar - positioned on right side */
[data-nav-position="right"] .sidebar.collapsed .nav-group::after,
[data-nav-position="right"] .sidebar.collapsed .nav-standalone::after {
  left: auto;
  right: 40px;
  width: calc(var(--sidebar-width-collapsed, 56px) - 40px + 8px);
}

[data-nav-position="right"] .sidebar.sidebar-collapsed .nav-link::after {
  left: auto;
  right: calc(100% + 10px);
}

[data-nav-position="right"] .sidebar.sidebar-collapsed .nav-link::before {
  left: auto;
  right: calc(100% + 4px);
  border-right-color: transparent;
  border-left-color: var(--pro-bg-elevated);
}

/* ============================================
   TOP NAVIGATION POSITION
   Horizontal navigation bar at top
   ============================================ */
[data-nav-position="top"] .sidebar {
  left: 0;
  top: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  height: var(--nav-height-horizontal);
  flex-direction: row;
  border-right: none;
  border-bottom: 1px solid var(--pro-border-color);
  overflow: visible;
  z-index: 1000;
}

[data-nav-position="top"] .sidebar-header {
  padding: 0 20px;
  border-bottom: none;
  border-right: 1px solid var(--pro-border-color);
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
  width: auto;
}

[data-nav-position="top"] .sidebar-logo {
  gap: 8px;
}

[data-nav-position="top"] .sidebar-logo .vinyl-record {
  width: 32px;
  height: 32px;
}

[data-nav-position="top"] .sidebar-logo-text {
  font-size: 18px;
}

[data-nav-position="top"] .sidebar-nav {
  flex: 1;
  flex-direction: row;
  padding: 0 12px;
  overflow-x: auto;
  overflow-y: visible;
  align-items: center;
  gap: 4px;
}

[data-nav-position="top"] .sidebar-nav::-webkit-scrollbar {
  height: 4px;
}

[data-nav-position="top"] .nav-group {
  margin: 0;
  position: relative;
}

[data-nav-position="top"] .nav-group-header {
  height: calc(var(--nav-height-horizontal) - 16px);
  white-space: nowrap;
  padding: 0 12px;
}

[data-nav-position="top"] .nav-group-header-content {
  gap: 6px;
}

[data-nav-position="top"] .nav-group-chevron {
  transform: rotate(90deg);
}

[data-nav-position="top"] .nav-group.expanded .nav-group-chevron {
  transform: rotate(-90deg);
}

[data-nav-position="top"] .nav-group-items {
  /* Reset from vertical collapsible to dropdown */
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 8px;
  z-index: 1200;
  /* Reset all vertical nav collapsible styles */
  max-height: none !important;
  opacity: 1 !important;
  margin: 0 !important;
  overflow: visible;
  flex-direction: column;
  transform: none;
  transition: none;
}

/* Dropdown nav items styling for horizontal nav */
[data-nav-position="top"] .nav-group-items .nav-item {
  list-style: none;
  margin: 0;
}

[data-nav-position="top"] .nav-group-items .nav-link {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  margin: 2px 0;
  border-radius: 6px;
  color: var(--pro-text-secondary);
  text-decoration: none;
  font-size: 13px;
  border-left: none;
  transition: 
    background 0.15s ease,
    color 0.15s ease;
}

[data-nav-position="top"] .nav-group-items .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
  border-left: none;
}

[data-nav-position="top"] .nav-group-items .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
}

[data-nav-position="top"] .nav-group-items .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.7;
  margin-right: 10px;
  flex-shrink: 0;
}

[data-nav-position="top"] .nav-group-items .nav-link:hover .nav-icon,
[data-nav-position="top"] .nav-group-items .nav-link.active .nav-icon {
  opacity: 1;
}

[data-nav-position="top"] .nav-group-items .nav-text {
  flex: 1;
  white-space: nowrap;
}

/* Show dropdown when expanded */
[data-nav-position="top"] .nav-group.expanded .nav-group-items,
[data-nav-position="top"] .nav-group.open .nav-group-items {
  display: flex;
}

[data-nav-position="top"] .nav-standalone {
  list-style: none;
}

[data-nav-position="top"] .nav-standalone .nav-link {
  height: calc(var(--nav-height-horizontal) - 16px);
  white-space: nowrap;
  padding: 0 12px;
}

/* Always hide flyout in top nav - use dropdown instead */
[data-nav-position="top"] .nav-flyout,
[data-nav-position="top"] .sidebar.collapsed .nav-flyout,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-flyout,
[data-nav-position="top"] .sidebar.collapsed .nav-group:hover .nav-flyout,
[data-nav-position="top"] .sidebar.collapsed .nav-standalone:hover .nav-flyout {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Collapsed state for top nav - icons only with click dropdowns */
[data-nav-position="top"] .sidebar.collapsed,
[data-nav-position="top"] .sidebar.sidebar-collapsed {
  width: 100%; /* Keep full width */
  overflow: visible !important;
}

/* Ensure overflow visible for dropdown to show */
[data-nav-position="top"] .sidebar.collapsed .sidebar-nav,
[data-nav-position="top"] .sidebar.sidebar-collapsed .sidebar-nav {
  overflow: visible !important;
}

[data-nav-position="top"] .sidebar.collapsed .nav-group,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group {
  overflow: visible;
}

[data-nav-position="top"] .sidebar.collapsed .nav-text,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-text {
  display: none;
}

[data-nav-position="top"] .sidebar.collapsed .nav-group-header,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group-header {
  padding: 0 12px;
  min-width: 44px;
  height: calc(var(--nav-height-horizontal) - 16px);
}

[data-nav-position="top"] .sidebar.collapsed .nav-standalone .nav-link,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-standalone .nav-link {
  padding: 0 12px;
  min-width: 44px;
}

/* Override navigation.css collapsed rules - use dropdown not flyout */
[data-nav-position="top"] .sidebar.collapsed .nav-group-items,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group-items {
  /* Reset from vertical collapsible to dropdown */
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 8px;
  z-index: 1200;
  max-height: none !important;
  opacity: 1 !important;
  margin: 0 !important;
  overflow: visible !important;
}

/* Show collapsed dropdown when expanded */
[data-nav-position="top"] .sidebar.collapsed .nav-group.expanded .nav-group-items,
[data-nav-position="top"] .sidebar.collapsed .nav-group.open .nav-group-items,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group.expanded .nav-group-items,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group.open .nav-group-items {
  display: flex !important;
  flex-direction: column;
}

/* Show text in collapsed dropdown items */
[data-nav-position="top"] .sidebar.collapsed .nav-group-items .nav-text,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group-items .nav-text {
  display: inline !important;
}

/* Sidebar toggle for top nav - positioned at end of nav, vertically centered */
[data-nav-position="top"] .sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  margin-left: auto;
  margin-right: 12px;
  width: 32px;
  height: 32px;
  align-self: center;
}

/* Main wrapper adjustment for top nav */
[data-nav-position="top"] .main-wrapper {
  margin-left: 0;
  margin-top: var(--nav-height-horizontal);
}

[data-nav-position="top"] .main-wrapper.sidebar-collapsed {
  margin-left: 0;
  margin-top: var(--nav-height-horizontal);
}

/* ============================================
   BOTTOM NAVIGATION POSITION
   Horizontal navigation bar at bottom
   ============================================ */
[data-nav-position="bottom"] .sidebar {
  left: 0;
  top: auto;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--nav-height-horizontal);
  flex-direction: row;
  border-right: none;
  border-top: 1px solid var(--pro-border-color);
  overflow: visible;
  z-index: 1000;
}

[data-nav-position="bottom"] .sidebar-header {
  padding: 0 20px;
  border-bottom: none;
  border-right: 1px solid var(--pro-border-color);
  display: flex;
  align-items: center;
  height: 100%;
}

[data-nav-position="bottom"] .sidebar-logo {
  gap: 8px;
}

[data-nav-position="bottom"] .sidebar-logo .vinyl-record {
  width: 32px;
  height: 32px;
}

[data-nav-position="bottom"] .sidebar-logo-text {
  font-size: 18px;
}

[data-nav-position="bottom"] .sidebar-nav {
  flex-direction: row;
  padding: 0 12px;
  overflow-x: auto;
  overflow-y: visible;
  align-items: center;
  gap: 4px;
}

[data-nav-position="bottom"] .sidebar-nav::-webkit-scrollbar {
  height: 4px;
}

[data-nav-position="bottom"] .nav-group {
  margin: 0;
  position: relative;
}

[data-nav-position="bottom"] .nav-group-header {
  height: calc(var(--nav-height-horizontal) - 16px);
  white-space: nowrap;
  padding: 0 12px;
}

[data-nav-position="bottom"] .nav-group-header-content {
  gap: 6px;
}

[data-nav-position="bottom"] .nav-group-chevron {
  transform: rotate(-90deg);
}

[data-nav-position="bottom"] .nav-group.expanded .nav-group-chevron {
  transform: rotate(90deg);
}

[data-nav-position="bottom"] .nav-group-items {
  /* Reset from vertical collapsible to dropdown */
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  min-width: 200px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 8px;
  z-index: 1200;
  /* Reset all vertical nav collapsible styles */
  max-height: none !important;
  opacity: 1 !important;
  margin: 0 !important;
  overflow: visible;
  flex-direction: column;
  transform: none;
  transition: none;
}

/* Dropdown nav items styling for horizontal nav */
[data-nav-position="bottom"] .nav-group-items .nav-item {
  list-style: none;
  margin: 0;
}

[data-nav-position="bottom"] .nav-group-items .nav-link {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  margin: 2px 0;
  border-radius: 6px;
  color: var(--pro-text-secondary);
  text-decoration: none;
  font-size: 13px;
  border-left: none;
  transition: 
    background 0.15s ease,
    color 0.15s ease;
}

[data-nav-position="bottom"] .nav-group-items .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
  border-left: none;
}

[data-nav-position="bottom"] .nav-group-items .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
}

[data-nav-position="bottom"] .nav-group-items .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.7;
  margin-right: 10px;
  flex-shrink: 0;
}

[data-nav-position="bottom"] .nav-group-items .nav-link:hover .nav-icon,
[data-nav-position="bottom"] .nav-group-items .nav-link.active .nav-icon {
  opacity: 1;
}

[data-nav-position="bottom"] .nav-group-items .nav-text {
  flex: 1;
  white-space: nowrap;
}

/* Show dropdown when expanded */
[data-nav-position="bottom"] .nav-group.expanded .nav-group-items,
[data-nav-position="bottom"] .nav-group.open .nav-group-items {
  display: flex;
}

[data-nav-position="bottom"] .nav-standalone {
  list-style: none;
}

[data-nav-position="bottom"] .nav-standalone .nav-link {
  height: calc(var(--nav-height-horizontal) - 16px);
  white-space: nowrap;
  padding: 0 12px;
}

/* Always hide flyout in bottom nav - use dropdown instead */
[data-nav-position="bottom"] .nav-flyout,
[data-nav-position="bottom"] .sidebar.collapsed .nav-flyout,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-flyout,
[data-nav-position="bottom"] .sidebar.collapsed .nav-group:hover .nav-flyout,
[data-nav-position="bottom"] .sidebar.collapsed .nav-standalone:hover .nav-flyout {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Collapsed state for bottom nav - icons only with click dropdowns */
[data-nav-position="bottom"] .sidebar.collapsed,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed {
  width: 100%; /* Keep full width */
  overflow: visible !important;
}

/* Ensure overflow visible for dropdown to show */
[data-nav-position="bottom"] .sidebar.collapsed .sidebar-nav,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .sidebar-nav {
  overflow: visible !important;
}

[data-nav-position="bottom"] .sidebar.collapsed .nav-group,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group {
  overflow: visible;
}

[data-nav-position="bottom"] .sidebar.collapsed .nav-text,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-text {
  display: none;
}

[data-nav-position="bottom"] .sidebar.collapsed .nav-group-header,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group-header {
  padding: 0 12px;
  min-width: 44px;
  height: calc(var(--nav-height-horizontal) - 16px);
}

[data-nav-position="bottom"] .sidebar.collapsed .nav-standalone .nav-link,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-standalone .nav-link {
  padding: 0 12px;
  min-width: 44px;
}

/* Override navigation.css collapsed rules - use dropdown not flyout */
[data-nav-position="bottom"] .sidebar.collapsed .nav-group-items,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group-items {
  /* Reset from vertical collapsible to dropdown */
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  min-width: 200px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 8px;
  z-index: 1200;
  max-height: none !important;
  opacity: 1 !important;
  margin: 0 !important;
  overflow: visible !important;
}

/* Show collapsed dropdown when expanded */
[data-nav-position="bottom"] .sidebar.collapsed .nav-group.expanded .nav-group-items,
[data-nav-position="bottom"] .sidebar.collapsed .nav-group.open .nav-group-items,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group.expanded .nav-group-items,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group.open .nav-group-items {
  display: flex !important;
  flex-direction: column;
}

/* Show text in collapsed dropdown items */
[data-nav-position="bottom"] .sidebar.collapsed .nav-group-items .nav-text,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group-items .nav-text {
  display: inline !important;
}

/* Sidebar toggle for bottom nav - positioned at end of nav, vertically centered */
[data-nav-position="bottom"] .sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  margin-left: auto;
  margin-right: 12px;
  width: 32px;
  height: 32px;
  align-self: center;
}

/* Main wrapper adjustment for bottom nav */
[data-nav-position="bottom"] .main-wrapper {
  margin-left: 0;
  margin-bottom: var(--nav-height-horizontal);
  min-height: calc(100vh - var(--nav-height-horizontal));
}

[data-nav-position="bottom"] .main-wrapper.sidebar-collapsed {
  margin-left: 0;
  margin-bottom: var(--nav-height-horizontal);
}

/* Sidebar footer for horizontal nav positions */
[data-nav-position="top"] .sidebar-footer,
[data-nav-position="bottom"] .sidebar-footer {
  margin-top: auto;
  padding: 6px 8px;
  border-top: 1px solid var(--pro-border-color, #30363d);
}

/* Adjust sticky header for bottom nav */
[data-nav-position="bottom"] .top-header {
  position: sticky;
  top: 0;
}

/* ============================================
   NAVIGATION POSITION TRANSITIONS
   ============================================ */
.sidebar,
.main-wrapper {
  transition: 
    width var(--sidebar-transition),
    height var(--sidebar-transition),
    margin var(--sidebar-transition),
    transform var(--sidebar-transition),
    left var(--sidebar-transition),
    right var(--sidebar-transition),
    top var(--sidebar-transition),
    bottom var(--sidebar-transition);
}

/* Mobile Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
  display: none;
  background: var(--pro-bg-tertiary);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-primary);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   RESPONSIVE - Mobile
   Force default left sidebar layout on mobile
   regardless of nav-position preference
   ============================================ */
@media (max-width: 768px) {
  /* Reset all nav positions to default left sidebar on mobile */
  [data-nav-position="top"] .sidebar,
  [data-nav-position="right"] .sidebar,
  [data-nav-position="bottom"] .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--sidebar-width-expanded) !important;
    height: 100vh;
    flex-direction: column;
    border-right: 1px solid var(--pro-border-color);
    border-left: none;
    border-top: none;
    border-bottom: none;
    transform: translateX(-100%);
    z-index: 1001;
  }
  
  [data-nav-position="top"] .sidebar.open,
  [data-nav-position="top"] .sidebar.mobile-open,
  [data-nav-position="right"] .sidebar.open,
  [data-nav-position="right"] .sidebar.mobile-open,
  [data-nav-position="bottom"] .sidebar.open,
  [data-nav-position="bottom"] .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  /* Reset main wrapper for all positions */
  [data-nav-position="top"] .main-wrapper,
  [data-nav-position="right"] .main-wrapper,
  [data-nav-position="bottom"] .main-wrapper {
    margin: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
  }
  
  /* Reset sidebar header for horizontal navs */
  [data-nav-position="top"] .sidebar-header,
  [data-nav-position="bottom"] .sidebar-header {
    flex-direction: row;
    padding: 1.5rem;
    justify-content: space-between;
    border-bottom: 1px solid var(--pro-border-color);
    height: auto;
    flex-shrink: 0;
    width: 100%;
    border-right: none;
  }
  
  /* Reset sidebar nav for horizontal navs */
  [data-nav-position="top"] #sidebarNav,
  [data-nav-position="bottom"] #sidebarNav {
    flex-direction: column;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 0;
  }
  
  /* Reset nav groups for horizontal navs */
  [data-nav-position="top"] .nav-group,
  [data-nav-position="bottom"] .nav-group,
  [data-nav-position="top"] .nav-standalone,
  [data-nav-position="bottom"] .nav-standalone {
    position: relative;
    flex-direction: column;
  }
  
  [data-nav-position="top"] .nav-group-header,
  [data-nav-position="bottom"] .nav-group-header {
    padding: 12px 14px;
    justify-content: flex-start;
    width: 100%;
  }
  
  [data-nav-position="top"] .nav-group-items,
  [data-nav-position="bottom"] .nav-group-items {
    position: static;
    display: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: auto;
    z-index: auto;
  }
  
  [data-nav-position="top"] .nav-group.expanded .nav-group-items,
  [data-nav-position="bottom"] .nav-group.expanded .nav-group-items {
    display: block;
    padding-left: 1rem;
  }
  
  /* Reset chevron rotation */
  [data-nav-position="top"] .nav-group-chevron,
  [data-nav-position="bottom"] .nav-group-chevron {
    transform: rotate(0);
  }
  
  [data-nav-position="top"] .nav-group.expanded .nav-group-chevron,
  [data-nav-position="bottom"] .nav-group.expanded .nav-group-chevron {
    transform: rotate(90deg);
  }
  
  /* Show logo text on mobile */
  [data-nav-position="top"] .sidebar-logo-text,
  [data-nav-position="bottom"] .sidebar-logo-text {
    display: block;
  }
  
  /* Default sidebar styles */
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width-expanded) !important;
    z-index: 1001;
  }
  
  .sidebar.open,
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .sidebar.collapsed,
  .sidebar.sidebar-collapsed {
    width: var(--sidebar-width-expanded) !important;
    transform: translateX(-100%);
  }
  
  .sidebar.collapsed.open,
  .sidebar.collapsed.mobile-open,
  .sidebar.sidebar-collapsed.mobile-open {
    transform: translateX(0);
  }

  .main-wrapper,
  .main-wrapper.sidebar-collapsed {
    margin-left: 0 !important;
  }

  .top-header {
    padding: 15px;
  }

  .main-content {
    padding: 1em;
  }

  .timezone-select {
    min-width: 120px;
    font-size: 12px;
  }

  .header-badge {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  .mobile-menu-btn {
    display: block;
  }
}

/* css/cards.css */
/* ============================================
   CARDS.CSS - Card Components
   Funky cards, table cards, stat cards
   ============================================ */

/* ============================================
   FUNKY CARDS
   ============================================ */
.funky-card {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  animation: cardSlideIn 0.7s ease-out;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.funky-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--user-accent, var(--pro-accent-primary));
  border-radius: 15px 15px 0 0;
  display: none; /* Only show in even-funkyer theme */
}

/* ============================================
   TABLE CARD VARIANT
   Edge-to-edge tables with no padding
   ============================================ */
.funky-card.table-card {
  padding: 0;
  overflow: hidden;
}

.funky-card.table-card::before {
  display: none;
}

.funky-card.table-card .funky-header-actions {
  padding: 16px 20px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--pro-border-color);
  background: var(--pro-bg-secondary);
}

.funky-card.table-card .dataTables_wrapper {
  padding: 0;
}

.funky-card.table-card table.dataTable {
  margin: 0 !important;
  border-radius: 0;
}

.funky-card.table-card table.dataTable thead th:first-child {
  border-top-left-radius: 0;
}

.funky-card.table-card table.dataTable thead th:last-child {
  border-top-right-radius: 0;
}

.funky-card.table-card .dataTables_info,
.funky-card.table-card .dataTables_paginate,
.funky-card.table-card .dataTables_length {
  padding: 12px 20px;
  background: var(--pro-bg-secondary);
  border-top: 1px solid var(--pro-border-color);
}

/* DataTable footer row layout */
.funky-card.table-card .dataTables_wrapper > div:last-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 20px;
  background: var(--pro-bg-secondary);
  border-top: 1px solid var(--pro-border-color);
}

/* ============================================
   DATATABLE BUTTONS ROW INSIDE FUNKY-CARD
   Styles the buttons row generated by DataTables dom
   ============================================ */
.funky-card .dataTables_wrapper > .row:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin: 0;
  background: var(--pro-bg-secondary);
  border-bottom: 1px solid var(--pro-border-color);
}

.funky-card .dataTables_wrapper > .row:first-child > [class*="col-"] {
  flex: 0 0 auto;
  width: auto;
  padding: 0;
}

.funky-card .dataTables_wrapper > .row:first-child .dt-buttons {
  display: flex !important;
  gap: 8px;
  align-items: center;
}

.funky-card .dataTables_wrapper > .row:first-child .dataTables_length {
  display: flex;
  align-items: center;
  gap: 8px;
}

.funky-card .dataTables_wrapper > .row:first-child .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--pro-text-secondary);
  font-size: 13px;
}

.funky-card .dataTables_wrapper > .row:first-child .dataTables_length select {
  background: var(--pro-bg-tertiary);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  color: var(--pro-text-primary);
  padding: 6px 28px 6px 12px;
  font-size: 13px;
  height: 32px;
  min-width: 70px;
}

.funky-card .dataTables_wrapper > .row:first-child .dataTables_length select:focus {
  border-color: var(--pro-accent-primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--pro-accent-primary-muted);
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--pro-border-color);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--pro-text-primary);
  margin: 0;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  animation: statsFadeInUp 0.6s ease-out;
}

@keyframes statsFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 15px;
  padding: 20px;
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info), var(--pro-accent-primary));
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
  border-radius: 15px 15px 0 0;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--user-accent-muted, rgba(47, 129, 247, 0.15)) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.stat-icon {
  font-size: 42px;
  margin-bottom: 12px;
  display: block;
  animation: statFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px var(--pro-shadow-color, rgba(0, 0, 0, 0.2)));
  position: relative;
  z-index: 1;
}

@keyframes statFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.stat-label {
  font-size: 13px;
  color: var(--pro-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 600;
  display: block;
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  display: block;
  position: relative;
  z-index: 1;
}

.stat-change {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-change.positive {
  color: var(--pro-accent-success, #10b981);
}

.stat-change.negative {
  color: var(--pro-accent-danger, #ef4444);
}

/* ============================================
   DETAIL ROWS (Modal details)
   ============================================ */
.security-details-grid,
.client-details-grid {
  display: grid;
  gap: 15px;
}

.detail-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 15px;
  padding: 12px;
  background: var(--pro-bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--pro-border-color);
}

.detail-label {
  font-weight: 600;
  color: var(--user-accent, var(--pro-accent-primary));
}

.detail-value {
  color: var(--pro-text-primary);
  word-break: break-word;
}

/* Full width detail row for config */
.detail-row.full-width {
  grid-template-columns: 1fr;
}

.detail-row.full-width .detail-label {
  margin-bottom: 10px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-icon {
    font-size: 36px;
  }
  
  .stat-value {
    font-size: 30px;
  }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .stat-card {
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .stat-card::after {
    display: none;
  }
  
  .stat-card::before {
    animation: none;
    background: linear-gradient(90deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  }
  
  .stat-icon {
    font-size: 32px;
    margin-bottom: 0;
    animation: none;
    flex-shrink: 0;
  }
  
  .stat-content {
    flex: 1;
  }
  
  .stat-label {
    font-size: 11px;
    margin-bottom: 5px;
  }
  
  .stat-value {
    font-size: 26px;
  }
  
  .funky-card {
    padding: 18px;
    border-radius: 12px;
    animation-duration: 0.4s;
  }
}

/* Mobile Portrait (0 - 576px) */
@media (max-width: 576px) {
  .stats-row {
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .stat-card {
    padding: 15px;
    border-radius: 12px;
  }
  
  .stat-icon {
    font-size: 28px;
  }
  
  .stat-label {
    font-size: 10px;
    letter-spacing: 0.5px;
  }
  
  .stat-value {
    font-size: 22px;
  }
  
  .funky-card {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
  }
}

/* Ultra-wide screens (1400px+) */
@media (min-width: 1400px) {
  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
  }
  
  .stat-card {
    padding: 30px;
  }
  
  .stat-icon {
    font-size: 48px;
  }
  
  .stat-value {
    font-size: 42px;
  }
}

/* Focus styles for keyboard navigation */
.stat-card:focus-visible {
  outline: 3px solid var(--user-accent, var(--pro-accent-primary));
  outline-offset: 3px;
}

/* ============================================
   WELCOME BANNER
   Theme-aware gradient banner for dashboard
   ============================================ */
.welcome-banner {
  background: linear-gradient(135deg, var(--pro-accent-primary) 0%, var(--pro-accent-purple) 100%);
  color: white;
  margin-bottom: 2rem;
}

.welcome-banner .welcome-content {
  padding: 2rem;
}

.welcome-banner h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: white;
}

.welcome-banner p {
  margin: 0;
  opacity: 0.9;
  font-size: 1.1rem;
  color: white;
}

/* Print styles */
@media print {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    page-break-inside: avoid;
  }
  
  .stat-card {
    border: 1px solid var(--pro-border-color);
    box-shadow: none;
    animation: none;
  }
  
  .stat-card::before,
  .stat-card::after {
    display: none;
  }
}

/* css/forms.css */
/* ============================================
   FORMS.CSS - Form Controls & Inputs
   Forms, checkboxes, inputs, selects, JSON editor
   ============================================ */

/* ============================================
   GLOBAL CARET COLOR FOR ALL INPUTS
   ============================================ */
input,
textarea,
[contenteditable="true"] {
  caret-color: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   FORM CONTROLS BASE
   ============================================ */
input.form-control,
textarea.form-control,
select.form-control,
select.form-select,
.je-object__container input:not([type="checkbox"]),
.je-object__container textarea,
.je-object__container select {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
  border-radius: 8px !important;
  padding: var(--form-control-padding, 0.375rem 0.75rem) !important;
  width: 100% !important;
  height: var(--form-control-height, 38px);
  font-size: var(--btn-font-md, 0.875rem);
  caret-color: var(--user-accent, var(--pro-accent-primary)) !important;
}

textarea.form-control,
.je-object__container textarea {
  min-height: 80px !important;
  height: auto;
  resize: vertical !important;
}

input.form-control:focus,
textarea.form-control:focus,
select.form-control:focus,
.je-object__container input:focus,
.je-object__container textarea:focus,
.je-object__container select:focus {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.1)) !important;
  outline: none !important;
}

select.form-select {
  padding: var(--form-control-padding, 0.375rem 0.625rem);
  height: var(--form-control-height, 38px);
  font-size: var(--btn-font-sm, 0.75rem);
  border-radius: 6px;
  border: 1px solid var(--pro-border-color);
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
}

select.form-select:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  outline: none;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.1));
}

/* Form groups spacing */
.form-group,
.je-indented-panel,
.je-child-editor-holder {
  margin-bottom: 20px !important;
}

/* Labels */
label,
.je-form-input-label {
  color: var(--pro-text-primary) !important;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.form-text,
.je-form-input-hint {
  color: var(--pro-text-secondary) !important;
  opacity: 0.7;
  font-size: 12px !important;
}

/* Required field indicator */
label.required::after,
.je-form-input-label.required::after {
  content: " *";
  color: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   CHECKBOX STYLING
   ============================================ */
.je-checkbox-control {
  display: flex;
  align-items: center;
  padding: 10px 0;
  background: transparent !important;
}

.je-checkbox-control input[type="checkbox"],
#jsonEditorContainer input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  border: 2px solid var(--pro-border-color);
  border-radius: 4px;
  background: var(--pro-bg-secondary) !important;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  margin: 0 10px 0 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  flex-grow: 0;
}

.je-checkbox-control input[type="checkbox"]:checked,
#jsonEditorContainer input[type="checkbox"]:checked {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.je-checkbox-control input[type="checkbox"]:checked::after,
#jsonEditorContainer input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.je-checkbox-control input[type="checkbox"]:focus,
#jsonEditorContainer input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
}

.je-checkbox-control label {
  margin: 0 !important;
  padding: 0 !important;
}

/* Label styling for checkboxes */
.je-checkbox-control label,
.checkbox label,
label.form-check-label,
.form-check label {
  color: var(--pro-text-primary) !important;
  cursor: pointer;
  font-weight: 500 !important;
}

/* Override Bootstrap checkbox classes */
.form-check {
  background: transparent !important;
  padding: 10px 0 !important;
  padding-left: 0 !important;  /* Align with other form fields */
  margin-left: 0 !important;
}

.form-check-input {
  appearance: none !important;
  -webkit-appearance: none !important;
  margin-left: 0 !important;
  float: none !important;
}

.form-check-label {
  margin-left: 8px !important;
  display: inline !important;
}

/* Fix form-switch alignment in modals */
.form-check.form-switch {
  padding-left: 0 !important;
}

.form-check.form-switch .form-check-input {
  margin-left: 0 !important;
  float: none !important;
}

.form-check.form-switch .form-check-label {
  margin-left: 8px !important;
}

/* ============================================
   ERROR STYLING
   ============================================ */
.has-error input,
.has-error textarea,
.has-error select,
.je-child-editor-holder.has-error input,
.je-child-editor-holder.has-error textarea,
.je-child-editor-holder.has-error select {
  border-color: var(--pro-accent-danger) !important;
  background: var(--pro-accent-danger-muted) !important;
}

.error-message,
.je-error {
  color: var(--pro-accent-danger) !important;
  font-size: 12px !important;
  margin-top: 5px !important;
  display: block !important;
  font-weight: 500 !important;
}

.invalid-feedback {
  color: var(--pro-accent-danger) !important;
  font-size: 12px !important;
  display: block !important;
  margin-top: 5px !important;
}

/* ============================================
   JSON EDITOR CONTAINER
   ============================================ */
#jsonEditorContainer {
  background: var(--pro-bg-elevated);
  padding: 25px;
  border-radius: 12px;
  min-height: 350px;
}

/* Override Bootstrap bg-light class */
#jsonEditorContainer .bg-light,
.je-object__container.bg-light,
.je-indented-panel.bg-light {
  background: transparent !important;
}

.je-object__container,
.je-indented-panel {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Form field containers */
.je-child-editor-holder > div {
  margin-bottom: 20px;
}

.je-form-input-label {
  color: var(--pro-text-primary) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  margin-bottom: 8px !important;
  display: block !important;
}

.je-object__title {
  color: var(--user-accent, var(--pro-accent-primary)) !important;
  font-weight: 700 !important;
  margin-bottom: 20px;
  display: none; /* Hide root object title */
}

.je-switcher {
  background: var(--pro-bg-elevated) !important;
  border-color: var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
}

.je-switcher:hover {
  background: var(--pro-bg-secondary) !important;
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
}

/* Button styling for JSON Editor controls */
.json-editor-btn-add,
.json-editor-btn-delete,
.json-editor-btn-move {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  transition: all 0.2s ease !important;
}

.json-editor-btn-add:hover {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

.json-editor-btn-delete:hover {
  background: var(--pro-accent-danger) !important;
  border-color: var(--pro-accent-danger) !important;
  color: white !important;
}

/* ============================================
   SEARCH BOX STYLES
   ============================================ */
.funky-search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.funky-search-box input {
  width: 100%;
  padding: var(--form-control-padding, 0.375rem 0.75rem);
  padding-left: calc(var(--pro-spacing-md, 1rem) + 1rem); /* room for icon */
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  color: var(--pro-text-primary);
  font-size: var(--btn-font-sm, 0.75rem);
  height: var(--form-control-height, 38px);
  transition: all 0.2s ease;
  caret-color: var(--user-accent, var(--pro-accent-primary));
}

.funky-search-box input:focus {
  outline: none;
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.1));
}

.funky-search-box::before {
  content: '🔍';
  position: absolute;
  left: var(--pro-spacing-xs, 0.5rem);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--btn-font-md, 0.875rem);
  pointer-events: none;
}

.funky-search-box input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--user-accent-muted, rgba(47, 129, 247, 0.3));
}

/* ============================================
   SELECT2 INTEGRATION
   ============================================ */
.select2-container--default .select2-selection--single {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 8px !important;
  height: 38px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--pro-text-primary) !important;
  line-height: 36px !important;
}

.select2-dropdown {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 8px !important;
}

.select2-results__option {
  color: var(--pro-text-primary) !important;
}

.select2-results__option--highlighted {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
}

/* Select2 Bootstrap 5 Theme Overrides */
.select2-container--bootstrap-5 .select2-selection {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  height: 38px !important;
  min-height: 38px !important;
  transition: all 0.2s ease !important;
}

/* Modal form Select2 - match Bootstrap form controls */
.modal .select2-container--bootstrap-5 .select2-selection {
  border-radius: 0.375rem !important;
  padding: 0.375rem 0.75rem !important;
  height: 38px !important;
  min-height: 38px !important;
  border-width: 1px !important;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  line-height: 1.5 !important;
  padding-left: 0 !important;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  right: 8px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  color: var(--pro-text-primary) !important;
  padding-left: 0 !important;
  line-height: 26px !important;
  font-size: 12px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
  color: var(--pro-text-secondary) !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.1)) !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  right: 10px !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--user-accent, var(--pro-accent-primary)) !important;
  border-radius: 8px !important;
  box-shadow: var(--pro-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.3)) !important;
  z-index: 9999 !important;
}

.select2-container--bootstrap-5 .select2-results__option {
  padding: 8px 12px !important;
  color: var(--pro-text-primary) !important;
  font-size: 12px !important;
  transition: all 0.2s ease !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background: var(--pro-bg-secondary) !important;
  color: var(--user-accent, var(--pro-accent-primary)) !important;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 6px !important;
  color: var(--pro-text-primary) !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  height: 32px !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  outline: none !important;
}

.select2-container--bootstrap-5 .select2-selection__clear {
  color: var(--pro-text-secondary) !important;
  font-size: 16px !important;
  margin-right: 8px !important;
  transition: color 0.2s ease !important;
}

.select2-container--bootstrap-5 .select2-selection__clear:hover {
  color: var(--user-accent, var(--pro-accent-primary)) !important;
}

/* Multi-select Select2 */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  background-color: var(--user-accent, var(--pro-accent-primary)) !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 2px 8px !important;
  color: white !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  margin: 2px 3px 2px 0 !important;
  line-height: 1.3 !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
  color: white !important;
  opacity: 0.8 !important;
  font-weight: bold !important;
  margin-right: 4px !important;
  font-size: 0.7rem !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
  opacity: 1 !important;
}

/* Client Filter Container */
.funky-client-filter {
  display: inline-block;
  vertical-align: top;
}

.funky-client-filter select {
  width: 200px;
  height: 36px;
  font-size: 12px;
}

/* Date Filter Containers */
.funky-date-filter {
  display: inline-block;
  vertical-align: top;
}

.funky-date-filter select {
  width: 150px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  height: 36px;
}

.funky-date-range {
  display: inline-block;
  vertical-align: top;
}

.funky-date-range input {
  width: 240px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  height: 36px;
  cursor: pointer;
}

.funky-date-range input:hover,
.funky-date-range input:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  outline: none;
}

/* ============================================
   TIMEZONE SELECTOR STYLES
   ============================================ */

/* Timezone Selector Base */
#globalTimezoneSelector {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  color: var(--pro-text-primary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  outline: none;
  min-width: 180px;
  transition: all 0.2s ease;
  height: 36px;
}

#globalTimezoneSelector:hover {
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.1));
}

#globalTimezoneSelector:focus {
  outline: none;
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.15));
}

/* Select2 Container for Timezone */
.select2-container--timezone {
  height: 36px;
}

/* Select2 Selection Box for Timezone */
.select2-container--timezone .select2-selection {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 6px !important;
  height: 36px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.2s ease !important;
}

.select2-container--timezone .select2-selection:hover {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.1)) !important;
}

.select2-container--timezone.select2-container--focus .select2-selection,
.select2-container--timezone.select2-container--open .select2-selection {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.15)) !important;
}

.select2-container--timezone .select2-selection__rendered {
  color: var(--pro-text-primary) !important;
  padding: 0 !important;
  line-height: 36px !important;
  font-weight: 500 !important;
  font-size: 12px !important;
}

.select2-container--timezone .select2-selection__arrow {
  height: 36px !important;
  right: 10px !important;
  width: 18px !important;
  top: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container--timezone .select2-selection__arrow b {
  border-color: var(--pro-text-secondary) transparent transparent transparent !important;
  border-width: 5px 4px 0 4px !important;
  margin: 0 !important;
}

.select2-container--timezone.select2-container--open .select2-selection__arrow b {
  border-color: transparent transparent var(--user-accent, var(--pro-accent-primary)) transparent !important;
  border-width: 0 4px 5px 4px !important;
}

/* Select2 Dropdown for Timezone */
.select2-container--timezone .select2-dropdown {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--user-accent, var(--pro-accent-primary));
  border-radius: 12px;
  box-shadow: var(--pro-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.4));
  margin-top: 8px;
  overflow: hidden;
  min-width: 320px !important;
}

/* Search Field for Timezone */
.select2-container--timezone .select2-search--dropdown {
  padding: 12px;
  background: var(--pro-bg-elevated);
  border-bottom: 1px solid var(--pro-border-color);
}

.select2-container--timezone .select2-search--dropdown .select2-search__field {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  width: 100%;
  transition: all 0.2s ease;
}

.select2-container--timezone .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  outline: none;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.1));
}

.select2-container--timezone .select2-search--dropdown .select2-search__field::placeholder {
  color: var(--pro-text-secondary);
}

/* Results Container for Timezone */
.select2-container--timezone .select2-results {
  max-height: 400px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.select2-container--timezone .select2-results__options {
  padding: 8px 0;
}

/* Group Headers for Timezone */
.select2-container--timezone .select2-results__group {
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 16px 6px;
  margin-top: 8px;
  background: var(--pro-bg-secondary);
  border-left: 3px solid var(--user-accent, var(--pro-accent-primary));
}

.select2-container--timezone .select2-results__group:first-child {
  margin-top: 0;
}

/* Group option containers need padding adjustment */
.select2-container--timezone .select2-results__option.select2-results__option--group {
  padding: 0 !important;
}

/* Options for Timezone */
.select2-container--timezone .select2-results__option {
  color: var(--pro-text-primary);
  padding: 11px 20px;
  font-size: 13px;
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.select2-container--timezone .select2-results__option--highlighted {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

.select2-container--timezone .select2-results__option[aria-selected="true"] {
  background: var(--user-accent-muted, rgba(255, 109, 0, 0.12)) !important;
  color: var(--user-accent, var(--pro-accent-primary)) !important;
  font-weight: 600 !important;
  position: relative;
}

.select2-container--timezone .select2-results__option[aria-selected="true"]::before {
  content: "✓";
  position: absolute;
  left: 6px;
  font-weight: bold;
  font-size: 14px;
}

.select2-container--timezone .select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted) {
  padding-left: 28px;
}

/* Scrollbar for timezone dropdown */
.select2-container--timezone .select2-results::-webkit-scrollbar {
  width: 10px;
}

.select2-container--timezone .select2-results::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary);
  border-radius: 0 10px 10px 0;
}

.select2-container--timezone .select2-results::-webkit-scrollbar-thumb {
  background: var(--pro-border-color);
  border-radius: 10px;
  border: 2px solid var(--pro-bg-secondary);
}

.select2-container--timezone .select2-results::-webkit-scrollbar-thumb:hover {
  background: var(--user-accent, var(--pro-accent-primary));
}

/* css/buttons.css */
/* ============================================
   BUTTONS.CSS - Funky Button System
   Phase 3C: Consolidated button styles
   ============================================ */

/* ============================================
   CSS VARIABLES - Button Theming
   Note: --btn-height-* and --btn-padding-* are defined in themes.css
   under [data-density] selectors to support compact/comfortable/spacious modes
   ============================================ */
:root {
  /* Button Font Sizes */
  --btn-font-xs: 11px;
  --btn-font-sm: 12px;
  --btn-font-md: 13px;
  --btn-font-lg: 14px;
  
  /* Button Border Radius */
  --btn-radius: 6px;
  --btn-radius-sm: 4px;
  --btn-radius-lg: 8px;
  --btn-radius-round: 9999px;
}

/* ============================================
   BASE BUTTON RESET
   ============================================ */
.btn-funky,
.btn-funky-primary,
.btn-funky-secondary,
.btn-funky-outline,
.btn-funky-warning,
.btn-funky-danger,
.btn-funky-success,
.btn-icon {
  /* Reset */
  margin: 0;
  border: none;
  background: none;
  font-family: inherit;
  
  /* Consistent box model */
  box-sizing: border-box;
  
  /* Flexbox alignment - fixes height issues */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  
  /* Typography */
  font-weight: 500;
  font-size: var(--btn-font-md);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  
  /* Interaction */
  cursor: pointer;
  user-select: none;
  
  /* Transitions */
  transition: all 0.15s ease;
  
  /* Default sizing */
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  border-radius: var(--btn-radius);
}

/* ============================================
   BUTTON SIZE VARIANTS
   ============================================ */
.btn-xs {
  height: var(--btn-height-xs);
  padding: var(--btn-padding-xs);
  font-size: var(--btn-font-xs);
  border-radius: var(--btn-radius-sm);
  gap: 4px;
}

.btn-sm {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
  font-size: var(--btn-font-sm);
  border-radius: var(--btn-radius-sm);
  gap: 4px;
}

.btn-md {
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  font-size: var(--btn-font-md);
}

.btn-lg {
  height: var(--btn-height-lg);
  padding: var(--btn-padding-lg);
  font-size: var(--btn-font-lg);
  border-radius: var(--btn-radius-lg);
  font-weight: 600;
  gap: 8px;
}

/* ============================================
   PRIMARY BUTTON (.btn-funky, .btn-funky-primary)
   Uses user accent color with fallback to default
   ============================================ */
.btn-funky,
.btn-funky-primary {
  background: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  color: white;
  border: 1px solid transparent;
}

.btn-funky:hover,
.btn-funky-primary:hover {
  background: var(--user-accent-hover, var(--pro-accent-primary-hover, #58a6ff));
  box-shadow: 0 2px 8px rgba(var(--user-accent-rgb, 47, 129, 247), 0.3);
  color: white;
}

.btn-funky:active,
.btn-funky-primary:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* ============================================
   SECONDARY BUTTON
   ============================================ */
.btn-funky-secondary {
  background: var(--pro-bg-tertiary, #21262d);
  color: var(--pro-text-primary, #e6edf3);
  border: 1px solid var(--pro-border-color, #30363d);
}

.btn-funky-secondary:hover {
  background: var(--pro-bg-hover, #30363d);
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: var(--pro-text-primary, #e6edf3);
}

/* ============================================
   OUTLINE BUTTON
   ============================================ */
.btn-funky-outline {
  background: transparent;
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  border: 1px solid var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.btn-funky-outline:hover {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: white;
}

/* ============================================
   SEMANTIC BUTTON VARIANTS
   ============================================ */
.btn-funky-success {
  background: var(--pro-accent-success, #3fb950);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-success:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-success-muted, rgba(63, 185, 80, 0.3));
}

.btn-funky-warning {
  background: var(--pro-accent-warning, #d29922);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-warning:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-warning-muted, rgba(210, 153, 34, 0.3));
}

.btn-funky-danger {
  background: var(--pro-accent-danger, #f85149);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-danger:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.3));
}

.btn-funky-info {
  background: var(--pro-accent-info, #0ea5e9);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-info:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-info-muted, rgba(14, 165, 233, 0.3));
}

.btn-funky-purple {
  background: var(--pro-accent-purple, #8b5cf6);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-purple:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-purple-muted, rgba(139, 92, 246, 0.3));
}

/* ============================================
   ICON BUTTON (Square action buttons)
   ============================================ */
.btn-icon {
  width: var(--btn-height-sm);
  height: var(--btn-height-sm);
  padding: 0;
  border-radius: var(--btn-radius-sm);
  font-size: 14px;
  background: var(--pro-bg-tertiary, #21262d);
  color: var(--pro-text-secondary, #8b949e);
  border: 1px solid var(--pro-border-color, #30363d);
}

.btn-icon:hover {
  color: var(--pro-text-primary, #e6edf3);
  border-color: var(--pro-text-secondary, #8b949e);
}

/* ============================================
   ACTION BUTTON VARIANTS (View, Edit, Delete, etc.)
   ============================================ */
.btn-view {
  background: var(--pro-accent-info-muted, rgba(88, 166, 255, 0.15));
  color: var(--pro-accent-info, #58a6ff);
  border-color: transparent;
}

.btn-view:hover {
  background: var(--pro-accent-info-muted-hover, rgba(88, 166, 255, 0.3));
  color: var(--pro-accent-info, #58a6ff);
}

.btn-edit {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
  border-color: transparent;
}

.btn-edit:hover {
  background: var(--pro-accent-purple-muted-hover, rgba(139, 92, 246, 0.3));
  color: var(--pro-accent-purple);
}

.btn-delete {
  background: var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.15));
  color: var(--pro-accent-danger, #f85149);
  border-color: transparent;
}

.btn-delete:hover {
  background: var(--pro-accent-danger-muted-hover, rgba(248, 81, 73, 0.3));
  color: var(--pro-accent-danger, #f85149);
}

.btn-clone {
  background: var(--pro-accent-success-muted, rgba(63, 185, 80, 0.15));
  color: var(--pro-accent-success, #3fb950);
  border-color: transparent;
}

.btn-clone:hover {
  background: var(--pro-accent-success-muted-hover, rgba(63, 185, 80, 0.3));
  color: var(--pro-accent-success, #3fb950);
}

.btn-history {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
  border-color: transparent;
  text-decoration: none;
}

.btn-history:hover {
  background: rgba(139, 92, 246, 0.3);
  color: var(--pro-accent-purple);
}

/* ============================================
   BUTTON GROUPS
   ============================================ */
.btn-group {
  display: inline-flex;
  align-items: stretch; /* Ensures equal heights */
  gap: 0;
}

.btn-group > .btn-funky,
.btn-group > .btn-funky-primary,
.btn-group > .btn-funky-secondary,
.btn-group > .btn-icon,
.btn-group > button {
  border-radius: 0;
  margin: 0;
}

.btn-group > :first-child {
  border-radius: var(--btn-radius) 0 0 var(--btn-radius);
}

.btn-group > :last-child {
  border-radius: 0 var(--btn-radius) var(--btn-radius) 0;
}

.btn-group > :only-child {
  border-radius: var(--btn-radius);
}

/* Spaced button group */
.btn-group-spaced {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-group-spaced > * {
  border-radius: var(--btn-radius) !important;
}

/* Action buttons group (in tables) */
.action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */
.btn-funky:focus-visible,
.btn-funky-primary:focus-visible,
.btn-funky-secondary:focus-visible,
.btn-funky-outline:focus-visible,
.btn-funky-warning:focus-visible,
.btn-funky-danger:focus-visible,
.btn-funky-success:focus-visible,
.btn-icon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--user-accent-rgb, 47, 129, 247), 0.4);
}

/* Remove default focus outline */
.btn-funky:focus,
.btn-funky-primary:focus,
.btn-funky-secondary:focus,
.btn-icon:focus {
  outline: none;
}

/* ============================================
   DISABLED STATE
   ============================================ */
.btn-funky:disabled,
.btn-funky-primary:disabled,
.btn-funky-secondary:disabled,
.btn-funky-outline:disabled,
.btn-funky-warning:disabled,
.btn-funky-danger:disabled,
.btn-funky-success:disabled,
.btn-icon:disabled,
.btn-funky.disabled,
.btn-icon.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   LOADING STATE
   ============================================ */
.btn-funky.loading,
.btn-icon.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-funky.loading::after,
.btn-icon.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

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

/* ============================================
   ICON ANIMATIONS
   ============================================ */
.btn-icon .fa-sync-alt:hover,
.btn-funky .fa-sync-alt:hover,
.btn-icon:hover .fa-sync-alt,
.btn-funky:hover .fa-sync-alt {
  animation: spin-once 0.5s ease;
}

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

/* ============================================
   TOUCH TARGET SIZING (Mobile)
   Uses density variables with 44px fallback for accessibility
   ============================================ */
@media (pointer: coarse) {
  .btn-icon {
    min-width: var(--btn-height-md, 44px);
    min-height: var(--btn-height-md, 44px);
    width: var(--btn-height-md, 44px);
    height: var(--btn-height-md, 44px);
    font-size: 16px;
  }
  
  .btn-funky,
  .btn-funky-primary,
  .btn-funky-secondary {
    min-height: var(--btn-height-md, 44px);
  }
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] .btn-funky,
[data-theme="light"] .btn-funky-primary {
  background: var(--user-accent, #0969da);
  color: white;
  border-color: var(--user-accent, #0969da);
}

[data-theme="light"] .btn-funky:hover,
[data-theme="light"] .btn-funky-primary:hover {
  background: var(--user-accent-hover, #0550ae);
  box-shadow: 0 2px 8px rgba(var(--user-accent-rgb, 9, 105, 218), 0.3);
}

[data-theme="light"] .btn-funky-secondary {
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
  border-color: var(--pro-border-color);
}

[data-theme="light"] .btn-funky-secondary:hover {
  background: var(--pro-bg-tertiary);
  border-color: var(--pro-accent-primary);
}

[data-theme="light"] .btn-funky-outline {
  color: var(--pro-accent-primary);
  border-color: var(--pro-accent-primary);
  background: transparent;
}

[data-theme="light"] .btn-funky-outline:hover {
  background: var(--pro-accent-primary);
  color: var(--pro-text-inverse);
}

[data-theme="light"] .btn-funky-success {
  background: var(--pro-accent-success);
}

[data-theme="light"] .btn-funky-success:hover {
  background: var(--pro-accent-success-text);
  box-shadow: 0 2px 8px var(--pro-accent-success-muted);
}

[data-theme="light"] .btn-funky-warning {
  background: var(--pro-accent-warning);
}

[data-theme="light"] .btn-funky-warning:hover {
  background: var(--pro-accent-warning-text);
  box-shadow: 0 2px 8px var(--pro-accent-warning-muted);
}

[data-theme="light"] .btn-funky-danger {
  background: var(--pro-accent-danger);
}

[data-theme="light"] .btn-funky-danger:hover {
  background: var(--pro-accent-danger-text);
  box-shadow: 0 2px 8px var(--pro-accent-danger-muted);
}

/* Light theme icon buttons */
[data-theme="light"] .btn-icon {
  background: var(--pro-bg-secondary);
  color: var(--pro-text-secondary);
  border-color: var(--pro-border-color);
}

[data-theme="light"] .btn-icon:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
  border-color: var(--pro-border-emphasis);
}

[data-theme="light"] .btn-view {
  background: var(--pro-accent-info-muted);
  color: var(--pro-accent-info);
}

[data-theme="light"] .btn-view:hover {
  background: var(--pro-accent-info-bg);
  color: var(--pro-accent-info-text);
}

[data-theme="light"] .btn-edit {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
}

[data-theme="light"] .btn-edit:hover {
  background: var(--pro-accent-purple-bg);
  color: var(--pro-accent-purple-text);
}

[data-theme="light"] .btn-delete {
  background: var(--pro-accent-danger-muted);
  color: var(--pro-accent-danger);
}

[data-theme="light"] .btn-delete:hover {
  background: var(--pro-accent-danger-bg);
  color: var(--pro-accent-danger-text);
}

[data-theme="light"] .btn-clone {
  background: var(--pro-accent-success-muted);
  color: var(--pro-accent-success);
}

[data-theme="light"] .btn-clone:hover {
  background: var(--pro-accent-success-bg);
  color: var(--pro-accent-success-text);
}

[data-theme="light"] .btn-history {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
}

[data-theme="light"] .btn-history:hover {
  background: var(--pro-accent-purple-bg);
  color: var(--pro-accent-purple-text);
}

/* ============================================
   EVEN-FUNKYER THEME OVERRIDES
   ============================================ */
[data-theme="even-funkyer"] .btn-funky,
[data-theme="even-funkyer"] .btn-funky-primary {
  background: linear-gradient(135deg, var(--user-accent, #ff00ff), #00ffff);
  color: white;
  border: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="even-funkyer"] .btn-funky:hover,
[data-theme="even-funkyer"] .btn-funky-primary:hover {
  box-shadow: 
    0 0 20px rgba(var(--user-accent-rgb, 255, 0, 255), 0.5),
    0 0 40px rgba(0, 255, 255, 0.3);
  filter: brightness(1.1);
}

[data-theme="even-funkyer"] .btn-funky-secondary {
  background: var(--pro-accent-primary-muted);
  border: 1px solid rgba(255, 0, 255, 0.4);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .btn-funky-secondary:hover {
  background: rgba(255, 0, 255, 0.2);
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .btn-funky-outline {
  border-color: var(--pro-accent-primary);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .btn-funky-outline:hover {
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  color: white;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

[data-theme="even-funkyer"] .btn-icon {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 0, 255, 0.3);
  color: var(--pro-accent-secondary);
}

[data-theme="even-funkyer"] .btn-icon:hover {
  background: var(--pro-accent-primary-muted);
  border-color: var(--pro-accent-primary);
  color: var(--pro-accent-primary);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

[data-theme="even-funkyer"] .btn-view {
  background: var(--pro-accent-secondary-muted);
  color: var(--pro-accent-secondary);
}

[data-theme="even-funkyer"] .btn-view:hover {
  background: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

[data-theme="even-funkyer"] .btn-edit {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .btn-edit:hover {
  background: rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

[data-theme="even-funkyer"] .btn-delete {
  background: var(--pro-accent-danger-muted);
  color: var(--pro-accent-danger);
}

[data-theme="even-funkyer"] .btn-delete:hover {
  background: rgba(255, 0, 102, 0.3);
  box-shadow: 0 0 10px var(--pro-accent-danger-muted);
}

[data-theme="even-funkyer"] .btn-clone {
  background: var(--pro-accent-success-muted);
  color: var(--pro-accent-success);
}

[data-theme="even-funkyer"] .btn-clone:hover {
  background: rgba(0, 255, 136, 0.3);
  box-shadow: 0 0 10px var(--pro-accent-success-muted);
}

[data-theme="even-funkyer"] .btn-history {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
}

[data-theme="even-funkyer"] .btn-history:hover {
  background: var(--pro-accent-purple-bg);
  box-shadow: 0 0 10px var(--pro-accent-purple-muted);
}

/* ============================================
   SPECIAL BUTTON CONTEXTS
   ============================================ */

/* Toolbar buttons (smaller, inline) */
.toolbar .btn-funky,
.toolbar .btn-icon {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
  font-size: var(--btn-font-sm);
}

/* Modal footer buttons */
.modal-footer .btn-funky,
.modal-footer .btn-funky-primary,
.modal-footer .btn-funky-secondary {
  min-width: 80px;
}

/* Card action buttons */
.card-actions .btn-icon {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

/* Header buttons */
.header-actions .btn-funky {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
}

/* Table action column buttons */
td .btn-icon,
.dataTables_wrapper .btn-icon {
  width: var(--btn-height-sm);
  height: var(--btn-height-sm);
}

/* ============================================
   FORMAT RULES BUTTON
   ============================================ */
.btn-format-rules {
  /* Match standard button sizing */
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  font-size: var(--btn-font-md);
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: var(--btn-radius);
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}

.btn-format-rules:hover {
  background: var(--pro-bg-tertiary, #21262d);
  border-color: var(--pro-border-emphasis, #484f58);
  color: var(--pro-text-primary, #e6edf3);
}

.btn-format-rules.has-rules {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.btn-format-rules .rule-count {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 10px;
  min-width: 1rem;
  text-align: center;
}

/* Even Funkier theme override */
[data-theme="even-funkyer"] .btn-format-rules.has-rules {
  border-color: var(--funkier-neon-pink, #ff00ff);
  color: var(--funkier-neon-pink, #ff00ff);
  text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

/* ============================================
   BUTTON ROW / HEADER ACTIONS - Responsive
   ============================================ */
.btn-row,
.button-row,
.btn-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Funky Header Actions - Primary responsive layout */
.funky-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

/* Allow items to shrink slightly but prefer wrapping */
.funky-header-actions > * {
  flex-shrink: 1;
  min-width: 0;
}

/* Ensure all buttons in header actions have consistent height */
.funky-header-actions .btn-funky,
.funky-header-actions .btn-funky-primary,
.funky-header-actions .btn-funky-secondary,
.funky-header-actions .btn-funky-warning,
.funky-header-actions .btn-funky-danger,
.funky-header-actions .btn-funky-success,
.funky-header-actions .btn-funky-outline,
.funky-header-actions .btn-format-rules,
.funky-header-actions > button {
  height: var(--btn-height-md);
  flex-shrink: 0;
  /* Override .btn-sm when used in header actions */
}

.funky-header-actions .btn-sm {
  height: var(--btn-height-md) !important;
  padding: var(--btn-padding-md) !important;
  font-size: var(--btn-font-md) !important;
}

/* Search box takes remaining space on larger screens */
.funky-header-actions .funky-search-box {
  flex: 1 1 200px;
  min-width: 200px;
  max-width: 400px;
}

/* Filter dropdowns have consistent sizing */
.funky-header-actions .funky-date-filter,
.funky-header-actions .funky-client-filter,
.funky-header-actions .funky-date-range {
  flex: 0 1 auto;
  min-width: 140px;
}

/* Select2 in header actions - match button height */
.funky-header-actions .select2-container {
  height: var(--btn-height-md);
}

.funky-header-actions .select2-container .select2-selection {
  height: var(--btn-height-md) !important;
  min-height: var(--btn-height-md) !important;
  display: flex !important;
  align-items: center !important;
}

.funky-header-actions .select2-container .select2-selection__rendered {
  line-height: 1 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.funky-header-actions .select2-container .select2-selection__arrow {
  height: var(--btn-height-md) !important;
  top: 0 !important;
}

/* Form controls in header actions */
.funky-header-actions .form-control,
.funky-header-actions .form-select {
  height: var(--btn-height-md);
}

/* DataTables buttons container in header actions */
.funky-header-actions .dt-buttons,
.funky-header-actions .dataTables_wrapper .dt-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 6px;
}

.funky-header-actions .dt-buttons .btn-funky,
.funky-header-actions .dt-buttons .dt-button {
  height: var(--btn-height-md) !important;
  align-self: center !important;
}

/* ============================================
   RESPONSIVE BREAKPOINTS FOR BUTTONS
   ============================================ */

/* Common selector for all buttons in header actions */
.funky-header-actions .btn-funky,
.funky-header-actions .btn-funky-primary,
.funky-header-actions .btn-funky-secondary,
.funky-header-actions .btn-funky-warning,
.funky-header-actions .btn-funky-danger,
.funky-header-actions .btn-funky-success,
.funky-header-actions .btn-format-rules,
.funky-header-actions > button {
  /* Base responsive values - override in media queries */
  flex: var(--header-btn-flex, 0 1 auto);
  min-width: var(--header-btn-min-width, auto);
  white-space: nowrap;
  justify-content: center;
}

/* Large screens (1200px+) - Prefer single row but allow wrap */
@media (min-width: 1200px) {
  .funky-header-actions {
    --header-btn-flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .funky-header-actions .funky-search-box {
    max-width: 500px;
  }
}

/* Medium screens (992px - 1199px) - Allow wrapping */
@media (max-width: 1199px) {
  .funky-header-actions {
    gap: 10px;
  }
  
  .funky-header-actions .funky-search-box {
    flex: 1 1 250px;
    max-width: 350px;
  }
}

/* Tablet (768px - 991px) - Two row layout */
@media (max-width: 991px) {
  .funky-header-actions {
    gap: 8px;
  }
  
  .funky-header-actions .funky-search-box {
    flex: 1 1 100%;
    max-width: 100%;
    order: -1;
  }
  
  .funky-header-actions .funky-date-filter,
  .funky-header-actions .funky-client-filter,
  .funky-header-actions .funky-date-range {
    flex: 1 1 calc(33.33% - 6px);
    min-width: 120px;
  }
}

/* Mobile landscape (576px - 767px) - Flex wrap with compact buttons */
@media (max-width: 767px) {
  .funky-header-actions {
    --header-btn-flex: 1 1 auto;
    --header-btn-min-width: 0;
    gap: 8px;
  }
  
  .funky-header-actions .funky-search-box {
    flex: 1 1 100%;
    max-width: 100%;
    order: -1;
  }
  
  .funky-header-actions .funky-date-filter,
  .funky-header-actions .funky-client-filter,
  .funky-header-actions .funky-date-range {
    flex: 1 1 auto;
    min-width: 120px;
  }
}

/* Mobile portrait (< 576px) - Buttons share row */
@media (max-width: 575px) {
  .funky-header-actions {
    --header-btn-flex: 1 1 auto;
    --header-btn-min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .funky-header-actions .funky-search-box {
    flex: 1 1 100%;
    max-width: 100%;
    order: -1;
  }
  
  .funky-header-actions .funky-date-filter,
  .funky-header-actions .funky-client-filter,
  .funky-header-actions .funky-date-range {
    flex: 1 1 100%;
    min-width: 0;
  }
  
  /* Smaller font/padding on mobile */
  .funky-header-actions .btn-funky,
  .funky-header-actions .btn-funky-primary,
  .funky-header-actions .btn-funky-secondary,
  .funky-header-actions .btn-funky-warning,
  .funky-header-actions .btn-funky-danger,
  .funky-header-actions .btn-funky-success,
  .funky-header-actions .btn-format-rules,
  .funky-header-actions > button {
    height: var(--btn-height-md, 36px);
    min-height: var(--btn-height-md, 36px);
    font-size: var(--btn-font-sm, 0.75rem);
    padding: 0 var(--pro-spacing-sm, 0.75rem);
  }
}

/* Touch devices - larger touch targets */
@media (pointer: coarse) {
  .funky-header-actions .btn-funky,
  .funky-header-actions .btn-funky-primary,
  .funky-header-actions .btn-funky-secondary,
  .funky-header-actions .btn-funky-warning,
  .funky-header-actions .btn-funky-danger,
  .funky-header-actions .btn-funky-success,
  .funky-header-actions .btn-format-rules,
  .funky-header-actions > button {
    min-height: var(--btn-height-md, 36px);
  }
}

/* ============================================
   USER ACCENT COLOR OVERRIDES
   When user has set a custom accent color via preferences,
   these rules apply it to primary buttons and links
   ============================================ */
:root {
  /* Primary buttons use user accent when set */
  --btn-primary-bg: var(--user-accent, var(--pro-accent-primary));
  --btn-primary-hover: var(--user-accent-hover, var(--pro-accent-primary-hover));
}

.btn-funky.use-accent,
.btn-funky-primary.use-accent,
.btn-user-accent {
  background: var(--user-accent, var(--pro-accent-primary));
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.btn-funky.use-accent:hover,
.btn-funky-primary.use-accent:hover,
.btn-user-accent:hover {
  background: var(--user-accent-hover, var(--pro-accent-primary-hover));
  border-color: var(--user-accent-hover, var(--pro-accent-primary-hover));
  box-shadow: 0 2px 8px rgba(var(--user-accent-rgb, 47, 129, 247), 0.3);
}

/* Links with user accent */
a.use-accent,
.link-accent {
  color: var(--user-accent, var(--pro-accent-primary));
}

a.use-accent:hover,
.link-accent:hover {
  color: var(--user-accent-hover, var(--pro-accent-primary-hover));
}

/* Progress bars with user accent */
.progress-bar.use-accent {
  background-color: var(--user-accent, var(--pro-accent-primary));
}

/* Nav items with user accent */
.nav-link.active.use-accent,
.nav-tabs .nav-link.active.use-accent {
  border-bottom-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Sidebar active item with user accent */
.sidebar-item.active.use-accent {
  border-left-color: var(--user-accent, var(--pro-accent-primary));
  background: rgba(var(--user-accent-rgb, 47, 129, 247), 0.1);
}

/* Focus rings with user accent */
.use-accent:focus-visible {
  outline-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px rgba(var(--user-accent-rgb, 47, 129, 247), 0.4);
}

/* css/stats.css */
/* ============================================
   STATS.CSS - Funky Statistics & Metrics System
   Phase 3C: Stat cards, sparklines, number display
   ============================================ */

/* ============================================
   CSS VARIABLES - Stats Theming
   ============================================ */
:root {
  /* Stat Card Dimensions */
  --stat-card-padding: 16px 20px;
  --stat-card-radius: 8px;
  --stat-card-gap: 16px;
  
  /* Stat Icon */
  --stat-icon-size: 40px;
  --stat-icon-radius: 10px;
  
  /* Stat Value Typography */
  --stat-value-size: 24px;
  --stat-value-weight: 700;
  --stat-label-size: 12px;
  --stat-change-size: 11px;
  
  /* Sparkline */
  --sparkline-height: 30px;
  --sparkline-width: 80px;
  
  /* Stat Colors - Use theme semantic colors */
  --stat-color-success: var(--pro-accent-success, #3fb950);
  --stat-color-warning: var(--pro-accent-warning, #d29922);
  --stat-color-danger: var(--pro-accent-danger, #f85149);
  --stat-color-info: var(--pro-accent-info, #58a6ff);
  --stat-color-primary: var(--pro-accent-primary, #2f81f7);
  --stat-color-neutral: var(--pro-text-muted, #8b949e);
}

/* ============================================
   STATS BAR - Horizontal Container
   ============================================ */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--stat-card-gap);
  margin-bottom: 24px;
}

.stats-bar-compact {
  gap: 12px;
}

.stats-bar-stretch .stat-card-pro {
  flex: 1;
  min-width: 180px;
}

/* ============================================
   STAT CARD PRO - Compact Horizontal Design
   ============================================ */
.stat-card-pro {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: var(--stat-card-padding);
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: var(--stat-card-radius);
  transition: all 0.2s ease;
  min-width: 0;
}

.stat-card-pro:hover {
  border-color: var(--pro-border-hover, #484f58);
  box-shadow: var(--pro-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.15));
}

/* Stat Icon */
.stat-card-pro .stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--stat-icon-size);
  height: var(--stat-icon-size);
  border-radius: var(--stat-icon-radius);
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  color: var(--stat-color-primary);
  font-size: 18px;
  flex-shrink: 0;
}

/* Stat Content Container */
.stat-card-pro .stat-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

/* Stat Value */
.stat-card-pro .stat-value {
  font-size: var(--stat-value-size);
  font-weight: var(--stat-value-weight);
  color: var(--pro-text-primary, #e6edf3);
  line-height: 1.2;
  font-family: 'SF Mono', 'Fira Code', 'Monaco', 'Inconsolata', monospace;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* Stat Value Suffix (for units like %, $, etc.) */
.stat-card-pro .stat-value .stat-suffix {
  font-size: 14px;
  font-weight: 500;
  color: var(--pro-text-secondary, #8b949e);
}

/* Stat Label */
.stat-card-pro .stat-label {
  font-size: var(--stat-label-size);
  font-weight: 500;
  color: var(--pro-text-muted, #6e7681);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stat Change Indicator */
.stat-card-pro .stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--stat-change-size);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.stat-card-pro .stat-change.positive {
  color: var(--stat-color-success);
  background: var(--pro-accent-success-muted, rgba(63, 185, 80, 0.15));
}

.stat-card-pro .stat-change.negative {
  color: var(--stat-color-danger);
  background: var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.15));
}

.stat-card-pro .stat-change.neutral {
  color: var(--stat-color-neutral);
  background: var(--pro-accent-neutral-muted, rgba(139, 148, 158, 0.15));
}

.stat-card-pro .stat-change i {
  font-size: 10px;
}

/* ============================================
   STAT CARD COLOR VARIANTS
   ============================================ */
.stat-card-pro.stat-card-success .stat-icon {
  background: var(--pro-accent-success-muted, rgba(63, 185, 80, 0.15));
  color: var(--stat-color-success);
}

.stat-card-pro.stat-card-warning .stat-icon {
  background: var(--pro-accent-warning-muted, rgba(210, 153, 34, 0.15));
  color: var(--stat-color-warning);
}

.stat-card-pro.stat-card-danger .stat-icon {
  background: var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.15));
  color: var(--stat-color-danger);
}

.stat-card-pro.stat-card-info .stat-icon {
  background: var(--pro-accent-info-muted, rgba(88, 166, 255, 0.15));
  color: var(--stat-color-info);
}

.stat-card-pro.stat-card-primary .stat-icon {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  color: var(--stat-color-primary);
}

/* Accent border variants */
.stat-card-pro.stat-card-success {
  border-left: 3px solid var(--stat-color-success);
}

.stat-card-pro.stat-card-warning {
  border-left: 3px solid var(--stat-color-warning);
}

.stat-card-pro.stat-card-danger {
  border-left: 3px solid var(--stat-color-danger);
}

.stat-card-pro.stat-card-info {
  border-left: 3px solid var(--stat-color-info);
}

.stat-card-pro.stat-card-primary {
  border-left: 3px solid var(--stat-color-primary);
}

/* ============================================
   SPARKLINE CONTAINER
   ============================================ */
.sparkline-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sparkline-width);
  height: var(--sparkline-height);
  flex-shrink: 0;
}

.sparkline-container svg {
  width: 100%;
  height: 100%;
}

/* Sparkline positioned in stat card */
.stat-card-pro .sparkline-container {
  margin-left: auto;
}

/* Sparkline Colors */
.sparkline-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline-line.positive {
  stroke: var(--stat-color-success);
}

.sparkline-line.negative {
  stroke: var(--stat-color-danger);
}

.sparkline-line.neutral {
  stroke: var(--stat-color-info);
}

/* Sparkline area fill */
.sparkline-area {
  opacity: 0.15;
}

.sparkline-area.positive {
  fill: var(--stat-color-success);
}

.sparkline-area.negative {
  fill: var(--stat-color-danger);
}

.sparkline-area.neutral {
  fill: var(--stat-color-info);
}

/* Sparkline bar chart */
.sparkline-bar {
  rx: 1;
}

.sparkline-bar.positive {
  fill: var(--stat-color-success);
}

.sparkline-bar.negative {
  fill: var(--stat-color-danger);
}

.sparkline-bar.neutral {
  fill: var(--stat-color-info);
}

/* ============================================
   STAT GRID (Alternative Layout)
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--stat-card-gap);
  margin-bottom: 24px;
}

.stats-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.stats-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.stats-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* ============================================
   COMPACT STAT CARD (Inline / Table Header)
   ============================================ */
.stat-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--pro-bg-tertiary, #21262d);
  border-radius: 6px;
  border: 1px solid var(--pro-border-color, #30363d);
}

.stat-inline .stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--pro-text-primary, #e6edf3);
  font-family: 'SF Mono', monospace;
}

.stat-inline .stat-label {
  font-size: 11px;
  color: var(--pro-text-muted, #6e7681);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   NUMBER DISPLAY FORMATTING
   ============================================ */
.number-display {
  font-family: 'SF Mono', 'Fira Code', 'Monaco', monospace;
  font-variant-numeric: tabular-nums;
}

.number-display.large {
  font-size: 28px;
  font-weight: 700;
}

.number-display.medium {
  font-size: 20px;
  font-weight: 600;
}

.number-display.small {
  font-size: 14px;
  font-weight: 500;
}

/* Compact number format suffix */
.number-suffix {
  font-size: 0.7em;
  font-weight: 500;
  color: var(--pro-text-secondary, #8b949e);
  margin-left: 2px;
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */
@media (max-width: 1024px) {
  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card-pro .stat-value {
    font-size: 20px;
  }
  
  .stat-card-pro .sparkline-container {
    display: none;
  }
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */
@media (max-width: 768px) {
  .stats-bar {
    flex-direction: column;
  }
  
  .stats-bar-stretch .stat-card-pro {
    min-width: 100%;
  }
  
  .stats-grid,
  .stats-grid-4,
  .stats-grid-3,
  .stats-grid-2 {
    grid-template-columns: 1fr;
  }
  
  .stat-card-pro {
    padding: 12px 16px;
  }
  
  .stat-card-pro .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .stat-card-pro .stat-value {
    font-size: 18px;
  }
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] .stat-card-pro {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-color);
}

[data-theme="light"] .stat-card-pro:hover {
  border-color: var(--pro-border-emphasis);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .stat-card-pro .stat-value {
  color: var(--pro-text-primary);
}

[data-theme="light"] .stat-card-pro .stat-label {
  color: var(--pro-text-secondary);
}

[data-theme="light"] .stat-inline {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-border-color);
}

[data-theme="light"] .stat-inline .stat-value {
  color: var(--pro-text-primary);
}

/* Light theme icon colors */
[data-theme="light"] .stat-card-pro .stat-icon {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="light"] .stat-card-pro.stat-card-success .stat-icon {
  background: var(--pro-accent-success-muted);
  color: var(--pro-accent-success);
}

[data-theme="light"] .stat-card-pro.stat-card-warning .stat-icon {
  background: var(--pro-accent-warning-muted);
  color: var(--pro-accent-warning);
}

[data-theme="light"] .stat-card-pro.stat-card-danger .stat-icon {
  background: var(--pro-accent-danger-muted);
  color: var(--pro-accent-danger);
}

[data-theme="light"] .stat-card-pro.stat-card-info .stat-icon {
  background: var(--pro-accent-info-muted);
  color: var(--pro-accent-info);
}

/* Light theme borders */
[data-theme="light"] .stat-card-pro.stat-card-success {
  border-left-color: var(--pro-accent-success);
}

[data-theme="light"] .stat-card-pro.stat-card-warning {
  border-left-color: var(--pro-accent-warning);
}

[data-theme="light"] .stat-card-pro.stat-card-danger {
  border-left-color: var(--pro-accent-danger);
}

[data-theme="light"] .stat-card-pro.stat-card-info {
  border-left-color: var(--pro-accent-info);
}

/* Light theme change indicators */
[data-theme="light"] .stat-card-pro .stat-change.positive {
  color: var(--pro-accent-success);
  background: var(--pro-accent-success-muted);
}

[data-theme="light"] .stat-card-pro .stat-change.negative {
  color: var(--pro-accent-danger);
  background: var(--pro-accent-danger-muted);
}

/* ============================================
   EVEN-FUNKYER THEME OVERRIDES
   ============================================ */
[data-theme="even-funkyer"] .stat-card-pro {
  background: rgba(10, 0, 21, 0.8);
  border: 1px solid rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.1);
}

[data-theme="even-funkyer"] .stat-card-pro:hover {
  border-color: rgba(255, 0, 255, 0.6);
  box-shadow: 
    0 0 20px rgba(255, 0, 255, 0.2),
    0 0 40px rgba(0, 255, 255, 0.1);
}

[data-theme="even-funkyer"] .stat-card-pro .stat-value {
  color: var(--pro-text-primary);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

[data-theme="even-funkyer"] .stat-card-pro .stat-icon {
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 255, 0.2));
  color: var(--pro-accent-info);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

[data-theme="even-funkyer"] .stat-card-pro.stat-card-success .stat-icon {
  background: var(--pro-accent-success-muted);
  color: var(--pro-accent-success);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

[data-theme="even-funkyer"] .stat-card-pro.stat-card-warning .stat-icon {
  background: var(--pro-accent-warning-muted);
  color: var(--pro-accent-warning);
  box-shadow: 0 0 15px rgba(255, 170, 0, 0.3);
}

[data-theme="even-funkyer"] .stat-card-pro.stat-card-danger .stat-icon {
  background: var(--pro-accent-danger-muted);
  color: var(--pro-accent-danger);
  box-shadow: 0 0 15px rgba(255, 0, 102, 0.3);
}

[data-theme="even-funkyer"] .stat-card-pro.stat-card-info .stat-icon {
  background: var(--pro-accent-info-muted);
  color: var(--pro-accent-info);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Even-funkyer neon borders */
[data-theme="even-funkyer"] .stat-card-pro.stat-card-success {
  border-left-color: var(--pro-accent-success);
  box-shadow: -2px 0 10px rgba(0, 255, 136, 0.3);
}

[data-theme="even-funkyer"] .stat-card-pro.stat-card-warning {
  border-left-color: var(--pro-accent-warning);
  box-shadow: -2px 0 10px rgba(255, 170, 0, 0.3);
}

[data-theme="even-funkyer"] .stat-card-pro.stat-card-danger {
  border-left-color: var(--pro-accent-danger);
  box-shadow: -2px 0 10px rgba(255, 0, 102, 0.3);
}

[data-theme="even-funkyer"] .stat-card-pro.stat-card-info {
  border-left-color: var(--pro-accent-info);
  box-shadow: -2px 0 10px rgba(0, 255, 255, 0.3);
}

/* Even-funkyer sparklines */
[data-theme="even-funkyer"] .sparkline-line.positive {
  stroke: var(--pro-accent-success);
  filter: drop-shadow(0 0 3px rgba(0, 255, 136, 0.5));
}

[data-theme="even-funkyer"] .sparkline-line.negative {
  stroke: var(--pro-accent-danger);
  filter: drop-shadow(0 0 3px rgba(255, 0, 102, 0.5));
}

[data-theme="even-funkyer"] .sparkline-line.neutral {
  stroke: var(--pro-accent-info);
  filter: drop-shadow(0 0 3px rgba(0, 255, 255, 0.5));
}

/* Even-funkyer change indicators */
[data-theme="even-funkyer"] .stat-card-pro .stat-change.positive {
  color: var(--pro-accent-success);
  background: var(--pro-accent-success-muted);
  text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

[data-theme="even-funkyer"] .stat-card-pro .stat-change.negative {
  color: var(--pro-accent-danger);
  background: var(--pro-accent-danger-muted);
  text-shadow: 0 0 5px rgba(255, 0, 102, 0.5);
}

[data-theme="even-funkyer"] .stat-inline {
  background: var(--pro-bg-primary);
  border-color: var(--pro-border-color);
}

[data-theme="even-funkyer"] .stat-inline .stat-value {
  color: var(--pro-accent-info);
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

/* css/breadcrumbs.css */
/* ============================================
   BREADCRUMBS.CSS - Funky Breadcrumb Navigation
   Phase 3C: Dynamic breadcrumb component
   ============================================ */

/* ============================================
   CSS VARIABLES - Breadcrumb Theming
   ============================================ */
:root {
  --breadcrumb-height: 32px;
  --breadcrumb-font-size: 13px;
  --breadcrumb-separator-size: 10px;
  --breadcrumb-gap: 8px;
}

/* ============================================
   BREADCRUMB CONTAINER
   ============================================ */
.breadcrumb-pro {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--breadcrumb-gap);
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: var(--breadcrumb-font-size);
  min-height: var(--breadcrumb-height);
}

/* ============================================
   BREADCRUMB ITEMS
   ============================================ */
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: var(--breadcrumb-gap);
  color: var(--pro-text-secondary, #8b949e);
}

.breadcrumb-item a {
  color: var(--pro-text-secondary, #8b949e);
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb-item a:hover {
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  text-decoration: none;
}

/* Separator (chevron) between items */
.breadcrumb-item:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: var(--breadcrumb-separator-size);
  height: var(--breadcrumb-separator-size);
  margin-left: var(--breadcrumb-gap);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b949e'%3E%3Cpath d='M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.7;
}

/* Active/current page (last item) */
.breadcrumb-item.active {
  color: var(--pro-text-primary, #e6edf3);
  font-weight: 500;
}

.breadcrumb-item.active a {
  color: var(--pro-text-primary, #e6edf3);
  pointer-events: none;
  cursor: default;
}

/* ============================================
   HOME ICON (First Item)
   ============================================ */
.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: var(--pro-text-secondary, #8b949e);
  transition: all 0.15s ease;
}

.breadcrumb-home:hover {
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.1));
}

.breadcrumb-home i {
  font-size: 14px;
}

/* ============================================
   BREADCRUMB WITH ICONS
   ============================================ */
.breadcrumb-item i {
  font-size: 12px;
  opacity: 0.8;
}

.breadcrumb-item a i {
  margin-right: 4px;
}

/* ============================================
   BREADCRUMB VARIANTS
   ============================================ */

/* Boxed style */
.breadcrumb-pro.breadcrumb-boxed {
  background: var(--pro-bg-tertiary, #21262d);
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--pro-border-color, #30363d);
}

/* Compact style */
.breadcrumb-pro.breadcrumb-compact {
  --breadcrumb-font-size: 12px;
  --breadcrumb-gap: 6px;
  --breadcrumb-separator-size: 8px;
}

/* Large style */
.breadcrumb-pro.breadcrumb-large {
  --breadcrumb-font-size: 14px;
  --breadcrumb-gap: 10px;
  --breadcrumb-separator-size: 12px;
}

/* ============================================
   BREADCRUMB IN PAGE HEADER
   ============================================ */
.page-header .breadcrumb-pro {
  margin-bottom: 8px;
}

.page-header .breadcrumb-item {
  font-size: 12px;
}

/* ============================================
   DROPDOWN BREADCRUMB (For deep paths)
   ============================================ */
.breadcrumb-dropdown {
  position: relative;
}

.breadcrumb-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: var(--pro-bg-tertiary, #21262d);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 4px;
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  transition: all 0.15s ease;
}

.breadcrumb-dropdown-toggle:hover {
  background: var(--pro-bg-hover, #30363d);
  color: var(--pro-text-primary, #e6edf3);
}

.breadcrumb-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 180px;
  padding: 4px 0;
  margin-top: 4px;
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  box-shadow: var(--pro-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.3));
  display: none;
}

.breadcrumb-dropdown.open .breadcrumb-dropdown-menu {
  display: block;
}

.breadcrumb-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--pro-text-primary, #e6edf3);
  text-decoration: none;
  transition: background 0.15s ease;
}

.breadcrumb-dropdown-menu a:hover {
  background: var(--pro-bg-hover, #30363d);
}

.breadcrumb-dropdown-menu a i {
  width: 16px;
  text-align: center;
  color: var(--pro-text-secondary, #8b949e);
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */
@media (max-width: 768px) {
  .breadcrumb-pro {
    --breadcrumb-font-size: 12px;
    --breadcrumb-gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .breadcrumb-pro::-webkit-scrollbar {
    display: none;
  }
  
  /* Hide middle items on mobile, show ellipsis */
  .breadcrumb-pro.breadcrumb-truncate .breadcrumb-item:not(:first-child):not(:last-child):not(:nth-last-child(2)) {
    display: none;
  }
  
  .breadcrumb-pro.breadcrumb-truncate .breadcrumb-item:nth-last-child(2)::before {
    content: '...';
    margin-right: 8px;
    color: var(--pro-text-muted, #6e7681);
  }
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] .breadcrumb-item {
  color: var(--pro-text-secondary);
}

[data-theme="light"] .breadcrumb-item a {
  color: var(--pro-text-secondary);
}

[data-theme="light"] .breadcrumb-item a:hover {
  color: var(--pro-accent-primary);
}

[data-theme="light"] .breadcrumb-item:not(:last-child)::after {
  /* SVG chevron uses encoded color for light theme */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2357606a'%3E%3Cpath d='M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z'/%3E%3C/svg%3E");
}

[data-theme="light"] .breadcrumb-item.active {
  color: var(--pro-text-primary);
}

[data-theme="light"] .breadcrumb-item.active a {
  color: var(--pro-text-primary);
}

[data-theme="light"] .breadcrumb-home {
  color: var(--pro-text-secondary);
}

[data-theme="light"] .breadcrumb-home:hover {
  color: var(--pro-accent-primary);
  background: var(--pro-accent-primary-muted);
}

[data-theme="light"] .breadcrumb-pro.breadcrumb-boxed {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-border-color);
}

[data-theme="light"] .breadcrumb-dropdown-toggle {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-border-color);
  color: var(--pro-text-secondary);
}

[data-theme="light"] .breadcrumb-dropdown-toggle:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
}

[data-theme="light"] .breadcrumb-dropdown-menu {
  background: var(--pro-bg-primary);
  border-color: var(--pro-border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .breadcrumb-dropdown-menu a {
  color: var(--pro-text-primary);
}

[data-theme="light"] .breadcrumb-dropdown-menu a:hover {
  background: var(--pro-bg-secondary);
}

/* ============================================
   EVEN-FUNKYER THEME OVERRIDES
   ============================================ */
[data-theme="even-funkyer"] .breadcrumb-item {
  color: rgba(0, 255, 255, 0.7);
}

[data-theme="even-funkyer"] .breadcrumb-item a {
  color: rgba(0, 255, 255, 0.7);
}

[data-theme="even-funkyer"] .breadcrumb-item a:hover {
  color: var(--pro-accent-primary);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

[data-theme="even-funkyer"] .breadcrumb-item:not(:last-child)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2300ffff'%3E%3Cpath d='M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z'/%3E%3C/svg%3E");
  opacity: 0.5;
}

[data-theme="even-funkyer"] .breadcrumb-item.active {
  color: var(--pro-text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

[data-theme="even-funkyer"] .breadcrumb-item.active a {
  color: var(--pro-text-primary);
}

[data-theme="even-funkyer"] .breadcrumb-home {
  color: var(--pro-accent-secondary);
}

[data-theme="even-funkyer"] .breadcrumb-home:hover {
  color: var(--pro-accent-primary);
  background: rgba(255, 0, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .breadcrumb-pro.breadcrumb-boxed {
  background: rgba(10, 0, 21, 0.8);
  border-color: rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.1);
}

[data-theme="even-funkyer"] .breadcrumb-dropdown-toggle {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 255, 255, 0.3);
  color: var(--pro-accent-secondary);
}

[data-theme="even-funkyer"] .breadcrumb-dropdown-toggle:hover {
  background: rgba(255, 0, 255, 0.2);
  border-color: var(--pro-accent-primary);
  color: var(--pro-accent-primary);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

[data-theme="even-funkyer"] .breadcrumb-dropdown-menu {
  background: rgba(10, 0, 21, 0.95);
  border-color: rgba(255, 0, 255, 0.4);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 0, 255, 0.2);
}

[data-theme="even-funkyer"] .breadcrumb-dropdown-menu a {
  color: var(--pro-accent-secondary);
}

[data-theme="even-funkyer"] .breadcrumb-dropdown-menu a:hover {
  background: rgba(255, 0, 255, 0.2);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .breadcrumb-dropdown-menu a i {
  color: var(--pro-accent-primary);
}

/* ============================================
   PERSISTENT BREADCRUMB BAR
   For SPA layouts with fixed breadcrumb nav
   ============================================ */
.page-breadcrumb-bar {
  display: block;
  padding: 10px 20px;
  background: var(--pro-bg-secondary, #161b22);
  border-bottom: 1px solid var(--pro-border-color, #30363d);
}

.page-breadcrumb-bar:empty {
  display: none;
}

.page-breadcrumb-bar .breadcrumb-pro {
  margin: 0;
}

/* Light Theme */
[data-theme="light"] .page-breadcrumb-bar {
  background: var(--pro-bg-primary);
  border-bottom-color: var(--pro-border-color);
}

/* Even-Funkyer Theme */
[data-theme="even-funkyer"] .page-breadcrumb-bar {
  background: rgba(10, 0, 21, 0.9);
  border-bottom-color: rgba(255, 0, 255, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}


/* css/page-header.css */
/* ============================================
   PAGE-HEADER.CSS - Funky Sticky Page Headers
   Phase 3C: Page headers with sticky behavior
   ============================================ */

/* ============================================
   CSS VARIABLES - Page Header Theming
   ============================================ */
:root {
  --page-header-height: 60px;
  --page-header-padding: 16px 24px;
  --page-header-sticky-offset: 0;
  --page-header-z-index: 100;
}

/* ============================================
   PAGE HEADER BASE
   ============================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: var(--page-header-padding);
  min-height: var(--page-header-height);
  background: var(--pro-bg-primary, #0d1117);
  border-bottom: 1px solid var(--pro-border-color, #30363d);
  margin-bottom: 24px;
  transition: all 0.2s ease;
}

/* ============================================
   PAGE HEADER CONTENT
   ============================================ */
.page-header-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.page-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  color: var(--pro-text-primary, #e6edf3);
  margin: 0;
  line-height: 1.3;
}

.page-header-title i {
  font-size: 18px;
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.page-header-subtitle {
  font-size: 13px;
  color: var(--pro-text-secondary, #8b949e);
  margin: 0;
}

/* Breadcrumbs in header */
.page-header .breadcrumb-pro {
  margin-bottom: 4px;
}

/* ============================================
   PAGE HEADER ACTIONS
   ============================================ */
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.page-header-actions .btn-funky,
.page-header-actions .btn-funky-primary,
.page-header-actions .btn-funky-secondary {
  height: 36px;
}

/* ============================================
   STICKY PAGE HEADER
   ============================================ */
.page-header-sticky {
  position: sticky;
  top: var(--page-header-sticky-offset);
  z-index: var(--page-header-z-index);
  background: var(--pro-bg-primary, #0d1117);
}

/* When header becomes stuck */
.page-header-sticky.is-sticky {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(13, 17, 23, 0.9);
  box-shadow: 
    0 1px 0 0 var(--pro-border-color, #30363d),
    0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Animation for sticky state */
.page-header-sticky {
  transition: 
    background 0.2s ease,
    box-shadow 0.2s ease;
}

/* Compact mode when sticky */
.page-header-sticky.is-sticky .page-header-title {
  font-size: 16px;
}

.page-header-sticky.is-sticky .page-header-subtitle {
  display: none;
}

.page-header-sticky.is-sticky .breadcrumb-pro {
  display: none;
}

/* ============================================
   PAGE HEADER VARIANTS
   ============================================ */

/* Compact header */
.page-header.page-header-compact {
  min-height: 48px;
  padding: 12px 20px;
}

.page-header.page-header-compact .page-header-title {
  font-size: 16px;
}

/* Large header */
.page-header.page-header-large {
  min-height: 80px;
  padding: 24px 32px;
}

.page-header.page-header-large .page-header-title {
  font-size: 24px;
}

/* Transparent header (for overlay on hero) */
.page-header.page-header-transparent {
  background: transparent;
  border-bottom: none;
}

/* Borderless header */
.page-header.page-header-borderless {
  border-bottom: none;
  margin-bottom: 16px;
}

/* ============================================
   PAGE HEADER WITH TABS
   ============================================ */
.page-header-tabs {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-bottom: 0;
}

.page-header-tabs .page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
}

.page-header-tabs .nav-tabs {
  border-bottom: none;
  margin: 0 -24px;
  padding: 0 24px;
  background: var(--pro-bg-secondary, #161b22);
}

/* ============================================
   PAGE HEADER SEARCH
   ============================================ */
.page-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
}

.page-header-search input {
  height: 36px;
  padding: 0 12px;
  background: var(--pro-bg-tertiary, #21262d);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  color: var(--pro-text-primary, #e6edf3);
  font-size: 13px;
  width: 100%;
  transition: all 0.15s ease;
}

.page-header-search input:focus {
  outline: none;
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.2);
}

.page-header-search input::placeholder {
  color: var(--pro-text-muted, #6e7681);
}

/* ============================================
   PAGE HEADER BADGES
   ============================================ */
.page-header-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  background: var(--pro-bg-tertiary, #21262d);
  color: var(--pro-text-secondary, #8b949e);
  border: 1px solid var(--pro-border-color, #30363d);
}

.page-header-badge.badge-success {
  background: rgba(63, 185, 80, 0.15);
  color: var(--pro-accent-success, #3fb950);
  border-color: transparent;
}

.page-header-badge.badge-warning {
  background: rgba(210, 153, 34, 0.15);
  color: var(--pro-accent-warning, #d29922);
  border-color: transparent;
}

.page-header-badge.badge-danger {
  background: rgba(248, 81, 73, 0.15);
  color: var(--pro-accent-danger, #f85149);
  border-color: transparent;
}

.page-header-badge.badge-info {
  background: rgba(88, 166, 255, 0.15);
  color: var(--pro-accent-info, #58a6ff);
  border-color: transparent;
}

/* ============================================
   PAGE HEADER WITH SIDEBAR OFFSET
   ============================================ */
.main-wrapper .page-header-sticky {
  /* Account for sidebar when sticky */
  margin-left: 0;
  width: 100%;
}

/* When sidebar is collapsed */
.main-wrapper.sidebar-collapsed .page-header-sticky.is-sticky {
  /* Adjust for collapsed sidebar width */
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */
@media (max-width: 1024px) {
  .page-header {
    padding: 12px 20px;
    min-height: 52px;
  }
  
  .page-header-title {
    font-size: 18px;
  }
  
  .page-header-actions {
    gap: 6px;
  }
  
  /* Hide some action buttons on tablet */
  .page-header-actions .btn-text-desktop {
    display: none;
  }
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
  }
  
  .page-header-content {
    order: 1;
  }
  
  .page-header-actions {
    order: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  .page-header-title {
    font-size: 16px;
  }
  
  .page-header-subtitle {
    font-size: 12px;
  }
  
  /* Sticky adjustments for mobile */
  .page-header-sticky.is-sticky {
    padding: 8px 16px;
  }
  
  .page-header-sticky.is-sticky .page-header-content {
    flex-direction: row;
    align-items: center;
  }
  
  .page-header-sticky.is-sticky .page-header-actions {
    display: none;
  }
  
  .page-header-search {
    max-width: 100%;
    width: 100%;
    order: 3;
  }
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] .page-header {
  background: var(--pro-bg-primary);
  border-bottom-color: var(--pro-border-color);
}

[data-theme="light"] .page-header-title {
  color: var(--pro-text-primary);
}

[data-theme="light"] .page-header-title i {
  color: var(--pro-accent-primary);
}

[data-theme="light"] .page-header-subtitle {
  color: var(--pro-text-secondary);
}

[data-theme="light"] .page-header-sticky.is-sticky {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 1px 0 0 var(--pro-border-color),
    0 4px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .page-header-search input {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-border-color);
  color: var(--pro-text-primary);
}

[data-theme="light"] .page-header-search input:focus {
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.2);
}

[data-theme="light"] .page-header-search input::placeholder {
  color: var(--pro-text-muted);
}

[data-theme="light"] .page-header-badge {
  background: var(--pro-bg-secondary);
  color: var(--pro-text-secondary);
  border-color: var(--pro-border-color);
}

[data-theme="light"] .page-header-badge.badge-success {
  background: rgba(26, 127, 55, 0.1);
  color: var(--pro-accent-success);
}

[data-theme="light"] .page-header-badge.badge-warning {
  background: rgba(154, 103, 0, 0.1);
  color: var(--pro-accent-warning);
}
}

[data-theme="light"] .page-header-badge.badge-danger {
  background: rgba(207, 34, 46, 0.1);
  color: var(--pro-accent-danger);
}

[data-theme="light"] .page-header-badge.badge-info {
  background: rgba(9, 105, 218, 0.1);
  color: var(--pro-accent-info);
}

/* ============================================
   EVEN-FUNKYER THEME OVERRIDES
   ============================================ */
[data-theme="even-funkyer"] .page-header {
  background: rgba(10, 0, 21, 0.9);
  border-bottom-color: rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .page-header-title {
  color: var(--pro-text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

[data-theme="even-funkyer"] .page-header-title i {
  color: var(--pro-accent-secondary);
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

[data-theme="even-funkyer"] .page-header-subtitle {
  color: rgba(0, 255, 255, 0.7);
}

[data-theme="even-funkyer"] .page-header-sticky.is-sticky {
  background: rgba(10, 0, 21, 0.95);
  box-shadow: 
    0 1px 0 0 rgba(255, 0, 255, 0.4),
    0 4px 20px rgba(255, 0, 255, 0.15),
    0 0 40px rgba(0, 255, 255, 0.1);
}

[data-theme="even-funkyer"] .page-header-search input {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 255, 255, 0.3);
  color: var(--pro-accent-secondary);
}

[data-theme="even-funkyer"] .page-header-search input:focus {
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .page-header-search input::placeholder {
  color: rgba(0, 255, 255, 0.5);
}

[data-theme="even-funkyer"] .page-header-badge {
  background: rgba(255, 0, 255, 0.1);
  color: var(--pro-accent-primary);
  border-color: rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .page-header-badge.badge-success {
  background: rgba(0, 255, 136, 0.15);
  color: var(--pro-accent-success);
  box-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

[data-theme="even-funkyer"] .page-header-badge.badge-warning {
  background: rgba(255, 170, 0, 0.15);
  color: var(--pro-accent-warning);
  box-shadow: 0 0 5px rgba(255, 170, 0, 0.3);
}

[data-theme="even-funkyer"] .page-header-badge.badge-danger {
  background: rgba(255, 0, 102, 0.15);
  color: var(--pro-accent-danger);
  box-shadow: 0 0 5px rgba(255, 0, 102, 0.3);
}

[data-theme="even-funkyer"] .page-header-badge.badge-info {
  background: rgba(0, 255, 255, 0.15);
  color: var(--pro-accent-info);
  box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .page-header {
    position: static !important;
    background: white !important;
    border-bottom: 1px solid #ddd !important;
    box-shadow: none !important;
  }
  
  .page-header-actions {
    display: none !important;
  }
  
  .page-header-sticky.is-sticky {
    position: static !important;
  }
}

/* css/modals.css */
/**
 * ==========================================================================
 * MODALS.CSS - Enterprise Trading Platform Modal Styles
 * ==========================================================================
 * 
 * This file contains all modal-related styles including:
 * - Base modal z-index and backdrop handling
 * - Slide-in panel modals (new Phase 3B feature)
 * - Modal headers, bodies, and footers
 * - Form styling within modals
 * - Specific modal overrides (wizards, filters, etc.)
 * - Theme variations (light, even-funkyer)
 * 
 * ==========================================================================
 */

/* ==========================================================================
   1. BASE MODAL Z-INDEX & BACKDROP
   ========================================================================== */

/* 
 * FIX: Bootstrap 5 appends modal-backdrop to END of body AFTER the modal,
 * so it appears on top due to DOM order. We must use significantly higher
 * z-index on modal elements to overcome this.
 * 
 * Bootstrap defaults: backdrop=1050, modal=1055
 * Our fix: backdrop=1040, modal-dialog=1060
 */

/* Base backdrop - keep at lower z-index */
.modal-backdrop,
.modal-backdrop.fade,
.modal-backdrop.show {
  z-index: 1040 !important;
}

/* Modal container - needs to be above backdrop */
.modal,
.modal.fade,
.modal.show {
  z-index: 1050 !important;
}

/* Modal dialog - the key fix: significantly higher than backdrop */
.modal-dialog {
  position: relative;
  z-index: 1060 !important;
  pointer-events: auto !important;
}

/* Modal content - ensure clickable and above everything */
.modal-content {
  position: relative;
  z-index: 1061 !important;
  pointer-events: auto !important;
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 12px;
  box-shadow: var(--pro-shadow-lg, 0 16px 48px rgba(0, 0, 0, 0.4));
}

/* Force body-level modals to have correct stacking */
body > .modal.show {
  z-index: 1050 !important;
}

body > .modal.show .modal-dialog {
  z-index: 1060 !important;
}

body > .modal.show .modal-content {
  z-index: 1061 !important;
}

body > .modal-backdrop.show {
  z-index: 1040 !important;
}

/* Ensure nested modals stack correctly */
.modal ~ .modal-backdrop {
  z-index: 1070 !important;
}

.modal ~ .modal {
  z-index: 1075 !important;
}

.modal ~ .modal .modal-dialog {
  z-index: 1080 !important;
}

.modal ~ .modal .modal-content {
  z-index: 1081 !important;
}

/* ==========================================================================
   2. SLIDE-IN PANEL MODALS (Phase 3B)
   ========================================================================== */

/* Slide-in animation keyframes */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideInTop {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutTop {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@keyframes slideInBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutBottom {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Base slide-in panel class */
.modal-slide-panel {
  --slide-panel-width: 600px;
}

.modal-slide-panel .modal-dialog {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  width: var(--slide-panel-width);
  max-width: 100vw;
  height: 100%;
  max-height: 100vh;
  transform: translateX(0);
  animation: slideInRight 0.3s ease-out;
}

.modal-slide-panel.fade .modal-dialog {
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

.modal-slide-panel.show .modal-dialog {
  transform: translateX(0);
}

.modal-slide-panel .modal-content {
  height: 100%;
  border-radius: 0;
  border-right: none;
  border-top: none;
  border-bottom: none;
  border-left: 1px solid var(--pro-border-color, #30363d);
  display: flex;
  flex-direction: column;
}

/* Slide-in panel size variants */
.modal-slide-panel-lg {
  --slide-panel-width: 800px;
}

.modal-slide-panel-xl {
  --slide-panel-width: 1000px;
}

.modal-slide-panel-full {
  --slide-panel-width: calc(100vw - 80px);
}

/* ==========================================================================
   2A-2. MODAL FULLSCREEN MODE
   Toggle modals to fullscreen with expand/collapse button
   ========================================================================== */

/* Fullscreen toggle button in modal header */
.modal-fullscreen-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-right: 8px;
}

.modal-fullscreen-toggle:hover {
  background: var(--pro-bg-tertiary, #21262d);
  color: var(--pro-text-primary, #e6edf3);
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.modal-fullscreen-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(47, 129, 247, 0.3);
}

.modal-fullscreen-toggle .fa-compress {
  display: none;
}

.modal-fullscreen-mode .modal-fullscreen-toggle .fa-expand {
  display: none;
}

.modal-fullscreen-mode .modal-fullscreen-toggle .fa-compress {
  display: inline;
}

/* Fullscreen modal styling */
.modal-slide-panel.modal-fullscreen-mode .modal-dialog {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

.modal-slide-panel.modal-fullscreen-mode.show .modal-dialog {
  transform: none !important;
}

.modal-slide-panel.modal-fullscreen-mode .modal-content {
  border: none !important;
  border-radius: 0 !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

/* Responsive: Full width on mobile */
@media (max-width: 767.98px) {
  .modal-slide-panel,
  .modal-slide-panel-lg,
  .modal-slide-panel-xl {
    --slide-panel-width: 100vw;
  }
  
  .modal-slide-panel .modal-content {
    border-left: none;
  }
}

@media (max-width: 991.98px) {
  .modal-slide-panel-xl {
    --slide-panel-width: 100vw;
  }
}

/* ==========================================================================
   2B. SLIDE DIRECTION VARIANTS
   ========================================================================== */

/* Slide from Left */
.modal-slide-panel.modal-slide-left .modal-dialog,
[data-modal-slide="left"] .modal-slide-panel .modal-dialog {
  right: auto;
  left: 0;
  animation: slideInLeft 0.3s ease-out;
}

.modal-slide-panel.modal-slide-left.fade .modal-dialog,
[data-modal-slide="left"] .modal-slide-panel.fade .modal-dialog {
  transform: translateX(-100%);
}

.modal-slide-panel.modal-slide-left.show .modal-dialog,
[data-modal-slide="left"] .modal-slide-panel.show .modal-dialog {
  transform: translateX(0);
}

.modal-slide-panel.modal-slide-left .modal-content,
[data-modal-slide="left"] .modal-slide-panel .modal-content {
  border-left: none;
  border-right: 1px solid var(--pro-border-color, #30363d);
}

/* Slide from Top */
.modal-slide-panel.modal-slide-top .modal-dialog,
[data-modal-slide="top"] .modal-slide-panel .modal-dialog {
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 80vh;
  animation: slideInTop 0.3s ease-out;
}

.modal-slide-panel.modal-slide-top.fade .modal-dialog,
[data-modal-slide="top"] .modal-slide-panel.fade .modal-dialog {
  transform: translateY(-100%);
}

.modal-slide-panel.modal-slide-top.show .modal-dialog,
[data-modal-slide="top"] .modal-slide-panel.show .modal-dialog {
  transform: translateY(0);
}

.modal-slide-panel.modal-slide-top .modal-content,
[data-modal-slide="top"] .modal-slide-panel .modal-content {
  height: auto;
  max-height: 80vh;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px solid var(--pro-border-color, #30363d);
  border-radius: 0 0 12px 12px;
}

/* Slide from Bottom */
.modal-slide-panel.modal-slide-bottom .modal-dialog,
[data-modal-slide="bottom"] .modal-slide-panel .modal-dialog {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 80vh;
  animation: slideInBottom 0.3s ease-out;
}

.modal-slide-panel.modal-slide-bottom.fade .modal-dialog,
[data-modal-slide="bottom"] .modal-slide-panel.fade .modal-dialog {
  transform: translateY(100%);
}

.modal-slide-panel.modal-slide-bottom.show .modal-dialog,
[data-modal-slide="bottom"] .modal-slide-panel.show .modal-dialog {
  transform: translateY(0);
}

.modal-slide-panel.modal-slide-bottom .modal-content,
[data-modal-slide="bottom"] .modal-slide-panel .modal-content {
  height: auto;
  max-height: 80vh;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid var(--pro-border-color, #30363d);
  border-radius: 12px 12px 0 0;
}

/* ==========================================================================
   2C. NAV-POSITION-AWARE MODAL DEFAULTS
   When nav is on right, modals slide from left by default (and vice versa)
   ========================================================================== */

/* Right nav -> modals slide from left */
[data-nav-position="right"] .modal-slide-panel .modal-dialog {
  right: auto;
  left: 0;
  animation: slideInLeft 0.3s ease-out;
}

[data-nav-position="right"] .modal-slide-panel.fade .modal-dialog {
  transform: translateX(-100%);
}

[data-nav-position="right"] .modal-slide-panel.show .modal-dialog {
  transform: translateX(0);
}

[data-nav-position="right"] .modal-slide-panel .modal-content {
  border-left: none;
  border-right: 1px solid var(--pro-border-color, #30363d);
}

/* Top/Bottom nav -> modals slide from right (default, no change needed) */

/* ==========================================================================
   2D. EXPLICIT DATA-MODAL-SLIDE OVERRIDE
   data-modal-slide on body takes precedence over nav-position defaults
   ========================================================================== */

/* Explicit right override (reset to default right slide) */
[data-modal-slide="right"] .modal-slide-panel .modal-dialog {
  right: 0;
  left: auto;
  animation: slideInRight 0.3s ease-out;
}

[data-modal-slide="right"] .modal-slide-panel.fade .modal-dialog {
  transform: translateX(100%);
}

[data-modal-slide="right"] .modal-slide-panel.show .modal-dialog {
  transform: translateX(0);
}

[data-modal-slide="right"] .modal-slide-panel .modal-content {
  border-right: none;
  border-left: 1px solid var(--pro-border-color, #30363d);
}

/* ==========================================================================
   3. MODAL HEADER STYLING
   ========================================================================== */

.modal-header {
  background: var(--pro-bg-tertiary, #1c2128);
  border-bottom: 1px solid var(--pro-border-color, #30363d);
  padding: 16px 24px;
  flex-shrink: 0;
}

.modal-slide-panel .modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: var(--pro-bg-tertiary, #1c2128);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pro-text-primary, #e6edf3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title i,
.modal-title .fas,
.modal-title .far,
.modal-title .fab {
  color: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  font-size: 1.1rem;
}

/* Modal subtitle for additional context */
.modal-subtitle {
  font-size: 0.875rem;
  color: var(--pro-text-secondary, #8b949e);
  margin-top: 4px;
  font-weight: 400;
}

/* Close button styling */
.modal-header .btn-close {
  filter: brightness(0.8) invert(1);
  opacity: 0.7;
  padding: 12px;
  margin: -8px -8px -8px auto;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.modal-header .btn-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.modal-header .btn-close:focus {
  outline: 2px solid var(--user-accent, var(--pro-accent-primary, #2f81f7));
  outline-offset: 2px;
  box-shadow: none;
}

/* Header action buttons area */
.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 16px;
}

/* Gradient header variant (for wizards and important modals) */
.modal-header-gradient {
  background: linear-gradient(135deg, var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7))), var(--primary-dark, #1a4d8c));
  border-bottom: none;
}

.modal-header-gradient .modal-title {
  color: white;
}

.modal-header-gradient .modal-title i {
  color: rgba(255, 255, 255, 0.9);
}

.modal-header-gradient .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modal-header-gradient .btn-close:hover {
  opacity: 1;
}

/* ==========================================================================
   4. MODAL BODY STYLING
   ========================================================================== */

.modal-body {
  background: var(--pro-bg-secondary, #161b22);
  padding: 24px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.modal-slide-panel .modal-body {
  padding: 24px;
}

/* Flush variant for edge-to-edge content (tables, editors) */
.modal-body-flush {
  padding: 0;
}

/* Modal sections for organizing content */
.modal-section {
  margin-bottom: 24px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pro-text-secondary, #8b949e);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--pro-border-color, #30363d);
}

/* Section divider */
.modal-section-divider {
  height: 1px;
  background: var(--pro-border-color, #30363d);
  margin: 24px 0;
}

/* Custom scrollbar for modal body */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--pro-bg-primary, #0d1117);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--pro-border-color, #30363d);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--pro-border-emphasis, #484f58);
}

/* ==========================================================================
   5. MODAL FOOTER STYLING
   ========================================================================== */

.modal-footer {
  background: var(--pro-bg-tertiary, #1c2128);
  border-top: 1px solid var(--pro-border-color, #30363d);
  padding: 16px 24px;
  flex-shrink: 0;
  gap: 12px;
}

.modal-slide-panel .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: var(--pro-bg-tertiary, #1c2128);
}

/* Footer with left and right sections */
.modal-footer-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.modal-footer-left {
  display: flex;
  gap: 12px;
}

.modal-footer-right {
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   6. FORM STYLING WITHIN MODALS (.form-pro)
   ========================================================================== */

.form-pro {
  /* Container for enhanced form styling */
}

.form-pro .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pro-text-primary, #e6edf3);
  margin-bottom: 6px;
}

.form-pro .form-label.required::after {
  content: ' *';
  color: var(--pro-accent-danger, #f85149);
}

.form-pro .form-control,
.form-pro .form-select {
  background: var(--pro-bg-primary, #0d1117);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  color: var(--pro-text-primary, #e6edf3);
  padding: 10px 14px;
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-pro .form-control::placeholder {
  color: var(--pro-text-muted, #6e7681);
}

.form-pro .form-control:focus,
.form-pro .form-select:focus {
  background: var(--pro-bg-primary, #0d1117);
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
  color: var(--pro-text-primary, #e6edf3);
  outline: none;
}

.form-pro .form-select option {
  background: var(--pro-bg-secondary, #161b22);
  color: var(--pro-text-primary, #e6edf3);
}

/* Inline form row */
.form-row-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.form-row-inline .form-label {
  margin-bottom: 0;
  min-width: 120px;
  flex-shrink: 0;
}

.form-row-inline .form-control,
.form-row-inline .form-select {
  flex: 1;
}

/* Compact form group for long forms */
.form-group-compact {
  margin-bottom: 12px;
}

.form-group-compact .form-label {
  margin-bottom: 4px;
  font-size: 0.8125rem;
}

.form-group-compact .form-control,
.form-group-compact .form-select {
  padding: 8px 12px;
  font-size: 0.875rem;
}

/* Form hint text */
.form-hint {
  font-size: 0.75rem;
  color: var(--pro-text-muted, #6e7681);
  margin-top: 4px;
}

/* Character counter */
.form-char-count {
  font-size: 0.75rem;
  color: var(--pro-text-muted, #6e7681);
  text-align: right;
  margin-top: 4px;
}

.form-char-count.warning {
  color: var(--pro-accent-warning, #d29922);
}

.form-char-count.danger {
  color: var(--pro-accent-danger, #f85149);
}

/* ==========================================================================
   7. FORM VALIDATION STATES
   ========================================================================== */

/* Valid state */
.form-pro .form-control.is-valid,
.form-pro .form-select.is-valid {
  border-color: var(--pro-accent-success, #3fb950);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%233fb950' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-pro .form-control.is-valid:focus {
  border-color: var(--pro-accent-success, #3fb950);
  box-shadow: 0 0 0 3px var(--pro-accent-success-muted, rgba(63, 185, 80, 0.2));
}

/* Invalid state */
.form-pro .form-control.is-invalid,
.form-pro .form-select.is-invalid {
  border-color: var(--pro-accent-danger, #f85149);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23f85149'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23f85149' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  animation: shake 0.3s ease;
}

.form-pro .form-control.is-invalid:focus {
  border-color: var(--pro-accent-danger, #f85149);
  box-shadow: 0 0 0 3px var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.2));
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Feedback messages */
.valid-feedback {
  display: none;
  color: var(--pro-accent-success, #3fb950);
  font-size: 0.8125rem;
  margin-top: 4px;
  animation: fadeIn 0.2s ease;
}

.invalid-feedback {
  display: none;
  color: var(--pro-accent-danger, #f85149);
  font-size: 0.8125rem;
  margin-top: 4px;
  animation: fadeIn 0.2s ease;
}

.is-valid ~ .valid-feedback,
.is-invalid ~ .invalid-feedback {
  display: block;
}

/* ==========================================================================
   8. JSONEDITOR THEME INTEGRATION
   ========================================================================== */

/* JSONEditor container */
.je-container,
[id*="EditorContainer"] {
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 8px;
  padding: 16px;
}

/* JSONEditor navigation/menu */
.je-object__container,
.je-indented-panel {
  border: none !important;
  background: transparent !important;
  padding: 8px 0 !important;
  margin: 0 !important;
}

/* Override bg-light in JSONEditor - comprehensive selectors */
.je-object__container.bg-light,
.je-indented-panel.bg-light,
[id*="EditorContainer"] .bg-light,
.form-modal-editor .bg-light,
.form-modal-editor .card.bg-light,
.modal-body .je-object__container.bg-light,
.modal-body .card.bg-light {
  background: var(--pro-bg-tertiary, #1c2128) !important;
  border-color: var(--pro-border-color, #30363d) !important;
}

/* Card styling within modals */
.modal-body .card,
.form-modal-editor .card {
  background: var(--pro-bg-tertiary, #1c2128) !important;
  border: 1px solid var(--pro-border-color, #30363d) !important;
  border-radius: 8px !important;
}

.modal-body .card-body,
.form-modal-editor .card-body {
  color: var(--pro-text-primary, #e6edf3) !important;
}

/* JSONEditor input fields */
.je-form-input-label,
[id*="EditorContainer"] label {
  color: var(--pro-text-primary, #e6edf3) !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  margin-bottom: 6px !important;
}

[id*="EditorContainer"] input.form-control,
[id*="EditorContainer"] textarea.form-control,
[id*="EditorContainer"] select.form-control,
.je-form-control {
  background: var(--pro-bg-primary, #0d1117) !important;
  border: 1px solid var(--pro-border-color, #30363d) !important;
  border-radius: 6px !important;
  color: var(--pro-text-primary, #e6edf3) !important;
  padding: 8px 12px !important;
}

[id*="EditorContainer"] input.form-control:focus,
[id*="EditorContainer"] textarea.form-control:focus,
[id*="EditorContainer"] select.form-control:focus {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2)) !important;
  outline: none !important;
}

/* JSONEditor buttons */
.je-btn,
[id*="EditorContainer"] .btn {
  background: var(--pro-bg-tertiary, #1c2128) !important;
  border: 1px solid var(--pro-border-color, #30363d) !important;
  color: var(--pro-text-primary, #e6edf3) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  font-size: 0.8125rem !important;
  transition: all 0.15s ease !important;
}

.je-btn:hover,
[id*="EditorContainer"] .btn:hover {
  background: var(--pro-bg-primary, #0d1117) !important;
  border-color: var(--pro-border-emphasis, #484f58) !important;
}

/* JSONEditor tree view */
.je-object__title {
  color: var(--pro-text-primary, #e6edf3) !important;
  font-weight: 600 !important;
}

/* JSONEditor checkboxes */
[id*="EditorContainer"] input[type="checkbox"] {
  width: 18px;
  height: 18px;
  appearance: none;
  background: var(--pro-bg-primary, #0d1117);
  border: 2px solid var(--pro-border-color, #30363d);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

[id*="EditorContainer"] input[type="checkbox"]:checked {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

[id*="EditorContainer"] input[type="checkbox"]:checked::after {
  content: '✓';
  display: block;
  color: white;
  font-size: 12px;
  text-align: center;
  line-height: 14px;
}

[id*="EditorContainer"] input[type="checkbox"]:focus {
  outline: 2px solid var(--user-accent, var(--pro-accent-primary, #2f81f7));
  outline-offset: 2px;
}

/* JSONEditor scrollbar */
.je-container::-webkit-scrollbar,
[id*="EditorContainer"]::-webkit-scrollbar {
  width: 8px;
}

.je-container::-webkit-scrollbar-track,
[id*="EditorContainer"]::-webkit-scrollbar-track {
  background: var(--pro-bg-primary, #0d1117);
}

.je-container::-webkit-scrollbar-thumb,
[id*="EditorContainer"]::-webkit-scrollbar-thumb {
  background: var(--pro-border-color, #30363d);
  border-radius: 4px;
}

/* ==========================================================================
   9. SPECIFIC MODAL OVERRIDES
   ========================================================================== */

/* --- Relationship Modal --- */
#relationshipsModal,
#relationshipFormModal,
#relationshipImportModal,
#relationshipImportResultsModal {
  z-index: 1050 !important;
}

#relationshipFormModal .modal-dialog {
  max-width: 800px;
}

#relationshipFormModal .modal-content {
  border-radius: 16px;
  box-shadow: var(--pro-shadow-xl, 0 20px 60px rgba(0, 0, 0, 0.5));
}

#relationshipFormModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--primary-dark, #1a4d8c));
  color: white;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 20px 30px;
}

#relationshipFormModal .modal-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
}

#relationshipFormModal .modal-body {
  padding: 30px;
}

#relationshipFormModal .modal-footer {
  background: var(--pro-bg-tertiary, #1c2128);
  border-radius: 0 0 14px 14px;
  padding: 20px 30px;
}

/* --- Template Wizard Modal --- */
#templateWizardModal .modal-dialog {
  max-width: 900px;
}

#templateWizardModal .modal-content {
  border-radius: 16px;
  box-shadow: var(--pro-shadow-xl, 0 20px 60px rgba(0, 0, 0, 0.5));
  min-height: 600px;
}

#templateWizardModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--primary-dark, #1a4d8c));
  color: white;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 20px 30px;
}

#templateWizardModal .modal-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
}

#templateWizardModal .modal-body {
  padding: 30px;
  min-height: 400px;
}

#templateWizardModal .modal-footer {
  background: var(--pro-bg-tertiary, #1c2128);
  border-radius: 0 0 14px 14px;
  padding: 20px 30px;
}

@media (max-width: 991.98px) {
  #templateWizardModal .modal-dialog {
    max-width: 100%;
    margin: 0;
  }
}

/* --- Trade Wizard Modal --- */
#tradeWizardModal .modal-dialog {
  max-width: 900px;
}

#tradeWizardModal .modal-content {
  min-height: 500px;
}

#tradeWizardModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--primary-dark, #1a4d8c));
  color: white;
  border-bottom: none;
}

#tradeWizardModal .modal-body {
  padding: 24px;
}

#tradeWizardModal .modal-footer {
  background: var(--pro-bg-tertiary, #1c2128);
}

#tradeWizardModal .form-label {
  color: var(--pro-text-primary, #e6edf3);
  font-weight: 500;
}

#tradeWizardModal .form-control,
#tradeWizardModal .form-select {
  background: var(--pro-bg-primary, #0d1117);
  border-color: var(--pro-border-color, #30363d);
  color: var(--pro-text-primary, #e6edf3);
}

#tradeWizardModal .form-control:focus,
#tradeWizardModal .form-select:focus {
  border-color: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
}

#tradeWizardModal .alert-info {
  background: var(--pro-accent-info-muted, rgba(59, 130, 246, 0.1));
  border-color: var(--pro-accent-info-border, rgba(59, 130, 246, 0.3));
  color: var(--pro-text-primary, #e6edf3);
}

/* Trade Wizard responsive */
@media (max-width: 767.98px) {
  #tradeWizardModal .modal-dialog {
    max-width: 100%;
    margin: 0;
    height: 100%;
  }
  
  #tradeWizardModal .modal-content {
    height: 100%;
    border-radius: 0;
  }
  
  #tradeWizardModal .modal-body {
    padding: 16px;
  }
}

@media (max-width: 575.98px) {
  #tradeWizardModal .modal-header,
  #tradeWizardModal .modal-footer {
    padding: 12px 16px;
  }
  
  #tradeWizardModal .modal-footer .btn {
    padding: 8px 16px;
    font-size: 0.875rem;
  }
}

/* --- Bulk Actions Modal --- */
#bulkActionsModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info, #58a6ff));
  color: white;
  border-bottom: none;
}

#bulkActionsModal .modal-header .btn-close {
  filter: brightness(0) invert(1);
}

#bulkActionsModal .modal-body {
  background: var(--pro-bg-secondary, #161b22);
}

#bulkActionsModal .table {
  color: var(--pro-text-primary, #e6edf3);
  margin-bottom: 0;
}

#bulkActionsModal .table thead th {
  background: var(--pro-bg-tertiary, #1c2128) !important;
  color: var(--pro-text-primary, #e6edf3) !important;
  font-weight: 600;
  border-bottom: 2px solid var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  padding: 0.75rem;
}

#bulkActionsModal .table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--pro-border-color, #30363d);
}

#bulkActionsModal .table-hover tbody tr:hover {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.05));
}

#bulkActionsModal .alert-info {
  background: var(--pro-accent-info-muted, rgba(59, 130, 246, 0.1));
  border-color: var(--pro-accent-info-border, rgba(59, 130, 246, 0.3));
  color: var(--pro-text-primary, #e6edf3);
}

#bulkActionsModal .alert-warning {
  background: var(--pro-accent-warning-muted, rgba(245, 158, 11, 0.1));
  border-color: var(--pro-accent-warning-border, rgba(245, 158, 11, 0.3));
  color: var(--pro-text-primary, #e6edf3);
}

/* --- Advanced Filter Modal --- */
#advancedFilterModal .modal-dialog {
  max-width: 1200px;
}

#advancedFilterModal .filter-section {
  animation: fadeIn 0.3s ease;
}

/* Filter responsive */
@media (max-width: 767.98px) {
  #advancedFilterModal .modal-dialog {
    max-width: 100%;
    margin: 0;
  }
  
  #advancedFilterModal .modal-content {
    border-radius: 0;
    height: 100vh;
  }
}

/* --- Format Rules Modal --- */
.format-rules-modal .modal-dialog {
  max-width: 700px;
}

.format-rules-modal .modal-content {
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
}

.format-rules-modal .modal-header {
  border-bottom-color: var(--pro-border-color, #30363d);
  padding: 1rem 1.25rem;
}

.format-rules-modal .modal-body {
  padding: 1rem 1.25rem;
  max-height: 60vh;
  overflow-y: auto;
}

.format-rules-modal .modal-footer {
  border-top-color: var(--pro-border-color, #30363d);
  padding: 0.75rem 1.25rem;
}

/* --- Column Profile Modal --- */
.column-profile-modal .modal-content {
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
}

/* ==========================================================================
   10. SELECT2 IN MODALS
   ========================================================================== */

.modal .select2-container--bootstrap-5 .select2-selection {
  background-color: var(--pro-bg-primary, #0d1117) !important;
  border-color: var(--pro-border-color, #30363d) !important;
  color: var(--pro-text-primary, #e6edf3) !important;
  min-height: 38px;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  color: var(--pro-text-primary, #e6edf3) !important;
  padding: 6px 12px;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 36px;
}

.modal .select2-container--bootstrap-5.select2-container--focus .select2-selection {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2)) !important;
}

/* ==========================================================================
   11. LIGHT THEME OVERRIDES
   ========================================================================== */

[data-theme="light"] .modal-content {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-color);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .modal-header {
  background: var(--pro-bg-secondary);
  border-bottom-color: var(--pro-border-color);
}

[data-theme="light"] .modal-slide-panel .modal-header {
  background: rgba(246, 248, 250, 0.95);
}

[data-theme="light"] .modal-title {
  color: var(--pro-text-primary);
}

[data-theme="light"] .modal-title i {
  color: var(--pro-accent-primary);
}

[data-theme="light"] .modal-header .btn-close {
  filter: none;
  opacity: 0.6;
}

[data-theme="light"] .modal-header .btn-close:hover {
  opacity: 1;
}

[data-theme="light"] .modal-body {
  background: var(--pro-bg-elevated);
}

[data-theme="light"] .modal-footer {
  background: var(--pro-bg-secondary);
  border-top-color: var(--pro-border-color);
}

[data-theme="light"] .modal-slide-panel .modal-footer {
  background: rgba(246, 248, 250, 0.95);
}

[data-theme="light"] .modal-slide-panel .modal-content {
  border-left-color: var(--pro-border-color);
}

[data-theme="light"] .modal-section-title {
  color: var(--pro-text-secondary);
  border-bottom-color: var(--pro-border-color);
}

/* Light theme form styling */
[data-theme="light"] .form-pro .form-label {
  color: var(--pro-text-primary);
}

[data-theme="light"] .form-pro .form-control,
[data-theme="light"] .form-pro .form-select {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-color);
  color: var(--pro-text-primary);
}

[data-theme="light"] .form-pro .form-control::placeholder {
  color: var(--pro-text-muted);
}

[data-theme="light"] .form-pro .form-control:focus,
[data-theme="light"] .form-pro .form-select:focus {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 3px var(--pro-accent-primary-muted);
}

[data-theme="light"] .form-hint,
[data-theme="light"] .form-char-count {
  color: var(--pro-text-muted);
}

/* Light theme JSONEditor */
[data-theme="light"] .je-container,
[data-theme="light"] [id*="EditorContainer"] {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-border-color);
}

[data-theme="light"] [id*="EditorContainer"] input.form-control,
[data-theme="light"] [id*="EditorContainer"] textarea.form-control,
[data-theme="light"] [id*="EditorContainer"] select.form-control {
  background: var(--pro-bg-elevated) !important;
  border-color: var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
}

[data-theme="light"] [id*="EditorContainer"] label {
  color: var(--pro-text-primary) !important;
}

/* Light theme column profile modal */
[data-theme="light"] .column-profile-modal .modal-content {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-color);
}

/* ==========================================================================
   12. EVEN-FUNKYER THEME OVERRIDES
   ========================================================================== */

[data-theme="even-funkyer"] .modal-content {
  background: rgba(10, 10, 20, 0.95);
  border: 1px solid rgba(255, 0, 255, 0.3);
  box-shadow: 
    0 0 30px rgba(255, 0, 255, 0.2),
    0 16px 48px rgba(0, 0, 0, 0.5),
    inset 0 0 60px rgba(255, 0, 255, 0.05);
}

[data-theme="even-funkyer"] .modal-slide-panel .modal-content {
  border-left: 2px solid;
  border-image: linear-gradient(180deg, var(--pro-accent-primary), var(--pro-accent-secondary), var(--pro-accent-primary)) 1;
}

[data-theme="even-funkyer"] .modal-header {
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 255, 0.1));
  border-bottom: 1px solid rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .modal-slide-panel .modal-header {
  background: rgba(10, 10, 20, 0.95);
  backdrop-filter: blur(10px);
}

[data-theme="even-funkyer"] .modal-title {
  color: var(--pro-text-inverse);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

[data-theme="even-funkyer"] .modal-title i {
  color: var(--pro-accent-primary);
  filter: drop-shadow(0 0 5px var(--pro-accent-primary));
}

[data-theme="even-funkyer"] .modal-body {
  background: rgba(10, 10, 20, 0.9);
}

[data-theme="even-funkyer"] .modal-footer {
  background: rgba(15, 15, 25, 0.95);
  border-top: 1px solid rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .modal-section-title {
  color: var(--pro-accent-secondary);
  border-bottom-color: rgba(0, 255, 255, 0.3);
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* Even-funkyer form styling */
[data-theme="even-funkyer"] .form-pro .form-label {
  color: var(--pro-text-inverse);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

[data-theme="even-funkyer"] .form-pro .form-control,
[data-theme="even-funkyer"] .form-pro .form-select {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--pro-border-muted);
  color: var(--pro-text-inverse);
}

[data-theme="even-funkyer"] .form-pro .form-control:focus,
[data-theme="even-funkyer"] .form-pro .form-select:focus {
  border-color: var(--pro-accent-primary);
  box-shadow: 
    0 0 0 3px var(--pro-accent-primary-muted),
    0 0 15px rgba(255, 0, 255, 0.3);
}

/* Even-funkyer validation states */
[data-theme="even-funkyer"] .form-pro .form-control.is-valid {
  border-color: var(--pro-accent-success);
  box-shadow: 0 0 10px var(--pro-accent-success-muted);
}

[data-theme="even-funkyer"] .form-pro .form-control.is-invalid {
  border-color: var(--pro-accent-danger);
  box-shadow: 0 0 10px var(--pro-accent-danger-muted);
}

[data-theme="even-funkyer"] .valid-feedback {
  color: var(--pro-accent-success);
  text-shadow: 0 0 5px var(--pro-accent-success-muted);
}

[data-theme="even-funkyer"] .invalid-feedback {
  color: var(--pro-accent-danger);
  text-shadow: 0 0 5px var(--pro-accent-danger-muted);
}

/* Even-funkyer JSONEditor */
[data-theme="even-funkyer"] .je-container,
[data-theme="even-funkyer"] [id*="EditorContainer"] {
  background: rgba(10, 10, 20, 0.8);
  border-color: rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] [id*="EditorContainer"] input.form-control,
[data-theme="even-funkyer"] [id*="EditorContainer"] textarea.form-control,
[data-theme="even-funkyer"] [id*="EditorContainer"] select.form-control {
  background: rgba(0, 0, 0, 0.5) !important;
  border-color: rgba(0, 255, 255, 0.3) !important;
  color: var(--pro-text-inverse) !important;
}

[data-theme="even-funkyer"] [id*="EditorContainer"] input.form-control:focus,
[data-theme="even-funkyer"] [id*="EditorContainer"] textarea.form-control:focus,
[data-theme="even-funkyer"] [id*="EditorContainer"] select.form-control:focus {
  border-color: var(--pro-accent-secondary) !important;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3) !important;
}

[data-theme="even-funkyer"] [id*="EditorContainer"] label {
  color: var(--pro-accent-secondary) !important;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* Even-funkyer column profile modal */
[data-theme="even-funkyer"] .column-profile-modal .modal-content {
  background: rgba(10, 10, 20, 0.95);
  border-color: rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.2);
}

/* ==========================================================================
   13. WIZARD COMPONENTS (Shared)
   ========================================================================== */

/* Wizard Progress Bar */
.wizard-progress {
  margin-bottom: 30px;
  padding: 0;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}

.wizard-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pro-bg-tertiary, #1c2128);
  border: 2px solid var(--pro-border-color, #30363d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--pro-text-secondary, #8b949e);
  transition: all 0.3s ease;
  z-index: 1;
}

.wizard-step.active .wizard-step-number {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: white;
  box-shadow: 0 0 15px var(--user-accent-muted, rgba(47, 129, 247, 0.4));
}

.wizard-step.completed .wizard-step-number {
  background: var(--pro-accent-success, #3fb950);
  border-color: var(--pro-accent-success, #3fb950);
  color: white;
}

.wizard-step-label {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--pro-text-secondary, #8b949e);
  text-align: center;
}

.wizard-step.active .wizard-step-label {
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  font-weight: 500;
}

.wizard-step.completed .wizard-step-label {
  color: var(--pro-accent-success, #3fb950);
}

/* Wizard connector line */
.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(50% + 25px);
  width: calc(100% - 50px);
  height: 2px;
  background: var(--pro-border-color, #30363d);
  z-index: 0;
}

.wizard-step.completed:not(:last-child)::after {
  background: var(--pro-accent-success, #3fb950);
}

/* ==========================================================================
   14. LOADING & EMPTY STATES
   ========================================================================== */

.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--pro-text-secondary, #8b949e);
}

.modal-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--pro-border-color, #30363d);
  border-top-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

.modal-loading-text {
  font-size: 0.9375rem;
}

.modal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.modal-empty-icon {
  font-size: 3rem;
  color: var(--pro-text-muted, #6e7681);
  margin-bottom: 16px;
}

.modal-empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--pro-text-primary, #e6edf3);
  margin-bottom: 8px;
}

.modal-empty-description {
  font-size: 0.9375rem;
  color: var(--pro-text-secondary, #8b949e);
  max-width: 300px;
}

/* ==========================================================================
   15. ACCESSIBILITY
   ========================================================================== */

/* Focus trap indicator */
.modal:focus {
  outline: none;
}

.modal-dialog:focus {
  outline: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .modal-slide-panel .modal-dialog {
    animation: none;
  }
  
  .modal-slide-panel.fade .modal-dialog {
    transition: none;
  }
  
  .form-pro .form-control.is-invalid {
    animation: none;
  }
  
  .wizard-step-number {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .modal-content {
    border-width: 2px;
  }
  
  .form-pro .form-control:focus,
  .form-pro .form-select:focus {
    outline: 3px solid;
    outline-offset: 2px;
  }
}

/* ==========================================================================
   THEME CUSTOMIZER MODAL
   Quick-access theme switcher from header
   ========================================================================== */

.theme-customizer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pro-overlay-bg, rgba(0, 0, 0, 0.5));
  z-index: 1080;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  backdrop-filter: blur(2px);
}

.theme-customizer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.theme-customizer-modal {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 12px;
  box-shadow: var(--pro-shadow-xl);
  z-index: 1090;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.theme-customizer-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.theme-customizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--pro-border-color);
}

.theme-customizer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--pro-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-customizer-header h3 i {
  color: var(--user-accent, var(--pro-accent-primary));
}

.theme-customizer-close {
  background: transparent;
  border: none;
  color: var(--pro-text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.theme-customizer-close:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
}

.theme-customizer-body {
  padding: 16px 20px;
}

.theme-customizer-section {
  margin-bottom: 16px;
}

.theme-customizer-section:last-child {
  margin-bottom: 0;
}

.theme-customizer-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pro-text-muted);
  margin-bottom: 10px;
}

/* Theme Mode Buttons */
.theme-mode-options {
  display: flex;
  gap: 8px;
}

.theme-mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--pro-bg-tertiary);
  border: 2px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-mode-btn i {
  font-size: 18px;
}

.theme-mode-btn span {
  font-size: 11px;
  font-weight: 500;
}

.theme-mode-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-emphasis);
  color: var(--pro-text-primary);
}

.theme-mode-btn.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Accent Color Buttons */
.accent-color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.accent-color-btn {
  width: 32px;
  height: 32px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.accent-color-btn:hover {
  transform: scale(1.15);
  box-shadow: var(--pro-shadow-md, 0 2px 8px rgba(0, 0, 0, 0.3));
}

.accent-color-btn.active {
  border-color: var(--pro-text-primary);
  box-shadow: 0 0 0 2px var(--pro-bg-secondary), 0 0 0 4px currentColor;
}

.accent-color-btn.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
  text-shadow: var(--pro-text-shadow, 0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Navigation Position Buttons */
.nav-position-options {
  display: flex;
  gap: 8px;
}

.nav-position-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--pro-bg-tertiary);
  border: 2px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-position-btn i {
  font-size: 16px;
}

.nav-position-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-emphasis);
  color: var(--pro-text-primary);
}

.nav-position-btn.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Modal Slide Direction Buttons */
.modal-slide-options {
  display: flex;
  gap: 6px;
}

.modal-slide-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: var(--pro-bg-tertiary);
  border: 2px solid var(--pro-border-color);
  border-radius: 6px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-slide-btn i {
  font-size: 14px;
}

.modal-slide-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-emphasis);
  color: var(--pro-text-primary);
}

.modal-slide-btn.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Fullscreen Toggle Button */
.fullscreen-toggle-row {
  display: flex;
}

.fullscreen-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--pro-bg-tertiary);
  border: 2px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  font-weight: 500;
}

.fullscreen-toggle-btn i {
  font-size: 16px;
}

.fullscreen-toggle-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-emphasis);
  color: var(--pro-text-primary);
}

.fullscreen-toggle-btn.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Footer */
.theme-customizer-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--pro-border-color);
  text-align: center;
}

.theme-customizer-settings-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pro-text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.theme-customizer-settings-link:hover {
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Nav Position: Right - Modal appears on right side (near the nav) */
body[data-nav-position="right"] .theme-customizer-modal {
  left: auto;
  right: 280px; /* Position next to the right sidebar */
  transform: translateY(-10px) translateX(10px) scale(0.95);
}

body[data-nav-position="right"] .theme-customizer-modal.active {
  transform: translateY(0) translateX(0) scale(1);
}

/* Nav Position: Top - Modal slides from top-right */
body[data-nav-position="top"] .theme-customizer-modal {
  top: 80px;
}

/* Nav Position: Bottom - Toggle is still at top, so modal stays at top-right */
/* No positioning changes needed - uses default top: 70px, right: 20px */

/* Mobile adjustments */
@media (max-width: 768px) {
  .theme-customizer-modal {
    top: auto;
    bottom: 20px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }
  
  /* Reset nav-position specific styles on mobile */
  body[data-nav-position="right"] .theme-customizer-modal {
    right: 10px;
    left: 10px;
    transform: translateY(10px) scale(0.95);
  }
  
  body[data-nav-position="right"] .theme-customizer-modal.active {
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   IMPORT DROPZONE STYLING
   ========================================================================== */

.import-dropzone {
  background: var(--pro-bg-tertiary, #1c2128);
  border: 2px dashed var(--pro-border-color, #30363d) !important;
  border-radius: 12px !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.import-dropzone:hover,
.import-dropzone.dragover {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7)) !important;
  background: var(--pro-bg-secondary, #161b22);
}

.import-dropzone.dragover {
  transform: scale(1.01);
  box-shadow: 0 0 20px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
}

.import-dropzone i.fa-cloud-upload-alt {
  color: var(--pro-text-secondary, #8b949e);
  transition: color 0.2s ease;
}

.import-dropzone:hover i.fa-cloud-upload-alt,
.import-dropzone.dragover i.fa-cloud-upload-alt {
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.import-file-info {
  background: var(--pro-bg-tertiary, #1c2128);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 8px;
  padding: 12px 16px;
}

.import-file-name {
  color: var(--pro-text-primary, #e6edf3);
}

.import-file-size {
  color: var(--pro-text-secondary, #8b949e);
}

.import-results-summary.alert-success {
  background: rgba(35, 134, 54, 0.15);
  border-color: #238636;
  color: #3fb950;
}

.import-results-summary.alert-warning {
  background: rgba(187, 128, 9, 0.15);
  border-color: #bb8009;
  color: #d29922;
}

.import-results-summary.alert-danger {
  background: rgba(248, 81, 73, 0.15);
  border-color: #f85149;
  color: #f85149;
}

.import-instructions h6 {
  color: var(--pro-text-primary, #e6edf3);
  margin-bottom: 8px;
}

.import-instructions ul {
  padding-left: 20px;
}

.import-instructions li {
  margin-bottom: 4px;
}

.import-progress .progress {
  height: 8px;
  background: var(--pro-bg-tertiary, #1c2128);
  border-radius: 4px;
  overflow: hidden;
}

.import-progress .progress-bar {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

/* css/navigation.css */
/* ============================================
   NAVIGATION SYSTEM - Professional Sidebar Navigation
   Inspired by Bloomberg Terminal, GitHub, VS Code
   ============================================ */

/* ============================================
   CSS VARIABLES FOR NAVIGATION
   ============================================ */
:root {
  --nav-item-height: 36px;
  --nav-item-radius: 6px;
  --nav-icon-size: 18px;
  --nav-font-size: 13px;
  --nav-group-gap: 4px;
  --nav-indent: 32px;
  --nav-transition-fast: 0.15s ease;
  --nav-transition-normal: 0.2s ease;
  --nav-transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   SIDEBAR NAVIGATION CONTAINER
   ============================================ */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--pro-border-color) transparent;
}

/* Allow flyouts to overflow when sidebar is collapsed */
.sidebar.collapsed .sidebar-nav {
  overflow: visible;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--pro-border-color);
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--pro-border-emphasis);
}

/* ============================================
   NAVIGATION SECTIONS
   ============================================ */
.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  display: flex;
  align-items: center;
  padding: 8px 16px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pro-text-muted);
  user-select: none;
}

.sidebar.collapsed .nav-section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

/* ============================================
   NAVIGATION GROUP (Expandable)
   ============================================ */
.nav-group {
  position: relative;
  margin: 0 8px var(--nav-group-gap);
}

/* Group Header - Clickable */
.nav-group-header {
  display: flex;
  align-items: center;
  height: var(--nav-item-height);
  padding: 0 12px;
  border-radius: var(--nav-item-radius);
  color: var(--pro-text-secondary);
  cursor: pointer;
  user-select: none;
  transition: 
    background var(--nav-transition-fast),
    color var(--nav-transition-fast);
}

.nav-group-header:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
}

.nav-group-header:active {
  background: var(--pro-bg-elevated);
}

/* Focus styles for keyboard navigation */
.nav-group-header:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

/* Header Content Layout */
.nav-group-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Group Icon */
.nav-group-header .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity var(--nav-transition-fast);
}

.nav-group-header:hover .nav-icon {
  opacity: 1;
}

/* Group Text */
.nav-group-header .nav-text {
  flex: 1;
  font-size: var(--nav-font-size);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--nav-transition-slow);
}

/* Expand/Collapse Chevron */
.nav-group-chevron {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  opacity: 0.4;
  transition: 
    transform var(--nav-transition-normal),
    opacity var(--nav-transition-fast);
  flex-shrink: 0;
}

.nav-group-header:hover .nav-group-chevron {
  opacity: 0.7;
}

.nav-group.expanded .nav-group-chevron {
  transform: rotate(90deg);
  opacity: 0.7;
}

/* ============================================
   GROUP ITEMS CONTAINER (Collapsible)
   ============================================ */
.nav-group-items {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: 
    max-height var(--nav-transition-slow),
    opacity var(--nav-transition-normal),
    margin var(--nav-transition-normal);
}

.nav-group.expanded .nav-group-items {
  max-height: 500px;
  opacity: 1;
  margin-top: 2px;
  margin-bottom: 4px;
}

/* Child Nav Items */
.nav-group-items .nav-item {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-group-items .nav-link {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 12px 0 20px;
  margin: 1px 8px;
  border-radius: var(--nav-item-radius);
  color: var(--pro-text-muted);
  text-decoration: none;
  font-size: var(--nav-font-size);
  position: relative;
  transition: 
    background var(--nav-transition-fast),
    color var(--nav-transition-fast),
    border-color var(--nav-transition-fast);
  border-left: 2px solid transparent;
}

.nav-group-items .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
  border-left-color: var(--pro-border-emphasis);
}

.nav-group-items .nav-link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

/* Child Item Icon */
.nav-group-items .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.6;
  margin-right: 8px;
  flex-shrink: 0;
  transition: opacity var(--nav-transition-fast);
}

.nav-group-items .nav-link:hover .nav-icon {
  opacity: 0.9;
}

/* Child Item Text */
.nav-group-items .nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   ACTIVE STATES
   ============================================ */

/* Active child item */
.nav-group-items .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
  border-left-color: var(--user-accent, var(--pro-accent-primary));
}

.nav-group-items .nav-link.active .nav-icon {
  opacity: 1;
}

/* Parent group with active child */
.nav-group.has-active > .nav-group-header {
  color: var(--user-accent, var(--pro-accent-primary));
}

.nav-group.has-active > .nav-group-header .nav-icon {
  opacity: 1;
}

.nav-group.has-active > .nav-group-header .nav-group-chevron {
  opacity: 0.8;
}

/* Expanded group header with active child */
.nav-group.has-active.expanded > .nav-group-header {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
}

/* ============================================
   STANDALONE NAV ITEMS (No submenu)
   ============================================ */
.nav-standalone {
  position: relative;
  margin: 0 8px var(--nav-group-gap);
  list-style: none;
}

.nav-standalone .nav-link {
  display: flex;
  align-items: center;
  height: var(--nav-item-height);
  padding: 0 12px;
  border-radius: var(--nav-item-radius);
  color: var(--pro-text-secondary);
  text-decoration: none;
  transition: 
    background var(--nav-transition-fast),
    color var(--nav-transition-fast);
}

.nav-standalone .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
}

.nav-standalone .nav-link:active {
  background: var(--pro-bg-elevated);
}

.nav-standalone .nav-link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

.nav-standalone .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
}

.nav-standalone .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0.7;
  margin-right: 10px;
  flex-shrink: 0;
  transition: opacity var(--nav-transition-fast);
}

.nav-standalone .nav-link:hover .nav-icon,
.nav-standalone .nav-link.active .nav-icon {
  opacity: 1;
}

.nav-standalone .nav-text {
  flex: 1;
  font-size: var(--nav-font-size);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--nav-transition-slow);
}

/* ============================================
   NAVIGATION DIVIDER
   ============================================ */
.nav-divider {
  height: 1px;
  margin: 8px 16px;
  background: var(--pro-border-muted);
}

/* ============================================
   COLLAPSED SIDEBAR - Navigation Styles
   ============================================ */
.sidebar.collapsed .nav-group-header .nav-text,
.sidebar.collapsed .nav-group-header .nav-group-chevron,
.sidebar.collapsed .nav-standalone .nav-text {
  display: none;
}

.sidebar.collapsed .nav-group-header-content {
  flex: none;
  gap: 0;
}

.sidebar.collapsed .nav-group-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 40px;
  width: 40px;
  margin: 0 auto;
  border-radius: 8px;
}

.sidebar.collapsed .nav-standalone .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 40px;
  width: 40px;
  margin: 0 auto;
  border-radius: 8px;
}

.sidebar.collapsed .nav-group {
  margin: 0 0 var(--nav-group-gap);
  position: relative;
}

.sidebar.collapsed .nav-standalone {
  margin: 0 0 var(--nav-group-gap);
  position: relative;
}

.sidebar.collapsed .nav-group-header .nav-icon,
.sidebar.collapsed .nav-standalone .nav-icon {
  margin: 0;
}

/* Active state for collapsed sidebar - show accent ring around icon */
.sidebar.collapsed .nav-group.has-active > .nav-group-header {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

.sidebar.collapsed .nav-group.has-active > .nav-group-header .nav-icon {
  color: var(--user-accent, var(--pro-accent-primary));
}

.sidebar.collapsed .nav-standalone .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

.sidebar.collapsed .nav-standalone .nav-link.active .nav-icon {
  color: var(--user-accent, var(--pro-accent-primary));
}

.sidebar.collapsed .nav-group-items {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
  padding: 0;
}

/* ============================================
   FLYOUT MENU (Collapsed Sidebar Hover)
   ============================================ */

/* Hide flyout when sidebar is expanded */
.sidebar:not(.collapsed) .nav-flyout {
  display: none;
}

.nav-flyout {
  position: absolute;
  left: var(--sidebar-width-collapsed, 56px);
  top: 0;
  min-width: 180px;
  max-width: 240px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px) scale(0.98);
  transform-origin: left center;
  transition: 
    opacity var(--nav-transition-fast),
    visibility var(--nav-transition-fast),
    transform var(--nav-transition-normal);
  z-index: 1200; /* Above top-header (999) and content */
  pointer-events: none;
}

/* Arrow pointer */
.nav-flyout::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 14px;
  border: 6px solid transparent;
  border-right-color: var(--pro-border-color);
  border-left: none;
}

.nav-flyout::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 15px;
  border: 5px solid transparent;
  border-right-color: var(--pro-bg-elevated);
  border-left: none;
}

/* Flyout Title */
.nav-flyout-title {
  padding: 6px 10px 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pro-text-muted);
  border-bottom: 1px solid var(--pro-border-muted);
  margin-bottom: 4px;
}

/* Flyout Links */
.nav-flyout .nav-link {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--nav-item-radius);
  color: var(--pro-text-secondary);
  text-decoration: none;
  font-size: var(--nav-font-size);
  transition: 
    background var(--nav-transition-fast),
    color var(--nav-transition-fast);
}

.nav-flyout .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
}

.nav-flyout .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
  border-left: 2px solid var(--user-accent, var(--pro-accent-primary));
  padding-left: 10px;
}

.nav-flyout .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.7;
  margin-right: 8px;
  flex-shrink: 0;
}

.nav-flyout .nav-link:hover .nav-icon,
.nav-flyout .nav-link.active .nav-icon {
  opacity: 1;
}

/* Enable flyout display in collapsed mode */
.sidebar.collapsed .nav-flyout {
  display: block;
}

/* Show flyout on hover */
.sidebar.collapsed .nav-group:hover .nav-flyout,
.sidebar.collapsed .nav-standalone:hover .nav-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* Invisible bridge to prevent flyout closing */
.sidebar.collapsed .nav-group::after,
.sidebar.collapsed .nav-standalone::after {
  content: '';
  position: absolute;
  left: 40px;
  top: 0;
  width: calc(var(--sidebar-width-collapsed, 56px) - 40px + 4px);
  height: 100%;
  pointer-events: auto;
}

/* ============================================
   TOOLTIP (Standalone items in collapsed mode)
   ============================================ */
.sidebar.collapsed .nav-standalone .nav-link:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: var(--sidebar-width-collapsed, 56px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--pro-bg-elevated);
  color: var(--pro-text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--pro-shadow-md);
  border: 1px solid var(--pro-border-color);
  z-index: 1100;
}

/* ============================================
   MOBILE NAVIGATION STYLES
   ============================================ */

/* ============================================
   SIDEBAR TOGGLE BUTTON (Desktop collapse)
   ============================================ */
.sidebar-toggle {
  position: absolute;
  bottom: 60px; /* Above the install button footer */
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: var(--pro-bg-tertiary);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--nav-transition-normal);
  z-index: 10;
}

.sidebar-toggle:hover {
  background: var(--user-accent, var(--pro-accent-primary));
  color: white;
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.sidebar-toggle .toggle-icon {
  font-size: 12px;
  transition: transform var(--nav-transition-slow);
}

/* Rotate icon when sidebar is collapsed */
.sidebar.collapsed .sidebar-toggle .toggle-icon {
  transform: rotate(180deg);
}

/* ============================================
   HAMBURGER MENU BUTTON (Mobile)
   ============================================ */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  cursor: pointer;
  gap: 5px;
  transition: all var(--nav-transition-normal);
}

.hamburger-menu:hover {
  background: var(--pro-bg-tertiary);
  border-color: var(--pro-border-emphasis);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pro-text-secondary);
  border-radius: 1px;
  transition: all var(--nav-transition-normal);
}

/* Animate to X when active */
.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  /* Show hamburger on mobile */
  .hamburger-menu {
    display: flex;
  }
  
  /* Hide sidebar toggle on mobile */
  .sidebar-toggle {
    display: none;
  }
  
  .sidebar-nav {
    padding: 8px 0;
  }

  .nav-section-title {
    padding: 12px 16px 8px;
  }

  /* Hide flyouts on mobile */
  .nav-flyout {
    display: none !important;
  }
}

/* ============================================
   THEME OVERRIDES - Light Theme
   ============================================ */
[data-theme="light"] .nav-group-header:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-group-header:active {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nav-group-items .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-standalone .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-standalone .nav-link:active {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nav-flyout {
  background: var(--pro-bg-elevated);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .nav-flyout::after {
  border-right-color: var(--pro-bg-elevated);
}

[data-theme="light"] .nav-flyout .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ============================================
   THEME OVERRIDES - Even Funkier Theme
   ============================================ */
[data-theme="even-funkyer"] .nav-group-header:hover {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-group.has-active > .nav-group-header {
  color: var(--pro-accent-secondary);
  background: var(--pro-accent-secondary-muted);
}

[data-theme="even-funkyer"] .nav-group-items .nav-link:hover {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-group-items .nav-link.active {
  background: var(--pro-accent-secondary-muted);
  color: var(--pro-accent-secondary);
  border-left-color: var(--pro-accent-secondary);
  box-shadow: inset 3px 0 8px rgba(0, 255, 255, 0.3);
}

[data-theme="even-funkyer"] .nav-standalone .nav-link:hover {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-standalone .nav-link.active {
  background: var(--pro-accent-secondary-muted);
  color: var(--pro-accent-secondary);
}

/* Even Funkier - Collapsed sidebar active states */
[data-theme="even-funkyer"] .sidebar.collapsed .nav-group.has-active > .nav-group-header {
  background: var(--pro-accent-secondary-muted);
  box-shadow: inset 0 0 0 2px var(--pro-accent-secondary), 0 0 8px rgba(0, 255, 255, 0.3);
}

[data-theme="even-funkyer"] .sidebar.collapsed .nav-group.has-active > .nav-group-header .nav-icon {
  color: var(--pro-accent-secondary);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

[data-theme="even-funkyer"] .sidebar.collapsed .nav-standalone .nav-link.active {
  background: var(--pro-accent-secondary-muted);
  box-shadow: inset 0 0 0 2px var(--pro-accent-secondary), 0 0 8px rgba(0, 255, 255, 0.3);
}

[data-theme="even-funkyer"] .nav-flyout {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-accent-primary);
  box-shadow: 
    0 0 20px rgba(255, 0, 255, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="even-funkyer"] .nav-flyout::before {
  border-right-color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-flyout::after {
  border-right-color: var(--pro-bg-secondary);
}

[data-theme="even-funkyer"] .nav-flyout .nav-link:hover {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-flyout .nav-link.active {
  background: var(--pro-accent-secondary-muted);
  color: var(--pro-accent-secondary);
  border-left-color: var(--pro-accent-secondary);
  box-shadow: inset 3px 0 8px rgba(0, 255, 255, 0.3);
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .nav-group-header,
  .nav-group-items,
  .nav-group-items .nav-link,
  .nav-standalone .nav-link,
  .nav-group-chevron,
  .nav-flyout {
    transition: none !important;
  }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
  .nav-group-header:focus-visible,
  .nav-group-items .nav-link:focus-visible,
  .nav-standalone .nav-link:focus-visible {
    box-shadow: inset 0 0 0 3px var(--user-accent, var(--pro-accent-primary));
  }

  .nav-group-items .nav-link.active,
  .nav-standalone .nav-link.active {
    border: 2px solid var(--user-accent, var(--pro-accent-primary));
  }
}

/* css/tables.css */
/* ============================================
   TABLES.CSS - DataTable Enhancements
   Custom table styling, timezone, daterange
   ============================================ */

/* ============================================
   DATATABLE RELATIONSHIP MODAL
   ============================================ */
#relationshipsTable_wrapper .dataTables_length,
#relationshipsTable_wrapper .dataTables_filter,
#relationshipsTable_wrapper .dataTables_info,
#relationshipsTable_wrapper .dataTables_paginate {
  color: var(--pro-text-primary);
}

#relationshipsTable_wrapper .dataTables_length select,
#relationshipsTable_wrapper .dataTables_filter input {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 8px;
  padding: 6px 12px;
}

#relationshipsTable_wrapper .dataTables_paginate .paginate_button {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary) !important;
  border-radius: 6px;
  padding: 6px 12px;
  margin: 0 3px;
}

#relationshipsTable_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

#relationshipsTable_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

#relationshipsTable_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   SELECT2 THEME OVERRIDES
   ============================================ */
.select2-container--bootstrap-5 .select2-selection {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  height: 38px !important;
  min-height: 38px !important;
  transition: all 0.2s ease !important;
}

/* Modal form Select2 - match Bootstrap form controls */
.modal .select2-container--bootstrap-5 .select2-selection {
  border-radius: 0.375rem !important;
  padding: 0.375rem 0.75rem !important;
  height: 38px !important;
  min-height: 38px !important;
  border-width: 1px !important;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  line-height: 1.5 !important;
  padding-left: 0 !important;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  right: 8px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  color: var(--pro-text-primary) !important;
  padding-left: 0 !important;
  line-height: 26px !important;
  font-size: 12px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
  color: var(--pro-text-secondary) !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.1)) !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  right: 10px !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--user-accent, var(--pro-accent-primary)) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
  z-index: 9999 !important;
}

.select2-container--bootstrap-5 .select2-results__option {
  padding: 8px 12px !important;
  color: var(--pro-text-primary) !important;
  font-size: 12px !important;
  transition: all 0.2s ease !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background: var(--pro-bg-secondary) !important;
  color: var(--user-accent, var(--pro-accent-primary)) !important;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 6px !important;
  color: var(--pro-text-primary) !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  height: 32px !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  outline: none !important;
}

.select2-container--bootstrap-5 .select2-selection__clear {
  color: var(--pro-text-secondary) !important;
  font-size: 16px !important;
  margin-right: 8px !important;
  transition: color 0.2s ease !important;
}

.select2-container--bootstrap-5 .select2-selection__clear:hover {
  color: var(--user-accent, var(--pro-accent-primary)) !important;
}

/* ============================================
   CLIENT FILTER CONTAINER
   ============================================ */
.funky-client-filter {
  display: inline-block;
  vertical-align: top;
}

.funky-client-filter select {
  width: 200px;
  height: 36px;
  font-size: 12px;
}

/* ============================================
   DATE FILTER CONTAINERS
   ============================================ */
.funky-date-filter {
  display: inline-block;
  vertical-align: top;
}

.funky-date-filter select {
  width: 150px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  height: 36px;
}

.funky-date-range {
  display: inline-block;
  vertical-align: top;
}

.funky-date-range input {
  width: 240px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  height: 36px;
  cursor: pointer;
}

.funky-date-range input:hover,
.funky-date-range input:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  outline: none;
}

/* ============================================
   DATERANGEPICKER DARK THEME
   ============================================ */
.daterangepicker {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  color: var(--pro-text-primary) !important;
}

.daterangepicker .calendar-table {
  background: var(--pro-bg-elevated) !important;
  border: none !important;
}

.daterangepicker td,
.daterangepicker th {
  color: var(--pro-text-primary) !important;
  background: var(--pro-bg-elevated) !important;
}

.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

.daterangepicker td.in-range {
  background: var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.15)) !important;
  color: var(--pro-text-primary) !important;
}

.daterangepicker .ranges li {
  color: var(--pro-text-primary) !important;
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
}

.daterangepicker .ranges li:hover,
.daterangepicker .ranges li.active {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
}

.daterangepicker select {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
}

.daterangepicker .drp-buttons {
  border-top: 1px solid var(--pro-border-color) !important;
}

.daterangepicker .drp-buttons .btn {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  border: none !important;
  color: white !important;
}

.daterangepicker .drp-buttons .btn.btn-default {
  background: var(--pro-bg-secondary) !important;
  color: var(--pro-text-primary) !important;
}

/* ============================================
   REPORT FORMAT BUILDER
   ============================================ */
.format-builder {
  background: var(--pro-bg-elevated);
  border-radius: 8px;
  padding: 20px;
}

.format-section {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.format-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pro-border-color);
}

.format-section .section-header h6 {
  margin: 0;
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 600;
}

.format-section .section-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.format-section .section-body {
  padding-top: 10px;
}

/* Format Lines (Header/Footer) */
.format-line {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.format-line .line-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--pro-border-color);
  font-weight: 500;
  color: var(--pro-text-primary);
}

.format-line .line-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

/* Field input groups in header/footer lines - allow multiple per row */
.format-line .line-fields .field-input-group {
  flex: 1 1 280px;
  min-width: 280px;
  max-width: 100%;
  width: auto;
}

.field-input-group {
  display: flex;
  gap: 5px;
  flex: 1;
  min-width: 0;
  width: 100%;
  align-items: center;
}

.field-input-group input {
  flex: 1;
  min-width: 0;
  background: var(--pro-bg-secondary) !important;
  border-color: var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
}

.field-input-group select {
  flex: 1;
  min-width: 0;
}

.field-input-group input:focus {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.25) !important;
}

/* Column Rows (Content) */
.column-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.column-row .drag-handle {
  cursor: move;
  color: var(--pro-text-secondary);
  font-size: 20px;
  padding: 0 5px;
}

.column-row .column-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.column-row .column-fields input,
.column-row .column-fields select {
  background: var(--pro-bg-secondary) !important;
  border-color: var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
  height: auto !important;
  min-height: auto !important;
}

.column-row .column-fields input:focus,
.column-row .column-fields select:focus {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.25) !important;
}

/* Format Builder compact form controls - override global 38px height */
.format-builder .column-row .form-control,
.format-builder .column-row .form-select,
.format-builder .format-line .form-control,
.format-builder .format-line .form-select,
.format-builder .section-controls .form-control,
.format-builder .section-controls .form-select {
  height: calc(1.5em + 0.5rem + 2px) !important;
  min-height: auto !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.875rem !important;
}

/* Placeholder Grid */
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.placeholder-item {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.placeholder-item:hover {
  background: var(--pro-bg-secondary);
  border-color: var(--user-accent, var(--pro-accent-primary));
  transform: translateY(-2px);
}

.placeholder-item code {
  color: var(--user-accent, var(--pro-accent-primary));
  font-size: 12px;
  font-weight: 600;
  background: var(--pro-bg-secondary);
  padding: 2px 6px;
  border-radius: 3px;
}

.placeholder-item small {
  color: var(--pro-text-primary);
  font-weight: 500;
  font-size: 11px;
}

.placeholder-item .text-muted {
  color: var(--pro-text-secondary) !important;
  font-size: 10px;
  font-style: italic;
}

/* Config Preview */
.config-preview {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  padding: 15px;
  color: var(--pro-text-primary);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Full width detail row for config */
.detail-row.full-width {
  grid-template-columns: 1fr;
}

.detail-row.full-width .detail-label {
  margin-bottom: 10px;
}

/* Available Columns Panel */
.column-table-group {
  margin-bottom: 15px;
}

/* ============================================
   BADGE STYLES
   ============================================ */
.badge-funky {
  display: inline-flex;
  align-items: center;
  padding: 0.35em 0.75em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.badge-funky.badge-success {
  background: linear-gradient(135deg, var(--pro-accent-success), var(--pro-accent-success-text));
  color: white;
}

.badge-funky.badge-danger {
  background: linear-gradient(135deg, var(--pro-accent-danger), var(--pro-accent-danger-text));
  color: white;
}

.badge-funky.badge-inactive {
  background: var(--pro-bg-secondary);
  color: var(--pro-text-secondary);
  border: 1px solid var(--pro-border-color);
}

.badge-funky.badge-warning {
  background: linear-gradient(135deg, var(--pro-accent-warning), var(--pro-accent-warning-alt));
  color: white;
}

.badge-funky.badge-info {
  background: linear-gradient(135deg, var(--pro-accent-info), var(--pro-accent-info-text));
  color: white;
}

/* Status Dot Indicators */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot-online,
.status-dot-active {
  background: var(--pro-accent-success, #3fb950);
  box-shadow: 0 0 6px rgba(63, 185, 80, 0.6);
}

.status-dot-offline,
.status-dot-inactive {
  background: var(--pro-text-muted, #6e7681);
}

.status-dot-warning {
  background: var(--pro-accent-warning, #d29922);
  box-shadow: 0 0 6px rgba(210, 153, 34, 0.6);
}

.status-dot-error {
  background: var(--pro-accent-danger, #f85149);
  box-shadow: 0 0 6px rgba(248, 81, 73, 0.6);
}

/* Count Badges (Pill Style) */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: white;
}

.badge-count-muted {
  background: var(--pro-bg-elevated, #2d333b);
  color: var(--pro-text-secondary, #8b949e);
}

.badge-count-success {
  background: var(--pro-accent-success, #3fb950);
}

.badge-count-warning {
  background: var(--pro-accent-warning, #d29922);
}

.badge-count-danger {
  background: var(--pro-accent-danger, #f85149);
}

/* Light Theme Badge Overrides */
[data-theme="light"] .badge-funky.badge-inactive {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-secondary);
}

[data-theme="light"] .badge-count {
  background: var(--user-accent, var(--pro-accent-primary));
}

[data-theme="light"] .badge-count-muted {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-secondary);
}

/* ============================================
   STATS ROW
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  animation: statsFadeInUp 0.6s ease-out;
}

@keyframes statsFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stat Card Enhancements */
.stat-card {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 15px;
  padding: 25px;
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info), var(--pro-accent-primary));
  background-size: 200% 100%;
  animation: statsGradientShift 3s ease infinite;
  border-radius: 15px 15px 0 0;
}

@keyframes statsGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.15)) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.stat-icon {
  font-size: 42px;
  margin-bottom: 12px;
  display: block;
  animation: statsFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  position: relative;
  z-index: 1;
}

@keyframes statsFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.stat-label {
  font-size: 13px;
  color: var(--pro-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 600;
  display: block;
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  display: block;
  position: relative;
  z-index: 1;
}

/* ============================================
   HEADER ACTIONS
   Primary rules are in buttons.css - this just adds table-specific context
   ============================================ */
/* Note: .funky-header-actions base styles are in buttons.css */

.funky-search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.funky-search-box input {
  width: 100%;
  padding: 6px 12px 6px 32px;
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  color: var(--pro-text-primary);
  font-size: 12px;
  height: var(--btn-height-md, 36px);
  transition: all 0.2s ease;
}

.funky-search-box input:focus {
  outline: none;
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.1));
}

.funky-search-box::before {
  content: '🔍';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

/* ============================================
   RESPONSIVE STATS
   ============================================ */
@media (max-width: 1024px) {
  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-icon {
    font-size: 36px;
  }
  
  .stat-value {
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .stat-card {
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .stat-card::after {
    display: none;
  }
  
  .stat-icon {
    font-size: 32px;
    margin-bottom: 0;
    animation: none;
    flex-shrink: 0;
  }
  
  .stat-content {
    flex: 1;
  }
  
  .stat-label {
    font-size: 11px;
    margin-bottom: 5px;
  }
  
  .stat-value {
    font-size: 26px;
  }
  
  .funky-search-box input {
    padding: 10px 18px 10px 40px;
    font-size: 13px;
  }
  
  /* Reduce animations on mobile */
  .stat-card::before {
    animation: none;
    background: linear-gradient(90deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  }
  
  .stat-icon {
    animation: none;
  }
}

@media (max-width: 576px) {
  .stats-row {
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .stat-card {
    padding: 15px;
    border-radius: 12px;
  }
  
  .stat-icon {
    font-size: 28px;
  }
  
  .stat-label {
    font-size: 10px;
    letter-spacing: 0.5px;
  }
  
  .stat-value {
    font-size: 22px;
  }
  
  .funky-search-box input {
    padding: 10px 15px 10px 38px;
    font-size: 12px;
    border-radius: 20px;
  }
  
  .funky-search-box::before {
    left: 15px;
    font-size: 14px;
  }
}

@media (min-width: 1400px) {
  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
  }
  
  .stat-card {
    padding: 30px;
  }
  
  .stat-icon {
    font-size: 48px;
  }
  
  .stat-value {
    font-size: 42px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.stat-card:focus-visible {
  outline: 3px solid var(--user-accent, var(--pro-accent-primary));
  outline-offset: 3px;
}

.funky-search-box input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.3));
}

@media (prefers-reduced-motion: reduce) {
  .stat-icon {
    animation: none !important;
  }
  
  .stat-card::before {
    animation: none !important;
  }
}

@media (prefers-contrast: high) {
  .stat-card {
    border: 2px solid currentColor;
  }
}

/* Print styles */
@media print {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    page-break-inside: avoid;
  }
  
  .stat-card {
    border: 1px solid var(--pro-border-color);
    box-shadow: none;
    animation: none;
  }
  
  .stat-card::before,
  .stat-card::after {
    display: none;
  }
  
  .funky-header-actions {
    display: none;
  }
}

/* css/wizard.css */
/* ============================================
   WIZARD.CSS - Wizard Components
   Template wizard, trade wizard, clone wizard
   ============================================ */

/* ============================================
   TEMPLATE WIZARD MODAL
   ============================================ */
#templateWizardModal .modal-dialog {
  max-width: 900px;
}

#templateWizardModal .modal-content {
  background: var(--pro-bg-elevated);
  border: 2px solid var(--pro-border-color);
  border-radius: 16px;
  box-shadow: var(--pro-shadow-xl, 0 20px 60px rgba(0, 0, 0, 0.5));
  min-height: 600px;
}

#templateWizardModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--primary-dark));
  color: white;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 20px 30px;
}

#templateWizardModal .modal-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
}

#templateWizardModal .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

#templateWizardModal .btn-close:hover {
  opacity: 1;
}

#templateWizardModal .modal-body {
  background: var(--pro-bg-elevated);
  padding: 30px;
  min-height: 400px;
}

#templateWizardModal .modal-footer {
  background: var(--pro-bg-secondary);
  border-top: 1px solid var(--pro-border-color);
  border-radius: 0 0 14px 14px;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#templateWizardModal .modal-footer .btn-funky {
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   WIZARD PROGRESS BAR
   ============================================ */
.wizard-progress {
  margin-bottom: 30px;
  padding: 0;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--pro-border-color);
  z-index: 0;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.wizard-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pro-bg-secondary);
  border: 2px solid var(--pro-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--pro-text-secondary);
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-number {
  background: var(--user-accent, var(--pro-accent-primary));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: white;
  box-shadow: 0 4px 12px var(--user-accent-muted, rgba(47, 129, 247, 0.4));
  transform: scale(1.1);
}

.wizard-step.completed .wizard-step-number {
  background: var(--pro-accent-success);
  border-color: var(--pro-accent-success);
  color: white;
}

/* Completed step shows fa-check icon via JS, no need for ::before */

.wizard-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pro-text-muted);
  text-align: center;
}

.wizard-step.active .wizard-step-label {
  color: var(--user-accent, var(--pro-accent-primary));
}

.wizard-step.completed .wizard-step-label {
  color: var(--pro-accent-success);
}

/* ============================================
   WIZARD STEP CONTENT
   ============================================ */
.wizard-content {
  display: none;
  animation: wizardFadeIn 0.3s ease-in;
}

.wizard-content.active {
  display: block;
}

@keyframes wizardFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-content h6 {
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 600;
  font-size: 1.1rem;
}

.wizard-content .text-muted {
  color: var(--pro-text-secondary) !important;
  font-size: 0.9rem;
}

.wizard-content .alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.wizard-content .alert-info {
  background: var(--pro-accent-info-muted);
  border: 1px solid var(--pro-accent-info);
  color: var(--pro-accent-info);
}

.wizard-content .alert-warning {
  background: var(--pro-accent-warning-muted);
  border: 1px solid var(--pro-accent-warning);
  color: var(--pro-accent-warning);
}

/* ============================================
   CLONE WIZARD PROGRESS
   ============================================ */
.clone-wizard-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 0 20px;
}

.clone-wizard-progress .wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 0 20px;
}

.wizard-step-connector {
  flex: 1;
  height: 2px;
  background: var(--pro-border-color);
  max-width: 100px;
  min-width: 40px;
  margin-top: -20px;
}

.wizard-step.completed + .wizard-step-connector {
  background: var(--pro-accent-success);
}

/* ============================================
   WIZARD SEARCH BOX
   ============================================ */
.wizard-search-box {
  position: relative;
}

.wizard-search-box input {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  padding: 10px 15px;
  color: var(--pro-text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.wizard-search-box input:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  outline: none;
}

.wizard-search-box input::placeholder {
  color: var(--pro-text-secondary);
}

/* ============================================
   WIZARD EDITOR CONTAINERS
   ============================================ */
#templateInfoEditor,
#baseTradeEditor {
  background: var(--pro-bg-elevated);
  padding: 25px;
  border-radius: 12px;
  min-height: 350px;
}

/* Override bg-light for wizard forms */
#templateInfoEditor .bg-light,
#templateInfoEditor .je-object__container.bg-light,
#templateInfoEditor .je-indented-panel.bg-light,
#templateInfoEditor .form-group.bg-light,
#templateInfoEditor .je-child-editor-holder.bg-light,
#templateInfoEditor div.bg-light,
#baseTradeEditor .bg-light,
#baseTradeEditor .je-object__container.bg-light,
#baseTradeEditor .je-indented-panel.bg-light,
#baseTradeEditor .form-group.bg-light,
#baseTradeEditor .je-child-editor-holder.bg-light,
#baseTradeEditor div.bg-light {
  background: transparent !important;
}

#templateInfoEditor .je-object__container,
#templateInfoEditor .je-indented-panel,
#baseTradeEditor .je-object__container,
#baseTradeEditor .je-indented-panel {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Additional wizard form styling */
#templateInfoEditor .je-form-input-label,
#baseTradeEditor .je-form-input-label {
  color: var(--pro-text-primary) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  margin-bottom: 8px !important;
  display: block !important;
}

#templateInfoEditor input.form-control,
#templateInfoEditor textarea.form-control,
#templateInfoEditor select.form-control,
#baseTradeEditor input.form-control,
#baseTradeEditor textarea.form-control,
#baseTradeEditor select.form-control {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  width: 100% !important;
}

#templateInfoEditor input.form-control:focus,
#templateInfoEditor textarea.form-control:focus,
#templateInfoEditor select.form-control:focus,
#baseTradeEditor input.form-control:focus,
#baseTradeEditor textarea.form-control:focus,
#baseTradeEditor select.form-control:focus {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.1)) !important;
  outline: none !important;
}

#templateInfoEditor .je-checkbox-control,
#baseTradeEditor .je-checkbox-control {
  display: flex !important;
  align-items: center !important;
  padding: 10px 0 !important;
  background: transparent !important;
}

#templateInfoEditor input[type="checkbox"],
#baseTradeEditor input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  border: 2px solid var(--pro-border-color);
  border-radius: 4px;
  background: var(--pro-bg-secondary) !important;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  margin: 0 10px 0 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
}

#templateInfoEditor input[type="checkbox"]:checked,
#baseTradeEditor input[type="checkbox"]:checked {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  border-color: var(--user-accent, var(--pro-accent-primary));
}

#templateInfoEditor input[type="checkbox"]:checked::after,
#baseTradeEditor input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

#templateInfoEditor label,
#baseTradeEditor label {
  color: var(--pro-text-primary) !important;
  font-weight: 500 !important;
  cursor: pointer;
}

/* ============================================
   CLEAR FIELDS GRID
   ============================================ */
#clearFieldsContainer,
.clear-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 450px;
  overflow-y: auto;
  padding: 15px;
  background: var(--pro-bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--pro-border-color);
}

.clear-field-item {
  background: var(--pro-bg-elevated);
  border: 2px solid var(--pro-border-color);
  border-radius: 8px;
  padding: 12px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--pro-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
}

.clear-field-item:hover {
  border-color: var(--user-accent, var(--pro-accent-primary));
  background: var(--pro-bg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--user-accent-muted, rgba(47, 129, 247, 0.25));
}

.clear-field-item.selected {
  border-color: var(--user-accent, var(--pro-accent-primary));
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.1));
  box-shadow: 0 2px 8px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
}

.clear-field-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  border: 2px solid var(--pro-border-color);
  border-radius: 4px;
  background: var(--pro-bg-secondary) !important;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
}

.clear-field-item input[type="checkbox"]:checked {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.clear-field-item input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.clear-field-item input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
}

.clear-field-item label {
  flex: 1;
  cursor: pointer;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--pro-text-primary) !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  user-select: none;
}

.clear-field-item label small,
.clear-field-item small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--pro-text-secondary) !important;
  font-weight: 400;
}

/* ============================================
   ACE EDITOR CONTAINER
   ============================================ */
#configEditor {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  border: 2px solid var(--pro-border-color);
  font-size: 14px;
  overflow: hidden;
}

/* ============================================
   WIZARD LOADING SPINNER
   ============================================ */
#wizardSaveSpinner.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
  margin-right: 8px;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--pro-spinner-track, rgba(255, 255, 255, 0.3));
  border-radius: 50%;
  border-top-color: white;
  animation: wizardSpin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes wizardSpin {
  to { transform: rotate(360deg); }
}

/* ============================================
   WIZARD NAVIGATION BUTTONS
   ============================================ */
.wizard-btn-prev,
.wizard-btn-save {
  display: none;
}

/* ============================================
   WIZARD SCROLLBAR
   ============================================ */
#clearFieldsContainer::-webkit-scrollbar,
#baseTradeEditor::-webkit-scrollbar {
  width: 8px;
}

#clearFieldsContainer::-webkit-scrollbar-track,
#baseTradeEditor::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary);
  border-radius: 4px;
}

#clearFieldsContainer::-webkit-scrollbar-thumb,
#baseTradeEditor::-webkit-scrollbar-thumb {
  background: var(--pro-border-color);
  border-radius: 4px;
}

#clearFieldsContainer::-webkit-scrollbar-thumb:hover,
#baseTradeEditor::-webkit-scrollbar-thumb:hover {
  background: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   TRADE WIZARD MODAL
   ============================================ */
#tradeWizardModal .modal-dialog {
  max-width: 900px;
}

/* Full width for top/bottom slide directions */
[data-modal-slide="top"] #tradeWizardModal .modal-dialog,
[data-modal-slide="bottom"] #tradeWizardModal .modal-dialog {
  max-width: 100%;
  width: 100%;
}

#tradeWizardModal .modal-content {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
}

#tradeWizardModal .modal-header {
  background: var(--pro-bg-secondary);
  border-bottom: 1px solid var(--pro-border-color);
}

#tradeWizardModal .modal-body {
  padding: 2rem;
  min-height: 400px;
}

#tradeWizardModal .modal-footer {
  background: var(--pro-bg-secondary);
  border-top: 1px solid var(--pro-border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Wizard button vertical alignment */
#tradeWizardModal .modal-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  vertical-align: middle;
  line-height: 1;
  height: var(--btn-height-md, 36px);
  padding: var(--btn-padding-md, 0.5rem 1rem);
}

#tradeWizardModal .modal-footer .btn i,
#tradeWizardModal .modal-footer .btn .bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  line-height: 1;
  height: auto;
  vertical-align: middle;
}

/* Trade Summary Cards */
.trade-summary-container {
  width: 100%;
}

.trade-summary-container .card {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  box-shadow: var(--pro-shadow-md, 0 2px 8px rgba(0, 0, 0, 0.2));
}

.trade-summary-container .card-header {
  border-bottom: 1px solid var(--pro-border-color);
  padding: 0.75rem 1rem;
}

.trade-summary-container .card-body {
  padding: 1rem;
}

.trade-summary-container .table {
  color: var(--pro-text-primary);
  margin-bottom: 0;
}

.trade-summary-container .table td {
  padding: 0.5rem 0.25rem;
  vertical-align: top;
}

.trade-summary-container .text-muted {
  color: var(--pro-text-secondary) !important;
  width: 140px;
}

/* Alert styling in wizard */
#tradeWizardModal .alert {
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

#tradeWizardModal .alert-info {
  background: var(--pro-accent-info-bg, rgba(13, 202, 240, 0.1));
  border-color: var(--pro-accent-info-border, rgba(13, 202, 240, 0.3));
  color: var(--pro-accent-info);
}

/* Form styling in wizard */
#tradeWizardModal .form-label {
  color: var(--pro-text-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

#tradeWizardModal .form-control,
#tradeWizardModal .form-select {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 6px;
}

#tradeWizardModal .form-control:focus,
#tradeWizardModal .form-select:focus {
  background: var(--pro-bg-secondary);
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--pro-text-primary);
  box-shadow: 0 0 0 0.2rem var(--user-accent-muted, rgba(47, 129, 247, 0.25));
}

#tradeWizardModal .form-select option {
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
}

#tradeWizardModal .text-danger {
  color: var(--pro-accent-danger) !important;
}

/* ============================================
   BULK ACTIONS MODAL
   ============================================ */
#bulkActionsModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  color: white;
  border-bottom: none;
}

#bulkActionsModal .modal-header .btn-close {
  filter: brightness(0) invert(1);
}

#bulkActionsModal .modal-body {
  background: var(--pro-bg-elevated);
  color: var(--pro-text-primary);
}

#bulkActionsModal .table {
  color: var(--pro-text-primary);
  margin-bottom: 0;
}

#bulkActionsModal .table thead th {
  background: var(--pro-bg-secondary) !important;
  color: var(--pro-text-primary) !important;
  font-weight: 600;
  border-bottom: 2px solid var(--user-accent, var(--pro-accent-primary));
  padding: 0.75rem;
}

#bulkActionsModal .table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--pro-border-color);
}

#bulkActionsModal .table-hover tbody tr:hover {
  background: linear-gradient(90deg, var(--user-accent-muted, rgba(47, 129, 247, 0.05)), var(--user-accent-muted, rgba(47, 129, 247, 0.05)));
  cursor: pointer;
  color: white;
}

#bulkActionsModal .alert-info {
  background: var(--pro-accent-info-muted, rgba(59, 130, 246, 0.1));
  border-color: var(--pro-accent-info-border, rgba(59, 130, 246, 0.3));
  color: var(--pro-text-primary);
}

#bulkActionsModal .alert-warning {
  background: var(--pro-accent-warning-muted, rgba(245, 158, 11, 0.1));
  border-color: var(--pro-accent-warning-border, rgba(245, 158, 11, 0.3));
  color: var(--pro-text-primary);
}

#bulkActionButtons {
  gap: 0.5rem;
  margin-top: 1rem;
}

#bulkActionButtons .btn-funky {
  flex: 0 1 auto;
  white-space: nowrap;
}

/* Trade List Page */
#bulkActionsBtn {
  display: none;
}

#tradesTable {
  width: 100%;
}

#importProgress {
  display: none;
}

#importProgress .progress-bar {
  width: 100%;
}

#importErrorsContainer {
  display: none;
}

#selectedTradesOverview {
  max-height: 400px;
  overflow-y: auto;
}

/* ============================================
   RESPONSIVE WIZARD
   ============================================ */
@media (max-width: 992px) {
  #tradeWizardModal .modal-dialog {
    max-width: 720px;
  }
  
  #tradeWizardModal .modal-body {
    padding: 1.5rem;
  }
  
  .trade-summary-container .text-muted {
    width: 120px;
  }
}

@media (max-width: 768px) {
  #templateWizardModal .modal-dialog,
  #tradeWizardModal .modal-dialog {
    max-width: 95%;
    margin: 10px auto;
  }
  
  .wizard-steps {
    padding: 0 10px;
  }
  
  .wizard-step-label {
    font-size: 10px;
  }
  
  .wizard-step-number {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  
  #clearFieldsContainer {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    max-height: 300px;
  }
  
  #configEditor {
    height: 300px;
  }
  
  .wizard-content h6 {
    font-size: 1rem;
  }
  
  #tradeWizardModal .modal-body {
    padding: 1rem;
    min-height: 300px;
  }
  
  #tradeWizardModal .modal-header {
    padding: 0.75rem 1rem;
  }
  
  #tradeWizardModal .modal-header h5 {
    font-size: 1.1rem;
  }
  
  #tradeWizardModal .modal-footer {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
  }
  
  #tradeWizardModal .modal-footer .btn {
    flex: 1 1 auto;
    min-width: 100px;
    margin: 0.25rem;
  }
  
  /* Stack summary cards vertically on mobile */
  .trade-summary-container .row .col-md-6 {
    margin-bottom: 1rem;
  }
  
  .trade-summary-container .text-muted {
    width: 100px;
    font-size: 0.9rem;
  }
  
  .trade-summary-container .table td {
    font-size: 0.9rem;
    padding: 0.4rem 0.2rem;
  }
  
  /* Compact form fields on mobile */
  #tradeWizardModal .row .col-md-6,
  #tradeWizardModal .row .col-12 {
    margin-bottom: 1rem;
  }
  
  #tradeWizardModal .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  
  #tradeWizardModal .form-control,
  #tradeWizardModal .form-select {
    font-size: 0.9rem;
    padding: 0.5rem;
  }
  
  #tradeWizardModal h6 {
    font-size: 1rem;
  }
  
  #tradeWizardModal .alert {
    font-size: 0.9rem;
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  #tradeWizardModal .modal-dialog {
    max-width: 100%;
    margin: 0.25rem;
  }
  
  #tradeWizardModal .modal-body {
    padding: 0.75rem;
  }
  
  #tradeWizardModal .modal-header,
  #tradeWizardModal .modal-footer {
    padding: 0.5rem 0.75rem;
  }
  
  #tradeWizardModal .modal-header h5 {
    font-size: 1rem;
  }
  
  #tradeWizardModal .modal-footer .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }
  
  .trade-summary-container .card-header h6 {
    font-size: 0.95rem;
  }
  
  .trade-summary-container .text-muted {
    width: 90px;
    font-size: 0.85rem;
  }
  
  .trade-summary-container .table td {
    font-size: 0.85rem;
  }
  
  #tradeWizardModal .form-label {
    font-size: 0.85rem;
  }
  
  #tradeWizardModal .form-control,
  #tradeWizardModal .form-select {
    font-size: 0.85rem;
    padding: 0.4rem;
  }
}

/* ============================================
   WIZARD BUTTONS - Responsive
   ============================================ */
.wizard-buttons {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.wizard-buttons-right {
  display: flex;
  gap: 8px;
}

.wizard-buttons .btn-funky {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 480px) {
  .wizard-buttons .btn-text {
    display: none;
  }
  
  .wizard-buttons .btn-funky {
    min-width: auto;
    padding: 0 var(--pro-spacing-sm, 0.75rem);
  }
}

/* css/filters.css */
/* ============================================
   FILTERS.CSS - Advanced Filter System
   Filter chips, saved filters, manage modals
   ============================================ */

/* ============================================
   FILTER CHIPS CONTAINER
   ============================================ */
.filter-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  margin-bottom: 16px;
  animation: slideDown 0.3s ease;
}

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

/* Individual Filter Chip */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--user-accent, var(--pro-accent-primary));
  color: white;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--pro-shadow-sm, 0 2px 4px rgba(0, 0, 0, 0.1));
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  max-width: 300px;
}

.filter-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--user-accent-muted, rgba(255, 109, 0, 0.3));
}

.filter-chip:active {
  transform: translateY(0);
}

/* Chip text with ellipsis for long values */
.filter-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* Remove button */
.filter-chip-remove {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  color: white;
  flex-shrink: 0;
}

.filter-chip-remove:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.filter-chip-remove:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

.filter-chip-remove i {
  font-size: 10px;
}

/* Color-coded chips by type */
.filter-chip[data-field*="date"],
.filter-chip[data-field*="time"],
.filter-chip[data-field*="created"],
.filter-chip[data-field*="updated"] {
  background: var(--info-color, #3498db);
}

.filter-chip[data-field*="quantity"],
.filter-chip[data-field*="value"],
.filter-chip[data-field*="price"],
.filter-chip[data-field*="rate"],
.filter-chip[data-field*="margin"] {
  background: var(--success-color, #27ae60);
}

.filter-chip[data-field*="status"],
.filter-chip[data-field*="active"],
.filter-chip[data-field*="settled"],
.filter-chip[data-field*="_ind"] {
  background: var(--warning-color, #f39c12);
}

.filter-chip[data-field="trade_type"],
.filter-chip[data-field*="type"] {
  background: var(--primary-purple, #9b59b6);
}

/* Tooltip for truncated values */
.filter-chip[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: var(--pro-tooltip-bg, rgba(0, 0, 0, 0.9));
  color: white;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  box-shadow: var(--pro-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.3));
}

.filter-chip[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2px;
  border: 6px solid transparent;
  border-top-color: var(--pro-tooltip-bg, rgba(0, 0, 0, 0.9));
  z-index: 1000;
}

/* Advanced Filter Button States */
#advancedFilterBtn {
  position: relative;
  transition: all 0.2s ease;
}

#advancedFilterBtn.active-filters {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  animation: filterPulse 2s ease-in-out infinite;
}

@keyframes filterPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 109, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 109, 0, 0);
  }
}

.filter-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger-color, #e74c3c);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  border: 2px solid var(--body-bg);
  box-shadow: var(--pro-shadow-sm, 0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ============================================
   ADVANCED FILTER MODAL
   ============================================ */
#advancedFilterModal .modal-dialog {
  max-width: 1200px;
}

#advancedFilterModal .filter-section {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Filter form sections */
.filter-section h6 {
  color: var(--pro-text-primary);
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-section h6 i {
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Select2 multi-select in filters */
.filter-select2 + .select2-container--bootstrap-5 {
  width: 100% !important;
}

.filter-select2 + .select2-container--bootstrap-5 .select2-selection {
  min-height: 38px;
}

/* =============================================================================
   Select2 Multiple - Horizontal scrolling instead of wrapping
   Applied globally to all select2 multi-selects
   ============================================================================= */
.select2-container--bootstrap-5 .select2-selection--multiple {
  position: relative !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: block !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar {
  height: 4px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar-track {
  background: transparent !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar-thumb {
  background: var(--pro-border-color) !important;
  border-radius: 2px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  margin: 0 4px 0 0 !important;
  background: var(--pro-bg-tertiary) !important;
  border-color: var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
  font-size: 11px !important;
  padding: 2px 6px !important;
  line-height: 1.4 !important;
  height: auto !important;
  max-height: 26px !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search .select2-search__field {
  height: 24px !important;
  margin: 0 !important;
  width: 100% !important;
}

span.select2-selection.select2-selection--multiple.select2-selection--clearable ul {
    display: flex;
    overflow: scroll;
    flex-direction: row;
    flex-wrap: nowrap;
    position: absolute;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search {
    padding-left: 0.5em;
}

/* Ensure funky-client-filter multi-select works properly */
.funky-client-filter .select2-container {
  display: block !important;
}

.funky-client-filter .select2-container .selection {
  display: block !important;
}

/* Saved/Recent Filter Dropdowns */
#savedFiltersList .dropdown-item,
#recentFiltersList .dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#savedFiltersList .dropdown-item:hover,
#recentFiltersList .dropdown-item:hover {
  background: var(--user-accent, var(--pro-accent-primary));
  color: white;
  transform: translateX(4px);
}

#savedFiltersList .dropdown-item small,
#recentFiltersList .dropdown-item small {
  display: block;
  margin-top: 4px;
  opacity: 0.8;
}

/* Range Filter Styling */
.range-filter-group {
  background: var(--pro-bg-secondary, rgba(0,0,0,0.2));
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--pro-border-color, rgba(47, 129, 247, 0.2));
}

.range-filter-group .input-group-text {
  background-color: var(--pro-bg-elevated, transparent);
  border-color: var(--pro-border-color, #444);
  color: var(--pro-text-muted, #999);
  font-size: 0.75rem;
  min-width: 36px;
  justify-content: center;
}

.range-filter-group .form-control {
  border-color: var(--pro-border-color, #444);
  font-size: 0.875rem;
  background: var(--pro-bg-elevated, transparent);
  color: var(--pro-text-primary, #fff);
}

.range-filter-group .form-control:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 2px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
}

/* FunkySlider Styling */
.funky-slider-container {
  height: 50px;
  margin-top: 8px;
  position: relative;
}

.funky-slider {
  position: relative;
  height: 100%;
  width: 100%;
}

.funky-slider-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 8px;
  background: var(--pro-bg-secondary, rgba(0,0,0,0.3));
  border-radius: 4px;
  border: 1px solid var(--pro-border-color, rgba(47, 129, 247, 0.3));
}

.funky-slider-range {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, 
    var(--user-accent, var(--pro-accent-primary)) 0%, 
    var(--pro-accent-info) 100%);
  border-radius: 4px;
  transition: left 0.1s, width 0.1s;
}

.funky-slider-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: var(--user-accent, var(--pro-accent-primary));
  border: 3px solid var(--pro-bg-elevated, #1a1a1a);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 2;
}

.funky-slider-handle:hover {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 15px var(--user-accent-muted, rgba(47, 129, 247, 0.6));
}

.funky-slider-handle:active {
  transform: translate(-50%, -50%) scale(1.1);
}

.funky-slider-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: var(--user-accent, var(--pro-accent-primary));
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.funky-slider-handle:hover .funky-slider-tooltip,
.funky-slider-handle:active .funky-slider-tooltip {
  opacity: 1;
}

/* Date Range Group Styling */
.date-range-group {
  background: var(--pro-bg-secondary, rgba(0,0,0,0.2));
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--pro-border-color, rgba(47, 129, 247, 0.2));
}

.date-range-group .form-control {
  border-color: var(--pro-border-color, #444);
  font-size: 0.875rem;
  background: var(--pro-bg-secondary, rgba(0,0,0,0.2));
  color: var(--pro-text-primary, #fff);
}

.date-range-group .form-control:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 2px var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.2));
}

.daterangepicker-filter {
  cursor: pointer;
}

/* Advanced Filter Modal Sections */
#advancedFilterModal .modal-content {
  background: var(--modal-bg, var(--pro-bg-elevated, #1a1a1a));
  border-color: var(--pro-border-color, #444);
}

#advancedFilterModal .modal-body > div[class*="border-bottom"] {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-color: var(--pro-border-color, #444) !important;
}

#advancedFilterModal .form-label.fw-semibold {
  color: var(--pro-text-primary, #fff);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

#advancedFilterModal .form-label small {
  color: var(--text-muted, #999);
  font-weight: normal;
  margin-left: 6px;
}

/* Filter Section Headers */
#advancedFilterModal h6 {
  color: var(--pro-text-primary, #fff);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pro-border-color, #444);
}

#advancedFilterModal h6 i {
  color: var(--user-accent, var(--pro-accent-primary));
  margin-right: 8px;
}

/* Active Filters Badge */
#activeFiltersBadge {
  background: var(--pro-bg-secondary, rgba(47, 129, 247, 0.1));
  border: 1px solid var(--user-accent, var(--pro-accent-primary));
  border-radius: 8px;
  color: var(--pro-text-primary, #fff);
}

#activeFiltersBadge i {
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Saved Filters List */
#savedFiltersList .badge {
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--user-accent, var(--pro-accent-primary));
  border: none;
}

#savedFiltersList .saved-filter-badge {
  margin-right: 8px;
  margin-bottom: 8px;
}

#savedFiltersList .saved-filter-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--user-accent-muted, rgba(47, 129, 247, 0.4));
}

#savedFiltersList .saved-filter-badge.bg-warning {
  background-color: var(--warning-color, #ffc107) !important;
}

#savedFiltersList .saved-filter-badge.bg-secondary {
  background-color: var(--user-accent, var(--pro-accent-primary)) !important;
}

/* Filter Modal Buttons */
#advancedFilterModal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  font-weight: 500;
  padding: 8px 20px;
  transition: all 0.2s ease;
}

#advancedFilterModal .btn-primary {
  background-color: var(--user-accent, var(--pro-accent-primary));
  border-color: var(--user-accent, var(--pro-accent-primary));
}

#advancedFilterModal .btn-primary:hover {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  border-color: var(--user-accent, var(--pro-accent-primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 8px var(--user-accent-muted, rgba(47, 129, 247, 0.4));
}

/* Empty state */
.filter-chips-container:empty::after {
  content: 'No active filters';
  color: var(--text-muted);
  font-style: italic;
  display: block;
  text-align: center;
  padding: 4px 0;
}

/* Loading state for filter options */
.filter-options-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
}

.filter-options-loading::after {
  content: '';
  width: 30px;
  height: 30px;
  border: 3px solid var(--pro-border-color);
  border-top-color: var(--user-accent, var(--pro-accent-primary));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}

/* Keyboard focus styles */
.filter-chip:focus-within {
  outline: 3px solid var(--user-accent, var(--pro-accent-primary));
  outline-offset: 2px;
}

.filter-chips-container:focus-within {
  border-color: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   MANAGE FILTERS MODAL
   ============================================ */
#manageFiltersModal .table {
  margin-bottom: 0;
}

#manageFiltersModal .table th {
  background-color: var(--bg-light, #f8f9fa);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pro-text-secondary, #6c757d);
  border-bottom: 2px solid var(--pro-border-color, #dee2e6);
  padding: 12px 8px;
}

#manageFiltersModal .table td {
  vertical-align: middle;
  padding: 12px 8px;
  font-size: 0.9rem;
}

#manageFiltersModal .table tbody tr:hover {
  background-color: var(--bg-hover, #f8f9fa);
  transition: background-color 0.15s ease;
}

/* Default filter star icon */
#manageFiltersModal .toggle-default-btn {
  transition: all 0.2s ease;
}

#manageFiltersModal .toggle-default-btn:hover .fa-star {
  transform: scale(1.2) rotate(15deg);
  transition: transform 0.2s ease;
}

#manageFiltersModal .toggle-default-btn .text-warning {
  color: var(--pro-accent-warning) !important;
  text-shadow: 0 0 3px var(--pro-accent-warning-muted);
}

/* Action buttons */
#manageFiltersModal .btn-group-sm .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

#manageFiltersModal .edit-filter-btn:hover {
  background-color: var(--user-accent, var(--pro-accent-primary)) !important;
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

#manageFiltersModal .delete-filter-btn:hover {
  background-color: var(--pro-accent-danger) !important;
  border-color: var(--pro-accent-danger) !important;
  color: white !important;
}

/* Empty state */
#manageFiltersContent p.text-muted {
  text-align: center;
  padding: 40px 20px;
  font-size: 1rem;
  color: var(--text-muted, #6c757d);
}

/* Table Responsive Wrapper */
#manageFiltersModal .table-responsive {
  border-radius: 8px;
  overflow: hidden;
}

/* Table Styling */
#manageFiltersModal .table {
  color: var(--pro-text-primary);
}

#manageFiltersModal .table-light {
  background: var(--pro-bg-secondary);
  border-bottom: 2px solid var(--pro-border-color);
}

#manageFiltersModal .table thead th {
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem 0.75rem;
  border-bottom: 2px solid var(--user-accent, var(--pro-accent-primary));
  vertical-align: middle;
}

#manageFiltersModal .table tbody tr {
  border-bottom: 1px solid var(--pro-border-color);
  transition: all 0.2s ease;
}

#manageFiltersModal .table tbody tr:hover {
  background: var(--pro-bg-secondary);
  transform: translateX(2px);
}

#manageFiltersModal .table tbody td {
  vertical-align: middle;
  padding: 0.875rem 0.75rem;
  font-size: 0.9rem;
}

/* Default Checkbox Styling */
#manageFiltersModal .form-check {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
}

#manageFiltersModal .form-check-input {
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--pro-border-color);
  background: var(--pro-bg-secondary);
  transition: all 0.2s ease;
}

#manageFiltersModal .form-check-input:checked {
  background-color: var(--user-accent, var(--pro-accent-primary));
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 8px var(--user-accent-muted, rgba(47, 129, 247, 0.4));
}

#manageFiltersModal .form-check-input:hover {
  border-color: var(--user-accent, var(--pro-accent-primary));
  transform: scale(1.1);
}

#manageFiltersModal .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem var(--user-accent-muted, rgba(47, 129, 247, 0.25));
  border-color: var(--user-accent, var(--pro-accent-primary));
}

/* Filter Name and Badge */
#manageFiltersModal .text-primary {
  color: var(--user-accent, var(--pro-accent-primary)) !important;
  font-weight: 600;
}

#manageFiltersModal .badge {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  font-weight: 600;
  border-radius: 6px;
}

#manageFiltersModal .badge.bg-warning {
  background: linear-gradient(135deg, var(--pro-accent-warning), var(--pro-accent-warning-alt)) !important;
  color: var(--pro-text-inverse);
}

/* Action Buttons */
#manageFiltersModal .btn-group {
  gap: 0.25rem;
}

#manageFiltersModal .btn-outline-primary {
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
  transition: all 0.2s ease;
}

#manageFiltersModal .btn-outline-primary:hover {
  background: var(--user-accent, var(--pro-accent-primary));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--user-accent-muted, rgba(47, 129, 247, 0.3));
}

#manageFiltersModal .btn-outline-danger {
  border-color: var(--pro-accent-danger);
  color: var(--pro-accent-danger);
  transition: all 0.2s ease;
}

#manageFiltersModal .btn-outline-danger:hover {
  background: var(--pro-accent-danger);
  border-color: var(--pro-accent-danger);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--pro-accent-danger-muted);
}

/* Empty State */
#manageFiltersContent .text-center {
  padding: 3rem 1.5rem;
}

#manageFiltersContent .fa-filter {
  opacity: 0.3;
  margin-bottom: 1rem;
}

/* ============================================
   SAVE/EDIT FILTER MODAL
   ============================================ */
#saveFilterModal .modal-body,
#editFilterModal .modal-body {
  padding: 1.5rem;
}

#saveFilterModal .form-label,
#editFilterModal .form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--pro-text-primary, #212529);
}

#saveFilterModal .form-control:focus,
#editFilterModal .form-control:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

#saveFilterModal .form-check-input:checked,
#editFilterModal .form-check-input:checked {
  background-color: var(--user-accent, var(--pro-accent-primary));
  border-color: var(--user-accent, var(--pro-accent-primary));
}

#saveFilterModal .form-text,
#editFilterModal .form-text {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .filter-chips-container {
    padding: 8px;
    gap: 6px;
  }
  
  .filter-chip {
    font-size: 12px;
    padding: 4px 10px;
    max-width: 200px;
  }
  
  #advancedFilterModal .modal-dialog {
    max-width: 100%;
    margin: 0;
  }
  
  #advancedFilterModal .modal-content {
    border-radius: 0;
    height: 100vh;
  }
  
  .filter-section .row > div {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  #manageFiltersModal .table {
    font-size: 0.85rem;
  }
  
  #manageFiltersModal .table thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
  }
  
  #manageFiltersModal .table tbody td {
    padding: 0.75rem 0.5rem;
  }
  
  #manageFiltersModal .btn-group {
    flex-direction: column;
  }
  
  #manageFiltersModal .btn-group button {
    width: 100%;
  }
}

/* css/toasts.css */
/* ============================================
   TOASTS.CSS - Toast Notifications
   Bootstrap 5 toast styling for dark theme
   ============================================ */

/* Toast container */
#funky-toast-container {
  z-index: 9999;
}

/* Base toast styling */
.funky-toast {
  min-width: 300px;
  max-width: 400px;
  border: 1px solid var(--pro-border-muted, rgba(255, 255, 255, 0.1));
  box-shadow: var(--pro-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.3));
}

.funky-toast .toast-header {
  border-bottom: 1px solid var(--pro-border-muted, rgba(255, 255, 255, 0.1));
  font-weight: 600;
}

.funky-toast .toast-header i {
  font-size: 1.1em;
}

.funky-toast .toast-body {
  font-size: 0.95em;
}

/* Success toast */
.funky-toast-success {
  background-color: var(--pro-accent-success-bg, #1e4d2b);
  color: var(--pro-accent-success-text, #d4edda);
}

.funky-toast-success .toast-header {
  background-color: var(--pro-accent-success, #3fb950);
  color: var(--pro-text-inverse);
}

.funky-toast-success .toast-header i {
  color: var(--pro-accent-success-text, #d4edda);
}

.funky-toast-success .btn-close {
  filter: brightness(0) invert(1);
}

/* Error toast */
.funky-toast-error {
  background-color: var(--pro-accent-danger-bg, #5c1f1f);
  color: var(--pro-accent-danger-text, #f8d7da);
}

.funky-toast-error .toast-header {
  background-color: var(--pro-accent-danger, #f85149);
  color: var(--pro-text-inverse);
}

.funky-toast-error .toast-header i {
  color: var(--pro-accent-danger-text, #f8d7da);
}

.funky-toast-error .btn-close {
  filter: brightness(0) invert(1);
}

/* Warning toast */
.funky-toast-warning {
  background-color: var(--pro-accent-warning-bg, #664d03);
  color: var(--pro-accent-warning-text, #fff3cd);
}

.funky-toast-warning .toast-header {
  background-color: var(--pro-accent-warning, #d29922);
  color: var(--pro-text-inverse);
}

.funky-toast-warning .toast-header i {
  color: var(--pro-text-inverse);
}

.funky-toast-warning .btn-close {
  filter: brightness(0);
}

/* Info toast */
.funky-toast-info {
  background-color: var(--pro-accent-info-bg, #0c4a6e);
  color: var(--pro-accent-info-text, #cfe2ff);
}

.funky-toast-info .toast-header {
  background-color: var(--pro-accent-info, #58a6ff);
  color: var(--pro-text-inverse);
}

.funky-toast-info .toast-header i {
  color: var(--pro-text-inverse);
}

.funky-toast-info .btn-close {
  filter: brightness(0);
}

/* Confirmation toast */
.funky-toast-confirm {
  background-color: var(--pro-accent-warning-alt-bg, #3d2a1f);
  color: var(--pro-accent-warning-text, #fff3cd);
  min-width: 350px;
}

.funky-toast-confirm .toast-header {
  background-color: var(--pro-accent-warning-alt, #fd7e14);
  color: var(--pro-text-inverse);
}

.funky-toast-confirm .toast-header i {
  color: var(--pro-text-inverse);
}

.funky-toast-confirm .btn-close {
  filter: brightness(0);
}

.funky-toast-confirm .toast-body {
  padding: 1rem;
}

.funky-toast-confirm .toast-body .btn {
  font-weight: 500;
}

/* css/queue.css */
/* ============================================
   QUEUE.CSS - Queue Page Styles
   Queue stats, tabs, bulk actions
   ============================================ */

/* Queue Stats Row - Compact Badge Design */
.queue-stats-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--funky-primary) transparent;
}

.queue-stats-row::-webkit-scrollbar {
  height: 4px;
}

.queue-stats-row::-webkit-scrollbar-track {
  background: transparent;
}

.queue-stats-row::-webkit-scrollbar-thumb {
  background: var(--funky-primary);
  border-radius: 2px;
}

/* Queue Page Redesign */
.queue-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.queue-title-section {
  flex: 1;
  min-width: 250px;
}

.queue-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pro-text-primary);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.queue-title-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.queue-subtitle {
  color: var(--pro-text-secondary);
  margin: 0;
  font-size: 1rem;
}

.queue-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: flex-end;
}

/* Compact Stats Bar */
.queue-stats-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--funky-primary) transparent;
}

.queue-stats-bar::-webkit-scrollbar {
  height: 4px;
}

.queue-stats-bar::-webkit-scrollbar-track {
  background: transparent;
}

.queue-stats-bar::-webkit-scrollbar-thumb {
  background: var(--funky-primary);
  border-radius: 2px;
}

.queue-stat-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--pro-bg-elevated);
  border: 2px solid var(--pro-border-color);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  min-width: 150px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
  white-space: nowrap;
}

.queue-stat-badge.active {
  border-color: var(--funky-primary);
  box-shadow: 0 0 0 3px rgba(255, 115, 0, 0.2);
  background: linear-gradient(135deg, var(--pro-bg-elevated) 0%, rgba(255, 115, 0, 0.05) 100%);
}

.queue-stat-badge.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--funky-primary);
  border-radius: 3px;
}

.queue-stat-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 115, 0, 0.15);
  border-color: var(--funky-primary);
}

.queue-stat-badge:active {
  transform: translateY(-1px);
}

.queue-stat-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.queue-stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.queue-stat-label {
  font-size: 0.75rem;
  color: var(--pro-text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.queue-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--funky-primary);
  line-height: 1;
}

/* Status-specific colors */
.queue-stat-pending { border-left: 4px solid #f59e0b; }
.queue-stat-queued { border-left: 4px solid #3b82f6; }
.queue-stat-sent { border-left: 4px solid #10b981; }
.queue-stat-rejected { border-left: 4px solid #ef4444; }
.queue-stat-cancelled { border-left: 4px solid #6b7280; }

/* Bulk Actions Banner */
.queue-bulk-banner {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  animation: slideInDown 0.3s ease-out;
}

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

.bulk-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
}

.bulk-banner-icon {
  font-size: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.bulk-banner-text {
  font-size: 1rem;
  color: white;
}

/* Queue Card Styling */
.queue-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Enhanced Tabs */
.queue-tabs {
  border-bottom: 2px solid var(--pro-border-color);
  padding: 0 1rem;
  background: var(--pro-bg-secondary);
  margin: 0 !important;
}

.queue-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--pro-text-secondary);
  font-weight: 600;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.queue-tabs .nav-link:hover {
  color: var(--funky-primary);
  background: var(--pro-bg-elevated);
}

.queue-tabs .nav-link.active {
  color: var(--funky-primary);
  border-bottom-color: var(--funky-primary);
  background: var(--pro-bg-elevated);
}

.queue-tabs .tab-icon {
  font-size: 1.2rem;
}

.queue-tabs .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .queue-header {
    flex-direction: column;
  }
  
  .queue-actions {
    width: 100%;
  }
  
  .queue-actions > * {
    flex: 1;
  }
  
  .queue-stat-badge {
    min-width: 130px;
    padding: 0.75rem 1rem;
  }
  
  .queue-stat-icon {
    font-size: 1.5rem;
  }
  
  .queue-stat-value {
    font-size: 1.25rem;
  }
}

/* css/column-profiles.css */
/* ============================================
   COLUMN-PROFILES.CSS - Column Profile Manager
   Profile list, conditional formatting rules
   ============================================ */

/* ============================================
   COLUMN PROFILE MODAL
   ============================================ */
.column-profile-modal .modal-content {
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
}

.column-profile-modal .modal-header {
  border-bottom-color: var(--pro-border-color, #30363d);
  padding: 1rem 1.25rem;
}

.column-profile-modal .modal-title {
  font-weight: 600;
  font-size: 1rem;
}

.column-profile-modal .modal-body {
  padding: 1rem 1.25rem;
}

.column-profile-modal .modal-footer {
  border-top-color: var(--pro-border-color, #30363d);
  padding: 0.75rem 1.25rem;
}

/* ============================================
   PROFILE LIST
   ============================================ */
.profile-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  background: var(--pro-bg-primary, #0d1117);
}

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--pro-border-muted, #21262d);
  cursor: pointer;
  transition: background 0.15s ease;
}

.profile-item:last-child {
  border-bottom: none;
}

.profile-item:hover {
  background: var(--pro-bg-tertiary, #21262d);
}

.profile-item.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.15)));
  border-left: 3px solid var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.profile-item-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.profile-item-icon {
  font-size: 1rem;
  color: var(--pro-text-secondary, #8b949e);
}

.profile-item.active .profile-item-icon {
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.profile-item-name {
  font-weight: 500;
  color: var(--pro-text-primary, #e6edf3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-item-meta {
  font-size: 0.75rem;
  color: var(--pro-text-muted, #6e7681);
  white-space: nowrap;
}

.profile-item-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.profile-item:hover .profile-item-actions {
  opacity: 1;
}

.profile-item-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  transition: all 0.15s ease;
}

.profile-item-actions button:hover {
  background: var(--pro-bg-elevated, #2d333b);
  color: var(--pro-text-primary, #e6edf3);
}

.profile-item-actions button.delete-btn:hover {
  color: var(--pro-accent-danger, #f85149);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.profile-list-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--pro-text-muted, #6e7681);
}

.profile-list-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

/* ============================================
   SAVE PROFILE FORM
   ============================================ */
.profile-save-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pro-border-color, #30363d);
}

.profile-save-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: var(--pro-bg-primary, #0d1117);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  color: var(--pro-text-primary, #e6edf3);
}

.profile-save-form input:focus {
  outline: none;
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  box-shadow: 0 0 0 2px rgba(47, 129, 247, 0.2);
}

.profile-save-form input::placeholder {
  color: var(--pro-text-muted, #6e7681);
}

.profile-save-form button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.profile-save-form button:hover {
  background: var(--user-accent-hover, var(--pro-accent-primary-hover, #388bfd));
}

/* ============================================
   CONDITIONAL FORMATTING MODAL
   ============================================ */
.format-rules-modal .modal-dialog {
  max-width: 700px;
}

.format-rules-modal .modal-content {
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
}

.format-rules-modal .modal-header {
  border-bottom-color: var(--pro-border-color, #30363d);
  padding: 1rem 1.25rem;
}

.format-rules-modal .modal-body {
  padding: 1rem 1.25rem;
  max-height: 60vh;
  overflow-y: auto;
}

.format-rules-modal .modal-footer {
  border-top-color: var(--pro-border-color, #30363d);
  padding: 0.75rem 1.25rem;
}

/* ============================================
   FORMAT RULES LIST
   ============================================ */
.format-rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.format-rule-item {
  background: var(--pro-bg-primary, #0d1117);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 8px;
  padding: 1rem;
  transition: border-color 0.15s ease;
}

.format-rule-item:hover {
  border-color: var(--pro-border-emphasis, #484f58);
}

.format-rule-item.disabled {
  opacity: 0.5;
}

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

.format-rule-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.format-rule-toggle .form-check-input {
  margin: 0;
  flex-shrink: 0;
}

.format-rule-toggle label {
  font-size: 0.75rem;
  color: var(--pro-text-muted, #6e7681);
  cursor: pointer;
  margin: 0;
  line-height: 1;
}

.format-rule-actions {
  display: flex;
  gap: 0.25rem;
}

.format-rule-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  transition: all 0.15s ease;
}

.format-rule-actions button:hover {
  background: var(--pro-bg-tertiary, #21262d);
}

.format-rule-actions button.delete-rule:hover {
  color: var(--pro-accent-danger, #f85149);
}

/* ============================================
   RULE BUILDER
   ============================================ */
.format-rule-builder {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 480px) {
  .format-rule-builder {
    grid-template-columns: 1fr;
  }
}

.format-rule-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.format-rule-field label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pro-text-muted, #6e7681);
}

.format-rule-field select,
.format-rule-field input {
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  color: var(--pro-text-primary, #e6edf3);
}

.format-rule-field select:focus,
.format-rule-field input:focus {
  outline: none;
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  box-shadow: 0 0 0 2px rgba(47, 129, 247, 0.2);
}

/* Between condition has two value inputs */
.format-rule-field.between-values {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.format-rule-field.between-values input {
  flex: 1;
}

/* ============================================
   RULE PREVIEW
   ============================================ */
.format-rule-preview {
  margin-top: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: var(--pro-bg-tertiary, #21262d);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.format-rule-preview-label {
  font-size: 0.75rem;
  color: var(--pro-text-muted, #6e7681);
}

.format-rule-preview-sample {
  font-family: var(--pro-font-mono, monospace);
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--pro-bg-primary, #0d1117);
}

/* ============================================
   ADD RULE BUTTON
   ============================================ */
.add-rule-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  border: 2px dashed var(--pro-border-color, #30363d);
  border-radius: 8px;
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 0.75rem;
}

.add-rule-btn:hover {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  background: var(--user-accent-muted, var(--pro-accent-primary-muted, rgba(47, 129, 247, 0.1)));
}

/* ============================================
   RULES EMPTY STATE
   ============================================ */
.format-rules-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--pro-text-muted, #6e7681);
}

.format-rules-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.format-rules-empty h4 {
  font-weight: 500;
  color: var(--pro-text-secondary, #8b949e);
  margin-bottom: 0.5rem;
}

.format-rules-empty p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] .column-profile-modal .modal-content {
  background: var(--pro-bg-primary, #ffffff);
}

[data-theme="light"] .profile-list {
  background: var(--pro-bg-secondary, #f6f8fa);
}

[data-theme="light"] .profile-item:hover {
  background: var(--pro-bg-tertiary, #eaeef2);
}

[data-theme="light"] .profile-save-form input {
  background: var(--pro-bg-secondary, #f6f8fa);
}

[data-theme="light"] .format-rules-modal .modal-content {
  background: var(--pro-bg-primary, #ffffff);
}

[data-theme="light"] .format-rule-item {
  background: var(--pro-bg-secondary, #f6f8fa);
}

[data-theme="light"] .format-rule-field select,
[data-theme="light"] .format-rule-field input {
  background: var(--pro-bg-primary, #ffffff);
}

/* ============================================
   EVEN FUNKIER THEME OVERRIDES
   ============================================ */
[data-theme="even-funkyer"] .column-profile-modal .modal-content {
  background: rgba(0, 0, 0, 0.95);
  border-color: var(--funkier-neon-pink, #ff00ff);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .profile-item.active {
  border-left-color: var(--funkier-neon-pink, #ff00ff);
  background: rgba(255, 0, 255, 0.1);
}

[data-theme="even-funkyer"] .profile-item.active .profile-item-icon {
  color: var(--funkier-neon-pink, #ff00ff);
  text-shadow: 0 0 5px rgba(255, 0, 255, 0.7);
}

[data-theme="even-funkyer"] .format-rules-modal .modal-content {
  background: rgba(0, 0, 0, 0.95);
  border-color: var(--funkier-neon-cyan, #00ffff);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

[data-theme="even-funkyer"] .add-rule-btn:hover {
  border-color: var(--funkier-neon-pink, #ff00ff);
  color: var(--funkier-neon-pink, #ff00ff);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

/* css/sidenav.css */
/**
 * Funky.SideNav Styles
 * Searchable sidebar navigation component
 * 
 * Supports density modes: compact, comfortable, spacious
 * Uses CSS variables from themes.css for consistent spacing
 */

/* Container */
.funky-sidenav {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Header - contains search and sort toggle */
.sidenav-header {
  display: flex;
  align-items: center;
  gap: var(--pro-spacing-sm, 8px);
  padding: var(--pro-spacing-md, 12px);
  border-bottom: 1px solid var(--pro-border-color);
}

.sidenav-header .sidenav-search-wrapper {
  flex: 1;
  padding: 0;
  border-bottom: none;
}

/* Sort Toggle Button - uses form control height for consistency */
.sidenav-sort-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--form-control-height, 36px);
  height: var(--form-control-height, 36px);
  padding: 0;
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  background: var(--pro-bg-secondary);
  color: var(--pro-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.sidenav-sort-toggle:hover {
  background: var(--pro-bg-hover);
  color: var(--pro-text-primary);
  border-color: var(--pro-accent-primary);
}

.sidenav-sort-toggle:focus {
  outline: none;
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--pro-accent-primary-rgb), 0.15);
}

.sidenav-sort-toggle i {
  font-size: var(--btn-font-sm, 12px);
}

/* Search - standalone (when no header) */
.funky-sidenav > .sidenav-search-wrapper {
  padding: var(--pro-spacing-md, 12px);
  border-bottom: 1px solid var(--pro-border-color);
}

/* Search */
.sidenav-search-wrapper {
  position: relative;
}

.sidenav-search {
  width: 100%;
  height: var(--form-control-height, 36px);
  padding: var(--form-control-padding, 8px 12px);
  padding-left: 36px;
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
  font-size: var(--btn-font-md, 13px);
  transition: all 0.15s ease;
}

.sidenav-search:focus {
  outline: none;
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--pro-accent-primary-rgb), 0.15);
}

.sidenav-search::placeholder {
  color: var(--pro-text-muted);
}

.sidenav-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pro-text-muted);
  font-size: var(--btn-font-sm, 12px);
  pointer-events: none;
}

/* List */
.sidenav-list {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: var(--pro-spacing-xs, 8px);
  overflow-y: auto;
}

/* Item - uses nav-item-padding for density support */
.sidenav-item {
  display: flex;
  align-items: center;
  gap: var(--pro-spacing-sm, 10px);
  padding: var(--nav-item-padding, 10px 12px);
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--btn-font-md, 13px);
  color: var(--pro-text-secondary);
  transition: all 0.15s ease;
}

.sidenav-item:hover {
  background: var(--pro-bg-hover);
  color: var(--pro-text-primary);
}

.sidenav-item.active {
  background: var(--pro-accent-muted);
  color: var(--pro-accent-primary);
}

.sidenav-item.focused {
  outline: 2px solid var(--pro-accent-primary);
  outline-offset: -2px;
}

.sidenav-item .sidenav-icon {
  width: 20px;
  text-align: center;
  color: var(--pro-text-muted);
  flex-shrink: 0;
}

.sidenav-item.active .sidenav-icon {
  color: var(--pro-accent-primary);
}

.sidenav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badge */
.sidenav-badge {
  font-size: var(--btn-font-xs, 10px);
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--pro-accent-muted);
  color: var(--pro-accent-primary);
  font-weight: 600;
  flex-shrink: 0;
}

/* Group */
.sidenav-group {
  list-style: none;
  margin-bottom: var(--pro-spacing-xs, 4px);
}

.sidenav-group-header {
  display: flex;
  align-items: center;
  gap: var(--pro-spacing-sm, 10px);
  padding: var(--nav-item-padding, 10px 12px);
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--btn-font-sm, 12px);
  font-weight: 600;
  color: var(--pro-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.sidenav-group-header:hover {
  background: var(--pro-bg-hover);
  color: var(--pro-text-primary);
}

.sidenav-group-header .sidenav-icon {
  width: 20px;
  text-align: center;
  color: var(--pro-text-muted);
  flex-shrink: 0;
}

.sidenav-chevron {
  margin-left: auto;
  color: var(--pro-text-muted);
  font-size: var(--btn-font-xs, 10px);
  transition: transform 0.2s ease;
}

.sidenav-group.collapsed .sidenav-chevron {
  transform: rotate(-90deg);
}

/* Group items */
.sidenav-group-items {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--pro-spacing-md, 16px);
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}

.sidenav-group.collapsed .sidenav-group-items {
  max-height: 0;
  opacity: 0;
}

/* Nested item styling */
.sidenav-group-items .sidenav-item {
  padding-left: var(--pro-spacing-lg, 20px);
}

/* Empty state */
.sidenav-empty {
  padding: var(--pro-spacing-lg, 20px);
  text-align: center;
  color: var(--pro-text-muted);
  font-size: var(--btn-font-md, 13px);
}

/* Scrollbar styling */
.sidenav-list::-webkit-scrollbar {
  width: 6px;
}

.sidenav-list::-webkit-scrollbar-track {
  background: transparent;
}

.sidenav-list::-webkit-scrollbar-thumb {
  background: var(--pro-border-color);
  border-radius: 3px;
}

.sidenav-list::-webkit-scrollbar-thumb:hover {
  background: var(--pro-text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .funky-sidenav > .sidenav-search-wrapper {
    padding: var(--pro-spacing-sm, 10px);
  }
  
  .sidenav-search {
    padding-left: 36px;
    font-size: 14px;
  }
  
  .sidenav-item {
    padding: var(--pro-spacing-sm, 12px) var(--pro-spacing-md, 14px);
    font-size: 14px;
  }
  
  .sidenav-group-header {
    padding: var(--pro-spacing-sm, 12px) var(--pro-spacing-md, 14px);
    font-size: 13px;
  }
  
  .sidenav-group-items .sidenav-item {
    padding-left: var(--pro-spacing-lg, 24px);
  }
}

/* Collapsed/icons-only mode */
.funky-sidenav.collapsed {
  width: 60px;
}

.funky-sidenav.collapsed .sidenav-search-wrapper,
.funky-sidenav.collapsed .sidenav-header {
  display: none;
}

.funky-sidenav.collapsed .sidenav-label,
.funky-sidenav.collapsed .sidenav-badge,
.funky-sidenav.collapsed .sidenav-chevron,
.funky-sidenav.collapsed .sidenav-group-header .sidenav-label {
  display: none;
}

.funky-sidenav.collapsed .sidenav-item,
.funky-sidenav.collapsed .sidenav-group-header {
  justify-content: center;
  padding: var(--pro-spacing-sm, 12px);
}

.funky-sidenav.collapsed .sidenav-icon {
  width: auto;
  font-size: var(--btn-font-lg, 16px);
}

.funky-sidenav.collapsed .sidenav-group-items {
  padding-left: 0;
}

.funky-sidenav.collapsed .sidenav-group-items .sidenav-item {
  padding-left: var(--pro-spacing-sm, 12px);
}

/* Touch-friendly mode */
@media (pointer: coarse) {
  .sidenav-item,
  .sidenav-group-header {
    min-height: 44px;
  }
}

/* ==========================================================================
   SideNavPanel - Content Panels
   ========================================================================== */

/* Panels container */
.sidenav-panels {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--pro-bg-primary);
}

/* Individual panel */
.sidenav-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  padding: var(--card-padding, 20px);
  background: var(--pro-bg-primary);
}

.sidenav-panel:not(.active) {
  display: none;
}

/* Fade animation */
.sidenav-panels--fade .sidenav-panel {
  transition: opacity 0.2s ease;
}

/* Slide animation */
.sidenav-panels--slide .sidenav-panel {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* No animation */
.sidenav-panels--none .sidenav-panel {
  transition: none;
}

/* Panel scrollbar styling */
.sidenav-panel::-webkit-scrollbar {
  width: 8px;
}

.sidenav-panel::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary);
}

.sidenav-panel::-webkit-scrollbar-thumb {
  background: var(--pro-border-color);
  border-radius: 4px;
}

.sidenav-panel::-webkit-scrollbar-thumb:hover {
  background: var(--pro-text-muted);
}

/* ==========================================================================
   SideNavPanel Layout - Side by side
   ========================================================================== */

.sidenav-panel-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.sidenav-panel-layout .funky-sidenav {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--pro-border-color);
  background: var(--pro-bg-primary);
}

.sidenav-panel-layout .sidenav-panels {
  flex: 1;
  min-width: 0;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
  .sidenav-panel-layout {
    flex-direction: column;
  }
  
  .sidenav-panel-layout .funky-sidenav {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--pro-border-color);
  }
  
  .sidenav-panel-layout .sidenav-panels {
    flex: 1;
  }
  
  .sidenav-panel {
    padding: var(--pro-spacing-md, 16px);
  }
}

/* Responsive: Drawer mode on small screens */
@media (max-width: 576px) {
  .sidenav-panel-layout.drawer-mode .funky-sidenav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-height: none;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
  }
  
  .sidenav-panel-layout.drawer-mode .funky-sidenav.open {
    transform: translateX(0);
  }
  
  .sidenav-panel-layout.drawer-mode .sidenav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .sidenav-panel-layout.drawer-mode .funky-sidenav.open + .sidenav-overlay {
    opacity: 1;
    visibility: visible;
  }
}


/* css/kanban.css */
/**
 * Funky Kanban Component Styles
 * Card-based workflow board with drag-and-drop
 * @version 1.0.0
 */

/* ========================================
   CSS Custom Properties (Density-aware)
   ======================================== */

.kanban-board {
  --kanban-gap: var(--pro-spacing-md, 1rem);
  --kanban-column-width: 300px;
  --kanban-card-padding: var(--pro-spacing-sm, 0.75rem);
  --kanban-header-padding: var(--pro-spacing-sm, 0.75rem) var(--pro-spacing-md, 1rem);
  --kanban-border-radius: var(--pro-border-radius, 8px);
  --kanban-border-radius-sm: var(--pro-border-radius-sm, 4px);
}

/* Density: Compact */
[data-density="compact"] .kanban-board {
  --kanban-gap: 0.5rem;
  --kanban-card-padding: 0.5rem;
  --kanban-header-padding: 0.5rem 0.75rem;
}

/* Density: Spacious */
[data-density="spacious"] .kanban-board {
  --kanban-gap: 1.5rem;
  --kanban-card-padding: 1rem;
  --kanban-header-padding: 1rem 1.25rem;
}

/* ========================================
   Toolbar & Filters
   ======================================== */

.kanban-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: var(--kanban-header-padding);
  border-bottom: 1px solid var(--pro-border-color, rgba(0,0,0,0.1));
  background: var(--pro-bg-primary, #ffffff);
  flex-wrap: wrap;
}

/* Search */
.kanban-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 180px;
  max-width: 300px;
  position: relative;
}

.kanban-search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--pro-text-muted, #adb5bd);
  pointer-events: none;
}

.kanban-search-input {
  flex: 1;
  border: 1px solid var(--pro-border-color, rgba(0,0,0,0.15));
  border-radius: var(--kanban-border-radius-sm);
  padding: 0.375rem 0.75rem 0.375rem 2rem;
  background: var(--pro-bg-primary, #ffffff);
  color: var(--pro-text-primary, #212529);
  font-size: var(--pro-font-size-sm, 0.8125rem);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kanban-search-input:focus {
  outline: none;
  border-color: var(--pro-primary, #0d6efd);
  box-shadow: 0 0 0 3px var(--pro-focus-ring, rgba(13, 110, 253, 0.25));
}

.kanban-search-input::placeholder {
  color: var(--pro-text-muted, #adb5bd);
}

.kanban-search-count {
  font-size: var(--pro-font-size-xs, 0.75rem);
  color: var(--pro-text-secondary, #6c757d);
  white-space: nowrap;
}

/* Quick Filters */
.kanban-quick-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.kanban-quick-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--pro-border-color, rgba(0,0,0,0.15));
  border-radius: var(--kanban-border-radius-sm);
  background: transparent;
  color: var(--pro-text-secondary, #6c757d);
  font-size: var(--pro-font-size-sm, 0.8125rem);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kanban-quick-filter:hover {
  background: var(--pro-bg-secondary, #f8f9fa);
  color: var(--pro-text-primary, #212529);
}

.kanban-quick-filter.active {
  background: var(--pro-primary, #0d6efd);
  color: #ffffff;
  border-color: var(--pro-primary, #0d6efd);
}

.kanban-quick-filter:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--pro-focus-ring, rgba(13, 110, 253, 0.25));
}

/* Filter Actions */
.kanban-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.kanban-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--pro-primary, #0d6efd);
  color: #ffffff;
  font-size: var(--pro-font-size-xs, 0.75rem);
  font-weight: var(--pro-font-weight-medium, 500);
  border-radius: 1rem;
}

.kanban-clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border: none;
  border-radius: var(--kanban-border-radius-sm);
  background: var(--pro-danger-bg, #f8d7da);
  color: var(--pro-danger, #dc3545);
  font-size: var(--pro-font-size-sm, 0.8125rem);
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.kanban-clear-filters:hover {
  background: var(--pro-danger, #dc3545);
  color: #ffffff;
}

.kanban-clear-filters:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--pro-focus-ring, rgba(13, 110, 253, 0.25));
}

/* Filtered out cards */
.kanban-card.filtered-out {
  display: none;
}

/* Dim mode instead of hide */
.kanban-board.dim-filtered .kanban-card.filtered-out {
  display: block;
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(50%);
}

/* Search highlight */
.search-highlight {
  background: var(--pro-warning, #ffc107);
  color: var(--pro-text-primary, #212529);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: inherit;
}

/* Responsive toolbar */
@media (max-width: 768px) {
  .kanban-toolbar {
    gap: 0.5rem;
  }
  
  .kanban-search {
    max-width: none;
    order: -1;
    flex-basis: 100%;
  }
  
  .kanban-quick-filters {
    flex-basis: 100%;
  }
}

@media (max-width: 576px) {
  .kanban-quick-filter span:not(.kanban-quick-filter i) {
    display: none;
  }
}

/* ========================================
   Board Container
   ======================================== */

.kanban-board {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
  font-family: var(--pro-font-family, system-ui, -apple-system, sans-serif);
  font-size: var(--pro-font-size-base, 0.875rem);
  color: var(--pro-text-primary, #212529);
  background: var(--pro-bg-primary, #ffffff);
}

.kanban-columns {
  display: flex;
  gap: var(--kanban-gap);
  padding: var(--kanban-gap);
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  align-items: flex-start;
  
  /* Smooth scrolling */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling */
.kanban-columns::-webkit-scrollbar {
  height: 8px;
}

.kanban-columns::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary, #f8f9fa);
  border-radius: 4px;
}

.kanban-columns::-webkit-scrollbar-thumb {
  background: var(--pro-border-color, rgba(0,0,0,0.15));
  border-radius: 4px;
}

.kanban-columns::-webkit-scrollbar-thumb:hover {
  background: var(--pro-text-muted, rgba(0,0,0,0.25));
}

/* ========================================
   Columns
   ======================================== */

.kanban-column {
  flex: 0 0 var(--kanban-column-width);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  background: var(--pro-bg-secondary, #f8f9fa);
  border: 1px solid var(--pro-border-color, rgba(0,0,0,0.1));
  border-radius: var(--kanban-border-radius);
  transition: box-shadow 0.2s ease;
}

.kanban-column:focus-within {
  box-shadow: 0 0 0 2px var(--pro-focus-ring, rgba(13, 110, 253, 0.25));
}

/* ========================================
   Column Header
   ======================================== */

.kanban-column-header {
  display: flex;
  align-items: center;
  padding: var(--kanban-header-padding);
  border-bottom: 1px solid var(--pro-border-color, rgba(0,0,0,0.1));
  background: var(--pro-bg-secondary, #f8f9fa);
  border-radius: var(--kanban-border-radius) var(--kanban-border-radius) 0 0;
}

.kanban-column-header.has-color {
  border-top: 3px solid currentColor;
  border-radius: 0;
}

.kanban-column-header-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.kanban-column-title {
  margin: 0;
  font-size: var(--pro-font-size-base, 0.875rem);
  font-weight: var(--pro-font-weight-semibold, 600);
  color: var(--pro-text-primary, #212529);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  font-size: var(--pro-font-size-xs, 0.75rem);
  font-weight: var(--pro-font-weight-medium, 500);
  color: var(--pro-text-secondary, #6c757d);
  background: var(--pro-bg-tertiary, rgba(0,0,0,0.05));
  border-radius: 1rem;
  font-family: var(--pro-font-mono, monospace);
}

.kanban-column-limit {
  font-size: var(--pro-font-size-xs, 0.75rem);
  color: var(--pro-text-muted, #adb5bd);
  font-family: var(--pro-font-mono, monospace);
}

/* WIP Limit reached */
.kanban-column.at-limit .kanban-column-count {
  background: var(--pro-warning-bg, #fff3cd);
  color: var(--pro-warning-text, #856404);
}

.kanban-column.at-limit .kanban-column-header {
  background: var(--pro-warning-bg, #fff3cd);
}

/* ========================================
   Column Body
   ======================================== */

.kanban-column-body {
  flex: 1;
  overflow-y: auto;
  padding: calc(var(--kanban-card-padding) / 2);
  min-height: 150px;
}

/* Empty state */
.kanban-column-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  color: var(--pro-text-muted, #adb5bd);
  font-size: var(--pro-font-size-sm, 0.8125rem);
  font-style: italic;
  text-align: center;
  padding: var(--kanban-card-padding);
}

/* Hide empty when cards present */
.kanban-column-body:has(.kanban-card) .kanban-column-empty {
  display: none;
}

/* ========================================
   Cards
   ======================================== */

.kanban-card {
  background: var(--pro-bg-primary, #ffffff);
  border: 1px solid var(--pro-border-color, rgba(0,0,0,0.1));
  border-radius: var(--kanban-border-radius-sm);
  padding: var(--kanban-card-padding);
  margin-bottom: calc(var(--kanban-card-padding) / 2);
  cursor: grab;
  transition: box-shadow 0.2s ease, transform 0.15s ease, opacity 0.15s ease;
  user-select: none;
}

.kanban-card:hover {
  box-shadow: var(--pro-shadow-sm, 0 2px 4px rgba(0,0,0,0.1));
  transform: translateY(-1px);
}

.kanban-card:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--pro-focus-ring, rgba(13, 110, 253, 0.25));
}

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

/* Card Labels */
.kanban-card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.kanban-label {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  font-size: var(--pro-font-size-xs, 0.6875rem);
  font-weight: var(--pro-font-weight-medium, 500);
  color: #fff;
  background: var(--pro-primary, #0d6efd);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Card Title */
.kanban-card-title {
  font-weight: var(--pro-font-weight-medium, 500);
  color: var(--pro-text-primary, #212529);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

/* Card Description */
.kanban-card-description {
  font-size: var(--pro-font-size-sm, 0.8125rem);
  color: var(--pro-text-secondary, #6c757d);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

/* Card Metadata */
.kanban-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--pro-font-size-xs, 0.75rem);
  color: var(--pro-text-muted, #adb5bd);
  margin-top: 0.5rem;
}

.kanban-card-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Priority indicators */
.kanban-card-priority.priority-high { color: var(--pro-danger, #dc3545); }
.kanban-card-priority.priority-medium { color: var(--pro-warning, #ffc107); }
.kanban-card-priority.priority-low { color: var(--pro-success, #198754); }

/* Due date states */
.kanban-card-due.due-overdue { color: var(--pro-danger, #dc3545); font-weight: 600; }
.kanban-card-due.due-today { color: var(--pro-warning-text, #856404); }
.kanban-card-due.due-soon { color: var(--pro-info, #0dcaf0); }

/* Card Footer */
.kanban-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--pro-border-color-light, rgba(0,0,0,0.05));
}

.kanban-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pro-bg-primary, #ffffff);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.kanban-card-assignee-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pro-primary, #0d6efd);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
}

/* Priority card borders */
.kanban-card.priority-high {
  border-left: 3px solid var(--pro-danger, #dc3545);
}

.kanban-card.priority-medium {
  border-left: 3px solid var(--pro-warning, #ffc107);
}

.kanban-card.priority-low {
  border-left: 3px solid var(--pro-success, #198754);
}

/* Touch ghost */
.kanban-touch-ghost {
  box-shadow: var(--pro-shadow-lg, 0 8px 24px rgba(0,0,0,0.15));
  transform: rotate(2deg);
}

/* ========================================
   Add Card Button
   ======================================== */

.kanban-add-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  padding: var(--kanban-card-padding);
  margin: 0;
  border: none;
  border-top: 1px solid var(--pro-border-color, rgba(0,0,0,0.1));
  background: transparent;
  color: var(--pro-text-secondary, #6c757d);
  font-size: var(--pro-font-size-sm, 0.8125rem);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  border-radius: 0 0 var(--kanban-border-radius) var(--kanban-border-radius);
}

.kanban-add-card-btn:hover {
  background: var(--pro-bg-tertiary, rgba(0,0,0,0.05));
  color: var(--pro-primary, #0d6efd);
}

.kanban-add-card-btn:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--pro-focus-ring, rgba(13, 110, 253, 0.25));
}

/* ========================================
   Drop Indicator
   ======================================== */

.kanban-drop-indicator {
  height: 3px;
  background: var(--pro-primary, #0d6efd);
  border-radius: 2px;
  margin: 0.25rem 0;
  pointer-events: none;
  animation: kanban-pulse 1s ease-in-out infinite;
}

@keyframes kanban-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ========================================
   Drop Zone States
   ======================================== */

.kanban-column.drop-valid .kanban-column-body {
  background: var(--pro-success-bg, rgba(25, 135, 84, 0.1));
  border: 2px dashed var(--pro-success, #198754);
  border-radius: var(--kanban-border-radius-sm);
}

.kanban-column.drop-invalid .kanban-column-body {
  opacity: 0.5;
  pointer-events: none;
}

/* ========================================
   Loading State
   ======================================== */

.kanban-board.loading .kanban-columns {
  opacity: 0.5;
  pointer-events: none;
}

.kanban-board.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--pro-border-color, rgba(0,0,0,0.1));
  border-top-color: var(--pro-primary, #0d6efd);
  border-radius: 50%;
  animation: kanban-spin 0.8s linear infinite;
}

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

/* ========================================
   Responsive Breakpoints
   ======================================== */

/* Tablet */
@media (max-width: 992px) {
  .kanban-board {
    --kanban-column-width: 280px;
  }
}

/* Mobile landscape */
@media (max-width: 768px) {
  .kanban-board {
    --kanban-column-width: 260px;
  }
}

/* Mobile portrait */
@media (max-width: 576px) {
  .kanban-board {
    --kanban-column-width: 85vw;
  }
  
  .kanban-columns {
    scroll-snap-type: x mandatory;
    padding: 0.5rem;
  }
  
  .kanban-column {
    scroll-snap-align: start;
  }
}

/* Touch device adjustments */
@media (pointer: coarse) {
  .kanban-column-body {
    /* Better touch scrolling */
    overscroll-behavior: contain;
  }
  
  .kanban-add-card-btn {
    min-height: 44px;
  }
  
  .kanban-card {
    min-height: 44px;
    padding: 0.875rem;
  }
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .kanban-columns {
    scroll-behavior: auto;
  }
  
  .kanban-column,
  .kanban-add-card-btn,
  .kanban-card {
    transition: none;
  }
  
  .kanban-drop-indicator,
  .kanban-board.loading::after {
    animation: none;
  }
  
  .kanban-drop-indicator {
    opacity: 1;
  }
}

/* ========================================
   Swimlane Layout
   ======================================== */

.kanban-board.has-swimlanes {
  display: flex;
  flex-direction: column;
}

.kanban-board.has-swimlanes .kanban-swimlane-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: auto;
}

/* Swimlane header row */
.kanban-header {
  display: grid;
  grid-template-columns: 200px repeat(var(--kanban-column-count, 3), var(--kanban-column-width));
  gap: 0.5rem;
  position: sticky;
  top: 0;
  background: var(--pro-bg-primary, #ffffff);
  z-index: 10;
  padding: var(--kanban-header-padding);
  border-bottom: 2px solid var(--pro-border-color, rgba(0,0,0,0.1));
}

.kanban-header-cell {
  font-weight: var(--pro-font-weight-semibold, 600);
  color: var(--pro-text-primary, #212529);
  padding: 0.5rem;
  text-align: center;
}

.kanban-header-cell.kanban-header-label {
  text-align: left;
}

/* Swimlane row */
.kanban-swimlane {
  border-bottom: 1px solid var(--pro-border-color, rgba(0,0,0,0.1));
}

.kanban-swimlane:last-child {
  border-bottom: none;
}

.kanban-swimlane-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: var(--kanban-header-padding);
  background: var(--pro-bg-secondary, #f8f9fa);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.kanban-swimlane-header:hover {
  background: var(--pro-bg-tertiary, rgba(0,0,0,0.05));
}

.kanban-swimlane-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--kanban-border-radius-sm);
  color: var(--pro-text-secondary, #6c757d);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.kanban-swimlane-toggle:hover {
  background: var(--pro-bg-tertiary, rgba(0,0,0,0.05));
  color: var(--pro-text-primary, #212529);
}

.kanban-swimlane-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--pro-focus-ring, rgba(13, 110, 253, 0.25));
}

.kanban-swimlane-title {
  font-weight: var(--pro-font-weight-medium, 500);
  color: var(--pro-text-primary, #212529);
  flex: 1;
}

.kanban-swimlane-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  font-size: var(--pro-font-size-xs, 0.75rem);
  font-weight: var(--pro-font-weight-medium, 500);
  color: var(--pro-text-secondary, #6c757d);
  background: var(--pro-bg-tertiary, rgba(0,0,0,0.05));
  border-radius: 1rem;
  font-family: var(--pro-font-mono, monospace);
}

/* Swimlane body grid */
.kanban-swimlane-body {
  display: grid;
  grid-template-columns: 200px repeat(var(--kanban-column-count, 3), var(--kanban-column-width));
  gap: 0.5rem;
  padding: 0.5rem;
  padding-left: 200px; /* Offset for label column */
}

/* Hide label column space in body - cards span full width */
.kanban-swimlane-body::before {
  content: '';
  grid-column: 1;
}

.kanban-swimlane-cell {
  min-height: 80px;
  background: var(--pro-bg-tertiary, rgba(0,0,0,0.02));
  border: 1px dashed var(--pro-border-color-light, rgba(0,0,0,0.08));
  border-radius: var(--kanban-border-radius-sm);
  padding: calc(var(--kanban-card-padding) / 2);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.kanban-swimlane-cell:empty::after {
  content: '';
}

/* Collapsed swimlane */
.kanban-swimlane.collapsed .kanban-swimlane-body {
  display: none;
}

.kanban-swimlane.collapsed .kanban-swimlane-header {
  opacity: 0.75;
}

/* Drop valid state for swimlane cells */
.kanban-swimlane-cell.drop-valid {
  background: var(--pro-success-bg, rgba(25, 135, 84, 0.1));
  border-color: var(--pro-success, #198754);
  border-style: solid;
}

/* Responsive swimlanes */
@media (max-width: 992px) {
  .kanban-header,
  .kanban-swimlane-body {
    grid-template-columns: 150px repeat(var(--kanban-column-count, 3), 260px);
  }
  
  .kanban-swimlane-body {
    padding-left: 150px;
  }
}

@media (max-width: 768px) {
  .kanban-header,
  .kanban-swimlane-body {
    grid-template-columns: 120px repeat(var(--kanban-column-count, 3), 240px);
  }
  
  .kanban-swimlane-body {
    padding-left: 120px;
  }
}

@media (max-width: 576px) {
  /* Stack swimlanes on mobile */
  .kanban-header {
    display: none;
  }
  
  .kanban-swimlane-body {
    display: flex;
    flex-direction: column;
    padding-left: 0.5rem;
    gap: 0.5rem;
  }
  
  .kanban-swimlane-cell {
    min-height: 60px;
  }
  
  .kanban-swimlane-cell::before {
    content: attr(data-column);
    display: block;
    font-size: var(--pro-font-size-xs, 0.75rem);
    font-weight: var(--pro-font-weight-medium, 500);
    color: var(--pro-text-muted, #adb5bd);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .kanban-board {
    height: auto;
    overflow: visible;
  }
  
  .kanban-columns {
    display: block;
    overflow: visible;
  }
  
  .kanban-column {
    width: 100%;
    max-height: none;
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }
  
  .kanban-add-card-btn {
    display: none;
  }
  
  /* Swimlane print */
  .kanban-swimlane.collapsed .kanban-swimlane-body {
    display: grid;
  }
  
  .kanban-swimlane-toggle {
    display: none;
  }
}

/* ========================================
   Loading State
   ======================================== */

.kanban-board.loading {
  position: relative;
}

.kanban-board.loading .kanban-columns,
.kanban-board.loading .kanban-swimlanes {
  opacity: 0.5;
  pointer-events: none;
}

.kanban-board.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--pro-border-color, rgba(0, 0, 0, 0.1));
  border-top-color: var(--pro-primary, #2196f3);
  border-radius: 50%;
  animation: kanban-spin 0.8s linear infinite;
  z-index: 100;
}

@keyframes kanban-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================
   Remote Update Animation
   ======================================== */

.kanban-card.remote-update {
  animation: kanban-flash 0.5s ease 2;
}

@keyframes kanban-flash {
  0%, 100% { 
    background: var(--pro-bg-primary, #ffffff); 
  }
  50% { 
    background: var(--pro-info-bg, rgba(33, 150, 243, 0.15)); 
  }
}

/* Dark theme remote update */
[data-theme="dark"] .kanban-card.remote-update,
.dark-mode .kanban-card.remote-update {
  animation: kanban-flash-dark 0.5s ease 2;
}

@keyframes kanban-flash-dark {
  0%, 100% { 
    background: var(--pro-bg-secondary, #1e1e1e); 
  }
  50% { 
    background: var(--pro-info-bg, rgba(33, 150, 243, 0.25)); 
  }
}

/* ========================================
   User Presence
   ======================================== */

.kanban-presence {
  display: flex;
  align-items: center;
  padding: 0.5rem var(--kanban-header-padding);
  gap: 0;
}

.kanban-presence:empty {
  display: none;
}

.kanban-presence-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--pro-bg-primary, #ffffff);
  margin-left: -8px;
  object-fit: cover;
  background: var(--pro-bg-secondary, #f5f5f5);
  flex-shrink: 0;
}

.kanban-presence-avatar:first-child {
  margin-left: 0;
}

.kanban-presence-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pro-text-primary, #333333);
  background: var(--pro-bg-tertiary, #e0e0e0);
}

/* Density adjustments for presence */
[data-density="compact"] .kanban-presence-avatar {
  width: 24px;
  height: 24px;
  margin-left: -6px;
  font-size: 0.75rem;
}

[data-density="spacious"] .kanban-presence-avatar {
  width: 40px;
  height: 40px;
  margin-left: -10px;
  border-width: 3px;
}

/* ========================================
   API Error State
   ======================================== */

.kanban-card.save-error {
  border-color: var(--pro-danger, #dc3545);
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

.kanban-card.saving {
  opacity: 0.7;
  pointer-events: none;
}

.kanban-card.saving::after {
  content: '';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 14px;
  height: 14px;
  border: 2px solid var(--pro-border-color, rgba(0, 0, 0, 0.1));
  border-top-color: var(--pro-primary, #2196f3);
  border-radius: 50%;
  animation: kanban-spin 0.8s linear infinite;
}

/* ========================================
   Keyboard Navigation
   ======================================== */

.kanban-card:focus {
  outline: 2px solid var(--pro-primary, #2196f3);
  outline-offset: 2px;
}

.kanban-card.picked {
  outline: 3px solid var(--pro-primary, #2196f3);
  outline-offset: 2px;
  box-shadow: var(--pro-shadow-lg, 0 10px 20px rgba(0, 0, 0, 0.15));
  z-index: 10;
}

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

/* ========================================
   Inline Add Card Form
   ======================================== */

.kanban-add-card {
  padding: 0.5rem;
}

.kanban-add-card-form {
  background: var(--pro-bg-primary, #ffffff);
  border: 1px solid var(--pro-border-color, rgba(0, 0, 0, 0.1));
  border-radius: var(--kanban-border-radius-sm, 4px);
  padding: var(--kanban-card-padding, 0.75rem);
}

.kanban-add-card-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--pro-border-color, rgba(0, 0, 0, 0.1));
  border-radius: var(--kanban-border-radius-sm, 4px);
  font-size: inherit;
  font-family: inherit;
  background: var(--pro-bg-primary, #ffffff);
  color: var(--pro-text-primary, #333333);
}

.kanban-add-card-input:focus {
  outline: none;
  border-color: var(--pro-primary, #2196f3);
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.kanban-add-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.kanban-add-card-submit,
.kanban-add-card-cancel {
  padding: 0.375rem 0.75rem;
  border: none;
  border-radius: var(--kanban-border-radius-sm, 4px);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.kanban-add-card-submit {
  background: var(--pro-primary, #2196f3);
  color: white;
}

.kanban-add-card-submit:hover {
  background: var(--pro-primary-dark, #1976d2);
}

.kanban-add-card-cancel {
  background: var(--pro-bg-secondary, #f5f5f5);
  color: var(--pro-text-secondary, #666666);
}

.kanban-add-card-cancel:hover {
  background: var(--pro-bg-tertiary, #e0e0e0);
}

/* ========================================
   Card Detail Modal
   ======================================== */

.kanban-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.kanban-modal {
  background: var(--pro-bg-primary, #ffffff);
  border-radius: var(--kanban-border-radius, 8px);
  box-shadow: var(--pro-shadow-lg, 0 10px 40px rgba(0, 0, 0, 0.2));
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.kanban-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--pro-border-color, rgba(0, 0, 0, 0.1));
}

.kanban-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pro-text-primary, #333333);
}

.kanban-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--pro-text-secondary, #666666);
  line-height: 1;
  padding: 0.25rem;
}

.kanban-modal-close:hover {
  color: var(--pro-text-primary, #333333);
}

.kanban-modal-body {
  padding: 1rem;
}

.kanban-modal-section {
  margin-bottom: 1rem;
}

.kanban-modal-section:last-child {
  margin-bottom: 0;
}

.kanban-modal-section label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pro-text-secondary, #666666);
  margin-bottom: 0.25rem;
}

.kanban-modal-section input,
.kanban-modal-section select,
.kanban-modal-section textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--pro-border-color, rgba(0, 0, 0, 0.1));
  border-radius: var(--kanban-border-radius-sm, 4px);
  font-size: inherit;
  font-family: inherit;
  background: var(--pro-bg-primary, #ffffff);
  color: var(--pro-text-primary, #333333);
}

.kanban-modal-section textarea {
  resize: vertical;
  min-height: 80px;
}

.kanban-modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid var(--pro-border-color, rgba(0, 0, 0, 0.1));
}

.kanban-modal-save,
.kanban-modal-delete {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--kanban-border-radius-sm, 4px);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.kanban-modal-save {
  background: var(--pro-primary, #2196f3);
  color: white;
}

.kanban-modal-save:hover {
  background: var(--pro-primary-dark, #1976d2);
}

.kanban-modal-delete {
  background: var(--pro-danger-bg, rgba(220, 53, 69, 0.1));
  color: var(--pro-danger, #dc3545);
}

.kanban-modal-delete:hover {
  background: var(--pro-danger, #dc3545);
  color: white;
}

/* Activity log */
.kanban-modal-activity-log {
  max-height: 150px;
  overflow-y: auto;
  font-size: 0.875rem;
}

.kanban-activity-item {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--pro-border-color-light, rgba(0, 0, 0, 0.05));
}

.kanban-activity-item:last-child {
  border-bottom: none;
}

.kanban-activity-time {
  color: var(--pro-text-muted, #999999);
  font-size: 0.75rem;
}

.kanban-activity-empty {
  color: var(--pro-text-muted, #999999);
  font-style: italic;
}

/* ========================================
   High Contrast & Reduced Motion
   ======================================== */

@media (prefers-contrast: high) {
  .kanban-card {
    border-width: 2px;
  }
  
  .kanban-column {
    border: 2px solid currentColor;
  }
  
  .kanban-card:focus,
  .kanban-card.picked {
    outline-width: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kanban-card,
  .kanban-drop-indicator,
  .kanban-card.remote-update {
    transition: none;
    animation: none;
  }
}

/* css/tree-view.css */
/**
 * Funky TreeView Styles
 * 
 * Hierarchical tree display with expand/collapse, icons, and guide lines.
 * Theme and density aware using Funky design system.
 */

/* ==========================================================================
   Container
   ========================================================================== */

.funky-tree-view {
  width: 100%;
  overflow: auto;
  font-family: var(--pro-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-size: var(--pro-font-size-sm, 0.875rem);
  color: var(--pro-text-primary);
  background: var(--pro-bg-primary);
}

.tree-view-container {
  min-width: max-content;
}

/* Empty state */
.tree-view-empty {
  padding: var(--pro-spacing-lg, 1.5rem);
  text-align: center;
  color: var(--pro-text-secondary);
  font-style: italic;
}

/* ==========================================================================
   Search Input
   ========================================================================== */

.tree-view-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--pro-border-color, rgba(255, 255, 255, 0.1));
  border-radius: var(--pro-border-radius, 6px);
  background: var(--pro-bg-secondary, rgba(255, 255, 255, 0.05));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tree-view-search:focus-within {
  border-color: var(--pro-accent-primary, #0d6efd);
  box-shadow: 0 0 0 3px var(--pro-accent-primary-light, rgba(13, 110, 253, 0.25));
}

.tree-view-search-icon {
  color: var(--pro-text-secondary);
  flex-shrink: 0;
}

.tree-view-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--pro-text-primary);
  font-size: var(--pro-font-size-sm, 0.875rem);
  outline: none;
  min-width: 0;
}

.tree-view-search-input::placeholder {
  color: var(--pro-text-muted, rgba(255, 255, 255, 0.4));
}

.tree-view-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--pro-bg-tertiary, rgba(255, 255, 255, 0.1));
  color: var(--pro-text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tree-view-search-clear:hover {
  background: var(--pro-bg-hover, rgba(255, 255, 255, 0.15));
  color: var(--pro-text-primary);
}

/* ==========================================================================
   Match Highlighting
   ========================================================================== */

.tree-view-highlight {
  background: var(--pro-warning-bg, rgba(255, 193, 7, 0.3));
  color: inherit;
  padding: 0 0.125rem;
  border-radius: 2px;
}

/* ==========================================================================
   Loading & Error States
   ========================================================================== */

/* Loading state */
.tree-view-node.tree-view-loading > .tree-view-row {
  opacity: 0.7;
  pointer-events: none;
}

.tree-view-loading-placeholder {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  color: var(--pro-text-secondary);
  font-style: italic;
  font-size: var(--pro-font-size-sm, 0.875rem);
}

/* Error state */
.tree-view-node.tree-view-error > .tree-view-row .tree-view-chevron i {
  color: var(--pro-danger, #dc3545);
}

.tree-view-error-placeholder {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  color: var(--pro-danger, #dc3545);
  font-size: var(--pro-font-size-sm, 0.875rem);
}

.tree-view-retry-btn {
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
  border: 1px solid var(--pro-danger, #dc3545);
  border-radius: var(--pro-border-radius-sm, 4px);
  background: transparent;
  color: var(--pro-danger, #dc3545);
  font-size: var(--pro-font-size-xs, 0.75rem);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tree-view-retry-btn:hover {
  background: var(--pro-danger, #dc3545);
  color: #fff;
}

/* ==========================================================================
   Drag and Drop
   ========================================================================== */

/* Draggable cursor */
.tree-view-draggable {
  cursor: grab;
}

.tree-view-draggable:active {
  cursor: grabbing;
}

/* Node being dragged */
.tree-view-dragging {
  opacity: 0.5;
}

/* Container during drag */
.tree-view-drag-active .tree-view-row:not(.tree-view-dragging) {
  transition: transform 0.1s ease;
}

/* Drop target base */
.tree-view-drop-target {
  position: relative;
}

/* Drop before indicator */
.tree-view-drop-before::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pro-accent-primary, #0d6efd);
  z-index: 10;
}

/* Drop after indicator */
.tree-view-drop-after::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pro-accent-primary, #0d6efd);
  z-index: 10;
}

/* Drop inside indicator */
.tree-view-drop-inside {
  background: var(--pro-accent-primary-light, rgba(13, 110, 253, 0.2)) !important;
  outline: 2px dashed var(--pro-accent-primary, #0d6efd);
  outline-offset: -2px;
}

/* Drag ghost */
.tree-view-drag-ghost {
  position: absolute;
  top: -1000px;
  left: -1000px;
  padding: 0.375rem 0.75rem;
  background: var(--pro-bg-elevated, #2d2d4a);
  border: 1px solid var(--pro-border-color, rgba(255, 255, 255, 0.15));
  border-radius: var(--pro-border-radius, 6px);
  color: var(--pro-text-primary);
  font-size: var(--pro-font-size-sm, 0.875rem);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10000;
}

/* ==========================================================================
   No Results State
   ========================================================================== */

.tree-view-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: var(--pro-spacing-lg, 1.5rem);
  text-align: center;
  color: var(--pro-text-secondary);
}

.tree-view-no-results-clear {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--pro-border-color, rgba(255, 255, 255, 0.15));
  border-radius: var(--pro-border-radius, 6px);
  background: transparent;
  color: var(--pro-accent-primary, #0d6efd);
  font-size: var(--pro-font-size-sm, 0.875rem);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tree-view-no-results-clear:hover {
  background: var(--pro-accent-primary-light, rgba(13, 110, 253, 0.15));
  border-color: var(--pro-accent-primary, #0d6efd);
}

/* ==========================================================================
   Node Structure
   ========================================================================== */

.tree-view-node {
  position: relative;
}

.tree-view-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  border-radius: var(--pro-border-radius-sm, 4px);
  transition: background-color 0.15s ease, color 0.15s ease;
  user-select: none;
  min-height: 2rem;
}

.tree-view-row:hover {
  background: var(--pro-bg-secondary);
}

.tree-view-row:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--pro-focus-ring, rgba(13, 110, 253, 0.5));
}

.tree-view-row:focus-visible {
  box-shadow: inset 0 0 0 2px var(--pro-focus-ring, rgba(13, 110, 253, 0.5));
}

/* ==========================================================================
   Chevron (Expand/Collapse)
   ========================================================================== */

.tree-view-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--pro-text-secondary);
  transition: transform 0.2s ease;
}

.tree-view-chevron i {
  font-size: 0.625rem;
}

.tree-view-chevron-expanded {
  transform: rotate(90deg);
}

.tree-view-chevron-empty {
  visibility: hidden;
}

.tree-view-row:hover .tree-view-chevron {
  color: var(--pro-text-primary);
}

/* ==========================================================================
   Checkbox (Multi-Select Mode)
   ========================================================================== */

.tree-view-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--pro-text-secondary);
  cursor: pointer;
  transition: color 0.15s ease;
}

.tree-view-checkbox i {
  font-size: 0.875rem;
}

.tree-view-checkbox:hover {
  color: var(--pro-accent-primary, #0d6efd);
}

.tree-view-checkbox-checked {
  color: var(--pro-accent-primary, #0d6efd);
}

.tree-view-checkbox-checked:hover {
  color: var(--pro-accent-primary-dark, #0a58ca);
}

.tree-view-checkbox-indeterminate {
  color: var(--pro-accent-warning, #f59e0b);
}

.tree-view-checkbox-indeterminate:hover {
  color: var(--pro-accent-warning, #d97706);
}

/* ==========================================================================
   Icon
   ========================================================================== */

.tree-view-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  flex-shrink: 0;
  color: var(--pro-accent-primary, #0d6efd);
}

.tree-view-icon i {
  font-size: 0.875rem;
}

/* Folder icons */
.tree-view-icon .fa-folder,
.tree-view-icon .fa-folder-open {
  color: var(--pro-accent-warning, #f59e0b);
}

/* File icons */
.tree-view-icon .fa-file,
.tree-view-icon .fa-file-alt {
  color: var(--pro-text-secondary);
}

/* ==========================================================================
   Label
   ========================================================================== */

.tree-view-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pro-text-primary);
}

/* ==========================================================================
   Children Container
   ========================================================================== */

.tree-view-children {
  overflow: hidden;
  transition: max-height 0.2s ease-out, opacity 0.2s ease-out;
  max-height: 5000px; /* Large enough for most trees */
  opacity: 1;
}

.tree-view-children-collapsed {
  max-height: 0;
  opacity: 0;
}

/* ==========================================================================
   Guide Lines
   ========================================================================== */

.tree-view-guides .tree-view-node {
  position: relative;
}

/* Vertical guide line */
.tree-view-guides .tree-view-node::before {
  content: '';
  position: absolute;
  left: calc(0.625rem - 1px); /* Align with chevron center */
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--pro-border-color);
  pointer-events: none;
}

/* Hide guide for root nodes */
.tree-view-guides > .tree-view-node::before,
.tree-view-guides .tree-view-container > .tree-view-node::before {
  display: none;
}

/* Hide guide below last node */
.tree-view-guides .tree-view-node-last::before {
  bottom: calc(100% - 1rem);
}

/* Horizontal connector */
.tree-view-guides .tree-view-children .tree-view-row::before {
  content: '';
  position: absolute;
  left: calc(-0.625rem - 10px);
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--pro-border-color);
  pointer-events: none;
}

/* Adjust guides based on depth (handled via inline padding) */

/* ==========================================================================
   Selection States
   ========================================================================== */

.tree-view-row.tree-view-selected {
  background: var(--pro-accent-primary-light, rgba(13, 110, 253, 0.15));
  color: var(--pro-accent-primary);
}

.tree-view-row.tree-view-selected:hover {
  background: var(--pro-accent-primary-light, rgba(13, 110, 253, 0.2));
}

/* ==========================================================================
   Focus States (Keyboard Navigation)
   ========================================================================== */

/* Focus ring - visible for keyboard navigation */
.tree-view-row:focus {
  outline: none;
}

.tree-view-row:focus-visible {
  outline: 2px solid var(--pro-accent-primary, #0d6efd);
  outline-offset: -2px;
  box-shadow: 0 0 0 4px var(--pro-accent-primary-light, rgba(13, 110, 253, 0.25));
}

/* Focused state (keyboard) */
.tree-view-row.tree-view-focused {
  background: var(--pro-bg-tertiary, rgba(255, 255, 255, 0.08));
}

.tree-view-row.tree-view-focused.tree-view-selected {
  background: var(--pro-accent-primary-light, rgba(13, 110, 253, 0.2));
}

/* Hide focus ring for mouse clicks */
.tree-view-mouse-focus .tree-view-row:focus {
  outline: none;
  box-shadow: none;
}

/* Container focus - subtle border when tree has focus */
.tree-view-container:focus {
  outline: none;
}

.tree-view-container:focus-visible {
  outline: 2px solid var(--pro-accent-primary, #0d6efd);
  outline-offset: 2px;
}

/* Live region - hidden visually but available for screen readers */
.tree-view-live-region {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Theme Support
   ========================================================================== */

/* Light theme */
[data-theme="light"] .funky-tree-view {
  background: var(--pro-bg-primary, #ffffff);
}

[data-theme="light"] .tree-view-row:hover {
  background: var(--pro-bg-secondary, #f8f9fa);
}

[data-theme="light"] .tree-view-guides .tree-view-node::before,
[data-theme="light"] .tree-view-guides .tree-view-row::before {
  background: var(--pro-border-color, #dee2e6);
}

[data-theme="light"] .tree-view-search {
  background: var(--pro-bg-secondary, #f8f9fa);
  border-color: var(--pro-border-color, #dee2e6);
}

[data-theme="light"] .tree-view-highlight {
  background: rgba(255, 193, 7, 0.4);
}

/* Dark theme (default) */
[data-theme="dark"] .funky-tree-view {
  background: var(--pro-bg-primary, #1a1a2e);
}

[data-theme="dark"] .tree-view-row:hover {
  background: var(--pro-bg-secondary, #252542);
}

[data-theme="dark"] .tree-view-guides .tree-view-node::before,
[data-theme="dark"] .tree-view-guides .tree-view-row::before {
  background: var(--pro-border-color, #3d3d5c);
}

/* Even Funkyer theme */
[data-theme="even-funkyer"] .funky-tree-view {
  background: var(--pro-bg-primary);
}

[data-theme="even-funkyer"] .tree-view-icon .fa-folder,
[data-theme="even-funkyer"] .tree-view-icon .fa-folder-open {
  color: var(--pro-accent-secondary, #e879f9);
}

[data-theme="even-funkyer"] .tree-view-row:hover {
  background: var(--pro-bg-elevated);
}

/* ==========================================================================
   Density Support
   ========================================================================== */

/* Compact */
[data-density="compact"] .tree-view-row {
  padding: 0.25rem 0.5rem;
  gap: 0.375rem;
  min-height: 1.5rem;
  font-size: var(--pro-font-size-xs, 0.75rem);
}

[data-density="compact"] .tree-view-chevron,
[data-density="compact"] .tree-view-icon {
  width: 1rem;
  height: 1rem;
}

[data-density="compact"] .tree-view-chevron i {
  font-size: 0.5rem;
}

[data-density="compact"] .tree-view-icon i {
  font-size: 0.75rem;
}

/* Comfortable (default - no overrides needed) */

/* Spacious */
[data-density="spacious"] .tree-view-row {
  padding: 0.5rem 1rem;
  gap: 0.625rem;
  min-height: 2.5rem;
  font-size: var(--pro-font-size-md, 1rem);
}

[data-density="spacious"] .tree-view-chevron,
[data-density="spacious"] .tree-view-icon {
  width: 1.5rem;
  height: 1.5rem;
}

[data-density="spacious"] .tree-view-chevron i {
  font-size: 0.75rem;
}

[data-density="spacious"] .tree-view-icon i {
  font-size: 1rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Touch devices - larger tap targets */
@media (pointer: coarse) {
  .tree-view-row {
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
  }
  
  .tree-view-chevron,
  .tree-view-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .tree-view-row {
    padding: 0.5rem 0.5rem;
  }
  
  .funky-tree-view {
    font-size: var(--pro-font-size-sm, 0.875rem);
  }
}

/* Small mobile */
@media (max-width: 576px) {
  .tree-view-row {
    gap: 0.375rem;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .tree-view-chevron,
  .tree-view-row,
  .tree-view-children {
    transition: none;
  }
  
  .tree-view-children-collapsed {
    /* Instant hide without animation */
    display: none;
  }
  
  .tree-view-children:not(.tree-view-children-collapsed) {
    display: block;
    max-height: none;
  }
}

/* ==========================================================================
   High Contrast Mode
   ========================================================================== */

@media (prefers-contrast: high) {
  .tree-view-row:focus,
  .tree-view-row:focus-visible {
    box-shadow: inset 0 0 0 3px var(--pro-text-primary);
  }
  
  .tree-view-guides .tree-view-node::before,
  .tree-view-guides .tree-view-row::before {
    background: var(--pro-text-primary);
  }
  
  .tree-view-row.tree-view-selected {
    background: var(--pro-text-primary);
    color: var(--pro-bg-primary);
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .funky-tree-view {
    background: white;
    color: black;
  }
  
  .tree-view-children-collapsed {
    display: block;
    max-height: none;
    opacity: 1;
  }
  
  .tree-view-chevron {
    display: none;
  }
}

/* css/virtualised-list.css */
/**
 * VirtualisedList Component Styles
 * 
 * Efficient rendering for large datasets using virtual scrolling.
 * Uses Funky theme system variables (--pro-*) for consistent theming.
 */

/* ========================================
   Container
   ======================================== */

.virtual-list {
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  width: 100%;
  
  /* Smooth scrolling */
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  
  /* Performance optimizations */
  will-change: scroll-position;
  contain: strict;
  
  /* Focus styling */
  outline: none;
}

.virtual-list:focus {
  outline: 2px solid var(--pro-accent-primary, #ff6600);
  outline-offset: -2px;
}

.virtual-list:focus:not(:focus-visible) {
  outline: none;
}

.virtual-list:focus-visible {
  outline: 2px solid var(--pro-accent-primary, #ff6600);
  outline-offset: -2px;
}

/* ========================================
   Items Container
   ======================================== */

.virtual-list-items {
  position: relative;
  width: 100%;
}

/* ========================================
   Spacers
   ======================================== */

.virtual-list-spacer {
  width: 100%;
  pointer-events: none;
  flex-shrink: 0;
}

.virtual-list-spacer-top,
.virtual-list-spacer-bottom {
  /* Height set dynamically via JS */
}

/* ========================================
   List Items
   ======================================== */

.virtual-list-item {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  
  /* Prevent layout shift during recycling */
  contain: layout style;
  
  /* Default styling */
  display: flex;
  align-items: center;
  padding: 0 var(--pro-spacing-md, 0.75rem);
  
  /* Theme integration */
  background: var(--pro-bg-primary, #ffffff);
  color: var(--pro-text-primary, #212529);
  border-bottom: 1px solid var(--pro-border-color, rgba(0, 0, 0, 0.1));
  
  /* Transitions */
  transition: background-color 0.15s ease;
}

.virtual-list-item:hover {
  background: var(--pro-bg-hover, rgba(0, 0, 0, 0.04));
}

/* Focused item (keyboard navigation) */
.virtual-list-item.focused {
  background: var(--pro-bg-hover, rgba(0, 0, 0, 0.04));
  outline: 2px solid var(--pro-accent-primary, #ff6600);
  outline-offset: -2px;
}

/* Selected item */
.virtual-list-item.selected {
  background: var(--pro-accent-primary-transparent, rgba(255, 102, 0, 0.1));
}

.virtual-list-item.selected.focused {
  background: var(--pro-accent-primary-transparent, rgba(255, 102, 0, 0.15));
}

/* Active (pressed) state */
.virtual-list-item:active {
  background: var(--pro-bg-active, rgba(0, 0, 0, 0.08));
}

/* ========================================
   Loading State
   ======================================== */

.virtual-list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pro-spacing-lg, 1rem);
  color: var(--pro-text-secondary, #6c757d);
}

.virtual-list-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--pro-border-color, rgba(0, 0, 0, 0.1));
  border-top-color: var(--pro-accent-primary, #ff6600);
  border-radius: 50%;
  animation: virtual-list-spin 0.8s linear infinite;
  margin-right: var(--pro-spacing-sm, 0.5rem);
}

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

/* ========================================
   End of List
   ======================================== */

.virtual-list-end {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pro-spacing-lg, 1rem);
  color: var(--pro-text-tertiary, #adb5bd);
  font-size: var(--pro-font-size-sm, 0.875rem);
}

/* ========================================
   Pull to Refresh
   ======================================== */

.virtual-list-pull-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: var(--pro-text-secondary, #6c757d);
  font-size: var(--pro-font-size-sm, 0.875rem);
}

.virtual-list-pull-icon {
  font-size: 1.5rem;
  margin-bottom: var(--pro-spacing-xs, 0.25rem);
  transition: transform 0.2s ease;
}

.virtual-list-pull-indicator.ready .virtual-list-pull-icon {
  transform: rotate(180deg);
  color: var(--pro-accent-primary, #ff6600);
}

.virtual-list-pull-indicator.refreshing .virtual-list-pull-icon {
  animation: virtual-list-spin 0.8s linear infinite;
}

.virtual-list-pull-indicator.refreshing {
  opacity: 1 !important;
  height: 60px !important;
}

/* ========================================
   Empty State
   ======================================== */

.virtual-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--pro-spacing-2xl, 2rem);
  color: var(--pro-text-secondary, #6c757d);
  text-align: center;
  min-height: 200px;
}

.virtual-list-empty-icon {
  font-size: 3rem;
  margin-bottom: var(--pro-spacing-md, 0.75rem);
  opacity: 0.5;
}

.virtual-list-empty-message {
  font-size: var(--pro-font-size-md, 1rem);
}

/* ========================================
   Dark Theme Adjustments
   ======================================== */

[data-theme="dark"] .virtual-list-item {
  background: var(--pro-bg-primary, #1a1a2e);
  border-bottom-color: var(--pro-border-color, rgba(255, 255, 255, 0.1));
}

[data-theme="dark"] .virtual-list-item:hover {
  background: var(--pro-bg-hover, rgba(255, 255, 255, 0.04));
}

[data-theme="dark"] .virtual-list-item.focused {
  background: var(--pro-bg-hover, rgba(255, 255, 255, 0.04));
}

[data-theme="dark"] .virtual-list-item.selected {
  background: var(--pro-accent-primary-transparent, rgba(255, 102, 0, 0.15));
}

[data-theme="dark"] .virtual-list-item.selected.focused {
  background: var(--pro-accent-primary-transparent, rgba(255, 102, 0, 0.2));
}

[data-theme="dark"] .virtual-list-item:active {
  background: var(--pro-bg-active, rgba(255, 255, 255, 0.08));
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .virtual-list-item {
    transition: none;
  }
  
  .virtual-list-loading-spinner {
    animation: none;
  }
}

/* ========================================
   Density Modes
   ======================================== */

/* Compact density */
[data-density="compact"] .virtual-list-item {
  padding: 0 var(--pro-spacing-sm, 0.5rem);
}

/* Comfortable density (default) */
[data-density="comfortable"] .virtual-list-item {
  padding: 0 var(--pro-spacing-md, 0.75rem);
}

/* Spacious density */
[data-density="spacious"] .virtual-list-item {
  padding: 0 var(--pro-spacing-lg, 1rem);
}

/* ========================================
   Scrollbar Styling
   ======================================== */

.virtual-list::-webkit-scrollbar {
  width: 8px;
}

.virtual-list::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary, #f8f9fa);
}

.virtual-list::-webkit-scrollbar-thumb {
  background: var(--pro-border-color, rgba(0, 0, 0, 0.2));
  border-radius: 4px;
}

.virtual-list::-webkit-scrollbar-thumb:hover {
  background: var(--pro-text-tertiary, #adb5bd);
}

[data-theme="dark"] .virtual-list::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary, #16161e);
}

[data-theme="dark"] .virtual-list::-webkit-scrollbar-thumb {
  background: var(--pro-border-color, rgba(255, 255, 255, 0.2));
}

[data-theme="dark"] .virtual-list::-webkit-scrollbar-thumb:hover {
  background: var(--pro-text-tertiary, #6c757d);
}

/* ========================================
   Screen Reader Only (Live Region)
   ======================================== */

.virtual-list-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Search Highlight
   ======================================== */

.virtual-list-highlight {
  background: var(--pro-highlight-bg, #fff3cd);
  color: var(--pro-highlight-text, inherit);
  padding: 0 2px;
  border-radius: 2px;
}

[data-theme="dark"] .virtual-list-highlight {
  background: var(--pro-highlight-bg, rgba(255, 193, 7, 0.3));
}

/* Current match styling */
.virtual-list-item.focused .virtual-list-highlight {
  background: var(--pro-accent-primary, #ff6600);
  color: white;
}

/* ========================================
   High Contrast Mode
   ======================================== */

@media (prefers-contrast: more) {
  .virtual-list:focus,
  .virtual-list:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: -3px;
  }
  
  .virtual-list-item {
    border-bottom: 2px solid currentColor;
  }
  
  .virtual-list-item.focused {
    outline: 3px solid currentColor;
    outline-offset: -3px;
    background: transparent;
  }
  
  .virtual-list-item.selected {
    background: Mark;
    color: MarkText;
  }
  
  .virtual-list-highlight {
    background: Highlight;
    color: HighlightText;
  }
}

/* Forced colors (Windows High Contrast) */
@media (forced-colors: active) {
  .virtual-list:focus,
  .virtual-list:focus-visible {
    outline: 3px solid CanvasText;
  }
  
  .virtual-list-item.focused {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
  
  .virtual-list-item.selected {
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
  
  .virtual-list-loading-spinner {
    border-color: CanvasText;
    border-top-color: Highlight;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .virtual-list {
    overflow: visible;
    height: auto !important;
  }
  
  .virtual-list-spacer-top,
  .virtual-list-spacer-bottom {
    display: none;
  }
  
  .virtual-list-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .virtual-list-loading,
  .virtual-list-end,
  .virtual-list-pull-indicator {
    display: none !important;
  }
}

/* css/video.css */
/**
 * Funky Video Component Styles
 * Minimal overlay controls with hover reveal
 * @version 1.0.0
 */

/* ========================================
   Container & Video Element
   ======================================== */

.funky-video {
  position: relative;
  width: 100%;
  max-width: 100%;
  background: var(--pro-bg-tertiary, #000);
  border-radius: var(--pro-border-radius, 8px);
  overflow: hidden;
  outline: none;
}

.funky-video:focus {
  box-shadow: 0 0 0 3px var(--pro-focus-ring, rgba(13, 110, 253, 0.25));
}

.funky-video-element {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ========================================
   Controls Overlay
   ======================================== */

.funky-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.funky-video:hover .funky-video-controls,
.funky-video:focus .funky-video-controls,
.funky-video:focus-within .funky-video-controls {
  opacity: 1;
}

/* Always show controls when paused */
.funky-video.paused .funky-video-controls {
  opacity: 1;
}

/* ========================================
   Control Buttons
   ======================================== */

.funky-video-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.funky-video-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.funky-video-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.funky-video-btn:active {
  transform: scale(0.95);
}

.funky-video-play {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
}

/* ========================================
   Progress Bar
   ======================================== */

.funky-video-progress-container {
  flex: 1;
  height: 1.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem 0;
}

.funky-video-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  transition: height 0.15s ease;
}

.funky-video-progress-container:hover .funky-video-progress {
  height: 6px;
}

.funky-video-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--pro-primary, #0d6efd);
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* ========================================
   Time Display
   ======================================== */

.funky-video-time {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-family: var(--pro-font-mono, monospace);
  white-space: nowrap;
  min-width: 5rem;
  text-align: center;
}

/* ========================================
   Center Play Button Overlay (when paused)
   ======================================== */

.funky-video::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4rem;
  height: 4rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.funky-video::after {
  content: '\f04b';
  font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', sans-serif;
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-45%, -50%);
  font-size: 1.5rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.funky-video.paused::before,
.funky-video.paused::after {
  opacity: 1;
}

.funky-video.paused:hover::before,
.funky-video.paused:hover::after {
  opacity: 0.7;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 576px) {
  .funky-video-controls {
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .funky-video-btn {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .funky-video-play {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }

  .funky-video-time {
    font-size: 0.625rem;
    min-width: 4rem;
  }

  .funky-video::before {
    width: 3rem;
    height: 3rem;
  }

  .funky-video::after {
    font-size: 1rem;
  }
}

/* ========================================
   Theme Integration
   ======================================== */

/* Dark theme adjustments */
[data-theme="dark"] .funky-video {
  background: var(--pro-bg-tertiary, #1a1a1a);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .funky-video-controls,
  .funky-video-btn,
  .funky-video-progress,
  .funky-video::before,
  .funky-video::after {
    transition: none;
  }
}

/* css/themes.css */
/* ============================================
   THEMES.CSS - Professional Theme System
   Three themes: Dark (default), Light, Even Funkier
   ============================================ */

/* ============================================
   TYPOGRAPHY VARIABLES
   ============================================ */
:root {
  /* Font Families */
  --pro-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --pro-font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', Consolas, monospace;
  
  /* Font Sizes - Typographic Scale */
  --pro-font-size-xs: 0.75rem;    /* 12px */
  --pro-font-size-sm: 0.875rem;   /* 14px */
  --pro-font-size-base: 1rem;     /* 16px */
  --pro-font-size-lg: 1.125rem;   /* 18px */
  --pro-font-size-xl: 1.25rem;    /* 20px */
  --pro-font-size-2xl: 1.5rem;    /* 24px */
  --pro-font-size-3xl: 1.875rem;  /* 30px */
  --pro-font-size-4xl: 2.25rem;   /* 36px */
  
  /* Font Weights */
  --pro-font-weight-light: 300;
  --pro-font-weight-normal: 400;
  --pro-font-weight-medium: 500;
  --pro-font-weight-semibold: 600;
  --pro-font-weight-bold: 700;
  
  /* Line Heights */
  --pro-line-height-tight: 1.25;
  --pro-line-height-normal: 1.5;
  --pro-line-height-relaxed: 1.75;
  
  /* Letter Spacing */
  --pro-tracking-tight: -0.025em;
  --pro-tracking-normal: 0;
  --pro-tracking-wide: 0.025em;
}

/* ============================================
   DARK THEME (Default) - Bloomberg/GitHub Dark Style
   ============================================ */
:root,
[data-theme="dark"],
[data-theme="funky"] {
  /* Background Colors - User overrides take precedence */
  --pro-bg-primary: var(--user-bg-primary, #0d1117);
  --pro-bg-secondary: var(--user-bg-secondary, #161b22);
  --pro-bg-tertiary: var(--user-bg-tertiary, #21262d);
  --pro-bg-elevated: var(--user-bg-elevated, #2d333b);
  --pro-bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* Font scale - User override */
  font-size: calc(16px * var(--user-font-scale, 1));
  
  /* Border Colors - User overrides take precedence */
  --pro-border-color: var(--user-border-color, #30363d);
  --pro-border-muted: var(--user-border-muted, #21262d);
  --pro-border-emphasis: var(--user-border-emphasis, #484f58);
  
  /* Text Colors - with user override support */
  --pro-text-primary: var(--user-text-primary, #e6edf3);
  --pro-text-secondary: var(--user-text-secondary, #8b949e);
  --pro-text-muted: #6e7681;
  --pro-text-link: var(--user-link-color, #58a6ff);
  --pro-text-link-hover: var(--user-link-hover, #79b8ff);
  --pro-text-inverse: #0d1117;
  
  /* Accent Colors - Professional Blue (Bloomberg style) - User accent overrides */
  --pro-accent-primary: var(--user-accent, #2f81f7);
  --pro-accent-primary-hover: var(--user-accent-hover, #388bfd);
  --pro-accent-primary-muted: rgba(47, 129, 247, 0.15);
  
  /* Semantic Colors */
  --pro-accent-success: #3fb950;
  --pro-accent-success-muted: rgba(63, 185, 80, 0.15);
  --pro-accent-success-bg: #1e4d2b;
  --pro-accent-success-text: #d4edda;
  --pro-accent-warning: #d29922;
  --pro-accent-warning-muted: rgba(210, 153, 34, 0.15);
  --pro-accent-warning-bg: #664d03;
  --pro-accent-warning-text: #fff3cd;
  --pro-accent-warning-alt: #fd7e14;
  --pro-accent-warning-alt-bg: #3d2a1f;
  --pro-accent-danger: #f85149;
  --pro-accent-danger-muted: rgba(248, 81, 73, 0.15);
  --pro-accent-danger-bg: #5c1f1f;
  --pro-accent-danger-text: #f8d7da;
  --pro-accent-info: #58a6ff;
  --pro-accent-info-muted: rgba(88, 166, 255, 0.15);
  --pro-accent-info-bg: #0c4a6e;
  --pro-accent-info-text: #cfe2ff;
  --pro-accent-purple: #a78bfa;
  --pro-accent-purple-muted: rgba(139, 92, 246, 0.15);
  --pro-accent-purple-bg: #4c1d95;
  --pro-accent-purple-text: #c4b5fd;
  
  /* Legacy Variable Mappings (for backwards compatibility) */
  --dark-bg: var(--pro-bg-primary);
  --darker-bg: var(--pro-bg-secondary);
  --card-bg: var(--pro-bg-tertiary);
  --border-color: var(--pro-border-color);
  --text-primary: var(--pro-text-primary);
  --text-secondary: var(--pro-text-secondary);
  
  /* Shadow Colors */
  --pro-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --pro-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --pro-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --pro-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  
  /* Focus Ring */
  --pro-focus-ring: 0 0 0 3px rgba(47, 129, 247, 0.4);
  
  /* Table Colors */
  --pro-table-row-even: var(--pro-bg-secondary);
  --pro-table-row-odd: var(--pro-bg-primary);
  --pro-table-row-hover: var(--pro-bg-tertiary);
  --pro-table-header-bg: var(--pro-bg-tertiary);
}

/* ============================================
   LIGHT THEME - Clean Professional Style
   ============================================ */
[data-theme="light"] {
  /* Background Colors - User overrides take precedence */
  --pro-bg-primary: var(--user-bg-primary, #ffffff);
  --pro-bg-secondary: var(--user-bg-secondary, #f6f8fa);
  --pro-bg-tertiary: var(--user-bg-tertiary, #eaeef2);
  --pro-bg-elevated: var(--user-bg-elevated, #ffffff);
  --pro-bg-overlay: rgba(0, 0, 0, 0.3);
  
  /* Border Colors - User overrides take precedence */
  --pro-border-color: var(--user-border-color, #d0d7de);
  --pro-border-muted: var(--user-border-muted, #e6e8eb);
  --pro-border-emphasis: var(--user-border-emphasis, #8c959f);
  
  /* Text Colors - with user override support */
  --pro-text-primary: var(--user-text-primary, #1f2328);
  --pro-text-secondary: var(--user-text-secondary, #656d76);
  --pro-text-muted: #8c959f;
  --pro-text-link: var(--user-link-color, #0969da);
  --pro-text-link-hover: var(--user-link-hover, #0550ae);
  --pro-text-inverse: #ffffff;
  
  /* Accent Colors - Professional Blue - User accent overrides */
  --pro-accent-primary: var(--user-accent, #0969da);
  --pro-accent-primary-hover: var(--user-accent-hover, #0550ae);
  --pro-accent-primary-muted: rgba(9, 105, 218, 0.1);
  
  /* Semantic Colors */
  --pro-accent-success: #1a7f37;
  --pro-accent-success-muted: rgba(26, 127, 55, 0.1);
  --pro-accent-success-bg: #dafbe1;
  --pro-accent-success-text: #116329;
  --pro-accent-warning: #9a6700;
  --pro-accent-warning-muted: rgba(154, 103, 0, 0.1);
  --pro-accent-warning-bg: #fff8c5;
  --pro-accent-warning-text: #4d2d00;
  --pro-accent-warning-alt: #bf8700;
  --pro-accent-warning-alt-bg: #fff1d2;
  --pro-accent-danger: #cf222e;
  --pro-accent-danger-muted: rgba(207, 34, 46, 0.1);
  --pro-accent-danger-bg: #ffebe9;
  --pro-accent-danger-text: #82071e;
  --pro-accent-info: #0969da;
  --pro-accent-info-muted: rgba(9, 105, 218, 0.1);
  --pro-accent-info-bg: #ddf4ff;
  --pro-accent-info-text: #0550ae;
  --pro-accent-purple: #8250df;
  --pro-accent-purple-muted: rgba(130, 80, 223, 0.1);
  --pro-accent-purple-bg: #fbefff;
  --pro-accent-purple-text: #6639ba;
  
  /* Legacy Variable Mappings */
  --dark-bg: var(--pro-bg-primary);
  --darker-bg: var(--pro-bg-secondary);
  --card-bg: var(--pro-bg-tertiary);
  --border-color: var(--pro-border-color);
  --text-primary: var(--pro-text-primary);
  --text-secondary: var(--pro-text-secondary);
  
  /* Shadow Colors */
  --pro-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --pro-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --pro-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --pro-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  
  /* Focus Ring */
  --pro-focus-ring: 0 0 0 3px rgba(9, 105, 218, 0.3);
  
  /* Table Colors */
  --pro-table-row-even: var(--pro-bg-secondary);
  --pro-table-row-odd: var(--pro-bg-primary);
  --pro-table-row-hover: var(--pro-bg-tertiary);
  --pro-table-header-bg: var(--pro-bg-tertiary);
}

/* Light Theme Overrides for Gradient Elements */
[data-theme="light"] .sidebar-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--user-accent-hover, var(--pro-accent-primary-hover)));
}

[data-theme="light"] .page-title {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--user-accent-hover, var(--pro-accent-primary-hover)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   EVEN FUNKIER THEME - Variable Aliases
   The full theme is in even-funkyer.css, these are
   compatibility mappings for new --pro-* variables
   ============================================ */
[data-theme="even-funkyer"] {
  /* Map --pro-* variables to Even Funkier equivalents - User overrides take precedence */
  --pro-bg-primary: var(--user-bg-primary, var(--bg-color, #0a0015));
  --pro-bg-secondary: var(--user-bg-secondary, #1a0033);
  --pro-bg-tertiary: var(--user-bg-tertiary, #150026);
  --pro-bg-elevated: var(--user-bg-elevated, #200040);
  --pro-bg-overlay: rgba(10, 0, 21, 0.8);
  
  /* Border Colors - User overrides take precedence */
  --pro-border-color: var(--user-border-color, var(--border-color, #ff00ff));
  --pro-border-muted: var(--user-border-muted, rgba(255, 0, 255, 0.3));
  --pro-border-emphasis: var(--user-border-emphasis, #ff33ff);
  
  /* Text Colors - with user override support */
  --pro-text-primary: var(--user-text-primary, var(--text-color, #ffffff));
  --pro-text-secondary: var(--user-text-secondary, var(--text-muted, #cc99ff));
  --pro-text-muted: var(--text-secondary, #99ccff);
  --pro-text-link: var(--user-link-color, #00ffff);
  --pro-text-link-hover: var(--user-link-hover, #33ffff);
  --pro-text-inverse: #0a0015;
  
  /* Accent Colors - User accent blends with neon theme */
  --pro-accent-primary: var(--user-accent, var(--primary-color, #ff00ff));
  --pro-accent-primary-hover: var(--user-accent-hover, var(--primary-hover, #ff33ff));
  --pro-accent-primary-muted: rgba(255, 0, 255, 0.2);
  
  /* Secondary accent (cyan) for active/selected states */
  --pro-accent-secondary: var(--secondary-color, #00ffff);
  --pro-accent-secondary-hover: #33ffff;
  --pro-accent-secondary-muted: rgba(0, 255, 255, 0.15);
  
  --pro-accent-success: var(--success-color, #00ff00);
  --pro-accent-success-muted: rgba(0, 255, 0, 0.2);
  --pro-accent-success-bg: rgba(0, 255, 0, 0.15);
  --pro-accent-success-text: #66ff66;
  --pro-accent-warning: var(--warning-color, #ffaa00);
  --pro-accent-warning-muted: rgba(255, 170, 0, 0.2);
  --pro-accent-warning-bg: rgba(255, 170, 0, 0.15);
  --pro-accent-warning-text: #ffcc66;
  --pro-accent-warning-alt: #ff6600;
  --pro-accent-warning-alt-bg: rgba(255, 102, 0, 0.15);
  --pro-accent-danger: var(--danger-color, #ff0066);
  --pro-accent-danger-muted: rgba(255, 0, 102, 0.2);
  --pro-accent-danger-bg: rgba(255, 0, 102, 0.15);
  --pro-accent-danger-text: #ff6699;
  --pro-accent-info: var(--info-color, #00ccff);
  --pro-accent-info-muted: rgba(0, 204, 255, 0.2);
  --pro-accent-info-bg: rgba(0, 204, 255, 0.15);
  --pro-accent-info-text: #66ddff;
  --pro-accent-purple: #8800ff;
  --pro-accent-purple-muted: rgba(136, 0, 255, 0.2);
  --pro-accent-purple-bg: rgba(136, 0, 255, 0.15);
  --pro-accent-purple-text: #bb66ff;
  
  --pro-shadow-sm: 0 0 10px rgba(255, 0, 255, 0.2);
  --pro-shadow-md: 0 0 20px rgba(255, 0, 255, 0.3);
  --pro-shadow-lg: 0 0 30px rgba(255, 0, 255, 0.4), 0 0 60px rgba(0, 255, 255, 0.2);
  --pro-shadow-xl: 0 0 40px rgba(255, 0, 255, 0.5), 0 0 80px rgba(0, 255, 255, 0.3);
  
  --pro-focus-ring: 0 0 0 3px rgba(255, 0, 255, 0.5), 0 0 15px rgba(0, 255, 255, 0.3);
  
  --pro-table-row-even: rgba(26, 0, 51, 0.8);
  --pro-table-row-odd: rgba(10, 0, 21, 0.8);
  --pro-table-row-hover: rgba(255, 0, 255, 0.1);
  --pro-table-header-bg: rgba(32, 0, 64, 0.9);
}

/* Show funky-card accent bar only in even-funkyer theme */
[data-theme="even-funkyer"] .funky-card::before {
  display: block;
  background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
  background-size: 200% 100%;
  animation: funky-gradient 3s ease infinite;
}

@keyframes funky-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ============================================
   THEME SWITCHER
   ============================================ */
.theme-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 15px;
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--primary-dark));
  border: 2px solid var(--user-accent, var(--pro-accent-primary));
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(255, 110, 30, 0.3);
}

.theme-switcher:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 16px rgba(255, 110, 30, 0.5);
}

.theme-switcher:active {
  transform: scale(0.95);
}

.theme-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.theme-switcher:hover .theme-icon {
  transform: rotate(180deg);
}

button#themeSwitcher {
  margin: 0;
}

/* Animated record for Even Funkyer mode */
[data-theme="even-funkyer"] .theme-switcher {
  animation: recordSpin 2s linear infinite, recordColorFlash 1s ease-in-out infinite;
  background: linear-gradient(135deg, #ff00ff, #00ffff, #ffff00);
  background-size: 300% 300%;
  border-color: #ff00ff;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.6), 0 0 40px rgba(0, 255, 255, 0.4);
}

[data-theme="even-funkyer"] .theme-switcher:hover {
  animation: recordSpin 0.5s linear infinite, recordColorFlash 0.5s ease-in-out infinite;
  transform: scale(1.2);
}

@keyframes recordSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes recordColorFlash {
  0%, 100% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg) brightness(1);
  }
  50% {
    background-position: 100% 50%;
    filter: hue-rotate(180deg) brightness(1.3);
  }
}

/* Theme transition animation */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

* {
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   ACCESSIBILITY - Focus Visible Styles
   ============================================ */
:focus-visible {
  outline: 2px solid var(--user-accent, var(--pro-accent-primary));
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--user-accent, var(--pro-accent-primary));
  outline-offset: 2px;
  box-shadow: var(--pro-focus-ring);
}

/* Remove default focus outline when using focus-visible */
:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   BASE TYPOGRAPHY STYLES
   ============================================ */
body {
  font-family: var(--pro-font-family);
  font-size: var(--pro-font-size-base);
  font-weight: var(--pro-font-weight-normal);
  line-height: var(--pro-line-height-normal);
  color: var(--pro-text-primary);
  background-color: var(--pro-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility class for monospace/tabular numbers */
.font-mono,
.tabular-nums {
  font-family: var(--pro-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Heading styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pro-font-family);
  font-weight: var(--pro-font-weight-semibold);
  line-height: var(--pro-line-height-tight);
  color: var(--pro-text-primary);
  letter-spacing: var(--pro-tracking-tight);
}

h1 { font-size: var(--pro-font-size-4xl); }
h2 { font-size: var(--pro-font-size-3xl); }
h3 { font-size: var(--pro-font-size-2xl); }
h4 { font-size: var(--pro-font-size-xl); }
h5 { font-size: var(--pro-font-size-lg); }
h6 { font-size: var(--pro-font-size-base); }

/* ============================================
   CSS RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

/* ============================================
   ANIMATED BACKGROUND - Dark Theme (Subtle)
   ============================================ */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(47, 129, 247, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(88, 166, 255, 0.05) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* Hide animated background in light theme */
[data-theme="light"] body::before,
html[data-theme="light"] body::before {
  opacity: 0 !important;
  display: none;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--pro-border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   NAV TABS - Theme-aware Tab Styling
   ============================================ */
.nav-tabs {
  border-bottom: 1px solid var(--pro-border-color);
  gap: 4px;
}

.nav-tabs .nav-item {
  margin-bottom: -1px;
}

.nav-tabs .nav-link {
  color: var(--pro-text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  padding: 10px 16px;
  font-weight: 500;
  font-size: var(--pro-font-size-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tabs .nav-link i {
  font-size: 0.9em;
  opacity: 0.8;
}

.nav-tabs .nav-link:hover {
  color: var(--pro-text-primary);
  background: var(--pro-bg-tertiary);
  border-color: var(--pro-border-muted) var(--pro-border-muted) transparent;
}

.nav-tabs .nav-link:focus-visible {
  outline: none;
  box-shadow: var(--pro-focus-ring);
}

.nav-tabs .nav-link.active {
  color: var(--user-accent, var(--pro-accent-primary));
  background: var(--pro-bg-primary);
  border-color: var(--pro-border-color) var(--pro-border-color) var(--pro-bg-primary);
  font-weight: 600;
}

.nav-tabs .nav-link.active i {
  opacity: 1;
}

/* Dark Theme Specific */
[data-theme="dark"] .nav-tabs .nav-link.active,
:root .nav-tabs .nav-link.active {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-border-color) var(--pro-border-color) var(--pro-bg-secondary);
}

/* Light Theme Specific */
[data-theme="light"] .nav-tabs {
  border-bottom-color: var(--pro-border-color);
}

[data-theme="light"] .nav-tabs .nav-link {
  color: var(--pro-text-secondary);
}

[data-theme="light"] .nav-tabs .nav-link:hover {
  color: var(--pro-text-primary);
  background: var(--pro-bg-tertiary);
}

[data-theme="light"] .nav-tabs .nav-link.active {
  color: var(--user-accent, var(--pro-accent-primary));
  background: var(--pro-bg-primary);
  border-color: var(--pro-border-color) var(--pro-border-color) var(--pro-bg-primary);
}

/* Even Funkyer Theme - Neon Glow Tabs */
[data-theme="even-funkyer"] .nav-tabs {
  border-bottom-color: rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .nav-tabs .nav-link {
  color: var(--pro-text-secondary);
  border-color: transparent;
}

[data-theme="even-funkyer"] .nav-tabs .nav-link:hover {
  color: #00ffff;
  background: rgba(255, 0, 255, 0.1);
  border-color: rgba(255, 0, 255, 0.3) rgba(255, 0, 255, 0.3) transparent;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

[data-theme="even-funkyer"] .nav-tabs .nav-link.active {
  color: #ff00ff;
  background: var(--pro-bg-secondary);
  border-color: rgba(255, 0, 255, 0.5) rgba(255, 0, 255, 0.5) var(--pro-bg-secondary);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
  box-shadow: 0 -2px 10px rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .nav-tabs .nav-link.active i {
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.8);
  color: #00ffff;
}

/* ============================================
   LOADING SPINNER (Global)
   ============================================ */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--user-accent-muted, var(--pro-accent-primary-muted));
  border-top-color: var(--user-accent, var(--pro-accent-primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ============================================
   DENSITY SETTINGS
   Adjusts spacing, button heights, and padding
   ============================================ */

/* Compact: Tighter spacing for data-heavy views */
[data-density="compact"] {
  --btn-height-xs: 20px;
  --btn-height-sm: 24px;
  --btn-height-md: 30px;
  --btn-height-lg: 38px;
  --btn-padding-xs: 2px 6px;
  --btn-padding-sm: 4px 8px;
  --btn-padding-md: 6px 12px;
  --btn-padding-lg: 8px 16px;
  --btn-font-xs: 10px;
  --btn-font-sm: 11px;
  --btn-font-md: 12px;
  --btn-font-lg: 13px;
  --pro-spacing-xs: 4px;
  --pro-spacing-sm: 8px;
  --pro-spacing-md: 12px;
  --pro-spacing-lg: 16px;
  --form-control-height: 30px;
  --form-control-padding: 4px 8px;
  --table-cell-padding: 6px 8px;
  --nav-item-padding: 6px 10px;
  --card-padding: 12px;
}

/* Comfortable: Default balanced spacing */
[data-density="comfortable"] {
  --btn-height-xs: 24px;
  --btn-height-sm: 28px;
  --btn-height-md: 36px;
  --btn-height-lg: 44px;
  --btn-padding-xs: 4px 8px;
  --btn-padding-sm: 6px 12px;
  --btn-padding-md: 8px 16px;
  --btn-padding-lg: 12px 24px;
  --btn-font-xs: 11px;
  --btn-font-sm: 12px;
  --btn-font-md: 13px;
  --btn-font-lg: 14px;
  --pro-spacing-xs: 6px;
  --pro-spacing-sm: 12px;
  --pro-spacing-md: 16px;
  --pro-spacing-lg: 24px;
  --form-control-height: 38px;
  --form-control-padding: 8px 12px;
  --table-cell-padding: 10px 12px;
  --nav-item-padding: 10px 14px;
  --card-padding: 16px;
}

/* Spacious: More room for accessibility */
[data-density="spacious"] {
  --btn-height-xs: 28px;
  --btn-height-sm: 34px;
  --btn-height-md: 42px;
  --btn-height-lg: 52px;
  --btn-padding-xs: 6px 10px;
  --btn-padding-sm: 8px 14px;
  --btn-padding-md: 10px 20px;
  --btn-padding-lg: 14px 28px;
  --btn-font-xs: 12px;
  --btn-font-sm: 13px;
  --btn-font-md: 14px;
  --btn-font-lg: 16px;
  --pro-spacing-xs: 8px;
  --pro-spacing-sm: 16px;
  --pro-spacing-md: 24px;
  --pro-spacing-lg: 32px;
  --form-control-height: 46px;
  --form-control-padding: 12px 16px;
  --table-cell-padding: 14px 16px;
  --nav-item-padding: 14px 18px;
  --card-padding: 24px;
}

/* ============================================
   DENSITY COMPONENT OVERRIDES
   Direct styles for components affected by density
   ============================================ */

/* Form Controls */
[data-density] .form-control,
[data-density] .form-select {
  height: var(--form-control-height);
  padding: var(--form-control-padding);
}

[data-density] textarea.form-control {
  height: auto;
  min-height: calc(var(--form-control-height) * 2);
}

/* Buttons - ensure they use the density variables */
[data-density] .btn {
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
}

[data-density] .btn-sm {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
}

[data-density] .btn-lg {
  height: var(--btn-height-lg);
  padding: var(--btn-padding-lg);
}

/* Table Cells */
[data-density] .table td,
[data-density] .table th {
  padding: var(--table-cell-padding);
}

/* DataTables */
[data-density] table.dataTable td,
[data-density] table.dataTable th {
  padding: var(--table-cell-padding);
}

/* Navigation Items */
[data-density] .nav-link {
  padding: var(--nav-item-padding);
}

[data-density] .nav-group-items .nav-link {
  padding: var(--nav-item-padding);
}

/* Cards */
[data-density] .card-body {
  padding: var(--card-padding);
}

[data-density] .card-header,
[data-density] .card-footer {
  padding: calc(var(--card-padding) * 0.75) var(--card-padding);
}

/* Dropdowns */
[data-density] .dropdown-item {
  padding: var(--nav-item-padding);
}

/* List Groups */
[data-density] .list-group-item {
  padding: var(--nav-item-padding);
}

/* Funky Buttons - ensure they use density variables */
[data-density] .btn-funky,
[data-density] .btn-funky-primary,
[data-density] .btn-funky-secondary,
[data-density] .btn-funky-warning,
[data-density] .btn-funky-danger,
[data-density] .btn-funky-success,
[data-density] .btn-funky-outline,
[data-density] .btn-format-rules {
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  font-size: var(--btn-font-md, 13px);
}

[data-density] .btn-funky.btn-sm,
[data-density] .btn-funky-primary.btn-sm,
[data-density] .btn-funky-secondary.btn-sm,
[data-density] .btn-funky-warning.btn-sm,
[data-density] .btn-funky-danger.btn-sm,
[data-density] .btn-funky-success.btn-sm {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
  font-size: var(--btn-font-sm, 12px);
}

[data-density] .btn-funky.btn-lg,
[data-density] .btn-funky-primary.btn-lg,
[data-density] .btn-funky-secondary.btn-lg,
[data-density] .btn-funky-warning.btn-lg,
[data-density] .btn-funky-danger.btn-lg,
[data-density] .btn-funky-success.btn-lg {
  height: var(--btn-height-lg);
  padding: var(--btn-padding-lg);
  font-size: var(--btn-font-lg, 15px);
}

/* Header Actions with density */
[data-density] .funky-header-actions {
  gap: var(--pro-spacing-sm);
  margin-bottom: var(--pro-spacing-md);
}

[data-density] .funky-header-actions .funky-search-box input,
[data-density] .funky-header-actions .form-control,
[data-density] .funky-header-actions .form-select {
  height: var(--btn-height-md);
}

[data-density] .funky-header-actions .select2-container .select2-selection {
  height: var(--btn-height-md) !important;
  min-height: var(--btn-height-md) !important;
}

