:root {
  --cpf-green: #20c866;
  --cpf-dark: #087c3c;
  --cpf-pale: #effbf4;
  --cpf-border: #d7e8de;
  --cpf-ink: #152219;
  --cpf-muted: #66746b;
}
.cpf-card {
  max-width: 1100px;
  margin: 28px auto;
  padding: 30px;
  border: 1px solid var(--cpf-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(8, 124, 60, 0.11);
  color: var(--cpf-ink);
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}
.cpf-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}
.cpf-brand > span,
.cpf-mini-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, #61f49b, var(--cpf-green));
  color: #fff;
  font-weight: 900;
}
.cpf-brand h2,
.cpf-brand p {
  margin: 0;
}
.cpf-brand p {
  color: var(--cpf-muted);
}
.cpf-track-form label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}
.cpf-track-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--cpf-border);
  border-radius: 11px;
  font: inherit;
  resize: vertical;
}
.cpf-track-form textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--cpf-green) 20%, transparent);
  border-color: var(--cpf-green);
}
.cpf-track-form button,
.cpf-3d-button {
  margin-top: 11px;
  padding: 13px 20px;
  border: 1px solid color-mix(in srgb, var(--cpf-green) 70%, #003b1c);
  border-bottom-width: 4px;
  border-radius: 11px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--cpf-green) 82%, #fff),
    var(--cpf-green)
  );
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
  box-shadow:
    0 7px 13px color-mix(in srgb, var(--cpf-green) 28%, transparent),
    inset 0 1px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transform: translateY(0);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}
