* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Loading inicial */
.loading-page {
  text-align: center;
  padding: 60px 20px;
}

.loading-page .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #eee;
  border-top-color: #1a1a2e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

/* Header */
header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  gap: 15px;
  background: #1a1a2e;
  border-radius: 12px;
  margin-bottom: 10px;
}

.logo {
  height: 40px;
}

.logo-text {
  font-weight: 600;
  font-size: 14px;
  color: white;
}

h1 {
  font-size: 24px;
  margin: 30px 0 20px;
}

/* Layout */
.content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
}

@media (max-width: 768px) {
  .content {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }

  h1 {
    font-size: 20px;
    margin: 20px 0 15px;
  }
}

@media (max-width: 500px) {
  .container {
    padding: 15px;
  }

  header {
    padding: 12px 15px;
    gap: 10px;
    border-radius: 8px;
  }

  .logo {
    height: 32px;
  }

  .logo-text {
    font-size: 12px;
  }

  .card {
    padding: 18px;
    border-radius: 10px;
  }

  .section-title {
    font-size: 16px;
  }

  .resumo-title {
    font-size: 18px;
  }

  .resumo-total {
    font-size: 18px;
  }

  .pagamento-btn {
    padding: 14px 10px;
  }

  .pagamento-btn .icone img {
    height: 28px !important;
  }

  .pagamento-btn .texto {
    font-size: 14px;
  }
}

.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Campos */
.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.field {
  margin-bottom: 18px;
}

.field-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  display: block;
}

.field-input {
  width: 100%;
  background: #f0f4f8;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 15px;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.field-input:focus {
  outline: none;
  border-color: #1a1a2e;
  background: #fff;
}

.field-input::placeholder {
  color: #999;
}

.field-input.erro {
  border-color: #e74c3c;
  background: #fdf2f2;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 500px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.erro-msg {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

/* Resumo */
.resumo-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
}

.item {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
}

.item-nome {
  font-weight: 600;
  font-size: 17px;
}

.item-campus {
  font-size: 13px;
  color: #666;
  margin: 4px 0;
}

.item-local {
  font-size: 13px;
  color: #888;
  margin: 4px 0;
}

.item-detalhes {
  font-size: 13px;
  color: #555;
  margin: 10px 0;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.item-detalhe {
  margin: 5px 0;
}

.item-preco {
  font-weight: 600;
  color: #1a1a2e;
  margin-top: 10px;
  font-size: 16px;
}

.item-parcelas {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.resumo-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.resumo-total {
  font-size: 20px;
  font-weight: 700;
  border-top: 1px solid #eee;
  margin-top: 10px;
  padding-top: 15px;
}

/* Forma de pagamento */
.pagamento-opcoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.pagamento-btn {
  padding: 16px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-size: 15px;
}

.pagamento-btn:hover {
  border-color: #1a1a2e;
}

.pagamento-btn.ativo {
  border-color: #1a1a2e;
  background: #f8f9ff;
}

.pagamento-btn .icone {
  font-size: 24px;
  margin-bottom: 5px;
}

.pagamento-btn .texto {
  font-weight: 600;
}

/* PIX */
.pix-container {
  text-align: center;
  padding: 20px 0;
  display: none;
}

.pix-container.ativo {
  display: block;
}

.qr-code {
  max-width: 200px;
  margin: 0 auto 15px;
  border-radius: 8px;
}

.pix-codigo {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  word-break: break-all;
  margin: 15px 0;
  max-height: 80px;
  overflow-y: auto;
}

.btn-copiar {
  background: #1a1a2e;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.btn-copiar:hover {
  background: #2d2d4a;
}

.btn-copiar.copiado {
  background: #27ae60;
}

.pix-aviso {
  font-size: 13px;
  color: #666;
  margin-top: 15px;
}

.pix-loading {
  padding: 40px;
}

.pix-loading .spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #eee;
  border-top-color: #1a1a2e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

/* Cartão */
.cartao-container {
  text-align: center;
  padding: 30px 0;
  display: none;
}

.cartao-container.ativo {
  display: block;
}

.cartao-loading {
  padding: 40px;
}

.cartao-loading .spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #eee;
  border-top-color: #1a1a2e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

.seguranca-info {
  font-size: 13px;
  color: #666;
  text-align: center;
  margin-top: 15px;
}

.cartao-redirect-info {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin-top: 8px;
}

/* Erro geral */
.erro-geral {
  background: #fdf2f2;
  border: 1px solid #e74c3c;
  color: #c0392b;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 14px;
  display: none;
}

.erro-geral.ativo {
  display: block;
}

/* Ocultar */
.hidden {
  display: none !important;
}

/* Cupom */
.cupom-container {
  margin: 15px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.cupom-titulo {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.cupom-input-group {
  display: flex;
  gap: 10px;
}

.cupom-input {
  flex: 1;
  padding: 12px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  text-transform: uppercase;
  transition: border-color 0.2s;
}

.cupom-input:focus {
  outline: none;
  border-color: #1a1a2e;
}

.cupom-input.erro {
  border-color: #e74c3c;
}

.cupom-input.sucesso {
  border-color: #27ae60;
  background: #f0fff4;
}

.cupom-btn {
  padding: 12px 20px;
  background: #1a1a2e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  min-width: 100px;
  text-align: center;
}

.cupom-btn:hover {
  background: #2d2d4a;
}

.cupom-btn:disabled {
  background: #999;
  cursor: not-allowed;
}

.cupom-msg {
  font-size: 12px;
  margin-top: 8px;
}

.cupom-msg.erro {
  color: #e74c3c;
}

.cupom-msg.sucesso {
  color: #27ae60;
}

.cupom-aplicado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f0fff4;
  border: 2px solid #27ae60;
  border-radius: 8px;
}

.cupom-aplicado-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cupom-aplicado-check {
  color: #27ae60;
  font-weight: bold;
}

.cupom-aplicado-codigo {
  font-weight: 600;
  color: #27ae60;
  text-transform: uppercase;
}

.cupom-aplicado-desconto {
  font-size: 12px;
  color: #666;
}

.cupom-remover {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
}

.cupom-remover:hover {
  color: #c0392b;
}

/* Checkbox mesma pessoa */
.checkbox-container {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #e9ecef;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #1a1a2e;
}

.checkbox-text {
  color: #333;
  font-weight: 500;
}

#contratanteSection.disabled {
  opacity: 0.5;
  pointer-events: none;
}

#contratanteSection.disabled .field-input {
  background: #e9ecef;
}

/* Substitui styles inline (CSP estrita - sem 'unsafe-inline' em style-src-attr) */
.mt-section { margin-top: 25px; }
.mt-section-half { margin-top: 25px; margin-bottom: 10px; }
.desconto-line-default { display: none; color: #27ae60; }
.pgto-icon-img { height: 32px; }
.pix-instrucao-bold { font-weight: 600; margin-bottom: 10px; }
.preco-original-tachado { text-decoration: line-through; color: #999; font-size: 14px; }
.preco-com-desconto { color: #27ae60; margin-left: 8px; }
.cartao-erro-msg { color: #e74c3c; }
.cartao-btn-retry { margin-top: 15px; padding: 10px 20px; background: #1a1a2e; color: white; border: none; border-radius: 5px; cursor: pointer; }
