/* ============================================
   ORIGINAL CUSTOM.CSS CONTENT BELOW
   ============================================ */

/* ========================================
   FUNKY DOM UTILITY CLASSES
   ======================================== */

/* Hide with fade animation - used by Funky.Dom .hide()/.show() */
.funky-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

/* Ensure elements are visible when explicitly shown via Funky.Dom.show() */
.funky-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before, table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
    display: none;
}

/* ========================================
   FUNKY RESPONSIVE LIST PAGE STYLES
   ======================================== */

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

@keyframes fadeInUp {
  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: 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, 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: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  position: relative;
  z-index: 1;
}

@keyframes float {
  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;
}

/* Main Card Enhancements */
.main-content {
  animation: fadeIn 0.5s ease-out;
}

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

.funky-card {
  animation: slideIn 0.7s ease-out;
}

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

/* Header Actions - Responsive */
.funky-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
  align-items: center;
}

.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: 36px;
  transition: all 0.2s ease;
}

.funky-search-box input:focus {
  border-color: var(--focus-ring-color);
}

.funky-search-box input:focus-visible {
  border-color: var(--focus-ring-color);
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  box-shadow: var(--focus-ring-shadow);
}

.funky-search-box::before {
  content: '🔍';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

/* Button Styles - moved to buttons.css */

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

/* Tablet (768px - 1024px) */
@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;
  }
  
  .funky-header-actions {
    gap: 12px;
  }
  
  .funky-search-box {
    min-width: 200px;
  }
}

/* Mobile Landscape (576px - 768px) */
@media (max-width: 768px) {
  .main-content {
    padding: 1em !important;
  }
  
  .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-card {
    padding: 18px;
    border-radius: 12px;
  }
  
  /* Note: Primary funky-header-actions responsive styles are in buttons.css */
  
  .funky-search-box input {
    padding: 10px 18px 10px 40px;
    font-size: 13px;
  }
}

/* Mobile Portrait (0 - 576px) */
@media (max-width: 576px) {
  .main-content {
    padding: 1em !important;
  }
  
  .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;
  }
  
  /* Note: funky-header-actions gap is handled in buttons.css */
  
  .funky-search-box input {
    padding: 10px 15px 10px 38px;
    font-size: 12px;
    border-radius: 20px;
  }
  
  .funky-search-box::before {
    left: 15px;
    font-size: 14px;
  }
}

/* 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;
  }
}

/* Note: funky-header-actions responsive layout handled in buttons.css */

/* Reduce animations on mobile for performance */
@media (max-width: 768px) {
  .stat-card::before {
    animation: none;
    background: linear-gradient(90deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  }
  
  .stat-icon {
    animation: none;
  }
  
  .funky-card {
    animation-duration: 0.4s;
  }
  
  .stats-row {
    animation-duration: 0.4s;
  }
}

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

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Focus styles for keyboard navigation */
.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 rgba(47, 129, 247, 0.3);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .stat-icon {
    animation: none !important;
  }
  
  .stat-card::before {
    animation: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .stat-card {
    border: 2px solid currentColor;
  }
}

/* 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;
}

/* Trade List Page Specific Styles */
#bulkActionsBtn {
  display: none;
}

#tradesTable {
  width: 100%;
}

#importProgress {
  display: none;
}

#importProgress .progress-bar {
  width: 100%;
}

#importErrorsContainer {
  display: none;
}

#selectedTradesOverview {
  max-height: 400px;
  overflow-y: auto;
}

.wizard-btn-prev,
.wizard-btn-save {
  display: none;
}

/* Bulk Actions Modal Styling */
#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, rgba(47, 129, 247, 0.05), rgba(47, 129, 247, 0.05));
  cursor: pointer;
  color: white;
}

#bulkActionsModal .alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--pro-text-primary);
}

#bulkActionsModal .alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: 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;
}

/* Realtime Files Page Styles */
.realtime-files-page .page-header {
  margin-bottom: 2rem;
}

.realtime-files-page .page-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.realtime-files-page .page-actions .btn-funky {
  white-space: nowrap;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.file-card {
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--pro-bg-elevated);
}

.file-card:hover {
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 4px 12px rgba(47, 129, 247, 0.2);
  transform: translateY(-2px);
}

.file-card .file-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.file-card .file-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: var(--pro-text-primary);
  word-break: break-word;
}

.file-card .file-meta {
  font-size: 0.75rem;
  color: var(--pro-text-secondary);
}

#filesGridView .section-actions,
#filesListView .section-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#filesGridView .section-actions .btn-group,
#filesListView .section-actions .btn-group {
  display: flex;
}

#filesGridView .section-actions .btn-group button,
#filesListView .section-actions .btn-group button {
  border: 1px solid var(--pro-border-color);
  background: var(--pro-bg-elevated);
  color: var(--pro-text-primary);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

#filesGridView .section-actions .btn-group button:first-child,
#filesListView .section-actions .btn-group button:first-child {
  border-radius: 4px 0 0 4px;
}

#filesGridView .section-actions .btn-group button:last-child,
#filesListView .section-actions .btn-group button:last-child {
  border-radius: 0 4px 4px 0;
}

#filesGridView .section-actions .btn-group button.active,
#filesListView .section-actions .btn-group button.active {
  background: var(--user-accent, var(--pro-accent-primary));
  color: white;
  border-color: var(--user-accent, var(--pro-accent-primary));
}

#filesGridView .section-actions .btn-group button:hover:not(.active),
#filesListView .section-actions .btn-group button:hover:not(.active) {
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Select2 Funky 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 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-visible {
  border-color: var(--focus-ring-color) !important;
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color) !important;
  outline-offset: var(--focus-ring-offset) !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 {
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.funky-date-range input:focus-visible {
  border-color: var(--focus-ring-color);
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* Daterangepicker Dark Theme Overrides */
.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: 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 Styles */
.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;
}

.column-table-group h6 {
  color: var(--user-accent, var(--pro-accent-primary));
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.column-list {
  display: grid;
  gap: 6px;
}

.column-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.column-item:hover {
  background: var(--pro-bg-secondary);
  border-color: var(--user-accent, var(--pro-accent-primary));
  transform: translateX(4px);
}

.column-item code {
  color: var(--user-accent, var(--pro-accent-primary));
  font-size: 12px;
  font-weight: 600;
  background: transparent;
}

.column-item small {
  color: var(--pro-text-secondary);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Column Item Actions */
.column-item {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.column-item > div:first-child {
  flex: 1;
}

.column-item-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

/* .btn-xs moved to buttons.css */

.column-item small.d-block {
  margin-top: 2px;
  font-size: 9px;
}

/* Flash animation for inserted items */
@keyframes flashOrange {
  0%, 100% { background-color: transparent; }
  50% { background-color: rgba(255, 153, 0, 0.2); }
}

button#themeSwitcher {
    margin: 0;
}

/* ========================================
   WEBSOCKET CONNECTION STATUS BANNER
   ======================================== */
.ws-connection-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
  font-size: 14px;
  font-weight: 500;
  animation: slideInUp 0.3s ease-out;
  transition: background-color 0.3s ease, color 0.3s ease;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ws-connection-banner.error {
  background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
  color: white;
}

.ws-connection-banner.warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #212529;
}

.ws-connection-banner.info {
  background: linear-gradient(135deg, var(--pro-primary) 0%, #0056b3 100%);
  color: white;
}

.ws-connection-banner i {
  font-size: 18px;
}

.ws-connection-banner button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: inherit;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ws-connection-banner button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.ws-connection-banner .spinner-border {
  width: 18px;
  height: 18px;
  border-width: 2px;
}
