:root {
  color-scheme: light;
  --ink: #182033;
  --muted: #677087;
  --paper: #fffdf8;
  --line: #e5dfd1;
  --gold: #c99a2e;
  --gold-dark: #9d721b;
  --blue: #203d72;
  --blue-soft: #e9f0fb;
  --rose: #8f3e4a;
  --green: #2f765e;
  --shadow: 0 24px 70px rgba(24, 32, 51, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 20% 5%, rgba(201, 154, 46, 0.22), transparent 32rem),
    linear-gradient(145deg, #f4efe4 0%, #eef5f7 48%, #f9f2e5 100%);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.phone-shell {
  width: min(100%, 430px);
  min-height: min(820px, calc(100vh - 44px));
  background: var(--paper);
  border: 1px solid rgba(229, 223, 209, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.phone-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(201, 154, 46, 0.12), transparent 190px);
  z-index: 0;
}

.phone-shell > * {
  position: relative;
  z-index: 1;
}

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-button span {
  transform: translateY(-1px);
  font-size: 30px;
  line-height: 1;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
}

.brand-mark {
  color: var(--gold);
}

.progress-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 0;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #ece6d8;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  transition: width 280ms ease;
}

#progressText {
  min-width: 36px;
  text-align: right;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 700;
}

.screen {
  min-height: calc(100vh - 44px);
  padding: 30px 24px 34px;
  display: none;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.screen.with-topbar {
  min-height: calc(100vh - 126px);
}

.eyebrow {
  margin: 0;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(31px, 9vw, 42px);
  line-height: 1.04;
}

h2 {
  font-size: 25px;
  line-height: 1.14;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.hero-visual {
  min-height: 280px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(32, 61, 114, 0.18), rgba(32, 61, 114, 0.02)),
    linear-gradient(145deg, #f9f4e8, #e7eff6);
  border: 1px solid var(--line);
}

.image-hero {
  min-height: 390px;
  align-items: end;
  background: #10182a;
  border-color: rgba(201, 154, 46, 0.4);
  box-shadow: 0 22px 48px rgba(16, 24, 42, 0.2);
}

.image-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 10, 22, 0.02) 0%, rgba(6, 10, 22, 0.2) 48%, rgba(6, 10, 22, 0.82) 100%),
    radial-gradient(circle at 50% 12%, rgba(255, 222, 143, 0.14), transparent 30%);
}

.image-hero img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.hero-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  gap: 4px;
  color: #fff8e6;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-overlay span {
  color: #f6cf76;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-overlay strong {
  font-size: 32px;
  line-height: 1;
}

.halo {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  position: absolute;
  background: radial-gradient(circle, rgba(201, 154, 46, 0.34), rgba(201, 154, 46, 0) 68%);
}

.shield-card {
  width: 178px;
  aspect-ratio: 0.72;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #fff;
  text-align: center;
  padding: 24px 18px;
  background: linear-gradient(160deg, #203d72, #304f87 58%, #9d721b);
  clip-path: polygon(50% 0, 88% 13%, 88% 58%, 50% 100%, 12% 58%, 12% 13%);
  box-shadow: 0 18px 48px rgba(32, 61, 114, 0.26);
  z-index: 1;
}

.shield-symbol {
  font-size: 50px;
  line-height: 1;
  color: #ffe5a1;
}

.shield-card p {
  font-size: 14px;
  font-weight: 700;
}

.shield-card strong {
  font-size: 24px;
}

.primary-button,
.option-button {
  width: 100%;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  min-height: 58px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 14px 28px rgba(32, 61, 114, 0.22);
}

.primary-button.gold {
  background: linear-gradient(135deg, #9d721b, #c99a2e);
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-button {
  min-height: 64px;
  text-align: left;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 13px 15px;
}

.option-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 18px;
}

.field-group {
  display: grid;
  gap: 12px;
}

label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 16px;
  outline: none;
}

textarea {
  min-height: 116px;
  resize: vertical;
}

input:disabled,
textarea:disabled,
button:disabled {
  cursor: wait;
  opacity: 0.72;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 154, 46, 0.15);
}

.prayer-box,
.result-card,
.offer-section,
.testimonial {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}

.prayer-box {
  display: grid;
  gap: 12px;
  border-left: 4px solid var(--gold);
}

.prayer-box p {
  color: #424b62;
  line-height: 1.6;
  font-size: 15px;
}

.loader-wrap {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
}

