@font-face {
  font-family: "IRYekan";
  src: url("./fonts/IRANYekanXFaNum-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRYekan";
  src: url("./fonts/IRANYekanXFaNum-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Volant";
  src: url("./fonts/Volant_Medium-s.p.a40e4044.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Volant";
  src: url("./fonts/Volant_Semibold-s.p.6b5b2246.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Volant";
  src: url("./fonts/Volant_Bold-s.p.26b74273.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ui-font: "IRYekan", "Tahoma", sans-serif;
  --bg: #0A143F;
  --text: #ffffff;
  --muted: rgba(142, 219, 255, 0.78);
  --accent: #3FD0FF;
  --accent-strong: #0B4DB8;
  --cta-text: #FFFFFF;
  --card: rgba(11, 77, 184, 0.18);
  --card-border: rgba(142, 219, 255, 0.2);
  --shadow: 0 16px 30px rgba(10, 31, 143, 0.28);
  --ui-quick: 160ms;
  --ui-ease: ease;
  --page-pad-top: calc(12px + env(safe-area-inset-top));
}

* {
  box-sizing: border-box;
}

/* Ensure all form controls and buttons inherit the UI font */
button,
input,
select,
textarea {
  font-family: inherit;
}

html {
  min-height: 100%;
  background: linear-gradient(135deg,
      #030510 0%,
      #060B1F 40%,
      #08122E 70%,
      #0A143F 100%);
  background-size: 200% 200%;
  animation: calm-gradient-shift 20s ease-in-out infinite;
}

html.is-android {
  --page-pad-top: calc(42px + env(safe-area-inset-top));
}

/* -------------------------------------------------------------------------- */
/* Shared Sparkle Loader (Gate / Loading Screens)                              */
/* -------------------------------------------------------------------------- */

.sparkle-loader-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
  background:
    radial-gradient(circle at 30% 15%,
      rgba(63, 208, 255, 0.18) 0%,
      rgba(10, 20, 63, 0.0) 52%),
    radial-gradient(circle at 80% 85%,
      rgba(11, 77, 184, 0.22) 0%,
      rgba(10, 20, 63, 0.0) 60%),
    linear-gradient(180deg, rgba(8, 12, 30, 0.96), rgba(8, 12, 30, 0.92));
  transition: opacity 320ms ease, transform 320ms ease;
  opacity: 1;
}

.sparkle-loader-screen.is-hidden {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.sparkle-loader-anchor {
  position: absolute;
  top: 38.2%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sparkle-logo-sparkle-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.35));
}

.sparkle-logo-sparkle-wrap img {
  position: relative;
  z-index: 5;
  width: 140px;
  height: 140px;
}

.sparkle-logo-sparkle {
  position: absolute;
  z-index: 6;
  width: 18px;
  height: 18px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  --delay-step: 0.12;
  animation: sparkle-loader-sparkle 0.75s calc((var(--delay-step) * var(--d)) * 1s) infinite both;
  top: calc(var(--y, 50) * 1%);
  left: calc(var(--x, 50) * 1%);
}

.sparkle-logo-sparkle path {
  fill: rgba(255, 255, 255, 0.75);
}

.sparkle-logo-sparkle:nth-of-type(1) { --x: 8;  --y: 18; --s: 1.1;  --d: 1; }
.sparkle-logo-sparkle:nth-of-type(2) { --x: 18; --y: 78; --s: 1.25; --d: 2; }
.sparkle-logo-sparkle:nth-of-type(3) { --x: 48; --y: 34; --s: 1.1;  --d: 3; }
.sparkle-logo-sparkle:nth-of-type(4) { --x: 76; --y: 62; --s: 0.9;  --d: 2; }
.sparkle-logo-sparkle:nth-of-type(5) { --x: 92; --y: 24; --s: 0.8;  --d: 4; }

@keyframes sparkle-loader-sparkle {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  50%  { transform: translate(-50%, -50%) scale(var(--s, 1)); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle-logo-sparkle {
    animation: none !important;
    opacity: 0;
  }
}

@keyframes calm-gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html {
    animation: none;
    background: linear-gradient(135deg,
        #030510 0%,
        #060B1F 40%,
        #08122E 70%,
        #0A143F 100%);
    background-size: 100% 100%;
  }

  .layout,
  .layout * {
    transition: none !important;
    transition-behavior: normal !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ui-font);
  color: var(--text);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--page-pad-top) 16px calc(110px + env(safe-area-inset-bottom));
}

body[data-page="new-deposit.html"],
body[data-page="new-withdraw.html"] {
  padding: var(--page-pad-top) 16px calc(40px + env(safe-area-inset-bottom));
}

body[data-page="index.html"] {
  padding: var(--page-pad-top) 16px calc(22px + env(safe-area-inset-bottom));
}

.layout {
  width: min(540px, 100%);
  padding-top: 0;
  display: grid;
  gap: 12px;
  transition: transform 0.2s ease;
  will-change: transform;
  position: relative;
  padding-bottom: 110px;
}

.layout,
.layout * {
  transition-property: opacity, transform, background-color, border-color, box-shadow, filter;
  transition-duration: var(--ui-quick);
  transition-timing-function: var(--ui-ease);
  transition-behavior: allow-discrete;
}

.hidden {
  display: none !important;
  opacity: 0 !important;
  transform: translateY(2px) !important;
}

.is-hidden {
  display: none !important;
  opacity: 0 !important;
  transform: translateY(2px) !important;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-pill {
  background: rgba(63, 208, 255, 0.14);
  border: 1px solid rgba(63, 208, 255, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
    font-weight: 400;
    font-size: 0.82rem;
  color: var(--text);
  min-width: 84px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(10, 31, 143, 0.24);
}

.title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Unified Page Header */
.unified-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
  padding: 12px 0 0 0;
  flex-direction: row-reverse; /* RTL: reverses visual order - back button (first in DOM) on left, title (last in DOM) on right */
}

.unified-page-header .back-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: rgba(63, 208, 255, 0.1);
  border: 1px solid rgba(63, 208, 255, 0.2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.unified-page-header .back-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 8px; /* RTL: arrow on right side of button */
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 6px 5px 0; /* Right-pointing arrow for RTL */
  border-color: transparent currentColor transparent transparent;
  transition: transform 0.2s ease;
}

.unified-page-header .back-button:hover {
  background: rgba(63, 208, 255, 0.15);
  border-color: rgba(63, 208, 255, 0.3);
}

.unified-page-header .back-button:active {
  transform: translateX(-2px);
}

.unified-page-header .back-button:active::before {
  transform: translateY(-50%) translateX(-2px);
}

.unified-page-header .back-button-text {
  margin-left: 18px; /* RTL: text margin on left */
}

.unified-page-header .page-title {
  flex: 1;
  text-align: right; /* RTL: title aligned right */
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.unified-page-header .page-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-align: right;
  padding-right: 6px;
}

/* Wallet Page Toggle Navigation */
.wallet-toggle-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 14px;
  border: 1px solid rgba(142, 219, 255, 0.22);
  background: rgba(6, 12, 32, 0.45);
  overflow: hidden;

}

.wallet-toggle-nav a {
  display: block;
  padding: 12px 16px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  cursor: pointer;
}

.wallet-toggle-nav a:hover {
  background: rgba(63, 208, 255, 0.1);
}

.wallet-toggle-nav a.is-active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(63, 208, 255, 0.32) 0%, rgba(11, 77, 184, 0.35) 100%);
  box-shadow: inset 0 0 0 1px rgba(63, 208, 255, 0.25);
}

.error-banner {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.4);
  border-radius: 12px;
  padding: 12px;
  color: #dc3545;
  font-size: 0.88rem;
  display: none;
}

.menu-btn {
  border: 1px solid rgba(63, 208, 255, 0.3);
  background: rgba(63, 208, 255, 0.12);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(10, 31, 143, 0.22);
}

.progress-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 0px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0px;
}

