@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --bg: #f0f4ff;
  --card: #ffffff;
  --primary: #4361ee;
  --primary-light: #eef0ff;
  --success: #2ec177;
  --success-light: #e8faf2;
  --warn: #f7941d;
  --warn-light: #fff5e8;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --text: #1a1d2e;
  --muted: #8b90a7;
  --border: #e2e5f0;
  --shadow: 0 4px 32px rgba(67,97,238,0.10);
  --radius: 20px;
  --tg: #2aabee;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 14px 100px;
  color: var(--text);
}
body::before, body::after {
  content: ''; position: fixed; border-radius: 50%;
  z-index: 0; filter: blur(80px); opacity: 0.3; pointer-events: none;
}
body::before { width: 380px; height: 380px; background: #a5b4fc; top: -80px; left: -80px; }
body::after  { width: 320px; height: 320px; background: #86efac; bottom: -60px; right: -60px; }

.container { position: relative; z-index: 1; width: 100%; max-width: 420px; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}

.card-header { padding: 24px 24px 0; text-align: center; }
.card-header-row {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 18px 0; justify-content: center;
  position: relative;
}
.back-btn {
  position: absolute; left: 16px; top: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; font-weight: 900;
  color: var(--text); transition: all 0.2s;
  text-decoration: none;
}
.back-btn:active { transform: scale(0.92); background: var(--border); }

.merchant-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--success-light); color: var(--success);
  font-size: 12px; font-weight: 800; padding: 5px 12px;
  border-radius: 50px; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.merchant-badge.danger { background: var(--danger-light); color: var(--danger); }
.merchant-badge.info   { background: var(--primary-light); color: var(--primary); }

.card-title    { font-size: 22px; font-weight: 900; line-height: 1.25; margin-bottom: 6px; }
.card-subtitle { font-size: 14px; color: var(--muted); font-weight: 600; line-height: 1.5; }

.card-body { padding: 22px 24px 24px; }

/* ── Amount block ── */
.amount-fixed {
  background: linear-gradient(135deg, #4361ee 0%, #5b7cfa 100%);
  border-radius: 18px; padding: 22px 20px;
  text-align: center; color: white; margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(67,97,238,0.25);
  position: relative; overflow: hidden;
}
.amount-fixed::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.amount-label-mini {
  font-size: 11px; font-weight: 800; opacity: 0.85;
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px;
}
.amount-fixed-value { font-size: 44px; font-weight: 900; line-height: 1.1; letter-spacing: -1px; }
.amount-recipient {
  font-size: 13px; font-weight: 700; opacity: 0.9;
  margin-top: 8px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

/* ── QR ── */
.qr-section { text-align: center; padding: 4px 0; margin-bottom: 8px; }
.qr-wrap {
  display: inline-block; padding: 16px; background: white;
  border-radius: 18px; border: 2.5px solid var(--border);
  box-shadow: 0 6px 24px rgba(67,97,238,0.10);
  position: relative; cursor: pointer; transition: transform 0.2s;
}
.qr-wrap:active { transform: scale(0.97); }
.qr-wrap span img { display: block; width: 170px; height: 170px; border-radius: 8px; }
.qr-badge {
  position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
  background: var(--success); color: white;
  font-size: 11px; font-weight: 800; padding: 4px 12px;
  border-radius: 50px; white-space: nowrap;
}
.qr-hint { margin-top: 22px; font-size: 12px; color: var(--muted); font-weight: 700; line-height: 1.5; }

/* ── Buttons ── */
.btn-primary {
  width: 100%; padding: 18px;
  background: var(--primary); color: white; border: none;
  border-radius: 16px; font-family: 'Nunito', sans-serif;
  font-size: 17px; font-weight: 800; cursor: pointer;
  transition: all 0.2s; display: flex; align-items: center;
  justify-content: center; gap: 10px;
  box-shadow: 0 8px 22px rgba(67,97,238,0.35);
  margin-top: 12px; text-decoration: none; text-align: left;
}
.btn-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 4px 14px rgba(67,97,238,0.30); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn-primary .arrow { font-size: 20px; transition: transform 0.3s; }
.btn-primary-sub {
  display: block; font-size: 11px; font-weight: 700;
  opacity: 0.85; margin-top: 3px; letter-spacing: 0.3px; text-transform: uppercase;
}
.btn-success { background: var(--success); box-shadow: 0 8px 22px rgba(46,193,119,0.35); }
.btn-success:active { box-shadow: 0 4px 14px rgba(46,193,119,0.30) !important; }
.btn-tg { background: var(--tg); box-shadow: 0 8px 22px rgba(42,171,238,0.35); }
.btn-tg:active { box-shadow: 0 4px 14px rgba(42,171,238,0.30) !important; }
.btn-outline {
  background: transparent; color: var(--muted);
  box-shadow: none; border: 2px solid var(--border); padding: 14px;
}
.btn-outline:active { background: var(--bg); }

.or-sep {
  text-align: center; color: var(--muted);
  font-size: 12px; font-weight: 800; margin: 16px 0;
  display: flex; align-items: center; gap: 12px;
  text-transform: uppercase; letter-spacing: 1px;
}
.or-sep::before, .or-sep::after { content:''; flex: 1; height: 1px; background: var(--border); }

/* ── Method list ── */
.method-list { display: flex; flex-direction: column; gap: 10px; }
.method-btn {
  background: white; border: 2px solid var(--border);
  border-radius: 16px; padding: 14px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all 0.2s;
  text-align: left; font-family: 'Nunito', sans-serif;
  width: 100%; text-decoration: none; color: inherit;
}
.method-btn:active { transform: scale(0.98); border-color: var(--primary); background: var(--primary-light); }
.method-btn.recommended {
  border-color: var(--primary);
  background: linear-gradient(135deg, #eef0ff 0%, #f8f9ff 100%);
}
.method-btn-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; color: white;
}
.method-btn-info { flex: 1; min-width: 0; }
.method-btn-title {
  font-size: 15px; font-weight: 900; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.method-btn-desc { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; line-height: 1.35; }
.method-btn-arrow { color: var(--muted); font-size: 20px; font-weight: 900; }
.method-tag {
  display: inline-block; background: var(--primary); color: white;
  font-size: 9px; font-weight: 800; padding: 2px 7px;
  border-radius: 50px; text-transform: uppercase; letter-spacing: 0.4px;
  vertical-align: middle;
}

/* ── Bank grid ── */
/*.bank-list-wrap { margin-top: 14px; }*/
.bank-list-label { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 10px; text-align: center; }
.bank-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bank-btn {
  background: white; border: 2px solid var(--border);
  border-radius: 14px; padding: 10px 4px; cursor: pointer;
  transition: all 0.2s; display: flex; flex-direction: column;
  align-items: center; gap: 4px; font-family: 'Nunito', sans-serif;
}
.bank-btn:active { transform: scale(0.95); border-color: var(--primary); background: var(--primary-light); }
.bank-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: white;
}
.bank-name { font-size: 10px; font-weight: 700; color: var(--text); text-align: center; line-height: 1.1; }

/* ── Helper box ── */
.helper-box {
  display: flex; gap: 10px;
  background: #fff8ec; border: 1.5px solid #fde8b8;
  border-radius: 12px; padding: 12px 14px;
  margin-top: 16px; align-items: flex-start;
}
.helper-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.helper-text { font-size: 12px; color: #7a5a00; font-weight: 700; line-height: 1.5; }

/* ── Receipt mini ── */
.receipt-mini { background: var(--bg); border-radius: 12px; padding: 12px 14px; margin-top: 16px; }
.receipt-mini-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; font-size: 12px;
}
.receipt-mini-row .k { color: var(--muted); font-weight: 700; }
.receipt-mini-row .v { color: var(--text); font-weight: 800; }

/* ── Timer ── */
.timer-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--warn-light); border-radius: 10px;
  padding: 9px 12px; margin-top: 14px;
  font-size: 12px; font-weight: 700; color: var(--warn);
}
.timer-countdown { margin-left: auto; font-weight: 900; font-size: 14px; }

/* ── Status screens ── */
.status-icon {
  width: 88px; height: 88px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; margin: 0 auto 18px;
  animation: pop 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.status-icon.ok  { background: var(--success-light); }
.status-icon.err { background: var(--danger-light); animation: shake 0.6s; }
@keyframes pop   { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-8px); }
  40%,80% { transform: translateX(8px); }
}
.status-screen { text-align: center; padding: 8px 0 4px; }
.status-title  { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.status-amount { font-size: 34px; font-weight: 900; margin-bottom: 6px; }
.status-amount.ok  { color: var(--success); }
.status-amount.err { color: var(--danger); }
.status-sub { font-size: 13px; color: var(--muted); font-weight: 600; line-height: 1.5; margin-bottom: 20px; }

/* ── Reasons list ── */
.reasons-list { background: var(--danger-light); border-radius: 14px; padding: 14px 16px; margin-top: 18px; text-align: left; }
.reasons-title { font-size: 13px; font-weight: 900; color: var(--danger); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.reasons-list ul { list-style: none; }
.reasons-list li {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 0; border-bottom: 1px dashed rgba(239,68,68,0.2);
  font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.4;
}
.reasons-list li:last-child { border-bottom: none; }
.reason-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); color: white; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; margin-top: 1px;
}
.reason-text span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 2px; }

