:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #15243a;
  background: #eef4fb;
  line-height: 1.5;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  /* Sem isso, "puxar a tela pra baixo" no celular (gesto comum, fácil de
     fazer sem querer) recarrega a página inteira — na tela de pagamento
     isso gera um Pix NOVO, deixando o código antigo (que o cliente já
     pode ter copiado/pago) órfão da tela que devia estar acompanhando ele. */
  overscroll-behavior-y: contain;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overscroll-behavior-y: contain;
  background:
    radial-gradient(circle at 15% 10%, rgba(31, 145, 255, .18), transparent 28rem),
    radial-gradient(circle at 88% 90%, rgba(18, 202, 159, .14), transparent 28rem),
    linear-gradient(145deg, #f7fbff, #e9f1fb);
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.portal-card {
  width: min(100%, 640px);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(35, 81, 126, .12);
  border-radius: 28px;
  padding: clamp(16px, 4vw, 32px);
  box-shadow: 0 28px 90px rgba(21, 52, 89, .16);
  backdrop-filter: blur(16px);
}

.compact-card {
  width: min(100%, 560px);
}

.portal-header {
  text-align: center;
  margin-bottom: 18px;
}

.portal-header.small {
  margin-bottom: 16px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #087ef0, #12caa0);
  box-shadow: 0 16px 34px rgba(8, 126, 240, .26);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.eyebrow {
  margin: 0 0 7px;
  color: #087ef0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  color: #0c2039;
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.portal-header p {
  max-width: 440px;
  margin: 0 auto;
  color: #6e7f93;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading h2 {
  margin: 0;
  color: #18324e;
  font-size: 21px;
}

.step {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #087ef0;
  font-weight: 900;
}

.text-button,
.back-link {
  border: 0;
  color: #087ef0;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.back-link {
  display: inline-block;
  margin-bottom: 22px;
  font-weight: 700;
}

.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.plan-card {
  position: relative;
  width: 100%;
  padding: 18px 20px;
  border: 2px solid #e1eaf4;
  border-radius: 16px;
  color: inherit;
  background: #fff;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  display: flex;
  align-items: center;
  min-height: 82px;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: #9acbfb;
  box-shadow: 0 12px 30px rgba(31, 102, 174, .10);
}

.plan-card.selected {
  border-color: #087ef0;
  background: #cfe6ff;
  box-shadow: 0 0 0 5px rgba(8, 126, 240, .22);
}

.plan-card.featured:not(.selected) {
  border-color: #b7e9de;
}

.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 12px;
  min-width: 0;
}

.plan-name {
  color: #17314d;
  font-size: clamp(20px, 6vw, 25px);
  font-weight: 900;
  text-align: left;
}

.selection-check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-left: 12px;
  display: grid;
  place-items: center;
  border: 2px solid #d5e0eb;
  border-radius: 50%;
  color: transparent;
  background: #fff;
  font-size: 15px;
}

.plan-card.selected .selection-check {
  color: #fff;
  border-color: #087ef0;
  background: #087ef0;
}

.plan-price {
  color: #087ef0;
  font-size: clamp(28px, 9vw, 36px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.voucher-area {
  margin-top: 14px;
  text-align: center;
}

/* Botão de largura cheia, do mesmo tamanho do "Continuar para o Pix" —
   comprar na recepção com voucher é um caminho de venda tão válido quanto
   o Pix, e o link pequeno de antes passava despercebido. */
.link-button {
  width: 100%;
  min-height: 64px;
  padding: 14px 20px;
  border: 2px solid #087ef0;
  border-radius: 14px;
  color: #087ef0;
  background: #fff;
  font-size: clamp(18px, 5vw, 21px);
  font-weight: 900;
  cursor: pointer;
}

#voucher-form {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #dbe6f1;
  border-radius: 14px;
  background: #f7fafd;
}

#voucher-form[hidden] {
  display: none;
}

#voucher-form label {
  display: block;
  margin-bottom: 8px;
  color: #2c4256;
  font-size: clamp(16px, 4.5vw, 19px);
  font-weight: 800;
}

#voucher-code {
  width: 100%;
  margin-bottom: 10px;
  padding: 14px;
  border: 2px solid #d4e0eb;
  border-radius: 12px;
  color: #0c2039;
  background: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

#voucher-code:focus {
  border-color: #087ef0;
  outline: none;
}

.voucher-message {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.voucher-message[hidden] {
  display: none;
}

.voucher-message.error {
  color: #a33842;
}

.voucher-message.success {
  color: #0ca47c;
}

.credit-line {
  margin-top: 6px;
  color: #a2b1c2;
  font-size: 11px;
  text-align: center;
}

.state-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 105px;
  padding: 20px;
  border: 1px dashed #c9d8e7;
  border-radius: 18px;
  color: #6f8297;
  text-align: center;
}

.state-card[hidden],
.plans-grid[hidden] {
  display: none !important;
}

.state-error {
  flex-direction: column;
  color: #a33842;
  background: #fff7f7;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #dce8f3;
  border-top-color: #087ef0;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.continue-area {
  margin-top: 10px;
}

.primary-button,
.secondary-button {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
}

