:root {
  --green: #186b54;
  --green-dark: #0c3d31;
  --green-soft: #e7f4ef;
  --gold: #b08d45;
  --gold-bright: #c9a24a;
  --cream: #f5f4f0;
  --white: #ffffff;
  --ink: #1a1f1c;
  --muted: #5c6560;
  --line: #e8e7e2;
  --danger: #e74c3c;
  --blue: #1e88e5;
  --teal: #16a085;
  --card-radius: 20px;
  --shell-max: 768px;
  --nav-h: 72px;
  --header-h: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: #dcd9d0;
  color: var(--ink);
  font-family: IRANSans, Tahoma, sans-serif;
  font-feature-settings: "ss01" on;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.nums {
  font-variant-numeric: tabular-nums;
}

#app-shell {
  width: 100%;
  max-width: var(--shell-max);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  box-shadow: 0 0 40px rgba(12, 61, 49, 0.12);
}

.app-header {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  direction: ltr;
}

.header-side {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 88px;
}

.header-side.is-left {
  justify-content: flex-start;
}

.header-side.is-end,
.header-side.is-end {
  justify-content: flex-end;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  position: relative;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: var(--cream);
  outline: none;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.dot {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--gold);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex: 1;
  direction: rtl;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--green-dark);
  white-space: nowrap;
}

.brand em {
  font-style: normal;
  color: var(--gold);
  letter-spacing: 0.18em;
  font-weight: 500;
  margin-left: 4px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  background: var(--white);
  padding: 0;
}

.avatar img,
.avatar-fallback {
  width: 100%;
  height: 100%;
}

.avatar img {
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.user-menu {
  position: absolute;
  top: calc(100% - 4px);
  left: 12px;
  right: auto;
  width: 200px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  display: none;
  z-index: 50;
  overflow: hidden;
}

.user-menu.is-open {
  display: block;
}

.user-menu a,
.user-menu button {
  display: flex;
  width: 100%;
  text-align: right;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
}

.user-menu a:hover,
.user-menu button:hover {
  background: var(--cream);
}

.user-menu .danger {
  color: var(--danger);
  border-top: 1px solid var(--line);
}

.app-main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 16px calc(var(--nav-h) + 28px);
}

.page-auth {
  background: #fff;
}

.page-auth #app-shell {
  background: #fff;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.card h2,
.section-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 500;
}

.tile-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.tile-row::-webkit-scrollbar {
  height: 0;
}

