:root {
  --primary: #1f8a4d;
  --danger: #d14b4b;
  --bg: #f7f9fb;
  --text: #1f2a3d;
  --muted: #5f6b7a;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 48px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.header h1 { margin: 0 0 6px; font-size: 24px; }
.subtitle { margin: 0 0 16px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
label { font-weight: 600; }
input, select, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d8e0eb;
  font-size: 15px;
  transition: border 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31,138,77,0.15);
}

.hint { color: var(--muted); font-size: 12px; }
.error { color: var(--danger); font-size: 12px; min-height: 14px; }

.credits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
#creditCounter { font-weight: 700; letter-spacing: 1px; }

button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.08s ease, box-shadow 0.2s ease, opacity 0.2s;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.6; cursor: not-allowed; }
.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(31,138,77,0.25);
}
.ghost {
  background: #eef3f8;
  color: var(--text);
}

.result {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #e3e9f1;
  border-radius: 14px;
  background: #fafbfd;
}
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.badge {
  font-size: 12px;
  padding: 6px 10px;
  background: rgba(31,138,77,0.12);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 700;
}
.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.result p { margin: 0; line-height: 1.5; }

.paywall {
  position: fixed;
  inset: 0;
  background: rgba(16, 23, 34, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 20;
}
.paywall-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.paywall-card h2 { margin: 0 0 6px; }
.paywall-card p { margin: 0 0 12px; color: var(--muted); }
.qr { width: 100%; max-width: 260px; display: block; margin: 12px auto; }
.pix-block { margin-top: 10px; }
.pix-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f2f5f9;
  padding: 10px;
  border-radius: 10px;
}
.pix-code {
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  word-break: break-all;
  flex: 1;
}
.wide { width: 100%; margin-top: 12px; }

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}
.hidden { display: none; }

@media (min-width: 768px) {
  .page { align-items: center; }
}
