/* ================= crypto payment modal ================= */
.modal-card.payment-card { width: min(600px, 100%); padding: 30px; }
.payment-card h3 { margin: 0 0 18px; font-family: var(--font-d); font-size: clamp(22px, 3vw, 28px); padding-right: 36px; }
.payment-card label { display: block; margin: 16px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.payment-error { color: var(--red); margin: 10px 0 0; font-size: 14px; }
.payment-error:empty { display: none; }

/* order summary strip */
.pay-sum { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border-radius: 18px; margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); }
.pay-thumb { width: 46px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: radial-gradient(circle at 50% 70%, rgba(46, 230, 255, 0.35), transparent 70%), rgba(255, 255, 255, 0.04); border: 1px solid rgba(46, 230, 255, 0.3); }
.pay-sum.pro .pay-thumb { background: radial-gradient(circle at 50% 70%, rgba(255, 79, 160, 0.4), transparent 70%), rgba(255, 255, 255, 0.04); border-color: rgba(255, 79, 160, 0.35); }
.pay-thumb img { width: 32px; height: 46px; object-fit: contain; max-width: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.6)); }
.pay-what { display: flex; flex-direction: column; min-width: 0; }
.pay-what b { font-family: var(--font-d); font-size: 16px; }
.pay-what small { color: var(--muted); font-size: 13px; }
.pay-total { margin-left: auto; font-family: var(--font-d); font-size: 24px; font-weight: 800; white-space: nowrap; }

.pay-loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 18px 0; }
.pay-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--violet); animation: pay-rot 0.8s linear infinite; }
@keyframes pay-rot { to { transform: rotate(360deg); } }
.pay-empty { color: var(--muted); }

/* coin badge */
.coin { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 6px 14px -6px rgba(0, 0, 0, 0.7); }
.coin svg { width: 62%; height: 62%; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.coin svg .f, .coin svg .f rect { fill: #fff; stroke: none; }
.coin svg .o { opacity: 0.7; }
.coin.lg { width: 44px; height: 44px; }

/* steps */
.pay-step { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.pay-step span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; letter-spacing: 0; color: #fff; background: rgba(139, 92, 246, 0.35); }
.coin-grid + .pay-step { margin-top: 22px; }

.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.coin-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; border-radius: 16px; text-align: center;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2); transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.coin-tile b { font-family: var(--font-d); font-size: 15px; line-height: 1; margin-top: 2px; }
.coin-tile small { color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.1; }
.coin-tile:not(:disabled):hover { background: rgba(255, 255, 255, 0.06); transform: translateY(-1px); }
.coin-tile:disabled { opacity: 0.5; cursor: not-allowed; }
.coin-tile:disabled .coin { filter: grayscale(1); }
.coin-tile:disabled b, .coin-tile:disabled small { text-decoration: line-through; }
.coin-tile.on { border-color: var(--violet); background: rgba(139, 92, 246, 0.16); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18); }
.coin-tile:focus-visible, .net-chip:focus-visible, .copy-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.5); }

