/* ═══════════════════════════════════════════════════════════════
   ثنا — سیستم طراحی «دفتر» (Ledger Design System)  v2.0 / ۱۴۰۵/۰۸/۱۸
   -------------------------------------------------------------------
   جایگزین پالت صرافی رمزارزی (طلایی #f0b90b + پسزمینه #0d1117 +
   گرادیان / شیشهای / درخشش / انیمیشن فنری / شعاع ۳۲px) میشود.
   اصول: سطوح روشن و آرام · خطوط مویین · numbers خوانا · رنگ فقط برای معنا
   · فاصلهگذاری منظم · هیچ گرادیان و سایه سنگین · مناسب اسناد مالی.
   این فایل باید «آخرین» فایل CSS در تمام لایوتها لود شود.
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* سطوح */
    --ds-bg:            #F4F6F8;
    --ds-surface:       #FFFFFF;
    --ds-surface-2:     #F8FAFC;
    --ds-surface-3:     #EEF2F6;
    --ds-line:          #E2E7ED;
    --ds-line-strong:   #C9D2DC;
    /* متن */
    --ds-ink:           #16243A;
    --ds-ink-2:         #4E5D72;
    --ds-ink-3:         #8493A6;
    /* برند */
    --ds-brand:         #1E3A5F;
    --ds-brand-hover:   #152C49;
    --ds-brand-soft:    #E9EFF6;
    --ds-brass:         #A8843C;
    --ds-brass-soft:    #F6F0E3;
    /* معنا (حسابداری: سبز=ورود، قرمز=خروج) */
    --ds-pos:           #1B7A55;
    --ds-pos-soft:      #E8F4EE;
    --ds-neg:           #B23B3B;
    --ds-neg-soft:      #FBEEEE;
    --ds-warn:          #96690F;
    --ds-warn-soft:     #FBF3DF;
    --ds-info:          #2A6099;
    --ds-info-soft:     #EAF2FA;
    /* هندسه */
    --ds-r-sm: 8px; --ds-r: 10px; --ds-r-lg: 14px;
    --ds-sp-1: 4px; --ds-sp-2: 8px; --ds-sp-3: 12px; --ds-sp-4: 16px;
    --ds-sp-5: 24px; --ds-sp-6: 32px; --ds-sp-7: 48px;
    --ds-shadow: 0 1px 2px rgba(22,36,58,.04), 0 8px 24px rgba(22,36,58,.05);
    --ds-font: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* حالت تاریک (اختیاری؛ پیشفرض سامانه روشن است) */
:root[data-theme="dark"] {
    --ds-bg: #101925; --ds-surface: #172333; --ds-surface-2: #1C2A3C;
    --ds-surface-3: #223349; --ds-line: #2A3B52; --ds-line-strong: #38506B;
    --ds-ink: #E8EEF6; --ds-ink-2: #A6B6C9; --ds-ink-3: #7B8DA3;
    --ds-brand: #5B8CC4; --ds-brand-hover: #74A0D2; --ds-brand-soft: #1E3550;
    --ds-brass: #D0AC63; --ds-brass-soft: #2E2A1E;
    --ds-pos: #5FC095; --ds-pos-soft: #16342A;
    --ds-neg: #E38A8A; --ds-neg-soft: #3A2225;
    color-scheme: dark;
}

/* ───────────────────────────────────────────────────────────────
   ۱) نرمالسازی سراسری — با specificity بالاتر از <style> تم پویا
   ─────────────────────────────────────────────────────────────── */
html body.ds-app,
html body.ds-app *:not(.ds-mono):not(.mono) { font-family: var(--ds-font) !important; }
html body.ds-app {
    background: var(--ds-bg) !important;
    color: var(--ds-ink) !important;
    font-size: 14px; line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
    overflow-x: hidden;
}
html body.ds-app a { color: var(--ds-brand); text-decoration: none; }
html body.ds-app a:hover { color: var(--ds-brand-hover); }
html body.ds-app h1, html body.ds-app h2, html body.ds-app h3 { color: var(--ds-ink) !important; font-weight: 800; letter-spacing: -.2px; }
html body.ds-app ::selection { background: var(--ds-brand-soft); }
html body.ds-app :focus-visible { outline: 2px solid var(--ds-brand); outline-offset: 2px; }
html body.ds-app [dir="ltr"], html body.ds-app .ds-num, html body.ds-app .ds-mono { font-variant-numeric: tabular-nums; }

/* پاکسازی جلوههای صرافی */
html body.ds-app .card,
html body.ds-app .ds-card,
html body.ds-app .balance-card,
html body.ds-app .stat-card,
html body.ds-app .section-card,
html body.ds-app .auth-card,
html body.ds-app .table-container,
html body.ds-app .di-tbl-wrap {
    background: var(--ds-surface) !important;
    border: 1px solid var(--ds-line) !important;
    border-radius: var(--ds-r-lg) !important;
    box-shadow: var(--ds-shadow) !important;
    backdrop-filter: none !important;
    color: var(--ds-ink) !important;
}
html body.ds-app .card::before,
html body.ds-app .card::after,
html body.ds-app .balance-card::after { display: none !important; }
html body.ds-app .card:hover, html body.ds-app .stat-card:hover { transform: none !important; }
html body.ds-app [class*="gradient"],
html body.ds-app [style*="linear-gradient"] { background-image: none !important; }

/* ───────────────────────────────────────────────────────────────
   ۲) چیدمان / سایدبار / هدر
   ─────────────────────────────────────────────────────────────── */