.action-btn {
  background: rgba(11, 77, 184, 0.2);
  border: 1px solid rgba(142, 219, 255, 0.22);
  border-radius: 14px;
  padding: 12px 8px;
  display: grid;
  gap: 8px;
  justify-items: center;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.action-btn:active {
  transform: translateY(1px);
}

.field {
  display: grid;
  gap: 6px;
}

.input-box {
  width: 100%;
  border: 1px solid rgba(142, 219, 255, 0.35);
  background: #fff;
  color: #000;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-box:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(63, 208, 255, 0.24);
}

.submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg,
      rgba(63, 208, 255, 0.95) 0%,
      rgba(63, 208, 255, 0.85) 70%,
      rgba(11, 77, 184, 0.8) 120%);
  color: var(--cta-text);
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(11, 77, 184, 0.3);
}

.submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 10px 20px rgba(11, 77, 184, 0.28);
}

.submit-btn[disabled],
.submit-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.upload-btn {
  justify-self: start;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(63, 208, 255, 0.35);
  background: rgba(63, 208, 255, 0.95);
  color: var(--text);
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(10, 31, 143, 0.26);
}

.upload-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.deposit-panel {
  background: rgba(11, 77, 184, 0.2);
  border: 1px solid rgba(142, 219, 255, 0.3);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}