.cpf-3d-button:hover,
.cpf-track-form button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow:
    0 9px 17px color-mix(in srgb, var(--cpf-green) 35%, transparent),
    inset 0 1px rgba(255, 255, 255, 0.4);
}
.cpf-3d-button:active,
.cpf-track-form button:active {
  border-bottom-width: 1px;
  transform: translateY(3px);
  box-shadow:
    0 2px 5px color-mix(in srgb, var(--cpf-green) 25%, transparent),
    inset 0 2px 3px rgba(0, 0, 0, 0.12);
}
.cpf-3d-button:focus-visible,
.cpf-track-form button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cpf-green) 30%, transparent);
  outline-offset: 3px;
}
.cpf-message {
  margin: 16px 0;
  color: var(--cpf-dark);
  font-weight: 650;
}
.cpf-error,
.cpf-not-found {
  color: #b42318;
}
.cpf-result {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--cpf-border);
  border-radius: 17px;
  overflow: hidden;
}
.cpf-result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.cpf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px 0;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fcf9, var(--cpf-pale));
}
.cpf-actions .cpf-3d-button {
  margin: 0;
  padding: 9px 14px;
  font-size: 0.88rem;
}
.cpf-snapshot {
  display: grid;
  grid-template-columns: minmax(230px, 0.75fr) minmax(320px, 1.25fr);
  gap: 24px;
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--cpf-border);
  border-radius: 18px;
  background: linear-gradient(145deg, #f8fcfa, #fff);
  box-shadow: 0 12px 30px rgba(8, 124, 60, 0.08);
}
.cpf-snapshot-media {
  display: grid;
  place-items: center;
  min-height: 245px;
  border-radius: 14px;
  overflow: hidden;
  background: #f2f5f3;
}
.cpf-snapshot-image {
  width: 100%;
  height: 100%;
  max-height: 300px;
  object-fit: contain;
}
.cpf-package-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: 155px;
  height: 125px;
  border-radius: 8px;
  background: linear-gradient(145deg, #d9ad67, #b67d2f);
  color: #704716;
  box-shadow: 0 18px 24px rgba(85, 55, 15, 0.18);
  transform: perspective(400px) rotateY(-7deg);
}
.cpf-package-illustration:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22px;
  background: #a66d26;
  opacity: 0.75;
}
.cpf-package-illustration span {
  font-size: 3rem;
  opacity: 0.18;
}
.cpf-package-illustration i {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 1.5rem;
  font-style: normal;
}
.cpf-snapshot-details h3 {
  margin: 0 0 14px;
  font-size: 1.5rem;
}
.cpf-snapshot-details dl {
  margin: 0;
}
.cpf-snapshot-details dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--cpf-border);
}
.cpf-snapshot-details dt {
  color: var(--cpf-muted);
}
.cpf-snapshot-details dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}
.cpf-snapshot-details dl > div:first-child dd {
  color: var(--cpf-green);
  font-size: 1.06rem;
}
.cpf-status-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--cpf-green);
  color: #fff;
  font-size: 0.82rem;
}
.cpf-progress-card {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--cpf-border);
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #f5fbf7);
  box-shadow: 0 8px 20px rgba(8, 124, 60, 0.07);
}
.cpf-progress-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.cpf-progress-heading h4 {
  margin: 0;
}
.cpf-progress-heading > span {
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--cpf-green);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}
.cpf-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.cpf-progress:before,
.cpf-progress:after {
  content: "";
  position: absolute;
  top: 18px;
  left: 12.5%;
  width: 75%;
  height: 6px;
  border-radius: 6px;
  background: #dbe7df;
}
.cpf-progress:after {
  width: var(--cpf-progress);
  max-width: 75%;
  background: var(--cpf-green);
}
.cpf-progress > div {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #8a9690;
  font-size: 0.78rem;
  font-weight: 700;
}
.cpf-progress i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0 auto 8px;
  border: 3px solid #dbe7df;
  border-radius: 50%;
  background: #fff;
  color: #8a9690;
  font-style: normal;
}
.cpf-progress .is-active {
  color: var(--cpf-dark);
}
.cpf-progress .is-active i {
  border-color: var(--cpf-green);
  background: var(--cpf-green);
  color: #fff;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--cpf-green) 35%, transparent);
}
.cpf-smart-summary {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.cpf-smart-summary > div {
  padding: 15px 17px;
  border-left: 5px solid var(--cpf-green);
  border-radius: 10px;
  background: var(--cpf-pale);
}
.cpf-smart-summary small,
.cpf-smart-summary b,
.cpf-smart-summary span {
  display: block;
}
.cpf-smart-summary small {
  color: var(--cpf-dark);
  font-weight: 800;
  text-transform: uppercase;
}
.cpf-smart-summary b {
  margin-top: 3px;
  font-size: 1.08rem;
}
.cpf-smart-summary span,
.cpf-smart-summary p {
  margin: 3px 0 0;
  color: var(--cpf-muted);
}
.cpf-result-logo {
  max-width: 190px;
  max-height: 70px;
  object-fit: contain;
}
.cpf-barcode-wrap {
  text-align: center;
}
.cpf-barcode-wrap svg {
  display: block;
  width: 260px;
  height: 72px;
}
.cpf-barcode-wrap b {
  display: block;
}
.cpf-people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 24px 0;
}
.cpf-people > div {
  padding: 4px;
}
.cpf-people h4,
.cpf-data-section > h4 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #9ca3a0;
  font-size: 1.25rem;
}
.cpf-people b {
  display: block;
}
.cpf-people p {
  margin: 5px 0;
  color: #38433c;
}
.cpf-status-banner {
  margin: 16px -22px;
  padding: 14px;
  background: var(--cpf-green);
  color: #fff;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 800;
}
.cpf-data-section {
  margin: 28px 0;
}
.cpf-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 35px;
}
.cpf-info-grid b,
.cpf-info-grid span {
  display: block;
}
.cpf-info-grid span {
  margin-top: 5px;
  color: #3d4740;
}
.cpf-info-wide {
  grid-column: 1/-1;
}
.cpf-feature {
  display: block;
  max-width: 100%;
  max-height: 360px;
  margin: 20px auto;
  border-radius: 12px;
  object-fit: contain;
}
.cpf-map {
  height: 410px;
  border: 1px solid var(--cpf-border);
  border-radius: 14px;
  overflow: hidden;
  background: #e8f2ec;
}
.cpf-route-section > h4,
.cpf-history-section > h4 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cpf-dark);
  font-size: 1.35rem;
}
.cpf-route-section > h4 > span,
.cpf-history-section > h4 > span {
  color: var(--cpf-green);
  font-size: 1.55rem;
}
.cpf-route-section > h4 small {
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 99px;
  background: #e9fff1;
  color: var(--cpf-dark);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}
