/* Modern Dashboard Styles */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Font Awesome Icon Fixes */
.fas, .far, .fab, .fa {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
  font-weight: 900;
}

/* Ensure icons don't show as boxes */
.fa:before {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
  font-weight: 900;
}

/* Icon size adjustments */
.metric-icon .fas {
  font-size: 1.5rem;
}

.status-icon .fas {
  font-size: 1.2rem;
}

.financial-icon .fas {
  font-size: 1.2rem;
}

.card-icon img {
  width: 30px;
  height: 30px;
}

/* Icon loading and display fixes */
.fas, .far, .fab {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
  font-weight: 900;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Ensure icons are visible */
.fa:before {
  font-family: inherit;
  font-weight: inherit;
}

/* Icon size classes */
.fa-lg { font-size: 1.33333em; }
.fa-2x { font-size: 2em; }
.fa-3x { font-size: 3em; }

/* Specific icon fixes */
.fa-calendar-days:before { content: "\f073"; }
.fa-clock:before { content: "\f017"; }
.fa-users:before { content: "\f0c0"; }
.fa-truck:before { content: "\f0d1"; }
.fa-shopping-cart:before { content: "\f07a"; }
.fa-dollar-sign:before { content: "\f155"; }
.fa-check-circle:before { content: "\f058"; }
.fa-truck-ramp-box:before { content: "\f4de"; }
.fa-check-double:before { content: "\f560"; }
.fa-times-circle:before { content: "\f057"; }
.fa-chart-line:before { content: "\f201"; }
.fa-clock:before { content: "\f017"; }
.fa-check-circle:before { content: "\f058"; }
.fa-money-bill-wave:before { content: "\f53a"; }
.fa-arrow-up:before { content: "\f062"; }
.fa-arrow-down:before { content: "\f063"; }
.fa-minus:before { content: "\f068"; }
.dashboard-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.dashboard-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-subtitle {
  font-size: 1.1rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.dashboard-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 25px;
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
}

.header-actions {
  text-align: left;
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-primary-modern, .btn-success-modern {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary-modern {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-primary-modern:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-success-modern {
  background: rgba(46, 204, 113, 0.9);
  color: white;
}

.btn-success-modern:hover {
  background: rgba(46, 204, 113, 1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 204, 113, 0.3);
}

/* Metrics Overview */
.metrics-overview {
  margin-bottom: 40px;
}

.metric-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.primary-metric::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.success-metric::before { background: linear-gradient(90deg, #2ecc71, #27ae60); }
.warning-metric::before { background: linear-gradient(90deg, #f39c12, #e67e22); }
.info-metric::before { background: linear-gradient(90deg, #3498db, #2980b9); }

.metric-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  position: relative;
}

.primary-metric .metric-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.success-metric .metric-icon {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
}

.warning-metric .metric-icon {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
}

.info-metric .metric-icon {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.metric-content h3 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #2c3e50;
}

.metric-content p {
  color: #7f8c8d;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.metric-trend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
}

.metric-trend.positive {
  color: #27ae60;
}

.metric-trend.negative {
  color: #e74c3c;
}

.metric-trend.neutral {
  color: #95a5a6;
}

/* Statistics Grid */
.statistics-grid {
  margin-top: 30px;
}

.stats-section {
  background: white;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
}

.section-header-modern h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
}

.section-header-modern p {
  color: #7f8c8d;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.stats-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.stats-card:hover {
  background: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-icon img {
  width: 30px;
  height: 30px;
}

.card-content h5 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
}

.card-content p {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0;
}

/* Order Status Grid */
.order-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.status-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.status-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

.accepted .status-icon { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.pickup .status-icon { background: linear-gradient(135deg, #f39c12, #e67e22); }
.completed .status-icon { background: linear-gradient(135deg, #3498db, #2980b9); }
.cancelled .status-icon { background: linear-gradient(135deg, #e74c3c, #c0392b); }

.status-content h5 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
}

.status-content p {
  color: #7f8c8d;
  font-size: 0.85rem;
  margin: 0;
}

/* Financial Overview */
.financial-overview {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  height: fit-content;
}

.financial-cards {
  margin-bottom: 30px;
}

.financial-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.financial-card:hover {
  background: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.financial-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 15px;
}

.revenue .financial-icon { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.pending-payout .financial-icon { background: linear-gradient(135deg, #f39c12, #e67e22); }
.completed-payout .financial-icon { background: linear-gradient(135deg, #3498db, #2980b9); }

.financial-content h5 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
}

.financial-content p {
  color: #7f8c8d;
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #ecf0f1;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.revenue .progress-fill { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.pending-payout .progress-fill { background: linear-gradient(90deg, #f39c12, #e67e22); }
.completed-payout .progress-fill { background: linear-gradient(90deg, #3498db, #2980b9); }

/* Quick Actions */
.quick-actions h6 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  color: #2c3e50;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.action-item:hover {
  background: #667eea;
  color: white;
  transform: translateX(5px);
}

.action-item i {
  width: 16px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-header {
    padding: 30px 20px;
  }

  .dashboard-title {
    font-size: 2rem;
  }

  .action-buttons {
    justify-content: center;
  }

  .stats-cards-grid {
    grid-template-columns: 1fr;
  }

  .order-status-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    padding: 20px;
  }

  .metric-content h3 {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .dashboard-stats {
    justify-content: center;
  }

  .header-actions {
    text-align: center;
    margin-top: 20px;
  }

  .btn-primary-modern, .btn-success-modern {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.metric-card, .stats-section, .financial-overview {
  animation: fadeInUp 0.6s ease-out;
}

.metric-card:nth-child(1) { animation-delay: 0.1s; }
.metric-card:nth-child(2) { animation-delay: 0.2s; }
.metric-card:nth-child(3) { animation-delay: 0.3s; }
.metric-card:nth-child(4) { animation-delay: 0.4s; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Override any existing dashboard styles */
.page-body {
  background: #f8f9fa;
  min-height: 100vh;
}

.container-fluid {
  padding: 0 20px;
}

/* Ensure proper spacing and layout */
.dashboard-header .row {
  align-items: center;
}

.dashboard-header .col-lg-8,
.dashboard-header .col-lg-4 {
  padding: 0 15px;
}

/* Fix page layout and prevent horizontal overflow */
.page-wrapper {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.page-body-wrapper {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.page-body {
  background: #f8f9fa;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.container-fluid {
  padding: 0 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Fix for RTL layout */
[dir="rtl"] .header-actions {
  text-align: right;
}

[dir="rtl"] .action-buttons {
  justify-content: flex-start;
}

[dir="rtl"] .action-item:hover {
  transform: translateX(-5px);
}

/* Card hover effects */
.stats-card,
.status-card,
.financial-card {
  cursor: pointer;
}

/* Loading animation */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.metric-card:hover .metric-icon {
  animation: pulse 1s infinite;
}

/* Gradient text effects */
.dashboard-title {
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced shadows */
.stats-section,
.financial-overview {
  box-shadow: 0 10px 30px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.1);
}

/* Button focus states */
.btn-primary-modern:focus,
.btn-success-modern:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Improved mobile responsiveness */
@media (max-width: 992px) {
  .dashboard-header {
    padding: 30px 20px;
  }

  .dashboard-title {
    font-size: 2rem;
    text-align: center;
  }

  .dashboard-subtitle {
    text-align: center;
  }

  .header-actions {
    margin-top: 20px;
  }

  .action-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .container-fluid {
    padding: 0 15px;
  }

  .page-wrapper,
  .page-body-wrapper,
  .page-body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .stats-cards-grid,
  .order-status-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .metric-card {
    margin-bottom: 15px;
  }
}

@media (max-width: 576px) {
  .stats-cards-grid,
  .order-status-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .stat-badge {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Analytics Page Specific Styles */
.analytics-overview {
  margin-bottom: 40px;
}

.year-selector {
  text-align: left;
}

.year-form {
  margin: 0;
}

.year-selector-wrapper {
  position: relative;
  display: inline-block;
}

.year-selector-wrapper i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #667eea;
  z-index: 2;
}

.modern-year-select {
  padding: 12px 20px 12px 45px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  border: 2px solid #667eea;
  background: white;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 150px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.modern-year-select:hover {
  border-color: #5a6fd8;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.modern-year-select:focus {
  outline: none;
  border-color: #5a6fd8;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Charts Grid */
.charts-grid {
  margin-top: 30px;
}

.chart-section {
  background: white;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
}

.chart-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 25px;
}

.chart-card {
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.chart-header {
  padding: 20px 25px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.chart-header h5, .chart-header h6 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-header h5 i, .chart-header h6 i {
  color: #667eea;
  font-size: 1.1rem;
}

.chart-body {
  padding: 25px;
  background: white;
}

.chart-body canvas {
  max-height: 300px;
  width: 100% !important;
}

/* Analytics Sidebar */
.analytics-sidebar {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  height: fit-content;
}

.analytics-sidebar .chart-card.compact {
  margin-bottom: 20px;
}

.analytics-sidebar .chart-card.compact .chart-header {
  padding: 15px 20px;
}

.analytics-sidebar .chart-card.compact .chart-body {
  padding: 20px;
}

.analytics-sidebar .chart-card.compact .chart-body canvas {
  max-height: 200px;
}

/* Location Charts Grid */
.location-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

/* Performance Charts Grid */
.performance-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

/* Detailed Charts Grid */
.detailed-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 25px;
}

/* Chart.js Custom Styles */
.chartjs-render-monitor {
  border-radius: 8px !important;
}

/* Responsive Design for Charts */
@media (max-width: 1200px) {
  .chart-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .location-charts-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .performance-charts-grid {
    grid-template-columns: 1fr;
  }

  .detailed-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .chart-section {
    padding: 20px;
  }

  .chart-container {
    gap: 15px;
  }

  .chart-header {
    padding: 15px 20px;
  }

  .chart-body {
    padding: 20px;
  }

  .location-charts-grid,
  .performance-charts-grid,
  .detailed-charts-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .analytics-sidebar {
    margin-top: 30px;
  }
}

@media (max-width: 576px) {
  .year-selector {
    text-align: center;
    margin-top: 20px;
  }

  .modern-year-select {
    width: 100%;
    max-width: none;
  }

  .chart-header h5, .chart-header h6 {
    font-size: 0.9rem;
  }

  .chart-body canvas {
    max-height: 250px;
  }
}

/* Chart Loading Animation */
.chart-card {
  position: relative;
}

.chart-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.chart-card.loading::before {
  opacity: 0.8;
}

/* Custom Chart Colors */
:root {
  --chart-primary: #667eea;
  --chart-secondary: #764ba2;
  --chart-success: #27ae60;
  --chart-warning: #f39c12;
  --chart-danger: #e74c3c;
  --chart-info: #3498db;
}

/* Chart Tooltips Enhancement */
.chartjs-tooltip {
  background: rgba(0, 0, 0, 0.8) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  font-family: 'Cairo', sans-serif !important;
}

/* Print Styles for Charts */
@media print {
  .chart-section,
  .analytics-sidebar {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }

  .chart-card {
    break-inside: avoid;
  }
}

/* ===== OWNERLIST PAGE STYLES ===== */

/* Owner Management Header */
.owner-management-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.owner-management-header .welcome-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.owner-management-header .welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.commission-note {
  background: rgba(255,255,255,0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

/* ===========================================
   STATE FORM HEADER - ANIMATED GRADIENT
   =========================================== */

.state-form-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.state-form-header .welcome-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.state-form-header .welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.state-form-header .commission-note {
  background: rgba(255,255,255,0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.state-form-header .page-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.state-form-header .stat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.state-form-header .header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.state-form-header .action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===========================================
   COUNTRY CODE LIST HEADER - ANIMATED GRADIENT
   =========================================== */

.country-code-list-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.country-code-list-header .welcome-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.country-code-list-header .welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.country-code-list-header .commission-note {
  background: rgba(255,255,255,0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.country-code-list-header .page-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.country-code-list-header .stat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.country-code-list-header .header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.country-code-list-header .action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===========================================
   COUNTRY CODE FORM HEADER - ANIMATED GRADIENT
   =========================================== */

.country-code-form-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.country-code-form-header .welcome-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.country-code-form-header .welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.country-code-form-header .commission-note {
  background: rgba(255,255,255,0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.country-code-form-header .page-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.country-code-form-header .stat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.country-code-form-header .header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.country-code-form-header .action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Country Code Form Layout Fixes */
.country-code-form-header {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.country-code-form-header .welcome-section,
.country-code-form-header .page-stats,
.country-code-form-header .header-actions {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure form sections don't overflow */
.form-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-section .row {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

/* Fix grid layout issues */
.col-lg-8, .col-lg-4, .col-md-12, .col-12 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 15px;
  padding-right: 15px;
}

/* Modern card layout fixes */
.modern-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.modern-card .card-body {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Owner Statistics Cards */
.owner-stats-section {
  margin-bottom: 2rem;
}

.stats-card-modern {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  height: 100%;
}

.stats-card-modern:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stats-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.stats-card-modern:nth-child(1) .stats-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.stats-card-modern:nth-child(2) .stats-icon {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
}

.stats-card-modern:nth-child(3) .stats-icon {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}

.stats-card-modern:nth-child(4) .stats-icon {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
  color: white;
}

.stats-card-modern:nth-child(5) .stats-icon {
  background: linear-gradient(135deg, #fa709a, #fee140);
  color: white;
}

.stats-card-modern:nth-child(6) .stats-icon {
  background: linear-gradient(135deg, #a8edea, #fed6e3);
  color: white;
}

.stats-content h4 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.stats-content p {
  color: #7f8c8d;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stats-trend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #27ae60;
}

.stats-trend i {
  font-size: 1rem;
}

/* Commission Badge */
.commission-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
}

/* Owner Info Display */
.owner-info-display {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.owner-avatar {
  flex-shrink: 0;
}

.owner-details h5 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.owner-details p {
  color: #7f8c8d;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Modern Table Styles */
.table-responsive-modern {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}

.modern-table {
  width: 100%;
  margin: 0;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
  background-image: none !important;
}

.modern-table thead th {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1rem;
  font-weight: 600;
  border: none;
  text-align: center;
  font-size: 0.9rem;
}

.modern-table thead th i {
  margin-right: 0.5rem;
  opacity: 0.9;
}

.modern-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
  vertical-align: middle;
}

.modern-table tbody tr:hover {
  background-color: #f8f9fa;
}

.user-avatar-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-image-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #667eea;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.status-badge.status-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-badge.status-danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-badge.status-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-badge.status-info {
  background: linear-gradient(135deg, #d1ecf1, #bee5eb);
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.status-badge.status-primary {
  background: linear-gradient(135deg, #cce5ff, #b3d7ff);
  color: #004085;
  border: 1px solid #b3d7ff;
}

.status-badge.status-secondary {
  background: linear-gradient(135deg, #e2e3e5, #d6d8db);
  color: #383d41;
  border: 1px solid #d6d8db;
}

.status-badge.cursor-pointer {
  cursor: pointer;
}

.status-badge.cursor-pointer:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
  .owner-management-header {
    padding: 1.5rem;
  }

  .owner-management-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .owner-info-display {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .page-stats {
    justify-content: center;
  }

  .header-actions {
    justify-content: center;
    margin-top: 1rem;
  }

  .action-buttons {
    justify-content: center;
  }

  .stats-card-modern {
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .modern-table thead th,
  .modern-table tbody td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .avatar-image-small {
    width: 35px;
    height: 35px;
  }

  .commission-note {
    font-size: 0.85rem;
    padding: 0.75rem;
  }
}

/* ===== USERLIST PAGE STYLES ===== */

/* User Management Header */
.user-management-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.user-management-header .welcome-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.user-management-header .welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.page-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Statistics Cards */
.user-stats-section {
  margin-bottom: 2rem;
}

.stats-card-modern {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  height: 100%;
}

.stats-card-modern:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stats-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.stats-card-modern:nth-child(1) .stats-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.stats-card-modern:nth-child(2) .stats-icon {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
}

.stats-card-modern:nth-child(3) .stats-icon {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}

.stats-card-modern:nth-child(4) .stats-icon {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
  color: white;
}

.stats-content h4 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.stats-content p {
  color: #7f8c8d;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stats-trend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #27ae60;
}

.stats-trend i {
  font-size: 1rem;
}

/* Main Content Card */
.main-content-section {
  margin-bottom: 2rem;
}

.content-card-modern {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
  overflow: hidden;
}

.card-header-modern {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 1.5rem;
  border-bottom: 1px solid #dee2e6;
}

.card-header-modern h5 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body-modern {
  padding: 1.5rem;
}

/* Document Verification Section */
.document-verification-section {
  max-width: 1200px;
  margin: 0 auto;
}

.user-info-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.user-avatar {
  flex-shrink: 0;
}

.avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #667eea;
}

.user-details h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.user-details p {
  color: #7f8c8d;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.document-section {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}

.document-section h6 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.document-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.document-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.document-item:hover {
  transform: scale(1.05);
}

.document-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.document-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  font-size: 1.5rem;
}

.document-item:hover .document-overlay {
  opacity: 1;
}

.verification-actions {
  text-align: center;
}

.action-buttons-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.action-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.status-message {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-weight: 500;
  font-size: 1rem;
}

.status-message.success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-message.danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Rejection Form Section */
.rejection-form-section {
  max-width: 600px;
  margin: 0 auto;
}

.form-card-modern {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
  overflow: hidden;
}

.form-header {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.form-header h6 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.modern-form {
  padding: 2rem;
}

.form-group-modern {
  margin-bottom: 1.5rem;
}

.form-group-modern label {
  display: block;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-control-modern {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  resize: vertical;
  color: #333333;
}

.form-control-modern:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Modern Table Styles */
.table-responsive-modern {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}

.modern-table {
  width: 100%;
  margin: 0;
}

.modern-table thead th {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1rem;
  font-weight: 600;
  border: none;
  text-align: center;
  font-size: 0.9rem;
}

.modern-table thead th i {
  margin-right: 0.5rem;
  opacity: 0.9;
}

.modern-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
  vertical-align: middle;
}

.modern-table tbody tr:hover {
  background-color: #f8f9fa;
}

.user-avatar-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-image-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #667eea;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.status-badge.status-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-badge.status-danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-badge.status-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-badge.status-info {
  background: linear-gradient(135deg, #d1ecf1, #bee5eb);
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.status-badge.status-secondary {
  background: linear-gradient(135deg, #e2e3e5, #d6d8db);
  color: #383d41;
  border: 1px solid #d6d8db;
}

.status-badge.cursor-pointer {
  cursor: pointer;
}

.status-badge.cursor-pointer:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
  .user-management-header {
    padding: 1.5rem;
  }

  .user-management-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .user-info-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .documents-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons-group {
    flex-direction: column;
    align-items: center;
  }

  .form-actions {
    flex-direction: column;
    align-items: center;
  }

  .page-stats {
    justify-content: center;
  }

  .header-actions {
    justify-content: center;
    margin-top: 1rem;
  }

  .action-buttons {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .stats-card-modern {
    margin-bottom: 1rem;
  }

  .modern-table thead th,
  .modern-table tbody td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .avatar-image-small {
    width: 35px;
    height: 35px;
  }
}

/* Document Verification Styles */
.document-verification-section {
  margin-bottom: 2rem;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.document-section {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}

.document-section h6 {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.document-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.document-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.document-item:hover {
  transform: scale(1.05);
}

.document-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.document-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  font-size: 1.2rem;
}

.document-item:hover .document-overlay {
  opacity: 1;
}

.verification-actions {
  margin-top: 2rem;
}

.action-buttons-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.action-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.status-message {
  text-align: center;
  padding: 1.5rem;
  border-radius: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.status-message.success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-message.danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Form Styles */
.rejection-form-section,
.commission-form-section {
  max-width: 600px;
  margin: 0 auto;
}

.form-card-modern {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid #f0f0f0;
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.form-header i {
  font-size: 2rem;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.form-header h6 {
  color: #2c3e50;
  font-weight: 600;
  margin: 0;
}

.modern-form {
  width: 100%;
}

.form-group-modern {
  margin-bottom: 1.5rem;
}

.form-group-modern label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-control-modern {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e1e8ed;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-control-modern:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control-modern::placeholder {
  color: #95a5a6;
}

.form-help {
  margin-top: 0.5rem;
}

.form-help small {
  color: #7f8c8d;
  font-style: italic;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Avatar Styles */
.avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #667eea;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ===== PENDING LOADS PAGE STYLES ===== */

/* Pending Loads Header */
.pending-loads-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.pending-loads-header .welcome-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.pending-loads-header .welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.pending-loads-header .commission-note {
  background: rgba(255,255,255,0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.pending-loads-header .page-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.pending-loads-header .stat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.pending-loads-header .header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.pending-loads-header .action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Pending Loads Statistics */
.pending-stats-section {
  margin-bottom: 2rem;
}

.pending-stats-section .stats-card-modern:nth-child(1) .stats-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.pending-stats-section .stats-card-modern:nth-child(2) .stats-icon {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.pending-stats-section .stats-card-modern:nth-child(3) .stats-icon {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.pending-stats-section .stats-card-modern:nth-child(4) .stats-icon {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.pending-stats-section .stats-card-modern:nth-child(5) .stats-icon {
  background: linear-gradient(135deg, #fa709a, #fee140);
}

.pending-stats-section .stats-card-modern:nth-child(6) .stats-icon {
  background: linear-gradient(135deg, #a8edea, #fed6e3);
}

/* Vehicle Image Styles */
.vehicle-image-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.vehicle-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #667eea;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.vehicle-thumbnail:hover {
  transform: scale(1.1);
}

/* User Info Styles */
.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.user-info i {
  font-size: 1rem;
}

.user-info span {
  color: #2c3e50;
}

/* Location Info Styles */
.location-info {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 150px;
}

.location-info i {
  font-size: 0.9rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.location-info span {
  font-size: 0.9rem;
  color: #2c3e50;
  word-wrap: break-word;
}

/* Material Info Styles */
.material-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.material-info i {
  font-size: 1rem;
}

.material-info span {
  font-weight: 500;
  color: #2c3e50;
}

/* Badge Styles */
.weight-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
}

.type-badge {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
}

.amount-text {
  font-weight: 600;
  color: #27ae60;
  font-size: 1rem;
}

.total-amount {
  font-weight: 700;
  color: #e74c3c;
  font-size: 1.1rem;
}

/* Button Styles */
.btn-primary-modern {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

.btn-success-modern {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-success-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
  color: white;
  text-decoration: none;
}

.btn-danger-modern {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
  color: white;
  text-decoration: none;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pending-loads-header {
    padding: 1.5rem;
  }

  .pending-loads-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .location-info {
    max-width: 120px;
  }

  .location-info span {
    font-size: 0.8rem;
  }

  .vehicle-thumbnail {
    width: 40px;
    height: 40px;
  }

  .pending-loads-header .header-actions {
    justify-content: center;
    margin-top: 1rem;
  }

  .pending-loads-header .action-buttons {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .modern-table thead th,
  .modern-table tbody td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .user-info,
  .location-info,
  .material-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .weight-badge,
  .type-badge {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  .amount-text,
  .total-amount {
    font-size: 0.9rem;
  }
}

/* Vehicle Management Header - Animated Gradient */
.vehicle-management-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.vehicle-management-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.vehicle-management-header .page-title-modern {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vehicle-management-header .page-subtitle {
  font-size: 1.1rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

.vehicle-management-header .commission-note {
  background: rgba(255,255,255,0.1);
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.vehicle-management-header .commission-note i {
  margin-right: 8px;
  color: #ffd700;
}

.vehicle-management-header .page-stats {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.vehicle-management-header .stat-badge {
  background: rgba(255,255,255,0.15);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.vehicle-management-header .stat-badge i {
  margin-right: 5px;
  color: #ffd700;
}

.vehicle-management-header .header-actions {
  text-align: right;
}

.vehicle-management-header .action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vehicle-management-header .btn {
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.vehicle-management-header .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.vehicle-management-header .btn:hover::before {
  left: 100%;
}

.vehicle-management-header .btn-primary-modern {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.vehicle-management-header .btn-info-modern {
  background: linear-gradient(135deg, #17a2b8, #6f42c1);
  color: white;
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.vehicle-management-header .btn-secondary-modern {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* Animation Keyframes */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply animations to vehicle management header */
.vehicle-management-header .welcome-section {
  animation: fadeInUp 0.8s ease-out;
}

.vehicle-management-header .header-actions {
  animation: slideInRight 0.8s ease-out 0.2s both;
}

.vehicle-management-header .commission-note {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.vehicle-management-header .page-stats {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Mobile Responsive for Vehicle Management Header */
@media (max-width: 768px) {
  .vehicle-management-header {
    padding: 20px;
    border-radius: 15px;
  }

  .vehicle-management-header .page-title-modern {
    font-size: 1.8rem;
  }

  .vehicle-management-header .page-subtitle {
    font-size: 1rem;
  }

  .vehicle-management-header .page-stats {
    flex-direction: column;
    gap: 10px;
  }

  .vehicle-management-header .action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .vehicle-management-header .btn {
    width: 100%;
    text-align: center;
  }
}

/* Banner Management Header */
.banner-management-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.banner-management-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.banner-management-header .page-title-modern {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-management-header .page-subtitle {
  font-size: 1.1rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

.banner-management-header .commission-note {
  background: rgba(255,255,255,0.1);
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.banner-management-header .commission-note i {
  margin-right: 8px;
  color: #ffd700;
}

.banner-management-header .page-stats {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.banner-management-header .stat-badge {
  background: rgba(255,255,255,0.15);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.banner-management-header .stat-badge i {
  margin-right: 5px;
  color: #ffd700;
}

.banner-management-header .header-actions {
  text-align: right;
}

.banner-management-header .action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.banner-management-header .btn {
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.banner-management-header .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.banner-management-header .btn:hover::before {
  left: 100%;
}

.banner-management-header .btn-primary-modern {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.banner-management-header .btn-info-modern {
  background: linear-gradient(135deg, #17a2b8, #6f42c1);
  color: white;
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.banner-management-header .btn-secondary-modern {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* Statistics Cards */
.stats-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.stats-card .card-body {
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.stats-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.stats-icon.success {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.stats-icon.danger {
  background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.stats-icon.info {
  background: linear-gradient(135deg, #17a2b8, #6f42c1);
}

.stats-content h4 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #333;
}

.stats-content p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modern Table Styles */
.modern-table-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
}

.modern-table-card .card-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 1px solid #dee2e6;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modern-table-card .card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modern-table-card .card-actions {
  margin-left: auto;
}

.modern-table {
  margin: 0;
}

.modern-table thead th {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 15px 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

.modern-table tbody tr {
  transition: all 0.3s ease;
}

.modern-table tbody tr:hover {
  background-color: #f8f9fa;
  transform: scale(1.01);
}

.modern-table tbody td {
  padding: 20px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
}

.modern-table .badge-modern {
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Banner Preview Styles */
.banner-preview {
  position: relative;
  display: inline-block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.banner-thumbnail {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.banner-preview:hover .banner-thumbnail {
  transform: scale(1.05);
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.banner-preview:hover .banner-overlay {
  opacity: 1;
}

/* Action Buttons Group */
.action-buttons-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary-modern {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.btn-danger-modern {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.btn-info-modern {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
}

/* Mobile Responsive for Banner Management */
@media (max-width: 768px) {
  .banner-management-header {
    padding: 20px;
    border-radius: 15px;
  }

  .banner-management-header .page-title-modern {
    font-size: 1.8rem;
  }

  .banner-management-header .page-subtitle {
    font-size: 1rem;
  }

  .banner-management-header .page-stats {
    flex-direction: column;
    gap: 10px;
  }

  .banner-management-header .action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .banner-management-header .btn {
    width: 100%;
    text-align: center;
  }

  .stats-card .card-body {
    padding: 15px;
    flex-direction: column;
    text-align: center;
  }

  .stats-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .stats-content h4 {
    font-size: 1.5rem;
  }

  .modern-table-card .card-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .action-buttons-group {
    justify-content: center;
  }

  .banner-thumbnail {
    width: 100px;
    height: 70px;
  }
}

/* Banner Form Header */
.banner-form-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.banner-form-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.banner-form-header .page-title-modern {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-form-header .page-subtitle {
  font-size: 1.1rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

.banner-form-header .commission-note {
  background: rgba(255,255,255,0.1);
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.banner-form-header .commission-note i {
  margin-right: 8px;
  color: #ffd700;
}

.banner-form-header .page-stats {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.banner-form-header .stat-badge {
  background: rgba(255,255,255,0.15);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.banner-form-header .stat-badge i {
  margin-right: 5px;
  color: #ffd700;
}

.banner-form-header .header-actions {
  text-align: right;
}

.banner-form-header .action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.banner-form-header .btn {
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.banner-form-header .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.banner-form-header .btn:hover::before {
  left: 100%;
}

.banner-form-header .btn-info-modern {
  background: linear-gradient(135deg, #17a2b8, #6f42c1);
  color: white;
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.banner-form-header .btn-danger-modern {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Modern Form Styles */
.modern-form-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 30px;
}

.modern-form-card .card-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 1px solid #dee2e6;
  padding: 20px 25px;
}

.modern-form-card .card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modern-form-card .card-body {
  padding: 30px;
}

.form-section {
  margin-bottom: 30px;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid #667eea;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.section-header i {
  color: #ffffff;
  font-size: 1.2rem;
}

.section-header h6 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

/* Image Upload Styles */
.image-upload-container {
  position: relative;
}

.current-image-preview {
  margin-bottom: 20px;
}

.image-preview {
  position: relative;
  display: inline-block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.image-preview img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  display: block;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-preview:hover .image-overlay {
  opacity: 1;
}

.upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #667eea;
  background: #f0f2ff;
}

.upload-icon {
  font-size: 3rem;
  color: #6c757d;
  margin-bottom: 15px;
}

.upload-text h6 {
  margin: 0 0 10px 0;
  font-weight: 600;
  color: #333;
}

.upload-text p {
  margin: 0 0 10px 0;
  color: #6c757d;
}

.upload-area input[type="file"] {
  display: none;
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: #e3f2fd;
  border: 1px solid #2196f3;
  border-radius: 8px;
  margin-top: 15px;
}

.file-details {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-details i {
  color: #2196f3;
  font-size: 1.2rem;
}

/* Modern Form Controls */
.form-group-modern {
  margin-bottom: 25px;
}

.form-label-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-label-modern i {
  color: #667eea;
}

.form-control-modern {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
}

.form-control-modern:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

.form-control-modern.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-help {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 5px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.btn-secondary-modern {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-primary-modern {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Modern Card Styles */
.modern-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  overflow: hidden;
}

.modern-card .card-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 1px solid #dee2e6;
  padding: 15px 20px;
}

.modern-card .card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-card .card-body {
  padding: 20px;
}

/* Tips List */
.tips-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #555;
}

.tip-item i {
  margin-top: 2px;
  flex-shrink: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 15px;
}

.stat-item {
  text-align: center;
  padding: 15px 10px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mobile Responsive for Banner Form */
@media (max-width: 768px) {
  .banner-form-header {
    padding: 20px;
    border-radius: 15px;
  }

  .banner-form-header .page-title-modern {
    font-size: 1.8rem;
  }

  .banner-form-header .page-subtitle {
    font-size: 1rem;
  }

  .banner-form-header .page-stats {
    flex-direction: column;
    gap: 10px;
  }

  .banner-form-header .action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .banner-form-header .btn {
    width: 100%;
    text-align: center;
  }

  .modern-form-card .card-body {
    padding: 20px;
  }

  .form-section {
    padding: 20px;
  }

  .upload-area {
    padding: 30px 15px;
  }

  .image-preview img {
    width: 250px;
    height: 150px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .modern-card .card-body {
    padding: 15px;
  }
}

/* Province/State List Styles */
.state-list-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.province-info {
  margin-bottom: 0.5rem;
}

.province-image-cell {
  text-align: center;
}

.province-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #f0f0f0;
  transition: transform 0.2s ease;
}

.province-thumbnail:hover {
  transform: scale(1.1);
}

.no-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  color: #6c757d;
}

.no-image i {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.no-image span {
  font-size: 0.7rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-published {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
}

.status-draft {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
}

.action-buttons-cell {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.btn-edit-modern {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-edit-modern:hover {
  background: linear-gradient(135deg, #2980b9, #21618c);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-delete-modern {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-delete-modern:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: #f8f9fa;
  border-radius: 15px;
  border: 2px dashed #dee2e6;
}

.empty-state-icon {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.empty-state h4 {
  color: #495057;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.empty-state p {
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
  border-radius: 10px;
  text-decoration: none;
  color: #495057;
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.quick-action-btn i {
  font-size: 1.2rem;
  width: 20px;
}

.quick-action-btn span {
  font-weight: 500;
}

/* State List Header Responsive */
@media (max-width: 768px) {
  .state-list-header {
    padding: 20px;
    margin-bottom: 20px;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .state-list-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .state-list-header .page-stats {
    justify-content: center;
  }

  .state-list-header .header-actions {
    justify-content: center;
  }

  .state-list-header .action-buttons {
    justify-content: center;
  }
}

/* ===========================================
   MODERN FORM STYLES FOR STATE MANAGEMENT
   =========================================== */

/* Form Sections */
.form-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.form-section:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f8f9fa;
}

.section-header i {
  color: #667eea;
  font-size: 1.2rem;
  margin-right: 12px;
  width: 24px;
}

.section-header h6 {
  margin: 0;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Modern Form Controls */
.form-group-modern {
  margin-bottom: 20px;
}

.form-label-modern {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-label-modern i {
  color: #667eea;
  margin-right: 8px;
  width: 16px;
}

.form-control-modern {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #ffffff;
  color: #1e293b;
}

.form-control-modern:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

.form-control-modern:hover {
  border-color: #cbd5e0;
}

.form-control-modern::placeholder {
  color: #a0aec0;
}

.existing-image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.88rem;
}

.existing-image-preview img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.form-help {
  font-size: 0.85rem;
  color: #718096;
  margin-top: 4px;
  font-style: italic;
}

/* Image Upload Container */
.image-upload-container {
  position: relative;
}

.upload-area {
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.upload-area:hover {
  border-color: #667eea;
  background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
}

.upload-area.dragover {
  border-color: #667eea;
  background: linear-gradient(135deg, #e6f0ff 0%, #dbeafe 100%);
  transform: scale(1.02);
}

.upload-icon {
  font-size: 3rem;
  color: #a0aec0;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
  color: #667eea;
  transform: scale(1.1);
}

.upload-text {
  color: #4a5568;
  font-weight: 500;
  margin-bottom: 8px;
}

.upload-subtext {
  color: #718096;
  font-size: 0.9rem;
}

.file-info {
  display: none;
  align-items: center;
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 16px;
}

.file-info-content {
  flex: 1;
}

.file-name {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
}

.file-size {
  font-size: 0.85rem;
  color: #64748b;
}

.remove-file-btn {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.remove-file-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* Current Image Preview */
.current-image-preview {
  margin-bottom: 20px;
}

.image-preview {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-preview img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  display: block;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.image-preview:hover .image-overlay {
  opacity: 1;
}

.image-overlay .btn {
  border-radius: 6px;
  font-weight: 500;
}

/* Status Toggle */
.status-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-label {
  font-weight: 600;
  color: #4a5568;
}

.status-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.status-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e0;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: #10b981;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.status-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #4a5568;
  min-width: 60px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
  margin-top: 32px;
}

.btn-modern {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-modern i {
  font-size: 1rem;
}

.btn-primary-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary-modern {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.btn-secondary-modern:hover {
  background: #e9ecef;
  color: #495057;
  transform: translateY(-1px);
}

/* Sidebar Styles */
.sidebar-tips {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 12px;
  padding: 20px;
  color: white;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.sidebar-tips h6 {
  color: white;
  margin-bottom: 16px;
  font-weight: 600;
}

.tip-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.tip-item i {
  margin-right: 10px;
  width: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.stat-item {
  text-align: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-section {
    padding: 16px;
  }

  .upload-area {
    padding: 24px 16px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-modern {
    width: 100%;
    justify-content: center;
  }

  .status-toggle {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* State Form Header Responsive */
  .state-form-header {
    padding: 20px;
    margin-bottom: 20px;
  }

  .state-form-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .state-form-header .welcome-section p {
    font-size: 1rem;
  }

  .state-form-header .page-stats {
    justify-content: center;
    margin-top: 1rem;
  }

  .state-form-header .header-actions {
    justify-content: center;
    margin-top: 1rem;
  }

  .state-form-header .action-buttons {
    justify-content: center;
  }

  /* Country Code List Header Responsive */
  .country-code-list-header {
    padding: 20px;
    margin-bottom: 20px;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .country-code-list-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .country-code-list-header .welcome-section p {
    font-size: 1rem;
  }

  .country-code-list-header .page-stats {
    justify-content: center;
  }

  .country-code-list-header .header-actions {
    justify-content: center;
  }

  .country-code-list-header .action-buttons {
    justify-content: center;
  }

  /* Country Code Form Header Responsive */
  .country-code-form-header {
    padding: 20px;
    margin-bottom: 20px;
  }

  .country-code-form-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .country-code-form-header .welcome-section p {
    font-size: 1rem;
  }

  .country-code-form-header .page-stats {
    justify-content: center;
    margin-top: 1rem;
  }

  .country-code-form-header .header-actions {
    justify-content: center;
    margin-top: 1rem;
  }

  .country-code-form-header .action-buttons {
    justify-content: center;
  }
}

/* Validation Styles */
.form-control-modern.is-invalid {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.invalid-feedback {
  display: block;
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Loading States */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Enhanced Form Actions with Layout Fixes */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
  margin-top: 32px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.btn-modern {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
}

.btn-modern i {
  font-size: 1rem;
  width: 20px;
  flex-shrink: 0;
}

/* Responsive Form Actions */
@media (max-width: 768px) {
  .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .btn-modern {
    justify-content: center;
    width: 100%;
  }
}

/* Additional Layout Fixes for Forms and Buttons */
.form-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.form-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.btn {
  box-sizing: border-box;
  flex-shrink: 0;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure all buttons and form elements respect container boundaries */
.btn, .form-control, .form-select {
  max-width: 100%;
  box-sizing: border-box;
}

/* Action button containers */
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Table Action Buttons Layout Fix */
.action-buttons-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
}

.action-buttons-cell .btn-edit-modern,
.action-buttons-cell .btn-delete-modern {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .action-buttons-cell {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .action-buttons-cell .btn-edit-modern,
  .action-buttons-cell .btn-delete-modern {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
  }
}

/* Final Layout Constraints for Complete Overflow Prevention */
.modern-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.card-body {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.table-responsive-modern {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modern-table {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  table-layout: fixed;
}

.modern-table th,
.modern-table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure all grid columns respect boundaries */
.col-lg-8, .col-lg-4, .col-md-12, .col-sm-12, .col-12 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 15px;
  padding-right: 15px;
}

/* Container fluid constraints */
.container-fluid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  padding-left: 15px;
  padding-right: 15px;
}

/* Row constraints */
.row {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}

/* ===========================================
   PAGE LIST HEADER - ANIMATED GRADIENT
   =========================================== */

.page-list-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.page-list-header .welcome-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-list-header .welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.page-list-header .commission-note {
  background: rgba(255,255,255,0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.page-list-header .page-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-list-header .stat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.page-list-header .header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* ===========================================
   PAGE FORM HEADER - ANIMATED GRADIENT
   =========================================== */

.page-form-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

.page-form-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.page-form-header .welcome-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-form-header .welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.page-form-header .commission-note {
  background: rgba(255,255,255,0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.page-form-header .page-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-form-header .stat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.page-form-header .header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.page-form-header .action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===========================================
   MODERN FORM STYLES FOR PAGE MANAGEMENT
   =========================================== */

/* Form Sections */
.page-form-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.page-form-section:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.page-section-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f8f9fa;
}

.page-section-header i {
  color: #667eea;
  font-size: 1.2rem;
  margin-right: 12px;
  width: 24px;
}

.page-section-header h6 {
  margin: 0;
  color: #2c3e50;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Modern Form Controls */
.page-form-group {
  margin-bottom: 20px;
}

.page-form-label {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.page-form-label i {
  color: #667eea;
  margin-right: 8px;
  width: 16px;
}

.page-form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #ffffff;
  color: #2c3e50;
}

.page-form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

.page-form-control:hover {
  border-color: #cbd5e0;
}

.page-form-control::placeholder {
  color: #a0aec0;
}

.page-form-help {
  font-size: 0.85rem;
  color: #718096;
  margin-top: 4px;
  font-style: italic;
}

/* Textarea Specific Styles */
.page-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: 'Cairo', sans-serif;
  line-height: 1.6;
}

.page-textarea:focus {
  min-height: 150px;
}

/* Character Counter */
.char-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.85rem;
}

.char-count {
  color: #718096;
  font-weight: 500;
}

.char-limit {
  color: #e74c3c;
  font-weight: 600;
}

.char-limit.warning {
  color: #f39c12;
}

.char-limit.danger {
  color: #e74c3c;
}

/* Status Toggle */
.page-status-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-status-label {
  font-weight: 600;
  color: #4a5568;
}

.page-status-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.page-status-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.page-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e0;
  transition: 0.3s;
  border-radius: 24px;
}

.page-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-status-switch input:checked + .page-slider {
  background-color: #10b981;
}

.page-status-switch input:checked + .page-slider:before {
  transform: translateX(26px);
}

.page-status-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #4a5568;
  min-width: 60px;
}

/* Form Actions */
.page-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
  margin-top: 32px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.page-btn-modern {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
}

.page-btn-modern i {
  font-size: 1rem;
  width: 20px;
  flex-shrink: 0;
}

.page-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.page-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.page-btn-secondary {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.page-btn-secondary:hover {
  background: #e9ecef;
  color: #495057;
  transform: translateY(-1px);
}

/* Sidebar Styles */
.page-sidebar-tips {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 12px;
  padding: 20px;
  color: white;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-sidebar-tips h6 {
  color: white;
  margin-bottom: 16px;
  font-weight: 600;
}

.page-tip-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.page-tip-item i {
  margin-right: 10px;
  width: 16px;
  flex-shrink: 0;
}

.page-tip-item:last-child {
  margin-bottom: 0;
}

/* Stats Grid */
.page-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-stat-item {
  text-align: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.page-stat-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 500;
}

/* Auto-save Indicator */
.auto-save-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #27ae60;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.auto-save-indicator.show {
  opacity: 1;
  transform: translateY(0);
}

.auto-save-indicator.saving {
  background: #f39c12;
}

.auto-save-indicator.error {
  background: #e74c3c;
}

/* Form Validation Styles */
.page-form-control.is-invalid {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.page-invalid-feedback {
  display: block;
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Loading States */
.page-btn-loading {
  position: relative;
  color: transparent !important;
}

.page-btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-form-header {
    padding: 20px;
    margin-bottom: 20px;
  }

  .page-form-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .page-form-header .welcome-section p {
    font-size: 1rem;
  }

  .page-form-header .page-stats {
    justify-content: center;
    margin-top: 1rem;
  }

  .page-form-header .header-actions {
    justify-content: center;
    margin-top: 1rem;
  }

  .page-form-header .action-buttons {
    justify-content: center;
  }

  .page-form-section {
    padding: 16px;
  }

  .page-form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .page-btn-modern {
    justify-content: center;
    width: 100%;
  }

  .page-status-toggle {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .page-sidebar-tips {
    margin-top: 20px;
  }

  .page-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .page-form-header {
    padding: 15px;
  }

  .page-form-section {
    padding: 12px;
  }

  .page-textarea {
    min-height: 100px;
  }

  .page-textarea:focus {
    min-height: 120px;
  }
}

/* Layout Fixes for Complete Overflow Prevention */
.page-form-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-form-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
}

.page-form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-btn-modern {
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Ensure all buttons and form elements respect container boundaries */
.page-btn-modern, .page-form-control {
  max-width: 100%;
  box-sizing: border-box;
}

/* Action button containers */
.page-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .page-action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .page-action-buttons .page-btn-modern {
    width: 100%;
    justify-content: center;
  }
}

/* Final Layout Constraints for Complete Overflow Prevention */
.page-modern-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-card-body {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Ensure all grid columns respect boundaries */
.page-col-lg-8, .page-col-lg-4, .page-col-md-12, .page-col-sm-12, .page-col-12 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 15px;
  padding-right: 15px;
}

/* Container fluid constraints */
.page-container-fluid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  padding-left: 15px;
  padding-right: 15px;
}

/* Row constraints */
.page-row {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}

/* Enhanced Form Actions with Layout Fixes */
.page-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
  margin-top: 32px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.page-btn-modern {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
}

.page-btn-modern i {
  font-size: 1rem;
  width: 20px;
  flex-shrink: 0;
}

/* Responsive Form Actions */
@media (max-width: 768px) {
  .page-form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .page-btn-modern {
    justify-content: center;
    width: 100%;
  }
}

/* Additional Layout Fixes for Forms and Buttons */
.page-form-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-form-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
}

.page-form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-btn-modern {
  box-sizing: border-box;
  flex-shrink: 0;
}

.page-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure all buttons and form elements respect container boundaries */
.page-btn-modern, .page-form-control {
  max-width: 100%;
  box-sizing: border-box;
}

/* Action button containers */
.page-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .page-action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .page-action-buttons .page-btn-modern {
    width: 100%;
    justify-content: center;
  }
}

/* Final Layout Constraints for Complete Overflow Prevention */
.page-modern-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-card-body {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Ensure all grid columns respect boundaries */
.page-col-lg-8, .page-col-lg-4, .page-col-md-12, .page-col-sm-12, .page-col-12 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 15px;
  padding-right: 15px;
}

/* Container fluid constraints */
.page-container-fluid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  padding-left: 15px;
  padding-right: 15px;
}

/* Row constraints */
.page-row {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}

/* Page Title Display */
.page-title-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: #2c3e50;
}

.page-title-display i {
  color: #667eea;
  font-size: 1.1rem;
}

.page-title-display .title-text {
  font-size: 0.95rem;
  color: #2c3e50;
}

/* Description Preview */
.description-preview {
  font-size: 0.9rem;
  color: #7f8c8d;
  line-height: 1.4;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Page List Header Responsive */
@media (max-width: 768px) {
  .page-list-header {
    padding: 20px;
    margin-bottom: 20px;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .page-list-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .page-list-header .welcome-section p {
    font-size: 1rem;
  }

  .page-list-header .page-stats {
    justify-content: center;
  }

  .page-list-header .header-actions {
    justify-content: center;
  }

  .page-list-header .action-buttons {
    justify-content: center;
  }

  .description-preview {
    max-width: 200px;
  }
}

@media (max-width: 576px) {
  .description-preview {
    max-width: 150px;
    font-size: 0.8rem;
  }
}

/* Enhanced Form Actions with Layout Fixes */
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
  margin-top: 32px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.btn-modern {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
}

.btn-modern i {
  font-size: 1rem;
  width: 20px;
  flex-shrink: 0;
}

/* Responsive Form Actions */
@media (max-width: 768px) {
  .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .btn-modern {
    justify-content: center;
    width: 100%;
  }
}

/* Additional Layout Fixes for Forms and Buttons */
.form-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.form-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.btn {
  box-sizing: border-box;
  flex-shrink: 0;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure all buttons and form elements respect container boundaries */
.btn, .form-control, .form-select {
  max-width: 100%;
  box-sizing: border-box;
}

/* Action button containers */
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Table Action Buttons Layout Fix */
.action-buttons-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
}

.action-buttons-cell .btn-edit-modern,
.action-buttons-cell .btn-delete-modern {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .action-buttons-cell {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .action-buttons-cell .btn-edit-modern,
  .action-buttons-cell .btn-delete-modern {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
  }
}

/* Final Layout Constraints for Complete Overflow Prevention */
.modern-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.card-body {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.table-responsive-modern {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modern-table {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  table-layout: fixed;
}

.modern-table th,
.modern-table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure all grid columns respect boundaries */
.col-lg-8, .col-lg-4, .col-md-12, .col-sm-12, .col-12 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 15px;
  padding-right: 15px;
}

/* Container fluid constraints */
.container-fluid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  padding-left: 15px;
  padding-right: 15px;
}

/* Row constraints */
.row {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}

/* ===========================================
   FAQ MANAGEMENT STYLES
   =========================================== */

/* FAQ List Header */
.faq-list-header {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.faq-list-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><defs><pattern id=\"grain\" width=\"100\" height=\"100\" patternUnits=\"userSpaceOnUse\"><circle cx=\"25\" cy=\"25\" r=\"1\" fill=\"white\" opacity=\"0.1\"/><circle cx=\"75\" cy=\"75\" r=\"1\" fill=\"white\" opacity=\"0.1\"/><circle cx=\"50\" cy=\"10\" r=\"0.5\" fill=\"white\" opacity=\"0.1\"/><circle cx=\"90\" cy=\"40\" r=\"0.5\" fill=\"white\" opacity=\"0.1\"/></pattern></defs><rect width=\"100\" height=\"100\" fill=\"url(%23grain)\"/></svg>");
  opacity: 0.3;
}

.faq-list-header .welcome-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.faq-list-header .welcome-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.faq-list-header .commission-note {
  background: rgba(255,255,255,0.2);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.faq-list-header .page-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.faq-list-header .stat-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.faq-list-header .header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.faq-list-header .action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* FAQ Statistics Cards */
.faq-stats-section {
  margin-bottom: 2rem;
}

.faq-stats-section .stats-card-modern:nth-child(1) .stats-icon {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.faq-stats-section .stats-card-modern:nth-child(2) .stats-icon {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.faq-stats-section .stats-card-modern:nth-child(3) .stats-icon {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.faq-stats-section .stats-card-modern:nth-child(4) .stats-icon {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}

/* Search and Filter Container */
.search-container {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}

.search-container .section-header h5 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-container .section-header h5 i {
  color: #667eea;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: end;
  margin-top: 1.5rem;
}

.search-input-group {
  position: relative;
}

.search-input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #667eea;
  font-size: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input::placeholder {
  color: #95a5a6;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  background: white;
  color: #6c757d;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.filter-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
}

.filter-btn i {
  font-size: 0.9rem;
}

/* FAQ Table Styles */
.faq-table-container {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}

.faq-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.faq-table thead th {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1rem 1.5rem;
  font-weight: 600;
  border: none;
  text-align: left;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.faq-table thead th i {
  margin-right: 0.5rem;
  opacity: 0.9;
}

.faq-table tbody td {
  padding: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  color: #2c3e50;
}

.faq-table tbody tr:hover {
  background-color: #f8f9fa;
  transform: scale(1.01);
  transition: all 0.3s ease;
}

.faq-table tbody tr:last-child td {
  border-bottom: none;
}

/* FAQ Row Content */
.faq-question {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.faq-answer-preview {
  color: #7f8c8d;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.faq-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #95a5a6;
}

.faq-meta i {
  width: 14px;
  text-align: center;
}

/* Status Badges */
.status-published {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid #c3e6cb;
}

.status-draft {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid #ffeaa7;
}

.status-published i,
.status-draft i {
  font-size: 0.7rem;
}

/* Action Buttons */
.faq-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-edit-modern {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-edit-modern:hover {
  background: linear-gradient(135deg, #2980b9, #21618c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
  color: white;
  text-decoration: none;
}

.btn-delete-modern {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-delete-modern:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
  color: white;
  text-decoration: none;
}

.btn-edit-modern i,
.btn-delete-modern i {
  font-size: 0.8rem;
}

/* Empty State */
.faq-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: #f8f9fa;
  border-radius: 15px;
  border: 2px dashed #dee2e6;
  margin-top: 2rem;
}

.faq-empty-state .empty-icon {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.faq-empty-state h4 {
  color: #495057;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.faq-empty-state p {
  color: #6c757d;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.faq-empty-state .quick-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.faq-empty-state .quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
  border-radius: 10px;
  text-decoration: none;
  color: #495057;
  transition: all 0.3s ease;
  font-weight: 500;
}

.faq-empty-state .quick-action-btn:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  text-decoration: none;
}

.faq-empty-state .quick-action-btn i {
  font-size: 1.2rem;
  width: 20px;
}

/* Responsive Design for FAQ */
@media (max-width: 768px) {
  .faq-list-header {
    padding: 20px;
    margin-bottom: 20px;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .faq-list-header .welcome-section h1 {
    font-size: 1.8rem;
  }

  .faq-list-header .welcome-section p {
    font-size: 1rem;
  }

  .faq-list-header .page-stats {
    justify-content: center;
  }

  .faq-list-header .header-actions {
    justify-content: center;
  }

  .faq-list-header .action-buttons {
    justify-content: center;
  }

  .search-form {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .filter-buttons {
    justify-content: center;
  }

  .faq-table-container {
    border-radius: 10px;
  }

  .faq-table thead th,
  .faq-table tbody td {
    padding: 1rem;
    font-size: 0.85rem;
  }

  .faq-question {
    font-size: 0.95rem;
  }

  .faq-answer-preview {
    font-size: 0.85rem;
  }

  .faq-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .faq-actions {
    flex-direction: column;
    gap: 0.3rem;
  }

  .btn-edit-modern,
  .btn-delete-modern {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .faq-empty-state {
    padding: 2rem 1rem;
  }

  .faq-empty-state .empty-icon {
    font-size: 3rem;
  }

  .faq-empty-state .quick-actions {
    gap: 0.5rem;
  }

  .faq-empty-state .quick-action-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .faq-list-header {
    padding: 15px;
  }

  .faq-list-header .welcome-section h1 {
    font-size: 1.5rem;
  }

  .search-container {
    padding: 1.5rem;
  }

  .faq-table thead th,
  .faq-table tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .status-published,
  .status-draft {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Admin QA fixes: keep the legacy sidebar offset from collapsing mobile pages. */
@media (max-width: 768px) {
  html[dir="rtl"] .page-wrapper.compact-wrapper .page-body-wrapper .page-body,
  html[dir="rtl"] .page-wrapper .page-body-wrapper .page-body,
  .page-wrapper.compact-wrapper .page-body-wrapper .page-body,
  .page-wrapper .page-body-wrapper .page-body {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
  }

  .page-wrapper,
  .page-body-wrapper,
  .page-wrapper .page-body-wrapper .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    box-sizing: border-box !important;
  }

  .page-wrapper .page-body-wrapper .container-fluid {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  html[dir="rtl"] .page-wrapper .page-body-wrapper .sidebar-wrapper,
  .page-wrapper .page-body-wrapper .sidebar-wrapper {
    width: 300px !important;
    max-width: 85vw !important;
    right: -300px !important;
    left: auto !important;
    transform: none !important;
  }

  html[dir="rtl"] .page-wrapper .page-body-wrapper .sidebar-wrapper.active,
  .page-wrapper .page-body-wrapper .sidebar-wrapper.active {
    right: 0 !important;
  }

  .dashboard-header,
  .vehicle-management-header,
  .banner-management-header,
  .page-form-header,
  .page-list-header,
  .faq-list-header,
  .state-form-header,
  .state-list-header,
  .country-code-form-header,
  .country-code-list-header,
  .pending-loads-header {
    width: 100% !important;
    min-width: 0 !important;
    padding: 20px 16px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }

  .content-card-modern,
  .stats-section,
  .financial-overview,
  .main-content-section,
  .search-container,
  .container-fluid.general-widget {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .container-fluid.general-widget {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .container-fluid.general-widget > .row {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  .container-fluid.general-widget > .row > [class*="col-"] {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .card-body-modern,
  .modern-form {
    padding: 16px !important;
  }

  .form-grid,
  .search-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .form-group-modern,
  .form-control-modern,
  .form-select,
  .custom-file-upload {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .action-buttons,
  .action-buttons-group,
  .form-actions,
  .form-actions-modern,
  .page-action-buttons,
  .vehicle-management-header .action-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .action-buttons .btn,
  .action-buttons-group .btn,
  .form-actions .btn,
  .form-actions-modern .btn,
  .page-action-buttons .page-btn-modern,
  .vehicle-management-header .btn {
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
  }

  .table-responsive-modern {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Contrast fixes from the admin UI audit. */
.metric-trend.positive,
.stats-trend {
  color: #166534;
}

.metric-trend.negative {
  color: #b42318;
}

.metric-trend.neutral,
.metric-content p,
.stats-content p {
  color: #475569;
}

.dashboard-header .stat-badge,
.vehicle-management-header .stat-badge,
.banner-management-header .stat-badge,
.banner-form-header .stat-badge,
.page-form-header .stat-badge,
.page-list-header .stat-badge,
.faq-list-header .stat-badge,
.state-form-header .stat-badge,
.state-list-header .stat-badge,
.country-code-form-header .stat-badge,
.country-code-list-header .stat-badge,
.pending-loads-header .stat-badge,
.user-management-header .stat-badge,
.owner-management-header .stat-badge,
.accepted-loads-header .stat-badge,
.lorry-management-header .stat-badge,
.payout-management-header .stat-badge,
.settings-management-header .stat-badge {
  background: rgba(15, 23, 42, 0.38) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  color: #ffffff !important;
}

.dashboard-header .stat-badge span,
.dashboard-header .stat-badge i,
.vehicle-management-header .stat-badge span,
.vehicle-management-header .stat-badge i,
.banner-management-header .stat-badge span,
.banner-management-header .stat-badge i,
.banner-form-header .stat-badge span,
.banner-form-header .stat-badge i,
.page-form-header .stat-badge span,
.page-form-header .stat-badge i,
.page-list-header .stat-badge span,
.page-list-header .stat-badge i,
.faq-list-header .stat-badge span,
.faq-list-header .stat-badge i,
.state-form-header .stat-badge span,
.state-form-header .stat-badge i,
.state-list-header .stat-badge span,
.state-list-header .stat-badge i,
.country-code-form-header .stat-badge span,
.country-code-form-header .stat-badge i,
.country-code-list-header .stat-badge span,
.country-code-list-header .stat-badge i,
.pending-loads-header .stat-badge span,
.pending-loads-header .stat-badge i,
.user-management-header .stat-badge span,
.user-management-header .stat-badge i,
.owner-management-header .stat-badge span,
.owner-management-header .stat-badge i,
.accepted-loads-header .stat-badge span,
.accepted-loads-header .stat-badge i,
.lorry-management-header .stat-badge span,
.lorry-management-header .stat-badge i,
.payout-management-header .stat-badge span,
.payout-management-header .stat-badge i,
.settings-management-header .stat-badge span,
.settings-management-header .stat-badge i {
  color: #ffffff !important;
  opacity: 1 !important;
}

.vehicle-management-header .btn-warning-modern,
.dashboard-header .btn-warning-modern {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1f2937;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.28);
}

.vehicle-management-header .btn-warning-modern i,
.vehicle-management-header .btn-warning-modern span,
.dashboard-header .btn-warning-modern i,
.dashboard-header .btn-warning-modern span {
  color: #1f2937;
}

.card-content p,
.section-header-modern p,
.metric-label,
.metric-content p,
.stats-content p,
.status-content p,
.financial-content p,
.form-help,
.form-help small,
.page-form-help,
.faq-answer-preview,
.stat-label,
.page-stat-label {
  color: #475569 !important;
}

.metric-trend.positive,
.metric-trend.positive *,
.amount-text,
.total-amount-value,
.character-counter {
  color: #166534 !important;
}

.metric-trend.negative,
.metric-trend.negative *,
.total-amount {
  color: #991b1b !important;
}

.metric-trend.neutral,
.metric-trend.neutral * {
  color: #475569 !important;
}

.filter-btn {
  background: #ffffff !important;
  border-color: #3446a8 !important;
  color: #3446a8 !important;
}

.filter-btn.active,
.filter-btn:hover {
  background: #3446a8 !important;
  border-color: #3446a8 !important;
  color: #ffffff !important;
}

.badge-success,
.badge.badge-success,
.badge-modern.badge-success,
.badge-modern.badge-success *,
.badge-success * {
  background-color: #047857 !important;
  color: #ffffff !important;
}

.badge-info,
.badge.badge-info,
.badge-modern.badge-info,
.badge-modern.badge-info *,
.badge-info * {
  background-color: #075985 !important;
  color: #ffffff !important;
}

.badge-warning,
.badge.badge-warning,
.badge-modern.badge-warning,
.badge-modern.badge-warning *,
.badge-warning * {
  background-color: #92400e !important;
  color: #ffffff !important;
}

.badge-danger,
.badge.badge-danger,
.badge-modern.badge-danger,
.badge-modern.badge-danger *,
.badge-danger * {
  background-color: #991b1b !important;
  color: #ffffff !important;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
  background-color: #1e2f65 !important;
  background-image: none !important;
  color: #ffffff !important;
}

.btn-secondary,
.btn-secondary-modern,
.page-btn-secondary,
a.btn.btn-secondary-modern,
button.btn.btn-secondary-modern {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  box-shadow: none !important;
}

.btn-secondary:hover,
.btn-secondary-modern:hover,
.page-btn-secondary:hover {
  background: #cbd5e1 !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
}

/* Keep dense admin tables readable without allowing cell content to spill into neighboring columns. */
.table-responsive-modern {
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-responsive-modern .modern-table {
  width: max-content !important;
  min-width: 100%;
  max-width: none !important;
  table-layout: auto !important;
}

.table-responsive-modern .modern-table th,
.table-responsive-modern .modern-table td {
  max-width: none !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

.table-responsive-modern .status-badge,
.table-responsive-modern .commission-badge {
  box-sizing: border-box;
  max-width: none;
  white-space: nowrap;
  justify-content: center;
  text-align: center;
}
