/* ============================================
   AGENDA DE VENDAS - CALENDÁRIO
   Design profissional e moderno
   ============================================ */

.agenda-vendas-container {
  padding: 25px;
  max-width: 1400px;
  margin: 0 auto;
  background: #f1f5f9;
  min-height: calc(100vh - 60px);
}

.agenda-vendas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  background: white;
  padding: 20px 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.agenda-vendas-nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.agenda-vendas-nav .btn-nav {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.agenda-vendas-nav .btn-nav:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.agenda-vendas-titulo {
  font-size: 1.6rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  min-width: 220px;
  text-align: center;
  letter-spacing: -0.02em;
}

.agenda-vendas-filtro {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agenda-vendas-filtro label {
  font-weight: 500;
  color: #475569;
  font-size: 0.9rem;
}

.agenda-vendas-filtro select {
  padding: 10px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  min-width: 220px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #334155;
}

.agenda-vendas-filtro select:hover {
  border-color: #cbd5e1;
}

.agenda-vendas-filtro select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: white;
}

/* Cards de Resumo */
.agenda-vendas-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.resumo-card {
  background: white;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
}

.resumo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.resumo-card.total {
  border-left: 4px solid #059669;
}

.resumo-card.media {
  border-left: 4px solid #2563eb;
}

.resumo-card.funcionarios {
  border-left: 4px solid #7c3aed;
}

.resumo-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.resumo-card.total .resumo-icon {
  background: #ecfdf5;
  color: #059669;
}

.resumo-card.media .resumo-icon {
  background: #eff6ff;
  color: #2563eb;
}

.resumo-card.funcionarios .resumo-icon {
  background: #f5f3ff;
  color: #7c3aed;
}

.resumo-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.resumo-label {
  font-size: 11px !important;
  color: #64748b !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.resumo-valor {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em;
}

.resumo-sub {
  font-size: 11px !important;
  color: #94a3b8 !important;
}

/* Calendário */
.agenda-vendas-calendario {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 25px;
  border: 1px solid #e2e8f0;
}

.calendario-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.dia-semana {
  text-align: center;
  font-weight: 600;
  color: #475569;
  font-size: 0.85rem;
  padding: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendario-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendario-dia {
  min-height: 100px;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
}

.calendario-dia.vazio {
  background: transparent;
  border: none;
  cursor: default;
}

.calendario-dia.hoje {
  border: 2px solid #2563eb;
  background: #eff6ff;
}

.calendario-dia.com-vendas {
  background: white;
  border: 1px solid #10b981;
}

.calendario-dia.com-vendas:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
  border-color: #059669;
}

.calendario-dia.com-vendas.destaque {
  background: #fffbeb;
  border: 2px solid #f59e0b;
}

.calendario-dia.sem-vendas {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.calendario-dia.sem-vendas:hover {
  background: #fee2e2;
}

.dia-numero {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.calendario-dia.hoje .dia-numero {
  color: #2563eb;
  font-weight: 700;
}

.dia-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.dia-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: #059669;
}

.dia-qtd {
  font-size: 0.75rem;
  color: #475569;
}

.dia-func {
  font-size: 0.7rem;
  color: #64748b;
}

.dia-info.sem-venda {
  justify-content: center;
  align-items: center;
}

.dia-vazio {
  font-size: 0.75rem;
  color: #dc2626;
  text-align: center;
  font-weight: 500;
}

/* Ranking */
.agenda-vendas-ranking {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}

.agenda-vendas-ranking h3 {
  margin: 0 0 20px 0;
  font-size: 1.15rem;
  color: #0f172a;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.agenda-vendas-ranking h3 i {
  color: #f59e0b;
}

.ranking-top {
  background: #fffbeb;
}

.ranking-top td:first-child {
  font-weight: 700;
}

/* Badges de Posição */
.posicao-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  background: #f1f5f9;
  color: #475569;
}

.posicao-badge.medalha-ouro {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
  box-shadow: 0 2px 4px rgba(180, 83, 9, 0.2);
}

.posicao-badge.medalha-prata {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  color: #374151;
  box-shadow: 0 2px 4px rgba(55, 65, 81, 0.15);
}

.posicao-badge.medalha-bronze {
  background: linear-gradient(135deg, #fed7aa, #fdba74);
  color: #9a3412;
  box-shadow: 0 2px 4px rgba(154, 52, 18, 0.2);
}

/* Modal do Dia */
.modal-dia-content {
  max-width: 600px;
  width: 90vw;
  border-radius: 12px;
}

.dia-resumo {
  display: flex;
  gap: 30px;
  padding: 16px 20px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

.dia-resumo-total,
.dia-resumo-qtd {
  font-size: 0.95rem;
  color: #334155;
}

.dia-resumo-total strong,
.dia-resumo-qtd strong {
  color: #0f172a;
}

.dia-funcionarios {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.funcionario-vendas {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.funcionario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.funcionario-nome {
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.funcionario-nome i {
  color: #64748b;
}

.funcionario-total {
  font-weight: 700;
  color: #059669;
}

.vendas-lista {
  list-style: none;
  margin: 0;
  padding: 0;
}

.venda-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
}

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

.venda-desc {
  flex: 1;
  font-size: 0.9rem;
  color: #334155;
}

.venda-linha {
  font-size: 0.75rem;
}

.venda-valor {
  font-weight: 600;
  color: #0f172a;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-master {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-ouro {
  background: #fef3c7;
  color: #b45309;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.badge-warning {
  background: #fef3c7;
  color: #b45309;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* Table styling */
.agenda-vendas-ranking .data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.agenda-vendas-ranking .data-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.agenda-vendas-ranking .data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 0.9rem;
}

.agenda-vendas-ranking .data-table tbody tr:hover {
  background: #f8fafc;
}

/* Responsividade */
@media (max-width: 768px) {
  .agenda-vendas-container {
    padding: 15px;
  }

  .agenda-vendas-header {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
  }

  .agenda-vendas-nav {
    justify-content: center;
  }

  .agenda-vendas-filtro {
    flex-direction: column;
    gap: 8px;
  }

  .agenda-vendas-filtro select {
    width: 100%;
    min-width: unset;
  }

  .calendario-dia {
    min-height: 70px;
    padding: 8px;
  }

  .dia-numero {
    font-size: 0.9rem;
  }

  .dia-total {
    font-size: 0.7rem;
  }

  .dia-qtd,
  .dia-func {
    display: none;
  }

  .dia-semana {
    font-size: 0.7rem;
    padding: 5px;
  }

  .resumo-card {
    padding: 16px;
  }

  .resumo-valor {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .calendario-dia {
    min-height: 50px;
    padding: 6px;
  }

  .dia-info {
    display: none;
  }

  .calendario-dia.com-vendas .dia-numero {
    color: #059669;
    font-weight: 700;
  }

  .calendario-dia.com-vendas.destaque .dia-numero {
    color: #b45309;
  }

  .agenda-vendas-titulo {
    font-size: 1.2rem;
  }
}
