:root {
  --primary-color: #006f67;
  --secondary-color: #6ebf4d;
  --primary-light: rgba(0, 111, 103, 0.1);
  --secondary-light: rgba(110, 191, 77, 0.1);
  --text-color: #333;
  --text-light: #666;
  --background-color: #f9fafb;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
  --radius: 8px;
}

.sidebar {
  transition: width 0.3s ease;
  overflow: hidden !important; /* Forçar overflow hidden */
  width: 80px;
  position: fixed;
  height: calc(100vh - 73px);
  z-index: 900;
  top: 72px;
  background-color: var(--card-bg);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

main {
  margin-left: 80px;
  width: calc(100% - 80px);
  transition: margin-left 0.3s ease;
}

.sidebar.expanded {
  width: 420px;
  box-shadow: 4px 8px 7px 3px rgba(0, 0, 0, 0.1);
  overflow-x: hidden;
}

main.sidebar-expanded {
  margin-left: 80px;
  width: calc(100% - 80px);
}

.sidebar .sidebar-header h2 span,
.sidebar-date-filter span,
.sidebar-activity-client,
.sidebar-activity-title span,
.sidebar-search {
  opacity: 0;
  visibility: hidden;
  white-space: nowrap;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  display: none;
}

.sidebar.expanded .sidebar-header h2 span,
.sidebar.expanded .sidebar-date-filter span,
.sidebar.expanded .sidebar-activity-client,
.sidebar.expanded .sidebar-activity-title span,
.sidebar.expanded .sidebar.expanded .sidebar-search {
  opacity: 1;
  visibility: visible;
  display: block;
}

.sidebar:not(.expanded) {
  border-right: 1px solid var(--border-color);
  overflow: hidden !important; /* Forçar overflow hidden */
  padding: 0;
}

.sidebar:not(.expanded) .sidebar-header h2 {
  display: none;
}

.sidebar:not(.expanded) #sidebar-new-activity-btn {
  display: none;
}

.sidebar:not(.expanded) .sidebar-date-filter {
  flex-direction: column;
  gap: 0.25rem;
  background-color: var(--primary-light);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.sidebar:not(.expanded) .date-nav-btn {
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
}

.sidebar:not(.expanded) .sidebar-date-filter #sidebar-today-btn {
  display: none;
}

.sidebar:not(.expanded) .sidebar-date-filter .date-nav-btn {
  display: none;
}

.sidebar:not(.expanded) .sidebar-date-filter button {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

.sidebar:not(.expanded) .sidebar-date-filter #sidebar-current-date {
  display: block;
  font-weight: 600;
  opacity: 1;
  visibility: visible;
  border-radius: 10px;
  text-align: center;
  font-size: 0.75rem;
  min-width: 55px;
}

.sidebar:not(.expanded) .sidebar-activity-card {
  padding: 0.5rem 0.25rem;
  margin: 0.5rem auto;
  width: 52px;
  height: auto;
  min-height: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-left: none;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
  box-sizing: border-box;
}

.sidebar:not(.expanded) .sidebar-activity-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  background-color: rgba(0, 111, 103, 0.05);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

.sidebar:not(.expanded) .sidebar-activity-card.high-priority::after,
.sidebar:not(.expanded) .sidebar-activity-card.medium-priority::after,
.sidebar:not(.expanded) .sidebar-activity-card.low-priority::after {
  display: none;
}

.sidebar:not(.expanded) .sidebar-activity-card.completed {
  opacity: 0.5;
  background-color: var(--primary-light);
}

.sidebar:not(.expanded) .sidebar-activity-title {
  margin-bottom: 4px;
  justify-content: center;
}

.sidebar:not(.expanded) .sidebar-activity-title i {
  margin-right: 0;
  font-size: 1rem;
}

.sidebar:not(.expanded) .sidebar-activity-client {
  display: none;
}

.sidebar:not(.expanded) .sidebar-activity-time {
  font-size: 0.6rem;
  font-weight: 500;
  margin-top: 2px;
  width: 100%;
  text-align: center;
  overflow: visible;
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 2px;
  line-height: 1.2;
}

