/* ===== FULL CALENDAR MELHORADO ===== */
.fc-event,
.fc-daygrid-event {
  border-radius: 4px !important;
  margin-bottom: 2px !important;
  padding: 3px 4px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  min-height: 22px !important;
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.1),
    rgba(0, 0, 0, 0.1)
  ) !important;
}

.fc-event-title,
.fc-daygrid-event .fc-event-title {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-weight: bold !important;
  font-size: 0.95em !important;
  line-height: 1.3 !important;
  padding: 2px 0 !important;
}

/* Eventos por status */
.fc-event.event-status-confirmado,
.fc-daygrid-event.event-status-confirmado {
  background-color: rgb(81, 156, 30) !important;
  border-color: rgb(81, 156, 30) !important;
  color: #000 !important;
  cursor: move !important;
}

.fc-event.event-status-realizado,
.fc-daygrid-event.event-status-realizado {
  background-color: rgb(103, 108, 119) !important;
  border-color: rgb(103, 108, 119) !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.7 !important;
}

.fc-event.event-status-cancelado,
.fc-daygrid-event.event-status-cancelado {
  background-color: #dc3545 !important;
  border-color: #bd2130 !important;
  text-decoration: line-through !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.7 !important;
}

.fc-event.event-status-aguardando_aprovacao,
.fc-daygrid-event.event-status-aguardando_aprovacao {
  background-color: var(--info-color) !important;
  border-color: #138496 !important;
  color: #fff !important;
  cursor: move !important;
}

/* ===== CONTAINER PRINCIPAL DE COMPROMISSOS ===== */
.events-list-container {
  background-color: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  margin-bottom: var(--spacing-lg);
}

.section-title {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f0f7ff;
}

.section-title i {
  color: #004a8f;
  font-size: 1.2rem;
}