html body.ds-app .sidebar {
    background: var(--ds-surface) !important;
    border-inline-end: 1px solid var(--ds-line) !important;
    width: 252px !important;
}
html body.ds-app .sidebar-header {
    border-bottom: 1px solid var(--ds-line) !important;
    padding: 16px 18px !important;
}
html body.ds-app .sidebar-section-title {
    color: var(--ds-ink-3) !important; font-size: 10.5px !important;
    font-weight: 800 !important; letter-spacing: .6px; padding: 0 12px 6px !important;
}
html body.ds-app .sidebar-item {
    color: var(--ds-ink-2) !important; border-radius: var(--ds-r) !important;
    font-size: 12.5px !important; font-weight: 600 !important; margin: 2px 8px !important;
    padding: 9px 12px !important; transition: background .15s, color .15s;
}
html body.ds-app .sidebar-item svg { width: 17px; height: 17px; opacity: .85; }
html body.ds-app .sidebar-item:hover { background: var(--ds-surface-3) !important; color: var(--ds-ink) !important; }
html body.ds-app .sidebar-item.active {
    background: var(--ds-brand-soft) !important; color: var(--ds-brand) !important;
    box-shadow: inset -3px 0 0 var(--ds-brand) !important;
}
html body.ds-app .header,
html body.ds-app .customer-header,
html body.ds-app .banker-navbar {
    background: var(--ds-surface) !important;
    border-bottom: 1px solid var(--ds-line) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    box-shadow: none !important; padding: 10px 20px !important;
}
html body.ds-app .header-brand { color: var(--ds-ink) !important; font-weight: 800 !important; font-size: 14px !important; }
html body.ds-app .header-title { color: var(--ds-ink) !important; font-weight: 800 !important; }
html body.ds-app .header-subtitle { color: var(--ds-ink-3) !important; font-size: 11px !important; }
html body.ds-app .main-content { padding: 24px !important; }
html body.ds-app .customer-container { max-width: 1120px !important; }
html body.ds-app .customer-content { padding: 20px 20px 100px !important; }

/* ناوبری پایین موبایل */
html body.ds-app .bottom-nav,
html body.ds-app .mobile-nav {
    background: var(--ds-surface) !important;
    border-top: 1px solid var(--ds-line) !important;
    box-shadow: var(--ds-shadow-soft) !important;
    backdrop-filter: none !important;
}
html body.ds-app .nav-item,
html body.ds-app .mobile-nav-item { color: var(--ds-ink-3) !important; font-size: 10.5px !important; font-weight: 700 !important; }
html body.ds-app .nav-item.active,
html body.ds-app .mobile-nav-item.active { color: var(--ds-brand) !important; }
html body.ds-app .nav-item.active::before { content: ''; position: absolute; top: 0; inset-inline: 24%; height: 2px; background: var(--ds-brand); border-radius: 2px; }

/* ───────────────────────────────────────────────────────────────
   ۳) کامپوننتهای پایه
   ─────────────────────────────────────────────────────────────── */
.ds-page { max-width: 1180px; margin: 0 auto; padding: 4px 0 56px; }
.ds-pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.ds-eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .8px; color: var(--ds-ink-3); text-transform: uppercase; margin-bottom: 6px; }
.ds-pagehead h1 { margin: 0 0 6px; font-size: 22px; }
.ds-pagehead p { margin: 0; font-size: 12.5px; line-height: 1.9; color: var(--ds-ink-2); max-width: 680px; }

.ds-card { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-lg); box-shadow: var(--ds-shadow); padding: 20px 22px; margin-bottom: 18px; }
.ds-card-flush { padding: 0; overflow: hidden; }
.ds-card-flush .ds-subhead { padding: 18px 22px 12px; }
.ds-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ds-subhead h2, .ds-subhead h3 { margin: 0; font-size: 14px; font-weight: 800; }
.ds-muted { color: var(--ds-ink-3) !important; }
.ds-pos { color: var(--ds-pos) !important; }
.ds-neg { color: var(--ds-neg) !important; }
.ds-mono { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace !important; font-size: 11px; direction: ltr; display: inline-block; }
.ds-num { direction: ltr; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ds-nowrap { white-space: nowrap; }
.ds-sep { color: var(--ds-line-strong); margin: 0 4px; }
.ds-mt { margin-top: 18px; }

.ds-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px; border-radius: var(--ds-r); border: 1px solid transparent;
    font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
    text-decoration: none !important; line-height: 1.6; transition: background .15s, border-color .15s, color .15s; }
.ds-btn svg { flex: none; }
.ds-btn-primary { background: var(--ds-brand); color: var(--ds-brand-on) !important; border-color: var(--ds-brand); }
.ds-btn-primary:hover { background: var(--ds-brand-hover); color: var(--ds-brand-on) !important; }
.ds-btn-outline { background: var(--ds-surface); color: var(--ds-brand) !important; border-color: var(--ds-line-strong); }
.ds-btn-outline:hover { background: var(--ds-brand-soft); }
.ds-btn-ghost { background: transparent; color: var(--ds-ink-2) !important; border-color: var(--ds-line); }
.ds-btn-ghost:hover { background: var(--ds-surface-2); color: var(--ds-ink) !important; }
.ds-btn:disabled { opacity: .45; cursor: not-allowed; }
html body.ds-app .btn-primary,
html body.ds-app .di-btn.pri,
html body.ds-app .ts-save { background: var(--ds-brand) !important; color: var(--ds-brand-on) !important; border-color: var(--ds-brand) !important; }
html body.ds-app .btn-outline { background: transparent !important; color: var(--ds-ink-2) !important; border: 1px solid var(--ds-line) !important; }