.loader {
  width: 82px;
  height: 82px;
  border: 8px solid #eee6d4;
  border-top-color: var(--blue);
  border-right-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.result-card {
  display: grid;
  gap: 12px;
  background: linear-gradient(180deg, #fff, #f7f1e4);
}

.product-image {
  width: 100%;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(201, 154, 46, 0.45);
  box-shadow: 0 20px 46px rgba(24, 32, 51, 0.16);
}

.mini-banner {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #111b30;
  color: #fff8e6;
  border: 1px solid rgba(201, 154, 46, 0.55);
}

.mini-banner img {
  width: 82px;
  height: 82px;
  object-fit: cover;
}

.mini-banner strong {
  display: block;
  margin-bottom: 5px;
  color: #f6cf76;
}

.mini-banner span {
  color: rgba(255, 248, 230, 0.84);
  font-size: 14px;
  line-height: 1.35;
}

.result-card strong {
  color: var(--blue);
}

.offer-stack {
  display: grid;
  gap: 14px;
}

.offer-section ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #414b61;
  line-height: 1.6;
}

.price-box {
  display: grid;
  gap: 5px;
  text-align: center;
  padding: 18px;
  background: #f7f1e4;
  border: 1px solid var(--line);
}

.price-box del {
  color: var(--muted);
}

.price {
  font-size: 36px;
  font-weight: 900;
  color: var(--green);
}

.testimonial {
  display: grid;
  gap: 8px;
  color: #414b61;
  line-height: 1.45;
  font-size: 14px;
}

.testimonial strong {
  color: var(--ink);
}

.footer-safe {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.checkout-shell {
  max-width: 470px;
}

.checkout-shell .screen {
  padding-top: 18px;
}

.checkout-shell .product-image {
  max-height: 220px;
  object-position: center 42%;
}

.checkout-shell h1 {
  font-size: clamp(28px, 7vw, 36px);
}

.checkout-shell .lead {
  font-size: 15px;
}

.checkout-form {
  display: grid;
  gap: 12px;
}

.pix-price {
  background: linear-gradient(180deg, #fff9eb, #f1eadc);
}

.pix-result {
  display: none;
  gap: 13px;
  padding: 16px;
  background: #111b30;
  border: 1px solid rgba(201, 154, 46, 0.55);
  color: #fff8e6;
}

.pix-result.is-visible {
  display: grid;
}

.pix-error-title {
  display: none;
}

.pix-result.has-error .pix-success-title,
.pix-result.has-error .field-group,
.pix-result.has-error #copyPixButton {
  display: none;
}

.pix-result.has-error .pix-error-title {
  display: block;
}

.pix-result .offer-section {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

.pix-result .note,
.pix-result label {
  color: rgba(255, 248, 230, 0.78);
}

.pix-result textarea {
  min-height: 112px;
  color: #182033;
  font-size: 14px;
  line-height: 1.25;
}

.pix-qr {
  display: none;
  width: min(100%, 240px);
  margin: 0 auto;
  background: #fff;
  padding: 10px;
  border: 1px solid rgba(201, 154, 46, 0.5);
}

.pix-qr.is-visible {
  display: block;
}

.status-line {
  text-align: center;
  color: #f6cf76;
  font-size: 14px;
  font-weight: 800;
}

.status-line.is-error {
  color: #ffd1d1;
}

.status-line.is-paid {
  color: #bff3d7;
}

.admin-page {
  min-height: 100vh;
  padding: 22px;
  display: grid;
  place-items: center;
}

.admin-panel {
  width: min(100%, 980px);
  display: grid;
  gap: 20px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid rgba(229, 223, 209, 0.9);
  box-shadow: var(--shadow);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.locked-mode {
  padding: 16px;
  background: #111b30;
  color: #fff8e6;
  border: 1px solid rgba(201, 154, 46, 0.55);
  font-weight: 900;
  text-align: center;
}

.mode-option,
.acquirer-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}

.mode-option {
  grid-template-columns: auto 1fr;
  align-items: center;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.acquirer-card {
  position: relative;
}

.acquirer-card > .acquirer-radio {
  position: absolute;
  top: 16px;
  right: 16px;
  width: auto;
}

.acquirer-card:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 154, 46, 0.16);
}

.acquirer-card.is-blocked {
  opacity: 0.56;
  background: #f8eeee;
}

.acquirer-card.is-muted {
  opacity: 0.72;
}

.acquirer-head {
  padding-right: 34px;
  display: grid;
  gap: 5px;
}

.acquirer-head strong {
  color: var(--blue);
  font-size: 14px;
}

.acquirer-head em {
  width: fit-content;
  padding: 4px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.is-blocked .acquirer-head em {
  background: #ffe1e1;
  color: #8f3e4a;
}

.acquirer-meta,
.acquirer-api {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.acquirer-api-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.acquirer-api-field input {
  padding: 10px 12px;
  font-size: 14px;
}

.payment-log {
  display: grid;
  gap: 12px;
}

.payment-card {
  display: grid;
  gap: 7px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.payment-card strong {
  color: var(--blue);
}

@media (max-width: 720px) {
  .admin-toolbar,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-page {
    padding: 0;
  }

  .admin-panel {
    min-height: 100vh;
    box-shadow: none;
    border: 0;
  }
}

@media (max-width: 520px) {
  .app {
    padding: 0;
  }

  .phone-shell {
    width: 100%;
    min-height: 100vh;
    border: 0;
    box-shadow: none;
  }

  .screen {
    min-height: 100vh;
  }

  .image-hero,
  .image-hero img {
    min-height: 410px;
  }
}
