/* ═══ 📒 صورت حساب — نسخه‌ی ۲ (۱۴ اکتبر ۲۰۲۶، بازطراحیِ موبایل‌اول؛ علیرضا: «اصلاً مطابقِ سلیقه‌نامه نیست، از اول»)
   چارچوبِ نمای تمام‌صفحه‌ی «تهاتر» (po-view/po-nav/po-body از payout.css).
   سربرگِ کوتاهِ مانده (≤۱۵٪ قدِ ۳۹۰) ← بازه‌ها ← روزبه‌روز با سرگروهِ چسبانِ شیشه‌ای ← ردیفِ فشرده (مربعِ رنگیِ پُر، عنوان، یک مبلغ)
   ← لمس = برگه‌ی پایینِ ریز. فقط توکن (روز/شب خودکار). بدهکار/بستانکار همیشه با «کلمه» در کپسول، نه فقط رنگ. ═══ */
:root {
  --axs-buy: #2FAE66; --axs-sell: #3D7EF0; --axs-gold: #D3AF37; --axs-cash: #6E6CE0; --axs-other: #636366;
  --axs-glyph: #FFFFFF; --axs-glyph-gold: #1A1508;
  --axs-glow: rgba(211, 175, 55, .16);
  --axs-press: rgba(255, 255, 255, .06);
}
[data-theme="light"] {
  --axs-buy: #1E9E5A; --axs-sell: #2F6FED; --axs-gold: #C9A227; --axs-cash: #5856D6; --axs-other: #8E8E93;
  --axs-glow: rgba(201, 162, 39, .22);
  --axs-press: rgba(0, 0, 0, .05);
}

.axs-view { z-index: 63; background: radial-gradient(140% 52% at 100% -8%, var(--axs-glow), transparent 64%), var(--bg); }
.axs-view .po-nav h2 { display: flex; align-items: center; justify-content: center; gap: 6px; }
.axs-body { padding-top: 12px; }
.axs-body > * { max-width: 600px; }
.axs-body > * + * { margin-top: 0; }
.axs-print {
  width: 88px; height: 44px; flex: none; border: 0; background: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: flex-end; color: var(--gold-ink, var(--gold));
}
.axs-print:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 10px; }

/* کلمه‌ی بدهکار/بستانکار — کپسولِ کوچکِ رنگی (کلمه همیشه هست؛ رنگ فقط کمک) */
.axw {
  display: inline-block; flex: none; font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.65;
  padding: 0 7px; border-radius: 999px; margin-inline-start: 6px; white-space: nowrap; vertical-align: 1px;
}
.axw.cr { color: var(--up-ink); background: color-mix(in srgb, var(--up-ink) 15%, transparent); }
.axw.dr { color: var(--down-ink); background: color-mix(in srgb, var(--down-ink) 14%, transparent); }
.axw.z { color: var(--text-dim); background: var(--surface-2); }

/* ── سربرگِ مانده: پول و طلا کنارِ هم، سکه‌ها یک خط؛ لمس ⇒ ریزِ مانده ── */
.axs-sum {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2px 14px; align-items: end;
  width: 100%; margin: 0; padding: 13px 16px 12px; border: 0; border-radius: 24px;
  font: inherit; color: var(--text); text-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(140deg, color-mix(in srgb, var(--gold) 22%, var(--po-card)) 0%, var(--po-card) 74%);
  box-shadow: var(--po-sh); transition: transform .18s cubic-bezier(.2, .9, .3, 1.2);
}
.axs-sum.one { grid-template-columns: minmax(0, 1fr); }
.axs-sum:active { transform: scale(.985); }
.axs-sum:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.axs-c { display: grid; gap: 1px; min-width: 0; }
.axs-l { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; font-size: 12.5px; color: var(--text-dim); }
.axs-l .acct-old { margin-inline-start: 6px; }
.axs-n {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 5px; min-width: 0;
  font-size: clamp(19px, 5.9vw, 24px); font-weight: 650; line-height: 1.3; letter-spacing: -.2px;
}
.axs-n small { font-size: 12.5px; font-weight: 500; color: var(--text-dim); letter-spacing: 0; }
.axs-sum.is-stale .axs-n bdi { color: var(--text-dim); }
.axs-coins {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 8px; padding-top: 8px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--line) 65%, transparent); font-size: 13px; line-height: 1.7;
}
/* جریانِ عادیِ متن، نه فلکس: فلکس فاصله‌ی بینِ عدد و کلمه را می‌خورد («سکه:۱تمام») */
.axs-cg { display: block; }

