/* ---------- Tracking page ---------- */

.hero-lead--wide { max-width: 900px; }

.bg-layout {
  position: relative;
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: var(--container);
  margin: -96px auto 0;
  padding: 0 var(--gutter) 56px;
}

/* ---------- Form ---------- */

.tk-label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--navy); }
.tk-input {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-family: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
}
.tk-input:focus { outline: none; border-color: var(--sky); box-shadow: var(--ring); background: #fff; }

.tk-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.tk-count { margin-right: auto; font-size: 13px; color: var(--muted); }
.tk-count.is-over { color: #c0392b; font-weight: 700; }

.tk-btn {
  padding: 10px 22px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky), var(--navy));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.tk-btn:disabled { opacity: 0.6; cursor: progress; }
.tk-btn--ghost { background: var(--surface-2); color: var(--navy); border: 1px solid var(--line-strong); }
.tk-error { margin: 12px 0 0; font-size: 13.5px; color: #c0392b; }

/* ---------- Results ---------- */

.tk-results { display: grid; gap: 16px; }

/* Viền mỗi mã theo màu trạng thái (đặt --st ở từng biến thể) */
.tk-item {
  --st: var(--steel);
  background: var(--surface);
  border: 2px solid var(--st);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.tk-st--pending, .tk-st--accepted { --st: #8a97a8; }
.tk-st--pickup_pending, .tk-st--picked_up { --st: #2f7fd0; }
.tk-st--warehoused, .tk-st--shipping { --st: #4b5bd6; }
.tk-st--customs_clearance, .tk-st--customs_cleared { --st: #0e9aa7; }
.tk-st--pending_inspection, .tk-st--on_hold, .tk-st--redispatch_pending { --st: #e08a00; }
.tk-st--delivering { --st: #7c4dcc; }
.tk-st--returning { --st: #e0582b; }
.tk-st--delivered { --st: #1e9e5a; }
.tk-st--cancelled { --st: #c0392b; }
.tk-st--notfound { --st: #b7c2d0; }

.tk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tk-code { margin: 0; font-size: 18px; font-weight: 800; color: var(--navy); font-family: ui-monospace, Menlo, Consolas, monospace; }
.tk-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--st); color: #fff; font-size: 13px; font-weight: 700;
}
.tk-badge svg { width: 15px; height: 15px; stroke-width: 3; }
.tk-done { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1e9e5a; color: #fff; }
.tk-done svg { width: 15px; height: 15px; stroke-width: 3.5; }

.tk-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; margin: 14px 0 0; }
.tk-meta dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tk-meta dd { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-weight: 600; color: var(--ink); word-break: break-word; }

.tk-copy {
  padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface-2); color: var(--navy); font-size: 12px; font-weight: 700; cursor: pointer;
}
.tk-copy.is-copied { background: #e6f6ed; color: #1e9e5a; border-color: #1e9e5a; }

.tk-empty { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

@media (max-width: 640px) {
  .tk-actions { flex-wrap: wrap; }
}
