/* ===================================
   SlipStream Client Portal Design System
   Modern UI/UX Components & Variables
   =================================== */

/* CSS Custom Properties (Variables) */
:root {
  /* Primary Brand Colors */
  --ss-primary: #0D2129;
  --ss-primary-light: #1a3a47;
  --ss-primary-dark: #0a1b21;
  
  /* Secondary Colors */
  --ss-secondary: #6c757d;
  --ss-accent: #007bff;
  --ss-accent-light: #4dabf7;
  
  /* Status Colors */
  --ss-success: #AAFF00;
  --ss-success-dark: #8fd400;
  --ss-warning: #EC9339;
  --ss-warning-dark: #e67e22;
  --ss-danger: #EC3939;
  --ss-danger-dark: #c0392b;
  --ss-info: #17a2b8;
  
  /* Neutral Colors */
  --ss-white: #ffffff;
  --ss-gray-50: #f8f9fa;
  --ss-gray-100: #e9ecef;
  --ss-gray-200: #dee2e6;
  --ss-gray-300: #ced4da;
  --ss-gray-400: #adb5bd;
  --ss-gray-500: #6c757d;
  --ss-gray-600: #495057;
  --ss-gray-700: #343a40;
  --ss-gray-800: #212529;
  --ss-gray-900: #0a0c0f;
  
  /* Dark Mode Colors */
  --ss-dark-bg: #1a1d29;
  --ss-dark-surface: #242938;
  --ss-dark-border: #343a46;
  --ss-dark-text: #e9ecef;
  --ss-dark-text-muted: #adb5bd;
  
  /* Typography */
  --ss-font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ss-font-family-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, Consolas, monospace;
  
  /* Font Sizes */
  --ss-text-xs: 0.75rem;
  --ss-text-sm: 0.875rem;
  --ss-text-base: 1rem;
  --ss-text-lg: 1.125rem;
  --ss-text-xl: 1.25rem;
  --ss-text-2xl: 1.5rem;
  --ss-text-3xl: 1.875rem;
  --ss-text-4xl: 2.25rem;
  
  /* Font Weights */
  --ss-font-light: 300;
  --ss-font-normal: 400;
  --ss-font-medium: 500;
  --ss-font-semibold: 600;
  --ss-font-bold: 700;
  
  /* Line Heights */
  --ss-leading-none: 1;
  --ss-leading-tight: 1.25;
  --ss-leading-snug: 1.375;
  --ss-leading-normal: 1.5;
  --ss-leading-relaxed: 1.625;
  --ss-leading-loose: 2;
  
  /* Spacing Scale */
  --ss-space-1: 0.25rem;
  --ss-space-2: 0.5rem;
  --ss-space-3: 0.75rem;
  --ss-space-4: 1rem;
  --ss-space-5: 1.25rem;
  --ss-space-6: 1.5rem;
  --ss-space-8: 2rem;
  --ss-space-10: 2.5rem;
  --ss-space-12: 3rem;
  --ss-space-16: 4rem;
  --ss-space-20: 5rem;
  --ss-space-24: 6rem;
  
  /* Border Radius */
  --ss-radius-sm: 0.25rem;
  --ss-radius-md: 0.375rem;
  --ss-radius-lg: 0.5rem;
  --ss-radius-xl: 0.75rem;
  --ss-radius-2xl: 1rem;
  --ss-radius-full: 9999px;
  
  /* Shadows */
  --ss-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --ss-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --ss-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --ss-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --ss-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Transitions */
  --ss-transition-fast: 150ms ease-in-out;
  --ss-transition-base: 250ms ease-in-out;
  --ss-transition-slow: 350ms ease-in-out;
  
  /* Z-Index Scale */
  --ss-z-dropdown: 1000;
  --ss-z-sticky: 1020;
  --ss-z-fixed: 1030;
  --ss-z-modal-backdrop: 1040;
  --ss-z-modal: 1050;
  --ss-z-popover: 1060;
  --ss-z-tooltip: 1070;
  --ss-z-toast: 1080;
}