/* ── بازه: نوارِ کپسولی ── */
.axs-seg { display: flex; gap: 2px; margin-top: 12px; padding: 3px; border-radius: 999px; background: var(--ios-fill, var(--surface-2)); }
.axs-sg {
  position: relative; flex: 1; min-height: 38px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--text-dim); transition: background .18s, color .18s;
}
/* ناحیه‌ی لمس ۴۴px بی بزرگ‌شدنِ خودِ کپسول */
.axs-sg::after { content: ''; position: absolute; inset: -3px 0; }
.axs-sg.on { background: var(--po-card); color: var(--text); font-weight: 650; box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 4px 10px -6px rgba(0, 0, 0, .3); }
.axs-sg:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ── روزبه‌روز ── */
.axs-list { margin-top: 4px; transition: opacity .2s; }
.axs-body.is-busy .axs-list { opacity: .45; }
.axs-dsec { margin-top: 4px; }
.axs-day {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 -14px; padding: 12px 18px 7px; color: var(--text-dim);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
}
.axs-dd { font-size: 14px; font-weight: 650; color: var(--text); }
.axs-db { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; white-space: nowrap; }
.axs-db bdi { color: var(--text); font-weight: 600; }
.axs-db .axw { margin-inline-start: 2px; }
.axs-rows { border-radius: 20px; background: var(--po-card); box-shadow: var(--po-sh); overflow: hidden; }
.axs-r {
  position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; min-height: 60px; padding: 10px 14px; border: 0; background: none; color: inherit;
  font: inherit; text-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.axs-r + .axs-r::before {
  content: ""; position: absolute; top: 0; inset-inline: 62px 0; height: 1px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
}
.axs-r:active { background: var(--axs-press); }
@media (hover: hover) and (pointer: fine) { .axs-r:hover { background: var(--axs-press); } }
.axs-r:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; border-radius: 16px; }
.axs-ico {
  width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center;
  color: var(--axs-glyph); background: var(--axs-other);
}
.axs-ico.k-buy { background: var(--axs-buy); }
.axs-ico.k-sell { background: var(--axs-sell); }
.axs-ico.k-gold { background: var(--axs-gold); color: var(--axs-glyph-gold); }
.axs-ico.k-cash { background: var(--axs-cash); }
.axs-m { display: grid; gap: 1px; min-width: 0; }
.axs-t {
  font-size: 15px; font-weight: 600; line-height: 1.5; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.axs-s { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.axs-a { font-size: 15px; font-weight: 600; white-space: nowrap; color: var(--text); }
.axs-a.up { color: var(--up-ink); }
.axs-a i { font-style: normal; }
.axs-q small { margin-inline-start: 4px; font-size: 12px; font-weight: 500; color: var(--text-dim); }
/* ردیفی که هم پول هم ارز دارد: پول بالا، ارز زیرش کوچک‌تر (ارز، ۲۷ اکت ۲۰۲۶) */
.axs-as { display: grid; justify-items: end; gap: 1px; min-width: 0; }
.axs-as .axs-q { font-size: 13px; font-weight: 500; }
.axs-day.axs-start { position: static; margin-top: 8px; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.axs-day.axs-start .axs-dd { font-weight: 500; color: var(--text-dim); }
.axs-more {
  display: block; margin: 6px auto 0; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ios-fill, var(--surface-2)); color: var(--gold-ink, var(--gold)); font: inherit; font-size: 14px; font-weight: 600;
}
.axs-more:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.axs-trunc { margin: 10px 4px 0; font-size: 12.5px; }

/* ── خالی، خطا، اسکلت ── */
.axs-empty, .axs-none { text-align: center; color: var(--text-dim); display: grid; justify-items: center; gap: 14px; }
.axs-empty { padding: 56px 18px; }
.axs-none { padding: 40px 12px; }
.axs-empty b, .axs-none b { font-size: 15px; font-weight: 500; line-height: 1.9; color: var(--text); }
.axs-empty .es-ico svg, .axs-none .es-ico svg { width: 52px; height: 52px; fill: currentColor; opacity: .32; }
.axs-skel {
  height: 108px; border-radius: 24px; margin-top: 0;
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--po-card) 50%, var(--surface-2) 70%);
  background-size: 200% 100%; animation: axs-sk 1.2s linear infinite;
}
.axs-skel.s2 { height: 44px; border-radius: 999px; margin-top: 12px; }
.axs-skel.s3 { height: 260px; border-radius: 20px; margin-top: 40px; }
@keyframes axs-sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .axs-skel { animation: none; } .axs-sum { transition: none; } }
.axs-printhead { display: none; }