.ds-field { display: flex; flex-direction: column; min-width: 0; }
.ds-field label { font-size: 11.5px; font-weight: 700; color: var(--ds-ink-2); margin-bottom: 6px; }
.ds-field small { font-size: 10.5px; color: var(--ds-ink-3); margin-top: 5px; line-height: 1.6; }
.ds-field input, .ds-field select, .ds-field textarea,
html body.ds-app .ds-field input, html body.ds-app .ds-field select {
    width: 100%; box-sizing: border-box; padding: 10px 12px; font-family: inherit; font-size: 13px;
    background: var(--ds-surface) !important; color: var(--ds-ink) !important;
    border: 1px solid var(--ds-line-strong) !important; border-radius: var(--ds-r) !important;
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.ds-field input:focus, .ds-field select:focus { border-color: var(--ds-brand) !important; box-shadow: 0 0 0 3px var(--ds-brand-soft) !important; }
.ds-field input:disabled, .ds-field select:disabled { background: var(--ds-surface-3) !important; color: var(--ds-ink-3) !important; }
.ds-readonly { padding: 10px 12px; background: var(--ds-surface-2); border: 1px dashed var(--ds-line-strong); border-radius: var(--ds-r); font-size: 14px; font-weight: 800; direction: ltr; text-align: right; }
.ds-grid { display: grid; gap: 16px; }
.ds-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ds-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: var(--ds-surface-3); color: var(--ds-ink-2); border: 1px solid var(--ds-line); }
.ds-pill-ok { background: var(--ds-pos-soft); color: var(--ds-pos); border-color: transparent; }
.ds-pill-bad { background: var(--ds-neg-soft); color: var(--ds-neg); border-color: transparent; }
.ds-alert { padding: 12px 15px; border-radius: var(--ds-r); font-size: 12.5px; line-height: 1.8; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--ds-line); background: var(--ds-surface-2); color: var(--ds-ink-2); }
.ds-alert-ok { background: var(--ds-pos-soft); color: var(--ds-pos); border-color: transparent; }
.ds-alert-bad { background: var(--ds-neg-soft); color: var(--ds-neg); border-color: transparent; }
.ds-hint { font-size: 11.5px; color: var(--ds-ink-3); line-height: 1.8; }
.ds-icon-btn { background: transparent; border: 0; cursor: pointer; padding: 6px; border-radius: 8px; display: inline-flex; color: var(--ds-ink-3); }
.ds-icon-btn:hover { background: var(--ds-surface-3); }
.ds-icon-danger:hover { color: var(--ds-neg); background: var(--ds-neg-soft); }
.ds-empty { padding: 28px; text-align: center; font-size: 12.5px; color: var(--ds-ink-3); background: var(--ds-surface-2); border: 1px dashed var(--ds-line-strong); border-radius: var(--ds-r); }
.ds-empty-lg { padding: 48px 24px; border: 0; background: transparent; }
.ds-empty-lg svg { color: var(--ds-line-strong); margin-bottom: 12px; }
.ds-empty-lg h3 { font-size: 15px; margin: 0 0 6px; }
.ds-empty-lg p { margin: 0; font-size: 12px; max-width: 420px; margin-inline: auto; line-height: 1.9; }

/* ───────────────────────────────────────────────────────────────
   ۴) جدول دفترمانند
   ─────────────────────────────────────────────────────────────── */
.ds-table-wrap { overflow-x: auto; border-top: 1px solid var(--ds-line); }
.ds-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ds-table th { background: var(--ds-surface-2) !important; color: var(--ds-ink-2) !important; font-weight: 800; font-size: 11px;
    text-align: right; padding: 11px 14px; white-space: nowrap; border-bottom: 1px solid var(--ds-line) !important; }
.ds-table td { padding: 12px 14px; border-bottom: 1px solid var(--ds-line) !important; color: var(--ds-ink) !important; vertical-align: middle; }
.ds-table tbody tr:hover { background: var(--ds-surface-2); }
.ds-table tbody tr:last-child td { border-bottom: 0 !important; }
.ds-table tfoot td { background: var(--ds-surface-2) !important; font-weight: 800; border-top: 1px solid var(--ds-line-strong) !important; border-bottom: 0 !important; padding: 13px 14px; }
.ds-table small { font-size: 10.5px; font-weight: 500; }
.ds-table .ds-desc { min-width: 220px; }
.ds-table .ds-desc small { display: block; margin-top: 3px; }
.ds-dir-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 7px; vertical-align: middle; }
.ds-dir-dot.in { background: var(--ds-pos); }
.ds-dir-dot.out { background: var(--ds-neg); }
.ds-asset-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--ds-surface-3); font-size: 10.5px; font-weight: 800; color: var(--ds-ink-2); direction: ltr; }
.ds-footnote { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--ds-ink-3); margin: 4px 2px 0; line-height: 1.8; }

/* ───────────────────────────────────────────────────────────────
   ۵) خلاصه دوره / فیلترها / صفحهبندی
   ─────────────────────────────────────────────────────────────── */
.ds-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.ds-kpi { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-lg); padding: 15px 17px; box-shadow: var(--ds-shadow); }
.ds-kpi-accent { border-inline-start: 3px solid var(--ds-brand); background: var(--ds-brand-soft); }
.ds-kpi-label { display: block; font-size: 11px; font-weight: 700; color: var(--ds-ink-2); margin-bottom: 8px; }
.ds-kpi-value { display: inline-block; font-size: 19px; font-weight: 800; direction: ltr; letter-spacing: -.4px; }
.ds-kpi-unit { font-size: 10.5px; color: var(--ds-ink-3); margin-inline-start: 6px; }
.ds-balances { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 18px; padding: 11px 14px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r); }
.ds-balances-title { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: var(--ds-ink-2); margin-inline-end: 6px; }
.ds-balance-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 7px; background: var(--ds-surface-2); border: 1px solid var(--ds-line); font-size: 11px; color: var(--ds-ink-2); }
.ds-balance-chip b { color: var(--ds-ink); font-size: 12px; }
.ds-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 16px 18px; }
.ds-filters .ds-field { flex: 1 1 150px; }
.ds-field-grow { flex: 2 1 220px !important; }
.ds-filter-actions { display: flex; gap: 8px; }
.ds-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; border-top: 1px solid var(--ds-line); font-size: 12px; }
.ds-mobile-list { display: none; }