.deposit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deposit-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.deposit-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background-color: rgba(63, 208, 255, 0.12);
  background-image: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.18) 42%,
      rgba(255, 255, 255, 0.08) 58%,
      rgba(255, 255, 255, 0) 75%);
  background-size: 240% 100%;
  background-position: 120% 0;
  background-repeat: no-repeat;
  border: 1px solid rgba(63, 208, 255, 0.28);
  font-size: 0.82rem;
  animation: sweep-light 2s linear infinite;
  will-change: background-position;
}

.deposit-timer strong {
  font-size: 0.95rem;
}

.deposit-status {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(142, 219, 255, 0.25);
  background: rgba(11, 77, 184, 0.16);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.deposit-status.is-error {
  color: #ffb3b3;
  border-color: rgba(255, 155, 155, 0.45);
}

.deposit-status.is-success {
  color: #9ce9c8;
  border-color: rgba(156, 233, 200, 0.4);
}

.deposit-request {
  display: grid;
  gap: 10px;
}

.deposit-body {
  display: grid;
  gap: 12px;
}

.deposit-meta {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(142, 219, 255, 0.22);
  background: rgba(6, 12, 32, 0.5);
  font-size: 0.88rem;
}

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

.meta-label {
  color: var(--muted);
}

.meta-value {
  font-weight: 700;
}

.deposit-bank-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(7, 16, 40, 0.92), rgba(12, 32, 80, 0.9));
  border: 1px solid rgba(142, 219, 255, 0.26);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  box-shadow: 0 18px 32px rgba(4, 10, 28, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.deposit-bank-card strong {
  font-weight: 700;
}

.deposit-bank-card::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 65%);
  opacity: 0.5;
  pointer-events: none;
}

.deposit-bank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 55%);
  pointer-events: none;
}

.deposit-bank-card>* {
  position: relative;
  z-index: 1;
}

.deposit-upload {
  display: grid;
  gap: 10px;
}

.upload-label {
  font-size: 0.88rem;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.upload-placeholder {
  border: 1px dashed rgba(142, 219, 255, 0.4);
  border-radius: 12px;
  min-height: 76px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 6px;
}

.receipt-thumb {
  position: relative;
  border: 1px solid rgba(142, 219, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: rgba(6, 12, 32, 0.4);
}

.receipt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.remove-receipt {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-label {
  color: var(--muted);
}

.summary-main {
  font-size: 1.05rem;
  font-weight: 700;
}

.summary-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-awaiting {
  color: #bde7ff;
  background: rgba(63, 208, 255, 0.18);
  border-color: rgba(63, 208, 255, 0.35);
}

.status-submitted {
  color: #ffd28a;
  background: rgba(255, 170, 64, 0.18);
  border-color: rgba(255, 170, 64, 0.35);
}

.status-confirmed {
  color: #9ce9c8;
  background: rgba(80, 200, 150, 0.18);
  border-color: rgba(80, 200, 150, 0.35);
}

.status-rejected {
  color: #ffb3b3;
  background: rgba(255, 120, 120, 0.18);
  border-color: rgba(255, 120, 120, 0.35);
}

.status-expired {
  color: #c4c9d4;
  background: rgba(120, 130, 150, 0.18);
  border-color: rgba(120, 130, 150, 0.35);
}

.status-cancelled {
  color: #cfd6e6;
  background: rgba(140, 150, 175, 0.2);
  border-color: rgba(140, 150, 175, 0.35);
}

.tx-system-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(192, 192, 192, 0.2);
  border: 1px solid rgba(192, 192, 192, 0.35);
  color: rgba(220, 220, 240, 0.95);
  z-index: 1;
}

.deposit-row.is-awaiting-receipt {
  background-color: rgba(6, 12, 32, 0.6);
  background-image: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.12) 42%,
      rgba(255, 255, 255, 0.05) 58%,
      rgba(255, 255, 255, 0) 75%);
  background-size: 260% 100%;
  background-position: 120% 0;
  background-repeat: no-repeat;
  animation: sweep-light 2s linear infinite;
  will-change: background-position;
}