.sidebar:not(.expanded) .sidebar-activity-time i {
  display: none;
}

.sidebar:not(.expanded) .sidebar-activity-card::before {
  content: attr(data-title);
  position: fixed;
  max-width: 80px;
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 0.8rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  white-space: normal;
  margin-top: -20px;
  z-index: 1000;
  pointer-events: none;
}

.empty-state-compact::before {
  position: fixed;
  left: 80px;
  max-width: 180px;
  transform: none;
  z-index: 1100;
}

.empty-state-compact {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  width: 100%;
  position: relative;
}

.empty-state-compact i {
  font-size: 1.8rem;
  color: var(--primary-color);
  opacity: 0.4;
}

.empty-state-compact::before {
  content: attr(data-title);
  position: absolute;
  left: 65px;
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  font-size: 0.8rem;
  visibility: hidden;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
  pointer-events: none;
  max-width: 200px;
}

.empty-state-compact:hover::before {
  visibility: visible;
  opacity: 1;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-color);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  margin-right: 1rem;
}

.mobile-menu-toggle:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.d-md-none {
  display: none;
}

@media (max-width: 768px) {
  .d-md-none {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    width: 0;
    position: fixed;
    height: 100%;
    z-index: 1000;
    top: 73px;
  }

  .sidebar.expanded {
    width: 280px;
  }

  main {
    margin-left: 0;
    width: 100%;
  }

  main.sidebar-expanded {
    margin-left: 0;
    width: 100%;
  }

  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 899;
    display: none;
  }

  .mobile-overlay.active {
    display: block;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

.sidebar-activities-list {
  width: 100%;
  box-sizing: border-box;
}

.sidebar-header,
.sidebar-date-filter,
.sidebar-activities-list,
.sidebar-section-header {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.sidebar-activity-card {
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.empty-state-compact::before,
.sidebar:not(.expanded) .sidebar-activity-card::before {
  z-index: 1100;
  box-sizing: border-box;
}

.sidebar:not(.expanded) .sidebar-date-filter #sidebar-current-date {
  width: auto;
  min-width: 45px;
  max-width: 80px;
  overflow: hidden;
}

.sidebar:not(.expanded) .sidebar-activity-card::before,
.empty-state-compact::before {
  content: attr(data-title);
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 0.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  font-size: 0.8rem;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  left: 80px;
  max-width: 180px;
  transform: none;
  z-index: 1100;
}

.sidebar:not(.expanded) .sidebar-activity-card:hover::before,
.empty-state-compact:hover::before {
  visibility: visible;
  opacity: 1;
}

.sidebar.expanded .sidebar-search {
  display: block;
}

.sidebar-date-filter .current-date {
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
}

.sidebar-date-filter .current-date:hover {
  color: #006f67;
}

.sidebar-date-filter .current-date::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #006f67;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.sidebar-date-filter .current-date:hover::after {
  transform: scaleX(1);
}

.sidebar-date-filter .date-picker {
  opacity: 0;
  position: absolute;
  z-index: -1;
  height: 1px;
  width: 1px;
}

.sidebar-section-header {
  padding: 0.75rem 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--primary-light);
  opacity: 0.9;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-section-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  display: flex;
  align-items: center;
}

.sidebar-section-header.clickable-header {
  transition: background-color 0.2s ease;
}

.sidebar-section-header.clickable-header:hover {
  background-color: rgba(0, 111, 103, 0.05);
}

.sidebar-section-header h3 i {
  margin-right: 0.5rem;
  font-size: 0.85rem;
}

.section-toggle-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-toggle-btn i {
  font-size: 0.8rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-toggle-btn.collapsed i {
  transform: rotate(-90deg);
}

.section-activities-container {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
}

.section-activities-container.collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  margin: 0;
  padding: 0;
}

.section-activities-container.expanded {
  opacity: 1;
  transform: translateY(0);
}