.tile {
  flex: 0 0 calc((100% - 24px) / 4);
  min-width: calc((100% - 24px) / 4);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.tile span {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
}

.tile-icon.is-soft {
  border: 1px solid currentColor;
}

.tile-icon svg {
  width: 22px;
  height: 22px;
}

.bg-green { background: #27ae60; }
.bg-blue { background: var(--blue); }
.bg-red { background: var(--danger); }
.bg-teal { background: var(--teal); }
.bg-gold { background: var(--gold); }
.soft-blue { background: #eaf2fc; color: #2b73b6; }
.soft-green { background: var(--green-soft); color: var(--green); }

.banner-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.banner-row::-webkit-scrollbar {
  display: none;
}

.banner {
  flex: 0 0 100%;
  scroll-snap-align: center;
  border-radius: 18px;
  padding: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, #4a72c9, #608bf0);
  min-height: 72px;
}

.banner strong,
.banner p {
  margin: 0;
}

.banner p {
  font-size: 11px;
  opacity: 0.92;
}

.banner strong {
  font-size: 12px;
}

.banner-ico {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cards-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.pill {
  font-size: 10px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 99px;
  padding: 2px 8px;
}

.hint {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0efe8;
}

.list-row:last-child {
  border-bottom: 0;
}

a.list-row {
  color: inherit;
  width: 100%;
}

.card-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 16px;
}

.card-scroller::-webkit-scrollbar {
  display: none;
}

.bank-card {
  flex: 0 0 78%;
  scroll-snap-align: center;
  aspect-ratio: 1.586 / 1;
  min-height: 168px;
  border-radius: 16px;
  color: #fff;
  padding: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.bank-card.is-melli {
  background: linear-gradient(135deg, #061529, #0e3a6b);
}

.bank-card.is-mellat {
  background: linear-gradient(135deg, #5c0612, #ba0b22);
}

.bank-card.is-saderat {
  background: linear-gradient(135deg, #14122e, #2d2a68);
}

.bc-top,
.bc-mid,
.bc-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.bc-bank {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bc-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.bc-bank small {
  display: block;
  opacity: 0.8;
  font-size: 9px;
}

.bc-bank b {
  font-size: 11px;
}

.chip {
  width: 36px;
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(135deg, #e8c872, #9a7a2e);
  flex-shrink: 0;
}

.pan {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 8px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.copy-mini {
  font-size: 9px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 2px 6px;
  color: #fff;
}

.ghost-btn {
  font-size: 9px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 4px 8px;
  color: #fff;
}

.dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 8px;
}

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(24, 107, 84, 0.28);
}

.dots i.is-on {
  width: 22px;
  background: var(--green);
}

.app-nav {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: var(--white);
  border-top: 1px solid var(--line);
  height: var(--nav-h);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  overflow: visible;
}

.nav-item {
  width: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
  position: relative;
  padding-bottom: 4px;
}

button.nav-item {
  background: none;
}

.nav-item.is-active {
  color: var(--green);
  font-weight: 500;
}

.nav-item img,
.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-fab-wrap {
  width: 20%;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.nav-fab {
  width: 70px;
  height: 70px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--cream);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 3px;
  border: 0;
  position: relative;
  z-index: 2;
  box-shadow: none;
}

.nav-fab svg {
  width: 26px;
  height: 26px;
}

.nav-fab img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
  filter: none;
}

.badge {
  position: absolute;
  top: -2px;
  left: 50%;
  margin-left: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 500;
  display: grid;
  place-items: center;
  line-height: 1;
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 24, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 60;
}

.scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  position: fixed;
  top: 0;
  right: 0;
  width: min(338px, 88vw);
  height: 100%;
  height: 100dvh;
  background: #f3f0e8;
  z-index: 70;
  transform: translateX(104%);
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -18px 0 40px rgba(12, 61, 49, 0.18);
}

.drawer.is-open {
  transform: translateX(0);
}


.drawer-head {
  position: relative;
  padding: 22px 20px 24px 16px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% -10%, rgba(201, 162, 74, 0.32), transparent 46%),
    linear-gradient(165deg, #071f1a 0%, #0c3d31 46%, #186b54 100%);
}

.drawer-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.drawer-head::after {
  content: "";
  position: absolute;
  right: 8px;
  left: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-bright) 18%, #fff3c4 50%, var(--gold) 82%, transparent);
}

.drawer-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #f5f4f0;
  background: rgba(245, 244, 240, 0.1);
  border: 1px solid rgba(201, 162, 74, 0.35);
  z-index: 2;
}

.drawer-close:hover,
.drawer-close:focus-visible {
  background: rgba(201, 162, 74, 0.22);
  outline: none;
}

.drawer-close svg {
  width: 16px;
  height: 16px;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
  padding-left: 36px;
}


.drawer-seal {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 5px;
  background: var(--cream);
  position: relative;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.drawer-seal::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(224, 197, 122, 0.75);
}

.drawer.is-open .drawer-seal::before {
  animation: seal-turn 22s linear infinite;
}

.drawer-seal img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
}

.drawer-copy {
  min-width: 0;
}

.drawer-kicker,
.drawer-head p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(245, 244, 240, 0.72);
}

.drawer-title,
.drawer-head strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.drawer-year {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gold-bright);
  border: 1px solid rgba(201, 162, 74, 0.45);
  padding: 3px 9px;
  border-radius: 99px;
}

.drawer-list {
  flex: 1;
  overflow: auto;
  padding: 6px 16px 20px;
  background: transparent;
}

.drawer-list a,
.drawer-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  color: var(--ink);
  position: relative;
  background: transparent;
  border-bottom: 1px solid rgba(176, 141, 69, 0.22);
}

