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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f0e8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header {
  background: #4a2c0a;
  color: #f5f0e8;
  width: 100%;
  padding: 20px;
  text-align: center;
}

.header h1 { font-size: 1.8rem; letter-spacing: 2px; }
.header p { font-size: 0.85rem; opacity: 0.8; margin-top: 4px; }

.card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin: 20px 16px;
  max-width: 400px;
  width: calc(100% - 32px);
  box-shadow: 0 2px 20px rgba(74,44,10,0.1);
}

.card h2 {
  color: #4a2c0a;
  font-size: 1.2rem;
  margin-bottom: 16px;
  text-align: center;
}

input[type="text"], input[type="tel"], input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8dcc8;
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
}

input:focus { border-color: #4a2c0a; }

button {
  width: 100%;
  padding: 14px;
  background: #4a2c0a;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover { background: #6b3f10; }
button:disabled { background: #ccc; cursor: not-allowed; }

.btn-secondary {
  background: white;
  color: #4a2c0a;
  border: 2px solid #4a2c0a;
  margin-top: 8px;
}

.btn-secondary:hover { background: #f5f0e8; }

.selos-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.selo {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: #f5f0e8;
  border: 2px solid #e8dcc8;
  transition: all 0.3s;
}

.selo.ativo {
  background: #4a2c0a;
  border-color: #4a2c0a;
  transform: scale(1.05);
}

.nome-cliente {
  font-size: 1.4rem;
  font-weight: 700;
  color: #4a2c0a;
  text-align: center;
  margin-bottom: 4px;
}

.selos-info {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.qr-container {
  text-align: center;
  margin: 16px 0;
}

.qr-container img {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  border: 2px solid #e8dcc8;
}

.qr-label {
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 6px;
}

.recompensa-banner {
  background: linear-gradient(135deg, #4a2c0a, #8b5e3c);
  color: white;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin: 12px 0;
  animation: pulse 1s ease-in-out 3;
}

.recompensa-banner h3 { font-size: 1.1rem; margin-bottom: 4px; }
.recompensa-banner p { font-size: 0.9rem; opacity: 0.9; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.mensagem {
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  margin: 8px 0;
  font-size: 0.9rem;
}

.mensagem.erro { background: #fee; color: #c00; }
.mensagem.sucesso { background: #efe; color: #060; }

.cliente-item {
  border: 1px solid #e8dcc8;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}

.cliente-item .nome { font-weight: 600; color: #4a2c0a; }
.cliente-item .info { font-size: 0.85rem; color: #888; margin-top: 2px; }

.scanner-area {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

#video { width: 100%; border-radius: 12px; }

.hidden { display: none; }