/* ── برگه‌ی پایین: ریزِ ردیف / ریزِ مانده ── */
.axs-sbg { z-index: 66; }
.axs-sheet { padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 86dvh; }
.axs-sheet:focus { outline: 0; }
.axd-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 14px; }
.axd-head.one { grid-template-columns: minmax(0, 1fr) auto; }
.axd-head .axs-ico { width: 44px; height: 44px; border-radius: 13px; }
.axd-head .axs-ico svg { width: 23px; height: 23px; }
.axd-head h2 { margin: 0; font-size: 17px; line-height: 1.5; }
.axd-head p { margin: 1px 0 0; font-size: 12.5px; color: var(--text-dim); }
.axd-grp { border-radius: 16px; background: var(--surface-2); padding: 0 14px; }
.axd-r { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 8px 0; font-size: 14.5px; }
.axd-r + .axd-r { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--line) 70%, transparent); }
.axd-r > span { flex: none; color: var(--text-dim); }
.axd-r > b { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0 4px; font-weight: 600; text-align: end; min-width: 0; }
.axd-r > b .axw { margin-inline-start: 2px; }
.axd-cap { margin: 16px 6px 6px; font-size: 12.5px; color: var(--text-dim); }
.axd-raw { margin: 10px 6px 0; font-size: 12.5px; line-height: 1.9; color: var(--text-dim); overflow-wrap: anywhere; }