.drawer-list a::before,
.drawer-list button::before {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--green);
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}

.drawer-list a::after,
.drawer-list button::after {
  content: "";
  position: absolute;
  right: 0;
  top: 22%;
  bottom: 22%;
  width: 2px;
  border-radius: 2px;
  background: rgba(176, 141, 69, 0.4);
}

.drawer-list a .count-chip,
.drawer-list a .count-chip {
  margin-inline-start: auto;
}

.drawer-list a[href="index.html"] {
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M4 11.5 12 4l8 7.5V20a1 1 0 0 1-1 1h-5v-6h-4v6H5a1 1 0 0 1-1-1z'/%3E%3C/svg%3E");
}

.drawer-list a[href="accounts.html"] {
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V10h14v11'/%3E%3Cpath d='M2 10h20L12 3z'/%3E%3Cpath d='M8 14v3M12 14v3M16 14v3'/%3E%3Cpath d='M10 21v-4h4v4'/%3E%3C/svg%3E");
}

.drawer-list a[href="transactions.html"] {
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E");
}

.drawer-list a[href="transfer.html"] {
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M4 7h13'/%3E%3Cpath d='M14 3l4 4-4 4'/%3E%3Cpath d='M20 17H7'/%3E%3Cpath d='M10 13l-4 4 4 4'/%3E%3C/svg%3E");
}

.drawer-list a[href="profile.html"] {
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='3.6'/%3E%3Cpath d='M5 19.5c1-3.4 3.6-5.2 7-5.2s6 1.8 7 5.2'/%3E%3C/svg%3E");
}

.drawer-list a[href="login.html"],
.drawer-list a[href="register.html"] {
  --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M14 4h5a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-5'/%3E%3Cpath d='M3 12h12'/%3E%3Cpath d='M11 8l4 4-4 4'/%3E%3C/svg%3E");
}

.drawer-list a[href="transfer.html"],
.drawer-list a[href="login.html"] {
  margin-top: 10px;
}

.drawer-list a:hover,
.drawer-list button:hover {
  background: rgba(176, 141, 69, 0.1);
}

.drawer-list a:focus-visible,
.drawer-list button:focus-visible {
  outline: 2px solid rgba(24, 107, 84, 0.35);
  outline-offset: -2px;
}

.drawer-list a.is-current {
  background: rgba(24, 107, 84, 0.08);
  color: var(--green-dark);
  border-bottom-color: var(--gold);
}

.drawer-list a.is-current::before {
  background: var(--gold);
}

.drawer-list a.is-current::after {
  background: var(--gold);
}

.drawer.is-open .drawer-list a,
.drawer.is-open .drawer-list button {
  animation: drawer-row 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.drawer.is-open .drawer-list a:nth-child(1) { animation-delay: 0.05s; }
.drawer.is-open .drawer-list a:nth-child(2) { animation-delay: 0.09s; }
.drawer.is-open .drawer-list a:nth-child(3) { animation-delay: 0.13s; }
.drawer.is-open .drawer-list a:nth-child(4) { animation-delay: 0.17s; }
.drawer.is-open .drawer-list a:nth-child(5) { animation-delay: 0.21s; }
.drawer.is-open .drawer-list a:nth-child(6) { animation-delay: 0.25s; }
.drawer.is-open .drawer-list a:nth-child(7) { animation-delay: 0.29s; }
.drawer.is-open .drawer-list a:nth-child(8) { animation-delay: 0.33s; }

.drawer-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  border-top: 1px solid rgba(176, 141, 69, 0.28);
}

.drawer-foot i {
  width: 18px;
  height: 1px;
  background: var(--gold);
}

