/* ═══════════════════════════════════════════════════════════════
   TRACKING PAGE
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.tracking-body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--color-bg, #0d0d0f);
  color: var(--color-text, #f0f0f3);
  min-height: 100vh;
  display: flex; flex-direction: column;
  line-height: 1.5;
}

/* ── Header ──────────────────────────────────────────────────── */
.tracking-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  height: 60px;
  background: rgba(13,13,15,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: sticky; top: 0; z-index: 10;
}

.tracking-logo {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
  text-decoration: none; color: var(--color-text, #f0f0f3);
}
.tracking-logo span { color: #8b5cf6; }

.tracking-header nav { display: flex; gap: 20px; }
.tracking-nav-link {
  font-size: 13px; font-weight: 500;
  color: #9898aa; text-decoration: none;
  transition: color .18s;
}
.tracking-nav-link:hover { color: #f0f0f3; }

/* ── Main ────────────────────────────────────────────────────── */
.tracking-main {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 60px 20px 40px;
  gap: 32px;
}

/* ── Hero / Form ─────────────────────────────────────────────── */
.tracking-hero {
  text-align: center;
  width: 100%; max-width: 560px;
}

.tracking-hero-icon {
  width: 64px; height: 64px;
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #8b5cf6;
  margin: 0 auto 20px;
}

.tracking-hero-title {
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.tracking-hero-sub {
  font-size: 14px; color: #9898aa;
  margin-bottom: 28px;
  line-height: 1.6;
}

.tracking-form {
  display: flex; gap: 10px;
  flex-wrap: wrap; justify-content: center;
}

.tracking-input-wrap {
  position: relative; flex: 1; min-width: 240px;
}
.tracking-input-wrap i {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: #5a5a6e; font-size: 14px; pointer-events: none;
}
.tracking-input {
  width: 100%;
  padding: 13px 16px 13px 36px;
  background: #141416;
  border: 1px solid #2a2a32;
  border-radius: 10px;
  color: #f0f0f3;
  font-size: 14px; font-family: 'Courier New', monospace;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.tracking-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
.tracking-input::placeholder { color: #5a5a6e; font-family: 'Inter', sans-serif; }

.tracking-submit {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  background: #8b5cf6; color: #000;
  font-weight: 700; font-size: 14px;
  border: none; border-radius: 10px;
  cursor: pointer;
  transition: background .18s, transform .18s;
  white-space: nowrap;
}
.tracking-submit:hover { background: #7c3aed; transform: translateY(-1px); }
.tracking-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.tracking-error {
  margin-top: 10px;
  color: #ef4444; font-size: 13px;
  min-height: 18px;
}

/* ── Help text ───────────────────────────────────────────────── */
.tracking-help {
  display: flex; align-items: flex-start; gap: 8px;
  max-width: 480px;
  padding: 12px 16px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 10px;
  font-size: 12px; color: #9898aa;
  line-height: 1.5;
}
.tracking-help i { color: #3b82f6; font-size: 14px; margin-top: 1px; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════
   RESULT
   ════════════════════════════════════════════════════════════════ */
.tracking-result {
  width: 100%; max-width: 680px;
  display: flex; flex-direction: column; gap: 20px;
  animation: fadeUp .3s ease;
}

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

/* ── Status Hero ─────────────────────────────────────────────── */
.tr-status-hero {
  border-radius: 14px;
  padding: 24px 24px 20px;
  border: 1px solid;
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.tr-status-hero--pending   { background: rgba(245,166,35,.08); border-color: rgba(245,166,35,.25); }
.tr-status-hero--approved  { background: rgba(59,130,246,.08); border-color: rgba(59,130,246,.25); }
.tr-status-hero--shipped   { background: rgba(168,85,247,.08); border-color: rgba(168,85,247,.25); }
.tr-status-hero--delivered { background: rgba(34,197,94,.08);  border-color: rgba(34,197,94,.25); }
.tr-status-hero--declined  { background: rgba(239,68,68,.08);  border-color: rgba(239,68,68,.25); }

.tr-status-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.tr-status-hero--pending   .tr-status-icon { background: rgba(245,166,35,.15); color: #f5a623; }
.tr-status-hero--approved  .tr-status-icon { background: rgba(59,130,246,.15); color: #3b82f6; }
.tr-status-hero--shipped   .tr-status-icon { background: rgba(168,85,247,.15); color: #a855f7; }
.tr-status-hero--delivered .tr-status-icon { background: rgba(34,197,94,.15);  color: #22c55e; }
.tr-status-hero--declined  .tr-status-icon { background: rgba(239,68,68,.15);  color: #ef4444; }

.tr-status-info { flex: 1; }
.tr-status-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #9898aa; margin-bottom: 4px; }
.tr-status-name  { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.tr-status-ref   { font-size: 12px; color: #9898aa; margin-top: 4px; font-family: 'Courier New', monospace; }

.tr-status-date { font-size: 12px; color: #9898aa; text-align: right; }

/* ── Progress Steps ──────────────────────────────────────────── */
.tr-progress {
  background: #141416;
  border: 1px solid #2a2a32;
  border-radius: 14px;
  padding: 20px 24px;
}

.tr-steps {
  display: flex; align-items: flex-start;
  position: relative;
  margin-bottom: 10px;
}

.tr-steps::before {
  content: '';
  position: absolute;
  top: 18px; left: calc(10% + 18px); right: calc(10% + 18px);
  height: 2px;
  background: #2a2a32;
  z-index: 0;
}

.tr-progress-fill {
  position: absolute;
  top: 18px; left: calc(10% + 18px);
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #a855f7);
  z-index: 1;
  transition: width .6s ease;
}

.tr-step {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center;
  z-index: 2;
}

.tr-step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #1a1a1e;
  border: 2px solid #2a2a32;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #5a5a6e;
  transition: all .3s ease;
}
.tr-step--done   .tr-step-dot { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.1); }
.tr-step--active .tr-step-dot { border-color: #8b5cf6; color: #8b5cf6; background: rgba(139,92,246,.1); }

.tr-step-label {
  font-size: 10px; font-weight: 600; color: #5a5a6e;
  text-transform: uppercase; letter-spacing: .4px;
  line-height: 1.3;
}
.tr-step--done   .tr-step-label { color: #22c55e; }
.tr-step--active .tr-step-label { color: #8b5cf6; }

/* ── Body ────────────────────────────────────────────────────── */
.tr-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}
@media (max-width: 600px) { .tr-body { grid-template-columns: 1fr; } }

/* ── Items ───────────────────────────────────────────────────── */
.tr-items-card {
  background: #141416;
  border: 1px solid #2a2a32;
  border-radius: 14px;
  overflow: hidden;
}
.tr-card-title {
  padding: 12px 16px;
  font-size: 12px; font-weight: 600; color: #9898aa;
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid #2a2a32;
}

.tr-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2a32;
  font-size: 13px;
}
.tr-item:last-child { border-bottom: none; }
.tr-item-img {
  width: 44px; height: 44px;
  object-fit: cover; border-radius: 6px;
  background: #1a1a1e; flex-shrink: 0;
}
.tr-item-info { flex: 1; }
.tr-item-name  { font-weight: 600; margin-bottom: 2px; }
.tr-item-meta  { font-size: 11px; color: #9898aa; }
.tr-item-price { font-weight: 700; }

.tr-total-row {
  display: flex; justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px; font-weight: 700;
  border-top: 1px solid #353540;
  background: #1a1a1e;
}

/* ── Side: carrier + timeline ────────────────────────────────── */
.tr-side { display: flex; flex-direction: column; gap: 14px; }

.tr-carrier-card {
  background: #141416;
  border: 1px solid #2a2a32;
  border-radius: 14px;
  padding: 16px;
}
.tr-carrier-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.tr-carrier-number {
  font-family: 'Courier New', monospace;
  font-size: 13px; color: #8b5cf6;
  margin-bottom: 8px;
}
.tr-carrier-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #3b82f6; text-decoration: none;
  transition: color .18s;
}
.tr-carrier-link:hover { color: #60a5fa; }

/* ── Timeline ────────────────────────────────────────────────── */
.tr-timeline-card {
  background: #141416;
  border: 1px solid #2a2a32;
  border-radius: 14px;
  overflow: hidden;
}
.tr-timeline-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 0; }

.tr-tl-event {
  display: flex; gap: 12px;
  padding-bottom: 16px;
  position: relative;
}
.tr-tl-event::before {
  content: '';
  position: absolute; left: 14px; top: 26px; bottom: 0;
  width: 2px; background: #2a2a32;
}
.tr-tl-event:last-child::before { display: none; }
.tr-tl-event:last-child { padding-bottom: 0; }

.tr-tl-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: #1a1a1e; border: 2px solid #2a2a32;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #5a5a6e; flex-shrink: 0;
}
.tr-tl-dot--done   { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.1); }
.tr-tl-dot--active { border-color: #8b5cf6; color: #8b5cf6; background: rgba(139,92,246,.1); }

.tr-tl-body { padding-top: 4px; }
.tr-tl-status { font-size: 13px; font-weight: 600; }
.tr-tl-time   { font-size: 11px; color: #5a5a6e; margin-top: 1px; }
.tr-tl-note   { font-size: 12px; color: #9898aa; margin-top: 3px; }

/* ── Footer ──────────────────────────────────────────────────── */
.tracking-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px; color: #5a5a6e;
  border-top: 1px solid #1a1a1e;
}
.tracking-footer a { color: #9898aa; text-decoration: none; }
.tracking-footer a:hover { color: #8b5cf6; }

@media (max-width: 480px) {
  .tracking-header { padding: 0 16px; }
  .tr-steps::before { display: none; }
  .tr-progress-fill { display: none; }
}
