/* Rastreio de pedido (/rastreio) — escopo .rt-page, nao vaza para o resto do site.
   Paleta = tokens da marca Relifarm (mesmos valores de includes/header.php). */
.rt-page {
  --rt-green-900: #0f2f26;
  --rt-green-800: #143a2f;
  --rt-green-700: #1b4a3c;
  --rt-green-soft: #e3ece6;
  --rt-copper: #c09975;
  --rt-copper-btn: #8a6843;
  --rt-copper-text: #7a5a3d;
  --rt-copper-soft: #d7b697;
  --rt-copper-tint: #f6ede3;
  --rt-cream: #faf8f2;
  --rt-cream-2: #f4f2ea;
  --rt-ink: #1b201e;
  --rt-muted: #6b6f6c;
  --rt-line: #e8e4d7;
  --rt-line-soft: #f0ede3;
  --rt-radius: 14px;
  --rt-shadow: 0 12px 30px -18px rgba(15, 47, 38, .28);
  background: var(--rt-cream);
  color: var(--rt-ink);
  padding-bottom: 56px;
}
.rt-page *, .rt-page *::before, .rt-page *::after { box-sizing: border-box; }
.rt-page svg { width: 18px; height: 18px; flex: none; }
.rt-wrap { max-width: 940px; margin: 0 auto; padding: 0 16px; }