@keyframes drawer-row {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes seal-turn {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scrim,
  .drawer {
    transition: none;
  }

  .drawer.is-open .drawer-list a,
  .drawer.is-open .drawer-list button,
  .drawer.is-open .drawer-seal::before {
    animation: none;
  }
}

@media (min-width: 768px) {
  .drawer {
    top: 16px;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    right: max(0px, calc((100vw - var(--shell-max)) / 2));
    border-radius: 0 24px 24px 0;
  }
}

.count-chip,
.count-chip {
  background: var(--danger);
  color: #fff;
  border-radius: 99px;
  min-width: 20px;
  height: 20px;
  font-size: 11px;
  display: grid;
  place-items: center;
  padding: 0 6px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-size: 12px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #e0dfd8;
  background: #f8f8f5;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: right;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(24, 107, 84, 0.2);
  border-color: var(--green);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border-radius: 14px;
  padding: 14px;
  font-weight: 500;
  font-size: 14px;
}

.btn-gold {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 6px 16px rgba(176, 141, 69, 0.28);
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--line);
  background: #fff;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0efe8;
}

.list-row:last-child {
  border-bottom: 0;
}

a.list-row {
  color: inherit;
  width: 100%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 16px);
  transform: translateX(-50%) translateY(20px);
  background: var(--green-dark);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: 0.2s;
  max-width: min(90vw, 360px);
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: min(100%, 390px);
  background: #fff;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}

.modal-h {
  background: var(--green);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.modal-b {
  padding: 16px;
}

.page-hero {
  background:
    radial-gradient(120% 90% at 100% -10%, rgba(201, 162, 74, 0.32), transparent 46%),
    linear-gradient(165deg, #071f1a 0%, #0c3d31 46%, #186b54 100%);
  color: #fff;
  border-radius: 20px;
  padding: 20px 18px 18px;
  overflow: hidden;
}

.page-hero small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.page-hero strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 22px;
  font-weight: 500;
}

.page-hero p {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
}

.acct-card,
.loan-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #fff, #faf8f2);
}

.acct-card:last-child,
.loan-card:last-child {
  margin-bottom: 0;
}

.acct-top,
.loan-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acct-ico,
.loan-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  flex-shrink: 0;
}

.acct-ico svg,
.loan-ico svg {
  width: 20px;
  height: 20px;
}

.acct-top b,
.loan-top b {
  display: block;
  font-size: 13px;
}

.acct-top small,
.loan-top small {
  color: var(--muted);
  font-size: 11px;
}

.acct-iban {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4f2ea;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.acct-bot,
.loan-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.acct-bot b,
.loan-bot b {
  font-size: 14px;
}

.acct-links {
  display: flex;
  gap: 8px;
}

.acct-links a {
  font-size: 11px;
  font-weight: 500;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 99px;
  padding: 5px 10px;
}

.bar {
  height: 6px;
  background: #eceae3;
  border-radius: 99px;
  overflow: hidden;
  margin: 10px 0 8px;
}

.bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.chip-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.chip-tabs button {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
}

.chip-tabs button.is-on {
  background: var(--green-dark);
  color: #fff;
  border-color: transparent;
}

.tx-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(176, 141, 69, 0.18);
}

.tx-row:last-child {
  border-bottom: 0;
}

.tx-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.tx-ico.is-out {
  background: #fde8e8;
  color: var(--danger);
}

.tx-ico.is-in {
  background: var(--green-soft);
  color: var(--green);
}

.tx-ico svg {
  width: 16px;
  height: 16px;
}

.tx-row b {
  display: block;
  font-size: 13px;
}

.tx-row small {
  color: var(--muted);
  font-size: 11px;
}