.net-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.net-list .net-chip:only-child { grid-column: 1 / -1; }
.net-chip { display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; color: #dfe3fa;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2); transition: background 0.2s, border-color 0.2s; }
.net-chip i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); transition: all 0.2s; }
.net-chip:hover { background: rgba(255, 255, 255, 0.06); }
.net-chip.on { border-color: var(--violet); background: rgba(139, 92, 246, 0.16); color: #fff; }
.net-chip.on i { border-color: var(--violet); background: var(--violet); box-shadow: inset 0 0 0 2.5px #1a1530; }

/* hint / warning */
.pay-hint { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5;
  color: #f3d9a4; background: rgba(245, 180, 60, 0.08); border: 1px solid rgba(245, 180, 60, 0.22); }
.pay-hint svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: #f5b43c; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pay-go { margin-top: 18px; position: relative; }
.pay-go.busy { pointer-events: none; opacity: 0.75; }
.pay-go.busy::after { content: ''; position: absolute; right: 18px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: pay-rot 0.8s linear infinite; }
.pay-foot { margin: 12px 0 0; text-align: center; color: var(--dim); font-size: 12.5px; }

/* invoice */
.inv { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; padding: 18px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2); }
.inv-main { min-width: 0; }
.inv-asset { display: flex; align-items: center; gap: 12px; }
.inv-asset .inv-name { display: flex; flex-direction: column; }
.inv-asset b { font-family: var(--font-d); font-size: 20px; line-height: 1.1; }
.inv-asset small { color: var(--muted); font-size: 13px; font-weight: 600; }
.inv label:first-of-type { margin-top: 18px; }

.copy-field { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; border-radius: 14px; background: #0f1020; border: 1px solid var(--line-2); transition: border-color 0.2s; }
.copy-field:focus-within { border-color: rgba(139, 92, 246, 0.6); }
.copy-field input { flex: 1; min-width: 0; border: 0; padding: 8px 0; background: transparent; color: var(--text);
  font: 600 14px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; outline: none; }
.copy-field.big input { font-size: 20px; font-weight: 700; letter-spacing: 0.01em; }
.copy-field em { font-style: normal; font-weight: 800; font-size: 13px; color: var(--muted); padding: 0 4px; }
.copy-btn { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, 0.07); transition: background 0.2s; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.14); }
.copy-btn svg { width: 18px; height: 18px; fill: none; stroke: #dfe3fa; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.copy-btn.done { background: rgba(52, 211, 153, 0.2); }
.copy-btn.done svg { stroke: #6ee7b7; stroke-width: 2.4; }

.inv-qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-box { padding: 10px; border-radius: 16px; background: #fff; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8), 0 0 0 4px rgba(139, 92, 246, 0.18); }
.qr-box img { display: block; width: 148px; height: 148px; }
.inv-qr figcaption { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; max-width: 170px; }

/* live status */
.inv-status { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 13px 16px; border-radius: 14px;
  background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.25); --st: #a78bfa; }
.inv-status.is-confirming { background: rgba(46, 230, 255, 0.08); border-color: rgba(46, 230, 255, 0.25); --st: #2ee6ff; }
.inv-status.is-under { background: rgba(245, 180, 60, 0.08); border-color: rgba(245, 180, 60, 0.28); --st: #f5b43c; }
.inv-status .dot { position: relative; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--st); }
.inv-status .dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--st); opacity: 0; animation: pay-ping 1.8s ease-out infinite; }
@keyframes pay-ping { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.4); opacity: 0; } }
.inv-status .txt { display: flex; flex-direction: column; min-width: 0; }
.inv-status b { font-size: 15px; }
.inv-status small { color: var(--muted); font-size: 12.5px; }

@media (max-width: 560px) {
  .modal-card.payment-card { padding: 24px 18px; }
  .coin-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .coin-tile { padding: 12px 2px 10px; }
  .coin-tile small { display: none; }
  .coin { width: 30px; height: 30px; }
  .net-list { grid-template-columns: 1fr; }
  .inv { grid-template-columns: 1fr; padding: 14px; }
  /* on a phone people usually pay from the same phone: amount + address first, QR below */
  .qr-box img { width: 128px; height: 128px; }
  .copy-field.big input { font-size: 18px; }
  .pay-total { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .inv-status .dot::after { animation: none; } }

/* cabinet: unpaid invoices */
.pending-payments { margin: 24px 0; padding: 22px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--panel); }
.pending-payments h3 { margin-bottom: 16px; }
.pending-payment { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.pending-payment + .pending-payment { border-top: 1px solid var(--line-2); }
.pending-payment > div { flex: 1; min-width: 0; }
.pending-payment small { display: block; color: var(--muted); margin-top: 5px; }
@media (max-width: 480px) { .pending-payment { flex-wrap: wrap; } }
