/* ==================== shell.css - پوسته‌ی جدید برنامه (سبز، تمیز، موبایل‌محور) ====================
   فقط «پوسته» را عوض می‌کند: نوار بالا، منوی جانبی (پروفایل)، صفحه‌ی اصلی، نوار پایین با دکمه‌ی + ، صفحه‌ی خدمات.
   صفحه‌های داخلی و منطق برنامه دست‌نخورده‌اند. همه‌ی کلاس‌ها با پیشوند sh- هستند تا با استایل‌های قبلی تداخل نکنند.
   ===================================================================================== */

#mainApp, .sh-sheet, .sh-backdrop, .sh-drawer {
    --sh-g50: #effaf3;
    --sh-g100: #dff4e7;
    --sh-g200: #c3e8d1;
    --sh-g400: #3fbf74;
    --sh-g500: #1faa59;
    --sh-g600: #16a34a;
    --sh-g700: #12843d;
    --sh-g800: #0f6b34;
    --sh-g900: #0b4a25;
    --sh-gold: #e0a912;
    --sh-gold2: #f3c940;
    --sh-ink: #0f2a1a;
    --sh-ink2: #4a6556;
    --sh-muted: #7f9688;
    --sh-line: #e1eee6;
    --sh-card: #ffffff;
    --sh-red: #e5484d;
    --sh-amber: #f0a20c;
    --sh-rgb: 22,163,74; --sh-deep-rgb: 11,74,37; --sh-gold-rgb: 224,169,18;
    --sh-radius: 22px;
    --sh-shadow: 0 12px 30px -16px rgba(15, 90, 45, .38), 0 2px 8px rgba(15, 90, 45, .05);
    --sh-shadow-sm: 0 6px 16px -10px rgba(15, 90, 45, .35);
}
html[data-dark] #mainApp, html[data-dark] .sh-sheet, html[data-dark] .sh-backdrop, html[data-dark] .sh-drawer {
    --sh-g50: #12261b; --sh-g100: #173022; --sh-g200: #24432f;
    --sh-ink: #e9f6ee; --sh-ink2: #a9c4b4; --sh-muted: #7e9a89; --sh-line: #24382c; --sh-card: #15251c;
    --sh-shadow: 0 12px 30px -16px rgba(0, 0, 0, .7);
}

