*, 
*::before, 
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  color-scheme: dark light;
  --bg: #0f172a;
  --bg-soft: #111827;
  --bg-softer: #020617;
  --card-bg: rgba(15, 23, 42, 0.9);
  --accent-cup: #22c55e;
  --accent-usd: #f97316;
  --accent-soft: rgba(148, 163, 184, 0.4);
  --text: #e5e7eb;
  --text-soft: #9ca3af;
  --border: rgba(148, 163, 184, 0.25);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.65);
  --radius-lg: 18px;
  --radius-pill: 999px;
  --transition-fast: 0.18s ease-out;
  --qr-bg: #020617;
}

html, 
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827, var(--bg-softer));
  color: var(--text);
}

body {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.app {
  width: 100%;
  max-width: 480px;
  padding: 16px 14px 5px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Instrucciones */
.instructions {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.8);
}

.instructions__title {
  margin: 0 0 4px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.instructions__text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text);
}

/* Descripción del pedido */
.order-desc {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 14px;
  padding: 8px 10px 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.8);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-desc__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.order-desc__label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.order-desc__paste-btn {
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #d4af37;
  color: #000;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.order-desc__paste-btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.7);
}

.order-desc__textarea {
  width: 100%;
  resize: none;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 6px 8px;
  font-size: 0.8rem;
  font-family: inherit;
  min-height: 64px;
  height: auto;
  overflow-y: hidden;
}

/* Top return button */
.top-link {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-link__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background-color: #d4af37;
  color: #000000;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.top-link__btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
}

.top-link__btn--whatsapp {
  background-color: #22c55e;
  color: #022c22;
}

/* Cards layout */
.card-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .app {
    padding: 16px 18px 22px;
  }

  /* Se eliminó el cambio a dos columnas para mantener una sola columna en todos los tamaños */
  /* .card-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  } */
}

.pay-card {
  background: linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.16),
      rgba(15, 23, 42, 0.2)
    ),
    var(--card-bg);
  border-radius: 20px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(18px);
}

.pay-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pay-card__label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pay-card__pill {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pay-card__pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.pay-card__pill--cup {
  color: #bbf7d0;
}

.pay-card__pill--cup::before {
  background: var(--accent-cup);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.3);
}

.pay-card__pill--usd {
  color: #fed7aa;
}

.pay-card__pill--usd::before {
  background: var(--accent-usd);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.35);
}

.pay-card__body {
  /* Antes era grid con QR; ahora solo contiene el número */
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

@media (max-width: 370px) {
  .pay-card__body {
    flex-direction: column;
  }
}

.pay-card__number-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pay-card__number {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
  color: #f9fafb;
  padding: 7px 8px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.65);
  background: linear-gradient(
      120deg,
      rgba(15, 23, 42, 0.85),
      rgba(17, 24, 39, 0.95)
    );
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-card__qr-wrapper {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.pay-card__qr {
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.85);
  object-fit: cover;
  background: #020617;
}

.pay-card__qr--2in {
  width: 2in;
  height: 2in;
  max-width: 100%;
}

.icon-btn {
  border: 1px solid var(--border);
  background: radial-gradient(circle at top left, #1e293b, #020617);
  color: var(--text-soft);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    border-color var(--transition-fast), color var(--transition-fast),
    box-shadow var(--transition-fast);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.6);
}

.icon-btn span {
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: scale(0.94) translateY(1px);
  background: #020617;
  border-color: rgba(148, 163, 184, 0.8);
}

.icon-btn--active {
  color: #e5e7eb;
  border-color: rgba(248, 250, 252, 0.75);
  box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.18),
    0 14px 32px rgba(15, 23, 42, 0.9);
}

/* Phone section */
.phone {
  margin-top: 2px;
  margin-bottom: 1in;
  background: linear-gradient(
      160deg,
      rgba(15, 23, 42, 0.96),
      rgba(15, 23, 42, 0.9)
    );
  border-radius: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone__label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.phone__body {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.phone__row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.phone__number {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
  white-space: nowrap;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 4px 4px 10px;
  font-size: 0.7rem;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  opacity: 0.8;
}

.footer__item a {
  color: inherit;
  text-decoration: none;
}

.footer__item a:hover,
.footer__item a:active {
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(120%);
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.96);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.18s ease-out;
  z-index: 20;
}

.toast::before {
  content: "✓";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  background: rgba(22, 101, 52, 0.4);
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}