* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --correios-blue: #003d7a;
  --correios-yellow: #FFE000;
  --correios-blue-dark: #004f8b;
  --correios-yellow-dark: #d48e00;
  --bg: #ffffff;
  --bg-light: #f5f5f5;
  --text: #333333;
  --text-muted: #666666;
  --border: #dddddd;
  --danger: #cc0000;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --radius: 4px;
}

html, body {
  min-height: 100%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

img {
  max-width: 100%;
  display: block;
}

button, input, textarea {
  font: inherit;
}

a {
  color: var(--correios-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* =========================================
   ACCESSIBILITY BAR
========================================= */

.accessibility-bar {
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
}

.accessibility-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 16px;
}

.accessibility-btn {
  background: transparent;
  border: none;
  color: #555;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
}

.accessibility-btn svg {
  width: 14px;
  height: 14px;
  stroke: #555;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================
   TOPBAR
========================================= */

.topbar {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.topbar-yellow-border {
  height: 4px;
  background: var(--correios-yellow);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #555;
  border-radius: 2px;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.correios-logo-svg {
  height: 46px;
  width: auto;
}


.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.entrar-btn {
  background: transparent;
  border: none;
  color: var(--correios-blue);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  transition: opacity 0.15s;
}

.entrar-btn:hover {
  opacity: 0.8;
}

.entrar-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--correios-yellow);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================
   LAYOUT CONTAINER
========================================= */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* =========================================
   BREADCRUMB
========================================= */

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--correios-blue);
  text-decoration: none;
  font-size: 13px;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.bc-sep {
  color: #999;
  font-size: 12px;
}

/* =========================================
   PAGE 1 — RASTREAMENTO
========================================= */

.hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.search-card {
  background: #f0f2f5;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px 28px;
  margin-bottom: 0;
}

.search-card p.lead {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--correios-blue);
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 6px;
  color: var(--correios-blue);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}


.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 44px;
  border: 1px solid #cccccc;
  border-radius: var(--radius);
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 14px;
  transition: border-color 0.15s;
}

.input-wrap input:focus {
  border-color: var(--correios-blue);
  box-shadow: 0 0 0 2px rgba(0, 102, 179, 0.15);
}

.input-wrap input.error,
.input-wrap input.input-error {
  border-color: var(--danger);
}

.error-text {
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
}

.search-card-footer {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.main-button {
  min-width: 140px;
  height: 44px;
  border: none;
  border-radius: var(--radius);
  background: var(--correios-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  padding: 0 32px;
  transition: background 0.15s;
}

.main-button:hover:not(:disabled) {
  background: var(--correios-blue-dark);
}

.main-button:disabled {
  background: #6699bb;
  cursor: not-allowed;
  opacity: 0.75;
}

/* =========================================
   BANNER BLOCK
========================================= */

.banner-block {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
}

.banner-full-img {
  width: 100%;
  display: block;
}

.banner-left {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.banner-logo-row {
  display: flex;
  align-items: center;
}

.banner-logo-svg {
  height: 50px;
  width: auto;
}

.banner-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--correios-blue);
  line-height: 1.15;
}

.banner-cta-btn {
  align-self: flex-start;
  border: none;
  background: var(--correios-yellow);
  color: #333;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.banner-cta-btn:hover {
  background: var(--correios-yellow-dark);
}

.banner-right {
  background: #1565c0;
  min-height: 260px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================
   FOOTER
========================================= */

.footer {
  background: var(--correios-yellow);
  margin-top: 48px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 16px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 32px;
}

.footer-col h4 {
  color: var(--correios-blue);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links button {
  background: transparent;
  border: none;
  color: var(--correios-blue);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  transition: opacity 0.15s;
}

.footer-links button:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.footer-links button svg {
  width: 14px;
  height: 14px;
  stroke: var(--correios-blue);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(0, 102, 179, 0.2);
  text-align: center;
  padding: 14px 16px;
  color: var(--correios-blue);
  font-size: 13px;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================================
   PAGE 2 — RESULTADO
========================================= */

.alert-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-icon {
  font-size: 18px;
  color: #e6a800;
  flex-shrink: 0;
}

.alert-box h2 {
  color: #555;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.result-copy {
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.7;
}

.result-copy p {
  margin-bottom: 4px;
}

.result-label {
  font-weight: 700;
  margin-top: 10px !important;
  margin-bottom: 2px !important;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #e65100;
  margin-bottom: 8px;
}

.status-bullet {
  font-size: 10px;
  color: #e65100;
}

.action-button {
  width: 100%;
  border: none;
  border-radius: var(--radius);
  background: var(--correios-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  min-height: 48px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.action-button:hover {
  background: var(--correios-blue-dark);
}

/* =========================================
   PACKAGE IMAGE
========================================= */

.package-card {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 28px;
}

.package-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #ddd2a0;
}

.package-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.package-placeholder {
  width: 100%;
  min-height: 360px;
  background: linear-gradient(135deg, #f0e7bd, #d7cb93 50%, #c2b378);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(31, 70, 95, 0.65);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  padding: 20px;
}

.package-overlay-block {
  position: absolute;
  top: 44%;
  left: 18%;
  width: 28%;
  z-index: 3;
  color: #2b2b2b;
  text-align: left;
}

.package-line {
  margin: 0;
  padding: 0;
  line-height: 1.08;
}

.package-line + .package-line {
  margin-top: 2px;
}

.package-line.name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.package-line.cep {
  font-size: 11px;
  font-weight: 700;
}

.package-line.city {
  font-size: 11px;
  font-weight: 700;
}

.package-line.cpf {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #2b2b2b;
}

/* =========================================
   TIMELINE
========================================= */

.timeline {
  margin: 20px 0 28px;
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #cccccc;
}

.timeline-item {
  position: relative;
  padding-bottom: 22px;
  display: flex;
  gap: 14px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #888888;
  flex-shrink: 0;
}

.timeline-dot.highlight {
  background: var(--correios-yellow);
  box-shadow: 0 0 0 3px rgba(245, 168, 0, 0.2);
}

.timeline-content {
  flex: 1;
}

.timeline-item h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-item h3.highlight {
  color: var(--correios-blue);
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.timeline-link {
  color: var(--correios-blue);
  text-decoration: underline;
  cursor: pointer;
}

.timeline-link-static {
  color: var(--correios-blue);
}

.timeline-wait {
  color: var(--correios-blue);
}

/* =========================================
   SUMMARY CARD (PAGE 2)
========================================= */

.summary-card {
  background: #f9f9f9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
  font-size: 14px;
}

.summary-row {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  line-height: 1.6;
}

.summary-label {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.summary-value {
  color: var(--text);
}

.summary-row-highlight .summary-label {
  color: var(--correios-blue);
}

.summary-date {
  font-weight: 700;
  color: var(--correios-blue);
}

.summary-hidden {
  display: none;
}

/* =========================================
   PAGE 3 / PIX FINAL
========================================= */

#page3 {
  width: 100%;
  margin: 0;
  padding: 0;
}

#page3 .breadcrumb {
  display: none;
}

.pix-fullscreen {
  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f2f2f2;
  overflow: hidden;
}

.pix-left-panel {
  background: #f7c500;
  padding: 86px 64px 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pix-right-panel {
  background: #f2f2f2;
  padding: 86px 64px 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pix-brand-image-wrap {
  width: 100%;
  max-width: 360px;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.pix-brand-image {
  max-width: 100%;
  max-height: 88px;
  object-fit: contain;
}

.pix-brand-placeholder {
  width: 100%;
  min-height: 72px;
  border: 2px dashed rgba(0, 74, 173, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  color: #003f9c;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.pix-main-title {
  margin: 0;
  color: #004aad;
  font-size: 29px;
  line-height: 1.1;
  font-weight: 800;
  text-align: center;
}

.pix-main-subtitle {
  margin: 10px 0 0;
  color: #385a73;
  font-size: 15px;
  text-align: center;
  font-weight: 500;
}

.pix-client-box {
  width: 100%;
  max-width: 232px;
  background: rgba(255, 255, 255, 0.34);
  border-radius: 16px;
  padding: 14px 20px;
  text-align: center;
  margin-top: 26px;
}

.pix-client-box span {
  display: block;
  color: #777777;
  font-size: 12px;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  font-weight: 500;
}

.pix-client-box strong {
  display: block;
  color: #004aad;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  word-break: break-word;
}

.pix-price-box {
  width: 100%;
  max-width: 196px;
  background: #004aad;
  border-radius: 18px;
  padding: 16px 18px 18px;
  text-align: center;
  margin-top: 26px;
}

.pix-price-box span {
  display: block;
  color: #ddeaff;
  font-size: 12px;
  margin-bottom: 10px;
  font-weight: 500;
}

.pix-price-box strong {
  display: block;
  color: #ffffff;
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
}

.pix-how-box {
  width: 100%;
  max-width: 360px;
  margin-top: 34px;
}

.pix-how-box h3 {
  margin: 0 0 18px;
  color: #004aad;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
}

.pix-step-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.pix-step-circle {
  width: 33px;
  height: 33px;
  min-width: 33px;
  border-radius: 999px;
  background: #004aad;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

.pix-step-row p {
  margin: 0;
  color: #14365d;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
}

.pix-expire-pill {
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid #e2b529;
  border-radius: 12px;
  background: rgba(255, 248, 224, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: #004aad;
}

.pix-expire-pill svg {
  width: 18px;
  height: 18px;
  stroke: #004aad;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pix-expire-pill span {
  font-size: 13px;
  color: #496173;
  font-weight: 500;
}

.pix-expire-pill strong {
  font-size: 15px;
  color: #004aad;
  font-weight: 800;
}

.pix-scan-text {
  margin: 0 0 14px;
  color: #66717f;
  font-size: 13px;
  text-align: center;
  font-weight: 500;
}

.pix-qr-frame {
  width: 192px;
  height: 192px;
  border: 2px solid #efbf2c;
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pix-qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pix-qr-placeholder {
  color: #8a96a6;
  font-size: 16px;
  text-align: center;
  font-weight: 700;
  padding: 12px;
}

.pix-copy-block {
  width: 100%;
  max-width: 415px;
  margin-top: 24px;
}

.pix-copy-block label {
  display: block;
  text-align: center;
  color: #004aad;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.pix-copy-row {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 10px;
  align-items: center;
}

.pix-copy-row input {
  width: 100%;
  height: 40px;
  border: 1px solid #d2d7de;
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  color: #333333;
  font-size: 12px;
  outline: none;
}

.pix-copy-row button {
  height: 40px;
  border: none;
  border-radius: 12px;
  background: #004aad;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  padding: 0 18px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.pix-copy-row button:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.pix-copy-row button svg {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pix-order-box {
  margin-top: 20px;
  text-align: center;
}

.pix-order-box p {
  margin: 6px 0;
  font-size: 12px;
  color: #66717f;
}

.pix-order-box strong {
  color: #004aad;
  font-weight: 800;
}

.pix-success-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1ca34c !important;
  font-weight: 700;
}

.pix-success-line svg {
  width: 14px;
  height: 14px;
  stroke: #1ca34c;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pix-hidden-meta {
  display: none;
}

body.page3-active {
  background: #f2f2f2;
  overflow-x: hidden;
}

body.page3-active .topbar,
body.page3-active .accessibility-bar,
body.page3-active .footer {
  display: none !important;
}

body.page3-active .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 980px) {
  .banner-block {
    grid-template-columns: 1fr;
  }

  .banner-right {
    min-height: 200px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .pix-fullscreen {
    grid-template-columns: 1fr;
    width: 100%;
    margin-left: 0;
    min-height: 100vh;
  }

  .pix-left-panel,
  .pix-right-panel {
    padding: 42px 22px;
  }

  .pix-main-title {
    font-size: 26px;
  }

  .pix-copy-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 22px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .search-card {
    padding: 18px;
  }

  .banner-title {
    font-size: 22px;
  }

  .alert-box h2 {
    font-size: 13px;
  }

  .package-overlay-block {
    top: 40.5%;
    left: 18%;
    width: 31%;
  }

  .package-line.name,
  .package-line.cep,
  .package-line.city,
  .package-line.cpf {
    font-size: 9px;
  }

  .package-line.cpf {
    margin-top: 9px;
  }
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .topbar-inner {
    padding: 8px 12px;
  }

  .hero-title {
    font-size: 20px;
  }

  .main-button {
    width: 100%;
  }

  .banner-title {
    font-size: 20px;
  }

  .package-overlay-block {
    top: 40.5%;
    left: 18%;
    width: 33%;
  }

  .package-line.name,
  .package-line.cep,
  .package-line.city,
  .package-line.cpf {
    font-size: 7px;
    line-height: 1.05;
  }

  .package-line + .package-line {
    margin-top: 1px;
  }

  .package-line.cpf {
    margin-top: 7px;
  }

  .pix-left-panel,
  .pix-right-panel {
    padding: 34px 16px;
  }

  .pix-main-title {
    font-size: 22px;
  }

  .pix-price-box strong {
    font-size: 26px;
  }

  .pix-qr-frame {
    width: 170px;
    height: 170px;
  }
}