/* Dark Mode Variables */
[data-bs-theme="dark"] {
  --ss-bg-primary: var(--ss-dark-bg);
  --ss-bg-secondary: var(--ss-dark-surface);
  --ss-text-primary: var(--ss-dark-text);
  --ss-text-secondary: var(--ss-dark-text-muted);
  --ss-border-color: var(--ss-dark-border);
}

/* Light Mode Variables */
[data-bs-theme="light"], :root {
  --ss-bg-primary: var(--ss-white);
  --ss-bg-secondary: var(--ss-gray-50);
  --ss-text-primary: var(--ss-gray-900);
  --ss-text-secondary: var(--ss-gray-600);
  --ss-border-color: var(--ss-gray-200);
}

/* ===================================
   Base Typography
   =================================== */

body {
  font-family: var(--ss-font-family-sans);
  font-weight: var(--ss-font-normal);
  line-height: var(--ss-leading-normal);
  color: var(--ss-text-primary);
  background-color: var(--ss-bg-primary);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--ss-font-semibold);
  line-height: var(--ss-leading-tight);
  color: var(--ss-text-primary);
}

.ss-text-xs { font-size: var(--ss-text-xs); }
.ss-text-sm { font-size: var(--ss-text-sm); }
.ss-text-base { font-size: var(--ss-text-base); }
.ss-text-lg { font-size: var(--ss-text-lg); }
.ss-text-xl { font-size: var(--ss-text-xl); }
.ss-text-2xl { font-size: var(--ss-text-2xl); }
.ss-text-3xl { font-size: var(--ss-text-3xl); }
.ss-text-4xl { font-size: var(--ss-text-4xl); }

.ss-font-light { font-weight: var(--ss-font-light); }
.ss-font-normal { font-weight: var(--ss-font-normal); }
.ss-font-medium { font-weight: var(--ss-font-medium); }
.ss-font-semibold { font-weight: var(--ss-font-semibold); }
.ss-font-bold { font-weight: var(--ss-font-bold); }

/* ===================================
   Status Indicators (Improved)
   =================================== */

.ss-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--ss-space-2);
  padding: var(--ss-space-1) var(--ss-space-3);
  border-radius: var(--ss-radius-full);
  font-size: var(--ss-text-sm);
  font-weight: var(--ss-font-medium);
  transition: var(--ss-transition-fast);
}

.ss-status-online {
  color: var(--ss-success-dark);
  background-color: rgba(170, 255, 0, 0.1);
  border: 1px solid rgba(170, 255, 0, 0.2);
}

.ss-status-offline {
  color: var(--ss-danger-dark);
  background-color: rgba(236, 57, 57, 0.1);
  border: 1px solid rgba(236, 57, 57, 0.2);
}

.ss-status-warning {
  color: var(--ss-warning-dark);
  background-color: rgba(236, 147, 57, 0.1);
  border: 1px solid rgba(236, 147, 57, 0.2);
}

.ss-status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--ss-radius-full);
  flex-shrink: 0;
}

.ss-status-online .ss-status-dot {
  background-color: var(--ss-success);
  box-shadow: 0 0 0 2px rgba(170, 255, 0, 0.2);
}

.ss-status-offline .ss-status-dot {
  background-color: var(--ss-danger);
  box-shadow: 0 0 0 2px rgba(236, 57, 57, 0.2);
}

.ss-status-warning .ss-status-dot {
  background-color: var(--ss-warning);
  box-shadow: 0 0 0 2px rgba(236, 147, 57, 0.2);
}

/* ===================================
   Modern Cards
   =================================== */

.ss-card {
  background: var(--ss-bg-primary);
  border: 1px solid var(--ss-border-color);
  border-radius: var(--ss-radius-xl);
  box-shadow: var(--ss-shadow-sm);
  transition: var(--ss-transition-base);
  overflow: hidden;
}

.ss-card:hover {
  box-shadow: var(--ss-shadow-md);
  transform: translateY(-1px);
}

.ss-card-header {
  padding: var(--ss-space-6);
  border-bottom: 1px solid var(--ss-border-color);
  background: var(--ss-bg-secondary);
}

