/* ProManage - Client & Project Management System Styles */

/* Core variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-bg: #f5f8fa;
    --sidebar-bg: #ffffff;
    --card-border-color: rgba(0, 0, 0, 0.125);
    --sidebar-width: 250px;
    --primary: #4361ee;
    --primary-hover: #3a56d4;
    --secondary: #3f3d56;
    --accent: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #2ec4b6;
    --warning: #ff9f1c;
    --danger: #e71d36;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --sidebar-bg-start: #2b2d3e;  /* Starting gradient color */
    --sidebar-bg-end: #1a1c2d;    /* Ending gradient color */
    --sidebar-text: #b4b6c8;      /* Normal text color */
    --sidebar-active-start: #4361ee; /* Active item gradient start */
    --sidebar-active-end: #4895ef;   /* Active item gradient end */
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08); /* Hover background */
}

/* General styles */
body {
    background-color: #f5f7fa;
    color: var(--secondary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-bottom: 70px; /* For footer */
}

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(to right, var(--primary), #4895ef);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 1rem 1.5rem;
}

/* Dashboard cards */
.stats-card {
    border-left: 4px solid var(--primary-color);
}

.stats-card.card-clients {
    border-left-color: var(--primary-color);
}

.stats-card.card-projects {
    border-left-color: var(--success-color);
}

.stats-card.card-tasks {
    border-left-color: var(--warning-color);
}

.stats-card.card-documents {
    border-left-color: var(--info-color);
}

.stats-card .card-icon {
    font-size: 2rem;
    opacity: 0.7;
}

/* Client, project, and task status badges */
.badge {
    font-weight: 500;
}

/* Section headers with icon */
.section-header {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--secondary);
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.section-header i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Tables */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table th {
    background-color: rgba(13, 110, 253, 0.03);
    font-weight: 500;
}

/* Custom checkbox */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Form styling */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.required-field::after {
    content: "*";
    color: var(--danger-color);
    margin-left: 3px;
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Lists */
.list-group-item-action:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Sidebar styling */
.sidebar {
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--card-border-color);
}

/* Modern Sidebar Navigation Styles */
.sidebar {
  background: linear-gradient(135deg, #2b2d3e 0%, #1a1c2d 100%);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  height: 100%;
  position: sticky;
  top: 0;
  padding-top: 20px;
  transition: all 0.3s ease;
}

/* Navigation Links */
.sidebar .nav-link {
  border-radius: 8px;
  color: #b4b6c8;
  font-weight: 500;
  margin: 6px 12px;
  padding: 10px 15px;
  position: relative;
  transition: all 0.2s ease-in-out;
}

/* Icon styling */
.sidebar .nav-link i {
  font-size: 18px;
  margin-right: 10px;
  width: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

/* Hover state */
.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(5px);
}

/* Active state */
.sidebar .nav-link.active {
  background: linear-gradient(90deg, #4361ee, #4895ef);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.sidebar .nav-link.active i {
  color: #ffffff;
}

/* Section headers */
.sidebar .nav-section-title {
  color: #6c757d;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  margin: 20px 15px 10px;
  text-transform: uppercase;
}

/* Badge styling */
.sidebar .badge {
  background-color: #f72585;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
}

/* Sub navigation */
.sidebar .nav-link[data-bs-toggle="collapse"] {
  position: relative;
}

.sidebar .nav-link[data-bs-toggle="collapse"]::after {
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s;
}

.sidebar .nav-link[data-bs-toggle="collapse"][aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Collapse items */
.sidebar .collapse .nav-link,
.sidebar .collapsing .nav-link {
  border-radius: 6px;
  font-size: 0.9rem;
  margin-left: 2rem;
  padding: 8px 12px;
}

/* User section at bottom */
.sidebar .user-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
  padding: 15px;
}

/* Make sidebar responsive */
@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    left: -100%;
    width: 250px;
    z-index: 1040;
    transition: left 0.3s ease;
  }
  
  .sidebar.show {
    left: 0;
  }
  
  .sidebar-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    height: 100vh;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1039;
  }
}

/* Footer styling */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--light-color);
    box-shadow: 0 -0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    z-index: 1000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .sidebar {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
}

/* Activity timeline */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--card-border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-date {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Project progress bar */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

/* Client and project info list */
.info-list {
    list-style: none;
    padding-left: 0;
}

.info-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--card-border-color);
}

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

.info-label {
    font-weight: 500;
    color: var(--secondary-color);
}

/* Comment section styling */
.comment-box {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 500;
}

