:root {
  --ink: #10282b;
  --muted: #678083;
  --line: #d9ecee;
  --primary: #0daeb8;
  --primary-deep: #087078;
  --primary-dark: #0b4f55;
  --soft: #effafb;
  --danger: #c83c48;
  --shadow: 0 28px 80px rgba(14, 72, 78, .18), 0 8px 30px rgba(17, 39, 43, .08);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 12%, rgba(23, 192, 201, .17), transparent 28rem),
    radial-gradient(circle at 8% 90%, rgba(4, 90, 98, .10), transparent 30rem),
    linear-gradient(145deg, #f8fcfc 0%, #eef8f9 60%, #f9fcfc 100%);
  overflow-x: hidden;
}
button, input { font: inherit; }
.ambient { position: fixed; border-radius: 50%; filter: blur(10px); pointer-events: none; opacity: .5; }
.ambient-one { width: 310px; height: 310px; background: rgba(31, 197, 205, .13); top: -130px; right: -90px; }
.ambient-two { width: 420px; height: 420px; background: rgba(16, 109, 117, .08); bottom: -220px; left: -170px; }
.shell { min-height: 100vh; display: grid; place-items: center; padding: 38px 18px; position: relative; z-index: 1; }
.payment-card {
  width: min(100%, 620px);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(197, 226, 229, .9);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 30px;
  backdrop-filter: blur(18px);
}
.brand-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; margin-bottom: 24px; }
.brand-mark { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, var(--primary), var(--primary-deep)); box-shadow: 0 10px 24px rgba(13, 174, 184, .25); }
.brand-mark svg { width: 35px; height: 35px; fill: rgba(255,255,255,.18); stroke: #fff; stroke-width: 2.3; stroke-linejoin: round; }
.brand-mark .mark-line { fill: none; stroke-linecap: round; }
.brand-row h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.brand-row p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.secure-pill { font-size: 11px; color: var(--primary-deep); background: var(--soft); border: 1px solid #ccebed; padding: 8px 10px; border-radius: 999px; white-space: nowrap; }
.secure-pill i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #21b56b; margin-left: 5px; box-shadow: 0 0 0 4px rgba(33,181,107,.10); }
.recipient-box { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: linear-gradient(120deg, #f0fbfb, #f8fdfd); border: 1px solid #d8eff0; border-radius: 18px; margin-bottom: 24px; }
.recipient-box span { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.recipient-box strong { font-size: 15px; font-weight: 750; }
.recipient-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--primary-deep); font-size: 19px; }
.field { margin-bottom: 19px; }
.field label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.unit { color: var(--muted); font-weight: 400; }
.field small { display: block; margin-top: 7px; color: #799093; font-size: 11px; }
.input-wrap, .money-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input, .money-wrap input, .captcha-grid input {
  width: 100%; height: 54px; border: 1px solid #cfe5e7; border-radius: 15px; background: #fbfefe; color: var(--ink); outline: none; transition: .18s ease; padding: 0 16px; font-size: 14px;
}
.input-wrap input { padding-right: 45px; }
.input-wrap input:focus, .money-wrap input:focus, .captcha-grid input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(13,174,184,.10); }
.input-icon { position: absolute; right: 16px; color: var(--primary); font-size: 18px; z-index: 2; }
.money-wrap input { direction: ltr; text-align: right; padding-left: 85px; font-size: 18px; font-weight: 700; }
.money-wrap > span { position: absolute; left: 15px; color: var(--primary-deep); font-size: 12px; background: #eaf8f9; padding: 6px 9px; border-radius: 9px; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.link-btn { border: 0; background: transparent; color: var(--primary-deep); cursor: pointer; font-size: 11.5px; padding: 4px; }
.link-btn:disabled { opacity: .45; cursor: wait; }
.captcha-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; direction: ltr; align-items: stretch; }
.captcha-grid > * { min-width: 0; width: 100%; }
.captcha-image-wrap { height: 54px; border: 1px solid #cfe5e7; border-radius: 15px; background: #fcffff; overflow: hidden; display: grid; place-items: center; position: relative; padding: 4px 10px; }
.captcha-image-wrap img { display: block; width: auto; max-width: 100%; height: 100%; object-fit: contain; margin: 0 auto; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; }
.captcha-skeleton { width: 100%; height: 100%; background: linear-gradient(90deg,#edf7f8 25%,#fff 45%,#edf7f8 65%); background-size: 220% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
#captchaValue {
  direction: ltr;
  text-align: center;
  letter-spacing: 1px;
  font-size: 17px;
  font-weight: 750;
  line-height: 1;
  padding: 0 10px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-variant-numeric: normal;
}
#captchaTimer.danger { color: var(--danger); }
.error-box { margin: 0 0 13px; background: #fff3f4; border: 1px solid #f2cbd0; color: #a52f3a; padding: 11px 13px; border-radius: 13px; font-size: 12px; line-height: 1.9; }
.pay-btn { width: 100%; height: 58px; border: 0; border-radius: 17px; color: #fff; background: linear-gradient(110deg, var(--primary-dark), var(--primary)); box-shadow: 0 13px 30px rgba(8,112,120,.22); cursor: pointer; font-weight: 750; display: flex; align-items: center; justify-content: center; gap: 11px; transition: transform .18s ease, box-shadow .18s ease; }
.pay-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(8,112,120,.28); }
.pay-btn:disabled { cursor: wait; opacity: .78; transform: none; }
.pay-btn .arrow { font-size: 19px; }
.vat-note { text-align: center; margin-top: 9px; color: #6f888b; font-size: 11.5px; font-weight: 600; }
.spinner { display: none; width: 19px; height: 19px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.pay-btn.loading .spinner { display: inline-block; }
.pay-btn.loading .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
footer { display: flex; align-items: center; justify-content: center; gap: 7px; color: #8aa0a2; font-size: 10px; margin-top: 15px; }
.dot { color: #bdd0d2; }
.confirm-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(9, 32, 35, .55); backdrop-filter: blur(7px); display: grid; place-items: center; padding: 18px; }
.confirm-overlay[hidden] { display: none; }
.confirm-card { width: min(100%, 440px); background: #fff; border-radius: 25px; padding: 26px; box-shadow: 0 30px 90px rgba(0,0,0,.22); animation: pop .2s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: .4; } }
.confirm-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: #e9f9f2; color: #168857; font-size: 24px; margin-bottom: 13px; }
.confirm-card h2 { margin: 0; font-size: 18px; }
.confirm-card > p { margin: 6px 0 18px; color: var(--muted); font-size: 12px; }
dl { margin: 0 0 20px; border: 1px solid #e2eff0; border-radius: 16px; overflow: hidden; }
dl div { display: grid; grid-template-columns: 90px 1fr; padding: 12px 14px; border-bottom: 1px solid #edf4f4; gap: 10px; }
dl div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-size: 11px; }
dd { margin: 0; font-size: 12px; font-weight: 700; text-align: left; direction: rtl; overflow-wrap: anywhere; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; }
.primary-btn, .secondary-btn { height: 48px; border-radius: 13px; border: 0; cursor: pointer; font-weight: 700; font-size: 12px; }
.primary-btn { background: var(--primary); color: #fff; }
.secondary-btn { background: #edf4f4; color: #35575a; }
.modal-open { overflow: hidden; }
@media (max-width: 620px) {
  .shell { padding: 14px; align-items: start; }
  .payment-card { border-radius: 24px; padding: 20px 17px; margin-top: 8px; }
  .brand-row { grid-template-columns: 50px 1fr; }
  .brand-mark { width: 50px; height: 50px; border-radius: 15px; }
  .brand-row h1 { font-size: 18px; }
  .secure-pill { grid-column: 1 / -1; justify-self: start; margin-top: 1px; }
  .captcha-grid { grid-template-columns: 1fr; }
  .captcha-image-wrap {
    height: 48px;
    max-width: 100%;
    width: 100%;
    margin-inline: auto;
    padding: 3px 8px;
  }
  .captcha-image-wrap img {
    width: 90%;
    max-width: 90%;
    height: auto;
    max-height: 34px;
    object-fit: contain;
  }
  .confirm-actions { grid-template-columns: 1fr; }
  footer { flex-wrap: wrap; }
}


.captcha-grid input {
  height: 54px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  direction: ltr;
}


/* V6 security / owner / amount limit */
.owner-line { margin-top: 4px !important; color: var(--primary-deep) !important; font-size: 11.5px !important; }
.owner-line strong { font-weight: 800; color: var(--ink); }
.inline-limit {
  margin-top: 8px;
  padding: 9px 11px;
  border: 1px solid #f0c6cb;
  border-radius: 11px;
  background: #fff5f6;
  color: #b1323d;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.8;
}
.money-wrap input[aria-invalid="true"] { border-color: #d95662; box-shadow: 0 0 0 4px rgba(217,86,98,.08); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