.ss-card-body {
  padding: var(--ss-space-6);
}

.ss-card-footer {
  padding: var(--ss-space-6);
  border-top: 1px solid var(--ss-border-color);
  background: var(--ss-bg-secondary);
}

/* Card Variants */
.ss-card-gradient {
  background: linear-gradient(135deg, var(--ss-primary) 0%, var(--ss-primary-light) 100%);
  color: var(--ss-white);
  border: none;
}

.ss-card-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===================================
   Widget System
   =================================== */

.ss-widget {
  background: var(--ss-bg-primary);
  border: 1px solid var(--ss-border-color);
  border-radius: var(--ss-radius-lg);
  box-shadow: var(--ss-shadow-sm);
  transition: var(--ss-transition-base);
  overflow: hidden;
}

.ss-widget:hover {
  box-shadow: var(--ss-shadow-md);
}

.ss-widget-header {
  padding: var(--ss-space-4) var(--ss-space-6);
  border-bottom: 1px solid var(--ss-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ss-widget-title {
  font-size: var(--ss-text-lg);
  font-weight: var(--ss-font-semibold);
  color: var(--ss-text-primary);
  margin: 0;
}

.ss-widget-body {
  padding: var(--ss-space-6);
}

.ss-widget-stat {
  text-align: center;
}

.ss-widget-stat-value {
  font-size: var(--ss-text-3xl);
  font-weight: var(--ss-font-bold);
  color: var(--ss-primary);
  margin-bottom: var(--ss-space-1);
}

.ss-widget-stat-label {
  font-size: var(--ss-text-sm);
  color: var(--ss-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===================================
   Modern Buttons
   =================================== */

.ss-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ss-space-2);
  padding: var(--ss-space-3) var(--ss-space-6);
  border: 1px solid transparent;
  border-radius: var(--ss-radius-md);
  font-size: var(--ss-text-sm);
  font-weight: var(--ss-font-medium);
  text-decoration: none;
  transition: var(--ss-transition-fast);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.ss-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--ss-shadow-md);
}

.ss-btn:active {
  transform: translateY(0);
}

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

.ss-btn-primary:hover {
  background-color: var(--ss-primary-dark);
  color: var(--ss-white);
}

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

.ss-btn-secondary:hover {
  background-color: var(--ss-gray-200);
}

.ss-btn-success {
  background-color: var(--ss-success);
  color: var(--ss-gray-900);
}

.ss-btn-success:hover {
  background-color: var(--ss-success-dark);
}

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

.ss-btn-ghost:hover {
  background-color: var(--ss-bg-secondary);
  color: var(--ss-text-primary);
}

/* Button Sizes */
.ss-btn-sm {
  padding: var(--ss-space-2) var(--ss-space-4);
  font-size: var(--ss-text-xs);
}

.ss-btn-lg {
  padding: var(--ss-space-4) var(--ss-space-8);
  font-size: var(--ss-text-base);
}

/* ===================================
   Navigation Improvements
   =================================== */

.ss-topnav {
  background: var(--ss-primary);
  border-bottom: 1px solid var(--ss-primary-light);
  box-shadow: var(--ss-shadow-md);
  position: sticky;
  top: 0;
  z-index: var(--ss-z-sticky);
}

.ss-nav-tabs {
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 20px;
  padding: 0;
  background: transparent;
}

.ss-nav-tab {
  padding: 10px 0;
  color: #64748b;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}

.ss-nav-tab:hover {
  color: #0ea5e9;
  background: transparent;
}

.ss-nav-tab.active {
  color: #0ea5e9;
  border-bottom-color: #0ea5e9;
}

/* ===================================
   Form Elements
   =================================== */

.ss-form-group {
  margin-bottom: var(--ss-space-6);
}

.ss-form-label {
  display: block;
  margin-bottom: var(--ss-space-2);
  font-size: var(--ss-text-sm);
  font-weight: var(--ss-font-medium);
  color: var(--ss-text-primary);
}

.ss-form-input {
  width: 100%;
  padding: var(--ss-space-3) var(--ss-space-4);
  border: 1px solid var(--ss-border-color);
  border-radius: var(--ss-radius-md);
  font-size: var(--ss-text-base);
  transition: var(--ss-transition-fast);
  background-color: var(--ss-bg-primary);
  color: var(--ss-text-primary);
}

.ss-form-input:focus {
  outline: none;
  border-color: var(--ss-primary);
  box-shadow: 0 0 0 3px rgba(13, 33, 41, 0.1);
}

/* ===================================
   Utility Classes
   =================================== */

.ss-text-muted { color: var(--ss-text-secondary); }
.ss-text-success { color: var(--ss-success-dark); }
.ss-text-warning { color: var(--ss-warning-dark); }
.ss-text-danger { color: var(--ss-danger-dark); }

.ss-bg-gradient {
  background: linear-gradient(135deg, var(--ss-primary) 0%, var(--ss-primary-light) 100%);
}

.ss-rounded-sm { border-radius: var(--ss-radius-sm); }
.ss-rounded-md { border-radius: var(--ss-radius-md); }
.ss-rounded-lg { border-radius: var(--ss-radius-lg); }
.ss-rounded-xl { border-radius: var(--ss-radius-xl); }
.ss-rounded-2xl { border-radius: var(--ss-radius-2xl); }
.ss-rounded-full { border-radius: var(--ss-radius-full); }

.ss-shadow-sm { box-shadow: var(--ss-shadow-sm); }
.ss-shadow-md { box-shadow: var(--ss-shadow-md); }
.ss-shadow-lg { box-shadow: var(--ss-shadow-lg); }

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
  .ss-card-body,
  .ss-widget-body {
    padding: var(--ss-space-4);
  }
  
  .ss-nav-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .ss-nav-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .ss-btn {
    padding: var(--ss-space-3) var(--ss-space-4);
    font-size: var(--ss-text-sm);
  }
}

/* ===================================
   Animation Classes
   =================================== */

.ss-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.ss-slide-up {
  animation: slideUp 0.3s ease-in-out;
}

.ss-pulse {
  animation: pulse 2s infinite;
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===================================
   Dark Mode Toggle
   =================================== */

.ss-theme-toggle {
  position: fixed;
  top: var(--ss-space-4);
  right: var(--ss-space-4);
  z-index: var(--ss-z-fixed);
  width: 40px;
  height: 40px;
  border-radius: var(--ss-radius-full);
  background: var(--ss-bg-primary);
  border: 1px solid var(--ss-border-color);
  box-shadow: var(--ss-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--ss-transition-fast);
}

/* ===================================
   Premium CRM Enhancements
   =================================== */

/* Modern Table Styles */
.ss-table-modern {
  border-collapse: separate;
  border-spacing: 0 var(--ss-space-2);
}

.ss-table-modern thead th {
  border-bottom: none;
  font-size: var(--ss-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ss-text-secondary);
  padding: var(--ss-space-3) var(--ss-space-4);
}

.ss-table-modern tbody tr {
  background: var(--ss-bg-primary);
  box-shadow: var(--ss-shadow-sm);
  transition: all var(--ss-transition-base);
}

.ss-table-modern tbody tr:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: var(--ss-shadow-md);
  z-index: 1;
  position: relative;
}

.ss-table-modern td {
  border: none;
  padding: var(--ss-space-4);
  vertical-align: middle;
}

.ss-table-modern td:first-child {
  border-top-left-radius: var(--ss-radius-lg);
  border-bottom-left-radius: var(--ss-radius-lg);
}

.ss-table-modern td:last-child {
  border-top-right-radius: var(--ss-radius-lg);
  border-bottom-right-radius: var(--ss-radius-lg);
}

/* Glassmorphism Utilities */
.ss-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .ss-glass {
  background: rgba(26, 29, 41, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Premium Gradients */
.ss-text-gradient {
  background: linear-gradient(135deg, var(--ss-primary) 0%, var(--ss-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Modern Badges */
.ss-badge {
  padding: 0.35em 0.8em;
  font-size: 0.75em;
  font-weight: 600;
  border-radius: 6px;
  letter-spacing: 0.025em;
}

/* Avatar Stack */
.ss-avatar-group {
  display: flex;
  align-items: center;
}

.ss-avatar-group .avatar {
  border: 2px solid var(--ss-bg-primary);
  margin-left: -0.75rem;
  transition: transform 0.2s;
}

.ss-avatar-group .avatar:first-child {
  margin-left: 0;
}

.ss-avatar-group .avatar:hover {
  transform: translateY(-2px);
  z-index: 2;
}

/* Search Input Modern */
.ss-search-modern {
  background: var(--ss-bg-secondary);
  border: 1px solid transparent;
  padding-left: 2.5rem;
  transition: all 0.3s ease;
}

.ss-search-modern:focus {
  background: var(--ss-bg-primary);
  border-color: var(--ss-accent);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

/* Floating Action Button */
.ss-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--ss-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--ss-shadow-lg);
  transition: transform 0.2s;
  z-index: 100;
}

.ss-fab:hover {
  transform: scale(1.1) rotate(90deg);
}
.dataTables_processing {
    font-size: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    position: absolute !important;
    z-index: 9999 !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: none !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
}

.dataTables_processing[style*="display: block"] {
    display: flex !important;
}

.dataTables_processing:after {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    display: block;
    animation: spinner 0.75s linear infinite;
}

.dataTables_wrapper {
    position: relative;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

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

/* ===================================
   Global DataTable Footer Styles
   =================================== */

.dt-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "info pager length";
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    font-size: 13px;
    color: #9aa3bd;
}
.dt-footer-info {
    grid-area: info;
    justify-self: start;
    align-self: center;
    color: #9aa3bd;
    font-size: 13px;
    padding: 0 !important;
}
.dt-footer-info .dataTables_info {
    margin: 0 !important;
    padding: 0 !important;
    color: #9aa3bd;
    font-size: 13px;
}
.dt-footer-paging {
    grid-area: pager;
    display: flex;
    justify-content: center;
    min-width: 0;
    padding: 0 !important;
}
.dt-footer-paging .dataTables_paginate {
    margin: 0 !important;
    padding: 0 !important;
}
.dt-footer-paging.is-hidden {
    display: none !important;
}
.dt-footer-paging .dataTables_paginate .paginate_button,
.dt-footer-paging .dataTables_paginate .page-item .page-link {
    padding: 4px 6px !important;
  
    border-radius: 8px !important;
    margin: 0 1px !important;
    border: none !important;
    font-size: 13px !important;
    color: #64748b !important;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    line-height: 1.4 !important;
    min-width: auto !important;
    box-shadow: none !important;
}
.dt-footer-paging .dataTables_paginate .paginate_button.current,
.dt-footer-paging .dataTables_paginate .page-item.active .page-link {
    background: #0ea5e9 !important;
    color: #fff !important;
}
.dt-footer-paging .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled),
.dt-footer-paging .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
.dt-footer-paging .dataTables_paginate .paginate_button.disabled,
.dt-footer-paging .dataTables_paginate .page-item.disabled .page-link {
    color: #94a3b8 !important;
    cursor: default;
    background: #f1f5f9 !important;
}
.dt-footer-length {
    grid-area: length;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 13px;
    color: #9aa3bd;
    padding: 0 !important;
}
.dt-footer-length .dataTables_length {
    margin: 0 !important;
    padding: 0 !important;
}
.dt-footer-length .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    color: #9aa3bd;
    font-size: 13px;
    font-weight: 500;
}
.dt-footer-length .dataTables_length select {
    min-height: 38px;
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid #d9dadd;
    background: #fff;
    color: #8f98b2;
    font-size: 13px;
    box-shadow: none;
}

@media (max-width: 767.98px) {
    .dt-footer {
        grid-template-columns: 1fr;
        grid-template-areas:
            "pager"
            "info"
            "length";
    }
    .dt-footer-info,
    .dt-footer-length {
        justify-self: center;
    }
}


/* ===================================
   Global UI Consistency Overrides
   Applied to all pages automatically
   =================================== */

/* --- Form Controls --- */
.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    padding: 8px 12px;
    color: #0f172a;
    background-color: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus,
.form-select:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background-color: #fff;
}
.form-control::placeholder {
    color: #94a3b8;
    font-size: 13px;
}
.form-label {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 4px;
}
.form-check-input {
    border-radius: 4px;
}
.form-check-input:checked {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
}
textarea.form-control {
    border-radius: 10px;
}

/* --- Buttons --- */
.btn {
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.15s;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
}
.btn-primary {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
}
.btn-primary:hover {
    background-color: #0284c7;
    border-color: #0284c7;
}
.btn-light {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}
.btn-light:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}
.btn-outline-secondary {
    border-radius: 8px;
    font-size: 13px;
}
.btn-outline-danger {
    border-radius: 8px;
}

/* --- Cards --- */
.card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.05);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 16px 16px 0 0 !important;
    padding: 16px 20px;
}
.card-body {
    padding: 20px;
}
.card-footer {
    background: #fff;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 16px 16px !important;
}

