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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #1a1a2e;
}

.terminal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  width: 100%;
  max-width: 480px;
  padding: 36px 32px 32px;
  position: relative;
}

header {
  text-align: center;
  margin-bottom: 32px;
}

header h1 {
  font-size: 1.7rem;
  font-weight: 700;
  color: #0a3d62;
  letter-spacing: 0.5px;
}

.subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Steps */
.step { display: none; }
.step.active { display: block; }

/* Step 1 */
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

input[type="text"] {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  border-color: #0a3d62;
}

button {
  padding: 11px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }

#btnVerify {
  background: #0a3d62;
  color: #fff;
  white-space: nowrap;
}

#btnVerify:hover:not(:disabled) { background: #0d4f7c; }

/* Detail card */
.detail-card {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  font-size: 0.92rem;
}

.detail-row .label {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0;
}

.detail-row .value {
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}

.detail-row .value.amount { font-size: 1.1rem; color: #0a3d62; font-weight: 700; }

.detail-row.total {
  margin-top: 4px;
  padding-top: 12px;
}

.detail-row.total .label { color: #1a1a2e; font-size: 0.9rem; }
.detail-row.total .total-amount { font-size: 1.4rem; font-weight: 800; color: #0a3d62; }

.mono { font-family: 'Consolas', 'Courier New', monospace; }

hr { border: none; border-top: 1px solid #e5e7eb; margin: 8px 0; }

/* Action row */
.action-row {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

button.secondary {
  background: #f3f4f6;
  color: #374151;
  flex: 0 0 auto;
}

button.secondary:hover:not(:disabled) { background: #e5e7eb; }

button.primary {
  background: #16a34a;
  color: #fff;
  flex: 1;
}

button.primary:hover:not(:disabled) { background: #15803d; }

/* Success */
.success-card {
  text-align: center;
  padding: 20px 0;
}

.check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 2rem;
  line-height: 64px;
  margin: 0 auto 16px;
}

.success-card h2 { font-size: 1.4rem; color: #15803d; margin-bottom: 8px; }
.success-card p { color: #6b7280; font-size: 0.95rem; margin-bottom: 24px; }

/* Error */
.error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 10px;
  padding: 8px 12px;
  background: #fef2f2;
  border-radius: 6px;
  border: 1px solid #fecaca;
}

.hidden { display: none !important; }

/* Spinner */
.spinner {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner::after {
  content: '';
  width: 36px;
  height: 36px;
  border: 4px solid #d1d5db;
  border-top-color: #0a3d62;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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