.tx-amt {
  margin-right: auto;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.tx-amt.is-out {
  color: var(--danger);
}

.tx-amt.is-in {
  color: var(--green);
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-hero .avatar {
  width: 72px;
  height: 72px;
}

.profile-hero b {
  display: block;
  font-size: 16px;
}

.set-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid rgba(176, 141, 69, 0.18);
  text-align: right;
  color: inherit;
  font-weight: 500;
}

.set-row:last-child {
  border-bottom: 0;
}

.set-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  flex-shrink: 0;
}

.set-ico svg {
  width: 18px;
  height: 18px;
}

.set-row span:last-child {
  margin-right: auto;
  color: var(--muted);
}

.contact-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.contact {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 64px;
}

.contact i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 500;
  font-style: normal;
}

.contact span {
  font-size: 10px;
  font-weight: 500;
}

.summary {
  background: #f7f5ee;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 14px;
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 500;
}

.field.is-amount input {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.auth-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 48px 24px 32px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 16px;
  object-fit: contain;
  background: var(--cream);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.auth-screen h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}

.auth-lead {
  margin: 0 0 28px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-screen .field {
  margin-bottom: 14px;
}

.auth-screen .field label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.auth-screen .field input {
  background: #fff;
  border: 1px solid #cfd4d1;
  border-radius: 8px;
  padding: 14px 12px;
  font-size: 14px;
  font-weight: 500;
}

.auth-screen .field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(24, 107, 84, 0.12);
}

.pass-wrap {
  position: relative;
}

.pass-wrap input {
  width: 100%;
  padding-left: 44px;
}

.pass-toggle {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.pass-toggle svg {
  width: 20px;
  height: 20px;
}

.auth-forgot {
  display: block;
  width: 100%;
  margin: 4px 0 18px;
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  background: none;
}

.auth-screen .btn {
  margin-top: 4px;
  border-radius: 8px;
}

.auth-link {
  display: block;
  margin: 22px 0 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--green);
}

.auth-foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.page-splash {
  background: #061411;
}

.page-splash #app-shell {
  background: #061411;
  justify-content: center;
  min-height: 100dvh;
}

.splash {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f5f4f0;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 70% 0%, rgba(201, 162, 74, 0.22), transparent 55%),
    radial-gradient(90% 80% at 50% 100%, rgba(24, 107, 84, 0.35), transparent 50%),
    #061411;
}

.splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
  opacity: 0.14;
  pointer-events: none;
}

.splash-mark {
  position: relative;
  z-index: 1;
  padding: 24px;
  opacity: 1;
  animation: splash-in 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-seal {
  width: 112px;
  height: 112px;
  margin: 0 auto 22px;
  border-radius: 50%;
  padding: 7px;
  background: var(--cream);
  position: relative;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.splash-seal::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(224, 197, 122, 0.75);
  animation: seal-turn 22s linear infinite;
}

.splash-seal img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

.splash-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: rgba(224, 197, 122, 0.92);
}

.splash h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.splash-rule {
  display: block;
  width: 48px;
  height: 1px;
  margin: 16px auto;
  background: var(--gold);
}

.splash-year {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: rgba(245, 244, 240, 0.72);
}

@keyframes splash-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-mark,
  .splash-seal::before {
    animation: none;
  }
}

.demo-top {
  padding: 28px 20px 8px;
  text-align: center;
}

.demo-top img {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff;
}

.demo-top h1 {
  margin: 0 0 6px;
  font-size: 20px;
}

.demo-top p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.demo-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.demo-list a:last-child {
  border-bottom: 0;
}

.demo-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.page-status {
  background: var(--cream);
}

.page-status #app-shell {
  background: var(--cream);
}

.status-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 28px 40px;
}

.status-logo {
  width: 40px;
  height: 40px;
  margin: 0 0 10px;
  border-radius: 50%;
  background: #fff;
}

.status-kicker {
  margin: 0 0 28px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.status-mark {
  width: 64px;
  height: 64px;
  margin: 0 0 18px;
  color: var(--green-dark);
}

.status-mark svg {
  width: 100%;
  height: 100%;
}

.status-screen h1 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 500;
}