/* --- Tables --- */
.table {
    font-size: 14px;
    color: #0f172a;
}
.table thead th {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    border-top: none;
    letter-spacing: 0.02em;
}
.table thead th:first-child,
.table tbody td:first-child {
    padding-left: 20px !important;
}
.table thead th:last-child,
.table tbody td:last-child {
    padding-right: 20px !important;
}
.table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
.table tbody tr:hover {
    background: #f8fafc;
}
.table-responsive {
    overflow-x: auto !important;
}

/* --- Badges --- */
.badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}
.badge.rounded-pill {
    border-radius: 50rem;
}

/* --- Dropdowns --- */
.dropdown-menu {
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 6px;
    font-size: 14px;
}
.dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #334155;
    transition: background 0.1s;
}
.dropdown-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.dropdown-item i {
    font-size: 14px;
}

/* --- Modals --- */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}
.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 20px;
}
.modal-body {
    padding: 20px;
}
.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 16px 20px;
}

/* --- Nav Tabs --- */
.nav-tabs {
    border-bottom: 1px solid #e2e8f0;
    gap: 20px;
    margin-bottom: 20px;
}
.nav-tabs .nav-item {
    margin-bottom: -1px;
}
.nav-tabs .nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 0;
    border-radius: 0;
    background: transparent;
    transition: color 0.15s, border-color 0.15s;
}
.nav-tabs .nav-link:hover {
    color: #0ea5e9;
    border-color: transparent;
    background: transparent;
}
.nav-tabs .nav-link.active {
    color: #0ea5e9;
    border-bottom-color: #0ea5e9;
    background: transparent;
}