/* ───────────────────────────────────────────────────────────────
   ۶) صدور سند (wizard)
   ─────────────────────────────────────────────────────────────── */
.ds-step-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.ds-step-no { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--ds-brand); color: var(--ds-brand-on); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.ds-step-head h2 { margin: 0 0 3px; font-size: 14.5px; }
.ds-step-head p { margin: 0; font-size: 11.5px; color: var(--ds-ink-2); line-height: 1.8; max-width: 640px; }
.ds-step-head .ds-pill { margin-inline-start: auto; }
.ds-ops { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.ds-op { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: right;
    padding: 14px 13px; border: 1px solid var(--ds-line); border-radius: var(--ds-r);
    background: var(--ds-surface); color: var(--ds-ink-2); font-family: inherit; cursor: pointer;
    transition: border-color .15s, background .15s, color .15s; }
.ds-op svg { color: var(--ds-ink-3); }
.ds-op:hover { border-color: var(--ds-line-strong); background: var(--ds-surface-2); }
.ds-op.active { border-color: var(--ds-brand); background: var(--ds-brand-soft); color: var(--ds-brand); box-shadow: inset 0 0 0 1px var(--ds-brand); }
.ds-op.active svg { color: var(--ds-brand); }
.ds-op-t { font-size: 12.5px; font-weight: 800; }
.ds-op-d { font-size: 10.5px; color: var(--ds-ink-3); line-height: 1.6; }
.ds-flow { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding: 14px; background: var(--ds-surface-2); border: 1px solid var(--ds-line); border-radius: var(--ds-r); }
.ds-flow-node { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ds-flow-node span { font-size: 10px; font-weight: 800; color: var(--ds-ink-3); letter-spacing: .4px; }
.ds-flow-node b { font-size: 14px; color: var(--ds-ink); }
.ds-flow-node em { font-size: 11px; color: var(--ds-ink-2); font-style: normal; }
.ds-flow-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ds-brand); min-width: 80px; }
.ds-flow-arrow small { font-size: 10px; color: var(--ds-ink-3); }
.ds-flow-sum { flex: 0 0 100%; border-top: 1px dashed var(--ds-line-strong); padding-top: 10px; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ds-ink-2); }
.ds-flow-sum b { color: var(--ds-ink); direction: ltr; }
.ds-step-actions, .ds-submit-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ds-line); }
.ds-rows { display: flex; flex-direction: column; gap: 8px; }
.ds-row-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 13px; background: var(--ds-surface-2); border: 1px solid var(--ds-line); border-radius: var(--ds-r); }
.ds-tag { font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 6px; background: var(--ds-brand-soft); color: var(--ds-brand); }
.ds-row-party { font-size: 12.5px; font-weight: 700; color: var(--ds-ink); }
.ds-row-arrow { color: var(--ds-brand); display: inline-flex; }
.ds-row-meta { font-size: 11.5px; color: var(--ds-ink-2); margin-inline-start: auto; }
.ds-row-meta b { color: var(--ds-ink); }
.ds-confirm { display: flex; align-items: center; gap: 9px; margin-top: 16px; padding: 12px 14px; background: var(--ds-brand-soft); border: 1px solid var(--ds-line); border-radius: var(--ds-r); font-size: 12px; font-weight: 600; color: var(--ds-ink); cursor: pointer; }
.ds-confirm input { width: 16px; height: 16px; accent-color: var(--ds-brand); }
.ds-docnum { font-size: 12px; color: var(--ds-ink-2); }
.ds-docnum b { color: var(--ds-ink); direction: ltr; display: inline-block; margin-inline-start: 6px; }
.ds-submit-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.ds-success-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-inline-start: 3px solid var(--ds-pos); }
.ds-success-mark { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--ds-pos-soft); color: var(--ds-pos); display: flex; align-items: center; justify-content: center; }
.ds-success-card h2 { margin: 0 0 4px; font-size: 18px; }
.ds-success-card p { margin: 0; font-size: 12px; color: var(--ds-ink-2); }
.ds-success-actions { margin-inline-start: auto; display: flex; gap: 9px; flex-wrap: wrap; }
.ds-journal td small { color: var(--ds-ink-3); }

/* ───────────────────────────────────────────────────────────────
   ۷) صفحه نصب PWA
   ─────────────────────────────────────────────────────────────── */
.ds-install { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px 16px; background: var(--ds-bg); }
.ds-install-card { width: 100%; max-width: 470px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 18px; box-shadow: var(--ds-shadow); padding: 30px 28px; text-align: center; }
.ds-install-logo { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 18px; overflow: hidden; box-shadow: var(--ds-shadow); }
.ds-install-logo img { width: 100%; height: 100%; object-fit: cover; }
.ds-install-card h1 { font-size: 19px; margin: 0 0 8px; }
.ds-install-card > p { font-size: 12.5px; color: var(--ds-ink-2); line-height: 1.9; margin: 0 0 22px; }
.ds-install-steps { text-align: right; background: var(--ds-surface-2); border: 1px solid var(--ds-line); border-radius: var(--ds-r); padding: 16px 18px; margin-bottom: 18px; }
.ds-install-steps h2 { font-size: 12.5px; margin: 0 0 10px; }
.ds-install-steps ol { margin: 0; padding-inline-start: 20px; font-size: 12px; color: var(--ds-ink-2); line-height: 2.1; }
.ds-install-steps b { color: var(--ds-ink); }
.ds-install-note { display: flex; gap: 8px; align-items: flex-start; text-align: right; background: var(--ds-brand-soft); color: var(--ds-ink-2); border-radius: var(--ds-r); padding: 11px 13px; font-size: 11.5px; line-height: 1.8; margin-bottom: 18px; }
.ds-install-actions { display: flex; flex-direction: column; gap: 9px; }
.ds-install-actions .ds-btn { width: 100%; padding: 12px 16px; }
.ds-install-foot { margin-top: 18px; font-size: 10.5px; color: var(--ds-ink-3); line-height: 1.8; }
.ds-platform-switch { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.ds-platform-switch button { font-family: inherit; font-size: 11.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--ds-line); background: var(--ds-surface); color: var(--ds-ink-2); cursor: pointer; }
.ds-platform-switch button.active { background: var(--ds-brand); border-color: var(--ds-brand); color: var(--ds-brand-on); }

