/* ===========================
   Wrapper generale
=========================== */
.tendency-track-wrapper {
  max-width: 800px; /* 🔥 aumentata per desktop */
  margin: 0 auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #111827;
}

/* ===========================
   Form
=========================== */
.tendency-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}
.tendency-form input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.tendency-form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

.tendency-form button {
  background: #111827;
  color: #fff;
  font-weight: 500;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.tendency-form button:hover {
  background: #000;
}
.tendency-form button:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

/* ===========================
   Card principale
=========================== */
.tendency-tracking {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  padding: 24px;
}

/* ===========================
   Header
=========================== */
.tracking-header {
  margin-bottom: 24px;
}
.tracking-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}
.tracking-number {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

/* ===========================
   Status cards
=========================== */
.tracking-status-cards {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.status-card {
  flex: 1;
  min-width: 160px;
  background: #f9fafb;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.status-card span {
  font-size: 12px;
  color: #6b7280;
}
.status-card strong {
  font-size: 14px;
  color: #111827;
  margin-top: 4px;
}
.status-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.status-green { background: #dcfce7; color: #16a34a; }
.status-blue  { background: #dbeafe; color: #2563eb; }
.status-purple{ background: #f3e8ff; color: #7e22ce; }

/* ===========================
   Shipping route
=========================== */
.shipping-route {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}
.shipping-route-header {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}
.shipping-route-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
}
.shipping-route-body svg {
  width: 28px;
  height: 28px;
  color: #2563eb;
}

/* ===========================
   Timeline
=========================== */
.tendency-timeline {
  position: relative;
  margin: 0;
  padding-left: 20px;
  border-left: 2px solid #e5e7eb;
}
.tendency-timeline li {
  list-style: none;
  position: relative;
  margin-bottom: 24px;
}
.tendency-timeline li:last-child {
  margin-bottom: 0;
}
.point {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: absolute;
  left: -29px;
  top: 4px;
}
.point-active { background: #16a34a; }
.point-inactive { background: #d1d5db; }
.timeline-content h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.timeline-content p {
  margin: 4px 0;
  font-size: 13px;
  color: #374151;
}
.timeline-content time {
  font-size: 12px;
  color: #6b7280;
}

/* ===========================
   Footer buttons
=========================== */
.tracking-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.tracking-footer button {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}
.btn-cancel {
  background: #f9fafb;
  color: #111827;
}
.btn-cancel:hover { background: #e5e7eb; }
.btn-primary {
  background: #111827;
  color: #fff;
}
.btn-primary:hover { background: #000; }

/* ===========================
   Responsive
=========================== */
@media (max-width: 640px) {
  .tendency-form {
    flex-direction: column;
  }
  .tendency-form input,
  .tendency-form button {
    width: 100%;
  }
  .tracking-status-cards {
    flex-direction: column;
  }
  .shipping-route-body {
    flex-direction: column;
    gap: 12px;
  }
}