/* --- Filter Tabs (ticket-filter-btn) --- */
.tab-bar {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.ticket-filter-btn {
    padding: 10px 0;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    display: inline-block;
    margin-bottom: -1px;
}
.ticket-filter-btn:hover {
    color: #0ea5e9;
}
.ticket-filter-btn.active {
    color: #0ea5e9;
    border-bottom-color: #0ea5e9;
    background: transparent;
}
.ticket-filter-btn.active .badge {
    background: #0ea5e9 !important;
    color: #fff;
}

/* --- Alerts --- */
.alert {
    border-radius: 12px;
    font-size: 14px;
    border: none;
}

/* --- Pagination (non-DataTable) --- */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    font-size: 13px;
    border: none;
    color: #64748b;
    padding: 6px 10px;
}
.pagination .page-item.active .page-link {
    background: #0ea5e9;
    color: #fff;
}

/* --- Input Groups --- */
.input-group-text {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
}
.input-group > .form-control:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group > .input-group-text:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* --- Header --- */
.header-title {
    font-size: 28px;
    font-weight: 600;
    color: #0f172a;
}

/* Remove header-body bottom padding when tab-bar is inside */
.header .header-body {
    border-bottom: none;
    padding-top: 0.5rem;
    padding-bottom: 0;
}

/* Ensure tab-bar inside header has no extra top margin and proper bottom spacing */
.header .tab-bar {
    margin-top: 0.75rem;
    margin-bottom: 0;
}
.header .nav-tabs {
    margin-bottom: 0;
}