/* Um tamanho só para TODOS os botões de ação do portal (continuar, pagar,
   tentar de novo, gerar novo QR, liberar voucher, começar a navegar).
   Antes cada tela tinha o seu, e o cliente via botões de alturas
   diferentes ao avançar pelo fluxo. Estes números também valem para
   .link-button logo acima, pra "Tenho um voucher" empilhar certinho
   embaixo de "Continuar para o Pix". */
.primary-button {
  width: 100%;
  min-height: 64px;
  padding: 14px 20px;
  font-size: clamp(18px, 5vw, 21px);
  color: #fff;
  background: linear-gradient(135deg, #087ef0, #12b98f);
  box-shadow: 0 13px 28px rgba(8, 126, 240, .20);
}

.primary-button:disabled {
  color: #8c9aac;
  background: #dce5ee;
  box-shadow: none;
  cursor: not-allowed;
}

.pix-time-hint {
  margin: 8px 0 0;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid #ffe1a8;
  background: #fff8ea;
  color: #93650b;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.secondary-button {
  padding: 0 18px;
  color: #087ef0;
  background: #eaf4ff;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  color: #8493a3;
  font-size: 12px;
}

.order-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
  border: 1px solid #e0e9f2;
  border-radius: 17px;
  overflow: hidden;
}

.order-summary > div {
  display: grid;
  gap: 3px;
  padding: 14px;
  text-align: center;
}

.order-summary > div + div {
  border-left: 1px solid #e0e9f2;
}

.order-summary span,
.pix-placeholder label {
  color: #7a8b9d;
  font-size: 12px;
}

.order-summary strong {
  color: #18324e;
}

#payment-value {
  color: #087ef0;
  font-size: 22px;
}

.pix-placeholder {
  margin-bottom: 18px;
}

.qr-placeholder {
  width: 210px;
  height: 210px;
  display: grid;
  place-content: center;
  gap: 4px;
  margin: 0 auto 20px;
  border: 12px solid #fff;
  outline: 2px dashed #b9c9d8;
  color: #17314d;
  background:
    linear-gradient(90deg, #132b45 10px, transparent 10px) 0 0 / 28px 28px,
    linear-gradient(#132b45 10px, transparent 10px) 0 0 / 28px 28px,
    #f4f7fa;
  text-align: center;
  box-shadow: 0 13px 32px rgba(20, 53, 88, .12);
}

.qr-placeholder span,
.qr-placeholder small {
  padding: 3px 7px;
  background: rgba(255, 255, 255, .92);
  font-weight: 900;
}

.copy-row {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}

.copy-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid #d4e0eb;
  border-radius: 13px;
  padding: 13px;
  color: #617487;
  background: #f6f9fc;
}

.development-notice {
  margin: 14px 0 0;
  color: #8a98a7;
  font-size: 12px;
  text-align: center;
}

.center-content {
  text-align: center;
}

.waiting-animation {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.waiting-animation span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #087ef0;
  animation: pulse 1.1s infinite ease-in-out;
}

.waiting-animation span:nth-child(2) {
  animation-delay: .16s;
}

.waiting-animation span:nth-child(3) {
  animation-delay: .32s;
}

@keyframes pulse {
  0%, 70%, 100% { transform: scale(.65); opacity: .4; }
  35% { transform: scale(1); opacity: 1; }
}

/* Trava geral para o atributo "hidden".
   Toda regra de autor com "display" vence o display:none que o navegador
   aplica ao atributo hidden — então bastava uma classe com display:grid
   para o elemento continuar aparecendo mesmo escondido no HTML/JS. Foi o
   que causou o "00:00:00" gigante na tela de acesso liberado e o código
   de atendimento mostrando "----" sem MAC. Em vez de tratar caso a caso
   (havia 4 exceções espalhadas por este arquivo), a regra abaixo vale
   para qualquer elemento e usa !important porque precisa vencer qualquer
   display declarado depois dela. */
[hidden] {
  display: none !important;
}

.waiting-plan,
.access-card {
  display: grid;
  gap: 5px;
  margin: 26px 0;
  padding: 20px;
  border-radius: 18px;
  background: #f2f7fc;
}

.waiting-plan span,
.access-card span,
.access-card small {
  color: #718397;
}

.waiting-plan strong {
  color: #087ef0;
  font-size: 25px;
}

.status-message {
  color: #63778c;
}

.success-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #11b98c, #18d6a3);
  box-shadow: 0 16px 36px rgba(17, 185, 140, .28);
  font-size: 46px;
  font-weight: 900;
}

.success-text {
  color: #0ca47c !important;
}

.access-card strong {
  color: #0c2039;
  font-size: clamp(34px, 10vw, 52px);
  letter-spacing: .05em;
}

@media (max-width: 560px) {
  .portal-shell {
    padding: 0;
  }

  .portal-card {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 25px 18px;
  }

  .order-summary {
    grid-template-columns: 1fr;
  }

  .order-summary > div + div {
    border-top: 1px solid #e0e9f2;
    border-left: 0;
  }

  .copy-row {
    flex-direction: column;
  }

  .secondary-button {
    width: 100%;
  }
}