/* ───────────────────────────────────────────────────────────────
   ۸) واکنشگرا
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) { .ds-ops { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 860px) {
  .ds-grid-2, .ds-grid-3 { grid-template-columns: 1fr; }
  .ds-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ds-ops { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ds-success-actions { margin-inline-start: 0; width: 100%; }
  html body.ds-app .customer-content { padding: 16px 12px 100px !important; }
}
@media (max-width: 700px) {
  .ds-table-wrap { display: none; }
  .ds-mobile-list { display: block; padding: 0 14px 14px; }
  .ds-mrow { padding: 13px 14px; border: 1px solid var(--ds-line); border-radius: var(--ds-r); margin-bottom: 9px; background: var(--ds-surface); }
  .ds-mrow-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
  .ds-mrow-title { font-size: 12.5px; font-weight: 700; color: var(--ds-ink); }
  .ds-mrow-amount { font-size: 13px; font-weight: 800; white-space: nowrap; }
  .ds-mrow-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--ds-ink-3); margin-top: 7px; }
  .ds-mrow-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--ds-ink-2); border-top: 1px dashed var(--ds-line); margin-top: 9px; padding-top: 8px; }
  .ds-ops { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ds-pagehead h1 { font-size: 19px; }
  .ds-card { padding: 16px 14px; }
  .ds-filters { padding: 14px; }
  .ds-kpi-value { font-size: 16px; }
}
@media print {
  .ds-filters, .ds-pager, .ds-btn, .bottom-nav, .mobile-nav, .sidebar, .header, .customer-header { display: none !important; }
  html body.ds-app { background: var(--ds-surface) !important; }
  .ds-card { box-shadow: none !important; border: 0 !important; }
  .ds-table-wrap { display: block !important; }
  .ds-mobile-list { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   الحاقات نسخه ۳ — صدور سند کامل (الگوبرداری از سامانه حسابداری مرجع)
   ═══════════════════════════════════════════════════════════════ */
.ds-head-actions { display:flex; gap:9px; flex-wrap:wrap; }
.ds-grid-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.ds-readonly-sm { font-size:12.5px; padding:9px 11px; }
.ds-btn-sm { padding:6px 11px; font-size:11.5px; border-radius:8px; }
.ds-alert-info { background:var(--ds-info-soft); color:var(--ds-info); border-color:transparent; }
.ds-req { color:var(--ds-neg); }
.ds-link { background:none; border:0; color:inherit; text-decoration:underline; font-family:inherit; font-size:12px; font-weight:800; cursor:pointer; padding:0 3px; }
.ds-tag-soft { font-size:10px; font-weight:700; padding:3px 9px; border-radius:6px; background:var(--ds-surface-3); color:var(--ds-ink-2); border:1px solid var(--ds-line); }
.ds-ops-7 { grid-template-columns:repeat(7,minmax(0,1fr)); }
.ds-ops-7 .ds-op { padding:12px 10px; }
.ds-ops-7 .ds-op-t { font-size:11.5px; }
.ds-ops-7 .ds-op-d { font-size:9.5px; }
.ds-ops-8 { grid-template-columns:repeat(8,minmax(0,1fr)); }
.ds-ops-8 .ds-op { padding:11px 9px; }
.ds-ops-8 .ds-op-t { font-size:11px; }
.ds-ops-8 .ds-op-d { font-size:9px; }
.ds-ops-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.ds-ops-4 .ds-op { padding:15px 13px; }
.ds-ops-4 .ds-op-t { font-size:13px; }
.ds-ops-4 .ds-op-d { font-size:10px; }
.ds-op-key { position:absolute; top:6px; inset-inline-end:8px; font-size:9px; font-weight:800; color:var(--ds-ink-3); }
.ds-op { position:relative; }
.ds-settles { display:flex; flex-wrap:wrap; gap:8px; }
.ds-settle { display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border:1px solid var(--ds-line); border-radius:999px; background:var(--ds-surface); color:var(--ds-ink-2); font-family:inherit; font-size:11.5px; font-weight:700; cursor:pointer; transition:background .15s,border-color .15s,color .15s; }
.ds-settle svg { color:var(--ds-ink-3); }
.ds-settle:hover { border-color:var(--ds-line-strong); background:var(--ds-surface-2); }
/* نمایش ماندهٔ طرف زیر فیلد انتخاب (دید صرافی) */
.ds-bal { display:block; margin-top:5px; font-size:10.5px; line-height:1.5; color:var(--ds-ink-3); }
.ds-bal .neg { color:var(--ds-neg); font-weight:700; }
.ds-bal .pos { color:var(--ds-pos); font-weight:700; }
.ds-bal-legend { margin-top:9px; font-size:11px; color:var(--ds-ink-3); }
.ds-bal-legend .neg { color:var(--ds-neg); }
.ds-bal-legend .pos { color:var(--ds-pos); }
.ds-settle.active { background:var(--ds-brand); border-color:var(--ds-brand); color:var(--ds-brand-on); }
.ds-settle.active svg { color:var(--ds-brand-on); }
.ds-rate-switch { display:flex; gap:5px; margin-top:6px; }
.ds-rate-switch button { flex:1; font-family:inherit; font-size:10px; font-weight:700; padding:4px 6px; border:1px solid var(--ds-line); border-radius:6px; background:var(--ds-surface-2); color:var(--ds-ink-2); cursor:pointer; }
.ds-rate-switch button.active { background:var(--ds-brand-soft); border-color:var(--ds-brand); color:var(--ds-brand); }
.ds-journal td small.ds-muted { color:var(--ds-ink-3); }
.ds-summary { margin-top:14px; border-top:1px solid var(--ds-line); padding-top:12px; }
.ds-summary-total { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ds-ink-2); margin-top:8px; }
.ds-summary-total b { font-size:16px; color:var(--ds-ink); font-weight:800; }
@media(max-width:1100px){ .ds-ops-7, .ds-ops-8, .ds-ops-4 { grid-template-columns:repeat(2,minmax(0,1fr)); } .ds-grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px){ .ds-ops-7, .ds-ops-8, .ds-ops-4 { grid-template-columns:1fr; } .ds-grid-4 { grid-template-columns:1fr; } }

