/* ═══════════════════════════════════════════════════════════════
   dap · страницы оплаты и выдачи ключа
   ═══════════════════════════════════════════════════════════════ */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 7, 16, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.page-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 82px;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.2s;
}

.page-back:hover {
  color: var(--text);
}

.page-back .icon {
  width: 15px;
  height: 15px;
  transform: rotate(180deg);
}

.page-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 54px 0 46px;
}

.page-main > .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-card {
  position: relative;
  width: min(560px, 100%);
  padding: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  background:
    radial-gradient(480px 200px at 50% -8%, rgba(255, 61, 110, 0.15), transparent 70%),
    linear-gradient(180deg, #181122, #0d0a15);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.page-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

.page-card-wide {
  width: min(620px, 100%);
}

.loading-state {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.spinner {
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
  vertical-align: -2px;
}

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

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-chip .icon {
  width: 13px;
  height: 13px;
}

.status-chip-ok {
  border-color: rgba(61, 220, 151, 0.28);
  background: rgba(61, 220, 151, 0.08);
  color: #7df0bd;
}

.status-chip-demo {
  border-color: rgba(154, 99, 255, 0.3);
  background: rgba(154, 99, 255, 0.09);
  color: #c8b0ff;
  text-transform: none;
  letter-spacing: 0.02em;
}

.page-title {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 4.5vw, 2.1rem);
  letter-spacing: -0.035em;
}

.page-sub {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.page-sub strong {
  color: #e6dff4;
}

.order-lines {
  display: grid;
  gap: 0;
  margin: 6px 0 22px;
  padding: 4px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.order-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.order-line:last-child {
  border-bottom: 0;
}

.order-line span {
  color: var(--muted-2);
  font-size: 0.76rem;
}

.order-line strong {
  color: #e9e3f5;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.order-line-total {
  padding-top: 15px;
}

.order-line-total strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.order-lines-compact {
  margin-top: 20px;
  margin-bottom: 0;
}

.mono {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.74rem !important;
  letter-spacing: 0.01em;
  color: var(--muted) !important;
}

.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 13px 15px;
  border: 1px solid rgba(154, 99, 255, 0.24);
  border-radius: 12px;
  background: rgba(154, 99, 255, 0.07);
}

.demo-banner .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: #c3a6ff;
  flex-shrink: 0;
}

.demo-banner p {
  color: #c3bad6;
  font-size: 0.75rem;
  line-height: 1.6;
}

.demo-banner p strong {
  color: #e3d8f7;
}

.demo-banner a {
  color: #d4c1ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-card .btn-block {
  width: 100%;
}

.page-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 15px;
  color: var(--muted-2);
  font-size: 0.69rem;
  text-align: center;
}

.page-secure .icon {
  width: 13px;
  height: 13px;
}

.page-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 26px;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.page-note .icon {
  width: 13px;
  height: 13px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.page-help {
  margin-top: 20px;
  color: var(--muted-2);
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: center;
}

.page-help a {
  color: var(--pink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.status-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.status-icon-warn {
  border: 1px solid rgba(255, 84, 112, 0.3);
  background: rgba(255, 84, 112, 0.09);
  color: #ff8fa1;
}

/* ── успех ───────────────────────────────────────────────── */

.success-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--grad-btn);
  color: #fff;
  box-shadow:
    0 18px 40px rgba(225, 29, 72, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: popIn 0.5s var(--ease);
}

.success-mark .icon {
  width: 36px;
  height: 36px;
  stroke-width: 2.4;
}

.success-mark-pending {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  box-shadow: none;
}

@keyframes popIn {
  from { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.06); }
}

.key-box {
  margin: 24px 0 16px;
  padding: 18px;
  border: 1px solid rgba(255, 61, 110, 0.24);
  border-radius: 15px;
  background:
    radial-gradient(320px 100px at 50% 0%, rgba(255, 61, 110, 0.12), transparent),
    rgba(0, 0, 0, 0.3);
}

.key-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.key-box-head > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.key-box-head .icon {
  width: 14px;
  height: 14px;
  color: var(--pink-soft);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #ddd5ec;
  font-size: 0.68rem;
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.26);
}

.copy-btn .icon {
  width: 13px;
  height: 13px;
}

.key-value {
  display: block;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(1.05rem, 4.6vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  text-align: center;
  user-select: all;
  word-break: break-all;
}

.email-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.email-line.is-sent {
  border-color: rgba(61, 220, 151, 0.18);
  background: rgba(61, 220, 151, 0.045);
}

.email-line .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--muted-2);
  flex-shrink: 0;
}

.email-line.is-sent .icon {
  color: var(--green);
}

.email-line strong {
  color: #e4dcf3;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 4px;
}

.download-grid .download-link {
  padding: 13px;
}

.download-grid .download-link .dl-arrow {
  display: none;
}

.download-grid .download-link span > span {
  display: block;
}

@media (max-width: 620px) {
  .page-card {
    padding: 30px 20px;
  }

  .page-main {
    padding-top: 34px;
  }

  .page-header-inner {
    height: 70px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .order-line {
    gap: 10px;
  }

  .order-line strong {
    font-size: 0.78rem;
  }

  .page-actions .btn {
    flex: 1;
  }

  .page-back {
    font-size: 0.74rem;
  }
}
