/* Custom Theme for Flexhour Admin Dashboard */
:root {
  --primary-color: #5E936C;
  --secondary-color: #FCF8DD;
  --text-color: #000000;
  --border-radius: 12px;
  --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Global Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8f9fa;
  color: var(--text-color);
}

/* Sidebar Improvements */
.sidebar {
  background: linear-gradient(135deg, var(--primary-color) 0%, #4a7a5a 100%);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.sidebar .logo {
  background: rgba(255, 255, 255, 0.1);
  margin: 20px;
  /* padding: 20px; */
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
}

.sidebar .logo span {
  color: white;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 1px;
}

/* Sidebar active/hover color to match theme */
.sidebar .nano-content>ul li>a:hover,
.sidebar .nano-content>ul>li.active>a,
.sidebar .nano-content>ul>li.open>a {
  background: var(--primary-color) !important;
  color: #ffffff !important;
}

.sidebar .nano-content>ul li.active>a::before {
  background: var(--primary-color) !important;
}

/* Sidebar logo swap on collapse */
.logo .logo-small { display: none; }
.sidebar-hide .logo { width: 60px !important; margin: 0 !important; padding: 0 !important; background: transparent; border-radius: 0; margin-top: 1rem !important; }
.sidebar-hide .logo .logo-full { display: none !important; }
.sidebar-hide .logo .logo-small { display: inline-block !important; }

.sidebar ul li a {
  color: rgba(255, 255, 255, 0.8);
  border-radius: var(--border-radius);
  margin: 5px 15px;
  padding: 12px 20px;
  transition: var(--transition);
  font-weight: 500;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateX(5px);
}

.sidebar ul li a i {
  margin-right: 12px;
  font-size: 18px;
}

/* Card Improvements */
.card {
  background: white;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: var(--border-radius);
  border-left: 5px solid var(--primary-color);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* User Details Page Specific Styles */
.user-profile {
  padding: 2rem;
  position: relative;
}

.user-info {
  position: relative;
  z-index: 2;
  margin-top: 1rem;
}

.user-avatar {
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.user-avatar img {
  border: 4px solid var(--primary-color);
  box-shadow: 0 8px 25px rgba(94, 147, 108, 0.3);
  transition: var(--transition);
  display: block;
  margin: 0 auto;
}

.user-avatar img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(94, 147, 108, 0.4);
}

.user-info h4 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  position: relative;
  z-index: 2;
}

.user-info p {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  position: relative;
  z-index: 2;
}

.verification-status .badge {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

.user-actions .btn {
  border-radius: 25px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: var(--transition);
}

.user-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.user-details h6 {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.user-info-columns {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
  border-bottom: none;
}

.user-details small {
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

.user-details p {
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.commission-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid #dee2e6;
}

.commission-section h6 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.commission-section .form-control {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: var(--transition);
}

.commission-section .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(94, 147, 108, 0.25);
}

.commission-section .btn {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: var(--transition);
}

/* Statistics Cards */
.stat-widget {
  text-align: center;
  padding: 1.5rem 1rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
}

.stat-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #4a7a5a);
}

.stat-content {
  position: relative;
  z-index: 2;
}

.stat-text {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-digit {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  opacity: 0.1;
  color: var(--primary-color);
}

.stat-widget small {
  font-size: 0.75rem;
}

.stat-widget .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  margin: 0.1rem;
  border-radius: 12px;
}

/* Tabs Styling */
.nav-tabs {
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
  border: none;
  color: #6c757d;
  font-weight: 500;
  padding: 1rem 1.5rem;
  border-radius: 0;
  transition: var(--transition);
  position: relative;
}

.nav-tabs .nav-link:hover {
  color: var(--primary-color);
  background: transparent;
  border: none;
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  background: transparent;
  border: none;
  font-weight: 600;
}

.nav-tabs .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px 2px 0 0;
}

/* Table Styling */
.table {
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  padding: 1rem 0.75rem;
  font-size: 0.8rem;
}

.table td {
  padding: 1rem 0.75rem;
  border-top: 1px solid #e9ecef;
  vertical-align: middle;
  font-size: 0.85rem;
}

.table tbody tr:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  transform: scale(1.01);
  transition: var(--transition);
}