/* ═══════════════════════════════════════════════════════════════
   ۹) تصحیح جهت پیکانهای جهتدار در محیط RTL
   ───────────────────────────────────────────────────────────────
   آیکونهای forward / back / arrow برای حالت LTR ترسیم شدهاند (رو به
   راست). در رابط فارسی (rtl) جریان خواندن از راست به چپ است؛ پس
   پیکانهای جهتدار (مبدأ→مقصد، قبلی/بعدی، جریان دارایی) باید قرینه
   شوند تا درست نشان داده شوند. تصویرِ قبل از اصلاح: فلش رو به راست در
   کنار «مبدأ» میایستاد و از مقصد دور میشد — یعنی برعکس.
   ═══════════════════════════════════════════════════════════════ */
html[dir="rtl"] .ds-row-arrow svg,
html[dir="rtl"] .ds-flow-arrow svg,
html[dir="rtl"] .dv-arrow svg,
html[dir="rtl"] .ds-pager .ds-btn svg { transform: scaleX(-1); }

/* ───────────────────────────────────────────────────────────────
   ۱۰) سازگاری ناوبری و هدر اپلیکیشن موبایل با سیستم «دفتر»
   (متغیرهای تاریکِ legacy در mobile.php را با متغیرهای ds جایگزین
    میکند تا رنگبندی با بقیه سایت یکدست شود — روشن یا تاریک)
   ─────────────────────────────────────────────────────────────── */
html body.ds-app .mobile-header {
    background: var(--ds-surface) !important;
    border-bottom: 1px solid var(--ds-line) !important;
    box-shadow: none !important;
    padding: 11px 16px !important;
}
html body.ds-app .mobile-header .brand-name { color: var(--ds-brand) !important; font-weight: 800 !important; }
html body.ds-app .mobile-header .brand-sub { color: var(--ds-ink-3) !important; font-size: 10.5px !important; }
html body.ds-app .admin-status {
    background: var(--ds-surface-3) !important; color: var(--ds-ink-2) !important;
    border: 1px solid var(--ds-line) !important;
}
html body.ds-app .admin-status .dot.online { background: var(--ds-pos) !important; }
html body.ds-app .logout-btn {
    background: var(--ds-surface-2) !important; color: var(--ds-ink-2) !important;
    border: 1px solid var(--ds-line) !important; border-radius: var(--ds-r) !important;
    font-size: 11px !important; font-weight: 700 !important; padding: 6px 13px !important;
}
html body.ds-app .logout-btn:active { background: var(--ds-neg) !important; color: var(--ds-neg-on) !important; transform: none !important; }
/* حذف پرشِ دکمهها هنگام لمس (scale روی المانهای تعاملی) */
html body.ds-app .nav-item:active,
html body.ds-app .logout-btn:active,
html body.ds-app .asset-item:active,
html body.ds-app .tx-item:active,
html body.ds-app .glass-card:active { transform: none !important; }

/* ═══════════════════════════════════════════════════
   ۱۱) یکپارچهسازی سراسری — بازپوستاندن کلاسهای legacy
   (صرافیای رمزارزی) روی توکنهای سیستم «دفتر»
   ───────────────────────────────────────────────────────────────
   هدف: صفحهٔ صدور سند (که کاملاً با ds- نوشته شده) دیگر «تنها»
   بخشِ هماهنگ نباشد؛ همهٔ صفحات مشتری/ادمین از همان زبان بصری
   (سطوح روشن، خط مویین، برند سرمهای، رنگ فقط برای معنا) استفاده
   کنند. تمام قواعد با !important آورده شدهاند تا بر متغیرهای
   تمِ legacy (theme-variables.css که روی body/table/input مهم
   گذاشته) و فایلهای main/ui/app/desktop/mobile غلبه کنند.
   طبق قرارداد روی کلاس (نه المنتِ table) هدفگیری شدهاند تا
   .ds-table/.ds-card/.ds-btn دستنخورده بمانند.
   ═══════════════════════════════════════════════════ */