.sidebar:not(.expanded) .sidebar-section-header {
  padding: 0.5rem 0;
  text-align: center;
  background-color: var(--primary-light);
  margin-bottom: 0.5rem;
}

.sidebar:not(.expanded) .sidebar-section-header h3 {
  justify-content: center;
}

.sidebar:not(.expanded) .section-toggle-btn {
  display: none;
}

.sidebar:not(.expanded) .sidebar-section-header.section-collapsed {
  opacity: 0.6;
  background-color: rgba(0, 111, 103, 0.1);
  margin-bottom: 0.75rem;
}

.sidebar:not(.expanded)
  .sidebar-section-header.section-collapsed
  h3
  i.section-icon-collapsed {
  opacity: 0.5;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.sidebar:not(.expanded) .sidebar-section-header.section-collapsed:hover {
  opacity: 0.8;
  background-color: rgba(0, 111, 103, 0.15);
}

.sidebar:not(.expanded)
  .sidebar-section-header.section-collapsed:hover
  h3
  i.section-icon-collapsed {
  opacity: 0.7;
  transform: scale(0.95);
}

.sidebar:not(.expanded) .sidebar-section-header span {
  display: none;
}

.sidebar:not(.expanded) .sidebar-section-header i {
  margin-right: 0;
  font-size: 1rem;
}

.sidebar-activity-card.unscheduled .sidebar-activity-time {
  opacity: 0.6;
  justify-content: center;
  margin-top: 4px;
}

.sidebar-activity-card.unscheduled .sidebar-activity-time i {
  margin-right: 0;
  font-size: 0.9rem;
  color: #acacac;
}

.sidebar:not(.expanded)
  .sidebar-activity-card.unscheduled
  .sidebar-activity-time {
  justify-content: center;
  margin-top: 2px;
}

.sidebar.expanded .sidebar-activity-card {
  padding: 0.75rem;
  margin: 0.5rem 0.75rem;
  width: calc(100% - 1.5rem);
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.sidebar.expanded .sidebar-activity-title {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.sidebar.expanded .sidebar-activity-title span {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sidebar.expanded .sidebar-activity-client {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-left: 1.7rem;
}

.sidebar.expanded .sidebar-activity-time {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.sidebar.expanded .sidebar-activity-time i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.priority-indicator {
  display: none;
}

.sidebar.expanded .sidebar-section-header {
  padding: 0.7rem 1rem 0.4rem;
  margin-top: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.sidebar.expanded .sidebar-section-header h3 {
  font-size: 0.95rem;
}

.sidebar.expanded .sidebar-activities-list {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.3rem;
}

.sidebar-activity-card,
.sidebar:not(.expanded) .sidebar-activity-card {
  border-left-color: #e5e7eb;
  border-radius: var(--radius);
}

.sidebar:not(.expanded) .sidebar-activity-card {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background-color: white;
}

.sidebar-section-header {
  padding: 0.75rem 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--primary-light);
  opacity: 0.9;
  width: 100%;
  box-sizing: border-box;
}

.sidebar:not(.expanded) .sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.sidebar:not(.expanded) .sidebar-section-header h3 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  width: 100%;
}

.sidebar-header,
.sidebar-date-filter,
.sidebar-search,
.sidebar-activities-list {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.sidebar:not(.expanded) span,
.sidebar:not(.expanded) .sidebar-activity-title span,
.sidebar-activity-client,
.sidebar-activity-time,
.sidebar-section-header h3 span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-activity-card.unscheduled:hover {
  box-shadow: var(--shadow-md);
}

.sidebar-region-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: var(--sidebar-bg-color);
}

.region-icon {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.region-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-color);
}

.region-filter-toggle i {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  transition: transform 0.2s ease-in-out;
}

.sidebar:not(.expanded) .sidebar-region-filter {
  padding: 0.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.sidebar:not(.expanded) .region-icon {
  margin-right: 0;
  font-size: 1.1rem;
}

.sidebar:not(.expanded) .region-filter-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
}

.sidebar:not(.expanded) .region-filter-toggle span,
.sidebar:not(.expanded) .region-filter-toggle i {
  display: none;
}

.sidebar:not(.expanded) .region-filter-toggle.has-filter .region-icon {
  color: #ffffff;
  background-color: var(--primary-color);
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.region-filter-toggle.has-filter {
  position: relative;
}

.region-filter-toggle.has-filter::after {
  content: "";
  position: absolute;
  top: 0;
  right: -5px;
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.region-dropdown-container {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 10px;
  display: none;
}

.sidebar:not(.expanded) {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 111, 103, 0.2) transparent;
}

.sidebar:not(.expanded)::-webkit-scrollbar {
  width: 4px;
}

.sidebar:not(.expanded)::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar:not(.expanded)::-webkit-scrollbar-thumb {
  background: rgba(0, 111, 103, 0.2);
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.sidebar:not(.expanded)::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 111, 103, 0.4);
}

.sidebar.expanded {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 111, 103, 0.3) transparent;
}

.sidebar.expanded::-webkit-scrollbar {
  width: 6px;
}

.sidebar.expanded::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.sidebar.expanded::-webkit-scrollbar-thumb {
  background: rgba(0, 111, 103, 0.3);
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

.sidebar.expanded::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 111, 103, 0.5);
}

.sidebar-scroll-top {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease,
    background-color 0.2s ease;
  z-index: 950;
}

.sidebar-scroll-top i {
  font-size: 0.9rem;
}

.sidebar-scroll-top:hover {
  background-color: #00867d;
}

.sidebar-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.region-dropdown-container .region-list {
  max-height: 150px;
  overflow-y: auto;
}

.region-dropdown-container label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 4px 0;
}