.table .badge {
  font-size: 0.7rem;
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .user-profile {
    padding: 1rem;
  }
  
  .stat-widget {
    margin-bottom: 1rem;
  }
  
  .stat-digit {
    font-size: 1.5rem;
  }
  
  .stat-icon {
    font-size: 1.5rem;
  }
  
  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .table-responsive {
    font-size: 0.8rem;
  }
  
  .commission-section {
    padding: 1rem;
  }
  
  .user-avatar img {
    width: 80px !important;
    height: 80px !important;
  }
  
  .user-info h4 {
    font-size: 1.25rem;
  }
  
  /* Make tabs scrollable on mobile */
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-tabs .nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  
  .nav-tabs .nav-link {
    white-space: nowrap;
    min-width: 120px;
  }
  
  /* Improve table responsiveness */
  .table-responsive {
    border: none;
  }
  
  .table th,
  .table td {
    white-space: nowrap;
    min-width: 100px;
  }
  
  /* Stack user details on mobile */
  .user-details .row .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .col-md-2 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .stat-widget {
    padding: 1rem 0.5rem;
  }
  
  .stat-digit {
    font-size: 1.25rem;
  }
  
  .nav-tabs .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
  }
}

/* Page Header Styling */
.page-titles {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.page-titles h3 {
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  font-size: 2rem;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.breadcrumb-item a:hover {
  color: #4a7a5a;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
  font-weight: 600;
}

/* Empty State Styling */
.text-center.text-muted {
  padding: 3rem 1rem;
}

.text-center.text-muted i {
  color: #dee2e6;
  margin-bottom: 1rem;
}

.text-center.text-muted p {
  color: #6c757d;
  font-weight: 500;
  font-size: 1.1rem;
}

/* Additional Improvements */
.card-body {
  padding: 1.5rem;
}

/* Better spacing for mobile */
@media (max-width: 576px) {
  .card-body {
    padding: 1rem;
  }
  
  .page-titles {
    padding: 1rem 0;
    margin-bottom: 1rem;
  }
  
  .page-titles h3 {
    font-size: 1.5rem;
  }
  
  .breadcrumb {
    font-size: 0.85rem;
  }
  
  /* Improve input group on mobile */
  .input-group {
    flex-direction: column;
  }
  
  .input-group .form-control {
    border-radius: 8px 8px 0 0 !important;
    margin-bottom: 0.5rem;
  }
  
  .input-group-append {
    width: 100%;
  }
  
  .input-group-append .btn {
    width: 100%;
    border-radius: 0 0 8px 8px !important;
  }
}

/* Loading states */
.stat-widget.loading {
  opacity: 0.7;
  pointer-events: none;
}

.stat-widget.loading .stat-digit {
  animation: pulse 1.5s infinite;
}

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

/* Hover effects for better interactivity */
.stat-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.user-profile:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Better focus states for accessibility */
.btn:focus,
.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(94, 147, 108, 0.25);
  outline: none;
}

/* Smooth transitions for all interactive elements */
.btn,
.card,
.stat-widget,
.nav-link,
.table tbody tr {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fix Dropdown Filter Text Cutting Issue */
select.form-control {
  position: relative;
  z-index: 1;
}

select.form-control:focus {
  z-index: 1000;
}

/* Ensure dropdown options are visible */
select.form-control option {
  background: white;
  color: #333;
  padding: 8px 12px;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

/* Fix for any dropdown menus */
.dropdown-menu {
  z-index: 9999 !important;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #ddd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #333;
}

/* Fix for filter containers */
.chart-container {
  position: relative;
  z-index: 1;
}

/* Ensure filter dropdowns appear above other elements */
.form-control:focus + .dropdown-menu,
.form-control:focus ~ .dropdown-menu {
  z-index: 9999 !important;
}

/* Fix for select elements in filter forms */
#filterForm select.form-control {
  z-index: 10;
}

#filterForm select.form-control:focus {
  z-index: 9999;
}

/* Ensure proper stacking context */
.chart-container .row {
  position: relative;
  z-index: 1;
}

.chart-container .col-md-3 {
  position: relative;
  z-index: 1;
}

/* Fix for any overlapping issues */
.form-group {
  position: relative;
  z-index: 1;
}

.form-group:focus-within {
  z-index: 9999;
}

/* Additional fixes for select dropdowns */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 32px;
}