/* ===== FILTROS ===== */
.events-filters,
.filter-container {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  align-items: center;
  padding: var(--spacing-md);
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.filter-select,
.filter-input {
  padding: var(--spacing-sm);
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.filter-input {
  min-width: 250px;
}

/* ===== DATA GRID OTIMIZADO - MEUS COMPROMISSOS ===== */
.data-grid-container {
  overflow-x: visible !important;
  margin-bottom: var(--spacing-lg);
  background-color: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
}

.data-grid {
  width: 100% !important;
  border-collapse: collapse;
  min-width: auto !important;
  table-layout: auto !important;
}

.data-grid thead {
  background-color: #f5f5f5;
}

.data-grid th {
  padding: 0.5rem 0.4rem !important; /* CORRIGIDO: Mais padding nos headers */
  text-align: left;
  border-bottom: 2px solid #ddd;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #f5f5f5;
  font-size: 0.82rem !important; /* CORRIGIDO: Fonte ligeiramente maior */
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.data-grid td {
  padding: 0.5rem 0.4rem !important; /* CORRIGIDO: Mais padding para melhor visualização */
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  font-size: 0.86rem !important; /* CORRIGIDO: Fonte ligeiramente maior */
  line-height: 1.3; /* CORRIGIDO: Melhor espaçamento */
  color: #2d3748;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== LARGURAS OTIMIZADAS DAS COLUNAS (CORRIGIDAS) ===== */
.data-grid th:nth-child(1), /* Checkbox */
.data-grid td:nth-child(1) {
  width: 3% !important;
  min-width: 30px;
  max-width: 35px;
  text-align: center;
  padding: 0.3rem 0.1rem !important;
}

.data-grid th:nth-child(2), /* Agenda */
.data-grid td:nth-child(2) {
  width: 24% !important; /* CORRIGIDO: Ligeiramente reduzido para acomodar botões */
  min-width: 180px;
  max-width: 220px;
}

.data-grid th:nth-child(3), /* Título */
.data-grid td:nth-child(3) {
  width: 24% !important; /* CORRIGIDO: Ligeiramente reduzido para acomodar botões */
  min-width: 180px;
}

.data-grid th:nth-child(4), /* Data */
.data-grid td:nth-child(4) {
  width: 12% !important;
  min-width: 90px;
  max-width: 110px;
}

.data-grid th:nth-child(5), /* Horário */
.data-grid td:nth-child(5) {
  width: 12% !important; /* CORRIGIDO: Reduzido de 15% para 12% */
  min-width: 100px; /* CORRIGIDO: Reduzido de 120px para 100px */
  max-width: 120px; /* CORRIGIDO: Reduzido de 150px para 120px */
}

.data-grid th:nth-child(6), /* Status */
.data-grid td:nth-child(6) {
  width: 10% !important;
  min-width: 80px;
  max-width: 100px;
}

.data-grid th:nth-child(7), /* Ações */
.data-grid td:nth-child(7) {
  width: 13% !important; /* CORRIGIDO: Aumentado de 10% para 13% */
  min-width: 140px !important; /* CORRIGIDO: Aumentado de 120px para 140px */
  text-align: center;
  padding: 0.4rem 0.2rem !important; /* CORRIGIDO: Otimizar padding */
}

/* ===== OTIMIZAÇÃO DE COLUNAS ESPECÍFICAS (CORRIGIDAS) ===== */

/* CORREÇÃO 1: Agenda - mostrar nome completo com altura maior */
.data-grid td:nth-child(2) {
  position: relative;
  white-space: normal !important; /* Permitir quebra de linha */
  word-wrap: break-word;
  max-height: 4.5em !important; /* CORRIGIDO: Aumentado de 3em para 4.5em */
  overflow: visible !important; /* CORRIGIDO: Mostrar texto completo */
  line-height: 1.4 !important; /* CORRIGIDO: Melhor espaçamento entre linhas */
  padding: 0.6rem 0.4rem !important; /* CORRIGIDO: Mais padding para melhor visualização */
}

.data-grid td:nth-child(2):hover {
  overflow: visible;
  white-space: normal;
  z-index: 10;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.8rem !important;
  border-radius: 6px;
  position: relative; /* CORRIGIDO: Mudado de absolute para relative */
  min-width: 200px;
  max-height: none !important; /* CORRIGIDO: Remove limite de altura no hover */
}

/* Título - permitir quebra de linha controlada, ligeiramente maior */
.data-grid td:nth-child(3) {
  white-space: normal !important;
  word-wrap: break-word;
  max-height: 3.2em;
  overflow: hidden;
  line-height: 1.3;
  font-size: 0.9rem !important;
}

/* Data - formato ligeiramente maior */
.data-grid td:nth-child(4) {
  font-size: 0.85rem !important;
  white-space: nowrap;
  font-weight: 500;
}

/* CORREÇÃO 2: Horário - formato otimizado e fonte mais legível */
.data-grid td:nth-child(5) {
  font-size: 0.82rem !important; /* CORRIGIDO: Ligeiramente menor */
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important; /* CORRIGIDO: Fonte padrão do sistema */
  font-weight: 500;
  letter-spacing: 0.3px; /* CORRIGIDO: Reduzido de 0.5px para 0.3px */
  text-align: center; /* CORRIGIDO: Centralizar horário */
}

/* Status - mantido como estava */
.data-grid td:nth-child(6) {
  font-size: 0.8rem !important;
  text-align: center;
}

/* ===== COMPORTAMENTO DAS LINHAS ===== */
.compromisso-row {
  cursor: pointer;
  transition: background-color 0.2s ease, border-left 0.2s ease;
}

.compromisso-row:hover {
  background-color: #f8f9fa !important;
  transform: none;
  transition: background-color 0.2s ease; /* CORRIGIDO: Melhorar transição */
}

.compromisso-row.expanded {
  background-color: #f0f0f0;
}

.compromisso-row.status-cancelled .text-cancelled {
  text-decoration: line-through;
  color: #6c757d;
}

.compromisso-row.selected-for-bulk {
  background-color: rgba(0, 74, 143, 0.05) !important;
  border-left: 4px solid #004a8f !important;
}

/* Zebra striping sutil */
.data-grid tbody tr:nth-child(even) {
  background-color: #fdfdfd;
}

.data-grid tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

/* ===== BOTÕES DE AÇÃO CORRIGIDOS ===== */
/* CORREÇÃO 3: Botões expandidos para mostrar texto completo */
.action-buttons {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.4rem !important; /* CORRIGIDO: Ligeiramente maior gap */
  flex-wrap: wrap !important; /* CORRIGIDO: Permitir quebra se necessário */
}

.action-buttons .btn {
  min-width: 70px !important; /* CORRIGIDO: Aumentado de 35px para 70px */
  max-width: 120px !important; /* CORRIGIDO: Aumentado de 80px para 120px */
  padding: 0.45rem 0.6rem !important; /* CORRIGIDO: Mais padding */
  font-size: 0.75rem !important; /* CORRIGIDO: Ligeiramente maior */
  border-radius: 5px;
  text-align: center;
  white-space: nowrap;
  overflow: visible !important; /* CORRIGIDO: Mostrar texto completo */
  text-overflow: unset !important; /* CORRIGIDO: Remover ellipsis */
  flex: 0 1 auto; /* CORRIGIDO: Permitir flexibilidade no tamanho */
  line-height: 1.2; /* CORRIGIDO: Melhor espaçamento */
  font-weight: 600 !important; /* CORRIGIDO: Melhor destaque */
}

.action-buttons .btn i {
  font-size: 0.8rem;
  margin-right: 0.25rem;
}

/* CORES E ESTILO DOS BOTÕES MELHORADOS */
.btn-primary {
  background: linear-gradient(135deg, #004a8f 0%, #0066cc 100%) !important;
  border-color: #004a8f !important;
  color: #ffffff !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #003a70 0%, #004a8f 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(0, 74, 143, 0.3) !important;
  color: #ffffff !important;
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
  border-color: #28a745 !important;
  color: #ffffff !important;
}

.btn-success:hover {
  background: linear-gradient(135deg, #218838 0%, #1a9e77 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3) !important;
  color: #ffffff !important;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
  border-color: #dc3545 !important;
  color: #ffffff !important;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3) !important;
  color: #ffffff !important;
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
  border-color: #6c757d !important;
  color: #ffffff !important;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(108, 117, 125, 0.3) !important;
  color: #ffffff !important;
}

/* ===== BULK ACTIONS ===== */
.bulk-actions-container {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #004a8f 0%, #0056a3 100%);
  color: white;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 12px rgba(0, 74, 143, 0.2);
  animation: slideDown 0.3s ease-out;
}

.bulk-actions-container.show {
  display: block;
}

.bulk-actions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.bulk-actions-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.bulk-actions-info i {
  font-size: 1.1rem;
  color: #ffd700;
}

.bulk-actions-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.bulk-actions-buttons .btn {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.bulk-actions-buttons .btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.bulk-actions-buttons .btn-success:hover {
  background-color: rgba(40, 167, 69, 0.3);
  border-color: #28a745;
}

.bulk-actions-buttons .btn-danger:hover {
  background-color: rgba(220, 53, 69, 0.3);
  border-color: #dc3545;
}

/* ===== CARDS DE EVENTOS ===== */
.event-card {
  border: 1px solid #eee;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: var(--spacing-md);
}

.event-card.event-status-confirmado {
  border-left: 4px solid var(--warning-color);
}

.event-card.event-status-realizado {
  border-left: 4px solid var(--success-color);
}

.event-card.event-status-cancelado {
  border-left: 4px solid var(--danger-color);
}

.event-card.event-status-aguardando_aprovacao {
  border-left: 4px solid var(--info-color);
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.event-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.event-card.event-status-cancelado .event-title {
  text-decoration: line-through;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.event-datetime {
  display: flex;
  gap: var(--spacing-md);
  font-size: 0.9rem;
  color: #666;
}

.event-location,
.event-recurrence {
  font-size: 0.9rem;
  color: #666;
}

.event-description {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid #eee;
}

.event-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid #eee;
}

.description-cell {
  background-color: #f8f9fa;
  padding: var(--spacing-md) var(--spacing-xl);
  border-bottom: 1px solid #ddd;
}

.description-content {
  max-width: 100%;
  overflow: auto;
}

.agenda-tag {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: var(--border-radius);
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.title-content {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  overflow: hidden;
}

.title-main {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appointment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

/* Recorrência de compromissos */
.repeat-option {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  border: 1px solid #eee;
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* ===== RESPONSIVIDADE CORRIGIDA ===== */

/* TABLETS */
@media (max-width: 1024px) {
  /* CORRIGIDO: Redistribuir o espaço em tablets considerando as correções */
  .data-grid th:nth-child(2), /* Agenda */
  .data-grid td:nth-child(2) {
    width: 26% !important;
  }

  .data-grid th:nth-child(3), /* Título */
  .data-grid td:nth-child(3) {
    width: 26% !important;
  }

  .data-grid th:nth-child(5), /* Horário */
  .data-grid td:nth-child(5) {
    width: 14% !important;
  }

  .data-grid th:nth-child(7), /* Ações */
  .data-grid td:nth-child(7) {
    width: 16% !important;
  }
}

/* MOBILE MÉDIO */
@media (max-width: 768px) {
  .data-grid-container {
    margin: 0 -0.5rem;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 0.25rem;
  }

  .data-grid th:nth-child(4), /* Data */
  .data-grid td:nth-child(4),
  .data-grid th:nth-child(5), /* Horário */
  .data-grid td:nth-child(5) {
    display: none;
  }

  .data-grid th:nth-child(1),
  .data-grid td:nth-child(1) {
    width: 8% !important;
  }

  .data-grid th:nth-child(2), /* Agenda */
  .data-grid td:nth-child(2) {
    width: 30% !important;
  }

  .data-grid th:nth-child(3), /* Título */
  .data-grid td:nth-child(3) {
    width: 35% !important;
  }

  .data-grid th:nth-child(6), /* Status */
  .data-grid td:nth-child(6) {
    width: 12% !important;
  }

  .data-grid th:nth-child(7), /* Ações */
  .data-grid td:nth-child(7) {
    width: 15% !important;
    min-width: 100px;
  }

  /* CORRIGIDO: Botões em mobile */
  .action-buttons {
    flex-direction: column !important;
    gap: 0.3rem !important;
  }

  .action-buttons .btn {
    width: 100% !important;
    min-width: auto !important;
    max-width: none !important;
    font-size: 0.7rem !important;
    padding: 0.4rem 0.5rem !important;
  }

  /* CORRIGIDO: Manter nomes das agendas visíveis em mobile */
  .data-grid td:nth-child(2) {
    max-height: 5em !important; /* Ainda maior em mobile */
    overflow: visible !important;
  }

  .events-filters,
  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-input {
    min-width: auto;
  }

  .bulk-actions-container {
    padding: 0.5rem;
    margin-bottom: 1rem;
  }

  .bulk-actions-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .bulk-actions-buttons {
    flex-direction: column;
    width: 100%;
  }

  .bulk-actions-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .form-container {
    margin: 0.5rem;
    padding: 1rem;
  }

  .form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
  }

  .form-header h1 {
    font-size: 1.5rem;
  }

  .form-section {
    padding: 1rem;
  }

  .action-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .btn-action {
    width: 100%;
    min-width: auto;
    padding: 1rem 1.5rem;
  }

  #event-details-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  #event-details-modal .modal-footer {
    flex-direction: column;
  }

  #event-details-modal .modal-footer .btn {
    width: 100%;
    margin: 0.25rem 0;
  }
}

/* MOBILE PEQUENO */
@media (max-width: 480px) {
  .data-grid-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.25rem;
    padding: 0.1rem;
  }

  .data-grid {
    min-width: 450px;
  }

  .col-checkbox {
    width: 30px !important;
  }

  .bulk-checkbox,
  .bulk-checkbox-header {
    width: 14px;
    height: 14px;
  }

  #selected-count {
    font-size: 0.85rem;
  }

  .bulk-actions-container {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0.25rem;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .form-text {
    font-size: 0.75rem;
  }

  .btn-action {
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
    min-width: auto;
  }

  .btn-action i {
    font-size: 0.9rem;
  }
}

/* MOBILE EXTRA PEQUENO */
@media (max-width: var(--breakpoint-xs)) {
  .event-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .event-actions .btn {
    flex: 1 1 auto;
    min-width: 80px;
  }

  .events-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-input {
    min-width: auto;
  }

  .event-datetime {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .view-options {
    justify-content: center;
    margin-bottom: var(--spacing-lg);
  }

  .view-option {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .fc .fc-toolbar {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    width: 100%;
  }

  .filter-input,
  .filter-select {
    width: 100%;
  }

  .data-grid-container {
    margin-left: -15px;
    margin-right: -15px;
    border-radius: 0;
  }

  .data-grid th:nth-child(3),
  .data-grid td:nth-child(3) {
    display: none;
  }
}

/* ===== UTILITÁRIOS FINAIS ===== */
.data-grid-container.has-selections {
  border: 2px solid rgba(0, 74, 143, 0.2);
  border-radius: 12px;
}

.bulk-actions-container:hover {
  box-shadow: 0 6px 20px rgba(0, 74, 143, 0.15);
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

.fc-highlight {
  background-color: rgba(0, 74, 143, 0.1) !important;
  border-color: var(--primary-color) !important;
}

/* ===== BOTÕES DE VISUALIZAÇÃO (Mês, Semana, Dia, Lista) ===== */
.view-options {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.4s ease-out 0.2s both;
}

.view-options .btn-group {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

.view-option {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-right: 1px solid #e2e8f0;
}

.view-option:last-child {
  border-right: none;
}

.view-option:hover {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f3ff 100%);
  color: #004a8f;
  transform: translateY(-1px);
}

/* CORREÇÃO: Botão ativo com fundo azul */
.view-option.active {
  background: linear-gradient(135deg, #004a8f 0%, #0066cc 100%) !important;
  color: #ffffff !important;
  border-color: #004a8f !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 74, 143, 0.3) !important;
}

.view-option.active::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #004a8f;
}

.view-option:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.view-option:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Responsividade para botões de visualização */
@media (max-width: 768px) {
  .view-options {
    margin-bottom: 1rem;
  }

  .view-option {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .view-options .btn-group {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
    border-radius: 8px;
  }

  .view-option {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 0;
  }

  .view-option:first-child {
    border-radius: 8px 0 0 8px;
  }

  .view-option:nth-child(2) {
    border-radius: 0 8px 8px 0;
  }

  .view-option:nth-child(3) {
    border-radius: 0 0 0 8px;
    border-top: none;
  }

  .view-option:nth-child(4) {
    border-radius: 0 0 8px 0;
    border-top: none;
    border-left: 1px solid #e2e8f0;
  }
}
