.container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 15px !important;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 2rem;
  margin-top: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-container h1 {
  margin: 0;
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-container h1 i {
  font-size: 1.75rem;
  color: #0066cc;
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* ===== SEÇÕES DE AGENDAS ===== */
.agendas-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title i {
  font-size: 1.3rem;
  color: #0066cc;
}

/* ===== GRID DE AGENDAS ===== */
.agenda-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 1.5rem !important;
  margin-top: 1.5rem !important;
  margin-bottom: 2rem !important;
  width: 100% !important;
}

/* ===== CARDS DE AGENDA  ===== */
.agenda-card {
  display: flex !important;
  flex-direction: column !important;
  background-color: white !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  overflow: hidden !important;
  transition: all 0.3s ease !important;
  height: 100% !important;
  position: relative !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 4px solid #004a8f !important; /* Borda padrão, será sobrescrita inline */
}

.agenda-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* ===== CABEÇALHO DO CARD ===== */
.agenda-card-header {
  padding: 1.5rem 1.5rem 1rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.agenda-title {
  margin: 0 0 0.75rem 0 !important;
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  color: #1a202c !important;
  width: 100% !important;
  line-height: 1.3 !important;
}

.agenda-visibility {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  margin-bottom: 0.5rem !important;
  align-self: flex-start !important;
}

/* ===== CORPO DO CARD ===== */
.agenda-card-body {
  padding: 1.25rem 1.5rem !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

.agenda-description {
  margin: 0 0 1rem 0 !important;
  color: #4a5568 !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
  flex-grow: 1 !important;
}

.agenda-owner {
  margin-bottom: 1rem !important;
  font-size: 0.9rem !important;
  color: #718096 !important;
}

.agenda-owner p {
  margin: 0.25rem 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.agenda-owner i {
  color: var(--primary-color) !important;
  font-size: 0.85rem !important;
}

/* ===== ESTATÍSTICAS ===== */
.agenda-stats {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.5rem !important;
  margin-top: auto !important;
  padding-top: 0.75rem !important;
  border-top: 1px solid #f1f5f9 !important;
}

.stat {
  padding: 0.4rem 0.2rem !important;
  text-align: center !important;
  background: #f8fafc !important;
  border-radius: 4px !important;
  border: 1px solid #e2e8f0 !important;
}

.stat-value {
  display: block !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  margin-bottom: 0.1rem !important;
}

.stat-label {
  font-size: 0.65rem !important;
  color: #718096 !important;
  text-transform: uppercase !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.2 !important;
}

/* ===== RODAPÉ DO CARD ===== */
.agenda-card-footer {
  padding: 1rem 1.5rem 1.5rem !important;
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}

.agenda-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  justify-content: center !important;
  align-items: center !important;
}

.agenda-actions .btn {
  flex: 1 1 auto !important;
  min-width: 100px !important;
  max-width: 220px !important;
  text-align: center !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
  border: none !important;
  text-decoration: none !important;
}

.agenda-actions form {
  display: contents !important;
}

.agenda-actions form .btn {
  width: auto !important;
  flex: 1 1 auto !important;
}

/* ===== BUSCA ===== */
.search-box {
  background-color: #f8fafc !important;
  border-radius: 10px !important;
  padding: 1.25rem !important;
  margin-bottom: 2rem !important;
  border: 1px solid #e2e8f0 !important;
}

.search-form {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
}

.search-form input[type="text"] {
  flex: 1 !important;
  min-width: 250px !important;
  padding: 0.75rem 1rem !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 6px !important;
  font-size: 1rem !important;
  background: white !important;
  transition: border-color 0.2s ease !important;
}

.search-form input[type="text"]:focus {
  border-color: var(--primary-color) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0, 74, 143, 0.1) !important;
}

/* Alinhamento vertical do checkbox */
.search-form .checkbox-container {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding-left: 30px !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  user-select: none !important;
  height: 42px !important;
  white-space: nowrap !important;
}

/* ===== ESTADO VAZIO ===== */
.empty-state {
  text-align: center !important;
  padding: 4rem 2rem !important;
  margin: 2rem 0 !important;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-radius: 16px !important;
  border: 2px dashed #cbd5e0 !important;
}

.empty-state i {
  font-size: 4rem !important;
  color: #cbd5e0 !important;
  margin-bottom: 1.5rem !important;
  display: block !important;
}

.empty-state h3 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #4a5568 !important;
  margin-bottom: 1rem !important;
}

.empty-state p {
  color: #718096 !important;
  margin-bottom: 2rem !important;
  font-size: 1.1rem !important;
  line-height: 1.6 !important;
}

.empty-state .btn {
  padding: 0.75rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

/* ===== UTILITÁRIOS ===== */
.text-muted {
  color: #718096 !important;
}

/* ===== PAGINAÇÃO ===== */
.pagination-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1rem !important;
  margin-top: 2rem !important;
  margin-bottom: 2rem !important;
}

.pagination {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
}

.pagination-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 0.75rem !important;
  margin: 0 0.125rem !important;
  border-radius: 6px !important;
  background-color: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #4a5568 !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
  min-width: 2.5rem !important;
  height: 2.5rem !important;
  transition: all 0.2s ease !important;
}