.region-dropdown-container label:hover {
  background-color: #f9f9f9;
}

.region-dropdown-container input[type="checkbox"] {
  margin-right: 8px;
}

.region-dropdown-container button {
  padding: 5px 10px;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.region-dropdown-container button#clear-regions {
  background-color: #f1f1f1;
}

.region-dropdown-container button#clear-regions:hover {
  background-color: #e5e5e5;
}

.region-dropdown-container button#apply-regions {
  background-color: var(--primary-color);
  color: white;
}

.region-dropdown-container button#apply-regions:hover {
  opacity: 0.9;
}

.sidebar-partner-toggle {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(0, 111, 103, 0.05);
}

.partner-filter-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.partner-filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-color);
  user-select: none;
  flex: 1;
}

.partner-filter-label i {
  font-size: 0.9rem;
  color: var(--primary-color);
}

.sidebar-partner-toggle .switch input:checked + .slider {
  background-color: #10b981;
  box-shadow: inset 0 2px 4px rgba(16, 185, 129, 0.3);
}

.sidebar-partner-toggle .switch input:focus + .slider {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.sidebar-partner-toggle .switch input:checked:hover + .slider {
  background-color: #059669;
}

.sidebar-overdue-filter {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(239, 68, 68, 0.05);
}

.overdue-filter-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.overdue-filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #dc2626;
  user-select: none;
  flex: 1;
}

.overdue-filter-label i {
  font-size: 0.9rem;
  color: #dc2626;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s ease;
  border-radius: 24px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background-color: #dc2626;
  box-shadow: inset 0 2px 4px rgba(220, 38, 38, 0.3);
}