.error-code {
  background: white; border: 1.5px dashed var(--border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 16px;
  font-size: 11px; color: var(--muted); font-weight: 700;
  text-align: center; letter-spacing: 0.5px;
}
.error-code code {
  font-family: 'Courier New', monospace; color: var(--text);
  font-weight: 800; background: var(--bg); padding: 2px 6px; border-radius: 4px;
}
.error-code small { display: block; margin-top: 4px; font-size: 10px; font-weight: 600; }

/* ── Card form ── */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 11px; font-weight: 800;
  color: var(--text); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.field input {
  width: 100%; padding: 14px 16px;
  border: 2px solid var(--border); border-radius: 12px;
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700;
  color: var(--text); background: white; outline: none; transition: all 0.2s; letter-spacing: 0.5px;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(67,97,238,0.12); }
.field input.invalid { border-color: var(--danger); }
.field input::placeholder { color: var(--muted); font-weight: 600; letter-spacing: 0.5px; }
.field-error { font-size: 11px; font-weight: 700; color: var(--danger); margin-top: 5px; padding-left: 2px; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

/* ── Card visual ── */
.card-visual {
  background: linear-gradient(135deg, #1a1d2e 0%, #2d3155 100%);
  border-radius: 16px; padding: 18px 20px;
  color: white; margin-bottom: 18px;
  position: relative; overflow: hidden;
  aspect-ratio: 1.586/1; max-height: 200px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.card-visual::before {
  content: ''; position: absolute;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(67,97,238,0.4) 0%, transparent 70%);
  top: -100px; right: -100px;
}
.card-visual-row { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.card-chip {
  width: 36px; height: 28px;
  background: linear-gradient(135deg, #ffd700 0%, #c89100 100%);
  border-radius: 6px; position: relative;
}
.card-chip::before {
  content: ''; position: absolute; inset: 4px;
  border: 1px solid rgba(0,0,0,0.2); border-radius: 3px;
}
.card-brand { font-size: 22px; font-weight: 900; letter-spacing: 1px; opacity: 0.9; }
.card-number-display {
  font-family: 'Courier New', monospace; font-size: 18px; font-weight: 700;
  letter-spacing: 2px; margin: 18px 0 12px; position: relative; z-index: 1;
}
.card-footer-row { display: flex; justify-content: space-between; align-items: flex-end; position: relative; z-index: 1; }
.card-footer-row .label-mini {
  font-size: 8px; font-weight: 700; opacity: 0.6;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px;
}
.card-footer-row .value { font-size: 13px; font-weight: 800; font-family: 'Courier New', monospace; letter-spacing: 1px; }

/* ── Card-to-card ── */
.transfer-visual { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.transfer-card-mini {
  flex: 1; background: var(--bg); border: 2px solid var(--border); border-radius: 12px; padding: 12px;
}
.transfer-card-mini.recipient {
  background: linear-gradient(135deg, #4361ee 0%, #5b7cfa 100%);
  color: white; border-color: transparent;
}
.transfer-card-mini .label-mini {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.7; margin-bottom: 4px;
}
.transfer-card-mini .num { font-family: 'Courier New', monospace; font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.transfer-arrow { color: var(--primary); font-size: 22px; font-weight: 900; flex-shrink: 0; }

/* ── Phone display ── */
.phone-display {
  background: var(--bg); border-radius: 14px; padding: 16px; text-align: center; margin-bottom: 18px;
}
.phone-display .label-mini {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 6px;
}
.phone-display .num { font-size: 26px; font-weight: 900; color: var(--text); letter-spacing: 1px; }
.phone-display .name { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 6px; }

/* ── Copy row ── */
.copy-row { display: flex; gap: 8px; margin-top: 12px; }
.copy-btn {
  flex: 1; padding: 11px;
  background: var(--primary-light); color: var(--primary);
  border: none; border-radius: 10px; font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 800; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.copy-btn:active { background: var(--primary); color: white; }

/* ── Intro screen ── */
.intro-hero { text-align: center; padding: 8px 0 14px; }
.intro-hero-icon {
  width: 84px; height: 84px; border-radius: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 40px; color: white; margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(67,97,238,0.30); position: relative;
}
.intro-hero-icon::after {
  content: ''; position: absolute; inset: -6px;
  border-radius: 26px; border: 2px solid currentColor; opacity: 0.18;
  animation: pulseBig 2.4s ease-out infinite;
}
@keyframes pulseBig {
  0%   { transform: scale(0.96); opacity: 0.25; }
  100% { transform: scale(1.15); opacity: 0; }
}
.intro-hero h2 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.intro-hero p { font-size: 14px; color: var(--muted); font-weight: 600; line-height: 1.5; }

.intro-steps { background: var(--bg); border-radius: 16px; padding: 16px; margin-top: 18px; }
.intro-steps-title {
  font-size: 12px; font-weight: 900; color: var(--muted); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.5px; text-align: center;
}
.intro-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.intro-step:last-child { border-bottom: none; }
.intro-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: white;
  font-size: 12px; font-weight: 900; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.intro-step-text { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.45; }
.intro-step-text span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 2px; }

.intro-fact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 0; }
.intro-fact { background: white; border: 2px solid var(--border); border-radius: 12px; padding: 10px 12px; text-align: center; }
.intro-fact-icon { font-size: 20px; }
.intro-fact-label {
  font-size: 10px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.4px; margin-top: 3px;
}
.intro-fact-value { font-size: 13px; font-weight: 900; color: var(--text); margin-top: 1px; }

/* ── Generation overlay ── */
.gen-overlay {
  display: flex; position: fixed; inset: 0;
  background: rgba(240,244,255,0.96); z-index: 200;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 30px; backdrop-filter: blur(8px);
}
.gen-icon-wrap { position: relative; width: 100px; height: 100px; }
.gen-icon {
  width: 100px; height: 100px; border-radius: 24px;
  background: linear-gradient(135deg, #4361ee 0%, #5b7cfa 100%);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 46px;
  box-shadow: 0 14px 36px rgba(67,97,238,0.40);
  animation: floaty 2.5s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.gen-icon-ring {
  position: absolute; inset: -10px; border-radius: 30px;
  border: 3px solid var(--primary); opacity: 0.3;
  animation: ringPulse 1.6s ease-out infinite;
}
@keyframes ringPulse { 0% { transform: scale(0.92); opacity: 0.4; } 100% { transform: scale(1.18); opacity: 0; } }
.gen-title { font-size: 18px; font-weight: 900; color: var(--text); text-align: center; }
.gen-sub { font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; max-width: 280px; line-height: 1.5; }
.gen-progress { width: 220px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; position: relative; }
.gen-progress::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
  animation: progressSlide 1.4s linear infinite;
}
@keyframes progressSlide { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.gen-stages { display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 260px; margin-top: 6px; }
.gen-stage {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; color: var(--muted);
  opacity: 0.5; transition: opacity 0.3s, color 0.3s;
}
.gen-stage.active { opacity: 1; color: var(--primary); }
.gen-stage.done   { opacity: 1; color: var(--success); }
.gen-stage-mark {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; flex-shrink: 0;
}
.gen-stage.done .gen-stage-mark { background: var(--success); border-color: var(--success); color: white; }
.gen-stage.done .gen-stage-mark::after { content: '✓'; }

/* ── Waiting screen (3DS) ── */
.wait-hero { display: flex; justify-content: center; padding: 8px 0 22px; }
.wait-orb { position: relative; width: 120px; height: 120px; }
.wait-orb-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, #4361ee 0%, #5b7cfa 100%);
  display: flex; align-items: center; justify-content: center; font-size: 50px;
  box-shadow: 0 14px 36px rgba(67,97,238,0.40);
  position: relative; z-index: 2; animation: orbBob 3s ease-in-out infinite;
}
@keyframes orbBob { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.03); } }
.wait-orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--primary); opacity: 0; }
.wait-orb-ring.r1 { animation: orbRing 2.2s ease-out infinite; }
.wait-orb-ring.r2 { animation: orbRing 2.2s ease-out infinite 0.73s; }
.wait-orb-ring.r3 { animation: orbRing 2.2s ease-out infinite 1.46s; }
@keyframes orbRing { 0% { transform: scale(0.85); opacity: 0.7; } 100% { transform: scale(1.7); opacity: 0; } }

.wait-status {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--primary-light); color: var(--primary);
  padding: 12px 18px; border-radius: 50px;
  font-size: 13px; font-weight: 800; margin-bottom: 18px;
}
.wait-status-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
  animation: dotBlink 1.2s ease-in-out infinite;
}
@keyframes dotBlink { 0%,100% { opacity: 0.3; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.15); } }
.wait-status.success { background: var(--success-light); color: var(--success); }
.wait-status.success .wait-status-dot { background: var(--success); animation: none; }

.wait-progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 18px; }
.wait-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), #5b7cfa);
  border-radius: 3px; width: 35%; transition: width 1s linear;
}
.wait-time-text { font-size: 12px; color: var(--muted); font-weight: 700; text-align: center; margin-top: 8px; }

