/* =====================================================================
   SMS Panel theme — قاب شناور گوشه‌گرد + نوار آیکون فیروزه‌ای + پنل زیرمنو
   همه رنگ‌ها از توکن‌های :root می‌آیند؛ حالت تاریک فقط توکن‌ها را عوض می‌کند.
   فونت: IRANYekanX (نسخه اعداد فارسی برای متن، نسخه اعداد لاتین برای کد و ورودی‌های لاتین)
   ===================================================================== */

@font-face { font-family: Yekan; font-weight: 300; font-display: swap; src: url('../lib/fonts/iranyekanx/IRANYekanXFaNum-Light.woff2') format('woff2'), url('../lib/fonts/iranyekanx/IRANYekanXFaNum-Light.woff') format('woff'); }
@font-face { font-family: Yekan; font-weight: 400; font-display: swap; src: url('../lib/fonts/iranyekanx/IRANYekanXFaNum-Regular.woff2') format('woff2'), url('../lib/fonts/iranyekanx/IRANYekanXFaNum-Regular.woff') format('woff'); }
@font-face { font-family: Yekan; font-weight: 700; font-display: swap; src: url('../lib/fonts/iranyekanx/IRANYekanXFaNum-Bold.woff2') format('woff2'), url('../lib/fonts/iranyekanx/IRANYekanXFaNum-Bold.woff') format('woff'); }
@font-face { font-family: Yekan; font-weight: 900; font-display: swap; src: url('../lib/fonts/iranyekanx/IRANYekanXFaNum-Black.woff2') format('woff2'), url('../lib/fonts/iranyekanx/IRANYekanXFaNum-Black.woff') format('woff'); }
@font-face { font-family: YekanEn; font-weight: 400; font-display: swap; src: url('../lib/fonts/iranyekanx/IRANYekanX-Regular.woff2') format('woff2'), url('../lib/fonts/iranyekanx/IRANYekanX-Regular.woff') format('woff'); }
@font-face { font-family: YekanEn; font-weight: 700; font-display: swap; src: url('../lib/fonts/iranyekanx/IRANYekanX-Bold.woff2') format('woff2'), url('../lib/fonts/iranyekanx/IRANYekanX-Bold.woff') format('woff'); }

@font-face { font-family: CardMono; font-weight: 400; font-display: swap; src: url('../lib/fonts/sharetechmono/ShareTechMono-Regular.woff2') format('woff2'); }