.cpf-route-section > h4 small:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--cpf-green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cpf-green) 18%, transparent);
  animation: cpf-live 1.6s infinite;
}
.cpf-route-line {
  animation: cpf-route 1.8s linear infinite;
}
@keyframes cpf-route {
  to {
    stroke-dashoffset: -32;
  }
}
@keyframes cpf-live {
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}
.cpf-map-empty {
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--cpf-muted);
}
.cpf-map-empty span {
  font-size: 3rem;
  color: var(--cpf-green);
}
.cpf-map-empty p {
  margin: 4px;
}
.cpf-history {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cpf-history li {
  position: relative;
  margin-left: 11px;
  padding: 0 0 20px 28px;
  border-left: 3px solid #dce5df;
}
.cpf-history-check {
  position: absolute;
  left: -16px;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #7d8b83;
  color: #fff;
  font-size: 0.82rem;
  font-style: normal;
  box-shadow: 0 3px 9px rgba(30, 45, 35, 0.18);
}
.cpf-history li.is-current .cpf-history-check {
  background: var(--cpf-green);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--cpf-green) 38%, transparent);
}
.cpf-history-content {
  padding: 0 0 8px 10px;
}
.cpf-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.cpf-history-row b {
  color: var(--cpf-ink);
  font-size: 1.08rem;
}
.cpf-history li.is-current .cpf-history-row b {
  color: var(--cpf-green);
}
.cpf-history-row time {
  padding: 6px 10px;
  border: 1px solid var(--cpf-border);
  border-radius: 7px;
  background: #f8faf9;
}
.cpf-history-content > strong {
  display: block;
  margin-top: 9px;
  color: var(--cpf-muted);
  font-weight: 650;
}
.cpf-history-content > strong span {
  color: #e43e50;
}
.cpf-history b {
  text-transform: capitalize;
}
.cpf-history strong,
.cpf-history time {
  margin-left: 9px;
}
.cpf-history time {
  color: var(--cpf-muted);
  font-size: 0.88rem;
}
.cpf-history p {
  margin: 6px 0;
  color: var(--cpf-muted);
}
.cpf-table-wrap {
  overflow-x: auto;
}
.cpf-result table {
  width: 100%;
  border-collapse: collapse;
}
.cpf-result th,
.cpf-result td {
  padding: 11px;
  border-bottom: 1px solid var(--cpf-border);
  text-align: center;
}
.cpf-result th {
  background: var(--cpf-green);
  color: #fff;
}
.cpf-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 12px;
  background: var(--cpf-border);
}
.cpf-totals > div {
  padding: 13px;
  background: #fff;
  text-align: center;
}
.cpf-totals b,
.cpf-totals span {
  display: block;
}
.cpf-totals span {
  margin-top: 4px;
}
.cpf-empty {
  color: var(--cpf-muted);
}
.cpf-my-list article {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--cpf-border);
}
.cpf-my-list svg {
  width: 140px;
  height: 55px;
}
.cpf-my-list small {
  display: block;
  color: var(--cpf-muted);
}
.cpf-my-list article > span {
  padding: 7px 12px;
  border-radius: 99px;
  background: var(--cpf-green);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
}
.cpf-notice {
  padding: 16px;
  border-radius: 11px;
  background: var(--cpf-pale);
}
@media (max-width: 760px) {
  .cpf-card {
    padding: 18px;
  }
  .cpf-result-top,
  .cpf-people,
  .cpf-snapshot {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
  .cpf-snapshot {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .cpf-snapshot-media {
    min-height: 190px;
  }
  .cpf-history-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .cpf-people,
  .cpf-info-grid {
    grid-template-columns: 1fr;
  }
  .cpf-smart-summary {
    grid-template-columns: 1fr;
  }
  .cpf-progress > div span {
    display: none;
  }
  .cpf-progress:before,
  .cpf-progress:after {
    top: 16px;
  }
  .cpf-progress i {
    width: 34px;
    height: 34px;
  }
  .cpf-totals {
    grid-template-columns: 1fr 1fr;
  }
  .cpf-status-banner {
    margin-left: -18px;
    margin-right: -18px;
  }
  .cpf-map {
    height: 310px;
  }
  .cpf-history strong,
  .cpf-history time {
    display: block;
    margin: 4px 0;
  }
  .cpf-my-list article {
    grid-template-columns: 1fr;
  }
  .cpf-barcode-wrap svg {
    max-width: 100%;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }
  .cpf-print-target,
  .cpf-print-target * {
    visibility: visible !important;
  }
  .cpf-print-target {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
  }
  .cpf-actions,
  .cpf-map,
  .leaflet-control-container {
    display: none !important;
  }
}

