@font-face {
  font-family: Vazirmatn;
  src: url("./assets/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #f4f7f5;
  --surface: #fff;
  --surface-2: #eaf0ed;
  --text: #172e28;
  --muted: #62746d;
  --line: #dce4df;
  --accent: #146c5b;
  --accent-ink: #fff;
  --good: #137250;
  --warning: #996014;
  --danger: #ba374c;
  --radius: 20px;
  --font: Vazirmatn, system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121b1a;
  --surface: #1b2725;
  --surface-2: #263431;
  --text: #f1f7f3;
  --muted: #a1b1a8;
  --line: #364440;
  --accent: #a9d8be;
  --accent-ink: #10291e;
  --good: #8dd7ae;
  --warning: #ebba75;
  --danger: #ff91a1;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
  line-height: 1.35;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 16px;
}
p + p {
  margin-top: 12px;
}
svg {
  display: block;
}
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.ltr,
code,
time,
bdi[dir="ltr"] {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}
.ltr {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app-shell {
  max-width: 560px;
  min-height: 100dvh;
  margin: auto;
  position: relative;
}
.app-header {
  padding: calc(20px + max(env(safe-area-inset-top), var(--host-safe-top, 0px)))
    24px 16px;
}
.app-main {
  padding: 12px 24px 120px;
  min-height: 65dvh;
}
.app-nav {
  position: fixed;
  z-index: 20;
  bottom: 0;
  inset-inline: 0;
  max-width: 560px;
  margin: auto;
  padding: 12px 16px
    calc(12px + max(env(safe-area-inset-bottom), var(--host-safe-bottom, 0px)));
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  gap: 8px;
}
.app-nav button {
  border: 0;
  background: none;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  min-height: 48px;
  font-size: 12px;
  color: var(--muted);
  border-radius: 14px;
}
.app-nav [aria-current="page"] {
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 700;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.between {
  justify-content: space-between;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.btn.secondary {
  background: var(--surface-2);
  border-color: transparent;
}
.btn.danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}
.btn.full {
  width: 100%;
}
.btn.small {
  font-size: 12px;
  min-height: 40px;
  padding: 8px 12px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0;
  flex-shrink: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  font-size: 11px;
  line-height: 1.5;
  padding: 5px 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  white-space: normal;
}
.good {
  color: var(--good);
}
.warning {
  color: var(--warning);
}
.critical {
  color: var(--danger);
}
.badge.good {
  background: color-mix(in srgb, var(--good) 12%, var(--surface));
}
.badge.warning {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
}
.badge.critical {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
}
.progress {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  direction: ltr;
}
.progress > span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--accent);
  border-radius: inherit;
}
.progress.critical > span {
  background: var(--danger);
}
.progress.warning > span {
  background: var(--warning);
}
.progress.unknown {
  background: repeating-linear-gradient(
    90deg,
    var(--line) 0 8px,
    transparent 8px 12px
  );
}
.page-title {
  margin-bottom: 24px;
}
.page-title p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
  gap: 12px;
}
.section-title h2 {
  font-size: 18px;
}
.notice {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.notice.warning {
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning) 25%, var(--line));
}
.notice.critical {
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--line));
}
.notice a {
  text-decoration: underline;
}
.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}
.empty .icon {
  margin: 0 auto 16px;
  width: 32px;
  height: 32px;
}
.empty h2 {
  color: var(--text);
  margin-bottom: 9px;
}
.empty .btn {
  margin-top: 18px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 0 13px;
  min-height: 48px;
}
.search-box input {
  border: 0;
  background: none;
  min-width: 0;
  flex: 1;
  padding: 12px 0;
  color: var(--text);
  outline-offset: 1px;
}
.search-box input::placeholder {
  color: var(--muted);
}
.list-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.segmented {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.segmented button {
  min-height: 40px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 12px;
}
.segmented button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}
.sort-select {
  max-width: 115px;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 6px;
}
.result-count {
  font-size: 12px;
  color: var(--muted);
}
.load-more {
  width: 100%;
  margin-top: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field > span,
.field > label {
  font-size: 13px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 13px;
}
.field small {
  font-size: 11px;
  color: var(--muted);
}
.field [aria-invalid="true"] {
  border-color: var(--danger);
}
.field-error {
  color: var(--danger);
  font-size: 12px;
}
.wallet-card {
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.wallet-card .balance {
  font-size: 38px;
  line-height: 1.25;
  letter-spacing: -1px;
}
.wallet-card .balance small {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 400;
}
.wallet-card .btn {
  background: var(--accent-ink);
  color: var(--accent);
  border: 0;
}
.wallet-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.wallet-tabs .btn {
  flex: 1;
  font-size: 12px;
}
.wallet-tabs .selected {
  border-color: var(--accent);
  color: var(--accent);
}
.transaction-list {
  border-top: 1px solid var(--line);
}
.transaction {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  width: 100%;
  text-align: start;
  background: none;
  border-inline: 0;
  border-top: 0;
}
.tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}
.tx-title {
  font-size: 13px;
  font-weight: 600;
}
.tx-meta {
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.tx-amount {
  font-size: 13px;
  font-weight: 700;
  direction: ltr;
  white-space: nowrap;
}
.tx-amount small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 10px;
}
.tx-pair {
  font-size: 10px;
  color: var(--good);
  margin-top: 5px;
}
.category-list {
  display: grid;
  gap: 14px;
}
.category-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  gap: 14px;
  text-align: start;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 16px;
  border-radius: var(--radius);
  width: 100%;
}
.category-symbol {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.category-card h3 {
  font-size: 15px;
  margin-bottom: 5px;
}
.category-card p {
  font-size: 11px;
  color: var(--muted);
}
.plan-list {
  display: grid;
  gap: 12px;
}
.plan-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan-card .price {
  font-size: 21px;
  font-weight: 700;
}
.plan-card .price small {
  font-weight: 400;
  font-size: 11px;
}
.plan-card .plan-meta {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}
.plan-card .plan-trial {
  font-size: 11px;
  color: var(--warning);
}
.plan-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.fact-list {
  display: grid;
  gap: 0;
  margin: 0;
}
.fact-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.fact-list dt {
  color: var(--muted);
  flex-shrink: 0;
}
.fact-list dd {
  margin: 0;
  text-align: end;
  overflow-wrap: anywhere;
  min-width: 0;
}
.fact-list > div:last-child {
  border: 0;
}
.detail-title {
  margin: 0 0 6px;
}
.detail-identity {
  font-size: 12px;
  margin-bottom: 18px;
  user-select: all;
}
.detail-usage {
  padding: 20px;
  background: var(--surface-2);
  border-radius: 14px;
  margin: 16px 0;
}
.detail-usage .big {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.action-grid .btn {
  font-size: 12px;
  padding: 12px 10px;
}
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.action-row p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.switch {
  background: var(--line);
  border: 0;
  border-radius: 99px;
  width: 47px;
  height: 28px;
  position: relative;
  flex-shrink: 0;
}
.switch:before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
}
.switch[aria-checked="true"] {
  background: var(--accent);
}
.switch[aria-checked="true"]:before {
  inset-inline-start: 23px;
}
.technical-value {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: var(--surface-2);
  font:
    11px/1.8 ui-monospace,
    monospace;
  direction: ltr;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  user-select: all;
}
.sheet {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  width: min(100%, 560px);
  max-width: 100%;
  max-height: calc(94dvh - env(safe-area-inset-top));
  padding: 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 -12px 70px #0002;
  overscroll-behavior: contain;
  overflow: hidden;
}
.sheet[open] {
  display: flex;
  flex-direction: column;
  animation: sheet-enter 0.22s ease-out;
}
.sheet::backdrop {
  background: #07171166;
  backdrop-filter: blur(4px);
}
body:has(.sheet[open]) {
  overflow: hidden;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.sheet-header h2 {
  font-size: 19px;
}
.sheet-body {
  padding: 20px 22px;
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
}
.sheet-actions {
  padding: 14px 22px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  flex-shrink: 0;
}
.sheet-actions:empty {
  display: none;
}
.sheet-error:empty {
  display: none;
}
.sheet-error {
  padding: 12px;
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: var(--danger);
  font-size: 12px;
  margin-bottom: 14px;
  border-radius: 10px;
}
.qr-frame {
  background: #fff;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 18px;
  max-width: 280px;
  margin: 0 auto 18px;
  aspect-ratio: 1;
}
.qr-frame svg {
  width: 100%;
  height: 100%;
}
.app-targets {
  display: grid;
  gap: 12px;
}
.app-targets .btn {
  justify-content: space-between;
  padding: 16px;
}
.settings-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}
.settings-section h3 {
  margin-bottom: 12px;
}
.account-options,
.concept-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.account-options .btn {
  font-size: 12px;
  min-height: 52px;
}
.concept-options a {
  font-size: 12px;
}
.demo-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.toast {
  position: fixed;
  z-index: 1000;
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(calc(100% - 32px), 510px);
  padding: 14px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: 14px;
  box-shadow: 0 8px 35px #0002;
  font-size: 13px;
  line-height: 1.75;
  pointer-events: none;
  animation: fade-in 0.2s ease;
  overflow-wrap: anywhere;
}
.toast:empty {
  display: none;
}
.loading-line {
  height: 3px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.loading-line:after {
  content: "";
  position: absolute;
  width: 30%;
  height: 100%;
  background: var(--accent);
  animation: loading 1s ease-in-out infinite;
}
.skeleton {
  background: var(--surface-2);
  border-radius: var(--radius);
  height: 170px;
  margin: 14px 0;
  animation: fade-in 1s ease-in-out infinite alternate;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
.purchase-preview {
  font-size: 12px;
  line-height: 1.9;
}
.purchase-preview .technical-value {
  margin-top: 8px;
}
.quantity-control {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 10px;
  align-items: center;
}
.quantity-control input {
  text-align: center;
}
.qty-btn {
  height: 48px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 12px;
}
.end-note {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 24px 0;
}
.app-error {
  padding: 20px;
}
.is-busy {
  opacity: 0.6;
  pointer-events: none;
}
.support-example {
  font-size: 12px;
  color: var(--muted);
}
.summary-amount {
  font-size: 30px;
  font-weight: 700;
  direction: ltr;
  display: block;
  margin: 12px 0;
}
.purchase-result-names {
  max-height: 160px;
  overflow: auto;
}
.share-options {
  display: flex;
  gap: 10px;
}
.share-options .btn {
  flex: 1;
}
.copy-fallback {
  margin-top: 12px;
}
.balance-caption {
  opacity: 0.8;
  font-size: 12px;
}
.renew-summary {
  background: var(--surface-2);
  padding: 18px;
  border-radius: 16px;
  margin-bottom: 16px;
}
.renew-summary h3 {
  margin-bottom: 10px;
}
.plan-card[aria-disabled="true"] {
  opacity: 0.6;
}
.language-transition {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--bg);
  display: grid;
  place-content: center;
  text-align: center;
  gap: 20px;
}
.language-transition .spinner {
  margin: auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes loading {
  from {
    left: -30%;
  }
  to {
    left: 100%;
  }
}
@keyframes fade-in {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}
@keyframes sheet-enter {
  from {
    transform: translateY(30px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@media (min-width: 700px) {
  body {
    background: color-mix(in srgb, var(--bg) 94%, var(--text));
  }
  .app-shell {
    background: var(--bg);
    border-inline: 1px solid var(--line);
  }
  .sheet {
    bottom: 24px;
    max-height: 90dvh;
    border-radius: 24px;
    border-bottom: 1px solid var(--line);
  }
  .app-nav {
    border-inline: 1px solid var(--line);
  }
}
@media (max-width: 380px) {
  .app-header {
    padding-inline: 18px;
  }
  .app-main {
    padding-inline: 18px;
  }
  .sheet-header,
  .sheet-body {
    padding-inline: 18px;
  }
  .sheet-actions {
    padding-inline: 18px;
  }
  .control-row {
    gap: 2px;
  }
  .segmented {
    gap: 2px;
  }
  .segmented button {
    padding-inline: 8px;
  }
  .sort-select {
    max-width: 92px;
  }
  .transaction {
    gap: 8px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }
  .tx-title {
    font-size: 12px;
  }
  .tx-amount {
    font-size: 12px;
  }
  .wallet-card .balance {
    font-size: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.app-main article {
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
}
