/* ===== فونت: IRANSansX با ارقام فارسی (FaNum) ===== */
@font-face { font-family: 'IRANSansXFaNum'; src: url('/fonts/IRANSansX/IRANSansXFaNum-Thin.woff2') format('woff2'), url('/fonts/IRANSansX/IRANSansXFaNum-Thin.woff') format('woff'); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansXFaNum'; src: url('/fonts/IRANSansX/IRANSansXFaNum-Light.woff2') format('woff2'), url('/fonts/IRANSansX/IRANSansXFaNum-Light.woff') format('woff'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansXFaNum'; src: url('/fonts/IRANSansX/IRANSansXFaNum-Regular.woff2') format('woff2'), url('/fonts/IRANSansX/IRANSansXFaNum-Regular.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansXFaNum'; src: url('/fonts/IRANSansX/IRANSansXFaNum-Medium.woff2') format('woff2'), url('/fonts/IRANSansX/IRANSansXFaNum-Medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansXFaNum'; src: url('/fonts/IRANSansX/IRANSansXFaNum-Bold.woff2') format('woff2'), url('/fonts/IRANSansX/IRANSansXFaNum-Bold.woff') format('woff'); font-weight: bold; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansXFaNum'; src: url('/fonts/IRANSansX/IRANSansXFaNum-Black.woff2') format('woff2'), url('/fonts/IRANSansX/IRANSansXFaNum-Black.woff') format('woff'); font-weight: 900; font-style: normal; font-display: swap; }

/* ===== رنگ‌ها و اندازه‌ها =====
   cream و sage همان دو رنگ انتخابی‌اند؛ olive و moss برای متن و دکمه‌ها با کنتراست کافی */
:root {
    --cream: #EDEBCB;      /* rgb(237,235,203) */
    --sage: #D6DAA3;       /* rgb(214,218,163) */
    --paper: #F8F7EC;
    --surface: #FFFFFF;
    --olive: #7C8340;
    --moss: #474C22;
    --ink: #2A2C1C;
    --muted: #6E7158;
    --line: #E4E2C6;
    --sell: #A8443A;       /* فروش به مشتری */
    --buy: #2F7048;        /* خرید از مشتری */
    --radius-lg: 22px;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 6px 24px rgba(71, 76, 34, .08);
    --font: "IRANSansXFaNum", Tahoma, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }
html, body { font-family: var(--font); color: var(--ink); background: var(--paper); }
body { font-size: .95rem; line-height: 1.8; }
.btn, .form-control, .form-select, input, select, textarea, button { font-family: var(--font); }
a { color: var(--moss); }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.num { font-feature-settings: "tnum"; direction: rtl; unicode-bidi: plaintext; }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.text-muted-2 { color: var(--muted) !important; }
.text-sell { color: var(--sell) !important; }
.text-buy { color: var(--buy) !important; }

/* ===== دکمه‌ها و فرم ===== */
.btn { border-radius: var(--radius-sm); font-weight: 500; padding: .55rem 1.1rem; }
.btn-primary { background: var(--moss); border-color: var(--moss); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: #3a3f1b; border-color: #3a3f1b; }
.btn-soft { background: var(--cream); color: var(--moss); border: 1px solid var(--sage); }
.btn-soft:hover { background: var(--sage); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--cream); color: var(--ink); }
.btn-ghost:disabled { opacity: .55; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line); padding: .6rem .85rem; background-color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--olive); box-shadow: 0 0 0 .2rem rgba(124, 131, 64, .2); }
.form-label { font-weight: 500; font-size: .88rem; margin-bottom: .3rem; }
.input-group-text { background: var(--cream); border-color: var(--line); color: var(--muted); font-size: .85rem; }
.form-check-input:checked { background-color: var(--moss); border-color: var(--moss); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.field-validation-error, .text-danger { color: var(--sell) !important; font-size: .82rem; }

.card-x { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-x .card-x-body { padding: 1.1rem 1.15rem; }
.section-title { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.02rem; margin: 1.6rem 0 .8rem; }
.section-title .ico { width: 36px; height: 36px; border-radius: 11px; background: var(--sage); color: var(--moss); display: grid; place-items: center; font-size: .95rem; }
.page-title { font-weight: 900; font-size: 1.25rem; margin: .2rem 0 1rem; }

.badge-x { display: inline-block; font-size: .74rem; font-weight: 500; padding: .15rem .6rem; border-radius: 99px; background: var(--cream); color: var(--moss); }
.badge-x.ok { background: #E3EFE3; color: var(--buy); }
.badge-x.off { background: #F3E3E0; color: var(--sell); }
.badge-x.wait { background: #FFF2CC; color: #7A5C00; }

/* تب‌ها: قرص‌های افقی قابل اسکرول */
.pills { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pills .nav-link { white-space: nowrap; border-radius: 99px; padding: .4rem 1rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); font-size: .88rem; }
.pills .nav-link.active { background: var(--moss); border-color: var(--moss); color: #fff; }
.pills.small .nav-link { padding: .25rem .8rem; font-size: .82rem; }

.alert { border-radius: var(--radius); border: 0; }
.alert-success { background: #E3EFE3; color: #1F4D31; }
.alert-danger { background: #F6E4E1; color: #6E2A23; }
.alert-info { background: var(--cream); color: var(--moss); }

/* ===== قیمت زنده (عنصر شاخص صفحه) ===== */
.ticker { background: linear-gradient(160deg, var(--cream), var(--sage)); border-radius: 0 0 28px 28px; padding: 1rem 1rem 1.4rem; margin: 0 -1rem 0; }
.ticker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; }
.ticker-head .live { font-size: .8rem; color: var(--moss); display: inline-flex; align-items: center; gap: .4rem; }
.ticker-head .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--buy); }
.ticker-head .live.down::before { background: var(--sell); }
.quote { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255, 255, 255, .78); border-radius: var(--radius-lg); overflow: hidden; }
.quote > div { padding: 1rem .9rem; }
.quote > div + div { border-right: 1px solid var(--line); }
.quote .label { font-size: .82rem; color: var(--muted); }
.quote .price { font-weight: 900; font-size: clamp(1.35rem, 5.4vw, 2rem); line-height: 1.5; letter-spacing: -.01em; }
.quote .unit { font-size: .78rem; color: var(--muted); }
.quote .state { font-size: .74rem; margin-top: .2rem; }
.quote .price.flash { animation: flash .9s ease; }
@keyframes flash { 0% { background: rgba(214, 218, 163, .9); } 100% { background: transparent; } }
.ticker-foot { font-size: .76rem; color: var(--muted); margin-top: .6rem; text-align: center; }
@media (min-width: 992px) { .ticker { border-radius: var(--radius-lg); margin: 0; padding: 1.3rem; } }

/* ===== قیمت‌گذاری ===== */
.side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; background: var(--paper); }
.side-box + .side-box { margin-top: .8rem; }
.side-box .side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; font-weight: 700; }
.side-box .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: .45rem; }

/* ===== تاریخچه ===== */
.log-row { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-row .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--moss); font-size: .8rem; }
.log-row .what { font-weight: 500; font-size: .88rem; }
.log-row .who { font-size: .76rem; color: var(--muted); }
.log-row .when { font-size: .76rem; color: var(--muted); text-align: left; }

/* ===== کاشی دسترسی سریع ===== */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem .6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; text-align: center; text-decoration: none; color: var(--ink); font-size: .86rem; font-weight: 500; }
.tile i { font-size: 1.25rem; color: var(--olive); width: auto; margin: 0; }
.tile:hover { background: var(--cream); color: var(--ink); }

/* ===== لیست کارتی (مشتریان، نشست‌ها، ...) ===== */
.item-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .95rem 1rem; }
.item-card + .item-card { margin-top: .7rem; }
.item-card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.item-card .name { font-weight: 700; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1rem; margin: .7rem 0; font-size: .84rem; }
.kv .k { color: var(--muted); font-size: .76rem; display: block; }
.balances { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.balances > div { background: var(--paper); border-radius: var(--radius-sm); padding: .45rem .7rem; }
.balances .k { font-size: .74rem; color: var(--muted); }
.balances .v { font-weight: 700; }
.actions { display: flex; gap: .45rem; margin-top: .75rem; }
/* دکمه‌های داخل کارت‌ها (تأیید/رد و ...)؛ سرصفحه استایل جدای خودش را دارد */
.actions .btn { flex: 1; padding: .55rem .6rem; font-size: .86rem; }
.soon { font-size: .66rem; display: block; color: var(--muted); font-weight: 400; }
.dropdown-menu { border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow); font-size: .9rem; }
.dropdown-item { padding: .5rem 1rem; }
.dropdown-item.danger { color: var(--sell); }

.table-x { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.table-x th { background: var(--cream); font-weight: 500; font-size: .82rem; color: var(--moss); padding: .7rem .8rem; white-space: nowrap; }
.table-x td { padding: .7rem .8rem; border-top: 1px solid var(--line); font-size: .88rem; vertical-align: middle; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }

/* ===== فهرست تنظیمات (مثل صفحه‌ی پروفایل اپ‌ها) ===== */
.menu-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: .85rem; padding: .95rem 1.05rem; color: var(--ink); text-decoration: none; width: 100%; background: none; border: 0; text-align: right; }
.menu-list > * + * { border-top: 1px solid var(--line); }
.menu-list .ico { width: 38px; height: 38px; border-radius: 12px; background: var(--cream); color: var(--moss); display: grid; place-items: center; }
.menu-list .title { flex: 1; font-weight: 500; }
.menu-list .hint { display: block; font-size: .76rem; color: var(--muted); font-weight: 400; }
.menu-list .chev { color: var(--muted); font-size: .8rem; }
.menu-list a:hover, .menu-list button:hover { background: var(--paper); }

/* ===== فیلتر ===== */
.filter-bar { display: flex; gap: .5rem; }
.filter-bar .form-control { flex: 1; }

/* ===== صفحه‌بندی ===== */
.paging { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin: 1.2rem 0 .5rem; }
.paging .status { font-size: .82rem; color: var(--muted); }
.paging .size { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); }
.paging .size select { width: auto; padding-block: .3rem; font-size: .82rem; }
.pager { display: flex; justify-content: center; gap: .35rem; flex-wrap: wrap; }
.pager .gap { border: 0; background: transparent; min-width: 20px; }
.pager a, .pager span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: .85rem; padding: 0 .6rem; }
.pager .active { background: var(--moss); color: #fff; border-color: var(--moss); }

/* ===== پنل مدیر فروشگاه: موبایل + دسکتاپ ===== */
.app-admin .content { padding: 0 1rem 7.5rem; max-width: 1100px; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; background: var(--cream); position: sticky; top: 0; z-index: 20; }
.topbar .brand { display: flex; align-items: center; gap: .6rem; font-weight: 900; }
.topbar .brand .logo { width: 38px; height: 38px; border-radius: 12px; background: var(--moss); color: var(--cream); display: grid; place-items: center; }
.topbar .icon-btn { width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 0; display: grid; place-items: center; color: var(--moss); }

.tabbar { position: fixed; bottom: 12px; right: 12px; left: 12px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); display: flex; justify-content: space-around; align-items: flex-end; padding: .45rem .4rem calc(.45rem + env(safe-area-inset-bottom)); }
.tabbar a, .tabbar span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1rem; text-decoration: none; color: var(--muted); font-size: .74rem; }
.tabbar i { font-size: 1.12rem; }
.tabbar .active { color: var(--moss); font-weight: 700; }
.tabbar .disabled { opacity: .45; }
.tabbar .center i { width: 54px; height: 54px; border-radius: 18px; background: var(--moss); color: var(--cream); display: grid; place-items: center; margin-top: -26px; box-shadow: 0 8px 18px rgba(71, 76, 34, .3); font-size: 1.3rem; }
.tabbar .center.active i { background: var(--olive); }

.side { position: fixed; top: 0; right: 0; bottom: 0; width: 250px; background: var(--surface); border-left: 1px solid var(--line); flex-direction: column; padding: 1.2rem .9rem; z-index: 30; }
.side .brand { display: flex; align-items: center; gap: .6rem; font-weight: 900; padding: 0 .4rem 1.2rem; }
.side .brand .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--moss); color: var(--cream); display: grid; place-items: center; }
.side nav a, .side nav span { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 12px; color: var(--ink); text-decoration: none; margin-bottom: .15rem; }
.side nav i { width: 20px; text-align: center; color: var(--olive); }
.side nav a:hover { background: var(--paper); }
.side nav a.active { background: var(--cream); font-weight: 700; color: var(--moss); }
.side nav .disabled { color: var(--muted); opacity: .6; }
.side .bottom { margin-top: auto; }
@media (min-width: 992px) {
    .with-side { margin-right: 250px; }
    .app-admin .content { padding: 1.4rem 1.6rem 2rem; }
    .app-admin .topbar { background: transparent; position: static; padding: 1.2rem 1.6rem 0; }
}

/* ===== پنل مشتری: همیشه ستون موبایلی ===== */
body.app-customer { background: #fff; }
.phone { max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--paper); position: relative; }
.phone .content { padding: 0 1rem 2rem; }


/* ===== پنل پشتیبانی: فقط دسکتاپ ===== */
.app-support { min-width: 1024px; }
.app-support .content { padding: 1.6rem 2rem 2rem; }

/* ===== صفحه‌ی ورود ===== */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; background: radial-gradient(circle at 80% 0%, var(--sage), var(--cream) 55%, var(--paper)); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 26px; padding: 1.7rem 1.5rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.2rem; font-weight: 900; margin-bottom: .3rem; }
.auth-card .lead-x { color: var(--muted); font-size: .88rem; margin-bottom: 1.2rem; }
.auth-card .terms { font-size: .78rem; color: var(--muted); margin-top: 1rem; }
.otp-input { letter-spacing: .6em; text-align: center; font-size: 1.3rem; font-weight: 700; direction: ltr; }
.mobile-input { direction: ltr; text-align: center; font-size: 1.1rem; letter-spacing: .08em; }

.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty i { font-size: 1.8rem; color: var(--sage); display: block; margin-bottom: .5rem; }

