/* Estilos da Página de Acompanhamento do Cliente */

.client-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}

/* Caixa de Busca */
.search-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1.1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.tracking-input {
  width: 100%;
  background: var(--bg-input);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem 1rem 1rem 3.2rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: var(--transition);
}

.tracking-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  background: rgba(31, 41, 55, 0.95);
}

.tracking-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-search {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

/* Atalhos de Exemplo para Teste Rápido */
.quick-tests {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.quick-tests-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 0.25rem;
}

.chip-test {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.chip-test:hover {
  background: var(--primary-light);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

/* Card do Pedido Encontrado */
.order-result-card {
  display: none; /* Inicialmente oculto */
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.order-card-header {
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
}

.order-id-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.order-number {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.order-customer {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tracking-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #818cf8;
}

/* Card de Previsão de Entrega */
.delivery-estimate-box {
  margin: 1.75rem 2rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(14, 165, 233, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.delivery-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.delivery-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.delivery-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a5b4fc;
}

.delivery-date {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.delivery-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Status Atual em Destaque */
.current-status-banner {
  margin: 0 2rem 1.75rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.current-status-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-label-main {
  font-size: 1.15rem;
  font-weight: 700;
}

.status-desc-main {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Timeline Interativa Real */
.timeline-section {
  padding: 0 2rem 2rem;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-stepper {
  display: flex;
  flex-direction: column;
  position: relative;
}

.timeline-stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 20px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
  padding-bottom: 2rem;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.step-marker {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: var(--transition);
}

/* Estado: Concluído */
.timeline-step.completed .step-marker {
  background: #10b981;
  border-color: #10b981;
  color: white;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* Estado: Atual */
.timeline-step.current .step-marker {
  background: var(--primary);
  border-color: #818cf8;
  color: white;
  box-shadow: 0 0 20px var(--primary-glow);
  animation: pulseMarker 2s infinite;
}

@keyframes pulseMarker {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Estado: Pendente */
.timeline-step.pending .step-marker {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.step-content {
  flex: 1;
  padding-top: 0.35rem;
}

.step-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-step.pending .step-title {
  color: var(--text-muted);
}

.step-date {
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  color: #a5b4fc;
}

.step-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.timeline-step.pending .step-text {
  color: var(--text-muted);
}

/* Histórico Real */
.history-section {
  padding: 1.75rem 2rem 2rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.history-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #a5b4fc;
  white-space: nowrap;
  padding-top: 0.15rem;
}

.history-details {
  flex: 1;
}

.history-status-name {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.history-status-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Notificações Push Web */
.push-notify-box {
  margin: 1.5rem 2rem 2rem;
  padding: 1rem 1.25rem;
  background: rgba(99, 102, 241, 0.05);
  border: 1px dashed rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.push-notify-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Estado de Erro ou Não Encontrado */
.not-found-card {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  animation: fadeIn 0.3s ease;
}

.not-found-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
}

.not-found-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.not-found-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .order-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .push-notify-box {
    flex-direction: column;
    align-items: flex-start;
  }
  .push-notify-box .btn {
    width: 100%;
  }
}
