/* Orders Pages Styles */

.orders-container {
  padding: 20px;
}

/* Seção do Gráfico de Pedidos */
.orders-chart-section {
  padding: 20px;
  margin-bottom: 24px;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
}

.orders-chart-section .section-header {
  margin-bottom: 20px;
}

.orders-chart-section .section-header h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin: 0;
}

/* Filtros do Gráfico */
.chart-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-end;
  padding: 16px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
  flex: 1;
}

.filter-group label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.filter-group .input {
  padding: 10px 12px;
  font-size: 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
}

.filter-group input[type="date"] {
  padding: 10px 12px;
  font-size: 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
}

/* Container do Gráfico */
.chart-container {
  width: 100%;
  height: 400px;
  position: relative;
  background-color: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 16px;
}

#ordersChart {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

@media (max-width: 768px) {
  .chart-filters {
    flex-direction: column;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .chart-container {
    height: 300px;
  }
}

.order-card-history {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 4px solid var(--accent-color);
}

.order-card-history:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.order-header-history {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.order-id-history {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.order-date-history {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.order-status-badge {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.order-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.order-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-summary-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.order-summary-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.order-items-preview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.order-item-preview {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.order-detail-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.order-detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.order-detail-items {
  margin-bottom: 20px;
}

.order-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.order-detail-item:last-child {
  border-bottom: none;
}

.order-detail-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-detail-item-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.order-detail-item-quantity {
  font-size: 14px;
  color: var(--text-secondary);
}

.order-detail-item-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-color);
}

.order-detail-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius);
  margin-top: 20px;
}

.order-detail-total-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.order-detail-total-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
}

.timeline-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.timeline-section h3 {
  margin-bottom: 20px;
}

.messages-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.messages-section h3 {
  margin-bottom: 20px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-item {
  padding: 12px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent-color);
}

.message-text {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.message-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.back-btn-header {
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: var(--transition);
}

.back-btn-header:hover {
  background-color: var(--bg-card);
}

.favorite-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
}

.favorite-btn:hover {
  background-color: var(--bg-card);
}

.favorite-btn.active {
  color: var(--accent-color);
}

.product-detail-hero {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
}

.product-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-content {
  padding: 20px;
}