.switch input:focus + .slider {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.switch:hover .slider {
  background-color: #b3b3b3;
}

.switch input:checked:hover + .slider {
  background-color: #b91c1c;
}

.overdue-counter {
  margin-top: 8px;
  padding: 6px 10px;
  background-color: rgba(220, 38, 38, 0.1);
  border-radius: 4px;
  border-left: 3px solid #dc2626;
  text-align: center;
}

.overdue-counter span {
  font-size: 0.8rem;
  font-weight: 500;
  color: #dc2626;
}

.sidebar:not(.expanded) .overdue-counter {
  display: none !important;
}

.sidebar:not(.expanded) .sidebar-partner-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar:not(.expanded) .partner-filter-container {
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}

.sidebar:not(.expanded) .partner-filter-label span {
  display: none;
}

.sidebar:not(.expanded) .partner-filter-label {
  justify-content: center;
  margin: 0;
  flex: none;
}

.sidebar:not(.expanded) .sidebar-overdue-filter {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar:not(.expanded) .overdue-filter-container {
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}

.sidebar:not(.expanded) .overdue-filter-label span {
  display: none;
}

.sidebar:not(.expanded) .overdue-filter-label {
  justify-content: center;
  margin: 0;
  flex: none;
}

.sidebar:not(.expanded) .switch {
  width: 32px;
  height: 18px;
}

.sidebar:not(.expanded) .slider:before {
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
}

.sidebar:not(.expanded) .switch input:checked + .slider:before {
  transform: translateX(14px);
}

.sidebar-activity-card.overdue {
  border-left: 3px solid #dc2626 !important;
  background-color: rgba(239, 68, 68, 0.05) !important;
}

.sidebar-activity-card.overdue:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

.sidebar-activity-card.activity-verde-copapel {
  border-left-color: #059669;
  background-color: rgba(5, 150, 105, 0.05);
}

.sidebar-activity-card.activity-verde-copapel:hover {
  background-color: rgba(5, 150, 105, 0.1);
}

.sidebar-activity-card.activity-verde-escuro-copapel {
  border-left-color: #0ea5e9;
  background-color: rgba(14, 165, 233, 0.05);
}

.sidebar-activity-card.activity-verde-escuro-copapel:hover {
  background-color: rgba(14, 165, 233, 0.1);
}

.sidebar-activity-card.activity-azul-pessoinhas {
  border-left-color: #1e40af;
  background-color: rgba(30, 64, 175, 0.05);
}

.sidebar-activity-card.activity-azul-pessoinhas:hover {
  background-color: rgba(30, 64, 175, 0.1);
}

.sidebar-activity-card.activity-cinza-olhinho {
  border-left-color: #6b7280;
  background-color: rgba(107, 114, 128, 0.05);
}

.sidebar-activity-card.activity-cinza-olhinho:hover {
  background-color: rgba(107, 114, 128, 0.1);
}

.sidebar-activity-card.activity-robo {
  border-left-color: #7c3aed;
  background-color: rgba(124, 58, 237, 0.05);
  position: relative;
}

.sidebar-activity-card.activity-robo:hover {
  background-color: rgba(124, 58, 237, 0.1);
}

.sidebar-activity-card.activity-laranja-outro-representante {
  border-left-color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.05);
}

.sidebar-activity-card.activity-laranja-outro-representante:hover {
  background-color: rgba(245, 158, 11, 0.1);
}

.sidebar-activity-card.activity-azul-parceiro {
  border-left-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.05);
}

.sidebar-activity-card.activity-azul-parceiro:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