.details-panel {
  width: min(520px, 100%);
  background: rgba(11, 77, 184, 0.22);
  border: 1px solid rgba(142, 219, 255, 0.3);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}

.bottom-nav {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  margin: 0 auto;
  max-width: 520px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  padding: 0px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.bottom-nav.no-back {
  /* Back button removed globally; keep class for legacy markup. */
}

@keyframes navActivePulse {
  0% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.10),
      0 0 0 rgba(255, 255, 255, 0.0);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 10px rgba(255, 255, 255, 0.08);
  }
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.10),
      0 0 0 rgba(255, 255, 255, 0.0);
  }
}


.nav-item {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: rgba(255, 255, 255, 1);
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.nav-item:active {
  transform: scale(0.98);
}

.nav-item.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  animation: navActivePulse 2.4s ease-in-out infinite;

}

/* Home (center) emphasis for 5-item layout */
.nav-item.is-home-old {
  width: 54px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transform: translateY(0px);
}

.nav-item.is-home-old:active {
  
}


.nav-ic {
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.nav-ic svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Unread indicator on notifications icon */
.nav-unread-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(6, 12, 32, 0.95);
  z-index: 10;
  pointer-events: none;
}

.nav-unread-indicator.is-hidden {
  display: none;
}

/* Priority-based colors matching notifications.html */
.nav-unread-indicator[data-priority="CRITICAL"] {
  background: rgba(255, 107, 107, 0.9);
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.6), 0 0 12px rgba(255, 107, 107, 0.4);
}

.nav-unread-indicator[data-priority="HIGH"] {
  background: rgba(255, 193, 7, 0.9);
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.6), 0 0 12px rgba(255, 193, 7, 0.4);
}

.nav-unread-indicator[data-priority="MEDIUM"] {
  background: rgba(63, 208, 255, 0.9);
  box-shadow: 0 0 8px rgba(63, 208, 255, 0.6), 0 0 12px rgba(63, 208, 255, 0.4);
}

.nav-unread-indicator[data-priority="LOW"] {
  background: rgba(142, 219, 255, 0.7);
  box-shadow: 0 0 8px rgba(142, 219, 255, 0.5), 0 0 12px rgba(142, 219, 255, 0.3);
}

/* Heartbeat animation: two quick pulses + rest (lub-dub) */
@keyframes heartbeat-critical {
  0%, 100% { transform: scale(1); opacity: 1; }
  10% { transform: scale(1.3); opacity: 0.9; }
  20% { transform: scale(1); opacity: 1; }
  30% { transform: scale(1.3); opacity: 0.9; }
  40% { transform: scale(1); opacity: 1; }
}

@keyframes heartbeat-high {
  0%, 100% { transform: scale(1); opacity: 1; }
  12% { transform: scale(1.3); opacity: 0.9; }
  24% { transform: scale(1); opacity: 1; }
  36% { transform: scale(1.3); opacity: 0.9; }
  48% { transform: scale(1); opacity: 1; }
}

@keyframes heartbeat-medium {
  0%, 100% { transform: scale(1); opacity: 1; }
  15% { transform: scale(1.3); opacity: 0.9; }
  30% { transform: scale(1); opacity: 1; }
  45% { transform: scale(1.3); opacity: 0.9; }
  60% { transform: scale(1); opacity: 1; }
}

@keyframes heartbeat-low {
  0%, 100% { transform: scale(1); opacity: 1; }
  18% { transform: scale(1.3); opacity: 0.9; }
  36% { transform: scale(1); opacity: 1; }
  54% { transform: scale(1.3); opacity: 0.9; }
  72% { transform: scale(1); opacity: 1; }
}

/* Apply heartbeat animation based on priority */
.nav-unread-indicator[data-priority="CRITICAL"] {
  animation: heartbeat-critical 1s ease-in-out infinite;
}

.nav-unread-indicator[data-priority="HIGH"] {
  animation: heartbeat-high 1.2s ease-in-out infinite;
}

.nav-unread-indicator[data-priority="MEDIUM"] {
  animation: heartbeat-medium 1.5s ease-in-out infinite;
}

.nav-unread-indicator[data-priority="LOW"] {
  animation: heartbeat-low 1.8s ease-in-out infinite;
}

/* Halo/ping effect via pseudo-element */
.nav-unread-indicator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.nav-unread-indicator[data-priority="CRITICAL"]::before {
  background: rgba(255, 107, 107, 0.4);
  animation: ping-critical 1s ease-out infinite;
}