/* ===== لوگو ===== */
.logo-preview { width: 72px; height: 72px; border-radius: 18px; background: var(--cream); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; color: var(--olive); font-size: 1.4rem; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.brand .logo img, .brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; background: #fff; }
.brand .logo:has(img) { background: #fff; }

/* ===== پنل مشتری: ورود ===== */
/* صفحه‌های ورود: ساده، بدون پس‌زمینه‌ی تزئینی و بدون کارت */
.guest { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 2.4rem 1.3rem; background: var(--paper); }
.guest .card-x { border: 0; background: transparent; box-shadow: none; }
.guest .card-x .card-x-body { padding: 0 .4rem; }
.terms-note { font-size: .8rem; color: var(--muted); text-align: center; margin: 1.6rem 0 0; line-height: 2; }
.guest .store { text-align: center; margin-bottom: 1.4rem; }
.guest .store .brand-logo { width: 88px; height: 88px; border-radius: 26px; background: var(--moss); color: var(--cream); display: grid; place-items: center; margin: 0 auto .7rem; font-size: 2rem; overflow: hidden; box-shadow: var(--shadow); }
.guest .store .brand-logo:has(img) { background: #fff; }
.guest .store .name { font-weight: 900; font-size: 1.15rem; }

/* ===== پنل مشتری: نوار پایین داخل قاب گوشی ===== */
.app-customer .tabbar { right: auto; left: 50%; transform: translateX(-50%); width: min(456px, calc(100% - 24px)); }
.app-customer .phone .content { padding-bottom: 7.5rem; }

/* ===== پنل مشتری: خانه ===== */
.balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.balance-card { border-radius: var(--radius-lg); padding: .95rem 1rem; background: linear-gradient(160deg, var(--cream), var(--sage)); }
.balance-card .k { font-size: .8rem; color: var(--moss); }
.balance-card .v { font-weight: 900; font-size: 1.2rem; line-height: 1.6; }
.balance-card .u { font-size: .74rem; color: var(--muted); }
.half-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .8rem; }
.half-actions .btn { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-radius: var(--radius); }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem 0; }
.price-row + .price-row { border-top: 1px dashed var(--line); }
.price-row .k { font-size: .82rem; color: var(--muted); }
.price-row .v { font-weight: 900; font-size: 1.15rem; }
.price-row .btn { min-width: 112px; }
.chart-placeholder { border: 2px dashed var(--sage); border-radius: var(--radius-lg); min-height: 170px; display: grid; place-items: center; color: var(--muted); text-align: center; background: var(--surface); }
.chart-placeholder i { font-size: 1.6rem; color: var(--olive); display: block; margin-bottom: .4rem; }
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .9rem .5rem; text-align: center; font-size: .82rem; color: var(--ink); opacity: .8; }
.service i { display: block; font-size: 1.2rem; color: var(--olive); margin-bottom: .4rem; }