.sidebar-activity-card.activity-robo::after {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.7rem;
  opacity: 0.6;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-verde-copapel,
.sidebar:not(.expanded) .sidebar-activity-card.activity-verde-escuro-copapel,
.sidebar:not(.expanded) .sidebar-activity-card.activity-azul-pessoinhas,
.sidebar:not(.expanded) .sidebar-activity-card.activity-cinza-olhinho,
.sidebar:not(.expanded) .sidebar-activity-card.activity-robo,
.sidebar:not(.expanded)
  .sidebar-activity-card.activity-laranja-outro-representante,
.sidebar:not(.expanded) .sidebar-activity-card.activity-azul-parceiro,
.sidebar:not(.expanded) .sidebar-activity-card.activity-amarelo-orfas {
  border: 2px solid;
  border-radius: 8px;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-verde-copapel {
  border-color: #059669;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-verde-copapel.overdue {
  border-color: #dc2626 !important;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-robo.overdue {
  border-color: #dc2626 !important;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-azul-parceiro.overdue {
  border-color: #dc2626 !important;
}

.sidebar:not(.expanded)
  .sidebar-activity-card.activity-laranja-outro-representante.overdue {
  border-color: #dc2626 !important;
}

.sidebar:not(.expanded)
  .sidebar-activity-card.activity-verde-escuro-copapel.overdue {
  border-color: #dc2626 !important;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-verde-escuro-copapel {
  border-color: #0ea5e9;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-azul-pessoinhas {
  border-color: #1e40af;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-cinza-olhinho {
  border-color: #6b7280;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-robo {
  border-color: #7c3aed;
}

.sidebar:not(.expanded)
  .sidebar-activity-card.activity-laranja-outro-representante {
  border-color: #f59e0b;
}

.sidebar:not(.expanded) .sidebar-activity-card.activity-azul-parceiro {
  border-color: #3b82f6;
}

.sidebar-activity-card.selected {
  border-left-width: 4px !important;
  box-shadow: 0 4px 12px rgba(0, 111, 103, 0.25) !important;
  transform: translateX(2px);
  background-color: rgba(0, 111, 103, 0.2) !important;
}

.sidebar-activity-card.selected:hover {
  transform: translateX(2px) !important;
  background-color: rgba(0, 111, 103, 0.25) !important;
}

.sidebar-activity-card.selected.activity-verde-copapel {
  background-color: rgba(5, 150, 105, 0.25) !important;
  border-left-color: #047857 !important;
}

.sidebar-activity-card.selected.activity-verde-copapel:hover {
  background-color: rgba(5, 150, 105, 0.3) !important;
}

.sidebar-activity-card.selected.activity-verde-escuro-copapel {
  background-color: rgba(14, 165, 233, 0.25) !important;
  border-left-color: #0284c7 !important;
}

.sidebar-activity-card.selected.activity-verde-escuro-copapel:hover {
  background-color: rgba(14, 165, 233, 0.3) !important;
}

.sidebar-activity-card.selected.activity-azul-pessoinhas {
  background-color: rgba(30, 64, 175, 0.25) !important;
  border-left-color: #1e3a8a !important;
}

.sidebar-activity-card.selected.activity-azul-pessoinhas:hover {
  background-color: rgba(30, 64, 175, 0.3) !important;
}

.sidebar-activity-card.selected.activity-cinza-olhinho {
  background-color: rgba(107, 114, 128, 0.25) !important;
  border-left-color: #374151 !important;
}

.sidebar-activity-card.selected.activity-cinza-olhinho:hover {
  background-color: rgba(107, 114, 128, 0.3) !important;
}

.sidebar-activity-card.selected.activity-robo {
  background-color: rgba(124, 58, 237, 0.25) !important;
  border-left-color: #6d28d9 !important;
}

.sidebar-activity-card.selected.activity-robo:hover {
  background-color: rgba(124, 58, 237, 0.3) !important;
}

.sidebar-activity-card.selected.activity-laranja-outro-representante {
  background-color: rgba(234, 88, 12, 0.25) !important;
}

.sidebar-activity-card.selected.activity-laranja-outro-representante:hover {
  background-color: rgba(234, 88, 12, 0.3) !important;
}

.sidebar-activity-card.selected.activity-azul-parceiro {
  background-color: rgba(59, 130, 246, 0.25) !important;
  border-left-color: #2563eb !important;
}

.sidebar-activity-card.selected.activity-azul-parceiro:hover {
  background-color: rgba(59, 130, 246, 0.3) !important;
}

.sidebar:not(.expanded) .sidebar-activity-card.selected {
  border-width: 3px !important;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 111, 103, 0.3) !important;
}

.sidebar:not(.expanded) .sidebar-activity-card.selected:hover {
  transform: scale(1.02) !important;
}

.sidebar-date-filter.hidden {
  display: none !important;
}

.sidebar:not(.expanded) .sidebar-date-filter.hidden {
  display: none !important;
}

.sidebar.expanded .sidebar-date-filter.hidden {
  display: none !important;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

.sidebar:not(.expanded) .sidebar-toggle-btn {
  margin-right: 0;
}

.sidebar-toggle-btn:hover {
  background-color: rgba(0, 111, 103, 0.1);
  transform: scale(1.05);
}

.sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.sidebar.expanded .sidebar-toggle-btn i {
  transform: rotate(90deg);
}

.sidebar-toggle-btn i {
  transition: transform 0.3s ease;
}

.sidebar .sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 5px 10px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar:not(.expanded) .sidebar-header {
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.section-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
}

.sidebar:not(.expanded) .section-counter {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(25%, -25%);
  min-width: 14px;
  height: 14px;
  font-size: 0.6rem;
}

.sidebar:not(.expanded) .sidebar-section-header {
  position: relative;
}

.sidebar:not(.expanded) .sidebar-section-header h3 span .section-counter {
  opacity: 1;
  visibility: visible;
  display: inline-flex;
}

.empty-section-message {
  padding: 0.5rem;
  text-align: center;
  color: #777;
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.7;
  border-bottom: 1px solid var(--border-color);
}

.empty-section-message p {
  margin: 0;
  padding: 0.25rem 0;
}

.sidebar-activity-title span {
  opacity: 1;
  visibility: visible;
  display: inline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar:not(.expanded) .sidebar-activity-title span {
  font-size: 0.7rem;
  font-weight: 500;
  max-width: 45px;
  display: block;
  text-align: center;
}

.sidebar.expanded .sidebar-activity-title span {
  font-size: 0.95rem;
  font-weight: 500;
  max-width: 100%;
  display: inline;
  text-align: left;
}

.sidebar-activity-card.search-result-completed {
  background-color: rgba(128, 128, 128, 0.1) !important;
  border-left: 3px solid #6b7280 !important;
  opacity: 0.7;
  color: #6b7280;
}

.sidebar-activity-card.search-result-completed:hover {
  background-color: rgba(128, 128, 128, 0.15);
  opacity: 0.85;
}

.sidebar-activity-card.search-result-completed .sidebar-activity-title span,
.sidebar-activity-card.search-result-completed .sidebar-activity-client,
.sidebar-activity-card.search-result-completed .sidebar-activity-time {
  color: #6b7280 !important;
}

.sidebar.expanded
  .sidebar-activity-card.search-result-completed
  .sidebar-activity-title::after {
  content: "\f023";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-left: 8px;
  color: #6b7280;
  font-size: 0.8rem;
}

.sidebar-activity-card.search-result-completed .sidebar-activity-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.sidebar-activity-card.search-result-completed
  .sidebar-activity-title
  span:first-of-type {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-activity-card.search-result-completed .sidebar-activity-title i {
  color: #6b7280 !important;
  opacity: 0.8;
}

.sidebar:not(.expanded) .sidebar-activity-card.search-result-completed {
  background-color: rgba(128, 128, 128, 0.1) !important;
  border: 2px solid #6b7280 !important;
  opacity: 0.7;
}

.sidebar:not(.expanded)
  .sidebar-activity-card.search-result-completed
  .sidebar-activity-title
  i {
  color: #6b7280 !important;
}

.sidebar:not(.expanded)
  .sidebar-activity-card.search-result-completed
  .sidebar-activity-time {
  color: #6b7280 !important;
}

.sidebar-activity-card.search-result-completed,
.sidebar-activity-card.search-result-completed * {
  text-decoration: none !important;
}

.sidebar-activity-card.search-result-completed .sidebar-activity-title span {
  font-weight: 500;
}

.sidebar-activity-card.search-result-completed .sidebar-activity-time i,
.sidebar-activity-card.search-result-completed
  .sidebar-activity-client
  .activity-date,
.sidebar-activity-card.search-result-completed
  .sidebar-activity-client
  .activity-code {
  color: #6b7280 !important;
}

.sidebar-activity-card.search-result-completed .activity-status-badge,
.sidebar-activity-card.search-result-completed .completed-badge {
  display: none !important;
}