/* ── ۱۱-۱) دکمهها (کلاس .btn و متغیرها) ── */
html body.ds-app .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px; border-radius: var(--ds-r); border: 1px solid transparent;
    font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
    text-decoration: none !important; line-height: 1.6;
    transition: background .15s, border-color .15s, color .15s; color: var(--ds-ink) !important;
}
html body.ds-app .btn svg { flex: none; width: 16px; height: 16px; }
html body.ds-app .btn:active { transform: none !important; }
html body.ds-app .btn-primary { background: var(--ds-brand) !important; color: var(--ds-brand-on) !important; border-color: var(--ds-brand) !important; }
html body.ds-app .btn-primary:hover { background: var(--ds-brand-hover) !important; color: var(--ds-brand-on) !important; }
html body.ds-app .btn-success { background: var(--ds-pos) !important; color: var(--ds-pos-on) !important; border-color: var(--ds-pos) !important; }
html body.ds-app .btn-success:hover { filter: brightness(.96); }
html body.ds-app .btn-danger { background: var(--ds-neg) !important; color: var(--ds-neg-on) !important; border-color: var(--ds-neg) !important; }
html body.ds-app .btn-danger:hover { filter: brightness(.96); }
html body.ds-app .btn-warning { background: var(--ds-warn) !important; color: var(--ds-warn-on) !important; border-color: var(--ds-warn) !important; }
html body.ds-app .btn-outline { background: transparent !important; color: var(--ds-brand) !important; border: 1px solid var(--ds-line-strong) !important; }
html body.ds-app .btn-outline:hover { background: var(--ds-brand-soft) !important; color: var(--ds-brand) !important; }
html body.ds-app .btn-ghost { background: transparent !important; color: var(--ds-ink-2) !important; border: 1px solid var(--ds-line) !important; }
html body.ds-app .btn-ghost:hover { background: var(--ds-surface-2) !important; color: var(--ds-ink) !important; }
html body.ds-app .btn-sm { padding: 6px 11px; font-size: 11.5px; border-radius: 8px; }
html body.ds-app .btn-lg { padding: 13px 26px; font-size: 14px; }
html body.ds-app .btn-block { width: 100%; }
html body.ds-app .btn:disabled { opacity: .45 !important; cursor: not-allowed; }

/* ── ۱۱-۲) جداول (کلاس .table و المنت table بدون ds-table) ── */
html body.ds-app .table,
html body.ds-app table:not(.ds-table) {
    width: 100%; border-collapse: collapse; font-size: 12.5px;
    background: var(--ds-surface) !important; color: var(--ds-ink) !important;
}
html body.ds-app .table th,
html body.ds-app table:not(.ds-table) th {
    background: var(--ds-surface-2) !important; color: var(--ds-ink-2) !important;
    font-weight: 800; font-size: 11px; text-align: right; padding: 11px 14px; white-space: nowrap;
    border-bottom: 1px solid var(--ds-line) !important; border-inline-start: 0; border-inline-end: 0;
}
html body.ds-app .table td,
html body.ds-app table:not(.ds-table) td {
    padding: 12px 14px; border-bottom: 1px solid var(--ds-line) !important;
    color: var(--ds-ink) !important; vertical-align: middle; background: transparent !important;
}
html body.ds-app .table tbody tr:hover,
html body.ds-app table:not(.ds-table) tbody tr:hover { background: var(--ds-surface-2) !important; }
html body.ds-app .table tbody tr:last-child td,
html body.ds-app table:not(.ds-table) tbody tr:last-child td { border-bottom: 0 !important; }
html body.ds-app .table-container,
html body.ds-app .table-wrapper { overflow-x: auto; border: 0 !important; box-shadow: none !important; background: var(--ds-surface) !important; border-radius: var(--ds-r-lg); }

/* ── ۱۱-۳) وضعیتها (status-*) → چیپهای معنایی ── */
html body.ds-app .status-pending,
html body.ds-app .status-expired,
html body.ds-app .status-approved,
html body.ds-app .status-rejected {
    display: inline-block; padding: 4px 11px; border-radius: 999px;
    font-size: 11px; font-weight: 800; white-space: nowrap; border: 1px solid transparent !important;
}
html body.ds-app .status-pending { background: var(--ds-warn-soft) !important; color: var(--ds-warn) !important; }
html body.ds-app .status-approved { background: var(--ds-pos-soft) !important; color: var(--ds-pos) !important; }
html body.ds-app .status-rejected { background: var(--ds-neg-soft) !important; color: var(--ds-neg) !important; }
html body.ds-app .status-expired { background: var(--ds-surface-3) !important; color: var(--ds-ink-3) !important; border-color: var(--ds-line) !important; }

/* ── ۱۱-۴) سربرگ صفحه، عنوان کارت، عنوان بخش ── */
html body.ds-app .page-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-bottom: 22px; padding: 0; border: 0; background: none;
}
html body.ds-app .page-header h1 { font-size: 22px; margin: 0; }
html body.ds-app .card-title {
    color: var(--ds-ink) !important; font-size: 15px; font-weight: 800;
    display: flex; align-items: center; gap: 9px; margin: 0 0 14px; border: 0; background: none; padding: 0;
}
html body.ds-app .card-title svg { color: var(--ds-brand); flex: none; }
html body.ds-app .section-title {
    color: var(--ds-ink) !important; font-size: 16px; font-weight: 800;
    margin: 16px 0 12px; display: flex; align-items: center; gap: 8px;
}

/* ── ۱۱-۵) کارتهای legacy باقیمانده (glass-card و غیره) ── */
html body.ds-app .glass-card {
    background: var(--ds-surface) !important; border: 1px solid var(--ds-line) !important;
    border-radius: var(--ds-r-lg) !important; box-shadow: var(--ds-shadow) !important;
    padding: 16px; margin-bottom: 14px; backdrop-filter: none !important;
}

/* ── ۱۱-۶) کارتهای آمار (داشبورد مشتری و ادمین) ── */
html body.ds-app .dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
html body.ds-app .stat-item {
    background: var(--ds-surface) !important; border: 1px solid var(--ds-line) !important;
    border-radius: var(--ds-r-lg) !important; padding: 20px; text-align: center; box-shadow: var(--ds-shadow) !important;
    transition: none !important;
}
html body.ds-app .stat-item:hover { transform: none !important; border-color: var(--ds-line) !important; box-shadow: var(--ds-shadow) !important; }
html body.ds-app .stat-icon {
    width: 46px; height: 46px; border-radius: var(--ds-r); display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px; font-size: 22px; background: var(--ds-brand-soft) !important; color: var(--ds-brand) !important;
}
html body.ds-app .stat-icon.gold { background: var(--ds-brass-soft) !important; color: var(--ds-brass) !important; }
html body.ds-app .stat-icon.green { background: var(--ds-pos-soft) !important; color: var(--ds-pos) !important; }
html body.ds-app .stat-icon.blue { background: var(--ds-info-soft) !important; color: var(--ds-info) !important; }
html body.ds-app .stat-number { font-size: 26px; font-weight: 800; color: var(--ds-ink) !important; direction: ltr; }
html body.ds-app .stat-label { font-size: 12px; color: var(--ds-ink-2) !important; margin-top: 8px; }

