* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #0a0a0b;
  color: #e7e7e5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wizard-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.version-footer {
  margin-top: 18px;
  font-size: 12px;
  color: #4a4a48;
  text-align: center;
}

.state[hidden] {
  display: none;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid #2a2b2e;
  border-top-color: #3d6bff;
  animation: spin 0.7s linear infinite;
}

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

.card {
  background: #111214;
  border: 0.5px solid #2a2b2e;
  border-radius: 18px;
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
  animation: cardIn 0.35s ease;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dots {
  display: flex;
  gap: 6px;
  margin-bottom: 1.75rem;
}

.dots div {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #2a2b2e;
  transition: background 0.3s ease;
}

.dots div.filled {
  background: #3d6bff;
}

.step-label {
  font-size: 13px;
  color: #9a9a96;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 1.5rem;
  color: #f5f5f3;
  letter-spacing: -0.01em;
}

label {
  font-size: 12.5px;
  font-weight: 500;
  color: #9a9a96;
  display: block;
  margin-bottom: 6px;
}

.field-group {
  margin-bottom: 14px;
}

.field-row {
  display: flex;
  gap: 12px;
}
.field-row .field-group {
  flex: 1;
}

.panel-transition {
  position: relative;
  overflow: hidden;
}

.panel-transition.transitioning #panel {
  opacity: 0;
  transform: translateX(6px);
}

#panel {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

input[type="text"],
input[type="email"],
input[type="number"] {
  width: 100%;
  height: 44px;
  border-radius: 9px;
  border: 1px solid #35363a;
  background: #17181a;
  color: #e7e7e5;
  padding: 0 13px;
  font-size: 14.5px;
  margin-bottom: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

input::placeholder {
  color: #5a5a57;
}

input:hover {
  border-color: #45464a;
}

input:focus {
  outline: none;
  border-color: #3d6bff;
  background: #1a1c20;
}

input.field-invalid {
  border-color: #e24b4a;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.field-label-row label {
  margin-bottom: 0;
}

.card-brands {
  display: flex;
  gap: 6px;
}

.card-field-container {
  height: 44px;
  background: #17181a;
  padding: 0 13px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 0.5px solid #2a2b2e;
  font-size: 13.5px;
}
.summary-row:last-child {
  border-bottom: none;
}
.summary-row .label {
  color: #9a9a96;
  margin: 0;
  font-weight: 400;
}
.summary-row .value {
  color: #f0f0ee;
  font-weight: 500;
}

.summary-box {
  background: #17181a;
  border: 1px solid #2a2b2e;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #173a26;
  color: #5dcaa5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 24px;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.centered {
  text-align: center;
}

.muted {
  color: #9a9a96;
  font-size: 13px;
}

.secure-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
}

.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.75rem;
  gap: 10px;
}

button {
  flex: 1;
  height: 44px;
  border-radius: 9px;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

#backBtn {
  border: 1px solid #35363a;
  background: transparent;
  color: #c9c9c6;
}
#backBtn:hover {
  border-color: #45464a;
  background: #17181a;
}

#nextBtn {
  border: none;
  background: #3d6bff;
  color: #fff;
  font-weight: 600;
}
#nextBtn:hover:not(:disabled) {
  background: #4d78ff;
}

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

.error-text {
  color: #f0827f;
  font-size: 13px;
  margin: 0 0 14px;
  animation: shakeIn 0.3s ease;
}

@keyframes shakeIn {
  0% { opacity: 0; transform: translateX(-4px); }
  100% { opacity: 1; transform: translateX(0); }
}

.receipt-actions {
  display: flex;
  gap: 10px;
}

.receipt-actions button {
  background: transparent;
  border: 1px solid #35363a;
  color: #c9c9c6;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.receipt-actions button:hover {
  border-color: #45464a;
  background: #17181a;
}

@media print {
  .actions, #backBtn, .version-footer { display: none; }
  body { background: #fff; color: #000; }
  .card { border: none; box-shadow: none; }
}