/* ── Security badges ── */
.security-badges {
  display: flex; justify-content: center; gap: 14px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
}
.sec-badge { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.sec-badge-icon { font-size: 14px; color: var(--success); }

/* ── Context info ── */
.context-info {
  background: var(--primary-light); border-radius: 10px; padding: 10px 12px;
  margin-bottom: 14px; text-align: center; font-size: 12px; font-weight: 700; color: var(--primary);
}
.context-info b { font-weight: 900; }

/* ── Loader overlay ── */
.loading-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(255,255,255,0.95); z-index: 300;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 20px;
}
.loading-overlay.active { display: flex; }
.spinner {
  width: 56px; height: 56px;
  border: 5px solid var(--primary-light); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 15px; font-weight: 800; color: var(--text); }
.loading-sub  { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; max-width: 240px; }

/* ── Support FAB ── */
.support-fab {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 90; background: white; border: 2px solid var(--border);
  border-radius: 50px; padding: 9px 18px 9px 9px;
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10); font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 800; color: var(--text); transition: all 0.2s;
}
.support-fab:active { transform: translateX(-50%) scale(0.96); }
.support-fab-icon {
  width: 30px; height: 30px; background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 15px; position: relative;
}
.support-fab-icon::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--primary); animation: pulse 2s ease-out infinite; pointer-events: none;
}
@keyframes pulse { 0% { transform: scale(0.85); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }

/* ── Bottom sheet modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 250;
  align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s;
}
.modal-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: white; width: 100%; max-width: 440px;
  border-radius: 24px 24px 0 0; padding: 18px 24px 28px;
  animation: slideUp 0.3s cubic-bezier(0.34,1.1,0.64,1);
  max-height: 92vh; overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 16px; }
.modal-title { font-size: 19px; font-weight: 900; text-align: center; margin-bottom: 6px; }
.modal-sub   { font-size: 13px; color: var(--muted); font-weight: 600; text-align: center; margin-bottom: 18px; line-height: 1.5; }

.support-channel {
  display: flex; align-items: center; gap: 14px;
  padding: 13px; border-radius: 14px; background: var(--bg); margin-bottom: 8px;
  cursor: pointer; transition: all 0.2s; border: 2px solid transparent;
  text-decoration: none; color: inherit;
}
.support-channel:active { border-color: var(--primary); transform: scale(0.98); }
.support-channel-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; color: white;
}
.support-channel-info { flex: 1; min-width: 0; }
.support-channel-name { font-size: 14px; font-weight: 800; color: var(--text); }
.support-channel-desc { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.support-channel-arrow { color: var(--muted); font-size: 18px; font-weight: 900; }

/* ── Toast system ── */
.toast-container {
  position: fixed; bottom: 80px; left: 0; right: 0;
  display: flex; flex-direction: column-reverse; align-items: center;
  gap: 8px; z-index: 400; pointer-events: none;
  padding: 0 16px;
}
.toast-item {
  background: #1a1d2e; color: white;
  padding: 12px 22px; border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2); pointer-events: auto;
  transform: translateY(20px); opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.1,0.64,1), opacity 0.25s;
  white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
}
.toast-item.show { transform: translateY(0); opacity: 1; }
.toast-item.toast-success { background: var(--success); }
.toast-item.toast-error   { background: var(--danger); }
.toast-item.toast-warning { background: var(--warn); }
.toast-item.toast-info    { background: var(--primary); }

