:root {
  color-scheme: light;
}

body.rastreio-page,
body.page-rastreio {
  margin: 0;
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
}

body.rastreio-page {
  background: #f5f7fb;
}

.rastreio-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.rastreio-head {
  text-align: center;
  margin-bottom: 22px;
}

.rastreio-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.rastreio-head p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
}

.rastreio-search {
  display: flex;
  gap: 10px;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #e8edf3;
}

.rastreio-search input {
  flex: 1;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.rastreio-search button {
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.rastreio-card {
  margin-top: 18px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e8edf3;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.rastreio-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #eef2f6;
}

.rastreio-meta img {
  height: 18px;
  width: auto;
}

.rastreio-meta strong {
  font-size: 13px;
}

.rastreio-meta span {
  font-size: 12px;
  color: #64748b;
}

.rastreio-progress {
  height: 8px;
  background: #eef2f6;
}

.rastreio-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  width: 0;
  transition: width 0.6s ease;
}

.rastreio-steps {
  padding: 8px 18px 18px;
}

.rastreio-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed #edf1f5;
}

.rastreio-step:last-child {
  border-bottom: 0;
}

.rastreio-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  margin-top: 2px;
  background: #fff;
}

.rastreio-step.done .rastreio-dot {
  border-color: #16a34a;
  background: #16a34a;
  box-shadow: inset 0 0 0 3px #fff;
}

.rastreio-step.current .rastreio-dot {
  border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

.rastreio-step h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.rastreio-step p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.rastreio-step.pending h3,
.rastreio-step.pending p {
  color: #94a3b8;
}

.rastreio-map-card {
  margin: 0;
  border-top: 1px solid #eef2f6;
  border-bottom: 1px solid #eef2f6;
}

.rastreio-map-card .rnc-map-card {
  border-radius: 0;
  box-shadow: none;
  border: 0;
}

.rastreio-alert {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
}

.rastreio-empty {
  margin-top: 18px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.rastreio-back {
  display: inline-block;
  margin-top: 18px;
  color: #16a34a;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 600px) {
  .rastreio-search {
    flex-direction: column;
  }
  .rastreio-search button {
    padding: 12px;
  }
}

/* Mapa (também usado pelo rastreio.js) */
.rnc-map-card {
  margin-top: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.12);
  border: 1px solid #edf0f3;
}

.rnc-map-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  color: #fff;
}

.rnc-map-pin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rnc-map-pin svg {
  width: 18px;
  height: 18px;
}

.rnc-map-txt {
  min-width: 0;
  flex: 1;
}

.rnc-map-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.rnc-map-addr {
  font-size: 11.5px;
  opacity: 0.95;
  line-height: 1.3;
  margin-top: 3px;
}

.rnc-map-frame {
  position: relative;
  line-height: 0;
  background: #e9eef1;
}

.rnc-map-frame iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
  filter: saturate(1.08) contrast(1.02);
}

.rnc-map-shield {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  cursor: default;
}

@media (min-width: 768px) {
  body.page-rastreio .rastreio-wrap {
    padding: 12px 0 32px;
  }

  body.page-rastreio .rastreio-search {
    padding: 16px 18px;
  }

  body.page-rastreio .rastreio-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px 24px;
    padding: 18px 22px;
  }

  body.page-rastreio .rastreio-meta img {
    grid-column: 1 / -1;
    height: 22px;
    justify-self: start;
  }

  body.page-rastreio .rnc-map-frame iframe {
    height: min(42vh, 380px);
  }

  body.page-rastreio .rastreio-steps {
    padding: 12px 22px 22px;
  }

  body.page-rastreio .rastreio-step {
    grid-template-columns: 32px 1fr;
    gap: 16px;
    padding: 14px 0;
  }
}