/* --- Avatar --- */
.avatar {
    border-radius: 50%;
}
.avatar-img {
    border-radius: 50%;
}

/* --- List Group --- */
.list-group-item {
    border-color: #f1f5f9;
    font-size: 14px;
}

/* --- Tooltips --- */
.tooltip-inner {
    border-radius: 8px;
    font-size: 13px;
}

/* --- Form Switch --- */
.form-switch .form-check-input {
    border-radius: 50rem;
}

/* --- DataTable native search hide helper --- */
.dataTables_filter {
    display: none;
}


/* ===================================
   Global Page Background & Form Pages
   Auto-applied to all pages
   =================================== */

/* Light gray background for main content area */
.main-content {
    background-color: #edf2f9 !important;
    min-height: 100vh;
}

/* Header area styling */
.header {
    background-color: transparent;
    margin-bottom: 0;
}

/* Form page section cards - used on create/edit pages */
.section-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: none;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.05);
}
.section-card .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}
.section-card .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #12263f;
    margin-bottom: 0;
}

/* Field label and group - consistent across all forms */
.field-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
    display: block;
}
.field-group {
    margin-bottom: 1rem;
}

/* Back button link style */
.btn-back-link {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    transition: background 0.15s;
}
.btn-back-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Page header band - aligned with content */
.page-header-band {
    background-color: transparent !important;
    padding: 0 0 0.75rem 0 !important;
    margin: 0 !important;
}
.page-header-inner {
    max-width: 880px;
    margin: 0 auto;
}
.page-header-band .header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #12263f;
    margin-bottom: 0;
}

