@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f4f6f8;
  color: #333;
}

/* Cabeçalho horizontal e compacto */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  background: #fff;
  padding: 10px 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  height: 70px;
}

.logo-area {
  display: flex;
  align-items: center;
  height: 70px; /* garante altura mínima do cabeçalho */
}

.logo {
  max-height: 100px;
  transform: scale(1.8); /* aumenta visualmente o logo */
  transform-origin: left center; /* mantém alinhado à esquerda */
}

.passos-header {
  justify-self: center;
  display: flex;
  gap: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  flex-wrap: wrap;
}


/* Layout principal sem rolagem */
main.grid-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 20px;
  overflow: hidden;
}

/* Área esquerda */
.area-esquerda section {
  margin-bottom: 30px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
  color: #333;
  text-align: center;
}

/* Botões de tipo */
.botoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.botoes button {
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 180px;
  height: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.botoes button:hover {
  border-color: #0077ff;
  box-shadow: 0 0 6px rgba(0,119,255,0.2);
}
.botoes button.ativo {
  border-color: #0077ff;
  box-shadow: 0 0 8px rgba(0,119,255,0.3);
}
.botoes img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Formulário */
#qr-form {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#qr-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: bold;
}
#qr-form input,
#qr-form textarea {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 6px;
}
input.erro, textarea.erro {
  border-color: #ff4d4f;
  background-color: #fff0f0;
}
.btn-principal {
  margin-top: 20px;
  width: 100%;
  padding: 10px;
  border: none;
  background: #0077ff;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}
.btn-principal:hover {
  background: #005fcc;
}

/* Área direita com espaçamento fixo */
.area-direita {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: calc(100vh - 110px); /* 70px header + 40px footer */
  padding: 20px;
  box-sizing: border-box;
}
#qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}
.fake-img {
  max-width: 250px;
  opacity: 0.6;
}
#qrcode {
  margin-top: 20px;
}
.hidden {
  display: none;
}
.btn-secundario {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 12px 24px;
  font-size: 16px;
  background: linear-gradient(135deg, #28a745, #218838);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-secundario:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Rodapé fixo */
footer {
  height: 40px;
  background: #222;
  color: #ccc;
  text-align: center;
  line-height: 40px;
  font-size: 13px;
}

/* Responsivo para smartphones */

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    height: auto;
    padding: 15px;
    gap: 10px;
  }

  .logo {
    transform: scale(1.2); /* reduz o aumento visual */
    transform-origin: center; /* centraliza o crescimento */
    max-height: 80px; /* limite visual para telas pequenas */
  }

  .passos-header {
    justify-content: center;
    text-align: center;
    gap: 10px;
    font-size: 13px;
    flex-wrap: wrap;
  }

  main.grid-layout {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 20px;
    overflow-y: auto;
  }

  .area-direita {
    height: auto;
    padding-bottom: 10px;
  }

  .btn-secundario {
    width: 100%;
    font-size: 15px;
  }

  .botoes {
    flex-direction: column;
    align-items: center;
  }

  .botoes button {
    width: 100%;
    justify-content: center;
  }
}