:root {
    --font: Yekan, Tahoma, sans-serif;
    --font-en: YekanEn, Yekan, Tahoma, sans-serif;

    /* رنگ اصلی (فیروزه‌ای) / ثانویه (سبز) / تاکیدی (نارنجی) */
    --primary: #14957a;
    --primary-600: #0f7d66;
    --primary-soft: rgba(20, 149, 122, .10);
    --primary-soft-2: rgba(20, 149, 122, .16);
    --primary-ring: rgba(20, 149, 122, .24);
    --secondary-brand: #45b35d;
    --accent: #f2703f;
    --accent-soft: rgba(242, 112, 63, .12);

    --success: #1e9c5a;  --success-soft: rgba(30, 156, 90, .12);
    --info: #2f7fe0;     --info-soft: rgba(47, 127, 224, .11);
    --warning: #e59a1b;  --warning-soft: rgba(229, 154, 27, .14);
    --danger: #e5484d;   --danger-soft: rgba(229, 72, 77, .11);
    --secondary: #6b7a8c; --secondary-soft: rgba(107, 122, 140, .13);

    --page-bg: #dfece5;
    --rail-bg: linear-gradient(180deg, #18a385 0%, #11906f 55%, #0c7c60 100%);
    --rail-solid: #12916f;
    --sheet-bg: #f2f7f4;
    --main-bg: #f2f7f4;
    --surface: #ffffff;
    --surface-2: #f6faf8;
    --surface-3: #ebf3ef;
    --border: #e3ece7;
    --border-2: #d5e3db;
    --text: #17272a;
    --text-2: #4a5d5f;
    --muted: #8a9c9a;

    --r-xl: 30px;
    --r-lg: 22px;
    --radius: 18px;
    --frame: 14px;
    --rail-w: 92px;
    --panel-w: 258px;

    --shadow-sm: 0 1px 2px rgba(16, 40, 34, .05);
    --shadow: 0 1px 2px rgba(16, 40, 34, .04), 0 14px 34px -20px rgba(15, 95, 74, .28);
    --shadow-lg: 0 24px 60px -18px rgba(12, 60, 48, .32);
    --shadow-primary: 0 12px 26px -12px rgba(20, 149, 122, .75);

    --code-bg: #0f1f1c;
    --code-text: #d9ece6;
}

html[data-theme="dark"] {
    --primary: #2fc59f;
    --primary-600: #25ab89;
    --primary-soft: rgba(47, 197, 159, .12);
    --primary-soft-2: rgba(47, 197, 159, .2);
    --primary-ring: rgba(47, 197, 159, .3);
    --accent: #ff8a5b;
    --accent-soft: rgba(255, 138, 91, .14);

    --success: #3ccf86;  --success-soft: rgba(60, 207, 134, .14);
    --info: #5aa2f5;     --info-soft: rgba(90, 162, 245, .14);
    --warning: #f5b83d;  --warning-soft: rgba(245, 184, 61, .14);
    --danger: #ff6b6f;   --danger-soft: rgba(255, 107, 111, .14);
    --secondary: #9aabaa; --secondary-soft: rgba(154, 171, 170, .14);

    --page-bg: #070f0d;
    --rail-bg: linear-gradient(180deg, #0f4a3d 0%, #0b3a30 60%, #082c25 100%);
    --rail-solid: #0d4236;
    --sheet-bg: #0e1917;
    --main-bg: #0e1917;
    --surface: #14221f;
    --surface-2: #182825;
    --surface-3: #1d302c;
    --border: #22362f;
    --border-2: #2b443c;
    --text: #e4efeb;
    --text-2: #b3c6c0;
    --muted: #7c938d;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 16px 34px -20px rgba(0, 0, 0, .7);
    --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .7);
    --shadow-primary: 0 12px 26px -12px rgba(47, 197, 159, .5);
    --code-bg: #050c0a;
    color-scheme: dark;
}

/* ---------- پایه ---------- */
html, body, button, input, select, textarea, .tooltip, .popover, .dropdown-item,
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--font); }
body { background: var(--page-bg); color: var(--text); -webkit-font-smoothing: antialiased; font-size: .92rem; }
b, strong { font-weight: 700; }
a { color: var(--primary); }
a:hover { color: var(--primary-600); text-decoration: none; }
ul { padding-inline-start: 0; }
.text-dark { color: var(--text) !important; }
.text-muted { color: var(--muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-danger { background: var(--danger) !important; } .bg-warning { background: var(--warning) !important; }
hr { border-top-color: var(--border); }
code, kbd, pre, .code-block, input.ltr, textarea.ltr, .font-en { font-family: var(--font-en); }
code { color: #c2185b; background: var(--surface-3); padding: .1rem .4rem; border-radius: 6px; font-size: .8em; direction: ltr; unicode-bidi: embed; }
html[data-theme="dark"] code { color: #ff8fb8; }
::selection { background: var(--primary-ring); }
* { scrollbar-width: thin; scrollbar-color: rgba(90, 120, 112, .35) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(90, 120, 112, .32); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

.ltr, .mobile { direction: ltr; unicode-bidi: embed; }
.sms-text { white-space: pre-wrap; word-break: break-word; }
.nowrap { white-space: nowrap; }
.dropdown-item { text-align: right; }

/* =====================================================================
   قاب برنامه
   ===================================================================== */
body.app-body {
    height: 100vh; overflow: hidden;
    background:
        radial-gradient(1200px 600px at 100% 0, rgba(255, 255, 255, .55), transparent 60%),
        radial-gradient(900px 500px at 0 100%, rgba(69, 179, 93, .14), transparent 60%),
        var(--page-bg);
}
html[data-theme="dark"] body.app-body { background: radial-gradient(900px 500px at 100% 0, rgba(47, 197, 159, .07), transparent 60%), var(--page-bg); }
.app-shell {
    position: fixed; inset: var(--frame); display: flex;
    border-radius: var(--r-xl); background: var(--rail-bg); overflow: hidden;
    box-shadow: 0 40px 80px -40px rgba(10, 70, 55, .55);
}

/* ---------- نوار آیکون ---------- */
.app-rail { width: var(--rail-w); flex: none; display: flex; flex-direction: column; align-items: center; padding: 18px 0 14px; color: #fff; position: relative; z-index: 3; }
.rail-logo { margin-bottom: 18px; color: #fff !important; }
.brand-logo { display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.brand-logo svg { width: 20px; height: 20px; }
.brand-logo img { height: 64%; width: auto; display: block; }
.rail-logo .brand-logo { width: 48px; height: 48px; border-radius: 16px; background: #fff; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .45); transition: transform .2s; }
.rail-logo:hover .brand-logo { transform: scale(1.05); }
.rail-logo .brand-logo svg { width: 24px; height: 24px; }
.rail-nav { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; overflow-y: auto; overflow-x: hidden; width: 100%; padding: 2px 0; scrollbar-width: none; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-item {
    width: 74px; padding: 7px 0 6px; border-radius: 18px; border: 0; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative;
    color: rgba(255, 255, 255, .74) !important; transition: color .15s;
}
.rail-item .ri-icon { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.08rem; transition: background .18s, color .18s, box-shadow .18s; }
.rail-item .ri-label { font-size: .68rem; line-height: 1.3; white-space: nowrap; }
.rail-item:hover { color: #fff !important; }
.rail-item:hover .ri-icon { background: rgba(255, 255, 255, .13); }
.rail-item.active, .rail-item.open { color: #fff !important; font-weight: 700; }
.rail-item.active .ri-icon { background: #fff; color: var(--rail-solid); box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .rail-item.active .ri-icon { background: var(--primary); color: #06201a; }
.rail-item.open:not(.active) .ri-icon { background: rgba(255, 255, 255, .2); }
.rail-item .ri-badge { position: absolute; top: 3px; left: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; font-size: .62rem; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--rail-solid); }
.rail-foot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .14); width: 60px; }
.rail-mini { width: 54px; padding: 4px 0; }
.rail-mini .ri-icon { width: 38px; height: 38px; border-radius: 12px; }

/* ---------- برگه (قوس روی نوار رنگی) ---------- */
.app-sheet { flex: 1; min-width: 0; display: flex; position: relative; background: var(--sheet-bg); border-radius: var(--r-xl); overflow: hidden; box-shadow: 0 0 40px -10px rgba(0, 0, 0, .18); }
/* لایه‌های دارای backdrop-filter (نوار بالا) با overflow+radius بریده نمی‌شوند؛ clip-path گرد همه را می‌بُرد */
.app-sheet { clip-path: inset(0 round var(--r-xl)); }

/* ---------- پنل زیرمنو ---------- */
.app-panel {
    width: var(--panel-w); flex: none; position: relative; display: flex; flex-direction: column;
    background: var(--surface); border-left: 1px solid var(--border);
    /* بالاتر از نوار بالای محتوا (sticky با z-index 20) تا دکمه جمع/باز کردن روی مرز پنل نصفه دیده نشود */
    transition: width .32s cubic-bezier(.4, 0, .2, 1); z-index: 25;
}
.app-panel .panel-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 26px 16px 12px; }
.app-panel .panel-scroll, .app-panel .panel-foot { width: var(--panel-w); transition: opacity .2s; }
.panel-group { display: none; }
.panel-group.show { display: block; animation: panelIn .3s ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: center; gap: .6rem; padding: 0 6px 18px; }
.panel-head h2 { font-size: 1.15rem; font-weight: 900; margin: 0; color: var(--text); }
.panel-head .ph-icon { width: 34px; height: 34px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.panel-links { display: flex; flex-direction: column; gap: 4px; }
.panel-link { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: 14px; color: var(--text-2) !important; transition: background .15s, color .15s; position: relative; }
.panel-link .pl-icon { width: 36px; height: 36px; border-radius: 11px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-2); font-size: .95rem; transition: all .15s; }
.panel-link .pl-text { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.panel-link .pl-text b { font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-link .pl-text small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-link .pl-badge { margin-right: auto; }
.panel-link:hover { background: var(--surface-2); color: var(--text) !important; }
.panel-link:hover .pl-icon { background: var(--primary-soft); color: var(--primary); }
.panel-link.active { background: var(--primary-soft); color: var(--primary) !important; }
.panel-link.active .pl-icon { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.panel-link.active::before { content: ""; position: absolute; right: -16px; top: 12px; bottom: 12px; width: 4px; border-radius: 4px 0 0 4px; background: var(--primary); }
.panel-foot { padding: 12px 16px 18px; }
.promo-card { position: relative; overflow: hidden; border-radius: 18px; padding: 16px 16px 12px; margin-bottom: 12px; background: linear-gradient(160deg, var(--primary-soft-2), var(--primary-soft)); color: var(--text); }
.promo-card::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; left: -40px; top: -50px; background: rgba(255, 255, 255, .45); }
html[data-theme="dark"] .promo-card::after { background: rgba(255, 255, 255, .04); }
.promo-card > * { position: relative; z-index: 1; }
.promo-card .pc-art { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--primary); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.promo-card .pc-label { font-size: .75rem; color: var(--text-2); }
.promo-card .pc-value { font-size: 1.15rem; font-weight: 900; }
.promo-card .pc-value small { font-size: .7rem; font-weight: 400; color: var(--muted); }
.promo-card .pc-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; margin-top: 6px; }
.btn-create { height: 46px; border-radius: 14px !important; font-weight: 700; display: flex !important; align-items: center; justify-content: center; gap: .4rem; }
.panel-knob {
    position: absolute; top: 30px; left: -15px; width: 30px; height: 30px; border-radius: 50%; z-index: 5;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2); box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .3s, color .15s;
}
.panel-knob:hover { color: var(--primary); }
body.no-panel .panel-knob { display: none; }
body.no-panel .app-panel, body.panel-collapsed .app-panel { width: 0; border-left-color: transparent; }
body.no-panel .app-panel .panel-scroll, body.no-panel .app-panel .panel-foot,
body.panel-collapsed .app-panel .panel-scroll, body.panel-collapsed .app-panel .panel-foot { opacity: 0; pointer-events: none; }
/* پنل بسته: دکمه کامل داخل برگه قرار می‌گیرد (لبه گرد برگه آن را نمی‌بُرد) و نوار بالا برایش جا باز می‌کند */
body.panel-collapsed .panel-knob { transform: rotate(180deg); left: -38px; }
body.panel-collapsed .app-topbar { padding-right: 52px; }

/* ---------- ناحیه محتوا ---------- */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; background: var(--main-bg); }
.app-topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 16px 28px 12px;
    background: color-mix(in srgb, var(--main-bg) 82%, transparent); backdrop-filter: saturate(150%) blur(12px); -webkit-backdrop-filter: saturate(150%) blur(12px);
}
.tb-search { position: relative; flex: 0 1 380px; }
.tb-search > .fa { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); z-index: 1; }
.tb-search input { width: 100%; height: 46px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); padding: 0 44px; color: var(--text); box-shadow: var(--shadow-sm); outline: none; transition: border-color .15s, box-shadow .15s; font-size: .88rem; }
.tb-search input::placeholder { color: var(--muted); }
.tb-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.tb-search kbd { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); box-shadow: none; font-size: .7rem; padding: 1px 7px; border-radius: 6px; }
.tb-search-results { position: absolute; top: calc(100% + 8px); right: 0; left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; display: none; max-height: 360px; overflow-y: auto; }
.tb-search-results.show { display: block; }
.tb-search-results a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 10px; color: var(--text-2); font-size: .86rem; }
.tb-search-results a small { color: var(--muted); margin-right: auto; font-size: .72rem; }
.tb-search-results a .fa { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.tb-search-results a.sel, .tb-search-results a:hover { background: var(--primary-soft); color: var(--text); }
.tb-search-results .empty { padding: .8rem; color: var(--muted); font-size: .85rem; text-align: center; }
.tb-date { align-items: center; gap: .45rem; height: 40px; padding: 0 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: .82rem; color: var(--text); box-shadow: var(--shadow-sm); white-space: nowrap; }
.tb-date .fa { color: var(--primary); }
.tb-actions { margin-right: auto; display: flex; align-items: center; gap: 6px; }
.tb-btn { position: relative; width: 42px; height: 42px; border-radius: 14px; border: 0; background: transparent; color: var(--text-2) !important; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; cursor: pointer; transition: background .15s, color .15s; flex: none; }
.tb-btn:hover { background: var(--surface); color: var(--primary) !important; box-shadow: var(--shadow-sm); }
.tb-dot { position: absolute; top: 4px; left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--main-bg); }
.tb-dot.warn { background: var(--accent); }
.balance-chip { display: inline-flex; align-items: center; gap: .4rem; height: 40px; padding: 0 14px; border-radius: 99px; background: var(--primary-soft); color: var(--primary) !important; font-size: .85rem; margin-left: 4px; transition: background .15s; white-space: nowrap; }
.balance-chip:hover { background: var(--primary-soft-2); }
.balance-chip small { font-size: .7rem; opacity: .8; }
.tb-user { display: flex; align-items: center; gap: .6rem; padding: 4px; border-radius: 16px; color: var(--text) !important; margin-right: 6px; }
.tb-user:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.tb-user .tu-hi { display: block; font-weight: 700; font-size: .88rem; line-height: 1.3; }
.tb-user small { color: var(--muted); font-size: .72rem; }
.avatar { width: 40px; height: 40px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1fb08d, #45b35d); color: #fff; font-weight: 700; font-size: 1rem; line-height: 1; box-shadow: 0 8px 16px -8px rgba(20, 149, 122, .8); }
.avatar-sm { width: 32px; height: 32px; border-radius: 11px; font-size: .82rem; }
.avatar-lg { width: 76px; height: 76px; border-radius: 24px; font-size: 1.8rem; }
.avatar.tone-2 { background: linear-gradient(135deg, #f2703f, #f5a55a); box-shadow: 0 8px 16px -8px rgba(242, 112, 63, .8); }
.avatar.tone-3 { background: linear-gradient(135deg, #2f7fe0, #5bb4f5); box-shadow: 0 8px 16px -8px rgba(47, 127, 224, .7); }
.avatar.tone-4 { background: linear-gradient(135deg, #8e5cf0, #c084fc); box-shadow: 0 8px 16px -8px rgba(142, 92, 240, .7); }
.avatar.tone-5 { background: linear-gradient(135deg, #e5a01b, #f5c95a); box-shadow: 0 8px 16px -8px rgba(229, 160, 27, .7); }
.theme-toggle .fa-sun-o { display: none; }
html[data-theme="dark"] .theme-toggle .fa-sun-o { display: inline-block; }
html[data-theme="dark"] .theme-toggle .fa-moon-o { display: none; }

.app-content { flex: 1; padding: 6px 28px 24px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .5rem 1rem; margin: 6px 0 20px; }
.page-title { font-size: 1.45rem; font-weight: 900; margin: 0; color: var(--text); letter-spacing: -.2px; }
.page-subtitle { color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.breadcrumb { background: transparent; padding: 0; margin: 0; font-size: .78rem; }
.breadcrumb-item, .breadcrumb-item a { color: var(--muted); }
.breadcrumb-item.active { color: var(--text-2); }
.breadcrumb-item + .breadcrumb-item { padding-right: .5rem; padding-left: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--muted); padding-left: .5rem; padding-right: 0; content: "‹"; float: none; }
.app-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 14px 28px 18px; color: var(--muted); font-size: .76rem; }
.app-footer strong { color: var(--text-2); }
.drawer-backdrop { display: none; }

/* ---------- منوهای کشویی ---------- */
.dropdown-menu { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: .45rem; color: var(--text); }
.dropdown-item { border-radius: 10px; color: var(--text-2); padding: .5rem .75rem; font-size: .88rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-3); color: var(--text); }
.dropdown-item.text-danger:hover { background: var(--danger-soft); }
.dropdown-divider { border-top-color: var(--border); margin: .3rem 0; }
.dropdown-header { color: var(--muted); font-size: .76rem; font-weight: 700; text-align: center; }
.dropdown-menu-lg { min-width: 300px; }
.dropdown-user-head { padding: .6rem .75rem .7rem; display: flex; gap: .65rem; align-items: center; }
.dropdown-user-head small { color: var(--muted); display: block; }

/* =====================================================================
   اجزای عمومی
   ===================================================================== */
.card { background: var(--surface); color: var(--text); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 1.4rem; }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: 1.05rem 1.4rem; border-radius: var(--r-lg) var(--r-lg) 0 0 !important; }
.card-header.border-0 { border-bottom: 0; padding-bottom: .2rem; }
.card-title { float: right; font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; line-height: 1.9; }
.card-title > .fa { color: var(--primary); margin-left: .5rem; width: 32px; height: 32px; border-radius: 11px; background: var(--primary-soft); display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; vertical-align: middle; }
.card-tools { float: left; margin-left: -.4rem; }
.card-body { padding: 1.4rem; }
.card-footer { background: var(--surface-2); border-top: 1px solid var(--border); border-radius: 0 0 var(--r-lg) var(--r-lg) !important; padding: .8rem 1.4rem; }
.card-outline { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent) !important; }
.btn-tool { color: var(--muted); border-radius: 10px; font-size: .82rem; }
.btn-tool:hover { color: var(--primary); background: var(--primary-soft); }
.card-body > .table:last-child, .card-body.p-0 > .table { margin-bottom: 0; }

/* تب‌های قرصی (مثل Year/Month در نمونه) */
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface-3); border-radius: 99px; padding: 3px; gap: 2px; }
.seg > a, .seg > button { border: 0; background: transparent; color: var(--text-2); font-size: .78rem; padding: .32rem .9rem; border-radius: 99px; cursor: pointer; white-space: nowrap; font-weight: 500; font-family: var(--font); }
.seg > a:hover, .seg > button:hover { color: var(--text); }
.seg > .active, .seg > .active:hover { background: var(--primary); color: #fff !important; box-shadow: var(--shadow-primary); }
.seg .cnt { display: inline-block; min-width: 18px; padding: 0 5px; margin-right: 4px; border-radius: 99px; font-size: .68rem; background: rgba(0, 0, 0, .07); text-align: center; }
.seg > .active .cnt { background: rgba(255, 255, 255, .25); }

/* ---------- کارت‌های آماری ---------- */
.stat-card { position: relative; overflow: hidden; display: flex; flex-direction: column; height: calc(100% - 1.4rem); background: var(--surface); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1.15rem 1.25rem 0; margin-bottom: 1.4rem; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 20px 36px -22px rgba(15, 95, 74, .45); }
.stat-card .stat-head { padding-bottom: .9rem; display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.stat-card .stat-label { color: var(--muted); font-size: .84rem; }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 900; color: var(--text); line-height: 1.35; margin-top: .3rem; letter-spacing: -.3px; }
.stat-card .stat-value small { font-size: .78rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.stat-card .stat-meta { color: var(--muted); font-size: .78rem; margin-top: .1rem; }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.stat-card .stat-foot { margin: auto -1.25rem 0; padding: .65rem 1.25rem; border-top: 1px dashed var(--border); font-size: .8rem; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; }
.stat-card .stat-foot:hover { color: var(--primary); background: var(--surface-2); }
.stat-card .stat-foot .fa { transition: transform .2s; }
.stat-card .stat-foot:hover .fa { transform: translateX(-3px); }
.stat-card .stat-glow { display: none; }
.tone-primary .stat-icon, .ic-primary { background: var(--primary-soft); color: var(--primary); }
.tone-success .stat-icon, .ic-success { background: var(--success-soft); color: var(--success); }
.tone-info .stat-icon, .ic-info { background: var(--info-soft); color: var(--info); }
.tone-warning .stat-icon, .ic-warning { background: var(--warning-soft); color: var(--warning); }
.tone-danger .stat-icon, .ic-danger { background: var(--danger-soft); color: var(--danger); }
.tone-accent .stat-icon, .ic-accent { background: var(--accent-soft); color: var(--accent); }
.ic-secondary { background: var(--secondary-soft); color: var(--secondary); }
.stat-progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: .6rem; }
.stat-progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--secondary-brand)); }

/* کارت تمام‌رنگ (مثل Heart rate / Savings در نمونه‌ها) */
.hero-card { position: relative; overflow: hidden; border-radius: var(--r-lg); color: #fff; padding: 1.3rem 1.4rem; margin-bottom: 1.4rem; background: linear-gradient(150deg, #1aa887 0%, #12906f 50%, #0d7b60 100%); box-shadow: 0 22px 40px -22px rgba(13, 123, 96, .9); }
.hero-card.green { background: linear-gradient(150deg, #5cc46a 0%, #34a85a 50%, #1f9461 100%); box-shadow: 0 22px 40px -22px rgba(31, 148, 97, .9); }
.hero-card .hc-label { font-size: .9rem; opacity: .9; }
.hero-card .hc-value { font-size: 2.6rem; font-weight: 900; line-height: 1.2; letter-spacing: -1px; }
.hero-card .hc-value small { font-size: .9rem; font-weight: 400; opacity: .8; letter-spacing: 0; }
.hero-card .hc-meta { font-size: .8rem; opacity: .85; }
.hero-card .hc-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; pointer-events: none; }
.hero-card .hc-ring { position: absolute; width: 180px; height: 180px; border-radius: 50%; border: 28px solid rgba(255, 255, 255, .08); left: -50px; top: -60px; }
.hero-card > * { position: relative; }
.hero-card:has(> .hc-wave) { padding-bottom: 4.6rem; }
.hero-card a { color: #fff; }

/* بنر خوش‌آمد (مثل Today -10% discount) */
.welcome-card { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 1.6rem 1.8rem; margin-bottom: 1.4rem; min-height: 172px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); display: flex; align-items: center; }
.welcome-card .wc-text { position: relative; z-index: 1; max-width: 60%; }
.welcome-card h2 { font-size: 1.35rem; font-weight: 900; margin: 0 0 .4rem; color: var(--text); }
.welcome-card h2 em { font-style: normal; color: var(--primary); }
.welcome-card p { color: var(--text-2); font-size: .88rem; margin-bottom: .9rem; line-height: 1.9; }
.welcome-card .wc-art { position: absolute; left: 30px; bottom: 0; top: 0; width: 36%; display: flex; align-items: flex-end; justify-content: center; }
.welcome-card .wc-blob { position: absolute; left: 50%; bottom: -70px; width: 240px; height: 240px; margin-left: -120px; border-radius: 50%; background: var(--primary-soft-2); }
.welcome-card .wc-art svg { position: relative; height: 158px; width: auto; }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .85rem; }
.link-arrow .fa { transition: transform .2s; }
.link-arrow:hover .fa { transform: translateX(-3px); }

/* ردیف شاخص‌ها (مثل Blood / Height / Weight) */
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1.1rem; }
.metric-row.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-row > div { padding: 0 .3rem; text-align: center; border-left: 1px solid var(--border); }
.metric-row > div:last-child { border-left: 0; }
.metric-row span { display: block; font-size: .7rem; color: var(--muted); margin-bottom: .2rem; }
.metric-row b { font-size: .9rem; color: var(--text); white-space: nowrap; }
.pm-head { display: flex; align-items: center; gap: .8rem; }
.pm-name { font-weight: 900; font-size: 1.02rem; }
.pm-sub { color: var(--muted); font-size: .78rem; }

/* نوار روزهای هفته */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.week-strip .wd { padding: .55rem 0; border-radius: 99px; font-size: .72rem; color: var(--muted); position: relative; }
.week-strip .wd b { display: block; font-size: .95rem; color: var(--text); margin-top: .25rem; font-weight: 700; }
.week-strip .wd.today { background: var(--primary); color: rgba(255, 255, 255, .85); box-shadow: var(--shadow-primary); }
.week-strip .wd.today b { color: #fff; }
.week-strip .wd.has::after { content: ""; position: absolute; top: 6px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.week-strip .wd.today.has::after { background: #fff; }

/* آیتم‌های فهرستی (مثل Your treatment) */
.list-tile { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 16px; background: var(--surface-2); margin-bottom: .55rem; color: var(--text) !important; transition: background .15s, transform .15s; }
.list-tile:hover { background: var(--primary-soft); transform: translateX(-2px); }
.list-tile:last-child { margin-bottom: 0; }
.list-tile .lt-icon { width: 40px; height: 40px; border-radius: 13px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.list-tile .lt-main { flex: 1; min-width: 0; }
.list-tile .lt-title { font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-tile .lt-sub { font-size: .74rem; color: var(--muted); }
.list-tile.featured { background: linear-gradient(150deg, #1aa887, #0f8a6b); color: #fff !important; box-shadow: 0 16px 30px -18px rgba(13, 123, 96, .9); }
.list-tile.featured .lt-sub { color: rgba(255, 255, 255, .82); }
.list-tile.featured .lt-icon { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; }
.list-tile.featured .badge { background: rgba(255, 255, 255, .2); color: #fff; }

/* دسترسی سریع (مثل Quick Access) */
.quick-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.quick-tile { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: .3rem .2rem; color: var(--text-2) !important; font-size: .8rem; text-align: center; }
.quick-tile .qi { width: 58px; height: 58px; border-radius: 19px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform .18s, box-shadow .18s; }
.quick-tile:hover .qi { transform: translateY(-3px); box-shadow: var(--shadow), 0 16px 26px -16px rgba(15, 95, 74, .5); }
.quick-tile:hover { color: var(--text) !important; }
.qi.c1 { color: #14957a; } .qi.c2 { color: #f2703f; } .qi.c3 { color: #2f7fe0; } .qi.c4 { color: #8e5cf0; } .qi.c5 { color: #e5a01b; } .qi.c6 { color: #e5484d; }

.line-item { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.4rem; border-bottom: 1px solid var(--border); }
.line-item:last-child { border-bottom: 0; }
.line-item .li-icon { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.line-item .li-main { flex: 1; min-width: 0; }
.line-item .li-title { font-weight: 700; color: var(--text); }
.line-item .li-sub { font-size: .76rem; color: var(--muted); }
.announce { border-radius: 14px; padding: .9rem 1rem; background: var(--info-soft); margin-bottom: .75rem; }
.announce h6 { font-weight: 700; color: var(--text); margin-bottom: .35rem; }
.announce p { color: var(--text-2); font-size: .86rem; }

/* ---------- جدول ---------- */
.table { color: var(--text); }
.table thead th { background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .76rem; border-bottom: 1px solid var(--border) !important; border-top: 0 !important; white-space: nowrap; padding-top: .75rem; padding-bottom: .75rem; }
.table td, .table th { vertical-align: middle; border-top: 1px solid var(--border); }
.table td { padding: .75rem; }
.table-sm td, .table-sm th { font-size: .86rem; padding: .6rem .7rem; }
.card .table thead th:first-child, .card .table td:first-child { padding-right: 1.4rem; }
.card .table thead th:last-child, .card .table td:last-child { padding-left: 1.4rem; }
.table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.table-striped tbody tr:nth-of-type(even) { background: var(--surface-2); }
.table-hover tbody tr:hover, .table tbody tr:hover { background: var(--primary-soft) !important; }
.table-bordered, .table-bordered td, .table-bordered th { border-color: var(--border); }
.table td.text-center.text-muted { padding: 2.4rem 1rem !important; }
.table td.text-center.text-muted::before { content: "\f0f6"; font-family: FontAwesome; display: block; font-size: 2rem; margin-bottom: .4rem; opacity: .3; }
.table-responsive { border-radius: 0 0 var(--r-lg) var(--r-lg); }
tr.row-selected td { background: var(--primary-soft); }

/* ---------- نشان‌ها ---------- */
.badge { font-weight: 700; border-radius: 99px; padding: .42em .82em; font-size: 72%; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-secondary { background: var(--secondary-soft); color: var(--secondary); }
.badge-light { background: var(--surface-3); color: var(--text-2); }
.badge-dark { background: var(--text); color: var(--surface); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge.dot::before, .table .badge:not(.no-dot)::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-left: .4em; vertical-align: middle; position: relative; top: -1px; }

/* ---------- دکمه‌ها ---------- */
.btn { border-radius: 12px; font-weight: 700; padding: .5rem 1.1rem; transition: all .15s ease; font-size: .88rem; }
.btn-sm { border-radius: 10px; padding: .28rem .7rem; font-size: .8rem; }
.btn-lg { border-radius: 14px; padding: .7rem 1.4rem; font-size: 1rem; }
.btn .fa { margin-left: .25rem; }
.btn .fa:only-child { margin: 0; }
.btn:focus, .btn.focus { box-shadow: 0 0 0 .2rem var(--primary-ring) !important; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .btn-primary:hover { color: #052019; }
.btn-success { background: var(--secondary-brand); border-color: var(--secondary-brand); color: #fff; box-shadow: 0 12px 24px -12px rgba(69, 179, 93, .8); }
.btn-success:hover { background: #379a4d; border-color: #379a4d; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #cc3a3f; border-color: #cc3a3f; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-info { background: var(--info); border-color: var(--info); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 12px 24px -12px rgba(242, 112, 63, .8); }
.btn-accent:hover { background: #dd5f30; color: #fff; }
.btn-secondary { background: var(--surface-3); border-color: var(--surface-3); color: var(--text-2); }
.btn-secondary:hover { background: var(--border-2); border-color: var(--border-2); color: var(--text); }
.btn-default, .btn-light { background: var(--surface); border-color: var(--border); color: var(--text-2); }
.btn-default:hover, .btn-light:hover { background: var(--surface-3); color: var(--text); }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn-soft:hover { background: var(--primary-soft-2); color: var(--primary-600); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary-ring); }
.btn-outline-primary:hover, .btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-outline-secondary { color: var(--text-2); border-color: var(--border-2); }
.btn-outline-secondary:hover { background: var(--surface-3); border-color: var(--border-2); color: var(--text); }
.btn-outline-success { color: var(--success); border-color: var(--success-soft); }
.btn-outline-success:hover, .btn-outline-success.active { background: var(--success); border-color: var(--success); color: #fff; }
.btn-outline-danger { color: var(--danger); border-color: var(--danger-soft); }
.btn-outline-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-outline-info { color: var(--info); border-color: var(--info-soft); }
.btn-outline-info:hover { background: var(--info); border-color: var(--info); color: #fff; }
.btn-outline-warning { color: var(--warning); border-color: var(--warning-soft); }
.btn-outline-warning:hover { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-link { color: var(--primary); font-weight: 500; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }
.btn-icon.btn-sm { width: 32px; height: 32px; border-radius: 10px; }
.btn-block + .btn-block { margin-top: .5rem; }

/* ---------- فرم ---------- */
label:not(.form-check-label):not(.custom-control-label):not(.btn):not(.switch-row):not(.check-card):not(.drop-zone) { font-size: .84rem; font-weight: 700; color: var(--text-2); margin-bottom: .45rem; }
.form-control, .custom-select { background-color: var(--surface); color: var(--text); border: 1px solid var(--border-2); border-radius: 12px; transition: border-color .15s, box-shadow .15s, background-color .15s; font-size: .9rem; }
.form-control:not(textarea):not([multiple]):not(.form-control-sm):not(.form-control-lg) { height: calc(2.55rem + 2px); }
.form-control-lg { border-radius: 14px; font-size: 1.05rem; }
.form-control::placeholder { color: var(--muted); opacity: .85; }
.form-control:focus, .custom-select:focus { background-color: var(--surface); color: var(--text); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.form-control:disabled, .form-control[readonly] { background-color: var(--surface-3); }
.form-control-sm { border-radius: 10px; }
.form-control[type=file] { padding: .4rem .5rem; height: auto !important; }
.form-control[type=file]::file-selector-button { border: 0; background: var(--primary-soft); color: var(--primary); border-radius: 9px; padding: .35rem .9rem; margin-left: .6rem; font-family: var(--font); font-weight: 700; cursor: pointer; }
select.form-control { padding-top: .3rem; }
.input-group-text { background: var(--surface-2); border-color: var(--border-2); color: var(--muted); border-radius: 12px; }
.input-group > .form-control:not(:last-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-check-input, input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.form-check-input { width: 1rem; height: 1rem; margin-top: .3rem; }
.form-text, small.text-muted { font-size: .76rem; }
.is-invalid, .input-validation-error { border-color: var(--danger) !important; }
.field-validation-error { color: var(--danger); font-size: .8rem; }
.search-input { position: relative; }
.search-input > .fa { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); z-index: 1; }
.search-input > .form-control { padding-right: 2.5rem; border-radius: 14px; background: var(--surface-2); border-color: transparent; }
.search-input > .form-control:focus { background: var(--surface); }

/* select2 */
.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple { background: var(--surface); border: 1px solid var(--border-2) !important; border-radius: 12px !important; min-height: calc(2.55rem + 2px); }
.select2-container--default .select2-selection--single { height: calc(2.55rem + 2px); padding: .5rem .5rem; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 1.5; }
.select2-container--default.select2-container--focus .select2-selection--multiple, .select2-container--default.select2-container--open .select2-selection { border-color: var(--primary) !important; box-shadow: 0 0 0 4px var(--primary-ring); }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--primary-soft); border: 0; color: var(--primary); border-radius: 8px; padding: 2px 9px; margin-top: 7px; font-weight: 700; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: var(--primary); margin-left: 4px; }
.select2-dropdown { background: var(--surface); border-color: var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); color: var(--text); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--primary); }
.select2-container--default .select2-results__option[aria-selected=true] { background: var(--primary-soft); color: var(--text); }
.select2-search__field { font-family: var(--font); color: var(--text); }
.select2-container--default .select2-search--dropdown .select2-search__field { border-color: var(--border); border-radius: 9px; background: var(--surface-2); }
.datepicker-plot-area { font-family: var(--font) !important; border-radius: 16px !important; box-shadow: var(--shadow-lg) !important; overflow: hidden; border: 1px solid var(--border) !important; }

/* ---------- هشدار و کال‌اوت ---------- */
.alert { border-radius: 14px; border: 1px solid transparent; font-size: .88rem; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-light { background: var(--surface-2); color: var(--text); border-color: var(--border) !important; }
.alert .close { color: inherit; opacity: .6; text-shadow: none; }
.callout { background: var(--surface); border-radius: 16px; border: 1px solid var(--border) !important; box-shadow: inset -4px 0 0 var(--primary), var(--shadow-sm); color: var(--text-2); padding: 1rem 1.2rem; }
.callout.callout-success { box-shadow: inset -4px 0 0 var(--success), var(--shadow-sm); }
.callout.callout-warning { box-shadow: inset -4px 0 0 var(--warning), var(--shadow-sm); }
.callout.callout-danger { box-shadow: inset -4px 0 0 var(--danger), var(--shadow-sm); }

/* ---------- لیست، صفحه‌بندی، مودال ---------- */
.list-group-item { background: var(--surface); border-color: var(--border); color: var(--text); }
.list-group-flush .list-group-item { padding: .8rem 1.4rem; }
.pagination { gap: 4px; }
.page-link { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 10px !important; min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; margin: 0 !important; padding: 0 .5rem; }
.page-link:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-ring); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.page-item.disabled .page-link { background: var(--surface); border-color: var(--border); color: var(--muted); opacity: .6; }
.modal-content { background: var(--surface); color: var(--text); border: 0; border-radius: 24px; box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--border); }
.modal-backdrop.show { opacity: .4; }
.close { color: var(--text); }
.nav-tabs { border-bottom-color: var(--border); }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 700; }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { background: transparent; color: var(--primary); border-bottom-color: var(--primary); }
.nav-pills .nav-link { border-radius: 12px; color: var(--text-2); }
.nav-pills .nav-link.active { background: var(--primary); color: #fff; }
.progress { background: var(--surface-3); border-radius: 99px; }
.bg-light { background-color: var(--surface-2) !important; }
.bg-white { background-color: var(--surface) !important; }
.border, .border-top, .border-bottom { border-color: var(--border) !important; }

.code-block { direction: ltr; text-align: left; background: var(--code-bg); color: var(--code-text); padding: 16px 18px; border-radius: 16px; font-size: .82rem; overflow-x: auto; white-space: pre; border: 1px solid rgba(255, 255, 255, .05); }
pre { color: var(--text); }
.code-wrap { position: relative; }
.code-copy { position: absolute; top: 9px; left: 9px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .07); color: #cfe3dc; border-radius: 9px; font-size: .74rem; padding: .22rem .65rem; cursor: pointer; font-family: var(--font); opacity: 0; transition: opacity .15s; }
.code-wrap:hover .code-copy, .code-copy:focus { opacity: 1; }
.code-copy:hover { background: rgba(255, 255, 255, .15); color: #fff; }

/* لیست تعریف (جزئیات) */
dl dt { color: var(--muted); font-weight: 400; font-size: .8rem; margin-bottom: .15rem; }
dl dd { color: var(--text); font-weight: 700; margin-bottom: .9rem; }
dl.row { display: flex; flex-wrap: wrap; margin-left: 0; margin-right: 0; }
dl.row > dt, dl.row > dd { margin: 0; padding: .65rem 0; border-bottom: 1px dashed var(--border); display: flex; align-items: center; font-size: .88rem; }
dl.row > dd { flex-wrap: wrap; }
dl.row > dd.ltr.text-right { justify-content: flex-start; direction: rtl; }
dl.row > dt:nth-last-of-type(1), dl.row > dd:last-child { border-bottom: 0; }

/* ---------- شمارنده پیامک و فرم ارسال ---------- */
.sms-counter { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .76rem; margin-top: .55rem; }
.sms-counter .chip { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.sms-counter .chip b { color: var(--text); }
.sms-counter .chip.warn { background: var(--warning-soft); color: var(--warning); }
.sms-counter .chip.bad { background: var(--danger-soft); color: var(--danger); }
.sms-counter .meter { flex-basis: 100%; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.sms-counter .meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary-brand)); border-radius: 99px; transition: width .2s; }
.num-counter { font-size: .76rem; display: inline-flex; gap: .4rem; margin-top: .45rem; }
.estimate-box { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; align-items: center; }
.estimate-box .ei { display: flex; flex-direction: column; }
.estimate-box .ei span { font-size: .74rem; color: var(--muted); }
.estimate-box .ei b { font-size: 1.05rem; color: var(--text); }
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding-top: 1.1rem; margin-top: .6rem; border-top: 1px solid var(--border); }
.form-actions .balance-note { margin-right: auto; font-size: .82rem; color: var(--muted); }
.section-title { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .95rem; color: var(--text); margin: 1.7rem 0 1rem; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.section-title .st-num { width: 26px; height: 26px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.btn-group-toggle { background: var(--surface-3); padding: 4px; border-radius: 14px; gap: 4px; }
.btn-group-toggle > .btn { border: 0 !important; border-radius: 11px !important; color: var(--text-2); background: transparent; box-shadow: none; }
.btn-group-toggle > .btn.active { background: var(--surface) !important; color: var(--primary) !important; box-shadow: var(--shadow-sm) !important; }

/* سوییچ */
.switch-row { display: inline-flex !important; align-items: center; gap: .6rem; cursor: pointer; user-select: none; margin: .5rem 0 0 !important; font-size: .86rem; font-weight: 700; color: var(--text-2); }
.switch-row > input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row .switch { width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border-2); position: relative; transition: background .2s; flex: none; }
.switch-row .switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .2s; }
.switch-row > input:checked + .switch { background: var(--primary); border-color: var(--primary); }
.switch-row > input:checked + .switch::after { transform: translateX(-18px); }
.switch-row > input:focus-visible + .switch { box-shadow: 0 0 0 .2rem var(--primary-ring); }

/* ---------- پیش‌نمایش گوشی ---------- */
.phone { width: 270px; max-width: 100%; margin: 0 auto; border-radius: 38px; padding: 10px; background: linear-gradient(160deg, #23302d, #0b1412); box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .1); }
html[data-theme="dark"] .phone { box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .14), 0 0 0 1px var(--border); }
.phone-screen { border-radius: 30px; overflow: hidden; background: #eef4f1; min-height: 400px; display: flex; flex-direction: column; }
html[data-theme="dark"] .phone-screen { background: #0e1917; }
.phone-top { background: rgba(255, 255, 255, .9); padding: 12px 14px 10px; text-align: center; border-bottom: 1px solid rgba(15, 23, 42, .06); }
html[data-theme="dark"] .phone-top { background: rgba(25, 40, 36, .95); border-color: rgba(255, 255, 255, .05); }
.phone-notch { width: 84px; height: 20px; background: #0b1412; border-radius: 0 0 14px 14px; margin: -12px auto 8px; }
.phone-top .ph-avatar { width: 38px; height: 38px; border-radius: 50%; margin: 0 auto 4px; background: linear-gradient(135deg, #1fb08d, #45b35d); color: #fff; display: flex; align-items: center; justify-content: center; }
.phone-top .ph-name { font-size: .78rem; font-weight: 700; color: #17272a; direction: ltr; }
html[data-theme="dark"] .phone-top .ph-name { color: #e4efeb; }
.phone-body { padding: 14px 12px; flex: 1; display: flex; flex-direction: column; }
.phone-time { text-align: center; font-size: .66rem; color: #8a9c9a; margin-bottom: 8px; }
.bubble { align-self: flex-start; max-width: 88%; background: #fff; color: #17272a; padding: 9px 13px; border-radius: 18px 18px 5px 18px; font-size: .82rem; line-height: 1.8; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
html[data-theme="dark"] .bubble { background: #1d302c; color: #e4efeb; }
.bubble.empty { color: #8a9c9a; font-style: italic; }
.phone-foot { margin: 8px 10px 12px; height: 34px; border-radius: 99px; background: rgba(255, 255, 255, .85); border: 1px solid rgba(15, 23, 42, .06); }
html[data-theme="dark"] .phone-foot { background: rgba(25, 40, 36, .9); border-color: rgba(255, 255, 255, .05); }
.help-list { list-style: none; padding: 0; margin: 0; }
.help-list li { position: relative; padding-right: 1.6rem; margin-bottom: .6rem; color: var(--text-2); font-size: .84rem; line-height: 1.9; }
.help-list li::before { content: "\f00c"; font-family: FontAwesome; position: absolute; right: 0; top: 3px; width: 18px; height: 18px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: .62rem; display: flex; align-items: center; justify-content: center; }
.help-list li:last-child { margin-bottom: 0; }

/* ---------- کیف پول / شارژ ---------- */
.wallet-card { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; padding: 1.6rem 1.7rem; border-radius: var(--r-lg); color: #fff; background: linear-gradient(150deg, #1aa887, #12906f 55%, #0d7b60); box-shadow: 0 22px 40px -22px rgba(13, 123, 96, .9); }
.wallet-card::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; border: 34px solid rgba(255, 255, 255, .07); left: -70px; top: -90px; }
.wallet-card > * { position: relative; }
.wallet-card .wc-label { opacity: .85; font-size: .88rem; }
.wallet-card .wc-value { font-size: 2rem; font-weight: 900; letter-spacing: -.5px; }
.wallet-card .wc-value small { font-size: .85rem; font-weight: 400; opacity: .85; }
.wallet-card .wc-icon { width: 58px; height: 58px; border-radius: 18px; background: rgba(255, 255, 255, .16); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.amount-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.amount-opt { border: 1.5px solid var(--border-2); background: var(--surface); color: var(--text); border-radius: 14px; padding: .8rem .5rem; display: flex; flex-direction: column; align-items: center; gap: .1rem; cursor: pointer; transition: all .15s; font-family: var(--font); }
.amount-opt b { font-size: 1.02rem; }
.amount-opt span { font-size: .72rem; color: var(--muted); }
.amount-opt:hover { border-color: var(--primary); }
.amount-opt.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ---------- toast ---------- */
.toast-stack { position: fixed; top: 26px; left: 30px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 36px); }
.app-toast { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 18px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2); position: relative; overflow: hidden; font-size: .88rem; }
.app-toast .t-icon { width: 32px; height: 32px; border-radius: 11px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.app-toast.success .t-icon { background: var(--success-soft); color: var(--success); }
.app-toast.error .t-icon { background: var(--danger-soft); color: var(--danger); }
.app-toast .t-body { flex: 1; padding-top: 4px; line-height: 1.75; }
.app-toast .t-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 4px; }
.app-toast .t-bar { position: absolute; bottom: 0; right: 0; height: 3px; width: 100%; transform-origin: right; animation: toastBar 6s linear forwards; }
.app-toast.success .t-bar { background: var(--success); }
.app-toast.error .t-bar { background: var(--danger); }
.app-toast.hide { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-30px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-30px); } }
@keyframes toastBar { to { transform: scaleX(0); } }

/* ---------- مودال تایید ---------- */
.confirm-modal .modal-dialog { max-width: 400px; }
.confirm-modal .modal-body { text-align: center; padding: 2.1rem 1.75rem 1.25rem; }
.confirm-modal .c-icon { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: var(--warning-soft); color: var(--warning); }
.confirm-modal .c-icon.danger { background: var(--danger-soft); color: var(--danger); }
.confirm-modal .c-text { font-size: .98rem; color: var(--text); line-height: 1.9; }
.confirm-modal .modal-footer { justify-content: center; border: 0; padding: 0 1.5rem 1.6rem; gap: .5rem; }
.confirm-modal .modal-footer .btn { min-width: 116px; }

/* ---------- نوار بارگذاری صفحه ---------- */
.page-progress { position: fixed; top: 0; right: 0; height: 3px; width: 0; z-index: 3000; background: linear-gradient(270deg, var(--primary), var(--secondary-brand)); box-shadow: 0 0 10px var(--primary-ring); transition: width 8s cubic-bezier(.1, .8, .2, 1), opacity .3s; opacity: 0; }
.page-progress.run { width: 85%; opacity: 1; }

/* =====================================================================
   تیکت‌ها
   ===================================================================== */
.st-open { background: var(--warning-soft); color: var(--warning); }
.st-answered { background: var(--success-soft); color: var(--success); }
.st-reply { background: var(--accent-soft); color: var(--accent); }
.st-closed { background: var(--secondary-soft); color: var(--secondary); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-header > .card-title { float: none; }
.card-header > .card-tools { float: none; position: static; margin-left: -.4rem; margin-right: auto; }
.card-header::after { display: none; }
.ticket-row { display: flex; align-items: center; gap: .9rem; padding: .95rem 1.4rem; border-bottom: 1px solid var(--border); color: var(--text) !important; transition: background .15s; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: var(--surface-2); }
.ticket-row .tr-icon { width: 44px; height: 44px; border-radius: 15px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.ticket-row .tr-main { flex: 1; min-width: 0; }
.ticket-row .tr-subject { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-row .tr-meta { font-size: .76rem; color: var(--muted); display: flex; gap: .4rem .9rem; flex-wrap: wrap; margin-top: .15rem; }
.ticket-row .tr-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.ticket-row .tr-side small { color: var(--muted); font-size: .74rem; }
.ticket-row.attention .tr-subject::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: .45rem; vertical-align: middle; box-shadow: 0 0 0 3px var(--accent-soft); }

.thread { display: flex; flex-direction: column; gap: 1.15rem; padding: 1.5rem 1.4rem; }
.msg { display: flex; gap: .75rem; max-width: 80%; }
.msg .avatar { width: 40px; height: 40px; border-radius: 14px; font-size: .9rem; }
.msg .msg-body { min-width: 0; }
.msg .msg-head { display: flex; gap: .6rem; align-items: baseline; margin-bottom: .35rem; font-size: .8rem; }
.msg .msg-head b { color: var(--text); font-size: .85rem; }
.msg .msg-head small { color: var(--muted); }
.msg .msg-text { padding: .9rem 1.1rem; border-radius: 6px 20px 20px 20px; background: var(--surface-2); color: var(--text); line-height: 2; white-space: pre-wrap; word-break: break-word; font-size: .9rem; border: 1px solid var(--border); }
.msg.mine { align-self: flex-start; }
.msg.theirs { align-self: flex-end; flex-direction: row-reverse; }
.msg.theirs .msg-head { flex-direction: row-reverse; }
.msg.theirs .msg-text { border-radius: 20px 6px 20px 20px; background: linear-gradient(150deg, #1aa887, #12906f); color: #fff; border-color: transparent; box-shadow: 0 14px 26px -16px rgba(13, 123, 96, .9); }
.thread-day { align-self: center; font-size: .72rem; color: var(--muted); background: var(--surface-3); padding: .25rem .9rem; border-radius: 99px; }
.reply-box { border-top: 1px solid var(--border); padding: 1.1rem 1.4rem 1.3rem; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.reply-box textarea { background: var(--surface); border-radius: 16px; resize: vertical; min-height: 110px; }
.reply-box .ra { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .75rem; }
.closed-note { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.4rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--border); font-size: .86rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list li > span:first-child { color: var(--muted); }
.info-list li > :last-child { font-weight: 700; text-align: left; }

/* =====================================================================
   دفترچه تلفن
   ===================================================================== */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; margin-bottom: 1.4rem; }
.group-card { position: relative; background: var(--surface); border-radius: var(--r-lg); padding: 1.15rem 1.15rem 1rem; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.group-card:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 22px 36px -22px rgba(15, 95, 74, .45); }
.group-card .gc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.group-card .gc-icon { width: 50px; height: 50px; border-radius: 17px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.group-card .gc-name { font-weight: 900; font-size: 1rem; margin: .85rem 0 .15rem; color: var(--text) !important; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-card .gc-desc { font-size: .78rem; color: var(--muted); min-height: 1.4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-card .gc-count { display: flex; align-items: baseline; gap: .3rem; margin: .7rem 0 .9rem; }
.group-card .gc-count b { font-size: 1.55rem; font-weight: 900; color: var(--text); }
.group-card .gc-count span { font-size: .78rem; color: var(--muted); }
.group-card .gc-actions { display: flex; gap: .4rem; margin-top: auto; padding-top: .85rem; border-top: 1px dashed var(--border); }
.group-card .gc-actions .btn-open { flex: 1; }
.gc-tone-0 { background: var(--primary-soft); color: var(--primary); }
.gc-tone-1 { background: var(--accent-soft); color: var(--accent); }
.gc-tone-2 { background: var(--info-soft); color: var(--info); }
.gc-tone-3 { background: rgba(142, 92, 240, .12); color: #8e5cf0; }
.gc-tone-4 { background: var(--warning-soft); color: var(--warning); }
.group-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; min-height: 214px; border-radius: var(--r-lg); border: 2px dashed var(--border-2); color: var(--muted) !important; background: transparent; cursor: pointer; transition: all .15s; font-weight: 700; font-family: var(--font); width: 100%; }
.group-add .ga-icon { width: 54px; height: 54px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; }
.group-add:hover { border-color: var(--primary); color: var(--primary) !important; background: var(--primary-soft); }
.contact-cell { display: flex; align-items: center; gap: .65rem; }
.contact-cell .cc-name { font-weight: 700; }
.contact-cell .cc-sub { font-size: .74rem; color: var(--muted); }
.bulk-bar { display: none; align-items: center; gap: .6rem; padding: .6rem 1.4rem; background: var(--primary-soft); color: var(--primary); font-size: .85rem; font-weight: 700; border-bottom: 1px solid var(--border); }
.bulk-bar.show { display: flex; }
.bulk-bar .btn { margin-right: auto; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); }
.toolbar .search-input { flex: 1 1 240px; max-width: 380px; }
.toolbar .tb-end { margin-right: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.drop-zone { border: 2px dashed var(--border-2); border-radius: 16px; padding: 1.3rem 1rem; text-align: center; color: var(--muted); font-size: .8rem; transition: all .15s; cursor: pointer; display: block; position: relative; margin: 0; }
.drop-zone .fa { font-size: 1.6rem; color: var(--primary); display: block; margin-bottom: .45rem; }
.drop-zone b { display: block; color: var(--text); font-size: .88rem; margin-bottom: .15rem; }
.drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop-zone.drag, .drop-zone:hover { border-color: var(--primary); background: var(--primary-soft); }
.drop-zone .dz-name { color: var(--primary); font-weight: 700; margin-top: .35rem; }
.or-sep { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .75rem; margin: 1rem 0; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* =====================================================================
   مدیریت کاربران
   ===================================================================== */
.user-cell { display: flex; align-items: center; gap: .7rem; }
.user-cell .uc-name { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.user-cell .uc-sub { font-size: .74rem; color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); margin-left: .4rem; }
.status-dot.on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.mini-stat { display: flex; align-items: center; gap: .85rem; background: var(--surface); border-radius: var(--r-lg); padding: 1rem 1.15rem; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); margin-bottom: 1.4rem; height: calc(100% - 1.4rem); }
.mini-stat .ms-icon { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: none; }
.mini-stat .ms-label { font-size: .78rem; color: var(--muted); }
.mini-stat .ms-value { font-size: 1.25rem; font-weight: 900; color: var(--text); line-height: 1.35; }
.mini-stat .ms-value small { font-size: .72rem; font-weight: 400; color: var(--muted); }
.profile-card { position: relative; overflow: hidden; }
.profile-card .pc-cover { height: 100px; background: linear-gradient(150deg, #1aa887, #12906f 55%, #0d7b60); position: relative; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.profile-card .pc-cover::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; border: 30px solid rgba(255, 255, 255, .08); left: -60px; top: -100px; }
.profile-card .pc-cover::before { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .07); right: -30px; bottom: -60px; }
.profile-card .pc-body { padding: 0 1.4rem 1.3rem; text-align: center; margin-top: -40px; position: relative; }
.profile-card .avatar-lg { box-shadow: 0 0 0 5px var(--surface), 0 14px 26px -12px rgba(15, 95, 74, .6); }
.profile-card .pc-name { font-weight: 900; font-size: 1.15rem; margin-top: .7rem; }
.profile-card .pc-sub { color: var(--muted); font-size: .82rem; }
.profile-card .pc-tags { display: flex; justify-content: center; gap: .35rem; flex-wrap: wrap; margin-top: .6rem; }
.profile-card .metric-row { margin: 1.1rem -.4rem 1rem; padding: .9rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.action-list { display: flex; flex-direction: column; gap: .45rem; }
.action-list a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 14px; background: var(--surface-2); color: var(--text) !important; font-weight: 700; font-size: .86rem; transition: background .15s; }
.action-list a:hover { background: var(--primary-soft); }
.action-list a .ai { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.action-list a .fa-angle-left { margin-right: auto; color: var(--muted); }
.check-card { display: flex !important; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--border-2); border-radius: 16px; cursor: pointer; transition: all .15s; margin-bottom: .6rem !important; font-weight: 400 !important; }
.check-card input { margin-top: .3rem; accent-color: var(--primary); width: 1.05rem; height: 1.05rem; flex: none; }
.check-card b { display: block; color: var(--text); font-size: .88rem; }
.check-card small { display: block; color: var(--muted); font-size: .76rem; }
.check-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.check-card.danger:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.line-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.line-pick .check-card { margin: 0 !important; align-items: center; }
.line-pick .lp-num { font-family: var(--font-en); direction: ltr; text-align: right; font-size: 1rem; }
.line-pick .lp-meta { margin-right: auto; text-align: left; }

/* =====================================================================
   لاگین / ثبت‌نام (قاب شناور مثل پنل)
   ===================================================================== */
.auth-body { min-height: 100vh; background: radial-gradient(1000px 600px at 100% 0, rgba(255, 255, 255, .55), transparent 60%), radial-gradient(900px 500px at 0 100%, rgba(69, 179, 93, .16), transparent 60%), var(--page-bg); display: flex; align-items: center; justify-content: center; padding: var(--frame); }
html[data-theme="dark"] .auth-body { background: var(--page-bg); }
.auth-page { width: 100%; max-width: 1180px; min-height: min(720px, calc(100vh - 28px)); display: flex; border-radius: var(--r-xl); background: var(--rail-bg); overflow: hidden; box-shadow: 0 40px 80px -40px rgba(10, 70, 55, .55); }
.auth-hero { flex: 1 1 46%; position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 2.6rem 3rem; }
.auth-hero::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .06); left: -160px; bottom: -160px; }
.auth-hero::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .06); right: -90px; top: -90px; }
.auth-hero > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: .7rem; font-size: 1.2rem; font-weight: 900; }
.auth-brand .brand-logo { width: 48px; height: 48px; border-radius: 16px; background: #fff; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .35); }
.auth-hero h2 { font-size: 2rem; font-weight: 900; line-height: 1.65; margin-bottom: 1rem; }
.auth-hero p.lead { color: rgba(255, 255, 255, .84); font-size: .98rem; line-height: 2.1; max-width: 440px; }
.auth-features { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .85rem; }
.auth-features li { display: flex; align-items: center; gap: .75rem; color: rgba(255, 255, 255, .92); font-size: .92rem; }
.auth-features .fi { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.auth-hero .auth-foot { color: rgba(255, 255, 255, .6); font-size: .8rem; }
.auth-bubbles { position: absolute; left: 3rem; top: 7rem; display: flex; flex-direction: column; gap: .6rem; z-index: 1; }
.auth-bubbles .ab { background: rgba(255, 255, 255, .96); color: #17272a; padding: .6rem .95rem; border-radius: 18px 18px 18px 5px; font-size: .8rem; max-width: 240px; box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .45); animation: floaty 6s ease-in-out infinite; }
.auth-bubbles .ab:nth-child(2) { margin-right: 2.5rem; animation-delay: -2s; }
.auth-bubbles .ab:nth-child(3) { animation-delay: -4s; }
.auth-bubbles .ab .fa { color: #14957a; margin-left: .3rem; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.auth-panel { flex: 1 1 54%; display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--surface); border-radius: var(--r-xl); position: relative; box-shadow: 0 0 40px -10px rgba(0, 0, 0, .2); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .auth-title { font-size: 1.6rem; font-weight: 900; color: var(--text); margin-bottom: .35rem; }
.auth-card .auth-sub { color: var(--muted); margin-bottom: 1.8rem; font-size: .9rem; }
.auth-card .form-control { height: calc(2.95rem + 2px) !important; border-radius: 14px; background: var(--surface-2); border-color: transparent; }
.auth-card .form-control:focus { background: var(--surface); border-color: var(--primary); }
.input-icon { position: relative; }
.input-icon > .fa { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; z-index: 1; }
.input-icon > .form-control { padding-right: 2.7rem; }
.input-icon > .form-control.ltr { text-align: right; }
.input-icon > .form-control.ltr:not(:placeholder-shown) { text-align: left; }
.auth-card .btn-primary { height: 3.05rem; border-radius: 14px; font-size: .98rem; }
.auth-card .auth-alt { text-align: center; margin-top: 1.4rem; color: var(--muted); font-size: .88rem; }
.pw-toggle { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 6px; z-index: 1; }
.pw-toggle:hover { color: var(--primary); }
.auth-theme { position: absolute; top: 1.2rem; left: 1.2rem; }
.auth-theme .btn { border-radius: 14px; width: 42px; height: 42px; padding: 0; display: flex; align-items: center; justify-content: center; }

/* =====================================================================
   پیام صوتی
   ===================================================================== */
.voice-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .7rem; }
.voice-pick .check-card { margin: 0 !important; align-items: center; }
.voice-option .vo-icon, .voice-player .vp-icon { width: 40px; height: 40px; border-radius: 13px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.voice-option .vo-icon.tts { background: var(--accent-soft); color: var(--accent); }
.voice-option .vo-main { flex: 1; min-width: 0; }
.voice-option .vo-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vo-play { width: 34px; height: 34px; border-radius: 50%; border: 0; flex: none; background: var(--surface-3); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; font-size: .8rem; padding: 0; }
.vo-play .fa-play { margin-right: -2px; }
.vo-play:hover, .vo-play.playing { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.vo-play.sm { width: 28px; height: 28px; font-size: .7rem; margin-left: .35rem; vertical-align: middle; }

.voice-empty { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: .85rem; }
.voice-empty .ve-icon { width: 64px; height: 64px; border-radius: 22px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: .8rem; }
.voice-empty b { display: block; color: var(--text); font-size: 1rem; margin-bottom: .2rem; }
.voice-empty p { margin-bottom: 1rem; }

.voice-summary .vs-big { display: flex; align-items: baseline; gap: .4rem; margin-bottom: .8rem; padding: .9rem 1rem; border-radius: 16px; background: linear-gradient(160deg, var(--primary-soft-2), var(--primary-soft)); }
.voice-summary .vs-big b { font-size: 1.9rem; font-weight: 900; color: var(--primary); line-height: 1; }
.voice-summary .vs-big span { color: var(--muted); font-size: .8rem; }

.speaker-pick { display: flex; gap: .6rem; }
.speaker-pick .check-card { flex: 1; margin: 0 !important; align-items: center; padding: .55rem .9rem; }
.speaker-pick .check-card input { margin-top: 0; }

.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.1rem; margin-bottom: 1.4rem; }
.voice-card { background: var(--surface); border-radius: var(--r-lg); padding: 1rem 1.1rem .9rem; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.voice-card:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 22px 36px -22px rgba(15, 95, 74, .45); }
.voice-card .vc-top { display: flex; align-items: center; gap: .8rem; }
.voice-card .vc-play { width: 48px; height: 48px; border-radius: 16px; border: 0; flex: none; cursor: pointer; background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s; }
.voice-card .vc-play.tts { background: var(--accent); box-shadow: 0 10px 22px -10px var(--accent); }
.voice-card .vc-play:hover { transform: scale(1.06); }
.voice-card .vc-play .fa-play { margin-right: -3px; }
.voice-card .vc-head { min-width: 0; flex: 1; }
.voice-card .vc-head b { display: block; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-card .vc-head small { color: var(--muted); font-size: .74rem; }
.voice-card .vc-progress { height: 4px; border-radius: 4px; background: var(--surface-3); margin: .85rem 0 .2rem; overflow: hidden; }
.voice-card .vc-progress span { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 4px; transition: width .25s linear; }
.voice-card .vc-text { font-size: .78rem; color: var(--text-2); background: var(--surface-2); border-radius: 12px; padding: .5rem .7rem; margin-top: .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.voice-card .vc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; font-size: .76rem; color: var(--muted); margin: .7rem 0 .2rem; }
.voice-card .vc-meta .fa { color: var(--primary); margin-left: 2px; }
.voice-card .vc-actions { display: flex; gap: .4rem; margin-top: auto; padding-top: .8rem; border-top: 1px dashed var(--border); margin-top: .7rem; }
.voice-card .vc-actions form { margin: 0; }

.voice-player { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.voice-player .vp-main { flex: 1; min-width: 0; }
.voice-player .vp-main b { display: block; margin-bottom: .3rem; }
.voice-player audio { width: 100%; height: 36px; }

/* =====================================================================
   ریسپانسیو
   ===================================================================== */

/* =====================================================================
   لوگو، کد تایید، اطلاع‌رسانی، کارت‌های داشبورد، کارت به کارت، نظیر به نظیر
   ===================================================================== */
.auth-logo { display: flex; justify-content: center; margin: 0 auto 1.6rem; }
.auth-logo img { height: 92px; width: auto; }
.auth-logo .logo-dark, html[data-theme="dark"] .auth-logo .logo-light { display: none; }
html[data-theme="dark"] .auth-logo .logo-dark { display: block; }

/* کد تایید */
.auth-card .otp-input { height: 3.6rem !important; text-align: center; font-family: var(--font-en); font-size: 1.7rem; font-weight: 700; letter-spacing: .55em; padding-left: .55em; }
.otp-resend { display: flex; flex-direction: column; align-items: center; gap: .35rem; margin-top: 1.1rem; }
.otp-resend .otp-actions { display: none; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }
.otp-resend.ready .otp-wait { display: none; }
.otp-resend.ready .otp-actions { display: flex; }
.otp-resend .btn-link { font-weight: 700; font-size: .86rem; }

/* انتخاب روش (کارت‌های رادیویی کنار هم) */
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.check-grid .check-card { margin: 0 !important; }
.check-grid .check-card > span > .fa { display: block; font-size: 1.15rem; color: var(--primary); margin-bottom: .3rem; }
.builtin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.builtin-grid .check-card { padding: .6rem .8rem; }

/* ردیف رویدادها */
.event-row { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); transition: background .15s; }
.event-row:last-child { border-bottom: 0; }
.event-row .er-head { display: flex; align-items: center; gap: .9rem; }
.event-row .er-title { flex: 1; min-width: 0; line-height: 1.6; }
.event-row .er-title b { color: var(--text); font-size: .9rem; }
.event-row .er-title small { display: block; color: var(--muted); font-size: .76rem; }
.event-row .er-channel { width: 130px; flex: none; }
.event-row .er-body { margin: .6rem 3.4rem 0 0; display: none; }
.event-row.on .er-body { display: block; }
.event-row.on { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.event-row:not(.on) .er-channel { opacity: .5; }

/* اطلاعیه‌ها */
.announce-modal .modal-content { border: 0; border-radius: var(--r-lg); overflow: hidden; }
.announce-modal .modal-body { text-align: center; padding: 2rem 1.8rem 1rem; }
.announce-modal .am-icon { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: var(--info-soft); color: var(--info); }
.announce-modal .am-title { font-weight: 900; color: var(--text); margin-bottom: .6rem; }
.announce-modal .am-body { color: var(--text-2); font-size: .92rem; line-height: 2; max-height: 50vh; overflow-y: auto; text-align: right; }
.announce-modal .modal-footer { border: 0; padding: .5rem 1.8rem 1.6rem; }
.level-success .am-icon, .level-success .ac-icon { background: var(--success-soft); color: var(--success); }
.level-warning .am-icon, .level-warning .ac-icon { background: var(--warning-soft); color: var(--warning); }
.level-danger .am-icon, .level-danger .ac-icon { background: var(--danger-soft); color: var(--danger); }
.announce-card { border-right: 4px solid transparent; }
.announce-card.unread { border-right-color: var(--accent); }
.announce-card .ac-icon { width: 44px; height: 44px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--info-soft); color: var(--info); font-size: 1.05rem; }
.announce-card .ac-title { font-size: 1rem; font-weight: 900; color: var(--text); margin: 0 0 .4rem; }
.announce-card .ac-body { color: var(--text-2); font-size: .88rem; line-height: 2; }

/* کارت‌های دلخواه داشبورد */
.dash-card { position: relative; overflow: hidden; }
.dash-card .dc-row { display: flex; align-items: center; gap: 1rem; }
.dash-card .dc-icon { width: 50px; height: 50px; border-radius: 16px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; background: var(--surface-3); color: var(--text-2); }
.dash-card .dc-main { flex: 1; min-width: 0; }
.dash-card .dc-title { font-size: 1.02rem; font-weight: 900; color: var(--text); margin: 0 0 .3rem; }
.dash-card .dc-body { color: var(--text-2); font-size: .86rem; line-height: 1.95; }
.dash-card .dc-btn { margin-top: .8rem; border-radius: 12px; font-weight: 700; font-size: .84rem; background: var(--primary); color: #fff !important; padding: .45rem 1.1rem; }
.dash-card .dc-img { width: 96px; max-height: 96px; object-fit: contain; flex: none; }
.dash-card .dc-close { position: absolute; top: 8px; left: 10px; border: 0; background: transparent; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; z-index: 2; }
.dash-card.dc-primary .dc-icon { background: var(--primary-soft); color: var(--primary); }
.dash-card.dc-accent .dc-icon { background: var(--accent-soft); color: var(--accent); }
.dash-card.dc-accent .dc-btn { background: var(--accent); }
.dash-card.dc-info .dc-icon { background: var(--info-soft); color: var(--info); }
.dash-card.dc-info .dc-btn { background: var(--info); }
.dash-card.dc-primary { border-top: 3px solid var(--primary); }
.dash-card.dc-accent { border-top: 3px solid var(--accent); }
.dash-card.dc-info { border-top: 3px solid var(--info); }
.dash-card.dc-gradient { background: linear-gradient(150deg, #1aa887, #12906f 55%, #0d7b60); border: 0; box-shadow: 0 22px 40px -22px rgba(13, 123, 96, .9); }
.dash-card.dc-gradient::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; left: -60px; bottom: -90px; background: rgba(255, 255, 255, .09); }
.dash-card.dc-gradient .dc-title, .dash-card.dc-gradient .dc-body, .dash-card.dc-gradient .dc-close { color: #fff; }
.dash-card.dc-gradient .dc-body { opacity: .9; }
.dash-card.dc-gradient .dc-icon { background: rgba(255, 255, 255, .18); color: #fff; }
.dash-card.dc-gradient .dc-btn { background: #fff; color: #0f7d66 !important; }
.icon-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; }
.icon-pick .btn { padding: .45rem 0; border-radius: 10px; }
.icon-pick .btn.active { background: var(--primary); color: #fff; }

/* کارت به کارت */
.seg-lg { display: flex; }
.seg-lg > button { flex: 1; font-size: .9rem; padding: .6rem 1rem; font-weight: 700; }
.bank-card { position: relative; overflow: hidden; border-radius: 22px; padding: 1.4rem 1.6rem; color: #fff; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; --bank: #1d4f5c; background: linear-gradient(135deg, color-mix(in srgb, var(--bank) 55%, #0b1620) 0%, var(--bank) 58%, color-mix(in srgb, var(--bank) 72%, #ffffff) 130%); box-shadow: 0 24px 44px -24px color-mix(in srgb, var(--bank) 70%, #000); transition: background .35s, box-shadow .35s, opacity .16s, transform .16s; }
.bank-card::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; left: -80px; top: -120px; background: rgba(255, 255, 255, .07); }
.bank-card > * { position: relative; }
.bank-card .bc-top { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; opacity: .9; }
.bank-card .bc-top .fa { font-size: 1.4rem; opacity: .8; }
.bank-card .bc-bank { font-weight: 700; }
.bank-card .bc-number { font-family: var(--font-en); font-size: 1.55rem; font-weight: 700; letter-spacing: .12em; text-align: center; margin: 1rem 0; direction: ltr; }
.bank-card .bc-bottom { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-weight: 700; }
/* شماره شبا: درشت‌تر با قلم برجسته کارت‌های بانکی (حروف برجسته / embossed) */
.bank-card .bc-sheba-row { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; margin-top: .85rem; direction: ltr; }
.bank-card .bc-sheba { font-family: CardMono, var(--font-en), monospace; font-size: 1.22rem; letter-spacing: .09em; direction: ltr; white-space: nowrap;
    color: #eef2f5; text-shadow: -1px -1px 0 rgba(255, 255, 255, .38), 1px 1px 0 rgba(0, 0, 0, .55), 2px 2px 3px rgba(0, 0, 0, .35); }
.bank-card .bc-account { font-size: .78rem; opacity: .85; margin-top: .35rem; text-align: left; }
.bank-card.switching { opacity: .35; transform: scale(.985); }
.bank-card-sm { min-height: 170px; padding: 1.1rem 1.25rem; }
.bank-card-sm .bc-number { font-size: 1.25rem; margin: .7rem 0; }
.bank-card-sm .bc-sheba { font-size: .84rem; letter-spacing: .03em; }
@media (max-width: 480px) { .bank-card .bc-sheba { font-size: .9rem; letter-spacing: .03em; } }
.bank-card.inactive { filter: grayscale(.85); opacity: .7; }

/* انتخاب کارت مقصد با لوگوی بانک */
.bank-badge { --bank: #475569; width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; text-align: center;
    background: var(--bank); color: #fff; font-size: .6rem; font-weight: 900; line-height: 1.15; padding: 3px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); overflow: hidden; }
.bank-badge.has-logo { background: #fff; padding: 5px; box-shadow: 0 0 0 1px var(--border); }
.bank-badge.has-logo img { width: 100%; height: 100%; object-fit: contain; }
.bank-badge.sm { width: 28px; height: 28px; font-size: .5rem; }
.bank-card .bank-badge { width: 34px; height: 34px; font-size: .52rem; }
.bank-picker { display: flex; flex-wrap: wrap; gap: .6rem; }
.bank-opt { display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 84px; padding: .7rem .6rem .55rem; border-radius: 18px; cursor: pointer;
    border: 1.5px solid var(--border-2); background: var(--surface); color: var(--text-2); font-family: var(--font); transition: all .15s; }
.bank-opt .bank-badge { width: 46px; height: 46px; font-size: .64rem; }
.bank-opt .bo-name { font-size: .76rem; font-weight: 700; white-space: nowrap; }
.bank-opt:hover { border-color: var(--primary); transform: translateY(-2px); }
.bank-opt.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 10px 20px -14px var(--primary); }
.bank-card .bc-copy { border: 0; border-radius: 10px; background: rgba(255, 255, 255, .16); color: #fff; font-size: .78rem; padding: .35rem .75rem; cursor: pointer; font-family: var(--font); }
.bank-card .bc-copy:hover { background: rgba(255, 255, 255, .26); }
.bank-card .bc-copy.sm { padding: .25rem .5rem; }
.receipt-preview { display: block; max-width: 100%; max-height: 220px; margin-top: .7rem; border-radius: 12px; border: 1px solid var(--border); }
.receipt-thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.receipt-view { background: var(--surface-3); border-radius: 14px; padding: .5rem; text-align: center; }
.receipt-view img { max-width: 100%; max-height: 60vh; border-radius: 10px; }

/* نظیر به نظیر */
.p2p-sample { max-height: 260px; border-radius: 12px; border: 1px solid var(--border); }
.p2p-sample table { font-size: .78rem; }
.p2p-sample th { background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.p2p-sample td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p2p-sample .col-num { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.p2p-sample .col-text { background: var(--accent-soft); }
.p2p-summary { position: sticky; top: 90px; transition: opacity .2s; }
.p2p-summary.loading { opacity: .55; pointer-events: none; }
.p2p-bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px 14px 4px 14px; padding: .55rem .8rem; margin-bottom: .5rem; font-size: .8rem; color: var(--text-2); line-height: 1.9; white-space: pre-wrap; }
.p2p-bubble b { font-family: var(--font-en); font-size: .74rem; color: var(--muted); }

@media (max-width: 1199.98px) {
    :root { --panel-w: 232px; }
    .app-content { padding: 6px 20px 20px; }
    .app-topbar { padding: 14px 20px 10px; }
}
@media (max-width: 991.98px) {
    body.app-body { height: auto; overflow: auto; background: var(--main-bg); }
    .app-shell { position: static; display: block; border-radius: 0; background: var(--main-bg); box-shadow: none; overflow: visible; }
    .app-sheet { display: block; border-radius: 0; overflow: visible; box-shadow: none; clip-path: none; }
    .app-main { overflow: visible; min-height: 100vh; }
    .app-rail { position: fixed; top: 0; bottom: 0; right: 0; z-index: 1050; background: var(--rail-bg); transform: translateX(100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
    .app-panel { position: fixed !important; top: 0; bottom: 0; right: var(--rail-w); z-index: 1049; width: var(--panel-w) !important; transform: translateX(calc(100% + var(--rail-w))); transition: transform .3s cubic-bezier(.4, 0, .2, 1); border-radius: var(--r-xl) 0 0 var(--r-xl); box-shadow: var(--shadow-lg); border-left: 0 !important; }
    body.no-panel .app-panel { display: none; }
    .app-panel .panel-scroll, .app-panel .panel-foot { opacity: 1 !important; pointer-events: auto !important; }
    .panel-knob { display: none; }
    body.drawer-open .app-rail, body.drawer-open .app-panel { transform: none; }
    body.drawer-open { overflow: hidden; }
    .drawer-backdrop { display: block; position: fixed; inset: 0; background: rgba(5, 30, 24, .45); z-index: 1040; opacity: 0; pointer-events: none; transition: opacity .3s; }
    body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
    .app-topbar { padding: 10px 14px; gap: 8px; }
    .tb-search { flex: 1 1 auto; }
    .tb-search input { height: 42px; }
    .tb-search kbd { display: none; }
    .tb-actions { margin-right: 0; }
    .tb-user { margin-right: 0; }
    .app-content { padding: 4px 14px 18px; }
    .app-footer { padding: 12px 16px 18px; }
    .toast-stack { top: 14px; left: 12px; right: 12px; width: auto; }
    .auth-hero { display: none; }
    .auth-page { background: var(--surface); }
    .auth-card .auth-title, .auth-card .auth-sub { text-align: center; }
    .welcome-card .wc-text { max-width: 100%; }
    .welcome-card .wc-art { display: none; }
}
@media (max-width: 767.98px) {
    .page-title { font-size: 1.2rem; }
    .stat-card .stat-value { font-size: 1.35rem; }
    .card-body { padding: 1.05rem; }
    .card-header { padding: .9rem 1.05rem; }
    .quick-row { gap: .4rem; }
    .quick-tile .qi { width: 50px; height: 50px; border-radius: 16px; }
    .msg { max-width: 94%; }
    .ticket-row { padding: .85rem 1rem; }
    .toolbar { padding: .85rem 1rem; }
    .thread { padding: 1.1rem 1rem; }
}
@media (max-width: 575.98px) {
    .row > .col-6 { padding-left: 6px; padding-right: 6px; }
    .stat-card { margin-bottom: 12px; height: calc(100% - 12px); padding: .9rem .95rem 0; }
    .stat-card .stat-head { flex-direction: column-reverse; gap: .5rem; }
    .stat-card .stat-value { font-size: 1.1rem; }
    .stat-card .stat-value small { font-size: .7rem; }
    .stat-card .stat-label, .stat-card .stat-meta, .stat-card .stat-foot { font-size: .74rem; }
    .stat-card .stat-foot { margin-left: -.95rem; margin-right: -.95rem; padding: .5rem .95rem; }
    .stat-card .stat-icon { width: 38px; height: 38px; font-size: 1rem; border-radius: 12px; }
    .table-responsive .table td, .table-responsive .table th { white-space: nowrap; }
    .form-actions .balance-note { flex-basis: 100%; margin: .25rem 0 0; }
    .form-actions .btn { flex: 1; }
    .amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tb-user .avatar { width: 36px; height: 36px; }
    .metric-row b { font-size: .8rem; }
    .hero-card .hc-value { font-size: 2.1rem; }
    .group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .group-card { padding: .9rem .9rem .8rem; }
}

/* ---------- انیمیشن ورود محتوا ---------- */
@media (prefers-reduced-motion: no-preference) {
    .app-content > * { animation: rise .45s ease both; }
    .app-content > *:nth-child(2) { animation-delay: .04s; }
    .app-content > *:nth-child(3) { animation-delay: .08s; }
    .app-content > *:nth-child(4) { animation-delay: .12s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