.status-lead {
  margin: 0;
  max-width: 280px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.status-rule {
  display: block;
  width: 40px;
  height: 1px;
  margin: 22px 0 20px;
  background: var(--gold);
}

.status-screen .btn {
  max-width: 260px;
}

.status-link {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
}

.status-foot {
  margin: 28px 0 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.err-box {
  text-align: center;
  padding: 40px 16px;
}

.err-box h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

/* Transfer — card-to-card */
.transfer-intro {
  padding: 4px 2px 0;
}

.transfer-intro small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.transfer-intro h1 {
  margin: 4px 0;
  font-size: 20px;
  font-weight: 500;
  color: var(--green-dark);
}

.transfer-intro p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

#transfer-source h2,
#page-transfer .card h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
}

#page-transfer .field input:focus,
#page-transfer .field select:focus {
  outline: 3px solid rgba(176, 141, 69, 0.35);
  border-color: var(--gold);
}

.page-hero.is-slim {
  padding: 14px 16px 12px;
}

.page-hero.is-slim strong {
  margin: 0 0 4px;
  font-size: 18px;
}

.page-hero.is-slim p {
  font-size: 12px;
}

.form-banner {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5c2c0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
}

.form-banner[hidden] {
  display: none;
}

.bank-card.is-pick {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 72%;
  min-height: 132px;
  aspect-ratio: auto;
  text-align: right;
  color: #fff;
}

.bank-card.is-pick.is-selected {
  box-shadow:
    0 0 0 2px var(--green),
    0 0 0 5px var(--gold),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.bank-card.is-pick:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
}

.bank-card.is-pick.is-selected::after {
  content: "انتخاب‌شده";
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 9px;
  font-weight: 500;
  background: var(--gold);
  color: #fff;
  border-radius: 99px;
  padding: 2px 8px;
}

.pan-input,
#field-dest-pan,
#field-cvv2,
#field-otp {
  direction: ltr;
  text-align: left;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

#field-dest-pan {
  font-size: 16px;
  font-weight: 500;
  font-family: ui-monospace, IRANSans, Tahoma, sans-serif;
}

.dest-lookup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--green-soft);
  border: 1px solid rgba(24, 107, 84, 0.16);
}

.dest-lookup[hidden] {
  display: none !important;
}

.dest-lookup label {
  font-size: 11px;
  font-weight: 500;
  color: var(--green);
}

#field-dest-name {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

#field-dest-name:focus {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.dest-lookup .hint {
  margin: 0;
}

.secure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.secure-grid > * {
  min-width: 0;
}

.secure-exp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.secure-grid .field,
.secure-exp .field {
  margin-bottom: 0;
}

#field-exp-month,
#field-exp-year {
  text-align: center;
}

.field.is-error input,
.field.is-error select {
  border-color: var(--danger);
  background: #fdf6f5;
}

.field-error {
  margin: 0;
  min-height: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

#field-amount-hint {
  margin: -4px 0 8px;
}

#transfer-secure .field-error {
  margin-top: 8px;
}

.dest-chip {
  min-width: 88px;
}

.dest-chip small {
  font-size: 10px;
  color: var(--muted);
}

.btn.is-sticky {
  position: sticky;
  bottom: 8px;
  z-index: 5;
}

.result-mark {
  width: 48px;
  height: 48px;
  margin: 4px auto 12px;
  border-radius: 50%;
  background: var(--gold);
  position: relative;
}

.result-mark::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  width: 10px;
  height: 18px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.result-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
}

.result-ref {
  margin: 0 0 8px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: var(--green-dark);
}

#transfer-result .btn {
  margin-top: 8px;
}

@media (min-width: 768px) {
  body {
    padding: 16px 0;
  }

  #app-shell {
    min-height: calc(100vh - 32px);
    border-radius: 24px;
    overflow: hidden;
  }

  .modal {
    align-items: center;
  }

  .modal-card {
    border-radius: 24px;
  }
}