/* ---------- زمینه ---------- */
html:not([data-dark]) body:has(#mainApp.active) {
    background:
        radial-gradient(70% 38% at 100% 0%, rgba(var(--sh-rgb), .20), transparent 70%),
        radial-gradient(60% 34% at 0% 6%, rgba(var(--sh-gold-rgb), .10), transparent 70%),
        linear-gradient(180deg, #e6f8ee 0%, #f2fbf6 34%, #fafefc 100%);
    background-attachment: fixed;
}
html:not([data-dark]) body:has(#mainApp.active) { padding: 0 10px; }
#mainApp.active { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
html.has-session #bootSplash { background: linear-gradient(160deg, #e6f8ee, #f6fdf9 60%, #fffbea) !important; }
#bootSplash .boot-spin { border-color: rgba(var(--sh-rgb), .18) !important; border-top-color: var(--sh-g600) !important; }
#bootSplash img { box-shadow: 0 8px 24px rgba(var(--sh-rgb), .25) !important; }

/* ---------- نوار بالا ---------- */
.sh-appbar {
    position: sticky; top: 0; z-index: 700;
    display: flex; align-items: center; gap: 8px;
    margin: 0 -10px 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
    background: linear-gradient(180deg, rgba(240, 251, 245, .94), rgba(240, 251, 245, .78));
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
html[data-dark] .sh-appbar { background: rgba(14, 26, 19, .86); }
.sh-appbar-inner { width: 100%; max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.sh-apptitle {
    flex: 1; min-width: 0; text-align: center; font-size: 17px; font-weight: 800; color: var(--sh-ink);
    display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sh-apptitle img { width: 30px !important; height: 30px !important; margin: 0 !important; border-radius: 9px !important; object-fit: contain; flex: none; }
.sh-appactions { display: flex; align-items: center; gap: 8px; }

.sh-iconbtn {
    position: relative; flex: none; width: 42px; height: 42px; border-radius: 14px; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; color: var(--sh-g700);
    background: var(--sh-card); box-shadow: var(--sh-shadow-sm); -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .2s ease;
}
.sh-iconbtn:active { transform: scale(.94); }
.sh-iconbtn svg { width: 22px; height: 22px; }
.sh-iconbtn.sh-soft { background: var(--sh-g100); box-shadow: none; }
.sh-dot {
    position: absolute; top: -4px; left: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
    background: var(--sh-red); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center;
    border: 2px solid #f2fbf6; display: none;
}
.sh-dot.show { display: block; }

.sh-banner { max-width: 620px; margin: 0 auto 10px; }
.sh-banner .trial-countdown-box { width: 100%; min-width: 0; border-radius: 16px; padding: 7px 14px 9px; }

/* ---------- صفحه‌ی اصلی ---------- */
.sh-home, .sh-services-page .sh-svc-grid { max-width: 620px; margin-inline: auto; }
.sh-home { display: block; }
.sh-section { margin-top: 16px; }
.sh-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.sh-sec-head h3 { margin: 0; font-size: 16.5px; font-weight: 800; color: var(--sh-ink); }
.sh-link { border: 0; background: none; color: var(--sh-g600); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; padding: 4px 2px; }
.sh-link svg { width: 15px; height: 15px; }

/* گیج امتیاز */
.sh-gauge { position: relative; max-width: 330px; margin: 4px auto 0; text-align: center; }
.sh-gauge svg.sh-arc { width: 100%; height: auto; display: block; overflow: visible; }
.sh-gauge-center { position: absolute; left: 0; right: 0; top: 20%; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.sh-gauge-star { width: 34px; height: 34px; margin-bottom: 2px; filter: drop-shadow(0 4px 6px rgba(var(--sh-gold-rgb), .4)); }
.sh-gauge-num { font-size: 56px; line-height: 1.05; font-weight: 900; color: var(--sh-ink); letter-spacing: -1px; }
.sh-gauge-cap { margin-top: 2px; font-size: 15px; font-weight: 700; color: var(--sh-ink); }
.sh-gauge-tier { margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--sh-g100); color: var(--sh-g800); }
.sh-gauge-end { position: absolute; bottom: 10%; font-size: 12.5px; font-weight: 700; color: var(--sh-ink2); }
.sh-gauge-end.l { left: 2%; }
.sh-gauge-end.r { right: 2%; }
.sh-track { stroke: var(--sh-g200); opacity: .7; }

/* کارت‌های آمار */
.sh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.sh-stat {
    background: var(--sh-card); border-radius: 20px; padding: 12px 6px 11px; text-align: center; box-shadow: var(--sh-shadow);
    border: 1px solid var(--sh-line);
}
.sh-stat .ic { width: 40px; height: 40px; margin: 0 auto 4px; display: block; }
.sh-stat .lb { font-size: 12.5px; font-weight: 700; color: var(--sh-ink2); line-height: 1.5; }
.sh-stat .vl { margin-top: 1px; font-size: 25px; font-weight: 900; color: var(--sh-g800); line-height: 1.2; }
.sh-stat .sm { font-size: 10.5px; color: var(--sh-muted); font-weight: 600; margin-top: 1px; }
html[data-dark] .sh-stat .vl { color: var(--sh-g400); }

/* کارت موجودی */
.sh-balance {
    position: relative; overflow: hidden; margin-top: 12px; border-radius: 24px; padding: 18px 20px 19px;
    color: #fff; box-shadow: 0 18px 34px -16px rgba(var(--sh-deep-rgb), .75);
    background:
        radial-gradient(120% 140% at 0% 100%, rgba(255, 255, 255, .13), transparent 55%),
        linear-gradient(135deg, var(--sh-g500) 0%, var(--sh-g700) 60%, var(--sh-g800) 100%);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.sh-balance::after {
    content: ''; position: absolute; inset: auto -26px -34px auto; width: 150px; height: 150px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, .16), transparent); pointer-events: none;
}
.sh-balance .txt { min-width: 0; }
.sh-balance .lb { font-size: 14px; font-weight: 700; opacity: .92; }
.sh-balance .am { margin-top: 4px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.sh-balance .am b { font-size: 31px; font-weight: 900; letter-spacing: .3px; line-height: 1.2; }
.sh-balance .am small { font-size: 15px; font-weight: 700; opacity: .92; }
.sh-balance .wl { flex: none; width: 54px; height: 54px; border-radius: 18px; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; }
.sh-balance .wl svg { width: 30px; height: 30px; }

/* ماموریت‌ها */
.sh-card { background: var(--sh-card); border-radius: 24px; padding: 14px 14px 12px; box-shadow: var(--sh-shadow); border: 1px solid var(--sh-line); }
.sh-missions { display: grid; gap: 8px; }
.sh-mission {
    display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 10px 12px;
    border: 1px solid var(--sh-line); border-radius: 17px; background: var(--sh-card); cursor: pointer; text-align: right;
    font: inherit; width: 100%; -webkit-tap-highlight-color: transparent; transition: transform .15s ease, border-color .2s ease;
}
.sh-mission:active { transform: scale(.985); }
.sh-mission:hover { border-color: var(--sh-g200); }
.sh-mission .mi { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.sh-mission .mi svg { width: 24px; height: 24px; }
.sh-mission.t-green .mi { background: var(--sh-g100); color: var(--sh-g700); }
.sh-mission.t-amber .mi { background: #fdf0cf; color: #b57a00; }
.sh-mission.t-red .mi { background: #fde4e4; color: #cc2f35; }
.sh-mission.t-blue .mi { background: #e1effd; color: #1f6fc7; }
.sh-mission .mb { min-width: 0; }
.sh-mission .mt { font-size: 14.5px; font-weight: 800; color: var(--sh-ink); line-height: 1.55; }
.sh-mission .ms { font-size: 12px; color: var(--sh-ink2); margin-top: 1px; line-height: 1.6; }
.sh-bar { height: 6px; border-radius: 6px; background: var(--sh-g100); margin-top: 7px; overflow: hidden; }
.sh-bar i { display: block; height: 100%; border-radius: 6px; width: 0; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.t-green .sh-bar i { background: linear-gradient(90deg, var(--sh-g400), var(--sh-g500)); }
.t-amber .sh-bar i { background: linear-gradient(90deg, #f6c343, #f0a20c); }
.t-red .sh-bar i { background: linear-gradient(90deg, #f27c7c, #e5484d); }
.sh-empty { text-align: center; padding: 22px 10px; color: var(--sh-ink2); font-size: 13.5px; line-height: 2; }
.sh-empty b { display: block; color: var(--sh-g700); font-size: 15px; }

/* کاشی‌های «همه بخش‌ها» (همان کاشی‌های قبلی با ظاهر تازه) */
#homePage .main-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#homePage .menu-tile, .mg-panel .menu-tile {
    position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px;
    padding: 13px 4px 11px !important; min-height: 98px; border-radius: 18px !important; text-align: center; cursor: pointer;
    background: var(--sh-card) !important; border: 1px solid var(--sh-line) !important; border-top-width: 1px !important;
    box-shadow: var(--sh-shadow-sm) !important; transition: transform .15s ease, box-shadow .2s ease !important;
    -webkit-tap-highlight-color: transparent;
}
#homePage .menu-tile::before, #homePage .menu-tile::after, .mg-panel .menu-tile::before, .mg-panel .menu-tile::after { display: none !important; }
#homePage .menu-tile:hover, .mg-panel .menu-tile:hover { transform: translateY(-2px) !important; box-shadow: var(--sh-shadow) !important; }
#homePage .menu-tile:active, .mg-panel .menu-tile:active { transform: scale(.97) !important; }
#homePage .menu-tile-icon, .mg-panel .menu-tile-icon { filter: none !important; font-size: 26px; }
#homePage .menu-tile .ic-badge, .mg-panel .menu-tile .ic-badge { --ic-size: 44px; margin: 0; border-radius: 15px; box-shadow: none; background: var(--sh-g50); }
#homePage .menu-tile-title, .mg-panel .menu-tile-title { font-size: 12.5px !important; font-weight: 800 !important; color: var(--sh-ink) !important; text-shadow: none !important; line-height: 1.5; padding: 0 2px; }
#homePage .menu-tile-desc, .mg-panel .menu-tile-desc { display: none !important; }
.mg-panel { background: var(--sh-card, #fff) !important; border-radius: 24px !important; }
.mg-panel .main-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mg-folder .menu-tile-desc { display: block !important; font-size: 10.5px !important; color: var(--sh-muted) !important; }

.sh-verse { margin: 18px 4px 0; padding: 12px 14px; border-radius: 18px; background: var(--sh-g50); border: 1px dashed var(--sh-g200); color: var(--sh-g800); font-size: 12.5px; line-height: 2; text-align: center; }
.sh-home .home-credit { margin-top: 18px; }
#homeThanksBox { margin-top: 14px !important; }

/* ---------- نوار پایین ---------- */
.sh-nav {
    position: fixed; z-index: 800; left: 50%; transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: min(calc(100% - 20px), 620px); height: 66px;
    display: grid; grid-template-columns: 1fr 1fr 78px 1fr 1fr; align-items: stretch;
    background: rgba(255, 255, 255, .95); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 26px; padding: 0 4px;
    box-shadow: 0 18px 44px -14px rgba(var(--sh-deep-rgb), .5), 0 0 0 1px rgba(var(--sh-rgb), .10);
}
html[data-dark] .sh-nav { background: rgba(21, 37, 28, .95); }
.sh-nav[hidden] { display: none; }
.sh-nav-item {
    border: 0; background: none; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: var(--sh-muted); font-size: 11.5px; font-weight: 700; -webkit-tap-highlight-color: transparent; padding-top: 4px;
    position: relative; transition: color .2s ease;
}
.sh-nav-item svg { width: 25px; height: 25px; transition: transform .2s ease; }
.sh-nav-item.active { color: var(--sh-g600); }
.sh-nav-item.active svg { transform: translateY(-1px) scale(1.06); }
.sh-nav-item.active::after { content: ''; position: absolute; bottom: 5px; width: 18px; height: 3.5px; border-radius: 3px; background: var(--sh-g600); }
.sh-nav-item:active svg { transform: scale(.9); }
.sh-fab-slot { position: relative; }
.sh-fab {
    position: absolute; left: 50%; top: -28px; transform: translateX(-50%); width: 64px; height: 64px; border-radius: 50%; border: 5px solid #fff;
    background: radial-gradient(circle at 30% 25%, var(--sh-g400), var(--sh-g600) 55%, var(--sh-g800)); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 14px 26px -8px rgba(var(--sh-deep-rgb), .75); -webkit-tap-highlight-color: transparent; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), box-shadow .2s ease;
}
html[data-dark] .sh-fab { border-color: var(--sh-card); }
.sh-fab svg { width: 30px; height: 30px; transition: transform .28s cubic-bezier(.3, 1.4, .5, 1); }
.sh-fab:active { transform: translateX(-50%) scale(.93); }
.sh-fab.open svg { transform: rotate(45deg); }

/* ---------- برگه‌ی عملیات مالی ---------- */
.sh-backdrop { position: fixed; inset: 0; z-index: 880; background: rgba(var(--sh-deep-rgb), .46); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.sh-backdrop.show { opacity: 1; pointer-events: auto; }
.sh-sheet {
    position: fixed; z-index: 890; left: 0; right: 0; bottom: 0; margin-inline: auto; width: min(100%, 640px);
    background: var(--sh-card); border-radius: 30px 30px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(108%); transition: transform .34s cubic-bezier(.2, .85, .25, 1); box-shadow: 0 -20px 50px -20px rgba(var(--sh-deep-rgb), .45);
    max-height: 90vh; overflow-y: auto;
}
.sh-sheet.open { transform: translateY(0); }
.sh-grab { width: 44px; height: 5px; border-radius: 5px; background: var(--sh-g200); margin: 2px auto 14px; }
.sh-sheet h3 { margin: 0 0 14px; text-align: center; font-size: 17px; font-weight: 800; color: var(--sh-ink); }
.sh-opt {
    width: 100%; display: flex; align-items: center; gap: 12px; margin-bottom: 9px; padding: 11px 13px; border-radius: 18px; border: 0; cursor: pointer;
    font: inherit; text-align: right; -webkit-tap-highlight-color: transparent; transition: transform .15s ease; color: var(--sh-ink);
}
.sh-opt:active { transform: scale(.985); }
.sh-opt .oi { flex: none; width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .85); }
.sh-opt .oi svg { width: 26px; height: 26px; }
.sh-opt .ot { flex: 1; min-width: 0; }
.sh-opt .ot b { display: block; font-size: 15.5px; font-weight: 800; }
.sh-opt .ot small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--sh-ink2); font-weight: 600; }
.sh-opt .oc { flex: none; width: 20px; height: 20px; color: var(--sh-muted); }
.sh-opt.o-green { background: var(--sh-g100); } .sh-opt.o-green .oi { color: var(--sh-g700); }
.sh-opt.o-rose { background: #fde9ea; } .sh-opt.o-rose .oi { color: #d23a43; }
.sh-opt.o-amber { background: #fdf1d1; } .sh-opt.o-amber .oi { color: #b57a00; }
.sh-opt.o-blue { background: #e1effd; } .sh-opt.o-blue .oi { color: #1f6fc7; }
.sh-opt.o-slate { background: #eaf0ed; } .sh-opt.o-slate .oi { color: #3e5b4c; }
html[data-dark] .sh-opt.o-green { background: #173022; } html[data-dark] .sh-opt.o-rose { background: #3a1f22; }
html[data-dark] .sh-opt.o-amber { background: #3a3014; } html[data-dark] .sh-opt.o-blue { background: #172a3d; } html[data-dark] .sh-opt.o-slate { background: #1d2b24; }

/* ---------- منوی جانبی (پروفایل) ---------- */
.sh-drawer {
    position: fixed; z-index: 900; top: 0; bottom: 0; right: 0; width: min(88vw, 340px); display: flex; flex-direction: column;
    background: var(--sh-card); border-radius: 28px 0 0 28px; overflow: hidden;
    transform: translateX(108%); transition: transform .34s cubic-bezier(.2, .85, .25, 1); box-shadow: -24px 0 60px -20px rgba(var(--sh-deep-rgb), .55);
    visibility: hidden;
}
.sh-drawer.open { transform: translateX(0); visibility: visible; }
.sh-drawer-head { position: relative; flex: none; text-align: center; padding: calc(26px + env(safe-area-inset-top, 0px)) 18px 54px; background: linear-gradient(180deg, #fff, var(--sh-g50)); }
html[data-dark] .sh-drawer-head { background: linear-gradient(180deg, var(--sh-card), var(--sh-g50)); }
.sh-drawer-x { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; width: 36px; height: 36px; border: 0; border-radius: 12px; background: var(--sh-g100); color: var(--sh-g800); cursor: pointer; font-size: 17px; }
.sh-avatar { position: relative; width: 92px; height: 92px; margin: 0 auto 10px; border-radius: 50%; padding: 4px; background: linear-gradient(135deg, var(--sh-gold2), var(--sh-g500)); box-shadow: 0 10px 24px -10px rgba(var(--sh-deep-rgb), .6); }
.sh-avatar-in { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #e9fbf0, #c9efd9); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 3px solid #fff; }
.sh-avatar-in svg { width: 70%; height: 70%; }
.sh-avatar-edit { position: absolute; bottom: 0; right: -2px; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: var(--sh-g600); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.sh-avatar-edit svg { width: 14px; height: 14px; }
.sh-uname { font-size: 18px; font-weight: 900; color: var(--sh-ink); line-height: 1.6; }
.sh-uphone { font-size: 13.5px; color: var(--sh-ink2); font-weight: 600; direction: ltr; min-height: 1.2em; }
.sh-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 44px; display: block; }
.sh-drawer-body { flex: 1; overflow-y: auto; padding: 4px 0 6px; -webkit-overflow-scrolling: touch; }

/* ردیف‌های منو (همان .menu-item قبلی با ظاهر تازه) */
.sh-drawer .menu-items {
    position: static !important; transform: none !important; opacity: 1 !important; pointer-events: auto !important; width: auto !important;
    background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 12px !important; border-radius: 0 !important;
    backdrop-filter: none !important; display: block;
}
.sh-drawer .menu-item {
    position: relative; display: flex !important; align-items: center; gap: 14px; padding: 10px 8px !important; margin: 0 !important;
    background: none !important; border: 0 !important; border-bottom: 1px solid var(--sh-line) !important; border-radius: 0 !important; box-shadow: none !important;
    color: var(--sh-ink) !important; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s ease !important; transform: none !important;
}
.sh-drawer .menu-item:last-child { border-bottom: 0 !important; }
.sh-drawer .menu-item::before { display: none !important; }
.sh-drawer .menu-item::after {
    content: '' !important; position: static !important; width: 18px !important; height: 18px !important; flex: none; margin-inline-start: auto; opacity: .55 !important; border-radius: 0 !important;
    background: none !important; border: 0 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center/contain no-repeat;
    background-color: var(--sh-ink2) !important;
}
.sh-drawer .menu-item:hover, .sh-drawer .menu-item:active { background: var(--sh-g50) !important; }
.sh-drawer .menu-item-icon { order: 1; flex: none; }
.sh-drawer .menu-item-icon .ic-badge { --ic-size: 38px; border-radius: 12px; box-shadow: none; background: var(--sh-g50); }
.sh-drawer .menu-item-content { order: 2; flex: 1; min-width: 0; text-align: right; }
.sh-drawer .menu-item-title { font-size: 15px !important; font-weight: 700 !important; color: var(--sh-ink) !important; text-shadow: none !important; line-height: 1.6; }
.sh-drawer .menu-item-desc { display: none !important; }
.sh-drawer .auto-refresh-item .menu-item-desc { display: block !important; font-size: 10.5px !important; color: var(--sh-muted) !important; margin-top: 0; text-align: right; direction: rtl !important; }
.sh-drawer .menu-item-logout .menu-item-title { color: var(--sh-red) !important; }
.sh-drawer .menu-item-logout .ic-badge { background: #fde9ea; }
.sh-drawer .menu-item::after { order: 4; }
.sh-drawer .notif-badge { margin: 0 !important; order: 3; }
.sh-drawer .menu-item[style*="border-right"] { border-right: 0 !important; }

.sh-drawer-themes { padding: 12px 20px 8px; border-top: 1px solid var(--sh-line); margin-top: 4px; }
.sh-drawer-themes .sh-thl { font-size: 12px; font-weight: 700; color: var(--sh-ink2); margin-bottom: 6px; }
.sh-drawer-themes .theme-shortcuts { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
.sh-drawer-foot { flex: none; text-align: center; padding: 8px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--sh-line); color: var(--sh-ink2); font-size: 12px; }
.sh-drawer-foot b { display: block; color: var(--sh-ink); font-size: 14px; margin-bottom: 1px; }
body.sh-lock { overflow: hidden; }

/* ---------- صفحه‌ی خدمات ---------- */
.sh-services-page { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.sh-topbar { max-width: 620px; margin: 0 auto 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0 4px; }
.sh-topbar-title { margin: 0; flex: 1; text-align: center; font-size: 18px; font-weight: 800; color: var(--sh-ink); }
.sh-services-hero { max-width: 330px; margin: 0 auto 6px; }
.sh-services-hero svg { width: 100%; height: auto; display: block; }
.sh-svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sh-svc {
    position: relative; background: var(--sh-card); border: 1px solid var(--sh-line); border-radius: 24px; box-shadow: var(--sh-shadow);
    padding: 16px 12px 14px; text-align: center; cursor: pointer; font: inherit; color: var(--sh-ink);
    display: flex; flex-direction: column; align-items: center; gap: 8px; -webkit-tap-highlight-color: transparent; transition: transform .15s ease;
}
.sh-svc:active { transform: scale(.98); }
.sh-svc .si { width: 62px; height: 62px; }
.sh-svc .si svg { width: 100%; height: 100%; display: block; }
.sh-svc .st { font-size: 16px; font-weight: 800; }
.sh-svc .sd { font-size: 11.5px; color: var(--sh-ink2); margin-top: -4px; min-height: 1.4em; }
.sh-svc .go { width: 44px; height: 30px; border-radius: 12px; background: var(--sh-g100); color: var(--sh-g700); display: flex; align-items: center; justify-content: center; }
.sh-svc .go svg { width: 18px; height: 18px; }
.sh-svc .cnt { position: absolute; top: 10px; left: 10px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--sh-g600); color: #fff; font-size: 11.5px; font-weight: 800; line-height: 22px; }
.sh-svc.wide { grid-column: 1 / -1; padding: 14px 18px; flex-direction: row; justify-content: space-between; gap: 14px; text-align: right; }
.sh-svc.wide .si { width: 66px; height: 66px; flex: none; }
.sh-svc.wide .sm { flex: 1; min-width: 0; }
.sh-svc.wide .sd { margin-top: 0; }
.sh-svc.wide .cnt { position: static; margin-inline-start: 6px; display: inline-block; vertical-align: middle; }

/* نوار فیلتر نوع در صفحه‌ی نظرسنجی/انتخابات/مسابقه */
.sh-kindbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; padding: 9px 14px; border-radius: 14px; background: var(--sh-g100); color: var(--sh-g800); font-size: 13px; font-weight: 700; }
.sh-kindbar button { border: 0; background: var(--sh-card); color: var(--sh-g700); border-radius: 10px; padding: 4px 11px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }

/* دکمه‌ی شناور «ثبت وام» روی صفحه‌ی وام‌ها، بالاتر از نوار پایین */
.floating-loan-btn {
    bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; left: 16px !important; width: 54px !important; height: 54px !important;
    font-size: 30px !important; background: linear-gradient(135deg, var(--sh-g400), var(--sh-g700)) !important; color: #fff !important; z-index: 790 !important;
    box-shadow: 0 12px 22px -8px rgba(var(--sh-deep-rgb), .7) !important;
}

/* هدر صفحه‌های داخلی: کمی نرم‌تر و هماهنگ با پوسته */
html body .content-page .content-header { border-radius: 18px; }

@media (min-width: 700px) {
    .sh-stat .vl { font-size: 28px; }
    .sh-gauge-num { font-size: 62px; }
}
@media (max-width: 380px) {
    .sh-balance .am b { font-size: 26px; }
    .sh-gauge-num { font-size: 48px; }
    .sh-nav-item { font-size: 10.5px; }
    #homePage .main-menu-grid { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .sh-drawer, .sh-sheet, .sh-backdrop, .sh-bar i, .sh-fab, .sh-fab svg { transition: none !important; }
}

/* عناصر شناور قبلی (اعلان مرورگر، وضعیت آنلاین) بالاتر از نوار پایین بنشینند */
#pushPromptBar { bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; z-index: 850 !important; border-radius: 18px !important; background: linear-gradient(135deg, var(--sh-g700), var(--sh-g800)) !important; }
#offBar { bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important; left: 12px !important; z-index: 840 !important; opacity: .94; }

/* دستیار هوشمند (دکمه‌ی شناور قبلی) بالاتر از نوار پایین، گوشه‌ی راست */
#asFab { bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important; right: 14px !important; width: 46px !important; height: 46px !important; font-size: 22px !important; z-index: 790 !important; }
#asPanel { bottom: calc(146px + env(safe-area-inset-bottom, 0px)) !important; }

/* ===== آیه‌ی بالای صفحه (فقط خانه) ===== */
.sh-verse-top{display:none;position:sticky;top:0;z-index:60;text-align:center;padding:8px 14px;font-size:12.5px;line-height:1.9;font-weight:600;color:#fff;background:linear-gradient(90deg,var(--sh-g900),var(--sh-g600) 50%,var(--sh-g900));box-shadow:0 2px 8px rgba(0,0,0,.12)}
body.sh-on-home .sh-verse-top{display:block}
/* ===== کارت واریز ===== */
.sh-sec-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 2px 8px}
.sh-sec-head h3{margin:0;font-size:15px}
.sh-hint{font-size:11px;opacity:.65}
.sh-paycard{position:relative;display:block;width:100%;padding:0;border:0;background:none;cursor:pointer;border-radius:20px;overflow:hidden;box-shadow:0 10px 24px rgba(var(--sh-rgb),.25);-webkit-tap-highlight-color:transparent;transition:transform .15s}
.sh-paycard:active{transform:scale(.98)}
.sh-paycard-img{display:block;width:100%;height:auto;max-height:210px;object-fit:cover}
.sh-paycard-gen{padding:22px 20px;min-height:150px;color:#fff;background:linear-gradient(135deg,var(--sh-g800),var(--sh-g500) 60%,var(--sh-gold));text-align:right}
.sh-paycard-gen .g1{font-weight:700;font-size:15px}
.sh-paycard-gen .g2{margin:26px 0 10px;font-size:21px;letter-spacing:2px;text-align:center}
.sh-paycard-gen .g3{font-size:13px;opacity:.9}
.sh-paycard-no{display:none}
.sh-paycard-copy{position:absolute;left:10px;bottom:10px;display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font-size:12px;backdrop-filter:blur(4px)}
.sh-paycard-copy svg{width:15px;height:15px}
.sh-paycard-holder{text-align:center;font-size:12px;margin-top:6px;opacity:.75}
.sh-card-empty{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;padding:16px;border:2px dashed var(--sh-green,var(--sh-g600));border-radius:18px;background:transparent;color:inherit;cursor:pointer;font-family:inherit}
.sh-sheet-sub{margin:-4px 0 12px;text-align:center;font-size:12.5px;opacity:.7}
.sh-opt-close{margin-top:10px}
.sh-paycard-mini{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;margin:8px 0 12px;padding:10px;border:1.5px dashed var(--sh-g600);border-radius:14px;background:rgba(var(--sh-rgb),.08);color:inherit;font-family:inherit;cursor:pointer}
.sh-paycard-mini b{font-size:18px;letter-spacing:1.5px}
.sh-paycard-mini small{font-size:11px;opacity:.6}
#shPaySheet{z-index:1203}
.sh-greet-card{margin-top:12px}


/* ===== هماهنگی کامل با «طرح رنگی» (۱۰ طرح) =====
   وقتی طرحی انتخاب شده باشد (html[data-themed])، همه‌ی رنگ‌های پوسته از متغیرهای همان طرح گرفته می‌شود. */
html[data-themed] #mainApp, html[data-themed] .sh-sheet, html[data-themed] .sh-backdrop, html[data-themed] .sh-drawer, html[data-themed] #shPaySheet {
    --sh-g50: var(--tint); --sh-g100: var(--tint-2); --sh-g200: var(--border);
    --sh-g400: var(--primary-light); --sh-g500: var(--primary); --sh-g600: var(--primary);
    --sh-g700: var(--primary-dark); --sh-g800: var(--chrome-a); --sh-g900: var(--chrome-a);
    --sh-gold: var(--accent); --sh-gold2: var(--accent-light);
    --sh-ink: var(--text); --sh-ink2: var(--text-secondary); --sh-muted: var(--text-soft);
    --sh-line: var(--border-soft); --sh-card: var(--surface);
    --sh-rgb: var(--primary-rgb); --sh-deep-rgb: var(--chrome-a-rgb); --sh-gold-rgb: var(--accent-rgb);
}
html[data-themed] body:has(#mainApp.active) { background: var(--body-bg) !important; background-attachment: fixed !important; }
html[data-themed] .sh-appbar { background: color-mix(in srgb, var(--page-bg1) 90%, transparent); }
html[data-themed] .sh-nav { background: color-mix(in srgb, var(--surface) 95%, transparent); }
html[data-themed].has-session #bootSplash { background: var(--body-bg) !important; }
html[data-themed] .sh-drawer, html[data-themed] .sh-sheet { background: var(--surface); }
html[data-themed] .sh-drawer-body { background: var(--surface); }
html[data-dark] .sh-verse-top, html[data-themed] .sh-verse-top { background: var(--header-bg); }

/* ===== کاشی‌های قابل‌لمس + برگه‌ی امتیاز ===== */
button.sh-stat{font-family:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .15s}
button.sh-stat:active{transform:scale(.96)}
#shRankSheet{z-index:1203;max-height:88vh;overflow-y:auto}
.sh-rank-top{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}
.sh-rank-top>div{background:var(--sh-g50);border-radius:16px;padding:10px 4px;text-align:center}
.sh-rank-top b{display:block;font-size:22px;font-weight:900;color:var(--sh-g700)}
.sh-rank-top b.tr{font-size:16px;padding-top:4px}
.sh-rank-top small{font-size:11.5px;color:var(--sh-ink2)}
.sh-rank-sec{font-weight:800;font-size:14px;margin:12px 2px 8px;color:var(--sh-ink)}
.sh-rank-tbl{border:1px solid var(--sh-line);border-radius:16px;overflow:hidden}
.sh-rank-row{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;font-size:13.5px;border-bottom:1px solid var(--sh-line);color:var(--sh-ink)}
.sh-rank-row small{color:var(--sh-muted)}
.sh-rank-row.up b{color:var(--sh-g600)} .sh-rank-row.dn b{color:var(--sh-red)}
.sh-rank-row.tot{background:var(--sh-g50);font-weight:900;border-bottom:0}
.sh-rank-note{font-size:12.5px;line-height:1.9;color:var(--sh-ink2);margin:10px 2px}
.sh-rank-tips{margin:0 0 4px;padding:0 4px;list-style:none;font-size:13px;line-height:1.9;color:var(--sh-ink)}
.sh-rank-tips li{padding:6px 0;border-bottom:1px dashed var(--sh-line)}
.sh-apptitle{font-size:clamp(13px,4.2vw,17px)}
.sh-apptitle{white-space:normal !important;line-height:1.4;font-size:clamp(13px,3.9vw,16px) !important;overflow:visible !important;text-overflow:clip !important}

/* ===== دکمه‌های صدقات ===== */
.sh-sad-btns{gap:8px;flex:1;min-width:0}
.sh-sad-btn{flex:1;min-width:0;height:44px;border:0;border-radius:12px;color:#fff;font-family:inherit;font-weight:800;font-size:12px;cursor:pointer;white-space:nowrap;padding:0 4px;box-shadow:0 6px 14px -6px rgba(0,0,0,.35);-webkit-tap-highlight-color:transparent}
.sh-sad-btn.in{background:linear-gradient(135deg,#22c55e,#15803d)}
.sh-sad-btn.out{background:linear-gradient(135deg,#ef4444,#b91c1c)}
.sh-sad-btn:active{transform:scale(.97)}
/* ===== دکمه‌ی «بستن» وسط‌چین ===== */
.sh-opt-close{justify-content:center;text-align:center}
.sh-opt-close .ot{flex:0 1 auto;text-align:center}
/* ===== رتبه‌بندی اعضا (مدیر کل) ===== */
.sh-rank-board{border:1px solid var(--sh-line);border-radius:16px;overflow:hidden;margin-bottom:6px}
.sh-rb-row{display:flex;align-items:center;gap:8px;padding:9px 12px;font-size:13px;border-bottom:1px solid var(--sh-line);color:var(--sh-ink)}
.sh-rb-row:last-child{border-bottom:0}
.sh-rb-row.me{background:var(--sh-g50);font-weight:800}
.sh-rb-row .rk{flex:none;width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--sh-g50);font-weight:800;font-size:12px;color:var(--sh-g700)}
.sh-rb-row .rk.top{background:var(--sh-gold);color:#fff}
.sh-rb-row .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sh-rb-row .tr{font-size:11px;color:var(--sh-muted)}
.sh-rb-row b{flex:none;min-width:38px;text-align:left;color:var(--sh-g700)}
/* ===== نقش اعضا در کارت: منتهی‌الیه چپ و کمی بزرگ‌تر ===== */
.member-card .member-info > span:has(> .role-badge){margin-left:-44px;order:3}
.member-card .role-badge{font-size:13.5px !important;padding:3px 11px !important}

/* موجودی صندوق زیر اسلایدر پویش‌ها (js/campaign-slider.js) */
#shBalance { margin-top: 12px; }
#shBalance:empty { display: none; }
#shBalance .sh-balance { margin-top: 0; }
#campSliderHost { margin-top: 14px; }
#campSliderHost:empty { display: none; }

/* نوار بالا: کمی پررنگ‌تر از زمینه‌ی صفحه تا از آن متمایز شود */
.sh-appbar {
    background: linear-gradient(rgba(var(--sh-rgb), .13), rgba(var(--sh-rgb), .13)), linear-gradient(180deg, rgba(240, 251, 245, .97), rgba(240, 251, 245, .9));
    box-shadow: 0 1px 0 rgba(var(--sh-rgb), .16), 0 8px 18px -14px rgba(var(--sh-deep-rgb), .5);
}
html[data-dark] .sh-appbar { background: linear-gradient(rgba(255, 255, 255, .06), rgba(255, 255, 255, .06)), rgba(14, 26, 19, .94); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
html[data-themed] .sh-appbar { background: color-mix(in srgb, var(--primary) 14%, color-mix(in srgb, var(--page-bg1) 96%, transparent)); }
html[data-themed][data-dark] .sh-appbar { background: color-mix(in srgb, #fff 7%, color-mix(in srgb, var(--page-bg1) 96%, transparent)); }

/* ===== صدقات: انتخاب عضو پرداخت‌کننده / واریز گروهی ===== */
.sh-sdq-switch{display:flex;align-items:center;gap:8px;margin:6px 0 10px;font-weight:700;cursor:pointer}
.sh-sdq-switch input{width:18px;height:18px;margin:0}
.sh-sdq-row{background:rgba(var(--sh-rgb),.08);border:1px solid rgba(var(--sh-rgb),.22);border-radius:12px;padding:8px 10px;margin-bottom:8px}
.sh-sdq-top{display:flex;align-items:center;gap:8px}
.sh-sdq-nm{flex:1;min-width:0;font-weight:800;font-size:13px}
.sh-sdq-nm small{opacity:.65;font-weight:600}
.sh-sdq-amt{width:120px;max-width:38%;padding:7px 8px;border:1px solid rgba(var(--sh-rgb),.35);border-radius:9px;font-family:inherit;font-size:13px;text-align:center;direction:ltr}
.sh-sdq-x{border:0;background:#fee2e2;color:#b91c1c;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:13px;line-height:1;flex:none}
.sh-sdq-note{font-size:11px;opacity:.75;margin-top:5px;line-height:1.7}
.sh-sdq-total{margin-top:8px;font-weight:800;color:#15803d;font-size:13px}
.sh-sdq-hint{font-size:11px;opacity:.65;margin-top:8px;line-height:1.8}
.sh-sdq-pick{display:flex;align-items:center;gap:10px;padding:10px;border-bottom:1px solid rgba(0,0,0,.08);cursor:pointer}
.sh-sdq-pick input{width:18px;height:18px;margin:0}
.sh-sdq-pick small{opacity:.6}