.comment-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* File upload styling */
.custom-file-upload {
    border: 1px solid #ddd;
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 0.25rem;
}

/* Document card style */
.document-card {
    border-left: 3px solid var(--info-color);
}

.document-icon {
    font-size: 2rem;
    color: var(--info-color);
}

/* Team member card */
.team-card .card-img-top {
    height: 120px;
    object-fit: cover;
}

.team-card .card-title {
    margin-bottom: 0.25rem;
}

.team-card .card-subtitle {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

/* Login page styling */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Dashboard chart container */
.chart-container {
    position: relative;
    height: 250px;
}

/* Avatar styling */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
}

/* Task priority indicators */
.priority-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.priority-low {
    background-color: var(--info-color);
}

.priority-medium {
    background-color: var(--primary-color);
}

.priority-high {
    background-color: var(--warning-color);
}

.priority-urgent {
    background-color: var(--danger-color);
}

/* Kanban board */
.kanban-column {
    min-height: 500px;
}

.kanban-card {
    cursor: grab;
    margin-bottom: 0.75rem;
}

.kanban-card:active {
    cursor: grabbing;
}

/* Profile page */
.profile-header {
    background-color: var(--light-color);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 5px solid white;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Custom styles for select2 dropdown (if used) */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: #ced4da;
    border-radius: 0.25rem;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--multiple:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Skill badge */
.skill-badge {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    font-size: 0.875rem;
    border-radius: 2rem;
    padding: 0.25rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* Filter section */
.filter-section {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

/* Modern UI Enhancements */
select[name="status"] option[value="Planning"] {
    background-color: #c8b6ff;
}

select[name="status"] option[value="In Progress"] {
    background-color: #84c7d0;
}

select[name="status"] option[value="On Hold"] {
    background-color: #ffadad;
}

select[name="status"] option[value="Completed"] {
    background-color: #9bf6ff;
}

/* Priority styling */
select[name="priority"] option[value="Low"] {
    background-color: #caffbf;
}

select[name="priority"] option[value="Medium"] {
    background-color: #fdffb6;
}

select[name="priority"] option[value="High"] {
    background-color: #ffb5a7;
}

select[name="priority"] option[value="Urgent"] {
    background-color: #ff9aa2;
}

/* Page title styling */
h1.h2 {
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

h1.h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 2px;
}

/* Make Select2 match our theme */
.select2-container--default .select2-selection--single {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    height: calc(3.5rem + 2px);
    padding: 0.75rem 1rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 3.5rem;
}

/* Modal styling */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-image: linear-gradient(to right, var(--primary), #4895ef);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .btn-close {
    color: white;
    box-shadow: none;
    filter: brightness(0) invert(1);
}

/* Date inputs styling */
input[type="date"] {
    position: relative;
}

/* Progress bar styling for budget */
.budget-progress {
    height: 0.5rem;
    border-radius: 1rem;
    margin-top: 0.25rem;
}

/* Help text styling */
.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Micro animation for buttons */
.btn:active {
    transform: scale(0.95);
}

.btn {
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: none;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Button hover effects - more subtle */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(50, 50, 93, 0.1);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(50, 50, 93, 0.1);
}

/* Consistent button sizes */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-lg {
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
}

/* Icon buttons - fixed proportions */
.btn i {
    margin-right: 0.4rem;
    font-size: 1.25em; /* Reduced from 1.9em */
    vertical-align: middle;
}

/* Icon-only buttons */
.btn-icon-only {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.btn-icon-only.btn-sm {
    width: 1.75rem;
    height: 1.75rem;
}

.btn-icon-only.btn-lg {
    width: 2.75rem;
    height: 2.75rem;
}

.btn-icon-only i {
    margin-right: 0;
    font-size: 1em;
}

/* Circular buttons */
.btn-circle {
    border-radius: 50%;
    padding: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-circle.btn-sm {
    width: 2rem;
    height: 2rem;
}

.btn-circle.btn-lg {
    width: 3rem;
    height: 3rem;
}

/* Chat input button consistency */
.chat-input-container button {
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

/* Chat box close button */
.chat-box-actions .btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

/* Button hover effects */
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Primary button styling */
.btn-primary {
    background: linear-gradient(45deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--primary-hover) 0%, var(--primary) 100%);
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.25);
}

/* Secondary button styling */
.btn-secondary {
    background: linear-gradient(45deg, var(--secondary) 0%, #57546e 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #57546e 0%, var(--secondary) 100%);
}

/* Outline buttons */
.btn-outline-primary, button.btn.btn-primary {
    background-color: var(--primary);
    color: white;
    /* background: transparent; */
    /* border: 2px solid var(--primary); */
    border: 1px solid white;
    /* color: var(--primary); */
    /* padding: calc(1.65rem - 5px) calc(1.75rem - 5px); */
}

button.btn.btn-sm.btn-outline-danger.remove-contact {
    color: white;
    border: 1px solid white;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
    border: 1px solid white;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    padding: calc(0.65rem - 2px) calc(1.75rem - 2px);
}

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

/* Success button */
.btn-success {
    background: linear-gradient(45deg, var(--success) 0%, #47e5d8 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(45deg, #47e5d8 0%, var(--success) 100%);
}

/* Danger button */
.btn-danger {
    background: linear-gradient(45deg, var(--danger) 0%, #f64c5f 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(45deg, #f64c5f 0%, var(--danger) 100%);
}

/* Warning button */
.btn-warning {
    background: linear-gradient(45deg, var(--warning) 0%, #ffb347 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(45deg, #ffb347 0%, var(--warning) 100%);
}

/* Small buttons */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* Large buttons */
.btn-lg {
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
}

/* Button with icon */
.btn i {
    margin-right: 0.4rem;
    font-size: 1.25em; /* Reduced from 1.9em */
    vertical-align: middle;
}

.btn-icon-only {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.btn-icon-only.btn-sm {
    width: 1.75rem;
    height: 1.75rem;
}

.btn-icon-only.btn-lg {
    width: 2.75rem;
    height: 2.75rem;
}

.btn-icon-only i {
    margin-right: 0;
    font-size: 1em;
}

/* Floating action button */
.btn-floating {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn-floating i {
    margin: 0;
    font-size: 1.2rem;
}

.btn-floating:hover {
    transform: translateY(-4px) rotate(5deg);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* Ripple effect for buttons */
.btn::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .4s, opacity .5s;
}

.btn:active::after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* Enhanced Action Buttons */
.btn-action-group {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-action {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: white;
  border: 1px solid #e0e0e0;
}

.btn-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

/* View button */
.btn-action-view {
  color: var(--primary);
  border-color: var(--primary);
}

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

/* Edit button */
.btn-action-edit {
  color: var(--secondary);
  border-color: var(--secondary);
}

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

/* Delete button */
.btn-action-delete {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-action-delete:hover {
  background-color: var(--danger);
  color: white;
}

/* Sidebar user list adjustments */
.sidebar-heading {
    font-size: 0.8rem;
    letter-spacing: 0.05rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #495057 !important;
    padding: 1rem 0.75rem 0.5rem;
    margin: 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background-color: transparent;
}

.user-list-container {
    background-color: transparent; /* Remove dark background */
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
    box-shadow: inset 0 5px 5px -5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.user-list-container::-webkit-scrollbar {
    width: 5px;
}

.user-list-container::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.15);
    border-radius: 10px;
}

.user-list-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0,0,0,0.25);
}

.user-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.user-item:hover {
    background-color: rgba(0,0,0,0.03);
    transform: translateX(3px);
}

.user-item:active {
    background-color: rgba(0,0,0,0.06);
    transform: translateX(5px) scale(0.98);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.2s ease;
}

.user-item:hover .user-avatar {
    border-color: #ffffff;
    transform: scale(1.05);
}

.user-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: white;
    font-weight: bold;
    font-size: 0.95rem;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.user-status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.user-status-indicator.online {
    background: #2ecc71; /* Bright green */
    box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.3),
                0 0 5px rgba(46, 204, 113, 0.5);
}

.user-status-indicator.offline {
    background: #95a5a6; /* Subtle gray */
    box-shadow: none;
}

.user-info {
    flex-grow: 1;
    overflow: hidden;
    transition: all 0.2s ease;
}

.user-name {
    color: #343a40;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    transition: all 0.2s ease;
}

.user-item:hover .user-name {
    color: #000;
}

.user-status-text {
    font-size: 0.7rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#online-users-count {
    font-size: 0.7rem;
    font-weight: 600;
    background: linear-gradient(145deg, #0d6efd, #0a58ca);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.user-list-container .spinner-border {
    color: #6c757d !important;
    margin: 1rem auto;
}

.user-list-empty {
    color: #6c757d;
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
    font-style: italic;
}

.user-status-separator {
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,0.1) 50%, 
        rgba(0,0,0,0) 100%);
    margin: 5px 10px;
}

/* If using a fixed-height sidebar layout */
.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar .list-group {
    flex-shrink: 0;
}

.sidebar .user-list-container {
    flex-grow: 1;
    overflow-y: auto;
}

/* Make scrollbar less obtrusive on dark background */
.user-list-container::-webkit-scrollbar {
    width: 4px;
}

.user-list-container::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.user-list-container::-webkit-scrollbar-track {
    background-color: transparent;
}

/* Anonymous avatar styling */
.avatar-anonymous {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #718096, #4A5568);
    color: white;
    font-size: 1rem;
}

.avatar-anonymous i {
    opacity: 0.9;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

/* Subtle animation when hovering */
.user-item:hover .avatar-anonymous i {
    transform: scale(1.15);
    transition: transform 0.3s ease;
}

/* Add a subtle border to anonymous avatars */
.user-avatar {
    border: 2px solid rgba(255,255,255,0.8);
}

/* User status indicator position adjustment for anonymous icons */
.user-avatar .user-status-indicator {
    bottom: 0;
    right: 0;
    border: 2px solid #f8f9fa;
    z-index: 2;
}

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

.user-avatar.small {
    width: 32px;
    height: 32px;
}

.contact-name {
    font-weight: 500;
    margin-left: 0px;
    color: #1e293b;
}

.message-content {
    margin-bottom: 2px;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 2px;
    text-align: right;
}

.send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.send-button:hover {
    background-color: #0b5ed7;
}

.send-button:active {
    background-color: #0a58ca;
    transform: scale(0.95);
}

/* Green text for online users */
.user-item .user-info .online-text {
    color: #42b72a;
    font-weight: 500;
}

/* Unread message count badge */
.user-item .unread-count {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 5px;
}

/* Chat box container */
.chat-box-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 450px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.40);
    display: none; /* Change this from flex to none to hide by default */
    flex-direction: column;
    overflow: hidden;
    z-index: 1050;
    border: 1px solid #e5e9f2;
}

/* Chat messages container */
.chat-messages-container {
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
    background-color: #f8f9fa;
    gap: 8px;
}

/* Base chat message style */
.chat-message {
    max-width: 75%;
    padding: 10px 12px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 4px;
}

/* Incoming message - align left */
.chat-message-incoming {
    align-self: flex-start;
    background-color: #ffffff;
    color: #212529;
    border-bottom-left-radius: 4px;
    border: 1px solid #e9ecef;
    margin-right: auto;
}

/* Outgoing message - align right */
.chat-message-outgoing {
    align-self: flex-end;
    background-color: #0d6efd;
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

/* Message content */
.message-content {
    margin-bottom: 4px;
    line-height: 1.4;
}

/* Message timestamp */
.message-time {
    font-size: 0.7rem;
    opacity: 0.8;
    text-align: right;
}

/* Make outgoing message time white */
.chat-message-outgoing .message-time {
    color: rgba(255,255,255,0.9);
}

/* Input container */
.chat-input-container {
    display: flex;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #e5e9f2;
    align-items: center;
    gap: 8px;
}

.chat-input-container textarea {
    flex-grow: 1;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 12px;
    resize: none;
    height: 40px;
    max-height: 100px;
    overflow-y: auto;
}

.chat-input-container button {
    border-radius: 50%;
    width: 3.5rem;
    height: 2.5rem;
    padding: 0;
}

/* Enhanced Chat Box Header */
.chat-box-header {
    padding: 5px 16px;
    background: linear-gradient(to right, #0d6efd, #0a58ca);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Contact info section */
.chat-contact-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Avatar styling */
.chat-contact-info .user-avatar {
    width: 36px;
    height: 36px;
    position: relative;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.chat-contact-info .avatar-placeholder {
    font-size: 16px;
    color: white;
    font-weight: 500;
}

/* Status indicator positioning */
.chat-contact-info .user-status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Contact name styling */
.chat-contact-info .contact-name {
    font-size: 16px;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* Close button styling */
.chat-box-actions .btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white;
    background: rgb(255 255 255 / 0%);
    border: none;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.chat-box-actions .btn:hover {
    background: rgb(255 255 255 / 0%);
    transform: scale(1.05);
}

.chat-box-actions .btn:active {
    background: rgba(255,255,255,0.1);
    transform: scale(0.95);
}

.btn-icon-dots {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    transition: all 0.2s ease;
}

.btn-icon-dots:hover {
    background-color: #e9ecef;
    color: #212529;
}

.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}