.nav-unread-indicator[data-priority="HIGH"]::before {
  background: rgba(255, 193, 7, 0.4);
  animation: ping-high 1.2s ease-out infinite;
}

.nav-unread-indicator[data-priority="MEDIUM"]::before {
  background: rgba(63, 208, 255, 0.4);
  animation: ping-medium 1.5s ease-out infinite;
}

.nav-unread-indicator[data-priority="LOW"]::before {
  background: rgba(142, 219, 255, 0.3);
  animation: ping-low 1.8s ease-out infinite;
}

@keyframes ping-critical {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

@keyframes ping-high {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

@keyframes ping-medium {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

@keyframes ping-low {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* Disable animation for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nav-unread-indicator,
  .nav-unread-indicator::before {
    animation: none !important;
  }
}

.nav-dot {
  display: none;
}

.bottom-nav-back {
  display: none;
}

.gate {
  width: min(520px, 100%);
  background: rgba(11, 77, 184, 0.18);
  border: 1px solid rgba(142, 219, 255, 0.28);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.gate-link {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--cta-text);
  text-decoration: none;
  font-weight: 700;
}

.consent-group {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(142, 219, 255, 0.18);
  background: rgba(6, 12, 32, 0.45);
}

.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1 rem;
  color: var(--muted);
}

.consent-item input {
  margin-top: 2px;
}

.consent-warning {
  font-size: 0.78rem;
  color: #ffb3b3;
}

@keyframes sweep-light {
  from {
    background-position: 120% 0;
  }

  to {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .deposit-timer,
  .deposit-row.is-awaiting-receipt {
    animation: none;
  }
}

@media (max-width: 420px) {
  .upload-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* BUY Ad profit slider (p2p-buy-ad-edit.html) */
#profit-slider {
  --profit-track: linear-gradient(to left,
      #2ecc71 0%,
      #00c2a8 22%,
      #f1c40f 52%,
      #f39c12 68%,
      #e74c3c 86%,
      #8b0000 100%);
  --profit-color: #00c2a8;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  border-radius: 999px;
}

#profit-slider:focus {
  outline: none;
}

#profit-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: var(--profit-track);
}

#profit-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--profit-color);
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  margin-top: -4px;
}

#profit-slider::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: var(--profit-track);
  border: none;
}

#profit-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--profit-color);
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.amount-words.amount-preview {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(6, 16, 36, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 22px rgba(3, 8, 18, 0.18);
  display: grid;
  gap: 10px;
  color: rgba(230, 242, 255, 0.92);
}

/* Bank Card Panel (trade details) */
.bank-card-panel {
  display: block;
  background: linear-gradient(
  135deg,
  rgba(55, 60, 70, 0.95) 0%,
  rgba(38, 42, 50, 0.95) 45%,
  rgba(24, 27, 33, 0.95) 100%
  ) !important;

  border: 1px solid rgba(200, 210, 220, 0.22) !important;
  box-shadow:
  inset 0 1px 0 rgba(255, 255, 255, 0.08),
  inset 0 -1px 0 rgba(0, 0, 0, 0.55),
  0 8px 22px rgba(0, 0, 0, 0.45) !important;

  backdrop-filter: blur(4px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(4px) saturate(115%) !important;

  border-radius: 14px;
  padding: 14px;
  margin-top: 0px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bank-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(142, 219, 255, 0.15);
}

.bank-card-lock-icon {
  width: 14px;
  height: 14px;
  color: rgba(142, 219, 255, 0.7);
  flex-shrink: 0;
}

.bank-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.bank-card-body {
  display: grid;
  gap: 6px;
}

.bank-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
  min-height: 20px;
}

.bank-card-row-copyable {
  margin-top: 2px;
  margin-bottom: 0px;
}

.bank-card-label {
  color: var(--muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.bank-card-value {
  font-weight: 400;
  color: var(--text);
  text-align: left;
  direction: rtl;
}

.bank-card-copy-field {
  width: 100%;
  height: 38px;
  top: -4px;
}

/* Base copyable field styles (reusable across pages) */
.detail-copy-field {
  position: relative;
  width: 100%;
  height: 40px;
  margin-top: 4px;
  margin-bottom: 0px;
}

.detail-copy-textarea {
  width: 100%;
  resize: none;
  border-radius: 12px;
  border: 1px solid rgba(142, 219, 255, 0.25);
  background: rgba(6, 12, 32, 0.5);
  padding: 2px 18px 0 18px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  direction: ltr;
  text-align: left;
  line-height: 38px;
  height: 42px;
  letter-spacing: 6px;
}

.detail-copy-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  overflow: hidden;
}

.detail-copy-btn.is-copied {
  background: rgba(0, 200, 120, 0.12);
  border-color: rgba(0, 200, 120, 0.14);
  color: #bff2d4;
}

/* Lightning burst gradient overlay animation */
.detail-copy-btn.is-copied::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 40%,
    rgba(142, 219, 255, 0.6) 45%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(142, 219, 255, 0.6) 55%,
    rgba(255, 255, 255, 0.4) 60%,
    transparent 70%,
    transparent 100%
  );
  background-size: 200% 100%;
  background-position: -200% 0;
  pointer-events: none;
  z-index: 1;
  animation: lightning-sweep 0.5s ease-out;
}