/* Table section card - used on list/index pages */
.table-section-card {
    background: #fff;
    border-radius: 16px;
    border: none;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
}
.table-section-card .dataTables_filter {
    display: none;
}
.table-section-card .table {
    width: 100% !important;
    border-collapse: collapse;
    font-size: 14px;
    color: #0f172a;
}
.table-section-card .table thead th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    border-top: none;
    font-weight: 600;
}
.table-section-card .table thead th:first-child,
.table-section-card .table tbody td:first-child {
    padding-left: 20px !important;
}
.table-section-card .table thead th:last-child,
.table-section-card .table tbody td:last-child {
    padding-right: 20px !important;
}
.table-section-card .table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
}
.table-section-card .table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}
.table-section-card .table tbody tr:hover {
    background: #f8fafc;
}

/* Toolbar input style for table filters */
.toolbar-input {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 13px;
    flex-shrink: 0;
    outline: none;
    transition: border-color 0.15s;
}
.toolbar-input:focus {
    border-color: #0ea5e9;
    background: #fff;
}


/* ===================================
   Index/List Page Spacing
   Consistent header-to-content gap
   =================================== */

/* Add top padding to main content so header doesn't sit flush */
.main-content {
    padding-top: 1.5rem !important;
}

/* Header spacing */
.main-content .header {
    margin-bottom: 1.25rem;
}
.main-content .header:has(.tab-bar),
.main-content .header:has(.nav-tabs) {
    margin-bottom: 0;
}
.main-content .header .header-body {
    padding-top: 0.5rem;
    padding-bottom: 0;
}

/* Ensure cards/tables below header have proper gap */
.main-content .header + .card,
.main-content .header + .table-section-card,
.main-content .header + .tab-content,
.main-content .header + .section-card,
.main-content .header + form {
    margin-top: 0.25rem;
}

/* Remove old mt-md-5 override - too much top space */
.main-content .header.mt-md-5 {
    margin-top: 1rem !important;
}

/* ===================================
   Global Table Side Padding
   Ensures all tables have consistent
   left/right padding on first/last columns
   =================================== */

thead th:first-child,
tbody td:first-child,
tfoot td:first-child {
    padding-left: 20px !important;
}
thead th:last-child,
tbody td:last-child,
tfoot td:last-child {
    padding-right: 20px !important;
}