/* Ensure select dropdowns are properly positioned */
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(94, 147, 108, 0.25);
}

/* Fix for mobile dropdowns */
@media (max-width: 768px) {
  select.form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .dropdown-menu {
    max-height: 200px;
  }
}

/* Ensure dropdowns don't get cut off by parent containers */
.chart-container,
.card,
.table-responsive {
  overflow: visible !important;
}

/* Fix for any Bootstrap dropdown conflicts */
.dropdown-menu.show {
  display: block !important;
  z-index: 9999 !important;
}

/* Chat History Page Specific Styles */
.chats-list .card {
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.chat-info {
  padding: 0.5rem 0;
}

.chat-id {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.chat-id .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.last-message {
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.last-message strong {
  color: var(--primary-color);
  font-weight: 600;
}

.participants {
  margin-bottom: 0.75rem;
}

.participants strong {
  color: var(--primary-color);
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.participants .badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  display: inline-block;
}

.last-sender {
  margin-top: 0.5rem;
}

.last-sender strong {
  color: var(--primary-color);
  font-weight: 600;
}

.chat-actions {
  text-align: right;
  padding: 0.5rem 0;
}

.chat-date {
  margin-bottom: 0.75rem;
}

.chat-date .text-dark {
  font-weight: 600;
  font-size: 0.9rem;
}

.chat-status {
  margin-bottom: 0.75rem;
}

.chat-status .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Fix for filter form layout */
.chat-filter-form .form-group {
  margin-bottom: 1rem;
}

.chat-filter-form .btn {
  margin-top: 1.5rem;
}

/* Responsive improvements for chat cards */
@media (max-width: 768px) {
  .chat-info {
    padding: 0.25rem 0;
  }
  
  .chat-actions {
    text-align: left;
    margin-top: 1rem;
  }
  
  .chat-id {
    font-size: 0.9rem;
  }
  
  .participants .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
  }
}

.card-title {
  background: var(--secondary-color);
  padding: 20px 25px;
  border-bottom: 2px solid var(--primary-color);
  margin: 0;
}

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

.card-body {
  padding: 25px;
}

/* Stat Widget Improvements */
.stat-widget-one {
  display: flex;
  align-items: center;
  /* padding: 25px; */
  /* background: linear-gradient(135deg, var(--secondary-color) 0%, #f8f4c4 100%); */

}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  /* margin-right: 20px; */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.stat-icon i {
  color: white;
  font-size: 24px;
}

.stat-content {
  flex: 1;
}

/* Tasks page improvements */
.tasks-table .col-title { width: 36%; }
.tasks-table td.col-title { max-width: 0; }
.task-info { white-space: normal; word-wrap: break-word; }

.task-info strong { display: block; font-weight: 600; }

.table td {
  vertical-align: middle;
}

.table .text-muted {
  white-space: normal !important;
}

.table-responsive {
  overflow-x: auto;
}

.table td, .table th {
  word-break: break-word;
}

/* Prevent badge/button wrapping overflow */
.btn-group .btn { white-space: nowrap; }

/* Chats page improvements */
.chats-list .card-body { padding: 16px 18px; }
.chat-info .last-message { white-space: normal; word-break: break-word; }
.participants .badge { margin-bottom: 6px; }
.chat-actions { display: flex; flex-direction: column; align-items: flex-end; }
.chat-actions .btn { white-space: nowrap; }

@media (max-width: 768px) {
  .chat-actions { align-items: flex-start; text-align: left; }
}

/* Task card layout */
.task-card .task-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.task-card .task-desc {
  white-space: normal;
  word-wrap: break-word;
  margin-bottom: 0.75rem;
}

.task-card .task-meta span { display: inline-flex; align-items: center; margin-right: 10px; }
.task-card .task-meta i { font-size: 14px; margin-right: 6px; }

.task-card .btn-group .btn { white-space: nowrap; }

/* Horizontal card layout */
.task-card .task-card-content { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; width: 100%; }
.task-card .task-main { flex: 1 1 auto; min-width: 0; }
.task-card .task-desc { margin-bottom: 0.5rem; }
.task-card .task-aside { flex: 0 0 260px; min-width: 260px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }

@media (max-width: 768px) {
  .task-card .task-aside { flex: 1 1 auto; min-width: auto; text-align: left; align-items: flex-start; }
}

.stat-text {
  color: #666;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-digit {
  color: var(--text-color);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

/* Header Improvements */
.page-header {
  /* background: white; */
  padding: 30px;
  border-radius: var(--border-radius);
  /* box-shadow: var(--box-shadow); */
  margin-bottom: 30px;
}

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

.page-title h1 span {
  color: var(--primary-color);
  font-weight: 300;
}

/* Button Improvements */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 12px 24px;
  transition: var(--transition);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
}

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

.btn-primary:hover {
  background: #4a7a5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: var(--secondary-color);
  color: var(--text-color);
  border: 2px solid var(--primary-color);
}

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

.btn-outline-primary {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-outline-success {
  color: #4caf50;
  border: 2px solid #4caf50;
  background: transparent;
}

.btn-outline-success:hover {
  background: #4caf50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.btn-outline-danger {
  color: #f44336;
  border: 2px solid #f44336;
  background: transparent;
}

.btn-outline-danger:hover {
  background: #f44336;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(244, 67, 54, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

/* Table Improvements */
.table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.table thead th {
  background: var(--secondary-color);
  color: var(--text-color);
  font-weight: 600;
  border: none;
  padding: 15px 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.table tbody td {
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.table tbody tr:hover {
  background: rgba(252, 248, 221, 0.3);
}

/* Badge Improvements */
.badge {
  border-radius: 20px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: #4caf50;
  color: white;
}

.badge-warning {
  background: #ff9800;
  color: white;
}

.badge-danger {
  background: var(--primary-color);
  color: white;
}

/* Chart Container */
.chart-container {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
}

.chart-title {
  color: var(--text-color);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--secondary-color);
}

/* Progress Bar */
.progress {
  height: 8px;
  border-radius: 4px;
  background: #f0f0f0;
  overflow: hidden;
}

.progress-bar {
  background: var(--primary-color);
  border-radius: 4px;
}

/* Form Improvements */
.form-control {
  border-radius: var(--border-radius);
  border: 2px solid #e9ecef;
  padding: 12px 16px;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
}

/* Modal Improvements */
.modal-content {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: var(--secondary-color);
  border-bottom: 2px solid var(--primary-color);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-title {
  color: var(--text-color);
  font-weight: 600;
}

/* Alert Improvements */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 16px 20px;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stat-widget-one {
    flex-direction: column;
    text-align: center;
  }
  
  .stat-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .page-title h1 {
    font-size: 24px;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(228, 54, 54, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

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

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c62828;
}

/* Activity List Styles */
.activity-list {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.activity-icon i {
  color: white;
  font-size: 16px;
}

.activity-content h6 {
  margin: 0 0 5px 0;
  font-weight: 600;
  color: var(--text-color);
}

.activity-content p {
  margin: 0 0 5px 0;
  color: #666;
  font-size: 14px;
}

.activity-content small {
  font-size: 12px;
}

/* Quick Action Cards */
.quick-actions {
  padding: 10px 0;
}

.quick-action-card {
  display: block;
  padding: 20px;
  background: var(--secondary-color);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.quick-action-card:hover {
  background: white;
  border-color: var(--primary-color);
  color: var(--text-color);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.quick-action-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.quick-action-icon i {
  color: white;
  font-size: 20px;
}

.quick-action-card h6 {
  margin: 0 0 8px 0;
  font-weight: 600;
  font-size: 14px;
}

.quick-action-card p {
  margin: 0;
  font-size: 12px;
  color: #666;
}

/* Performance Metrics */
.performance-metrics {
  padding: 10px 0;
}

.metric-item {
  margin-bottom: 20px;
}

.metric-item:last-child {
  margin-bottom: 0;
}

.metric-label {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

/* User Info in Tables */
.user-info {
  display: flex;
  align-items: center;
}

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

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 2px;
}

.user-role {
  font-size: 12px;
  color: #666;
  text-transform: none;
}

/* Stat Change Indicators */
.stat-change {
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
}

.stat-change.text-success {
  color: #4caf50 !important;
}

.stat-change.text-primary {
  color: var(--primary-color) !important;
}

.stat-change.text-warning {
  color: #ff9800 !important;
}

/* Chart Container Height */
.chart-container {
  min-height: 300px;
}

.chart-container canvas {
  max-height: 250px;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .quick-action-card {
    padding: 15px;
  }
  
  .quick-action-icon {
    width: 40px;
    height: 40px;
  }
  
  .quick-action-icon i {
    font-size: 16px;
  }
  
  .activity-item {
    padding: 10px 0;
  }
  
  .activity-icon {
    width: 35px;
    height: 35px;
  }
  
  .user-avatar {
    width: 35px;
    height: 35px;
    font-size: 12px;
  }
}
/* Welcome badge – themed + larger text */
.welcome-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 24px 28px;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--primary-color) 0%, #4a7a5a 100%);
  color: #fff;
  box-shadow: var(--box-shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Commission Section Styling */
.commission-section {
  background: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-top: 20px;
}

.commission-section h6 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 15px;
}

.commission-section .form-group {
  margin-bottom: 0;
}

.commission-section .form-label {
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 8px;
}

.commission-section .input-group {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.commission-section .form-control {
  border: 1px solid #e0e0e0;
  border-right: none;
  padding: 12px 15px;
  font-size: 14px;
}

.commission-section .btn {
  border-radius: 0;
  padding: 12px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.commission-section .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.commission-section .form-text {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

/* Filter and Form Improvements */
.chart-container {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--box-shadow);
  margin-bottom: 24px;
}

.chart-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

/* Form Controls */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 12px 15px;
  font-size: 14px;
  transition: var(--transition);
  background-color: #fff;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(94, 147, 108, 0.25);
  outline: none;
}

.form-control:disabled {
  background-color: #f8f9fa;
  opacity: 0.6;
}

/* Select Dropdowns */
select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 12px;
  padding-right: 40px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select.form-control option {
  padding: 8px 12px;
  font-size: 14px;
  background-color: #fff;
  color: var(--text-color);
}

/* Dropdown Menu Fixes */
.dropdown-menu {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1050;
}

.dropdown-item {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-color);
  transition: var(--transition);
  border: none;
  background: transparent;
}

.dropdown-item:hover {
  background-color: var(--primary-color);
  color: white;
}

.dropdown-item.active {
  background-color: var(--primary-color);
  color: white;
}

/* Filter Form Layout */
#filterForm {
  margin-bottom: 0;
}

#filterForm .row {
  margin: 0 -10px;
}

#filterForm .col-md-3,
#filterForm .col-md-4,
#filterForm .col-md-6,
#filterForm .col-md-12 {
  padding: 0 10px;
  margin-bottom: 15px;
}

/* Form Labels */
.form-label {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-label.fw-bold {
  font-weight: 700;
}

/* Button Improvements */
.btn {
  border-radius: var(--border-radius);
  padding: 10px 20px;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  font-size: 14px;
}

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

.btn-primary:hover {
  background: #4a7a5a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(94, 147, 108, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Filter Button Group */
.btn-group .btn {
  border-radius: 0;
}

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

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

/* Responsive Filter Improvements */
@media (max-width: 768px) {
  .chart-container {
    padding: 15px;
  }
  
  #filterForm .col-md-3,
  #filterForm .col-md-4,
  #filterForm .col-md-6 {
    margin-bottom: 10px;
  }
  
  .form-control {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Clickable Cards */
.clickable-card {
  cursor: pointer;
  transition: var(--transition);
}

.clickable-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.clickable-card:active {
  transform: translateY(-1px);
}

/* Table Styling - All Column Values */
.table {
  font-family: Arial, sans-serif;
}

.table th {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 2px solid var(--primary-color);
  padding: 12px 8px;
  background-color: #f8f9fa;
}

.table td {
  font-family: Arial, sans-serif;
  font-size: 11px;
  padding: 10px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #e9ecef;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Table Content Specific Styling */
.table .user-info {
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.table .user-name {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
}

.table .user-role {
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #666;
}

.table .badge {
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
}

.table .text-muted {
  font-family: Arial, sans-serif;
  font-size: 10px;
}

.table .text-dark {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
}

.table .fw-bold {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
}

/* Table Buttons */
.table .btn {
  font-family: Arial, sans-serif;
  font-size: 10px;
  padding: 4px 8px;
}

.table .btn-sm {
  font-family: Arial, sans-serif;
  font-size: 10px;
  padding: 3px 6px;
}

/* Table Links */
.table a {
  font-family: Arial, sans-serif;
  font-size: 11px;
}

/* Table Small Text */
.table small {
  font-family: Arial, sans-serif;
  font-size: 10px;
}

/* Table Bank Details */
.table .bank-details {
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.table .bank-details .fw-bold {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
}

.table .bank-details small {
  font-family: Arial, sans-serif;
  font-size: 10px;
}

/* Table Amount Values */
.table .text-success {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
}

/* Table Status Badges */
.table .badge-success,
.table .badge-warning,
.table .badge-danger,
.table .badge-info,
.table .badge-secondary {
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 500;
}

/* Table Empty State */
.table .text-center .text-muted {
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.table .text-center h5 {
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.table .text-center p {
  font-family: Arial, sans-serif;
  font-size: 11px;
}

/* Table Pagination */
.table-responsive .btn-group .btn {
  font-family: Arial, sans-serif;
  font-size: 10px;
}

.table-responsive .btn-light {
  font-family: Arial, sans-serif;
  font-size: 10px;
}

/* Table Header Icons */
.table th i {
  font-size: 10px;
  margin-right: 4px;
}

/* Table Cell Icons */
.table td i {
  font-size: 10px;
  margin-right: 4px;
}

/* Table User Avatar Text */
.table .user-avatar {
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
}

/* Table Responsive Adjustments */
@media (max-width: 768px) {
  .table th,
  .table td {
    font-size: 10px;
    padding: 8px 6px;
  }
  
  .table .badge {
    font-size: 9px;
    padding: 3px 6px;
  }
  
  .table .btn {
    font-size: 9px;
    padding: 3px 6px;
  }
}

.welcome-badge h1 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.2;
}

.welcome-badge h1 span {
  color: var(--secondary-color);
  font-weight: 700;
}

.welcome-badge p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 500;
  font-size: clamp(14px, 1.6vw, 18px);
}

/* Small screens */
@media (max-width: 576px) {
  .welcome-badge { padding: 18px 20px; gap: 6px; }
}




/* Keep primary button green on all states (override Bootstrap blue) */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
}

/* Themed focus ring (instead of blue) */
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(94, 147, 108, 0.3) !important; /* matches #5E936C */
  outline: none !important;
}

/* Support for input-backed buttons (Bootstrap 5) */
.btn-check:focus + .btn-primary,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.25rem rgba(94, 147, 108, 0.3) !important;
}

/* Disabled state */
.btn-primary.disabled,
.btn-primary:disabled {
  background: #7fb28c !important;
  border-color: #7fb28c !important;
  color: #fff !important;
}