:root {
  --green-900: #0B3D2E;
  --green-800: #0B5C45;
  --green-700: #0E8B6A;
  --green-600: #12A578;
  --gold: #D4AF37;
  --cream: #F7F9F8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Vazirmatn', 'Vazirmatn UI', system-ui, sans-serif;
  background: #06231a;
}
.ltr-num { direction: ltr; unicode-bidi: embed; }

/* ---------- Phone frame ---------- */
.nb-app-bg {
  background:
    radial-gradient(circle at 20% 10%, rgba(18,165,120,.25), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(212,175,55,.15), transparent 45%),
    linear-gradient(160deg, #06231a 0%, #041610 100%);
}
.nb-phone {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  max-height: 860px;
  background: #000;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
@media (min-width: 640px) {
  .nb-phone { border-radius: 42px; border: 10px solid #0a0a0a; height: 860px; }
}
.nb-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 140px; height: 26px; background: #000; border-radius: 0 0 18px 18px; z-index: 60;
  display: none;
}
@media (min-width: 640px) { .nb-notch { display: block; } }
.nb-screen {
  position: relative; height: 100%; background: var(--cream); overflow: hidden;
}
.nb-screen-dark {
  background:
    radial-gradient(circle at 50% 15%, rgba(18,165,120,.35), transparent 55%),
    linear-gradient(165deg, #0B5C45 0%, #06231a 90%);
}

.nb-slide { animation: slideIn .38s cubic-bezier(.2,.8,.2,1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
.nb-fade { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Header ---------- */
.nb-header {
  background: linear-gradient(150deg, var(--green-700), var(--green-900));
  position: relative;
}
.nb-header::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 0%, rgba(212,175,55,.18), transparent 50%);
  pointer-events: none;
}

/* ---------- Logo ---------- */
.nb-logo { display: inline-block; filter: drop-shadow(0 6px 14px rgba(212,175,55,.3)); }
.nb-logo-anim svg { animation: logoIn 1s cubic-bezier(.2,.8,.2,1) both, logoFloat 4s ease-in-out infinite 1s; }
@keyframes logoIn { from { transform: rotate(-25deg) scale(.4); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes logoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.nb-logo-anim::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite; pointer-events: none;
}
@keyframes shimmer { 0% { transform: translateX(-120%); } 60%,100% { transform: translateX(120%); } }

/* ---------- Fingerprint ---------- */
.nb-fp {
  position: relative; width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 2px solid rgba(212,175,55,.4);
  color: rgba(255,255,255,.75); display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .3s; cursor: pointer;
}
.nb-fp:active { transform: scale(.94); }
.nb-fp-scan { color: var(--gold); background: rgba(18,165,120,.25); border-color: var(--gold); }
.nb-fp-svg { transition: color .4s; }
.nb-fp-scan .nb-fp-svg path { stroke-dasharray: 40; animation: fpScan 1.2s ease-in-out infinite; }
@keyframes fpScan { 0% { stroke-dashoffset: 40; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -40; } }
.nb-fp-ripple {
  position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--gold);
  animation: ripple 1.2s ease-out infinite;
}
@keyframes ripple { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- Balance card ---------- */
.nb-bal-card {
  background: linear-gradient(135deg, rgba(14,139,106,.92), rgba(11,61,46,.95));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(11,61,46,.35);
  position: relative; overflow: hidden;
}
.nb-bal-card::before {
  content: ''; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(212,175,55,.3), transparent 70%); border-radius: 50%;
}

/* ---------- Quick actions ---------- */
.nb-quick {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #e8eeeb; border-radius: 16px; padding: 12px 4px;
  color: #0B5C45; transition: transform .12s, box-shadow .2s;
}
.nb-quick:active { transform: scale(.93); }
.nb-quick-primary { background: linear-gradient(135deg, var(--green-600), var(--green-800)); color: #fff; border: none; box-shadow: 0 8px 18px rgba(14,139,106,.35); }

/* ---------- Transactions ---------- */
.nb-txn {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 16px; padding: 12px 14px; border: 1px solid #eef2f0;
}
.nb-txn-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.nb-out { background: #fee2e2; color: #dc2626; }
.nb-in { background: #d1fae5; color: #059669; }

/* ---------- Forms ---------- */
.nb-label { display: block; font-size: 12px; font-weight: 700; color: #0B5C45; margin-bottom: 6px; }
.nb-field-wrap { position: relative; }
.nb-input {
  width: 100%; background: #fff; border: 1.5px solid #dfe7e3; border-radius: 14px;
  padding: 14px; font-size: 15px; font-family: inherit; outline: none; transition: border .2s, box-shadow .2s;
}
.nb-input:focus { border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(18,165,120,.12); }
.nb-bank-chip {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
  background: #fff; border: 1px solid #e5eae7; border-radius: 999px; padding: 6px 12px;
  font-size: 12px; font-weight: 700; color: #0B5C45; width: fit-content;
}
.nb-chip {
  flex: 1; background: #eef4f1; border: 1px solid #dfe7e3; border-radius: 12px;
  padding: 8px; font-size: 12px; font-weight: 700; color: #0B5C45; transition: background .15s;
}
.nb-chip:active { background: #d7e6df; }
.nb-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; border-radius: 12px; padding: 12px; font-size: 13px; font-weight: 700; }

/* ---------- Buttons ---------- */
.nb-btn-primary {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff; font-weight: 800; font-size: 15px; padding: 15px; border-radius: 16px;
  box-shadow: 0 10px 24px rgba(14,139,106,.4); transition: transform .12s;
}
.nb-btn-primary:active { transform: scale(.97); }
.nb-btn-ghost {
  background: #fff; color: #0B5C45; font-weight: 700; font-size: 13px; padding: 13px;
  border-radius: 14px; border: 1.5px solid #dfe7e3; transition: transform .12s;
}
.nb-btn-ghost:active { transform: scale(.96); }

/* ---------- OTP ---------- */
.nb-summary { background: #fff; border: 1px solid #eef2f0; border-radius: 18px; padding: 16px; }
.nb-ring {
  width: 108px; height: 108px; border-radius: 50%;
  background: conic-gradient(var(--green-600) var(--pct), #e5eae7 0);
  display: flex; align-items: center; justify-content: center; transition: background 1s linear;
}
.nb-ring-inner {
  width: 84px; height: 84px; border-radius: 50%; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.nb-otp-sample { background: #fff; border: 1px dashed var(--green-600); border-radius: 12px; padding: 8px 14px; }
.nb-otp-box {
  width: 42px; height: 52px; border: 1.5px solid #dfe7e3; border-radius: 12px;
  text-align: center; font-size: 22px; font-weight: 900; color: #0B5C45; background: #fff; outline: none;
  transition: border .2s, box-shadow .2s;
}
.nb-otp-box:focus { border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(18,165,120,.12); }
.nb-pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* ---------- Processing overlay ---------- */
.nb-processing {
  position: absolute; inset: 0; z-index: 70;
  background: linear-gradient(160deg, rgba(11,92,69,.97), rgba(6,35,26,.98));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: fadeIn .3s ease;
}
.nb-spinner {
  width: 56px; height: 56px; border: 4px solid rgba(212,175,55,.25); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Receipt ---------- */
.nb-check {
  width: 96px; height: 96px; border-radius: 50%; background: #d1fae5;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 0 rgba(16,185,129,.5); animation: checkGlow 1.6s ease-in-out infinite;
}
@keyframes checkGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,.45); }
  50% { box-shadow: 0 0 0 16px rgba(16,185,129,0); }
}
.nb-check-circle { stroke: #10b981; stroke-width: 3; stroke-dasharray: 152; stroke-dashoffset: 152; animation: drawCircle .6s ease forwards; }
.nb-check-mark { stroke: #10b981; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: drawMark .4s .5s ease forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawMark { to { stroke-dashoffset: 0; } }
.nb-blink { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.nb-receipt {
  position: relative; background: #fff; border-radius: 20px; padding: 22px;
  border: 1px solid #eef2f0; box-shadow: 0 14px 34px rgba(11,61,46,.12); overflow: hidden;
}
.nb-watermark {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 46px; font-weight: 900; color: rgba(14,139,106,.06);
  transform: rotate(-22deg); pointer-events: none; white-space: nowrap; letter-spacing: 4px;
}

/* ---------- Toast ---------- */
.nb-toast {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 80;
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  border: 1px solid rgba(212,175,55,.4); border-radius: 16px; padding: 12px 14px;
  display: flex; gap: 12px; align-items: center; box-shadow: 0 12px 30px rgba(0,0,0,.35);
  animation: toastIn .4s cubic-bezier(.2,.9,.2,1);
}
@keyframes toastIn { from { transform: translateY(-120%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.nb-toast-icon { font-size: 20px; }

/* ---------- Reset + footer ---------- */
.nb-reset {
  position: absolute; bottom: 14px; left: 14px; z-index: 55;
  width: 34px; height: 34px; border-radius: 50%; background: rgba(11,61,46,.5); color: #fff;
  font-size: 18px; backdrop-filter: blur(4px);
}
.nb-footer-link {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); z-index: 55;
}
.nb-footer-link a { font-size: 10px; color: rgba(255,255,255,.35); text-decoration: none; }
.nb-footer-link a:hover { color: rgba(212,175,55,.7); }

::-webkit-scrollbar { width: 0; }