/* ── ۱۱-۷) ناوبری پایین اپلیکیشن موبایل (bottom-nav / nav-item) ── */
html body.ds-app .bottom-nav {
    background: var(--ds-surface) !important; border-top: 1px solid var(--ds-line) !important;
    box-shadow: var(--ds-shadow-soft) !important;
}
html body.ds-app .nav-item { color: var(--ds-ink-3) !important; }
html body.ds-app .nav-item.active { color: var(--ds-brand) !important; }
html body.ds-app .nav-item.active svg { color: var(--ds-brand) !important; }
html body.ds-app .nav-item.active::before { background: var(--ds-brand) !important; }
html body.ds-app .nav-item .badge { background: var(--ds-neg) !important; color: var(--ds-neg-on) !important; }

/* ── ۱۱-۸) ورودیهای عمومی (input/select/textarea) روی توکنهای دفتر ── */
html body.ds-app input:not(.ds-field input),
html body.ds-app select:not(.ds-field select),
html body.ds-app textarea:not(.ds-field textarea) {
    background: var(--ds-surface) !important; color: var(--ds-ink) !important;
    border: 1px solid var(--ds-line-strong) !important; border-radius: var(--ds-r) !important;
    font-family: inherit; padding: 9px 12px; transition: border-color .15s, box-shadow .15s;
}
html body.ds-app input:not(.ds-field input):focus,
html body.ds-app select:not(.ds-field select):focus,
html body.ds-app textarea:not(.ds-field textarea):focus {
    border-color: var(--ds-brand) !important; box-shadow: 0 0 0 3px var(--ds-brand-soft) !important; outline: none;
}

/* ═══════════════════════════════════════════════════
   ۱۲) بازنگاشت متغیرهای تمِ legacy → توکنهای «دفتر»
   ───────────────────────────────────────────────────────────────
   بسیاری از ویوها (داشبورد، تحلیل، تراکنش، تنظیمات فروشنده…)
   رنگ/پسزمینه را با var(--bg-secondary) و مانند آن «اینلاین» ست
   میکنند؛ استایل اینلاین بر شیته غلبه میکند، پس با قواعد معمولی
   بازنویسی نمیشود. راهحل تمیز: نقشهبرداری نامهای متغیرهای قدیمی
   به توکنهای ds — با !important تا بر تعاریف :root[data-theme]
   نیز غلبه کند. بدینترتیب هر var(--bg-secondary) /
   var(--border-color) / var(--accent-color) … خودبهخود روی زبان
   بصری «دفتر» حل میشود، بدون دستزدن به پروندههای ویو.
   (--ui-* چون به همین متغیرها ارجاع میدهد، خودکار اصلاح میشود.)
   ═══════════════════════════════════════════════════ */
html body.ds-app {
    /* پسزمینهها */
    --bg-primary: var(--ds-bg) !important;
    --bg-secondary: var(--ds-surface) !important;
    --bg-tertiary: var(--ds-surface-2) !important;
    --bg-hover: var(--ds-surface-3) !important;
    --bg-card: var(--ds-surface) !important;
    --bg-input: var(--ds-surface) !important;
    /* حاشیهها */
    --border-color: var(--ds-line) !important;
    --border-color-light: var(--ds-line-strong) !important;
    /* متن */
    --text-primary: var(--ds-ink) !important;
    --text-secondary: var(--ds-ink-2) !important;
    --text-muted: var(--ds-ink-3) !important;
    --text-inverse: var(--ds-bg) !important;
    /* برند و وضعیت */
    --accent-color: var(--ds-brand) !important;
    --accent-hover: var(--ds-brand-hover) !important;
    --color-primary: var(--ds-brand) !important;
    --color-primary-light: var(--ds-brand-soft) !important;
    --color-primary-hover: var(--ds-brand-hover) !important;
    --success-color: var(--ds-pos) !important;
    --error-color: var(--ds-neg) !important;
    --color-success: var(--ds-pos) !important;
    --color-success-light: var(--ds-pos-soft) !important;
    --color-danger: var(--ds-neg) !important;
    --color-danger-light: var(--ds-neg-soft) !important;
    --color-warning: var(--ds-warn) !important;
    --color-warning-light: var(--ds-warn-soft) !important;
    --color-info: var(--ds-info) !important;
    --color-info-light: var(--ds-info-soft) !important;
    /* سایهها و لایهها */
    --shadow-sm: var(--ds-shadow) !important;
    --shadow-md: var(--ds-shadow) !important;
    --shadow-lg: var(--ds-shadow) !important;
    --overlay: var(--ds-overlay) !important;
    --modal-bg: var(--ds-surface) !important;
}

/* ═══════════════════════════════════════════════════
   ۱۳) فلش‌های جهتی در RTL آینه می‌شوند
   ───────────────────────────────────────────────────────────────
   آیکون‌های arrow / forward / back / return در اصل برای LTR
   طراحی شده‌اند؛ در صفحهٔ راست‌به‌چپ باید آینه شوند تا مسیر
   حرکت وجه (راست → چپ) و دکمهٔ «بازگشت» درست دیده شوند.
   ═══════════════════════════════════════════════════ */
[dir="rtl"] svg.dir-ico { transform: scaleX(-1); }