@keyframes lightning-sweep {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .detail-copy-btn.is-copied::before {
    animation: none;
    background: rgba(142, 219, 255, 0.2);
  }
}

/* Ensure icon stays above overlay */
.detail-copy-btn span {
  z-index: 2;
      line-height: 26px;
    height: 26px;
    display: block;
    font-family: tahoma;
    width: 26px;
}

.bank-card-copy-field .detail-copy-textarea {
  height: 41px;
      line-height: 38px;
    padding: 2px 16px 0 16px;
    
    font-size: 1rem;
  white-space: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  letter-spacing: 2px;
  width: 100%;
  max-width: 100%;
}

.bank-card-copy-field .detail-copy-textarea#bank-iban-copy{
font-size: 0.8rem;
    letter-spacing: 2px !important;
}}


/* Banking monospace font for numeric fields */
.banking-mono {
  font-family: "Courier New", "Courier", "Monaco", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 1px;
}

/* Buyer instruction callouts (background-less, center-aligned) */
.buyer-instruction {
  text-align: center;
  padding: 0px 20px;
  margin: 0px 0;
  animation: fadeInSlide 0.4s ease-out;
  margin-bottom: -16px;


}


.buyer-instruction.hidden {
  display: none;
}

.buyer-instruction-content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(142, 219, 255, 0.95);
  position: relative;
  padding-bottom: 6px;
}

/* Gradient text effect (with fallback) */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .buyer-instruction-content {
    background: linear-gradient(135deg, rgba(142, 219, 255, 0.95) 0%, rgba(63, 208, 255, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
  }
}

.buyer-instruction-content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(63, 208, 255, 0.6) 20%, rgba(142, 219, 255, 0.8) 50%, rgba(63, 208, 255, 0.6) 80%, transparent 100%);
  border-radius: 1px;
  box-shadow: 0 2px 8px rgba(63, 208, 255, 0.3);
}

.buyer-instruction-icon {
  flex-shrink: 0;
  color: rgba(142, 219, 255, 0.9);
  filter: drop-shadow(0 2px 4px rgba(63, 208, 255, 0.4));
}

.buyer-instruction-text {
  line-height: 1.5;
  letter-spacing: 0.2px;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.amount-words.amount-preview.is-error {
  background: rgba(70, 14, 26, 0.35);
  border-color: rgba(255, 138, 138, 0.35);
  color: rgba(255, 214, 214, 0.95);
}

.amount-preview-box {
  display: grid;
  gap: 10px;
}

.amount-preview-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  direction: ltr;
  text-align: left;
  color: #9be4b4;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.amount-preview-rial {
  font-size: 1.55rem;
  font-weight: 700;
}

.amount-preview-baisa {
  font-size: 0.92rem;
  opacity: 0.7;
}

.amount-preview-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(210, 225, 245, 0.7);
}

.amount-preview-divider::before,
.amount-preview-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
}

.amount-preview-words {
  font-size: 0.92rem;
  line-height: 1.7;
  font-weight: 400;
}

/* Monospace utility class for identifiers, account numbers, etc. */
.monospace {
  font-family: monospace;
  letter-spacing: 1px;
  direction: ltr;
}

.amount-preview-error {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 400;
}

.amount-error-icon {
  font-size: 0.9rem;
  color: #ff8a8a;
}

/* OMR amount formatting: integer normal, decimal smaller */
.omr-amount {
  display: inline-block;
}

.omr-amount-integer {
  font-size: inherit;
}

.omr-amount-decimal {
  font-size: 0.70em;
  opacity: 0.85;
  position: relative;
  bottom: -1.38px;
  margin-inline-start: 2px;
  letter-spacing: 1px;
}