.pagination-link:hover:not(.disabled) {
  background-color: #f7fafc !important;
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
  text-decoration: none !important;
}

.pagination-link.current {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 991px) {
  .agenda-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.25rem !important;
  }

  .agenda-title {
    font-size: 1.2rem !important;
  }

  .agenda-description {
    font-size: 0.9rem !important;
  }

  .header-container {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
}

@media (max-width: 768px) {
  .search-form {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .search-form input[type="text"] {
    width: 100% !important;
    min-width: auto !important;
  }

  .search-form .checkbox-container {
    padding-left: 30px !important;
    height: auto !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .agenda-actions {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .agenda-actions .btn {
    width: 100% !important;
    max-width: none !important;
    min-width: auto !important;
  }

  .agenda-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.4rem !important;
  }

  .search-box {
    padding: 1rem !important;
  }

  .header-container h1 {
    font-size: 1.75rem !important;
  }

  .section-title {
    font-size: 1.3rem !important;
  }

  .pagination {
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
  }

  .pagination-link.prev,
  .pagination-link.next {
    order: 2 !important;
    width: 100% !important;
    margin-top: 0.5rem !important;
  }
}

@media (max-width: 576px) {
  .agenda-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .agenda-card-header,
  .agenda-card-body,
  .agenda-card-footer {
    padding: 1rem !important;
  }

  .agenda-stats {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.3rem !important;
  }

  .stat {
    padding: 0.3rem 0.1rem !important;
  }

  .stat-value {
    font-size: 0.85rem !important;
  }

  .stat-label {
    font-size: 0.6rem !important;
  }

  .empty-state i {
    font-size: 3rem !important;
  }

  .empty-state h3 {
    font-size: 1.3rem !important;
  }

  .empty-state p {
    font-size: 1rem !important;
  }
}

/* ===== ESTILOS ESPECÍFICOS PARA HOME PAGE ===== */

/* Welcome section bonita */
.welcome-section {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f3ff 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
  border: 1px solid rgba(0, 74, 143, 0.1);
  margin-bottom: 2rem;
}

.welcome-text {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #4a5568;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.welcome-text i {
  color: var(--primary-color);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #2d3748;
  margin: 0;
}

.user-info i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

/* ===== SEÇÃO DE AGENDAS PÚBLICAS MELHORADA ===== */
.public-agendas-section {
  margin-top: 2rem;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 74, 143, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  position: relative;
  overflow: visible !important;
  width: 100%;
}

.public-agendas-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #004a8f, #0066cc, #004a8f);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
  border-radius: 16px 16px 0 0;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.public-agendas-section h2 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.public-agendas-section h2 i {
  font-size: 1.5rem;
  color: #0066cc;
}

.public-agendas-section p {
  color: #4a5568;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.public-agendas-section p i {
  color: var(--primary-color);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

/* ===== CONTAINER DA TABELA ===== */
.public-agendas-table-container {
  width: 100% !important;
  max-width: none !important;
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  margin-bottom: 1.5rem;
  background: #ffffff;
}

/* ===== TABELA CORRIGIDA ===== */
.public-agendas-table {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  table-layout: fixed !important;
}

.public-agendas-table thead {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f3ff 100%);
  width: 100% !important;
}

.public-agendas-table th {
  color: #2d3748;
  font-weight: 700;
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 2px solid #cbd5e0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: auto !important;
}

.public-agendas-table th i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* LARGURAS DAS COLUNAS RESPONSIVAS */
.public-agendas-table th:first-child,
.public-agendas-table td:first-child {
  width: 22% !important; /* Agenda */
  min-width: 180px;
}

.public-agendas-table th:nth-child(2),
.public-agendas-table td:nth-child(2) {
  width: 30% !important; /* Descrição */
  min-width: 200px;
}

.public-agendas-table th:nth-child(3),
.public-agendas-table td:nth-child(3) {
  width: 18% !important; /* Responsável */
  min-width: 150px;
}

.public-agendas-table th:last-child,
.public-agendas-table td:last-child {
  width: 30% !important; /* Ações */
  min-width: 280px;
  text-align: center;
}

.public-agendas-table th:first-child {
  border-top-left-radius: 12px;
}

.public-agendas-table th:last-child {
  border-top-right-radius: 12px;
}

.public-agendas-table td {
  padding: 1.25rem 1.5rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.public-agendas-table td:last-child {
  text-align: center;
}

.public-agendas-table tbody tr {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.public-agendas-table tbody tr:hover {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f3ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 74, 143, 0.1);
}

.public-agendas-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

.public-agendas-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

/* ===== INFORMAÇÕES DA AGENDA ===== */
.agenda-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.agenda-info strong {
  font-weight: 600;
  color: #2d3748;
  font-size: 1rem;
}

.agenda-color-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.agenda-description {
  line-height: 1.4;
  color: #4a5568;
  font-size: 0.9rem;
}

.agenda-owner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4a5568;
  font-size: 0.9rem;
}

.agenda-owner i {
  color: var(--primary-color);
  font-size: 0.85rem;
}

/* ===== BOTÕES DE AÇÃO  ===== */
.action-buttons {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.75rem !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.action-buttons .btn {
  flex: 1 1 auto !important;
  min-width: 120px !important;
  max-width: 160px !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  margin: 0 !important;
}

.btn-primary {
  background: linear-gradient(135deg, #004a8f 0%, #0066cc 100%) !important;
  color: #ffffff !important;
  border-color: #004a8f !important;
}

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

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

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

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

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

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

/* ===== RESUMO DAS AGENDAS ===== */
.agendas-summary {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #e6f3ff 0%, #f0f7ff 100%);
  border-radius: 10px;
  border-left: 4px solid #004a8f;
  box-shadow: 0 2px 8px rgba(0, 74, 143, 0.1);
}

.summary-text {
  margin: 0;
  color: #2d3748;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-text i {
  color: #004a8f;
  font-size: 1rem;
}

.summary-text strong {
  color: #004a8f;
  font-weight: 700;
}

/* ===== BUSCA E PAGINAÇÃO ===== */
.search-container {
  background: #f8fafc;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.search-form-home {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.search-input-large {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  transition: border-color 0.2s ease;
}

.search-input-large:focus {
  border-color: #004a8f;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 74, 143, 0.1);
}

.search-btn {
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
  border-radius: 8px;
  font-weight: 600;
  background: linear-gradient(135deg, #004a8f 0%, #0066cc 100%);
  color: #ffffff;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 74, 143, 0.2);
}

.search-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #003a70 0%, #004a8f 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 74, 143, 0.3);
  color: #ffffff;
}

.search-btn:disabled {
  opacity: 0.7;
  transform: none;
  cursor: not-allowed;
}

/* ===== ESTILOS ADICIONAIS PARA BUSCA PADRONIZADA ===== */

/* Informação sobre resultados da busca */
.search-info {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 2px solid #f6ad55;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  color: #856404;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
  animation: slideIn 0.3s ease-out;
}

/* Contador de resultados nos títulos das seções */
.results-count {
  font-size: 0.9rem;
  font-weight: 500;
  color: #718096;
  margin-left: 0.5rem;
  background: rgba(113, 128, 150, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(113, 128, 150, 0.2);
}

/* Estado da busca ativa no search-box */
.search-box.has-search {
  background: linear-gradient(135deg, #e6f3ff 0%, #f0f7ff 100%);
  border-color: #004a8f;
  box-shadow: 0 4px 12px rgba(0, 74, 143, 0.15);
}

.search-box.has-search input[type="text"] {
  border-color: #004a8f;
  background-color: #ffffff;
  font-weight: 500;
}

/* Melhorias no formulário de busca */
.search-form {
  display: flex !important;
  gap: 1rem !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

.search-form input[type="text"] {
  flex: 1 !important;
  min-width: 300px !important;
  padding: 1rem 1.25rem !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  color: #2d3748 !important;
  background-color: #ffffff !important;
  background-clip: padding-box !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
  font-family: inherit !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.search-form input[type="text"]:focus {
  border-color: #004a8f !important;
  box-shadow: 0 0 0 3px rgba(0, 74, 143, 0.1), 0 4px 12px rgba(0, 74, 143, 0.15) !important;
  outline: none !important;
  background-color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.search-form input[type="text"]::placeholder {
  color: #a0aec0 !important;
  font-style: italic !important;
  opacity: 0.8 !important;
}

/* Botões do formulário de busca */
.search-form .btn {
  padding: 1rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.search-form .btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
  text-decoration: none !important;
}

.search-form .btn-primary {
  background: linear-gradient(135deg, #004a8f 0%, #0066cc 100%) !important;
  color: #ffffff !important;
  min-width: 120px !important;
}

.search-form .btn-primary:hover {
  background: linear-gradient(135deg, #003a70 0%, #004a8f 100%) !important;
  color: #ffffff !important;
}

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

.search-form .btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%) !important;
  color: #ffffff !important;
}

.search-form .btn i {
  font-size: 0.9rem !important;
  margin-right: 0.25rem !important;
}

/* Estados vazios melhorados */
.empty-state {
  text-align: center !important;
  padding: 4rem 2rem !important;
  margin: 2rem 0 !important;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-radius: 16px !important;
  border: 2px dashed #cbd5e0 !important;
}

.empty-state i {
  font-size: 4rem !important;
  color: #cbd5e0 !important;
  margin-bottom: 1.5rem !important;
  display: block !important;
}

.empty-state h3 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #4a5568 !important;
  margin-bottom: 1rem !important;
}

.empty-state p {
  color: #718096 !important;
  margin-bottom: 2rem !important;
  font-size: 1.1rem !important;
  line-height: 1.6 !important;
}

.empty-state .btn {
  padding: 0.75rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

/* Animações */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state para botões de busca */
.search-form .btn.loading {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.search-form .btn.loading::after {
  content: "" !important;
  width: 16px !important;
  height: 16px !important;
  margin-left: 0.5rem !important;
  border: 2px solid transparent !important;
  border-top-color: currentColor !important;
  border-radius: 50% !important;
  animation: spin 1s linear infinite !important;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVIDADE PARA BUSCA ===== */

@media (max-width: 768px) {
  .search-box {
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 12px !important;
  }

  .search-form {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .search-form input[type="text"] {
    min-width: auto !important;
    width: 100% !important;
  }

  .search-form .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.875rem 1.25rem !important;
  }

  .search-info {
    padding: 0.875rem 1.25rem !important;
    font-size: 0.9rem !important;
  }

  .results-count {
    font-size: 0.8rem !important;
    margin-left: 0 !important;
    margin-top: 0.25rem !important;
    display: block !important;
  }
}

@media (max-width: 576px) {
  .search-box {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .search-form input[type="text"] {
    font-size: 0.9rem !important;
    padding: 0.875rem 1rem !important;
  }

  .search-form .btn {
    font-size: 0.9rem !important;
    padding: 0.75rem 1rem !important;
  }

  .search-info {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .empty-state {
    padding: 3rem 1rem !important;
  }

  .empty-state i {
    font-size: 3rem !important;
  }

  .empty-state h3 {
    font-size: 1.3rem !important;
  }

  .empty-state p {
    font-size: 1rem !important;
  }
}

/* ===== MELHORIAS PARA ACESSIBILIDADE ===== */

.search-form input[type="text"]:focus-visible {
  outline: 2px solid #004a8f !important;
  outline-offset: 2px !important;
}

.search-form .btn:focus-visible {
  outline: 2px solid #004a8f !important;
  outline-offset: 2px !important;
}

/* ===== DESTAQUE PARA TERMOS DE BUSCA ===== */

mark {
  background-color: #fff3cd !important;
  color: #856404 !important;
  padding: 0.1em 0.2em !important;
  border-radius: 3px !important;
  font-weight: 600 !important;
}

/* ===== CONSISTÊNCIA COM O TEMA EXISTENTE ===== */

.search-form input[type="text"]:invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* ===== ESTILO PARA PÁGINAS SEM RESULTADOS ===== */

.no-search-results {
  text-align: center;
  padding: 3rem 2rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 2px dashed #cbd5e0;
}

.no-search-results .search-suggestions {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #004a8f;
}

.no-search-results .search-suggestions h4 {
  margin-bottom: 0.75rem;
  color: #004a8f;
  font-size: 1rem;
}

/* ===== MELHORIAS FINAIS DE PAGINAÇÃO ===== */

.pagination-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1rem !important;
  margin-top: 2rem !important;
  margin-bottom: 2rem !important;
}

.pagination-info {
  color: #718096 !important;
  font-size: 0.9rem !important;
  text-align: center !important;
}

.pagination {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
}

.pagination-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 0.75rem !important;
  margin: 0 0.125rem !important;
  border-radius: 8px !important;
  background-color: #fff !important;
  border: 2px solid #e2e8f0 !important;
  color: #4a5568 !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
  min-width: 2.5rem !important;
  height: 2.5rem !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
}

.pagination-link:hover:not(.disabled) {
  background-color: #f7fafc !important;
  border-color: #004a8f !important;
  color: #004a8f !important;
  text-decoration: none !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 74, 143, 0.2) !important;
}

.pagination-link.current {
  background: linear-gradient(135deg, #004a8f 0%, #0066cc 100%) !important;
  border-color: #004a8f !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(0, 74, 143, 0.3) !important;
}

.pagination-link.disabled {
  color: #cbd5e0 !important;
  pointer-events: none !important;
  background-color: #f7fafc !important;
  border-color: #f1f5f9 !important;
  opacity: 0.6 !important;
}

.pagination-ellipsis {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 2.5rem !important;
  height: 2.5rem !important;
  color: #718096 !important;
  font-weight: 600 !important;
}

.search-info i {
  color: #d69e2e;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.search-info strong {
  color: #744210;
  font-weight: 600;
}

/* Contador de resultados nos títulos das seções */
.results-count {
  font-size: 0.9rem;
  font-weight: 500;
  color: #718096;
  margin-left: 0.5rem;
  background: rgba(113, 128, 150, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(113, 128, 150, 0.2);
}

/* Estado da busca ativa no search-box */
.search-box.has-search {
  background: linear-gradient(135deg, #e6f3ff 0%, #f0f7ff 100%);
  border-color: #004a8f;
  box-shadow: 0 4px 12px rgba(0, 74, 143, 0.15);
}

.search-box.has-search input[type="text"] {
  border-color: #004a8f;
  background-color: #ffffff;
  font-weight: 500;
}

/* Melhorias no formulário de busca */
.search-form {
  display: flex !important;
  gap: 1rem !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

.search-form input[type="text"] {
  flex: 1 !important;
  min-width: 300px !important;
  padding: 1rem 1.25rem !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  color: #2d3748 !important;
  background-color: #ffffff !important;
  background-clip: padding-box !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
  font-family: inherit !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.search-form input[type="text"]:focus {
  border-color: #004a8f !important;
  box-shadow: 0 0 0 3px rgba(0, 74, 143, 0.1), 0 4px 12px rgba(0, 74, 143, 0.15) !important;
  outline: none !important;
  background-color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.search-form input[type="text"]::placeholder {
  color: #a0aec0 !important;
  font-style: italic !important;
  opacity: 0.8 !important;
}

/* Botões do formulário de busca */
.search-form .btn {
  padding: 1rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.search-form .btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
  text-decoration: none !important;
}

.search-form .btn-primary {
  background: linear-gradient(135deg, #004a8f 0%, #0066cc 100%) !important;
  color: #ffffff !important;
  min-width: 120px !important;
}

.search-form .btn-primary:hover {
  background: linear-gradient(135deg, #003a70 0%, #004a8f 100%) !important;
  color: #ffffff !important;
}

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

.search-form .btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%) !important;
  color: #ffffff !important;
}

.search-form .btn i {
  font-size: 0.9rem !important;
  margin-right: 0.25rem !important;
}

/* Estados vazios melhorados */
.empty-state {
  text-align: center !important;
  padding: 4rem 2rem !important;
  margin: 2rem 0 !important;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-radius: 16px !important;
  border: 2px dashed #cbd5e0 !important;
}

.empty-state i {
  font-size: 4rem !important;
  color: #cbd5e0 !important;
  margin-bottom: 1.5rem !important;
  display: block !important;
}

.empty-state h3 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #4a5568 !important;
  margin-bottom: 1rem !important;
}

.empty-state p {
  color: #718096 !important;
  margin-bottom: 2rem !important;
  font-size: 1.1rem !important;
  line-height: 1.6 !important;
}

.empty-state .btn {
  padding: 0.75rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

/* ===== RESPONSIVIDADE PARA BUSCA ===== */

@media (max-width: 768px) {
  .search-box {
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 12px !important;
  }

  .search-form {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .search-form input[type="text"] {
    min-width: auto !important;
    width: 100% !important;
  }

  .search-form .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.875rem 1.25rem !important;
  }

  .search-info {
    padding: 0.875rem 1.25rem !important;
    font-size: 0.9rem !important;
  }

  .results-count {
    font-size: 0.8rem !important;
    margin-left: 0 !important;
    margin-top: 0.25rem !important;
    display: block !important;
  }
}

@media (max-width: 576px) {
  .search-box {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .search-form input[type="text"] {
    font-size: 0.9rem !important;
    padding: 0.875rem 1rem !important;
  }

  .search-form .btn {
    font-size: 0.9rem !important;
    padding: 0.75rem 1rem !important;
  }

  .search-info {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .empty-state {
    padding: 3rem 1rem !important;
  }

  .empty-state i {
    font-size: 3rem !important;
  }

  .empty-state h3 {
    font-size: 1.3rem !important;
  }

  .empty-state p {
    font-size: 1rem !important;
  }
}

/* ===== CONSISTÊNCIA COM O TEMA EXISTENTE ===== */

.search-form input[type="text"]:valid:not(:placeholder-shown) {
  border-color: #28a745 !important;
}

/* ===== ESTILO PARA PÁGINAS SEM RESULTADOS ===== */

.no-search-results {
  text-align: center;
  padding: 3rem 2rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 2px dashed #cbd5e0;
}

.no-search-results .search-suggestions {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #004a8f;
}

.no-search-results .search-suggestions h4 {
  margin-bottom: 0.75rem;
  color: #004a8f;
  font-size: 1rem;
}

.no-search-results .search-suggestions ul {
  margin: 0;
  padding-left: 1.5rem;
  text-align: left;
}

.no-search-results .search-suggestions li {
  margin-bottom: 0.5rem;
  color: #6c757d;
  font-size: 0.9rem;
}

/* ===== CATEGORIA DA AGENDA ===== */
.agenda-categoria {
  margin-top: 0.5rem;
}

.badge-categoria {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  text-transform: capitalize;
}

.badge-categoria-chefia {
  background-color: #dc3545;
  color: white;
}

.badge-categoria-sala_de_aula {
  background-color: #007bff;
  color: white;
}

.badge-categoria-departamento {
  background-color: rgb(114, 3, 218);
  color: white;
}

.badge-categoria-laboratorio {
  background-color: #28a745;
  color: white;
}

.badge-categoria-pessoal {
  background-color: #ffc107;
  color: #212529;
}

.badge-categoria-outros {
  background-color: #6c757d;
  color: white;
}

/* ===== CATEGORIA NO CABEÇALHO ===== */
.agenda-categoria-header {
  font-size: 0.9rem;
  margin-left: 1rem;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .agenda-categoria-header {
    display: block;
    margin-left: 0;
    margin-top: 0.5rem;
    font-size: 0.8rem;
  }
}

/* ===== CATEGORIA EM TABELAS E VIEWS ESPECÍFICAS ===== */
.badge-categoria-small {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  margin-left: 0.5rem;
  border-radius: 8px;
  text-transform: capitalize;
}

/* ===== RESPONSIVIDADE PARA TABELA COM CATEGORIA ===== */
.public-agendas-table th:nth-child(3),
.public-agendas-table td:nth-child(3) {
  width: 12% !important; /* Categoria */
  min-width: 100px;
}

/* Ajustar outras colunas */
.public-agendas-table th:first-child,
.public-agendas-table td:first-child {
  width: 25% !important; /* Agenda */
}

.public-agendas-table th:nth-child(2),
.public-agendas-table td:nth-child(2) {
  width: 25% !important; /* Descrição */
}

.public-agendas-table th:nth-child(4),
.public-agendas-table td:nth-child(4) {
  width: 18% !important; /* Responsável */
}

.public-agendas-table th:last-child,
.public-agendas-table td:last-child {
  width: 20% !important; /* Ações */
}

@media (max-width: 768px) {
  /* Em mobile, ocultar coluna categoria na tabela */
  .public-agendas-table th:nth-child(3),
  .public-agendas-table td:nth-child(3) {
    display: none;
  }

  /* Reajustar larguras sem categoria */
  .public-agendas-table th:first-child,
  .public-agendas-table td:first-child {
    width: 30% !important;
  }

  .public-agendas-table th:nth-child(2),
  .public-agendas-table td:nth-child(2) {
    width: 35% !important;
  }
}
/* Link de email do responsável */
.owner-email-link {
  color: inherit;
  text-decoration: none;
}

.owner-email-link:hover {
  text-decoration: underline;
  color: #0066cc;
}