/* ── 📅 روزِ پرداخت (۲۶ اکتبر ۲۰۲۶): قرصِ «برای دوشنبه» زیرِ عنوانِ ردیف + کارتِ «تعهدهای پیشِ‌رو» در ستونِ کناری ── */
.axs-due {
  display: inline-block; font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.65;
  padding: 0 8px; margin-inline-start: 2px; border-radius: 999px; white-space: nowrap; vertical-align: 1px; max-width: 100%;
  color: var(--gold-ink); background: color-mix(in srgb, var(--gold) 16%, transparent);
}
.axs-due.t { background: color-mix(in srgb, var(--gold) 30%, transparent); }
/* کارت = همان ظاهرِ «تعهداتِ پیشِ‌رو» در «حسابِ من» (#myOrders)، با کاغذِ همین نما */
.axs-side .setl-card.axs-commit {
  margin: 10px 0 0; padding: 2px 16px; border: 0; border-radius: 24px; background: var(--po-card); box-shadow: var(--po-sh);
}
.axs-commit .setl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 0; }
.axs-commit .setl-row + .setl-row { box-shadow: inset 0 1px 0 color-mix(in srgb, var(--line) 65%, transparent); }
.axs-commit .setl-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; color: var(--text); font-size: 14px; }
.axs-commit .setl-when { font-size: 14px; color: var(--text); font-weight: 600; white-space: normal; }
.axs-commit .setl-verb { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.setl-dt { font-style: normal; font-size: 12px; color: var(--text-dim); font-weight: 500; white-space: nowrap; }
.axs-commit .setl-row.today .setl-dt { color: var(--text-dim); font-weight: 500; }
.axs-commit .setl-row.today .setl-when { color: var(--gold-ink); font-weight: 700; }
.axs-commit .setl-amt { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; }
@media print { .axs-commit { display: none !important; } }

/* ── دسکتاپ: سربرگ و بازه ستونِ راست (چسبان)، فهرست ستونِ چپ — فضای خالیِ ۱۹۲۰ نماند ── */
@media (min-width: 1000px) {
  .axs-body > .axs-grid {
    max-width: 1060px; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start;
  }
  .axs-side { position: sticky; top: 4px; }
  .axs-list { margin-top: -12px; }
  .axs-day { margin: 0; padding-inline: 6px; }
}
/* مانیتورِ بزرگ: یک پله درشت‌تر (مثلِ «zoom 1.25»ی داشبورد) تا دو طرفِ ۱۹۲۰ خالی نماند */
@media (min-width: 1600px) { .axs-body > .axs-grid { zoom: 1.2; } }
@media (min-width: 1860px) { .axs-body > .axs-grid { zoom: 1.32; } }

/* ── چاپ / PDF: فقط خودِ صورت حساب، سیاه روی سفید ── */
@media print {
  body.axs-printing { overflow: visible !important; background: #fff !important; }
  body.axs-printing > *:not(#axsView):not(script) { display: none !important; }
  body.axs-printing #axsView {
    position: static !important; display: block !important; animation: none !important; background: #fff !important; color: #111 !important;
    --text: #111; --text-dim: #555; --bg: #fff; --po-card: #fff; --surface-2: #f2f2f2; --line: #bbb; --line-soft: #ccc;
    --po-sh: none; --up-ink: #176b34; --down-ink: #b3001b; --gold-ink: #111; --gold: #999;
    --axs-buy: #fff; --axs-sell: #fff; --axs-gold: #fff; --axs-cash: #fff; --axs-other: #fff; --axs-glyph: #111; --axs-glyph-gold: #111;
  }
  body.axs-printing .po-nav, body.axs-printing .axs-seg, body.axs-printing .axs-more, body.axs-printing .axs-sbg,
  body.axs-printing .axs-none button { display: none !important; }
  body.axs-printing .po-body { overflow: visible !important; padding: 0 !important; }
  body.axs-printing #axsView .po-body > * { max-width: none; }
  body.axs-printing .axs-grid { display: block !important; }
  body.axs-printing .axs-side { position: static !important; }
  body.axs-printing .axs-printhead { display: block; margin-bottom: 10px; font-size: 13px; }
  body.axs-printing .axs-printhead b { display: block; font-size: 16px; }
  body.axs-printing .axs-sum { background: #fff !important; border: 1px solid #bbb; border-radius: 10px; }
  body.axs-printing .axs-rows { border: 1px solid #bbb; border-radius: 10px; }
  body.axs-printing .axs-ico { border: 1px solid #bbb; }
  body.axs-printing .axs-r { break-inside: avoid; min-height: 0; padding-block: 6px; }
  body.axs-printing .axs-day { position: static; background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; margin: 0; padding-inline: 4px; }
  @page { size: A4; margin: 12mm; }
}

/* 📒 زبانه‌ی منوی پایین (۱۴ اکتبر ۲۰۲۶): همان نما، ولی بالای منوی پایین تا منو پیدا بماند؛ «بازگشت» لازم نیست */
body.axs-tab .axs-view { z-index: 39; animation: none; }   /* bottom/right از axsTabFit */
body.axs-tab #axsBack { visibility: hidden; }
body.axs-tab .axs-view .po-body { padding-bottom: 24px; }