/* ── Fullscreen QR ── */
.fullscreen-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.85); z-index: 350;
  align-items: center; justify-content: center;
  padding: 20px; cursor: pointer;
}
.fullscreen-overlay.active { display: flex; }
.fullscreen-box {
  background: white; padding: 22px; border-radius: 22px;
  text-align: center;
  max-width: min(90vw, 380px);
  max-height: 90vh;
  box-sizing: border-box;
}
/* QR внутри оверлея сжимается под экран, сохраняя пропорции */
.fullscreen-box #qr-big { display: block; }
.fullscreen-box #qr-big img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(90vh - 90px);
  margin: 0 auto;
}
.fullscreen-box .hint { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 12px; }

/* ── Animations ── */
.slide-in { animation: slideIn 0.35s cubic-bezier(0.34,1.1,0.64,1); }
@keyframes slideIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 360px) {
  .card-body { padding: 18px; }
  .amount-fixed-value { font-size: 36px; }
  .bank-grid { gap: 6px; }
  .bank-name { font-size: 9px; }
}

/* ── Support channel icon colors ── */
.ch-tg   { background: var(--tg); }
.ch-wa   { background: #25d366; }
.ch-call { background: var(--primary); }
.ch-email { background: var(--warn); }

/* ── Support close button spacing ── */
#support-close-btn,
#qr-support-close-btn { margin-top: 14px; }

/* ── Card header inner div ── */
.card-header-inner { text-align: center; padding: 0 40px; }

/* ── Result / feedback message areas ── */
.result-msg { margin-top: 8px; text-align: center; font-size: 14px; min-height: 20px; }
.result-msg-pad { padding: 4px 0; }

/* ── Method & hero icon backgrounds ── */
.icon-qr    { background: linear-gradient(135deg, #4361ee, #5b7cfa); }
.icon-card  { background: linear-gradient(135deg, #1976d2, #42a5f5); }
.icon-c2c   { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.icon-phone { background: linear-gradient(135deg, #2ec177, #34d399); }
.icon-3ds   { background: linear-gradient(135deg, #1976d2, #42a5f5); }

/* ── Bank icon colors ── */
.bank-sber   { background: #21a038; }
.bank-tbank  { background: #ffdd2d; color: #000; }
.bank-vtb    { background: #1976d2; }
.bank-alfa   { background: #ef3124; }
.bank-gazprom { background: #0079c1; }
.bank-raif   { background: #fee600; color: #000; }
.bank-otkr   { background: #00b3e3; }
.bank-rshb   { background: #005e3c; }
.bank-sovc   { background: #0080c8; }
.bank-pochta { background: #1f4d8f; }
.bank-mkb    { background: #cd1f2f; }
.bank-other  { background: var(--muted); }

/* ── Amount fixed padding variants ── */
.amount-fixed.pad-sm { padding: 14px 18px; }
.amount-fixed.pad-md { padding: 16px 20px; }

/* ── Amount value size variants ── */
.amount-fixed-value.val-lg { font-size: 32px; }
.amount-fixed-value.val-md { font-size: 30px; }

/* ── Color utilities ── */
.v-primary { color: var(--primary); }
.v-success { color: var(--success); }
.v-muted   { color: var(--muted); }
.v-text    { color: var(--text); }

/* ── Receipt left-align ── */
.receipt-mini.text-left { text-align: left; }

/* ── Card subtitle centered variant ── */
.card-subtitle.centered { text-align: center; margin-bottom: 18px; }

/* ── Mono number ── */
.num-mono { font-family: 'Courier New', monospace; }

/* ── Ghost copy button (on dark background) ── */
.copy-btn-ghost { background: rgba(255,255,255,0.18); color: white; }

/* ── Copy row top margin ── */
.copy-row-top { margin-top: 10px; }

/* ── Reasons list primary color variant ── */
.reasons-list.primary            { background: var(--primary-light); border-radius: 14px; }
.reasons-list.primary li         { border-bottom-color: rgba(67,97,238,0.15); }
.reasons-list.primary .reasons-title { color: var(--primary); }
.reasons-list.primary .reason-dot    { background: var(--primary); }

/* ── Intro hero flush (no padding-top) ── */
.intro-hero.flush { padding-top: 0; }

/* ── Step number variants ── */
.intro-step-num.warn    { background: var(--warn); }
.intro-step-num.success { background: var(--success); }

/* ── Status screen tight ── */
.status-screen.tight { margin-bottom: 4px; }

/* ── 404 / info status ── */
.status-icon.info   { background: var(--primary-light); color: var(--primary); }
.status-amount.info { color: var(--primary); }

/* ── Button with extra top margin ── */
.btn-mt-sm { margin-top: 8px; }

/* ── Field error (hidden by default) ── */
.field-error { display: none; }

/* ── Bank / form result areas ── */
.bank-result  { text-align: center; font-size: 14px; min-height: 20px; padding: 4px 0; }
.form-result  { margin-top: 8px; text-align: center; font-size: 14px; min-height: 20px; }

.hidden { display: none; }