:root {
  --azul: #2b2b9e;
  --roxo: #5b5bd6;
  --roxo-hover: #4a4ac2;
  --texto: #1f2233;
  --texto-suave: #6b7080;
  --borda: #d5d7e0;
  --erro: #d23b3b;
  --ok: #1f9d55;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--azul);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--texto);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.container { width: 100%; max-width: 420px; margin: auto; }
.logo {
  display: block;
  width: 190px;
  max-width: 62%;
  height: auto;
  margin: 0 auto 26px;
  /* logo original e azul-escuro; forca branco para o fundo azul */
  filter: brightness(0) invert(1);
}
.card {
  background: #fff;
  border-radius: 10px;
  padding: 28px 26px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
}
h1 { font-size: 20px; margin: 4px 0 6px; }
.sub { font-size: 13.5px; color: var(--texto-suave); margin: 0 0 22px; line-height: 1.5; }

.field { position: relative; margin-bottom: 6px; }
.field label {
  position: absolute; top: -8px; left: 12px;
  background: #fff; padding: 0 6px;
  font-size: 11.5px; color: var(--texto-suave);
}
.field input {
  width: 100%; padding: 14px 12px;
  font-size: 15px; border: 1px solid var(--borda);
  border-radius: 6px; outline: none; letter-spacing: .5px;
  font-family: inherit;
}
.field input:focus { border-color: var(--roxo); }
.field.invalid input { border-color: var(--erro); }
.msg-erro { color: var(--erro); font-size: 12.5px; min-height: 16px; margin: 6px 2px 0; }

button.principal {
  width: 100%; margin-top: 14px; padding: 14px;
  border: none; border-radius: 6px;
  background: var(--roxo); color: #fff;
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: background .15s; font-family: inherit;
}
button.principal:hover { background: var(--roxo-hover); }
button.principal:disabled { background: #9a9ad0; cursor: not-allowed; }

.linha-botoes { display: flex; gap: 12px; margin-top: 20px; }
.linha-botoes button { flex: 1; }
button.secundario {
  padding: 13px; border: 1px solid var(--borda);
  border-radius: 6px; background: #fff; color: var(--texto);
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
button.secundario:hover { background: #f4f4fb; }

.badge {
  display: inline-block; background: #fdecec; color: var(--erro);
  font-size: 12px; font-weight: 700; padding: 4px 10px;
  border-radius: 20px; margin-bottom: 12px;
}
.spinner {
  width: 44px; height: 44px;
  border: 4px solid #e6e6f5; border-top-color: var(--roxo);
  border-radius: 50%; animation: girar 1s linear infinite;
  margin: 18px auto 14px;
}
.spinner-mini {
  width: 20px; height: 20px;
  border: 3px solid #cdd4f0; border-top-color: var(--roxo);
  border-radius: 50%; animation: girar 1s linear infinite; flex-shrink: 0;
}
@keyframes girar { to { transform: rotate(360deg); } }

.barra { height: 8px; background: #ececf6; border-radius: 6px; overflow: hidden; margin: 16px 0 8px; }
.barra > i { display: block; height: 100%; width: 0; background: var(--roxo); border-radius: 6px; transition: width .3s linear; }
.contador { text-align: center; font-size: 12.5px; color: var(--texto-suave); }

.valor-destaque {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #eef7ef; border: 1px solid #cbe6cd; border-radius: 8px;
  padding: 14px; margin: 4px 0 16px;
}
.valor-destaque span { font-size: 12px; color: var(--texto-suave); }
.valor-destaque strong { font-size: 24px; color: #1f7a34; }

.qr { width: 200px; height: 200px; margin: 8px auto 14px; display: block; border: 1px solid var(--borda); border-radius: 8px; background: #fff; }
.qr svg { width: 100%; height: 100%; display: block; }

.codigo {
  font-family: "Courier New", monospace; font-size: 12px;
  word-break: break-all; background: #f6f7fb;
  border: 1px solid var(--borda); border-radius: 6px;
  padding: 12px; line-height: 1.5;
}
.aviso-copiado { color: var(--ok); font-size: 12.5px; text-align: center; min-height: 16px; margin-top: 8px; }

.opcao-pgto {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 16px; border: 1px solid var(--borda); border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 15px; font-weight: 600;
  margin-bottom: 12px; text-align: left; font-family: inherit;
}
.opcao-pgto:hover { border-color: var(--roxo); background: #f7f7fd; }
.opcao-pgto:disabled, .opcao-pgto.desativado {
  opacity: .5; cursor: not-allowed; pointer-events: none;
}
.boleto-loading {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--texto-suave);
  padding: 10px 2px 2px;
}
.opcao-pgto .ic { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; }
.opcao-pgto .ic img { max-width: 100%; max-height: 100%; object-fit: contain; }

.nota {
  display: flex; gap: 10px;
  background: #fff7e6; border: 1px solid #f0d089; color: #7a5b12;
  border-radius: 8px; padding: 12px 14px; font-size: 12.5px;
  line-height: 1.55; margin-top: 16px;
}
.nota b { display: block; margin-bottom: 2px; }
.nota.erro { background: #fdecec; border-color: #f0a9a9; color: #a12727; }

.instrucoes { margin: 16px 0 0; padding-left: 20px; font-size: 12.5px; line-height: 1.65; }
.instrucoes li { margin-bottom: 4px; }

.webhook {
  display: flex; align-items: center; gap: 12px;
  background: #eef1fb; border: 1px solid #cdd4f0; color: #2f3a7a;
  border-radius: 8px; padding: 12px 14px; margin-top: 16px; font-size: 12.5px;
}
.webhook b { display: block; margin-bottom: 1px; }

.sucesso-ic {
  width: 56px; height: 56px; border-radius: 50%;
  background: #e7f7ec; color: var(--ok);
  display: grid; place-items: center; font-size: 30px;
  margin: 6px auto 14px;
}

.voltar {
  display: block; text-align: center; margin-top: 18px;
  font-size: 13px; color: var(--roxo); background: none;
  border: none; cursor: pointer; width: 100%; font-family: inherit;
}
.centro { text-align: center; }
[hidden] { display: none !important; }
