* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: #0f172a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 420px;
}

.card-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.hidden {
  display: none !important;
}

/* Spinner de carregamento */
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- ESTADO VÁLIDO (VERDE) --- */
.status-valid {
  border-top: 10px solid #16a34a;
}

.status-valid .icon-status {
  width: 70px;
  height: 70px;
  background-color: #dcfce7;
  color: #16a34a;
  font-size: 2.5rem;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.status-valid .status-badge {
  background-color: #16a34a;
  color: white;
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.user-photo-wrapper {
  width: 150px;
  height: 180px;
  margin: 0 auto 1.2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 3px solid #16a34a;
}

.user-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#user-name {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.document-text {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* --- ESTADO INVÁLIDO (VERMELHO CHAMATIVO) --- */
.status-invalid {
  background-color: #fef2f2;
  border-top: 10px solid #dc2626;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.status-invalid .icon-status {
  width: 80px;
  height: 80px;
  background-color: #fee2e2;
  color: #dc2626;
  font-size: 3rem;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.status-invalid .status-badge {
  background-color: #dc2626;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.warning-box {
  background-color: #dc2626;
  color: white;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.warning-box h2 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.warning-box p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.user-name-muted {
  color: #7f1d1d;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
}

/* --- ESTADO NÃO ENCONTRADO --- */
.status-error {
  border-top: 10px solid #f59e0b;
}

.status-error .icon-status {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.status-error .status-badge {
  background-color: #f59e0b;
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 1rem;
  display: inline-block;
}

.error-msg {
  color: #475569;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.footer-info {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  color: #94a3b8;
  font-size: 0.75rem;
}