/* ===== کارت بانکی ===== */
.bank-card { position: relative; border-radius: 20px; padding: 1.1rem 1.2rem; color: #fff; background: linear-gradient(135deg, var(--moss), var(--olive)); box-shadow: 0 10px 24px rgba(71, 76, 34, .22); overflow: hidden; }
.bank-card + .bank-card { margin-top: .9rem; }
.bank-card::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .08); left: -50px; top: -70px; }
.bank-card.inactive { background: linear-gradient(135deg, #8b8d7a, #a7a993); }
.bank-card .top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.bank-card .bank { font-weight: 700; }
.bank-card .card-no { direction: ltr; text-align: center; font-size: 1.15rem; letter-spacing: .12em; margin: 1rem 0 .7rem; font-feature-settings: "tnum"; position: relative; z-index: 1; }
.bank-card .sheba { direction: ltr; font-size: .8rem; opacity: .9; text-align: left; position: relative; z-index: 1; }
.bank-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: .76rem; opacity: .9; margin-top: .6rem; position: relative; z-index: 1; }
.bank-card .tag { background: rgba(255, 255, 255, .2); border-radius: 99px; padding: .1rem .6rem; font-size: .72rem; }
.bank-card .btn-card { background: rgba(255, 255, 255, .16); color: #fff; border: 0; border-radius: 10px; font-size: .78rem; padding: .3rem .7rem; }
.bank-card .btn-card:hover { background: rgba(255, 255, 255, .28); }

/* ===== انتخاب تاریخ شمسی ===== */
.date-field { position: relative; }
.date-btn { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: var(--radius-sm); padding: .55rem .85rem; width: 100%; font-size: .88rem; }
.date-btn.has-value { color: var(--ink); border-color: var(--sage); background: var(--paper); }
.date-btn i { color: var(--olive); }
.date-modal { border: 0; border-radius: 22px; }
.date-selects { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: .5rem; }
.date-selects label span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .25rem; }
.date-selects .form-select { padding-left: 1.8rem; }

/* ===== تاریخچه ===== */
.history-item { cursor: pointer; }
.history-item .amount { font-weight: 900; font-size: 1.05rem; }
.history-item .amount.plus { color: var(--buy); }
.history-item .amount.minus { color: var(--sell); }
.history-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; }
.history-icon.in { background: #E3EFE3; color: var(--buy); }
.history-icon.out { background: #F3E3E0; color: var(--sell); }
.detail-list { margin: .6rem 0 0; padding: .7rem .8rem; background: var(--paper); border-radius: var(--radius-sm); font-size: .82rem; }
.detail-list > div { display: flex; justify-content: space-between; gap: .8rem; padding: .22rem 0; }
.detail-list > div + div { border-top: 1px dashed var(--line); }
.detail-list .k { color: var(--muted); white-space: nowrap; }
.ledger-line { font-size: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .45rem .6rem; margin-top: .45rem; }
.chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips input { display: none; }
.chips label { white-space: nowrap; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: .3rem .9rem; font-size: .84rem; color: var(--muted); cursor: pointer; }
.chips input:checked + label { background: var(--moss); border-color: var(--moss); color: #fff; }

/* ===== خرید و فروش (مشتری) ===== */
.trade-price { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.1rem; margin-bottom: .9rem; border-right: 5px solid var(--buy); }
.trade-price.sell { border-right-color: var(--sell); }
.trade-price .label { font-weight: 700; }
.trade-price .value { font-weight: 900; font-size: 1.35rem; color: var(--buy); }
.trade-price.sell .value { color: var(--sell); }
.trade-card { overflow: hidden; }
.trade-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.trade-tabs > * { background: none; border: 0; padding: .85rem; font-weight: 700; color: var(--muted); position: relative; text-align: center; text-decoration: none; }
.trade-tabs > .active { color: var(--moss); }
.trade-tabs > .active::after { content: ""; position: absolute; bottom: -1px; right: 30%; left: 30%; height: 3px; border-radius: 3px 3px 0 0; background: var(--moss); }
.trade-tabs > .buy.active { color: var(--buy); }
.trade-tabs > .buy.active::after { background: var(--buy); }
.trade-tabs > .sell.active { color: var(--sell); }
.trade-tabs > .sell.active::after { background: var(--sell); }
.history-page .trade-tabs { border-radius: var(--radius); }
.balance-hint { font-size: .84rem; color: var(--muted); background: var(--paper); border-radius: var(--radius-sm); padding: .5rem .75rem; }
.float-field { position: relative; display: block; margin: 0; }
.float-field .title { position: absolute; top: -.6rem; right: .8rem; background: var(--surface); padding: 0 .35rem; font-size: .76rem; color: var(--muted); z-index: 2; }
.float-field .form-control { padding: 1rem 1rem 1rem 5rem; font-size: 1.15rem; font-weight: 700; border-radius: var(--radius); text-align: right; }
.float-field .form-control:focus { border-color: var(--olive); }
.float-field .suffix { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; border-right: 1px solid var(--line); padding-right: .6rem; }
.words { font-size: .78rem; color: var(--muted); min-height: 1.3rem; margin-top: .3rem; padding-right: .3rem; }
.trade-summary { margin-top: 1rem; background: var(--paper); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .86rem; }
.trade-summary > div { display: flex; justify-content: space-between; padding: .15rem 0; }
.trade-submit { color: #fff; font-weight: 700; padding: .85rem; border-radius: var(--radius); border: 0; }
.trade-submit.buy, .trade-submit.buy:hover { background: linear-gradient(90deg, #3d8a5a, var(--buy)); color: #fff; }
.trade-submit.sell, .trade-submit.sell:hover { background: linear-gradient(90deg, #c45a4e, var(--sell)); color: #fff; }
.trade-submit:disabled { opacity: .45; }

/* ===== درخواست‌ها (مدیر) ===== */
.request-card { border-right: 5px solid var(--buy); }
.request-card.sell { border-right-color: var(--sell); }
.request-card .side-title { font-weight: 900; color: var(--buy); }
.request-card.sell .side-title { color: var(--sell); }
.request-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; background: var(--paper); border-radius: var(--radius); padding: .75rem .9rem; margin-top: .8rem; }
.request-grid > div { display: flex; flex-direction: column; }
.request-grid .full { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: .4rem; align-items: baseline; border-top: 1px dashed var(--line); padding-top: .45rem; }
.request-grid .k { font-size: .74rem; color: var(--muted); }
.btn-approve { background: var(--buy); color: #fff; border: 0; }
.btn-approve:hover { background: #275e3c; color: #fff; }
.btn-reject { background: #F3E3E0; color: var(--sell); border: 0; }
.btn-reject:hover { background: #ecd2cd; color: var(--sell); }

/* ===== سؤالات متداول ===== */
.faq-answer { white-space: pre-line; line-height: 1.9; }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: .8rem; width: 100%; background: none; border: 0; padding: 0; text-align: right; font-weight: 700; color: var(--ink); }
.faq-q i { color: var(--olive); transition: transform .2s; }
.faq-q[aria-expanded="true"] i { transform: rotate(180deg); }

/* ===== نشان تعداد و اعلان کوتاه ===== */
.dot-badge { position: absolute; top: -4px; left: -4px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--sell); color: #fff; font-size: .66rem; display: grid; place-items: center; padding: 0 .3rem; }
.count { min-width: 22px; height: 22px; border-radius: 99px; background: var(--sell); color: #fff; font-size: .72rem; display: inline-grid; place-items: center; padding: 0 .4rem; }
.toast-stack { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: .5rem; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast-item { display: flex !important; align-items: flex-start; gap: .6rem; animation: toast-in .3s ease; }
.toast-item > i { margin-top: .25rem; }
.toast-item.success { background: #1F4D31; }
.toast-item.error { background: #7A2A22; }
.toast-item.info { background: var(--moss); }
.toast-close { background: none; border: 0; color: inherit; opacity: .7; padding: 0 .2rem; }
.toast-close:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.toast-item { pointer-events: auto; display: block; background: var(--ink); color: #fff; border-radius: var(--radius); padding: .7rem .9rem; box-shadow: var(--shadow); text-decoration: none; transition: opacity .35s, transform .35s; }
.toast-item b { display: block; font-size: .88rem; }
.toast-item span { display: block; font-size: .8rem; opacity: .85; white-space: pre-line; }
.toast-item:hover { color: #fff; }
.toast-item.hide { opacity: 0; transform: translateY(-8px); }
.notif.unread { border-right: 4px solid var(--olive); background: #fdfdf6; }

/* ===== چت ===== */
/* گفتگو تمام‌صفحه: سرصفحه، پیام‌ها، نوشتن (ارتفاع = همه‌ی فضای خالی صفحه) */
.chat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; height: calc(100dvh - 9.5rem); min-height: 420px; }
.app-customer .chat { height: calc(100dvh - 11.5rem); margin-top: .5rem; }
@media (min-width: 992px) { .app-admin .chat { height: calc(100dvh - 3.2rem); } }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; background: var(--cream); border-bottom: 1px solid var(--line); }
.chat-head .chat-back { width: 38px; height: 38px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--moss); text-decoration: none; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.chat-head .title { font-weight: 700; }
.chat-head .subtitle { font-size: .78rem; color: var(--muted); text-decoration: none; display: block; }
.chat-scroll { flex: 1; overflow-y: auto; padding: .9rem; background: radial-gradient(circle at 100% 0%, rgba(214,218,163,.35), transparent 40%), var(--paper); }
.chat-day { text-align: center; margin: .6rem 0; }
.chat-day span { font-size: .72rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: .1rem .7rem; }
.msg { display: flex; margin: .25rem 0; }
.msg.mine { justify-content: flex-start; }
.msg.theirs { justify-content: flex-end; }
.msg .bubble { max-width: 78%; padding: .5rem .75rem .35rem; border-radius: 16px; font-size: .9rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.msg.mine .bubble { background: var(--moss); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .text { white-space: pre-wrap; word-break: break-word; line-height: 1.75; }
.msg .sender { font-size: .7rem; opacity: .8; margin-bottom: .1rem; }
.msg .meta { display: flex; justify-content: flex-end; gap: .3rem; align-items: center; font-size: .66rem; opacity: .75; margin-top: .15rem; }
.msg .tick.read { color: var(--cream); }
.msg .image img { display: block; max-width: 220px; max-height: 260px; border-radius: 12px; margin-bottom: .3rem; object-fit: cover; }
.msg .file { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border-radius: 10px; background: rgba(255,255,255,.15); color: inherit; text-decoration: none; margin-bottom: .3rem; }
.msg.theirs .file { background: var(--cream); color: var(--moss); }
.chat-composer { border-top: 1px solid var(--line); padding: .7rem .9rem .9rem; background: var(--surface); }
.composer-label { font-size: .78rem; color: var(--muted); margin-bottom: .35rem; }
.composer-box { border: 1px solid var(--line); border-radius: 16px; padding: .5rem .6rem .5rem; background: var(--surface); transition: border-color .15s; }
.composer-box:focus-within { border-color: var(--olive); }
.composer-box textarea { width: 100%; border: 0; resize: none; outline: none; font-family: var(--font); max-height: 140px; padding: .2rem .3rem; background: transparent; }
.composer-actions { display: flex; flex-direction: row-reverse; justify-content: flex-start; align-items: center; gap: .4rem; }
.chat-attach, .chat-send { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; border: 0; margin: 0; }
.chat-attach { background: transparent; color: var(--muted); }
.chat-attach:hover { background: var(--paper); }
.chat-send { background: var(--moss); color: #fff; }
.chat-send:disabled { opacity: .5; }
.chat-file { display: flex; align-items: center; gap: .5rem; font-size: .8rem; background: var(--paper); border-radius: 10px; padding: .3rem .6rem; margin-bottom: .45rem; }
.chat-file span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.chat-empty { padding-top: 4rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sage); color: var(--moss); display: grid; place-items: center; font-weight: 900; flex-shrink: 0; }
.chat-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; max-width: 820px; }
.chat-row { display: flex; gap: .8rem; align-items: center; padding: .8rem 1rem; text-decoration: none; color: var(--ink); }
.chat-row + .chat-row { border-top: 1px solid var(--line); }
.chat-row:hover { background: var(--paper); }
.chat-row.unread b { color: var(--moss); }
.lookup-results { max-height: 300px; overflow-y: auto; }
.lookup-item { display: flex; justify-content: space-between; width: 100%; border: 0; background: none; padding: .55rem .4rem; border-bottom: 1px solid var(--line); text-align: right; }
.lookup-item:hover { background: var(--paper); }
.side nav .count { margin-right: auto; }

/* ===== ردیف تنظیمات با کلید (مثل تنظیمات معاملات) ===== */
.setting-row { display: flex; align-items: center; gap: .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .9rem 1rem; margin-bottom: .7rem; cursor: pointer; }
.setting-row .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--cream); color: var(--olive); display: grid; place-items: center; flex-shrink: 0; border-left: 1px solid var(--line); }
.setting-row .title { flex: 1; font-weight: 700; }
.setting-row .hint { display: block; font-size: .76rem; color: var(--muted); font-weight: 400; }


/* ===== عرض یکسان صفحه‌ها: هر صفحه یکی از سه اندازه را دارد و همیشه وسط است ===== */
.page-narrow { max-width: 640px; margin-inline: auto; }
.page-medium { max-width: 860px; margin-inline: auto; }
.page-wide { max-width: 1040px; margin-inline: auto; }
.app-admin .content, .app-support .content { max-width: 1180px; margin-inline: auto; min-height: 100vh; }

/* ===== سرصفحه‌ی یکسان: عنوان + تعداد در یک سمت، دکمه‌ها در سمت دیگر ===== */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .5rem; margin-bottom: 1rem; }
.page-head .page-title { margin: 0; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ===== منوی کناری: بخش‌بندی، نام کاربر زیر نام فروشگاه، خروج آخرین مورد ===== */
.side { overflow-y: auto; scrollbar-width: thin; }
.side .brand { flex-direction: row; align-items: center; }
.side .brand .who { display: block; font-size: .74rem; font-weight: 400; color: var(--muted); margin-top: .1rem; }
.side nav .group { font-size: .7rem; color: var(--muted); padding: .9rem .8rem .3rem; letter-spacing: .02em; }
.side nav form { margin: 0; }
.side nav .logout { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .62rem .8rem; border-radius: 12px; border: 0; background: transparent; color: var(--sell); text-align: right; margin-top: .4rem; }
.side nav .logout i { color: var(--sell); }
.side nav .logout:hover { background: #F3E3E0; }

/* ===== قیمت نهایی زیر فیلد قیمت‌گذاری ===== */
.final-price { display: flex; justify-content: space-between; align-items: center; margin-top: .45rem; padding: .45rem .7rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px dashed var(--line); font-size: .84rem; }
.final-price b { font-size: .98rem; }
.final-price.sell b { color: var(--sell); }
.final-price.buy b { color: var(--buy); }
.log-row .change { font-size: .78rem; color: var(--muted); }

/* ===== وضعیت بازار امروز (صفحه‌ی بازارها) ===== */
.market-state { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); margin: .5rem 0 1rem; flex-wrap: wrap; }
.market-state .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.market-state.open { border-color: #BFD8C6; }
.market-state.open .ico { background: #E3EFE3; color: var(--buy); }
.market-state.closed { border-color: #E8CFCB; }
.market-state.closed .ico { background: #F3E3E0; color: var(--sell); }

/* ===== رنگ فوکوس (به‌جای آبی بوت‌استرپ، هم‌رنگ پروژه) ===== */
:root {
    --bs-focus-ring-color: rgba(124, 131, 64, .25);
    --bs-primary: #474C22;
    --bs-primary-rgb: 71, 76, 34;
    --bs-link-color: #474C22;
    --bs-link-color-rgb: 71, 76, 34;
    --bs-link-hover-color: #2A2C1C;
}
.btn { --bs-btn-focus-shadow-rgb: 124, 131, 64; }
.btn:focus-visible, .btn-check:focus-visible + .btn { box-shadow: 0 0 0 .2rem rgba(124, 131, 64, .3); outline: 0; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--olive); box-shadow: 0 0 0 .2rem rgba(124, 131, 64, .2); outline: 0; }
.form-check-input:focus:not(:checked) { border-color: var(--olive); }
/* دایره‌ی کلید (switch) هنگام فوکوس آبی می‌شد */
.form-switch .form-check-input:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23a9ae78'/%3e%3c/svg%3e"); }
.form-switch .form-check-input:checked:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); }
.btn-close:focus { box-shadow: 0 0 0 .2rem rgba(124, 131, 64, .25); }
.nav-link:focus-visible, .page-link:focus, .dropdown-item:focus-visible { box-shadow: 0 0 0 .2rem rgba(124, 131, 64, .25); outline: 0; }
.dropdown-item.active, .dropdown-item:active { background-color: var(--cream); color: var(--moss); }
.form-range::-webkit-slider-thumb { background-color: var(--moss); }
.form-range::-moz-range-thumb { background-color: var(--moss); }
/* حلقه‌ی کلی برای عناصر بدون استایل فوکوس (لینک‌ها و ...) */
:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }
.form-control:focus-visible, .form-select:focus-visible, .btn:focus-visible, .form-check-input:focus-visible { outline: 0; }

/* ===== کپچا داخل input-group (یکدست با بقیه‌ی فیلدها) ===== */
.captcha-group .captcha-img { padding: 0; overflow: hidden; background: var(--paper); }
.captcha-group .captcha-img img { display: block; height: 40px; width: auto; }
.captcha-group .btn { border-color: var(--line); color: var(--muted); }
.captcha-group .form-control { letter-spacing: .25em; }

/* ===== دریافت فیزیکی ===== */
.delivery-item { display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .85rem 1rem; margin-bottom: .6rem; }
.delivery-item .qty { display: flex; align-items: center; gap: .35rem; }
.delivery-item .qty input { width: 2.4rem; text-align: center; border: 0; background: transparent; font-weight: 700; }
.qty-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); }
.qty-btn.plus { border: 2px solid var(--buy); color: var(--buy); }
.qty-btn.minus { border: 2px solid var(--sell); color: var(--sell); }

/* تب‌ها به هر تعداد (تاریخچه سه تب دارد) */
.trade-tabs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }

/* =====================================================================
   یکدست‌سازی فوکوس: بدون سایه و بدون outline؛ فقط رنگ border (برای فیلدها، دکمه‌ها و کلیدها یکسان)
   ===================================================================== */
.form-control:focus, .form-select:focus, .form-check-input:focus,
.btn:focus, .btn:focus-visible, .btn:active:focus, .btn-check:focus-visible + .btn,
.btn-close:focus, .nav-link:focus-visible, .page-link:focus, .dropdown-item:focus-visible,
.icon-btn:focus-visible, .date-btn:focus-visible, .chat-send:focus-visible, .chat-attach:focus-within {
    box-shadow: none !important;
    outline: 0 !important;
    border-color: var(--olive) !important;
}
/* دکمه‌هایی که border ندارند هم یک border شفاف دارند تا هنگام فوکوس رنگ بگیرد */
.btn, .icon-btn, .qty-btn, .chat-send, .date-btn { border: 1px solid transparent; }
.btn-ghost, .btn-soft, .date-btn, .btn-outline-secondary { border-color: var(--line); }
.btn-primary { border-color: var(--moss); }
.btn-primary:focus-visible { border-color: var(--olive) !important; background: #3a3f1b; }
.form-check-input:focus:not(:checked) { border-color: var(--olive); }
:focus-visible { outline: 0; }
a:focus-visible { text-decoration: underline; text-decoration-color: var(--olive); }

/* =====================================================================
   اعلان کوتاه (پیام موفق/خطا/اطلاع): کارت رنگی گرد با آیکون در دایره و دکمه‌ی بستن
   ===================================================================== */
.toast-item { display: flex !important; align-items: center; gap: .75rem; padding: .75rem .9rem; border-radius: 16px;
    color: #fff; font-size: .9rem; font-weight: 500; line-height: 1.8; box-shadow: 0 12px 28px rgba(0, 0, 0, .14); text-decoration: none; }
.toast-item > i:first-child { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; flex-shrink: 0; margin: 0; font-size: .9rem; }
.toast-item > span { display: block; flex: 1; font-size: .9rem; opacity: 1; white-space: pre-line; }
.toast-item.success { background: #2F7A4C; }
.toast-item.error { background: #D9393E; }
.toast-item.info { background: var(--moss); }
.toast-item .toast-close { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; opacity: .85; border: 0; background: transparent; flex-shrink: 0; }
.toast-item .toast-close:hover { background: rgba(255, 255, 255, .18); opacity: 1; }
/* اعلان زنده (عنوان + متن) */
.toast-item.live { background: var(--ink); flex-direction: column; align-items: stretch; gap: .1rem; }
.toast-item.live b { font-size: .9rem; }
.toast-item.live span { font-size: .82rem; opacity: .85; }
/* خطاهای کلی فرم به اعلان تبدیل می‌شوند؛ خود فهرست پنهان می‌ماند */
.validation-summary-errors[data-to-toast] { display: none; }

/* =====================================================================
   منوی سه‌نقطه: کارت سفید گرد با سایه‌ی نرم، آیکون رنگی کنار هر مورد
   ===================================================================== */
.dropdown-menu { border: 0; border-radius: 16px; padding: .4rem; min-width: 12rem; box-shadow: 0 12px 32px rgba(42, 44, 28, .12), 0 2px 6px rgba(42, 44, 28, .06); font-size: .88rem; }
.dropdown-menu li + li { margin-top: .1rem; }
.dropdown-item { display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem; border-radius: 11px; color: var(--ink); border: 1px solid transparent; }
.dropdown-item i { width: 1.1rem; text-align: center; color: var(--olive); margin: 0 !important; font-size: .95rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--paper); color: var(--ink); }
.dropdown-item.danger, .dropdown-item.danger i { color: var(--sell); }
.dropdown-item.danger:hover { background: #FBEDEB; }
.dropdown-menu form { margin: 0; }
.dropdown-menu form .dropdown-item { width: 100%; background: transparent; text-align: right; }
/* دکمه‌ی سه‌نقطه */
[data-bs-toggle="dropdown"].btn-ghost { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; }

/* ===== انتخاب ساعت (۲۴ ساعته) ===== */
.time-selects { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: end; }
.time-selects .colon { font-weight: 900; padding-bottom: .5rem; }
.time-selects label span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .25rem; }

/* ===== لوگو در صفحه‌ی تماس با ما (دایره با پیش‌نمایش) ===== */
.logo-upload { display: flex; flex-direction: column; align-items: center; margin: .5rem 0 1.4rem; }
.logo-circle { position: relative; width: 112px; height: 112px; border-radius: 50%; background: var(--surface); border: 2px dashed var(--sage); display: grid; place-items: center; cursor: pointer; overflow: visible; margin: 0; }
.logo-circle img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.logo-circle > i { font-size: 2rem; color: var(--olive); }
.logo-circle .edit { position: absolute; bottom: 2px; left: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--moss); color: #fff; display: grid; place-items: center; font-size: .8rem; border: 2px solid var(--surface); }
.logo-circle:hover { border-color: var(--olive); }
.log-row .ico.text-buy { background: #E3EFE3; color: var(--buy); }
.log-row .ico.text-sell { background: #F3E3E0; color: var(--sell); }

/* ===== دکمه‌ی چشم کنار فیلد رمز (سمت چپ در راست‌به‌چپ) ===== */
.password-field { position: relative; }
.password-field .form-control { padding-left: 2.8rem; }
.password-toggle { position: absolute; left: .35rem; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 10px;
    display: grid; place-items: center; border: 1px solid transparent; background: transparent; color: var(--muted); }
.password-toggle:hover { color: var(--moss); background: var(--paper); }
.password-toggle:focus-visible { border-color: var(--olive); outline: 0; }

/* برچسب مقدار تغییر در تاریخچه‌ی قیمت‌گذاری */
.change-pill { display: inline-block; margin-top: .25rem; font-size: .76rem; font-weight: 700; padding: .1rem .55rem; border-radius: 99px; background: var(--paper); color: var(--muted); }
.change-pill.up { background: #E3EFE3; color: var(--buy); }
.change-pill.down { background: #F3E3E0; color: var(--sell); }

/* ===== پنجره‌ی تأیید سایت ===== */
.confirm-modal .modal-content { border: 0; border-radius: 22px; box-shadow: 0 20px 50px rgba(42, 44, 28, .18); }
.confirm-icon { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--cream); color: var(--olive); font-size: 1.5rem; }
.confirm-modal.danger .confirm-icon { background: #F3E3E0; color: var(--sell); }
.confirm-modal p { white-space: pre-line; line-height: 1.9; }
/* شبا: گروه چپ‌به‌راست */
.sheba-group .input-group-text { font-weight: 700; }
.request-grid.single { grid-template-columns: 1fr; }

/* ===== فهرست چت‌ها (صندوق پیام) ===== */
.inbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.inbox-search { position: relative; padding: .8rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.inbox-search i { position: absolute; right: 1.6rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.inbox-search .form-control { padding-right: 2.4rem; border-radius: 12px; }
.inbox .chat-row { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.inbox .chat-row:first-child { border-top: 0; }
.inbox .chat-row:hover { background: var(--paper); }
.inbox .chat-row .avatar { width: 46px; height: 46px; font-size: 1.05rem; }
.inbox .chat-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.inbox .chat-row .top, .inbox .chat-row .bottom { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.inbox .chat-row .name { font-weight: 700; }
.inbox .chat-row .time { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.inbox .chat-row .preview { font-size: .84rem; color: var(--muted); }
.inbox .chat-row .mobile { font-size: .74rem; color: var(--muted); }
.inbox .chat-row.unread .name { color: var(--moss); }
.inbox .chat-row.unread .preview { color: var(--ink); font-weight: 500; }
.inbox .chat-row.unread .time { color: var(--olive); font-weight: 700; }

/* مبلغ به حروف زیر فیلدهای مبلغ */
.money-words { font-size: .76rem; color: var(--muted); opacity: .85; min-height: 1.1rem; margin-top: .25rem; padding-right: .2rem; }

/* =====================================================================
   قالب یکسان صفحه‌ها: سرصفحه → نوار فیلتر → فهرست → صفحه‌بندی
   ===================================================================== */

/* ----- سرصفحه: عنوان و تعداد در یک سمت، دکمه‌ها در سمت دیگر ----- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .35rem; margin-bottom: 1.1rem; }
.page-head.start { justify-content: flex-start; }
.page-head > .d-flex { align-items: center; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 0; }
.page-title { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 1.2rem; font-weight: 900; line-height: 1.6; color: var(--ink); }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 .55rem; border-radius: 99px; background: var(--cream); color: var(--moss); font-size: .76rem; font-weight: 700; }
.page-head .btn:not(.btn-sm) { min-height: 42px; display: inline-flex; align-items: center; gap: .35rem; }

/* ----- اندازه‌ی یکسان کنترل‌ها ----- */
input.form-control:not(.form-control-sm), select.form-select:not(.form-select-sm) { min-height: 44px; }
.btn:not(.btn-sm):not(.btn-lg) { min-height: 42px; }

/* ----- نوار فیلتر: یک کارت، همه‌ی کنترل‌ها هم‌قد و در یک ردیف (در موبایل می‌شکند) ----- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: .55rem; margin-bottom: 1rem; }
.toolbar > *, .toolbar-more > * { flex: 0 0 auto; }
.toolbar .form-control, .toolbar .form-select, .toolbar .btn, .toolbar .date-btn, .toolbar .chips label { height: 42px; min-height: 42px; border-radius: 12px; }
.toolbar .form-select { width: auto; min-width: 150px; background-color: var(--paper); border-color: transparent; }
.toolbar .form-control { background: var(--paper); border-color: transparent; }
.toolbar .form-control:focus, .toolbar .form-select:focus { background: var(--surface); }
.toolbar .search { position: relative; flex: 1 1 240px; min-width: 200px; }
.toolbar .search > i { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.toolbar .search .form-control { padding-right: 2.5rem; width: 100%; }
.toolbar .chips { display: inline-flex; gap: .25rem; background: var(--paper); border-radius: 12px; padding: .2rem; }
.toolbar .chips label { height: 36px; min-height: 36px; display: inline-flex; align-items: center; border: 0; background: transparent; padding: 0 .9rem; border-radius: 10px; }
.toolbar .chips input:checked + label { background: var(--surface); color: var(--moss); box-shadow: 0 1px 3px rgba(42, 44, 28, .1); font-weight: 700; }
.toolbar .date-field { flex: 0 0 150px; }
.toolbar .date-btn { background: var(--paper); border-color: transparent; justify-content: flex-start; }
.toolbar .date-btn.has-value { background: var(--cream); color: var(--moss); }
.toolbar .range { display: inline-flex; align-items: center; gap: .35rem; background: var(--paper); border-radius: 12px; padding: 0 .6rem 0 .25rem; }
.toolbar .range > span { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.toolbar .range .form-control { width: 120px; background: var(--surface); height: 36px; min-height: 36px; }
.toolbar .range .money-words { display: none; }
.toolbar .more-toggle { color: var(--muted); }
.toolbar .more-toggle[aria-expanded="true"] { background: var(--cream); color: var(--moss); }
.toolbar .reset { width: 42px; padding: 0; display: inline-grid; place-items: center; color: var(--sell); border-color: transparent; background: #FBEDEB; margin-right: auto; }
.toolbar .toolbar-more { flex: 1 1 100%; }
.toolbar .toolbar-more.show, .toolbar .toolbar-more.collapsing { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .5rem; border-top: 1px dashed var(--line); }
@media (max-width: 575px) {
    .toolbar .form-select, .toolbar .date-field, .toolbar .chips, .toolbar .range { flex: 1 1 calc(50% - .5rem); min-width: 0; }
    .toolbar .chips { justify-content: space-between; }
    .toolbar .range .form-control { width: 100%; }
}

/* ----- حالت خالی: آیکون در دایره، متن کوتاه، وسط ----- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; text-align: center;
    padding: 2.8rem 1.2rem; color: var(--muted); font-size: .92rem; line-height: 1.9;
    background: var(--surface); border: 1px dashed var(--sage); border-radius: var(--radius-lg); }
.empty > i { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; margin: 0 0 .35rem;
    background: var(--cream); color: var(--olive); font-size: 1.6rem; }
.empty .btn, .empty a.btn { margin-top: .4rem; }
.card-x .empty, .inbox .empty { border: 0; background: transparent; padding: 2rem 1rem; }
.empty.py-3 { padding-top: 1.6rem !important; padding-bottom: 1.6rem !important; }
.empty.py-3 > i { width: 52px; height: 52px; font-size: 1.25rem; }

/* ----- فهرست‌ها: کارت و جدول یکدست ----- */
.item-card { border-radius: var(--radius-lg); padding: 1rem 1.1rem; }
.item-card .head .name { font-weight: 700; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); }
.table-x { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-x thead th { background: var(--paper); color: var(--muted); font-size: .78rem; font-weight: 700; padding: .8rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-x tbody td { padding: .8rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-x tbody tr:last-child td { border-bottom: 0; }
.table-x tbody tr:hover td { background: #FBFBF4; }

/* ----- بخش‌های داخل صفحه ----- */
.section-title { display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 700; margin: 1.2rem 0 .7rem; }
.page-title { margin-bottom: 1rem; }
.page-head .page-title { margin: 0; }
.table-x td { border-top: 0; }
.table-wrap .table-x { border: 0; border-radius: 0; }

/* =====================================================================
   اصلاحات ظاهری کنترل‌ها (یک شعاع برای همه، فاصله‌ی آیکون، گروه‌ها، select، پنجره‌ها)
   ===================================================================== */
:root { --field-radius: 12px; }

/* ----- دکمه‌ها: آیکون و متن همیشه با فاصله‌ی یکسان (بدون اتکا به margin آیکون) ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: var(--field-radius); }
.btn > i, .btn > .fa-solid, .btn > .fa-regular { margin: 0 !important; }
.btn-sm { gap: .35rem; }
.link-more { display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; text-decoration: none; color: var(--olive); font-weight: 500; }
.link-more:hover { color: var(--moss); }

/* ----- فیلدها: شعاع یکسان ----- */
.form-control, .form-select, .date-btn { border-radius: var(--field-radius); }

/* ----- select: فلش هرگز روی متن نمی‌افتد (فضای کافی سمت چپ در راست‌به‌چپ) ----- */
.form-select { padding-left: 2.6rem !important; padding-right: .9rem; background-position: left .85rem center; background-size: 14px 10px; text-overflow: ellipsis; }
.form-select-sm { padding-left: 2.2rem !important; }

/* ----- گروه فیلد (input-group): هر دو سر یک اندازه گرد، اتصال‌ها صاف (راست‌به‌چپ) ----- */
.input-group > .form-control, .input-group > .form-select, .input-group > .input-group-text, .input-group > .btn { border-radius: 0 !important; }
.input-group > :first-child { border-top-right-radius: var(--field-radius) !important; border-bottom-right-radius: var(--field-radius) !important; }
.input-group > :last-child { border-top-left-radius: var(--field-radius) !important; border-bottom-left-radius: var(--field-radius) !important; }
.input-group-text { min-width: 46px; justify-content: center; }
.sheba-group .input-group-text { font-weight: 700; letter-spacing: .05em; direction: ltr; }

/* ----- پنجره‌ها: دکمه‌ی بستن همیشه آن طرف سرصفحه، با فاصله ----- */
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-header .btn-close { margin: 0 !important; padding: .55rem; border-radius: 10px; background-size: .8rem; flex-shrink: 0; }
.modal-header .btn-close:hover { background-color: var(--paper); }
.date-modal { border: 0; border-radius: 22px; box-shadow: 0 20px 50px rgba(42, 44, 28, .18); }
.date-modal .modal-header { padding: 1.1rem 1.3rem .3rem; }
.date-modal .modal-body { padding: 1rem 1.3rem; }
.date-modal .modal-footer { padding: .4rem 1.3rem 1.2rem; gap: .5rem; }
.date-modal .modal-footer > * { margin: 0; }
.picker-dialog { max-width: 380px; }
@media (max-width: 575px) { .picker-dialog { margin: auto .9rem; } }

/* انتخاب تاریخ: سه فهرست هم‌اندازه */
.date-selects { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: .6rem; }
.date-selects label span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .35rem; }

/* انتخاب ساعت: دو جعبه‌ی بزرگ «ساعت : دقیقه» */
.time-selects { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: center; }
.time-box { display: block; margin: 0; text-align: center; }
.time-box > span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .35rem; }
.time-selects .colon { font-weight: 900; color: var(--muted); padding-top: 1.4rem; }

/* ----- سرِ بخش‌ها: عنوان و لینک در یک ردیف، فاصله‌ی یکسان در همه‌ی ستون‌ها ----- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 40px; margin: 0 0 .8rem; }
.section-head .section-title { margin: 0; }

/* ----- انتخاب به شکل کارت (به‌جای دکمه‌ی رادیویی دایره‌ای) ----- */
.choice { display: block; margin: 0 0 .6rem; cursor: pointer; }
.choice-input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .95rem 1.1rem;
    border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, background-color .15s; }
.choice-title { font-weight: 700; }
.choice-check { color: var(--olive); font-size: 1.15rem; opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s; }
.choice:hover .choice-body { border-color: var(--sage); }
.choice-input:checked + .choice-body { border-color: var(--olive); background: var(--cream); }
.choice-input:checked + .choice-body .choice-check { opacity: 1; transform: none; }
.choice-input:focus-visible + .choice-body { border-color: var(--moss); }

/* ===== دکمه‌ی بازگشت: یک شکل و یک اندازه در همه‌ی صفحه‌ها ===== */
.back-btn { width: 40px; height: 40px; flex: 0 0 40px; display: inline-grid; place-items: center; border-radius: var(--field-radius);
    background: var(--surface); border: 1px solid var(--line); color: var(--moss); text-decoration: none; font-size: .9rem;
    transition: background-color .15s, border-color .15s; }
.back-btn:hover { background: var(--cream); border-color: var(--sage); color: var(--moss); }
.back-btn:focus-visible { border-color: var(--olive); outline: 0; }
.page-head.start { flex-wrap: nowrap; }
.page-head.start > div { min-width: 0; }
.chat-head .back-btn { border-radius: 50%; }

/* ===== کالاها ===== */
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem; height: 100%; display: flex; flex-direction: column; gap: .9rem; }
.product-card .head { display: flex; align-items: center; gap: .75rem; }
.product-card .head .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--cream); color: var(--olive); display: grid; place-items: center; flex-shrink: 0; }
.product-card .name { font-weight: 700; }
.product-card .prices { display: grid; gap: .45rem; background: var(--paper); border-radius: var(--radius); padding: .75rem .9rem; }
.product-card .prices > div { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.product-card .prices .k { font-size: .82rem; color: var(--muted); }
.product-card .switches { border-top: 1px dashed var(--line); padding-top: .6rem; display: grid; gap: .35rem; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .86rem; margin: 0; }
.product-card .prices .base { border-top: 1px dashed var(--line); padding-top: .45rem; font-size: .8rem; }

/* =====================================================================
   دور اصلاحات ظاهری: دکمه‌های سرصفحه، کلیدها، پنجره‌ها، منو، قالب‌ها
   ===================================================================== */

/* ----- دکمه‌های سرصفحه: در همه‌ی صفحه‌ها یکسان (با یا بدون .actions) ----- */
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 0; }
.page-head > .btn, .page-head .actions .btn { flex: 0 0 auto; min-height: 42px; padding: .5rem 1rem; font-size: .88rem; gap: .5rem; }
@media (max-width: 575px) {
    .page-head .actions { width: 100%; }
    .page-head .actions .btn { flex: 1 1 0; padding: .5rem .75rem; }
}

/* ----- کلید (switch) و چک‌باکس: فاصله‌ی یکسان با متن کنارش ----- */
.form-check .form-check-label { padding-right: .6rem; margin: 0 !important; cursor: pointer; }
.form-check.form-switch { display: inline-flex; align-items: center; min-height: 1.6rem; }

/* ----- سرِ بخش‌ها: فاصله از بالا مثل بقیه‌ی بخش‌ها ----- */
.section-head { margin-top: 1.4rem; }
.page-head + .section-head, .section-head:first-child { margin-top: 0; }
.row > [class*="col"] > .section-head:first-child { margin-top: 1.4rem; }

/* ----- انتخاب تاریخ: سه فهرست داخل پنجره جا می‌شوند ----- */
.date-selects { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); }
.date-selects .form-select { min-width: 0; padding-left: 2rem !important; background-position: left .6rem center; }

/* ----- پنجره‌ها کمی بالاتر از وسط ----- */
.modal-dialog-centered { align-items: flex-start; }
.modal-dialog-centered .modal-content { margin-top: 12vh; }
@media (max-width: 575px) { .modal-dialog-centered .modal-content { margin-top: 8vh; } }

/* ----- منوی کناری پنل فروشگاه: بدون نوار اسکرول، سرِ پروفایل جدا با خط کم‌رنگ ----- */
.side { scrollbar-width: none; -ms-overflow-style: none; }
.side::-webkit-scrollbar { display: none; }
.side .brand { padding-bottom: 1rem; margin-bottom: .6rem; border-bottom: 1px solid var(--line); }

/* ----- واحد داخل گروه فیلد (مثل گرم/سوت) ----- */
.input-group .unit-select { flex: 0 0 auto; width: auto; min-width: 96px; background-color: var(--cream); font-weight: 500; }

/* ----- کارت قالب‌ها: نام و (برچسب + منو) در یک خط، موضوع کم‌رنگ، متن حداکثر سه خط ----- */
.template-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.1rem; height: 100%; display: flex; flex-direction: column; gap: .55rem; }
.template-card .head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.template-card .name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-card .tools { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.template-card .subject { display: flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--muted); min-width: 0; }
.template-card .subject i { color: var(--olive); }
.template-card .text { font-size: .86rem; color: var(--ink); line-height: 1.9; white-space: pre-line;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== صفحه‌ی خرید و فروش ===== */
.balance-hint { display: flex; align-items: center; gap: .4rem; }
.balance-hint .btn-sm { min-height: 32px; padding: .25rem .6rem; font-size: .78rem; }
.balance-hint .add-funds { width: 32px; padding: 0; }
.quote-timer { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .8rem; padding: .45rem; border-radius: 10px; background: var(--paper); font-size: .84rem; color: var(--moss); }

/* ===== خانه‌ی مشتری ===== */
.balance-card .v { display: flex; align-items: baseline; gap: .35rem; flex-wrap: nowrap; }
.balance-card .v small { font-size: .78rem; font-weight: 400; color: var(--muted); }
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.service { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; text-align: center; text-decoration: none !important; color: var(--ink); }
.service:hover { color: var(--moss); }
.topbar .icon-btn { display: inline-grid; place-items: center; line-height: 1; }
.topbar .icon-btn > i { display: block; line-height: 1; }

/* نمودار قیمت */
.seg { display: inline-flex; gap: .2rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .2rem; }
.seg button { border: 0; background: transparent; padding: .3rem .85rem; border-radius: 9px; font-size: .8rem; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--moss); font-weight: 700; box-shadow: 0 1px 3px rgba(42, 44, 28, .1); }
.price-chart { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .8rem .8rem .5rem; }
.price-chart .legend { display: flex; gap: 1rem; font-size: .76rem; color: var(--muted); margin-bottom: .3rem; }
.price-chart .legend span::before { content: ""; display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-left: .35rem; vertical-align: middle; }
.price-chart .legend .sell::before { background: var(--sell); }
.price-chart .legend .buy::before { background: var(--buy); }
.price-chart svg { width: 100%; height: 200px; display: block; touch-action: pan-y; }
.price-chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.price-chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.price-chart .line.sell { stroke: var(--sell); }
.price-chart .line.buy { stroke: var(--buy); }
.price-chart .guide { stroke: var(--sage); stroke-width: 1; vector-effect: non-scaling-stroke; }
.price-chart .axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: .2rem; }
.price-chart .tip { position: absolute; top: 2.2rem; width: 140px; background: var(--ink); color: #fff; border-radius: 12px; padding: .5rem .65rem; font-size: .74rem; line-height: 1.8; pointer-events: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
.price-chart .tip .t { opacity: .75; font-size: .7rem; }
.price-chart .tip .u { opacity: .6; font-size: .68rem; }
.price-chart .tip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: .3rem; }
.price-chart .tip .dot.sell { background: #F2A7A0; }
.price-chart .tip .dot.buy { background: #9FD3AE; }

/* ===== پیام خطای فیلد الزامی ===== */
.field-error { color: var(--sell); font-size: .8rem; margin: .3rem .2rem .2rem; }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--sell) !important; background-image: none; }

/* ===== مبلغ به حروف: درست زیر فیلد ===== */
.input-group:has(+ .money-words:not(:empty)) { margin-bottom: 0 !important; }
.money-words { margin: .3rem .2rem .9rem; min-height: 1rem; }

/* ===== مبلغ‌های آماده ===== */
.quick-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.quick-amounts .btn { min-height: 38px; font-size: .8rem; padding: .3rem .2rem; }
.quick-amounts .btn.active { background: var(--moss); color: #fff; border-color: var(--moss); }

/* ===== انتخاب فیش واریز ===== */
.file-drop { position: relative; display: grid; place-items: center; min-height: 140px; border: 1.5px dashed var(--sage); border-radius: var(--radius-lg); background: var(--paper); cursor: pointer; overflow: hidden; margin: 0; transition: border-color .15s; }
.file-drop:hover { border-color: var(--olive); }
.file-drop .empty-state { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--muted); text-align: center; }
.file-drop .empty-state i { font-size: 1.7rem; color: var(--olive); }
.file-drop .empty-state b { color: var(--ink); font-size: .9rem; }
.file-drop .empty-state small { font-size: .74rem; }
.file-drop img { width: 100%; max-height: 220px; object-fit: contain; background: #fff; }
.file-drop .change { position: absolute; bottom: .5rem; left: .5rem; background: rgba(42, 44, 28, .75); color: #fff; font-size: .74rem; padding: .25rem .6rem; border-radius: 99px; }
.file-drop.has-file { border-style: solid; border-color: var(--olive); }
.file-drop:has(.is-invalid) { border-color: var(--sell); }

/* =====================================================================
   تاریخچه‌ی مشتری: تب‌ها، فیلترها و آیتم‌ها
   ===================================================================== */
.history-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .25rem; }
.history-tabs a { text-align: center; padding: .55rem .3rem; border-radius: 11px; font-size: .86rem; color: var(--muted); text-decoration: none; font-weight: 500; }
.history-tabs a.active { background: var(--moss); color: #fff; font-weight: 700; }
.app-customer .toolbar { padding: .5rem; gap: .45rem; }
.app-customer .toolbar .chips { flex: 1 1 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.app-customer .toolbar .chips label { justify-content: center; }
.app-customer .toolbar .form-select, .app-customer .toolbar .date-field { flex: 1 1 calc(50% - .45rem); min-width: 0; }
.app-customer .toolbar .form-select:only-of-type { flex-basis: 100%; }
.app-customer .item-card { padding: .85rem .9rem; margin-bottom: .6rem; }
.history-item { cursor: pointer; }
.history-item .amount { font-weight: 900; font-size: .98rem; }
.history-item .chevron { color: var(--muted); font-size: .75rem; transition: transform .2s; }
.history-item[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.history-item + .collapse .detail-list, .history-item + .collapsing .detail-list { margin-top: .75rem; }

/* انتخاب تاریخ: سه ستون مساوی */
.date-selects { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

/* دکمه‌ی آیکونی بالای پنل مشتری (زنگوله) بدون خط زیر */
.icon-btn, .icon-btn:hover, .icon-btn:focus { text-decoration: none !important; }

/* ===== گفتگوی مشتری تمام‌صفحه (مثل پیام‌رسان‌ها): بدون نوار بالا و منو، نوشتن چسبیده به پایین ===== */
.app-customer.full-screen .content { padding: 0 !important; }
.app-customer.full-screen .chat { height: 100dvh; min-height: 0; margin: 0; border: 0; border-radius: 0; }
.app-customer.full-screen .chat-composer { padding-bottom: calc(.8rem + env(safe-area-inset-bottom)); }
.app-customer.full-screen .chat-head { padding-top: calc(.7rem + env(safe-area-inset-top)); }

/* ===== کیف پول ===== */
.wallet-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--moss), #5d6430); color: #fff; border-radius: 22px; padding: 1.2rem 1.2rem 1rem; margin-bottom: 1.2rem; box-shadow: 0 14px 30px rgba(71, 76, 34, .22); }
.wallet-hero::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; left: -60px; top: -80px; background: rgba(255, 255, 255, .07); }
.wallet-hero .label { font-size: .84rem; opacity: .85; display: inline-flex; gap: .4rem; align-items: center; }
.wallet-hero .money { font-size: 1.7rem; font-weight: 900; margin: .45rem 0 .2rem; display: flex; align-items: baseline; gap: .4rem; }
.wallet-hero .money small { font-size: .85rem; font-weight: 400; opacity: .8; }
.wallet-hero .gold { font-size: .84rem; opacity: .9; display: flex; align-items: center; gap: .35rem; }
.wallet-hero .actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; position: relative; z-index: 1; }
.wallet-btn { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.wallet-btn:hover, .wallet-btn:focus-visible { background: rgba(255, 255, 255, .26); color: #fff; }
.tx-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.tx-row { display: flex; align-items: center; gap: .75rem; padding: .8rem .9rem; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.tx-row:first-child { border-top: 0; }
.tx-row:hover { background: var(--paper); color: var(--ink); }

/* ===== دکمه‌ی غیرفعال: همان رنگ پروژه (نه آبی بوت‌استرپ) ===== */
.btn-primary:disabled, .btn-primary.disabled { background: var(--moss); border-color: var(--moss); color: #fff; opacity: .45; }
.btn:disabled, .btn.disabled { pointer-events: none; }

/* متن فروشگاه در صفحه‌ی دریافت فیزیکی */
.store-note { display: flex; gap: .55rem; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; font-size: .84rem; line-height: 1.9; white-space: pre-line; }
.store-note i { color: var(--olive); margin-top: .35rem; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); text-decoration: none !important; }
.btn-quiet:hover { color: var(--ink); background: var(--paper); }

/* دکمه‌های ردیف جدول هم‌اندازه (از جمله سه‌نقطه) */
.table-x .btn-sm { height: 34px; min-height: 34px; padding: 0 .8rem; font-size: .8rem; }
.table-x .btn-sm.row-menu, .row-menu { width: 34px; padding: 0; }

/* فیلد الزامی: ستاره کنار عنوان */
.form-label.required::after, label.required::after { content: " *"; color: var(--sell); font-weight: 700; }

/* ===== کارت درخواست دریافت و پرداخت (مدیر) ===== */
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.info-grid > div { background: var(--paper); border-radius: var(--radius-sm); padding: .5rem .7rem; min-width: 0; }
.info-grid .k { font-size: .72rem; color: var(--muted); }
.info-grid .v { font-size: .86rem; }
.info-grid .v small { font-size: .7rem; color: var(--muted); font-weight: 400; }
.account-box { background: var(--paper); border-radius: var(--radius-sm); padding: .55rem .75rem; margin-top: .5rem; font-size: .86rem; }
.account-box .k { font-size: .72rem; color: var(--muted); margin-bottom: .15rem; }
.action-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.file-pick { display: flex; align-items: center; gap: .5rem; width: 100%; height: 42px; padding: 0 .85rem; border: 1px dashed var(--sage); border-radius: var(--field-radius); background: var(--paper); color: var(--muted); font-size: .84rem; cursor: pointer; overflow: hidden; }
.file-pick i { color: var(--olive); }
.file-pick span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-pick.has-file { border-style: solid; border-color: var(--olive); color: var(--ink); }
.link-btn { background: none; border: 0; padding: 0; color: var(--olive); text-decoration: underline; text-underline-offset: 3px; }
.receipt-dialog { max-width: 520px; }
.receipt-img { width: 100%; max-height: 65vh; object-fit: contain; border-radius: var(--radius); background: var(--paper); }

/* ===== منوی کناری: شمارنده‌ی اعلان/چت در انتهای ردیف، قرمز روشن ===== */
.side nav span.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .45rem; margin: 0 auto 0 0 !important; border-radius: 99px; background: #D9393E; color: #fff; font-size: .72rem; font-weight: 700; gap: 0; }

/* ===== جدول‌ها: هم‌ترازی عددها با سرستون ===== */
.table-x th, .table-x td { text-align: right; }
.table-x th.text-center, .table-x td.text-center { text-align: center !important; }
.table-x td.text-end, .table-x th.text-end { text-align: left !important; }
.table-x td.num { unicode-bidi: isolate; }

/* عنوان + زیرعنوان کنار دکمه‌ی بازگشت */
.title-stack { display: flex; flex-direction: column; justify-content: center; min-height: 40px; }
.title-stack .page-title { line-height: 1.4; }
.title-stack .sub { font-size: .78rem; color: var(--muted); }

/* مشخصات یک سند */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: .65rem .2rem; border-bottom: 1px dashed var(--line); font-size: .88rem; vertical-align: middle; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 40%; color: var(--muted); font-weight: 500; }

/* فیلتر بازه‌ها در دسکتاپ هم داخل کادر بماند */
.toolbar .range { flex: 1 1 260px; min-width: 0; }
.toolbar .range .form-control { flex: 1 1 0; width: auto; min-width: 0; }

/* فهرست چت‌ها: شمارنده‌ی خوانده‌نشده */
.inbox .chat-row .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .45rem; border-radius: 99px; background: var(--moss); color: #fff; font-size: .72rem; font-weight: 700; flex-shrink: 0; box-shadow: 0 2px 6px rgba(71, 76, 34, .25); }

/* ===== خانه‌ی مشتری: کارت دارایی‌ها ===== */
.assets { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; background: linear-gradient(135deg, #fff 0%, var(--cream) 140%); border: 1px solid var(--line); border-radius: 22px; padding: 1rem .4rem; box-shadow: 0 10px 26px rgba(71, 76, 34, .08); }
.assets .divider { width: 1px; background: linear-gradient(to bottom, transparent, var(--line), transparent); margin: .2rem 0; }
.asset { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .55rem; row-gap: .35rem; align-items: center; padding: 0 .75rem; text-decoration: none; color: var(--ink); min-width: 0; }
.asset:hover { color: var(--ink); }
.asset .ico { grid-row: 1; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: .82rem; }
.asset .ico.money { background: var(--moss); color: #fff; }
.asset .ico.gold { background: #E9D38A; color: #6A5414; }
.asset .k { grid-row: 1; font-size: .78rem; color: var(--muted); }
.asset .v { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: flex-end; gap: .3rem; font-size: 1.25rem; font-weight: 900; white-space: nowrap; overflow: hidden; }
.asset .v small { font-size: .7rem; font-weight: 400; color: var(--muted); }
/* دکمه‌های قیمت کمی کوچک‌تر */
.price-btn { min-height: 38px !important; padding: .35rem .95rem !important; font-size: .86rem; }

/* ===== تابلوی قیمت صفحه‌ی خرید و فروش ===== */
.price-board { position: relative; overflow: hidden; border-radius: 22px; padding: 1rem 1.15rem 1.05rem; margin-bottom: 1rem; color: #fff; box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
.price-board.buy { background: linear-gradient(135deg, #8E3B33, #B85A4E); }
.price-board.sell { background: linear-gradient(135deg, #2F6B45, #4E8F63); }
.price-board::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; left: -50px; bottom: -90px; background: rgba(255, 255, 255, .08); }
.price-board .meta { display: flex; align-items: center; justify-content: space-between; }
.price-board .product { font-size: .78rem; background: rgba(255, 255, 255, .16); padding: .15rem .6rem; border-radius: 99px; }
.price-board .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: pulse 1.8s infinite; }
.price-board .label { margin-top: .6rem; font-size: .86rem; opacity: .85; }
.price-board .value { display: flex; align-items: baseline; gap: .4rem; font-size: 1.85rem; font-weight: 900; line-height: 1.4; position: relative; z-index: 1; }
.price-board .value small { font-size: .78rem; font-weight: 400; opacity: .8; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.quote-expired .btn { min-height: 42px; }

/* فیلترهای تاریخچه: مبلغ از/تا نیم‌عرض مثل تاریخ‌ها؛ مبلغ به حروف در نوار فیلتر نمایش داده نمی‌شود */
.toolbar .money-words { display: none !important; }
.toolbar .form-control.half { flex: 1 1 calc(50% - .5rem); min-width: 0; }
@media (min-width: 992px) { .app-admin .toolbar .form-control.half { flex: 0 1 170px; } }

/* آیتم‌های تاریخچه: مبلغ با واحد کوچک و کم‌رنگ */
.history-item .amount { display: flex; align-items: baseline; gap: .25rem; justify-content: flex-end; }
.history-item .amount small { font-size: .68rem; font-weight: 400; color: var(--muted); }
.history-item .text-start { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }

/* تابلوی قیمت: خرید سبز، فروش قرمز (هم‌رنگ دکمه‌ها)؛ قیمت چپ‌چین */
.price-board.buy { background: linear-gradient(135deg, #2F6B45, #4E8F63); }
.price-board.sell { background: linear-gradient(135deg, #8E3B33, #B85A4E); }
.price-board .value { justify-content: flex-end; }

/* فیلتر مبلغ: گروه با واحد، نیم‌عرض */
.toolbar .half-group { flex: 1 1 calc(50% - .5rem); min-width: 0; width: auto; flex-wrap: nowrap; }
.toolbar .half-group .form-control { min-width: 0; }
.toolbar .half-group .input-group-text { height: 42px; min-width: 0; padding: 0 .6rem; font-size: .78rem; background: var(--cream); border-color: transparent; }
@media (min-width: 992px) { .app-admin .toolbar .half-group { flex: 0 1 220px; } }

/* ===== Select2 هم‌شکل با بقیه‌ی فیلدها ===== */
.select2-container--default .select2-selection--single { height: 44px; border: 1px solid var(--line); border-radius: var(--field-radius); background: var(--surface); display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 1.5; padding-right: .9rem; padding-left: 2.4rem; color: var(--ink); width: 100%; }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--muted); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; left: .6rem; right: auto; }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single { border-color: var(--olive); }
.select2-dropdown { border: 0; border-radius: 14px; box-shadow: 0 12px 32px rgba(42, 44, 28, .14); overflow: hidden; font-family: var(--font); }
.select2-search--dropdown { padding: .5rem; }
.select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid var(--line); border-radius: 10px; height: 40px; padding: 0 .75rem; outline: 0; }
.select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--olive); }
.select2-container--default .select2-results__option { padding: .55rem .9rem; font-size: .88rem; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--cream); color: var(--moss); }
.select2-container--default .select2-results__option--selected { background: var(--paper); }
select.is-invalid + .select2 .select2-selection { border-color: var(--sell) !important; }

/* پنجره‌ی تاریخ: سه ستون col-4 با فهرست تمام‌عرض */
.date-row label { margin: 0; }
.date-row label > span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .35rem; }
.date-row .form-select { width: 100% !important; min-width: 0; padding-left: 1.9rem !important; background-position: left .55rem center; }

/* فیلتر بازه‌ها (معاملات یک مشتری): هر «از/تا» یک گروه هم‌قد با واحد */
.range-toolbar .range-group { flex: 1 1 calc(33.333% - .5rem); min-width: 180px; width: auto; flex-wrap: nowrap; }
.range-toolbar .range-group .form-control { min-width: 0; height: 42px; min-height: 42px; }
.range-toolbar .range-group .input-group-text { height: 42px; padding: 0 .6rem; font-size: .76rem; background: var(--cream); border-color: transparent; }
@media (max-width: 575px) { .range-toolbar .range-group { flex-basis: calc(50% - .5rem); min-width: 0; } }
.info-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-grid .amount-box { text-align: left; }
.info-grid .v small { margin-right: .15rem; }

/* تاریخچه: تاریخ درست زیر عنوان (راست‌چین) */
.history-item .flex-fill > .small.num { display: block; direction: rtl; unicode-bidi: isolate; text-align: right; margin-top: .15rem; }

/* تابلوی قیمت ساده‌تر: بدون سایه و تزئین */
.price-board { box-shadow: none; padding: .9rem 1.1rem; }
.price-board::after { display: none; }
.price-board .label { margin-top: 0; }

/* خانه: کارت دارایی بدون آیکون */
.asset { grid-template-columns: 1fr; }
.asset .k { grid-column: 1; }

/* کیف پول: عنوان، مبلغ و موجودی طلا وسط‌چین */
.wallet-hero .top, .wallet-hero .gold { justify-content: center; text-align: center; }
.wallet-hero .top { display: flex; }
.wallet-hero .money { justify-content: center; }

/* پنل پشتیبانی: دکمه‌ی ذخیره‌ی هر کارت پایین و سمت چپ، در ردیف خودش */
.form-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.form-actions .btn { min-width: 120px; }
.row-actions { display: flex; justify-content: flex-end; gap: .4rem; }
.row-actions form { margin: 0; }
.readonly-field { background: var(--paper); border: 1px solid var(--line); border-radius: var(--field-radius); padding: .6rem .9rem; color: var(--muted); }
.app-support .page-head + .table-wrap, .app-support .page-head + .empty { margin-top: .25rem; }

/* پیام خطای فیلد: نزدیک خود فیلد و با فاصله از دکمه‌ی بعدی */
input:has(+ .mobile-error), input:has(+ .field-error), .input-group:has(+ .field-error) { margin-bottom: 0 !important; }
.mobile-error, .field-error { margin: .35rem .2rem 1rem !important; }

/* معاملات یک مشتری: شش فیلتر در یک ردیف (هر کدام یک‌ششم) */
@media (min-width: 992px) {
    .range-toolbar { flex-wrap: nowrap; }
    .range-toolbar .range-group { flex: 1 1 0; min-width: 0; }
    .range-toolbar .reset { flex: 0 0 42px; }
}

/* گروه‌های فیلد داخل نوار فیلتر: فیلد و واحد هم‌قد */
.toolbar .input-group > .form-control { height: 42px !important; min-height: 42px !important; }
.toolbar .input-group > .input-group-text { height: 42px; }

/* کیف پول: سطر «کیف پول» راست‌چین */
.wallet-hero .top { justify-content: flex-start !important; text-align: right !important; }

/* جزئیات مشتری */
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.detail-actions form { margin: 0; }
.statement-form { background: var(--paper); border-radius: var(--radius); padding: .75rem; }
.card-link { text-decoration: none; color: var(--ink); transition: border-color .15s; }
.card-link:hover { border-color: var(--sage); color: var(--ink); }

/* ===== پیشنهاد نصب برنامه ===== */
.pwa-modal .pwa-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 8px 20px rgba(71, 76, 34, .18); }
.pwa-steps { text-align: right; padding-right: 1.2rem; margin: .5rem 0 0; font-size: .86rem; line-height: 2.1; }
.pwa-steps i { color: var(--olive); }

/* =====================================================================
   بازبینی موبایل (پنل فروشگاه و مشتری)
   ===================================================================== */

/* نوار پایین پنل فروشگاه: برچسب‌ها یک خطی */
.tabbar a, .tabbar span { white-space: nowrap; font-size: .7rem; min-width: 0; }

/* امکانات (موبایل) */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: .4rem; }
.feature-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; aspect-ratio: 1 / 1;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); text-align: center; padding: .5rem; }
.feature-tile:hover { border-color: var(--sage); color: var(--ink); }
.feature-tile .ico { width: 44px; height: 44px; border-radius: 14px; background: var(--cream); color: var(--olive); display: grid; place-items: center; font-size: 1.1rem; }
.feature-tile .label { font-size: .78rem; font-weight: 500; line-height: 1.5; }
.feature-tile .count { position: absolute; top: .45rem; left: .45rem; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 99px; background: #D9393E; color: #fff; font-size: .68rem; font-weight: 700; }
@media (min-width: 576px) { .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* فیلد شناور (ثبت دستی، خرید و فروش): پسوندها هم‌اندازه و وسط ارتفاع */
.float-field .suffix { width: 4.2rem; text-align: center; padding: 0 .4rem; font-size: .8rem; white-space: nowrap; }
.float-field .form-control { padding-left: 5.4rem; }
.float-field + .money-words { margin-top: .3rem; }

/* کارت دریافت و پرداخت: عنوان مبلغ راست، عدد چپ */
.info-grid .amount-box .k { text-align: right; }
.info-grid .amount-box .v { text-align: left; }

@media (max-width: 575px) {
    /* عنوان و بازگشت کوچک‌تر و متناسب */
    .page-title { font-size: 1.02rem; }
    .back-btn { width: 34px; height: 34px; flex-basis: 34px; font-size: .8rem; border-radius: 10px; }
    .page-head { margin-bottom: .8rem; gap: .5rem; }
    .page-head .btn:not(.btn-sm) { min-height: 38px; padding: .4rem .8rem; }
    .page-head .actions { width: auto; }
    .page-head .actions .btn { flex: 0 0 auto; }
    .count-pill { height: 22px; min-width: 24px; font-size: .7rem; }
    .section-title { font-size: .95rem; }

    /* نوار فیلتر: جست‌وجو تمام‌عرض و اول، بقیه دوتا دوتا، هیچ‌چیز بیرون نزند */
    .toolbar { gap: .45rem; padding: .5rem; }
    .toolbar > * { min-width: 0; max-width: 100%; }
    .toolbar .search { order: -1; flex: 1 1 100%; }
    .toolbar .form-select, .toolbar .date-field, .toolbar .half-group, .toolbar .range-group, .toolbar .more-toggle { flex: 1 1 calc(50% - .45rem); min-width: 0; }
    .toolbar .chips { flex: 1 1 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
    .toolbar .chips label { justify-content: center; padding: 0 .4rem; }
    .toolbar .toolbar-more.show { gap: .45rem; }
    .toolbar .reset { flex: 0 0 42px; }

    /* کارت‌ها */
    .info-grid { grid-template-columns: 1fr 1fr; }
    .info-grid .amount-box { grid-column: 1 / -1; }
    .item-card .head { flex-wrap: wrap; gap: .4rem; }
    .action-pair .btn { min-height: 40px; }
    .feature-tile .label { font-size: .74rem; }
}
.product-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.product-row .form-control { flex: 1; }

/* ===== تب کالاها (خانه، خرید و فروش، دریافت فیزیکی، ثبت دستی، فیلترها) ===== */
.product-tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding: .1rem 0 .5rem; margin-bottom: .2rem; }
.product-tabs::-webkit-scrollbar { display: none; }
.product-tabs > button, .product-tabs > a { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 99px; padding: .4rem .95rem; font-size: .84rem; text-decoration: none; white-space: nowrap; }
.product-tabs > .active { background: var(--moss); border-color: var(--moss); color: #fff; font-weight: 700; }

/* موجودی وزنی چند کالا در کارت دارایی */
.asset.weights { grid-template-columns: 1fr; row-gap: .2rem; align-content: start; }
.asset.weights .w { display: flex; align-items: baseline; gap: .3rem; justify-content: flex-end; font-weight: 900; font-size: .98rem; white-space: nowrap; }
.asset.weights .w .name { font-weight: 400; font-size: .72rem; color: var(--muted); margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.asset.weights .w small { font-size: .66rem; font-weight: 400; color: var(--muted); }
.product-card .delivery-min { border-top: 1px dashed var(--line); padding-top: .6rem; }
.product-tag { display: inline-block; font-size: .7rem; font-weight: 500; color: var(--moss); background: var(--cream); border-radius: 99px; padding: .05rem .5rem; vertical-align: middle; margin-right: .25rem; }

/* وضعیت هر سمت در تابلوی قیمت بازارها */
.state-badge { display: inline-block; font-size: .68rem; font-weight: 700; padding: .05rem .5rem; border-radius: 99px; margin-right: .35rem; vertical-align: middle; }
.state-badge.on { background: #E3EFE3; color: var(--buy); }
.state-badge.off { background: #F3E3E0; color: var(--sell); }

/* تب کالاها: قابل کشیدن و اسکرول، بدون بریده شدن */
.product-tabs { cursor: grab; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; padding-inline: .1rem; }
.product-tabs:active { cursor: grabbing; }
.product-tabs > * { user-select: none; }

/* جدول مشخصات (جزئیات مشتری و جزئیات سند): مقدارها چپ‌چین */
.spec-table td { text-align: left; }
.spec-table td .badge-x { margin: 0; }

/* جزئیات مشتری: مانده‌ها بالا، دکمه‌ها پایین کارت */
.balance-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; height: 100%; }
.detail-actions .btn { font-size: .84rem; white-space: nowrap; padding-inline: .5rem; }
.request-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.request-boxes > div .v small { font-size: .7rem; color: var(--muted); font-weight: 400; }
.tabbar .tab-ico { position: relative; display: inline-block; }
.tabbar .tab-ico .dot-badge { top: -6px; left: -10px; }
a.toast-item.success { color: #fff; }

/* خانه‌ی مشتری: موجودی‌ها به شکل فهرست ردیفی */
.assets-list { background: linear-gradient(135deg, #fff 0%, var(--cream) 160%); border: 1px solid var(--line); border-radius: 22px; padding: .35rem .2rem; box-shadow: 0 10px 26px rgba(71, 76, 34, .08); }
.asset-row { display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: .6rem; padding: .6rem .9rem; text-decoration: none; color: var(--ink); border-top: 1px dashed var(--line); }
.asset-row:first-child { border-top: 0; }
.asset-row:hover { color: var(--ink); background: rgba(255, 255, 255, .55); border-radius: 14px; }
.asset-row .k { font-size: .84rem; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-row .v { display: flex; align-items: baseline; gap: .3rem; font-weight: 900; font-size: 1.02rem; white-space: nowrap; }
.asset-row .v small { font-size: .7rem; font-weight: 400; color: var(--muted); }
.asset-row.money .k { color: var(--ink); font-weight: 700; }
.asset-row.money .v { font-size: 1.25rem; }
.asset-row .go { color: var(--muted); font-size: .72rem; }
.product-card .settlement { display: flex; align-items: center; gap: .45rem; font-size: .82rem; border-radius: 10px; padding: .45rem .7rem; }
.product-card .settlement.ok { background: #E3EFE3; color: var(--buy); }
.product-card .settlement.missing { background: #F3E3E0; color: var(--sell); }
.reminder-ico { width: 60px; height: 60px; border-radius: 18px; background: var(--cream); color: var(--olive); display: inline-grid; place-items: center; font-size: 1.5rem; }
.price-board .settle-note { font-size: .78rem; opacity: .85; margin-top: .1rem; }
.retention-group { width: 140px; }

/* =====================================================================
   اعلان‌های بالای صفحه: کارت تیره، دایره‌ی آیکون رنگی، عنوان پررنگ (بالا وسط)
   ===================================================================== */
.toast-item, .toast-item.success, .toast-item.error, .toast-item.info, .toast-item.live, .toast-item.request {
    display: flex !important; align-items: center; gap: .75rem; background: #111827; color: #fff; border-radius: 16px;
    padding: .75rem .8rem .75rem .9rem; box-shadow: 0 14px 34px rgba(17, 24, 39, .28); text-decoration: none; border: 1px solid rgba(255, 255, 255, .06);
}
.toast-item:hover { color: #fff; }
.toast-item .t-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .85rem;
    background: rgba(16, 185, 129, .15); color: #34D399; box-shadow: inset 0 0 0 1.5px rgba(52, 211, 153, .55); }
.toast-item.error .t-ico { background: rgba(239, 68, 68, .15); color: #F87171; box-shadow: inset 0 0 0 1.5px rgba(248, 113, 113, .55); }
.toast-item.info .t-ico, .toast-item.live .t-ico { background: rgba(96, 165, 250, .15); color: #93C5FD; box-shadow: inset 0 0 0 1.5px rgba(147, 197, 253, .5); }
.toast-item.request .t-ico { background: rgba(250, 204, 21, .15); color: #FDE047; box-shadow: inset 0 0 0 1.5px rgba(253, 224, 71, .5); }
.toast-item .t-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.toast-item .t-body b { font-size: .88rem; font-weight: 700; }
.toast-item .t-body span { font-size: .8rem; opacity: .8; white-space: pre-line; }
.toast-item > i { display: none; }

/* =====================================================================
   بازارها: نوار وضعیت بازار و ساعت، تب کالاها، تاریخچه
   ===================================================================== */
.market-bar { display: flex; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: .8rem 1rem; margin-bottom: 1rem; box-shadow: 0 6px 18px rgba(42, 44, 28, .05); }
.market-bar .ico { position: relative; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: #E6F5EE; color: #16A34A; }
.market-bar.closed .ico { background: #FBE9E7; color: var(--sell); }
.market-bar .ico .dot { position: absolute; top: -3px; left: -3px; width: 11px; height: 11px; border-radius: 50%; background: #10B981; border: 2px solid var(--surface); }
.market-bar.closed .ico .dot { background: var(--sell); }
.market-bar .title { font-weight: 800; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.market-bar .title .state { font-size: .7rem; font-weight: 700; padding: .1rem .55rem; border-radius: 99px; background: #DCFCE7; color: #15803D; }
.market-bar.closed .title .state { background: #FDE2DE; color: var(--sell); }
.market-bar .hours { font-size: .8rem; color: var(--muted); margin-top: .15rem; display: flex; align-items: center; gap: .35rem; }
.market-bar .clock { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); line-height: 1.4; flex-shrink: 0; }
.market-bar .clock b { font-size: .95rem; letter-spacing: .02em; }
.market-bar .clock span { font-size: .68rem; color: var(--muted); }
.min-w-0 { min-width: 0; }
.market-tabs { margin-bottom: .6rem; }

.seg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; background: var(--paper); border-radius: 14px; padding: .25rem; }
.seg-tabs .nav-link { border-radius: 11px; color: var(--muted); font-size: .84rem; padding: .5rem; text-align: center; border: 0; }
.seg-tabs .nav-link.active { background: var(--moss); color: #fff; font-weight: 700; }
.log-row { padding: .8rem 0; }
.log-row .ico { width: 40px; height: 40px; font-size: .85rem; }
.log-row .ico.text-buy { background: #E6F5EE; color: #16A34A; }
.log-row .ico.text-sell { background: #FDECEA; color: #DC2626; }
.log-row .what { display: inline-flex; align-items: center; gap: .3rem; }
.log-row .sub { display: block; font-size: .74rem; color: var(--muted); margin-top: .15rem; }
.log-row .change-pill { margin-top: .25rem; }
.log-row .when { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.5; }
.log-row .when b { font-size: .86rem; color: var(--ink); }
.log-row .when span { font-size: .7rem; }

/* چک‌باکس و کلید: بدون رنگ آبی پیش‌فرض بوت‌استرپ در فوکوس */
.form-check-input:focus { box-shadow: none !important; border-color: var(--olive) !important; outline: 0; }
.form-check-input:checked { background-color: var(--moss); border-color: var(--moss); }
.form-switch .form-check-input:focus:not(:checked) { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23a3a07a'/%3e%3c/svg%3e"); }

/* Select2 هم‌شکل بقیه‌ی فیلدها (بعد از فایل خود Select2 هم اعمال شود) */
html body .select2-container--default .select2-selection--single { height: 44px; border: 1px solid var(--line); border-radius: var(--field-radius); background: var(--surface); display: flex; align-items: center; }
html body .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 1.5; padding-right: .9rem; padding-left: 2.4rem; color: var(--ink); }
html body .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--muted); }
html body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; left: .7rem; right: auto; }
html body .select2-container--default.select2-container--open .select2-selection--single,
html body .select2-container--default.select2-container--focus .select2-selection--single { border-color: var(--olive); }
html body .select2-dropdown { border: 0; border-radius: 14px; box-shadow: 0 12px 32px rgba(42, 44, 28, .14); overflow: hidden; }

/* واریز با درگاه: فاصله‌ی دکمه‌های مبلغ آماده از فیلد */
.quick-amounts { margin-top: .6rem; }
.result-icon { width: 68px; height: 68px; margin: .2rem auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; color: #fff; }
.result-icon.ok { background: var(--buy); box-shadow: 0 10px 24px rgba(47, 122, 76, .3); }
.result-icon.fail { background: var(--sell); box-shadow: 0 10px 24px rgba(178, 59, 50, .3); }
.tabbar .tab-svg { width: 22px; height: 22px; display: block; margin: 0 auto .15rem; }

/* ===== داشبورد پشتیبانی ===== */
.stat-card { display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem; height: 100%; }
.stat-card .ico { width: 44px; height: 44px; border-radius: 14px; background: var(--cream); color: var(--olive); display: grid; place-items: center; flex-shrink: 0; }
.stat-card .k { font-size: .78rem; color: var(--muted); }
.stat-card .v { font-weight: 800; font-size: 1.05rem; }
.progress-thin { height: 5px; border-radius: 99px; background: var(--paper); margin-top: .4rem; overflow: hidden; }
.progress-thin span { display: block; height: 100%; background: var(--moss); border-radius: 99px; }
.status-list > div { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .86rem; }
.status-list > div:last-child { border-bottom: 0; }
.status-list > div > span:first-child { color: var(--muted); }
.activity-list .activity { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.activity-list .activity:last-child { border-bottom: 0; }
.activity .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.activity .dot.ok { background: #10B981; }
.activity .dot.off { background: var(--sell); }
.activity .what { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity .who { font-size: .74rem; color: var(--muted); }
.activity .when { font-size: .74rem; color: var(--muted); white-space: nowrap; }

/* =====================================================================
   خانه‌ی مشتری: کارت کیف پول (الهام از طرح فرستاده‌شده، با رنگ‌های پروژه)
   ===================================================================== */
.wallet-card { position: relative; overflow: hidden; border-radius: 24px; padding: 1.1rem 1rem 1rem; color: #F6F4E2;
    background: radial-gradient(120% 140% at 100% 0%, #5F6732 0%, #474C22 48%, #33371A 100%); box-shadow: 0 16px 34px rgba(51, 55, 26, .28); }
.wallet-card::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; left: -90px; top: -110px; background: rgba(237, 235, 203, .06); }
.wc-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; position: relative; }
.wc-title { display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem; opacity: .9; }
.wc-title > i { color: #E2C46A; }
.wc-eye { border: 0; background: rgba(237, 235, 203, .1); color: inherit; width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; font-size: .78rem; }
.wc-eye:hover { background: rgba(237, 235, 203, .2); }
.wc-link { color: #E2C46A; text-decoration: none; font-size: .8rem; display: inline-flex; align-items: center; gap: .3rem; }
.wc-link:hover { color: #F0D78A; }
.wc-main { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: .8rem 0 1rem; position: relative; }
.wc-amount { display: flex; align-items: baseline; gap: .4rem; font-size: 1.75rem; font-weight: 900; line-height: 1.3; }
.wc-amount small { font-size: .78rem; font-weight: 400; color: #E2C46A; }
.wc-actions { display: flex; gap: .45rem; }
.wc-actions .btn { min-height: 38px !important; padding: .35rem .9rem !important; font-size: .84rem; border-radius: 12px; }
.wc-deposit { background: #E2C46A; color: #2E2F17; border: 0; font-weight: 700; }
.wc-deposit:hover { background: #ECD385; color: #2E2F17; }
.wc-withdraw { background: rgba(237, 235, 203, .1); color: #F6F4E2; border: 1px solid rgba(237, 235, 203, .22); }
.wc-withdraw:hover { background: rgba(237, 235, 203, .18); color: #fff; }
.wc-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; position: relative; border-top: 1px solid rgba(237, 235, 203, .12); padding-top: .85rem; }
.wc-product { display: flex; flex-direction: column; gap: .55rem; padding: .7rem .75rem; border-radius: 16px; text-decoration: none; color: #F6F4E2;
    background: rgba(237, 235, 203, .07); border: 1px solid rgba(237, 235, 203, .12); transition: background-color .15s, border-color .15s; }
.wc-product:hover { color: #fff; background: rgba(237, 235, 203, .12); border-color: rgba(226, 196, 106, .45); }
.wc-product .h { display: flex; align-items: center; gap: .4rem; font-size: .8rem; }
.wc-product .h .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.wc-product .h i { font-size: .65rem; opacity: .6; }
.wc-product .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wc-product .dot.gold { background: #E2C46A; box-shadow: 0 0 0 3px rgba(226, 196, 106, .18); }
.wc-product .dot.silver { background: #D3D7DE; box-shadow: 0 0 0 3px rgba(211, 215, 222, .18); }
.wc-product .b { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.wc-product .w { font-weight: 900; font-size: 1rem; white-space: nowrap; }
.wc-product .w small { font-weight: 400; font-size: .7rem; opacity: .75; }
.wc-product .tag { font-size: .66rem; padding: .1rem .5rem; border-radius: 99px; background: rgba(237, 235, 203, .12); color: #EDEBCB; white-space: nowrap; }
.wc-product .tag.on { background: rgba(74, 222, 128, .16); color: #86EFAC; }

/* پنهان کردن مبلغ‌ها (دکمه‌ی چشم): جای عدد «••••••» نمایش داده می‌شود؛ به‌روزرسانی زنده هم پنهان می‌ماند */
.amounts-hidden [data-sensitive] { position: relative; color: transparent !important; text-shadow: none; }
.amounts-hidden [data-sensitive]::after { content: "••••••"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end;
    color: var(--ink); letter-spacing: .12em; font-weight: 900; }
.amounts-hidden .wallet-card [data-sensitive]::after { color: #F6F4E2; }
.amounts-hidden [data-sensitive]:empty::after { position: static; }

/* =====================================================================
   نمودار نوسانات قیمت
   ===================================================================== */
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1rem; }
.cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .7rem; }
.cc-title { font-weight: 800; display: flex; align-items: center; gap: .4rem; }
.cc-title i { color: #C9A23F; }
.cc-period { font-size: .72rem; color: var(--muted); margin-top: .15rem; }
.cc-legend { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; background: var(--paper); border-radius: 12px; padding: .45rem .7rem; font-size: .76rem; color: var(--muted); }
.cc-legend b { color: var(--ink); font-size: .8rem; }
.cc-legend .sell b { color: #C2414B; }
.cc-legend .buy b { color: var(--buy); }
.cc-legend span > i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-left: .35rem; vertical-align: middle; }
.cc-legend .sell > i { background: #C2414B; }
.cc-legend .buy > i { background: var(--buy); }
.cc-legend .when { margin-right: auto; color: #A88A2E; font-weight: 700; }
.chart-card .plot { margin-top: .6rem; }
.chart-card .canvas { position: relative; }
.chart-card svg { width: 100%; height: 190px; display: block; touch-action: pan-y; }
.chart-card .grid { stroke: var(--line); stroke-dasharray: 4 5; }
.chart-card .line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-card .line.sell { stroke: #C2414B; }
.chart-card .line.buy { stroke: var(--buy); }
.chart-card .guide { stroke: #D4A63A; stroke-width: 1.4; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.chart-card .pt { position: absolute; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.chart-card .pt.sell { background: #C2414B; }
.chart-card .pt.buy { background: var(--buy); }
.chart-card .axis { display: flex; justify-content: space-between; font-size: .68rem; color: var(--muted); margin-top: .35rem; border-top: 1px solid var(--line); padding-top: .4rem; }

/* سرویس‌ها: آیکون در مربع رنگی */
.service i { width: 44px; height: 44px; border-radius: 14px; display: grid !important; place-items: center; margin: 0 auto .1rem !important; font-size: 1.05rem; }
.services .service:nth-child(1) i { background: #EEEDE3; color: #55583A; }
.services .service:nth-child(2) i { background: #FCEBD8; color: #C9762B; }
.services .service:nth-child(3) i { background: #E2F3EA; color: #2F7A4C; }

/* بازارها: دسترسی سریع با زیرعنوان */
.quick-tiles .tile { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1rem .5rem; }
.quick-tiles .tile .ico { width: 46px; height: 46px; border-radius: 14px; background: #EEF0E6; color: var(--moss); display: grid; place-items: center; font-size: 1.05rem; margin-bottom: .2rem; }
.quick-tiles .tile > i { display: none; }
.quick-tiles .tile b { font-size: .9rem; }
.quick-tiles .tile small { font-size: .74rem; color: var(--muted); }

/* ===== اصلاح اعلان‌ها: دایره‌ی آیکون کشیده نشود ===== */
.toast-item .t-ico { flex: 0 0 34px !important; width: 34px !important; height: 34px !important; display: grid !important; padding: 0 !important; font-size: .85rem !important; opacity: 1 !important; }
.toast-item .t-body > span, .toast-item .t-body > b { display: block; }

/* کارت درخواست: وضعیت و زمان چسبیده به چپ */
.request-card .head-end { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; flex-shrink: 0; }

/* ===== کارت کیف پول: روشن و هماهنگ با بقیه‌ی صفحه ===== */
.wallet-card { background: linear-gradient(135deg, #fff 0%, var(--cream) 150%); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(71, 76, 34, .08); }
.wallet-card::before { background: rgba(214, 218, 163, .25); }
.wc-title { opacity: 1; color: var(--muted); }
.wc-title > i { color: var(--olive); }
.wc-eye { background: var(--paper); color: var(--moss); }
.wc-eye:hover { background: var(--cream); }
.wc-main { flex-direction: column; align-items: center; justify-content: center; text-align: center; margin: .5rem 0 .9rem; gap: .35rem; }
.wc-amount { color: var(--ink); justify-content: center; }
.wc-amount small { color: var(--muted); }
.wc-link { color: var(--olive); font-weight: 500; }
.wc-link:hover { color: var(--moss); }
.wc-products { border-top: 1px dashed var(--line); }
.wc-product { color: var(--ink); background: var(--paper); border: 1px solid var(--line); }
.wc-product:hover { color: var(--ink); background: var(--cream); border-color: var(--sage); }
.wc-product .h i { color: var(--muted); }
.wc-product .w small { color: var(--muted); opacity: 1; }
.wc-product .dot.gold { background: #C9A23F; box-shadow: 0 0 0 3px rgba(201, 162, 63, .18); }
.wc-product .dot.silver { background: #A9AFB8; box-shadow: 0 0 0 3px rgba(169, 175, 184, .2); }
.wc-product .tag.on { background: #E3EFE3; color: var(--buy); }

/* ===== پنهان کردن موجودی‌ها: «****» به‌جای عدد، در همان جا (بیرون نمی‌زند) ===== */
.amounts-hidden [data-sensitive] { color: inherit !important; font-size: 0 !important; position: static; }
.amounts-hidden [data-sensitive]::after { content: "****"; position: static; display: inline; font-size: 1rem; letter-spacing: .1em; color: inherit; font-weight: 900; }
.amounts-hidden .wc-amount [data-sensitive]::after { font-size: 1.6rem; }

/* قیمت‌های خانه با واحد کنار عدد */
.price-row .v { display: flex; align-items: baseline; gap: .3rem; }
.price-row .v .num { font-weight: 900; font-size: 1.2rem; }
.price-row .v .unit { font-size: .72rem; color: var(--muted); font-weight: 400; }

/* ===== پنهان کردن موجودی‌ها: ستاره‌ها هم‌رنگ متن (پیدا) ===== */
.amounts-hidden [data-sensitive]::after,
.amounts-hidden .wallet-card [data-sensitive]::after { color: var(--ink) !important; }

/* ===== تاریخچه: دکمه‌های فروش/خرید بدون پس‌زمینه‌ی خاکستری ===== */
.seg-tabs { background: transparent; border: 1px solid var(--line); }
.seg-tabs .nav-link:not(.active) { background: transparent !important; color: var(--muted); }
.seg-tabs .nav-link:not(.active):hover { color: var(--moss); background: var(--paper) !important; }

/* ===== منوی پایین موبایل: شمارنده‌ها خوانا ===== */
.tabbar .tab-ico { display: inline-block !important; position: relative; flex: none !important; }
.tabbar .tab-ico > i { display: block; }
.tabbar .dot-badge { position: absolute !important; top: -7px; left: -11px; display: grid !important; place-items: center; flex: none !important;
    min-width: 17px; height: 17px; padding: 0 .25rem; border-radius: 99px; background: #D9393E; color: #fff !important; font-size: .6rem !important; font-weight: 700; line-height: 1; gap: 0 !important; }
.tabbar .dot-badge.d-none { display: none !important; }

/* پنجره‌ی تنظیمات کالا: فاصله‌ی عنوان تاریخ از فهرست‌ها (row با g-2 حاشیه‌ی منفی بالا دارد) */
.modal .date-row { margin-top: .1rem; }

/* بازارها: قاب قیمت‌ها با فاصله‌ی داخلی کمتر و گردی هماهنگ */
.app-admin .ticker { padding: .55rem; border-radius: 20px; margin: 0 0 1rem; }
.app-admin .ticker-head { margin-bottom: .35rem; padding: 0 .3rem; }
.app-admin .ticker-head:not(:has(.live:not(.d-none))) { display: none; }
.app-admin .quote { border-radius: 15px; }
.app-admin .quote > div { padding: .8rem 1rem .85rem; }
.app-admin .ticker-foot { margin-top: .35rem; padding: 0 .3rem; }
.app-admin .ticker-foot:empty { display: none; }


/* مبلغ به حروف خالی جا نگیرد (مثلاً وقتی روش درصدی است) */
.money-words:empty { display: none; }

/* قیمت‌گذاری: باکس قیمت نهایی نزدیک فیلدها */
.final-price { margin-top: .7rem; }

/* بازارها: فاصله‌های یکدست بین نوار بازار، تب‌ها، تابلوی قیمت و بخش‌ها */
.app-admin .market-bar { margin-bottom: 1rem; }
.app-admin .market-tabs { margin-bottom: 1rem; padding-bottom: 0; }
.app-admin .ticker { margin-bottom: 1rem; }
.app-admin .ticker + .row > [class*="col"] > .section-head:first-child,
.app-admin .row > [class*="col"] > .section-head:first-child { margin-top: 0; }

/* تابلوی قیمت بازارها: واحد کنار عدد */
.price-line { display: flex; align-items: baseline; gap: .35rem; }
.price-line .unit { font-size: .78rem; color: var(--muted); font-weight: 400; }

/* درخواست‌های خرید و فروش: عددِ خط دوم باکس‌ها چپ‌چین (عنوان راست می‌ماند) */
.request-boxes .v.num, .request-boxes .amount-box .v { text-align: left; }

/* پنل فروشگاه: نوار اسکرول صفحه دیده نشود (اسکرول کار می‌کند؛ صفحه با ظاهر شدن نوار جابه‌جا نمی‌شود) */
html:has(body.app-admin) { scrollbar-width: none; }
html:has(body.app-admin)::-webkit-scrollbar, body.app-admin::-webkit-scrollbar { display: none; }

/* اعلان‌ها در همه‌ی پنل‌ها: همیشه افقی؛ متن فقط یک خط */
.toast-item { flex-direction: row !important; align-items: center !important; text-align: right !important; }
.toast-item .t-body { text-align: right; }
.toast-item.one-line .t-body > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-item .toast-close { flex-shrink: 0; margin: 0; }

/* کارت کیف پول: اگر آخرین کاشی کالا تنها در ردیفش است، تمام‌عرض شود */
.wc-products .wc-product:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* تابلوی قیمت بازارها: قیمت و واحد چپ‌چین */
.price-line { justify-content: flex-end; }

/* درخواست‌های خرید و فروش: بدون نوار رنگی کنار کارت؛ «خرید/فروش» کمی بزرگ‌تر */
.request-card, .request-card.sell { border-right: 1px solid var(--line); }
.request-card .side-title { font-size: 1.1rem; }

/* دریافت فیزیکی: موجودی چپ‌چین */
.balance-card.end .v { justify-content: flex-end; }

/* انتخاب ساعت (ساعت کاری): مقدار وسط فیلد */
[data-time-picker] .date-btn { justify-content: center; }

/* دریافت و پرداخت: دکمه‌ها پایین کارت (کارت‌های هم‌ردیف هم‌قد) */
.wallet-card-item { display: flex; flex-direction: column; }
.wallet-card-item .card-actions { margin-top: auto; padding-top: 1rem; }
.wallet-card-item .action-pair .btn { min-height: 44px; }

/* ساعت کاری: پس‌زمینه‌ی سفید، آیکون سمت راست با خط جداکننده، ساعت وسط */
[data-time-picker] .date-btn { position: relative; justify-content: center; background: var(--surface); padding-right: 3.2rem; padding-left: 3.2rem; }
[data-time-picker] .date-btn > i { position: absolute; right: 0; top: 0; bottom: 0; width: 2.8rem; display: grid; place-items: center; border-left: 1px solid var(--line); color: var(--olive); margin: 0; }
[data-time-picker] .date-btn > span { flex: none; text-align: center; }

/* دریافت و پرداخت: فیش پرداخت در جای خودش (زیر اطلاعات)؛ فقط دکمه‌ها پایین کارت */
.wallet-card-item .card-actions { flex: 1; display: flex; flex-direction: column; margin-top: .75rem; padding-top: 0; }
.wallet-card-item .card-actions .file-pick { margin-bottom: .75rem !important; }
.wallet-card-item .card-actions .action-pair { margin-top: auto; }

/* خرید و فروش (مشتری) و ثبت دستی: قیمت سمت انتخاب‌شده داخل فرم، بعد خط‌چین */
.form-price { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.form-price .k { font-size: .84rem; color: var(--muted); }
.form-price .v { display: flex; align-items: baseline; gap: .3rem; }
.form-price .v b { font-size: 1.3rem; font-weight: 900; }
.form-price .v small { font-size: .72rem; color: var(--muted); }
.form-price.buy .v b { color: var(--buy); }
.form-price.sell .v b { color: var(--sell); }
.dashed-sep { border: 0; border-top: 1px dashed var(--line); opacity: 1; margin: .8rem 0 1rem; }
.settle-line { font-size: .76rem; color: var(--muted); margin-top: .2rem; }

/* فاصله‌ی معقول بین آخرین فیلد و دکمه‌ی ثبت (جای خالیِ پیام و خلاصه گرفته نشود) */
[data-trade-error]:empty, .words:empty, [data-amount-words]:empty { display: none; }

/* خط‌چین‌های فرم خرید و فروش و ثبت دستی: کم‌رنگ و هم‌رنگ کادرها */
.dashed-sep { border-top: 1px dashed rgba(214, 218, 163, .55) !important; margin: .7rem 0 .9rem; }

/* خط‌چین زیر قیمت (div به‌جای hr تا رنگ پیش‌فرض hr اعمال نشود) */
div.dashed-sep { height: 0; border: 0; border-top: 1px dashed rgba(214, 218, 163, .7) !important; margin: .7rem 0 .9rem; background: none; }
.weight-error:empty { display: none; }
.weight-error { margin: -.35rem .3rem .8rem !important; }

/* قیمت داخل فرم خرید و فروش و ثبت دستی: کادر هشدار (سبز برای خرید، قرمز برای فروش)، بدون خط‌چین */
.form-price { padding: .8rem 1rem; border-radius: 14px; margin-bottom: 1rem; border: 1px solid transparent; }
.form-price.buy { background: #E6F2EA; border-color: rgba(47, 122, 76, .28); }
.form-price.sell { background: #F8E7E4; border-color: rgba(178, 59, 50, .26); }
.form-price.buy .k { color: #2F6B45; }
.form-price.sell .k { color: #8E3B33; }
.form-price + .settle-line { margin: -.6rem .2rem .9rem; }

/* ===== Select2: فلش هم‌شکل و هم‌جای select معمولی (همان آیکون بوت‌استرپ، سمت چپ) ===== */
html body .select2-container--default .select2-selection--single .select2-selection__arrow { display: none; }
html body .select2-container--default .select2-selection--single {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: left .85rem center; background-size: 14px 10px; }

/* ===== گفتگو: تصویرهای قبلی هم به شکل پیوست (بدون پیش‌نمایش) ===== */
.bubble a.image { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .7rem; border-radius: 10px; background: rgba(0, 0, 0, .05); text-decoration: none; color: inherit; font-size: .84rem; }
.bubble a.image img { display: none; }
.bubble a.image::before { content: "\f03e"; font-family: "Font Awesome 6 Free"; font-weight: 400; }
.bubble a.image::after { content: "تصویر"; }

/* ===== گفتگو: نوار اسکرول نازک و هماهنگ ===== */
.chat-scroll, .inbox, .chat-list { scrollbar-width: thin; scrollbar-color: rgba(166, 168, 120, .55) transparent; }
.chat-scroll::-webkit-scrollbar, .inbox::-webkit-scrollbar, .chat-list::-webkit-scrollbar { width: 6px; }
.chat-scroll::-webkit-scrollbar-track, .inbox::-webkit-scrollbar-track, .chat-list::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb, .inbox::-webkit-scrollbar-thumb, .chat-list::-webkit-scrollbar-thumb { background: rgba(166, 168, 120, .55); border-radius: 99px; }
.chat-scroll::-webkit-scrollbar-thumb:hover { background: rgba(120, 124, 80, .7); }

/* ===== صفحه‌ی وضعیت (ثبت‌نام انجام شد و ...) ===== */
.status-page { text-align: center; padding-top: 1.6rem; }
.status-icon { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; }
.status-icon.wait { background: #FBF1D9; color: #B7861F; box-shadow: 0 10px 24px rgba(183, 134, 31, .18); }
.status-steps { display: grid; gap: .5rem; text-align: right; background: var(--paper); border-radius: var(--radius); padding: .8rem .9rem; margin-bottom: 1rem; }
.status-steps > div { display: flex; align-items: center; gap: .6rem; font-size: .86rem; color: var(--muted); }
.status-steps .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; background: var(--surface); border: 1px solid var(--line); flex-shrink: 0; }
.status-steps .done { color: var(--buy); }
.status-steps .done .dot { background: var(--buy); border-color: var(--buy); color: #fff; }
.status-steps .current { color: var(--ink); font-weight: 700; }
.status-steps .current .dot { background: #FBF1D9; border-color: #E4C47A; color: #B7861F; }

/* ارسال دوباره‌ی کد: کم‌رنگ و بدون خط زیر (مثل بقیه‌ی صفحه‌ها) */
#resend, .guest #resend { color: var(--muted) !important; text-decoration: none !important; background: transparent; border-color: transparent; }
#resend:hover { color: var(--ink) !important; }