/* ---------- Hero ---------- */
.rt-hero {
  background: linear-gradient(135deg, var(--rt-green-800) 0%, var(--rt-green-900) 100%);
  color: #fff;
  padding: 40px 0 92px;
  position: relative;
  overflow: hidden;
}
.rt-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 320px at 50% -20%, rgba(192, 153, 117, .16), transparent 70%);
}
.rt-hero .rt-wrap { position: relative; z-index: 1; text-align: center; }
.rt-kicker {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--rt-copper-soft); margin-bottom: 10px;
}
.rt-title { font-size: clamp(26px, 5vw, 38px); font-weight: 600; margin: 0 0 10px; color: #fff; line-height: 1.15; }
.rt-sub { margin: 0 auto; max-width: 560px; color: rgba(255, 255, 255, .78); font-size: 15px; line-height: 1.55; }

/* ---------- Cards ---------- */
.rt-body { margin-top: -60px; position: relative; z-index: 2; display: grid; gap: 14px; }
.rt-card {
  background: #fff; border: 1px solid var(--rt-line); border-radius: var(--rt-radius);
  box-shadow: var(--rt-shadow); padding: 20px 22px;
}

/* ---------- Busca ---------- */
.rt-search { display: grid; gap: 14px; }
.rt-field { display: grid; gap: 6px; }
.rt-field label { font-size: 13px; font-weight: 600; color: var(--rt-muted); }
.rt-field input {
  width: 100%; height: 48px; padding: 0 14px; font-size: 16px; color: var(--rt-ink);
  border: 1px solid var(--rt-line); border-radius: 10px; background: #fff; box-shadow: none;
}
.rt-field input:focus { outline: none; border-color: var(--rt-green-700); box-shadow: 0 0 0 3px rgba(27, 74, 60, .15); }
.rt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rt-btn, .rt-btn-pri {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; cursor: pointer; text-decoration: none;
  background: var(--rt-green-800); color: #fff; font-weight: 600;
  transition: background-color .15s ease;
}
.rt-btn { height: 48px; padding: 0 24px; font-size: 15px; }
.rt-btn:hover, .rt-btn-pri:hover { background: var(--rt-green-700); color: #fff; }
.rt-btn:focus-visible, .rt-btn-pri:focus-visible, .rt-btn-sec:focus-visible {
  outline: 3px solid rgba(192, 153, 117, .55); outline-offset: 2px;
}
.rt-btn[disabled] { opacity: .7; cursor: wait; }
.rt-btn.is-loading span::after { content: '…'; }
.rt-hint { margin: 0; font-size: 12.5px; color: var(--rt-muted); line-height: 1.5; }

@media (min-width: 720px) {
  .rt-search { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .rt-hint { grid-column: 1 / -1; }
}

/* ---------- Alertas ---------- */
.rt-alert {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; border: 1px solid;
}
.rt-alert svg { margin-top: 2px; }
.rt-alert span { flex: 1 1 220px; }
.rt-alert-info { background: var(--rt-green-soft); border-color: #cbdcd1; color: var(--rt-green-800); }
.rt-alert-warn { background: var(--rt-copper-tint); border-color: #ead7c1; color: var(--rt-copper-text); }
.rt-alert-erro { background: #fbeceb; border-color: #f1c9c6; color: #8f2a22; }
.rt-alert-acao { font-weight: 700; color: inherit; text-decoration: underline; white-space: nowrap; }

/* ---------- Info do pedido (4 colunas com divisorias) ---------- */
.rt-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; padding: 18px 8px; }
.rt-info-item { display: grid; gap: 3px; min-width: 0; padding: 0 14px; align-content: start; }
.rt-info-item:nth-child(2n) { border-left: 1px solid var(--rt-line); }
@media (min-width: 720px) {
  .rt-info { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rt-info-item + .rt-info-item { border-left: 1px solid var(--rt-line); }
}
.rt-ic {
  width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.rt-ic svg { width: 17px; height: 17px; }
.rt-ic-azul, .rt-ic-verde { background: var(--rt-green-soft); color: var(--rt-green-700); }
.rt-ic-amarelo, .rt-ic-cinza { background: var(--rt-copper-tint); color: var(--rt-copper-btn); }
.rt-lbl { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rt-muted); }
.rt-val { font-size: 15px; font-weight: 700; color: var(--rt-ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---------- Status atual ---------- */
.rt-status { display: grid; gap: 12px; }
.rt-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rt-muted); }
.rt-badge {
  display: inline-flex; align-items: center; gap: 9px; justify-self: start;
  padding: 8px 14px; border-radius: 999px; background: var(--rt-green-soft); color: var(--rt-green-900);
  font-weight: 600; font-size: 14.5px; line-height: 1.3;
}
.rt-status.is-entregue .rt-badge svg { color: var(--rt-green-700); }
.rt-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--rt-green-700); flex: none;
  animation: rt-pulse 1.8s ease-out infinite;
}
@keyframes rt-pulse { 0% { box-shadow: 0 0 0 0 rgba(27, 74, 60, .45); } 100% { box-shadow: 0 0 0 8px rgba(27, 74, 60, 0); } }
.rt-progress { position: relative; height: 8px; border-radius: 999px; background: var(--rt-line-soft); margin: 12px 12px 4px; }
.rt-fill {
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--rt-green-800) 0%, var(--rt-green-700) 45%, var(--rt-copper) 100%);
  transition: width .6s ease;
}
.rt-plane {
  position: absolute; top: 50%; transform: translate(-50%, -50%) rotate(90deg);
  width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--rt-green-900);
  border: 1px solid var(--rt-line);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(15, 47, 38, .18);
}
.rt-plane svg { width: 14px; height: 14px; }
.rt-note { margin: 0; font-size: 13px; color: var(--rt-copper-text); }

/* ---------- Timeline ---------- */
.rt-h2 { font-size: 16px; font-weight: 700; margin: 0 0 14px; color: var(--rt-ink); }
.rt-timeline { list-style: none; margin: 0; padding: 0; }
.rt-ev { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.rt-ev:last-child { padding-bottom: 0; }
.rt-ev::before {
  content: ''; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 1.5px;
  background: var(--rt-copper-soft); opacity: .7;
}
.rt-ev:last-child::before { display: none; }
.rt-dot {
  width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--rt-copper);
  flex: none; margin-top: 3px; position: relative; z-index: 1;
}
.rt-ev.is-atual .rt-dot {
  border-color: var(--rt-green-700); background: var(--rt-green-700);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--rt-green-700);
}
.rt-ev-txt { display: grid; gap: 1px; min-width: 0; }
.rt-ev-txt strong { font-size: 14.5px; font-weight: 600; color: var(--rt-ink); line-height: 1.35; }
.rt-ev-data { font-size: 12.5px; color: var(--rt-muted); font-variant-numeric: tabular-nums; }
.rt-ev-desc { font-size: 13px; color: var(--rt-muted); }
.rt-vazio { margin: 0; color: var(--rt-muted); font-size: 14.5px; }

/* ---------- Acoes ---------- */
.rt-acoes { display: flex; flex-wrap: wrap; gap: 10px; }
.rt-btn-pri, .rt-btn-sec { min-height: 44px; padding: 0 18px; font-size: 14px; }
.rt-btn-sec {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 10px;
  border: 1px solid var(--rt-copper); background: #fff; color: var(--rt-ink);
  font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s ease;
}
.rt-btn-sec:hover { background: var(--rt-copper-tint); color: var(--rt-ink); }

@media (prefers-reduced-motion: reduce) {
  .rt-pulse { animation: none; }
  .rt-fill { transition: none; }
}
