/* Base */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1.75rem;
}

/* Credential issuance form */
#issuance-form {
  display: grid;
  gap: 0.45rem;
  text-align: left;
}

#issuance-form label {
  color: #374151;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

#issuance-form input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  color: #111827;
  font: inherit;
}

#issuance-form input:focus {
  border-color: #4f46e5;
  outline: 3px solid rgba(79, 70, 229, 0.2);
}

/* QR code */
#qr-img {
  width: 220px;
  height: 220px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn:focus-visible { outline: 3px solid #6366f1; outline-offset: 2px; }

.btn-primary {
  background: #0f172a;
  color: #fff;
  width: 100%;
  margin-top: 0.5rem;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
  width: 100%;
  margin-top: 0.75rem;
}

/* Status badge */
.status {
  font-size: 0.85rem;
  margin-top: 1.25rem;
  color: #6b7280;
}

.status.waiting::before { content: "⏳ "; }
.status.success::before { content: "✅ "; }
.status.error::before   { content: "❌ "; }

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 1.5rem auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Utility */
.hidden { display: none; }
