/* دلارکس — بازطراحی بصری بر اساس نمونه‌ی Donezo (نسخه‌ی جزیره‌ای) */
@font-face {
    font-family: 'Estedad';
    src: url('/assets/fonts/Estedad-Variable.woff2') format('woff2-variations'),
         url('/assets/fonts/Estedad-Variable.woff2') format('woff2');
    font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
    --primary: #011135; --primary-dark: #000A22; --primary-light: #1B2B52;
    --primary-soft: #E7EAF1; --accent: #3E5486;
    --page: #F4F5F7; --card: #FFFFFF; --sidebar: #FFFFFF;
    --ink: #0C1424; --ink-soft: #414B60; --muted: #8B95A7; --faint: #C0C7D3;
    --border: #ECEFF4; --border-mid: #E1E6ED;
    --danger: #D65745; --danger-soft: #FBEDEA;
    --warning: #C67E14; --warning-soft: #FCF3E4;
    --info: #2F5F9E; --info-soft: #EAF0F9;
    --success: #1E7A52; --success-soft: #E6F2EC;
    --on-primary: #FFFFFF;
    --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
    --shadow: 0 1px 3px rgba(1,17,53,.06);
    --shadow-soft: 0 4px 20px rgba(1,17,53,.08);
    --sidebar-w: 246px;
    --logo-light: block; --logo-dark: none;
    --ease: cubic-bezier(.4,0,.2,1);
    color-scheme: light;
}
html[data-theme="dark"] {
    --primary: #4E6BA8; --primary-dark: #3C5590; --primary-light: #6A85BE;
    --primary-soft: #16203A; --accent: #6A85BE;
    --page: #080D1A; --card: #101828; --sidebar: #101828;
    --ink: #E9EDF5; --ink-soft: #B4BECE; --muted: #7C879B; --faint: #4A5468;
    --border: #1C2436; --border-mid: #263047;
    --danger: #F08573; --danger-soft: #3A1D18;
    --warning: #E5A93F; --warning-soft: #3A2A12;
    --info: #6BA3E8; --info-soft: #14243A;
    --success: #4FC08D; --success-soft: #102A20;
    --on-primary: #08122A;
    --shadow: 0 1px 3px rgba(0,0,0,.4);
    --shadow-soft: 0 4px 24px rgba(0,0,0,.45);
    --logo-light: none; --logo-dark: block;
    color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Estedad', Tahoma, sans-serif; background: var(--page); color: var(--ink);
    font-size: 14px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.ic { flex-shrink: 0; display: block; }
.money { font-family: 'Estedad', Tahoma, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .1px; direction: ltr; unicode-bidi: isolate; }
/* درصد جهت‌امن: همیشه عدد سمت راست، ٪ سمت چپ آن */
.pct { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* ═══ چیدمان اصلی — جزیره‌ای با فاصله ═══ */
.app { display: flex; min-height: 100vh; gap: 0; padding: 14px; gap: 14px; }
.nav-toggle { display: none; }
.nav-backdrop { display: none; }

/* ═══ سایدبار جزیره‌ای ═══ */
.sidebar {
    width: var(--sidebar-w); background: var(--sidebar); flex-shrink: 0;
    display: flex; flex-direction: column; padding: 20px 14px;
    position: sticky; top: 14px; height: calc(100vh - 28px);
    border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-logo.lg { height: 46px; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px; background: var(--primary);
    color: #fff; display: grid; place-items: center; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(1,17,53,.28);
}
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.nav { flex: 1; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }
.nav-group { font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: .6px; margin: 12px 12px 4px; }

.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
    color: var(--ink-soft); font-size: 14px; font-weight: 500; position: relative;
    transition: background .15s, color .15s; width: 100%; border: 0; background: none;
    font-family: inherit; cursor: pointer; text-align: right;
}
.nav-ic { display: grid; place-items: center; color: var(--muted); transition: color .15s; flex-shrink: 0; }
.nav-txt { flex: 1; }
.nav-link:hover { background: var(--page); color: var(--ink); }
.nav-link:hover .nav-ic { color: var(--ink-soft); }
/* آیتم فعال: پس‌زمینه‌ی نرم سبز + آیکون سبز + نشانگر */
.nav-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-link.active .nav-ic { color: var(--primary); }
.nav-dot {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 22px; border-radius: 4px 0 0 4px; background: var(--primary);
}

/* گروه بازشونده */
.nav-caret { margin-inline-start: auto; color: var(--faint); transition: transform .2s; display: grid; place-items: center; }
.nav-parent.open .nav-caret { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; gap: 1px; margin: 2px 0 4px; padding-inline-start: 18px; position: relative; }
.nav-parent.open .nav-sub { display: flex; }
.nav-sub::before { content: ''; position: absolute; inset-inline-start: 21px; top: 4px; bottom: 12px; width: 1.5px; background: var(--border-mid); }
.nav-sublink {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
    color: var(--ink-soft); font-size: 13px; font-weight: 500; position: relative; transition: all .15s;
}
.nav-subdot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex-shrink: 0; transition: background .15s; z-index: 1; }
.nav-sublink:hover { background: var(--page); color: var(--ink); }
.nav-sublink.active { color: var(--primary); font-weight: 700; }
.nav-sublink.active .nav-subdot { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ساعت پایین سایدبار (جای کارت قبلی) */
.side-clock {
    margin-top: 12px; background: linear-gradient(150deg, #1c2e24, #0e2017); border-radius: var(--r-md);
    padding: 16px; color: #fff; position: relative; overflow: hidden; text-align: center;
}
.side-clock::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 15%, rgba(95,185,140,.28), transparent 55%); pointer-events: none; }
.clock-time { font-size: 26px; font-weight: 800; letter-spacing: 1px; font-variant-numeric: tabular-nums; direction: ltr; position: relative; }
.clock-date { font-size: 12px; color: var(--muted); margin-top: 2px; position: relative; }

/* ═══ محتوا ═══ */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* هدر جزیره‌ای */
.topbar {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px;
    background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
    position: sticky; top: 14px; z-index: 90;
}
.hamburger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; border-radius: 10px; }
.hamburger:hover { background: var(--page); }
.hamburger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.search-box {
    flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px;
    background: var(--page); border: 1px solid transparent; border-radius: 12px; padding: 0 14px;
    transition: border .15s, background .15s;
}
.search-box:focus-within { background: var(--card); border-color: var(--accent); }
.search-box .ic { color: var(--muted); }
.search-box input { flex: 1; border: 0; background: none; padding: 11px 0; font: inherit; outline: none; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.icon-btn {
    width: 42px; height: 42px; border-radius: 12px; background: var(--page); border: 0;
    display: grid; place-items: center; color: var(--ink-soft); transition: all .15s; cursor: pointer; flex-shrink: 0;
}
.icon-btn:hover { color: var(--primary); background: var(--primary-soft); }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.logout-mini { margin: 0; }
.avatar { border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-weight: 700; flex-shrink: 0; font-size: 15px; }
.topbar-user-info { display: flex; flex-direction: column; line-height: 1.35; }
.topbar-user-info b { font-size: 13.5px; }
.topbar-user-info span { font-size: 11.5px; color: var(--muted); }

.main { flex: 1; min-width: 0; }

/* ═══ سربرگ صفحه ═══ */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 14px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ═══ کارت ═══ */
.card { background: var(--card); border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.card h2 small { font-weight: normal; font-size: 12px; color: var(--muted); }
.table-card { padding: 0; overflow: hidden; }
.table-card.narrow { max-width: 720px; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; gap: 10px; flex-wrap: wrap; }
.card-title-row h2 { margin: 0; }

/* ═══ کارت‌های آماری ═══ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); display: block; position: relative; transition: transform .15s; }
.stat:hover { transform: translateY(-2px); }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 8px; }
.stat-label { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.stat-arrow { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-mid); display: grid; place-items: center; color: var(--ink); flex-shrink: 0; }
.stat-val { font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.stat-delta { font-size: 12px; color: var(--muted); margin-top: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stat-chip { background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 11px; padding: 1px 7px; border-radius: 6px; }
.stat.featured { background: var(--primary); color: var(--on-primary); overflow: hidden; }
.stat.featured::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.14), transparent 55%); pointer-events: none; }
.stat.featured .stat-label { color: rgba(255,255,255,.92); }
.stat.featured .stat-arrow { border-color: rgba(255,255,255,.35); color: #fff; position: relative; }
.stat.featured .stat-val { position: relative; }
.stat.featured .stat-delta { color: rgba(255,255,255,.82); }
.stat.featured .stat-chip { background: rgba(255,255,255,.2); color: #fff; }

/* ═══ نمودار میله‌ای ═══ */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding-top: 34px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; min-width: 0; }
.bar-track { flex: 1; width: 100%; max-width: 42px; display: flex; align-items: flex-end; margin: 0 auto; position: relative; }
.bar { width: 100%; border-radius: 40px; min-height: 8px; position: relative; background: repeating-linear-gradient(45deg, var(--border-mid), var(--border-mid) 5px, var(--page) 5px, var(--page) 10px); }
.bar.on { background: var(--accent); }
.bar.peak { background: var(--primary); }
.bar-val { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 7px; white-space: nowrap; z-index: 2; }
.bar-val::after { content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); border: 4px solid transparent; border-top-color: var(--primary); border-bottom: 0; }
.bar-label { font-size: 11.5px; color: var(--muted); font-weight: 500; direction: ltr; }

/* ═══ جدول ═══ */
.tbl-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { background: var(--page); color: var(--muted); text-align: right; padding: 13px 18px; font-size: 12px; font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--border); position: sticky; top: 0; }
td { padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--page); }
tr.foot td { background: var(--page); font-weight: 700; }
tr.done-row td { background: var(--success-soft); }
tr.warn td { background: var(--warning-soft); }
tr.edit-row td { background: var(--primary-soft); }
.inline-edit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inline-edit input { width: 150px; }

/* ═══ فرم ═══ */
label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
label.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
input, select, textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border-mid); border-radius: 11px;
    font: inherit; font-weight: normal; color: var(--ink); background: var(--card); margin-top: 6px;
    transition: border .15s, box-shadow .15s; max-width: 100%;
}
label.inline input, label.inline select { width: auto; margin-top: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { resize: vertical; }
input[dir=ltr], .reveal-box { font-variant-numeric: tabular-nums; }
.form-card { max-width: 780px; }
.form-card.narrow { max-width: 500px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.grid2-side { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.form-actions.between { justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filters input[type=search] { width: 260px; margin: 0; max-width: 100%; }
.filters input, .filters select { margin: 0; }
.filters select { width: auto; }

/* ═══ دکمه ═══ */
.btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px; border-radius: 12px;
    border: 1px solid var(--border-mid); background: var(--card); color: var(--ink); cursor: pointer;
    font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: all .15s;
}
.btn:hover { border-color: var(--faint); background: var(--page); }
.btn .ic { width: 17px; height: 17px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 4px 12px rgba(1,17,53,.20); }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.lg { padding: 13px 22px; font-size: 15px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #BE4536; }
.btn.info { background: var(--info); border-color: var(--info); color: #fff; }
.btn.outline { background: transparent; }
.btn.tiny { padding: 5px 12px; font-size: 12px; border-radius: 9px; }
.btn.wide { width: 100%; justify-content: center; margin-top: 6px; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions form { margin: 0; }

/* ═══ بج ═══ */
.badge { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 8px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.b-success { background: var(--success-soft); color: var(--success); }
.b-primary { background: var(--primary); color: var(--on-primary); }
.b-info { background: var(--info-soft); color: var(--info); }
.b-warning { background: var(--warning-soft); color: var(--warning); }
.b-danger { background: var(--danger-soft); color: var(--danger); }
.b-muted { background: var(--border); color: var(--muted); }

/* ═══ متفرقه ═══ */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty { color: var(--muted); text-align: center; padding: 26px 0; }
.center { text-align: center; }
.primary-text { color: var(--primary); }
.danger-text { color: var(--danger); }
.section-title { font-size: 16px; font-weight: 700; margin: 20px 0 12px; display: flex; align-items: center; gap: 8px; }
.def div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; gap: 10px; }
.def div:last-child { border-bottom: 0; }
.def dt { color: var(--muted); }
.def dd { font-weight: 600; text-align: left; }
.note-box { background: var(--page); border-radius: 12px; padding: 12px 16px; margin-top: 12px; font-size: 13px; line-height: 1.8; }
.row-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: var(--page); border-radius: 13px; margin-bottom: 9px; font-size: 13.5px; flex-wrap: wrap; }
.row-item:hover { background: var(--page); }
.row-item.warn { background: var(--warning-soft); }
.row-item form { margin: 0; }
.list-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.list-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.reveal-box { background: var(--ink); color: #6FE0A0; font-family: monospace; font-size: 16px; padding: 13px 18px; border-radius: 12px; letter-spacing: 1px; word-break: break-all; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13.5px; }
.alert.danger { background: var(--danger-soft); color: var(--danger); }
.alert.warning { background: var(--warning-soft); color: var(--warning); }
.toast { position: fixed; top: 20px; left: 20px; z-index: 300; background: var(--ink); color: var(--card); padding: 13px 22px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: opacity .4s; font-size: 13.5px; max-width: calc(100vw - 40px); }
.toast.danger { background: var(--danger); }
.toast.info { background: var(--info); }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; padding: 0 2px; }
/* pager_links() شماره‌ها را با <a> و صفحه‌ی جاری را با a.on می‌سازد؛ قبلاً فقط .pg-btn استایل داشت و شماره‌ها خام دیده می‌شدند */
.pg-btn, .pager a { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 12px; border-radius: 10px;
    background: var(--card); border: 1px solid var(--border-mid); color: var(--ink); font-size: 13px; font-weight: 700;
    text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pg-btn.active, .pager a.on { background: var(--primary); color: var(--on-primary, #fff); border-color: var(--primary); pointer-events: none; }
.pager { justify-content: center; }

.fup-card { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.fup-card.danger-border { border-inline-start: 4px solid var(--danger); }
.fup-actions { display: flex; flex-direction: column; gap: 7px; flex-shrink: 0; }

/* ═══ ورود ═══ */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; background: var(--page); padding: 20px; }
.login-wrap { width: 100%; max-width: 400px; display: flex; justify-content: center; }
.login-card { width: 100%; background: var(--card); border-radius: var(--r-lg); padding: 36px 32px; box-shadow: var(--shadow-soft); }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-brand .brand-mark { width: 44px; height: 44px; }
.login-title { font-size: 22px; font-weight: 800; }
.login-sub { color: var(--muted); margin-bottom: 22px; }

/* ═══ کامبوباکس ═══ */
.combo { position: relative; }
.combo-list { display: none; position: absolute; top: calc(100% + 4px); right: 0; left: 0; z-index: 60; background: var(--card); border: 1px solid var(--border-mid); border-radius: 13px; max-height: 260px; overflow-y: auto; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.combo-item { padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: normal; }
.combo-item:hover { background: var(--primary-soft); }
.combo-item + .combo-item { border-top: 1px solid var(--border); }
.combo-item .money { color: var(--muted); font-size: 12px; }
.combo-empty { padding: 14px; color: var(--muted); text-align: center; font-size: 13px; font-weight: normal; }

/* ═══ دیت‌پیکر شمسی ═══ */
.jdp { display: none; position: absolute; z-index: 400; width: 276px; max-width: calc(100vw - 24px); background: var(--card); border: 1px solid var(--border-mid); border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.16); padding: 12px; direction: rtl; font-family: 'Estedad', Tahoma, sans-serif; }
.jdp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 800; font-size: 14px; color: var(--primary); }
.jdp-nav { border: 0; background: var(--primary-soft); color: var(--primary); width: 32px; height: 32px; border-radius: 10px; cursor: pointer; font-size: 17px; }
.jdp-nav:hover { background: var(--accent); color: #fff; }
.jdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.jdp-w { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.jdp-w.fri { color: var(--danger); } .jdp-w.off { color: var(--faint); }
.jdp-d { border: 0; background: transparent; padding: 7px 0; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13px; text-align: center; color: var(--ink); }
.jdp-d:hover { background: var(--primary-soft); }
.jdp-d.fri { color: var(--danger); } .jdp-d.off { color: var(--muted); }
.jdp-d.today { outline: 2px solid var(--accent); }
.jdp-d.sel { background: var(--primary); color: var(--on-primary) !important; font-weight: 800; }
.jdp-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.jdp-btn { border: 1px solid var(--border-mid); background: var(--card); border-radius: 9px; padding: 5px 13px; cursor: pointer; font: inherit; font-size: 12px; }
.jdp-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ═══ چاپ ═══ */
.print-header { display: none; }
@media print {
    body { background: #fff; }
    .sidebar, .topbar, .actions, .filters, .no-print, .toast, .btn, .row-actions { display: none !important; }
    .app { padding: 0; } .content { gap: 0; }
    .card { box-shadow: none; border: 1px solid var(--border); }
    .print-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--primary); padding-bottom: 12px; margin-bottom: 18px; }
    .print-header .brand-name, .print-header b { color: var(--primary); font-size: 22px; font-weight: 800; }
    .grid2-side { grid-template-columns: 1fr; }
}

/* ═══ ریسپانسیو ═══ */
@media (max-width: 1000px) {
    .grid2-side { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .app { padding: 0; gap: 0; }
    .sidebar {
        position: fixed; inset: 0 0 0 auto; z-index: 200; width: 280px; max-width: 85vw;
        border-radius: 0; top: 0; transform: translateX(100%); transition: transform .25s;
        height: 100vh; height: 100dvh; padding-bottom: 16px;
    }
    .nav-toggle:checked ~ .sidebar,
    body.nav-open .sidebar { transform: translateX(0); }
    .nav-toggle:checked ~ .nav-backdrop,
    body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 190; animation: fadeIn .22s var(--ease); }
    .hamburger { display: flex; }
    .content { gap: 0; padding: 12px; }
    .topbar { position: sticky; top: 0; border-radius: var(--r-md); margin-bottom: 12px; padding: 10px 12px; }
    .topbar-user-info { display: none; }
    .main { padding: 0; }
    .grid2 { grid-template-columns: 1fr; }
    .page-head h1 { font-size: 22px; }
    .search-box { max-width: none; }
    /* ساعت جمع‌وجورتر تا در ارتفاع موبایل جا شود و بریده نشود */
    .side-clock { margin-top: 10px; padding: 12px; }
    .clock-time { font-size: 22px; }
}
@media (max-width: 560px) {
    .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat { padding: 16px; }
    .stat-val { font-size: 26px; }
    .filters input[type=search] { width: 100%; }
    .search-box { display: none; }
    .page-head { margin-bottom: 16px; }
    .actions { width: 100%; }
    .actions .btn { flex: 1; justify-content: center; }
    .card { padding: 16px; }
    .chart { height: 170px; gap: 5px; }
    /* صفحه‌ی ورود در موبایل */
    .login-card { padding: 22px 18px; border-radius: var(--r-md); box-shadow: var(--shadow); }
    .auth-body { padding: 16px; }
    .login-brand { font-size: 20px; margin-bottom: 16px; }
    .login-brand .brand-mark { width: 38px; height: 38px; }
    .login-title { font-size: 19px; }
    .login-sub { font-size: 13px; margin-bottom: 18px; }
    .login-card label { margin-bottom: 12px; }
    .login-brand { font-size: 21px; }
    .login-brand .brand-mark { width: 40px; height: 40px; }
    .login-title { font-size: 20px; }
}

/* ── اسپینر AJAX ── */
.ajax-spinner { width: 18px; height: 18px; border: 2px solid var(--border-mid); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.ajax-spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── جعبه‌ی انتخاب دسترسی کاربر ── */
.perm-head { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.perm-box { border: 1px solid var(--border-mid); border-radius: 12px; padding: 6px; max-height: 340px; overflow-y: auto; margin-bottom: 14px; }
.perm-group { padding: 8px; border-radius: 10px; }
.perm-group + .perm-group { border-top: 1px solid var(--border); }
.perm-group-title { font-size: 11.5px; font-weight: 700; color: var(--primary); margin-bottom: 6px; letter-spacing: .3px; }
.perm-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px; margin: 0; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; transition: background .12s; }
.perm-item:hover { background: var(--primary-soft); }
.perm-item input { width: 17px; height: 17px; margin: 0; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }
.perm-item span { flex: 1; }

/* ── وضعیت کرون ── */
.cron-status { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; }
.cron-status.ok { background: var(--success-soft); }
.cron-status.warn { background: var(--warning-soft); }
.cron-status.off { background: var(--border); }
.cron-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.cron-status.ok .cron-dot { background: var(--success); box-shadow: 0 0 0 4px rgba(46,146,104,.18); }
.cron-status.warn .cron-dot { background: var(--warning); box-shadow: 0 0 0 4px rgba(224,138,30,.18); }
.cron-status.off .cron-dot { background: var(--muted); }
.code-box { background: #1B2430; color: #6FE0A0; font-family: monospace; font-size: 12px; padding: 10px 14px; border-radius: 10px; word-break: break-all; margin: 6px 0; direction: ltr; }
.code-box a { color: #6FE0A0; }

/* ── گزارش کار ── */
.wr-card { padding: 0; overflow: hidden; }
.wr-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px 12px; }
.wr-date { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.wr-body { padding: 0 18px 14px; font-size: 13.5px; line-height: 1.9; color: var(--ink); white-space: pre-wrap; }
.wr-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; background: var(--page); border-top: 1px solid var(--border); flex-wrap: wrap; }
.wr-mode { display: flex; gap: 8px; margin-bottom: 14px; }
.wr-radio { display: flex; align-items: center; gap: 7px; margin: 0; padding: 9px 12px; border: 1px solid var(--border-mid); border-radius: 11px; cursor: pointer; font-size: 13px; font-weight: 600; flex: 1; transition: all .15s; }
.wr-radio:hover { border-color: var(--accent); }
.wr-radio input { width: auto; margin: 0; accent-color: var(--primary); }

/* ═══ فرم عمومی لید ═══ */
.lead-body { display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; min-height: 100dvh; background: var(--page); padding: 24px 16px; }
.lead-wrap { width: 100%; max-width: 480px; }
.lead-card { background: var(--card); border-radius: var(--r-lg); padding: 32px 28px; box-shadow: var(--shadow-soft); }
.lead-brand { display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.lead-brand .brand-mark { width: 46px; height: 46px; }
.lead-title { font-size: 22px; font-weight: 800; text-align: center; }
.lead-sub { color: var(--muted); text-align: center; margin-bottom: 22px; font-size: 14px; }
.lead-footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

.lead-steps-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.lead-steps-bar span { flex: 1; height: 5px; border-radius: 3px; background: var(--border-mid); transition: background .2s; }
.lead-steps-bar span.on { background: var(--primary); }
.lead-step-title { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 16px; }

.lead-q { margin-bottom: 20px; }
.lead-q-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.lead-opts { display: grid; grid-template-columns: 1fr; gap: 9px; }
.lead-opts.two { grid-template-columns: 1fr 1fr; }
.lead-opt { display: flex; align-items: center; gap: 10px; margin: 0; padding: 13px 15px; border: 1.5px solid var(--border-mid); border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); transition: all .15s; }
.lead-opt:hover { border-color: var(--accent); background: var(--primary-soft); }
.lead-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.lead-opt span { flex: 1; }
.lead-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.lead-actions { display: flex; gap: 10px; margin-top: 8px; }
.lead-actions .btn:last-child { flex: 1; justify-content: center; }

.lead-thanks { text-align: center; padding: 20px 0; }
.lead-check { width: 78px; height: 78px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 18px; }
.lead-thanks h1 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.lead-thanks p { color: var(--ink-soft); font-size: 15px; line-height: 1.9; }

@media (max-width: 560px) {
    .lead-card { padding: 24px 18px; }
    .lead-title { font-size: 20px; }
    .lead-opts.two { grid-template-columns: 1fr 1fr; }
}

/* ── پنل وضعیت مشتری ── */
.status-panel { background: var(--page); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 15px; }
.status-panel-info { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.status-panel-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.status-panel-hint { font-size: 12.5px; color: var(--muted); line-height: 1.8; margin-bottom: 10px; }
.status-block-toggle { align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.status-block-toggle input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--danger); flex-shrink: 0; }

/* ── نوار خلاصه‌آمار بالای جدول‌ها ── */
.stat-strip { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ss-item { flex: 1; min-width: 130px; background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; border-inline-start: 3px solid var(--border-mid); }
.ss-val { font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ss-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ss-primary { border-inline-start-color: var(--primary); } .ss-primary .ss-val { color: var(--primary); }
.ss-success { border-inline-start-color: var(--success); } .ss-success .ss-val { color: var(--success); }
.ss-info { border-inline-start-color: var(--info); } .ss-info .ss-val { color: var(--info); }
.ss-warning { border-inline-start-color: var(--warning); } .ss-warning .ss-val { color: var(--warning); }
.ss-danger { border-inline-start-color: var(--danger); } .ss-danger .ss-val { color: var(--danger); }
.ss-muted { border-inline-start-color: var(--faint); } .ss-muted .ss-val { color: var(--ink-soft); }
@media (max-width: 560px) {
    .stat-strip { gap: 8px; }
    .ss-item { min-width: calc(50% - 4px); padding: 12px; }
    .ss-val { font-size: 20px; }
}

/* ── شمارنده‌های منو ── */
.nav-count { background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.nav-link.active .nav-count { background: #fff; color: var(--primary); }
.nav-sublink .nav-count { margin-inline-start: auto; }
.nav-count.group-count { margin-inline-start: 0; margin-inline-end: 6px; }
.nav-sublink { justify-content: flex-start; }
.nav-sublink .nav-txt { flex: 1; }

/* ── زنگوله‌ی هدر + منوی کشویی ── */
.notif-bell { position: relative; }
.bell-badge { position: absolute; top: 4px; inset-inline-end: 4px; background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; display: flex; align-items: center; justify-content: center; line-height: 1; border: 2px solid var(--card); font-variant-numeric: tabular-nums; }
.notif-drop { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 340px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--border-mid); border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.14); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 120; overflow: hidden; }
.notif-bell.open .notif-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.notif-drop-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-drop-head b { font-size: 14px; }
.notif-drop-list { max-height: 320px; overflow-y: auto; }
.notif-drop-item { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .12s; }
.notif-drop-item:hover { background: var(--page); }
.notif-drop-item.unread { background: var(--primary-soft); }
.notif-drop-item.unread:hover { background: var(--primary-soft); }
.notif-drop-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--card); border: 1px solid var(--border-mid); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.notif-drop-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-drop-txt b { font-size: 13px; font-weight: 700; }
.notif-drop-txt span { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-drop-txt time { font-size: 11px; color: var(--muted); }
.notif-drop-all { display: block; text-align: center; padding: 12px; font-size: 13px; font-weight: 700; color: var(--primary); background: var(--page); }
.notif-drop-all:hover { background: var(--primary-soft); }

/* ── صفحه‌ی اعلان‌ها ── */
.notif-row { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.notif-row:last-child { border-bottom: 0; }
.notif-row.unread { background: var(--primary-soft); }
.notif-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--card); border: 1px solid var(--border-mid); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.notif-row.unread .notif-ic { background: #fff; }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
.notif-body { font-size: 13px; color: var(--ink-soft); margin-top: 3px; line-height: 1.7; }
.notif-time { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.notif-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ── پنل صدور خودکار صورتحساب ── */
.auto-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: linear-gradient(135deg, var(--primary-soft), #fff); border: 1px solid var(--accent); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; flex-wrap: wrap; }
.auto-panel-txt { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 240px; }
.auto-panel-txt b { font-size: 15px; display: flex; align-items: center; gap: 7px; color: var(--primary); }
.auto-panel-txt span { font-size: 12.5px; color: var(--ink-soft); line-height: 1.8; }
.auto-panel form { margin: 0; flex-shrink: 0; }


/* ── گزارش کار: در موبایل فرم ثبت بالای فهرست ── */
@media (max-width: 1000px) {
    .wr-grid .wr-form-col { order: -1; margin-bottom: 16px; }
    .wr-grid .wr-list-col { order: 1; }
}

/* ── فرم و متن قرارداد ── */
.contract-text { background: var(--page); border: 1px solid var(--border); border-radius: 12px; padding: 18px; font-size: 13.5px; line-height: 2.1; color: var(--ink); max-height: 340px; overflow-y: auto; white-space: pre-wrap; }
.otp-input { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 10px; font-variant-numeric: tabular-nums; padding: 12px !important; }
.lead-card .inline { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.lead-card .inline input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }

/* ── پیش‌نمای امضای دلارکس در تنظیمات ── */
.sig-preview { display: flex; align-items: center; gap: 14px; background: var(--page); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sig-preview img { height: 56px; width: auto; max-width: 180px; object-fit: contain; }
.sig-preview .inline { font-size: 12.5px; color: var(--danger); gap: 7px; }

/* ── انتخاب نوع قرارداد در فرم عمومی ── */
.contract-type-pick { margin: 4px 0 6px; }
.ctp-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.ctp-opt { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border: 1.5px solid var(--border-mid); border-radius: 12px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; font-weight: 600; }
.ctp-opt:hover { border-color: var(--primary); }
.ctp-opt input { width: 18px; height: 18px; accent-color: var(--primary); }
.ctp-opt input:checked + span { color: var(--primary); }
.ctp-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

/* ── نشان شمارنده کنار عنوان ── */
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; background: var(--primary-soft); color: var(--primary); border-radius: 11px; font-size: 12.5px; font-weight: 800; margin-inline-start: 6px; font-variant-numeric: tabular-nums; }

/* ═══════════ پنل مشتریان ═══════════ */

/* کارت وضعیت حساب */
.status-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: linear-gradient(135deg, var(--primary-soft), #fff); border: 1px solid var(--accent); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 16px; }
.status-card.prop { background: linear-gradient(135deg, var(--warning-soft), #fff); border-color: var(--warning); }
.status-card.inactive, .status-card.lead { background: linear-gradient(135deg, var(--page), #fff); border-color: var(--border-mid); }
.status-card.blocked { background: linear-gradient(135deg, var(--danger-soft), #fff); border-color: var(--danger); }
.status-card-main { display: flex; flex-direction: column; gap: 2px; }
.status-card-label { font-size: 12.5px; color: var(--ink-soft); }
.status-card-val { font-size: 24px; font-weight: 800; color: var(--primary); }
.status-card.prop .status-card-val { color: var(--warning); }
.status-card.blocked .status-card-val { color: var(--danger); }
.status-card.lead .status-card-val, .status-card.inactive .status-card-val { color: var(--ink); }
.status-card-hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.8; }
.status-card-ic { color: var(--primary); opacity: .22; flex-shrink: 0; }

.stat-unit { font-size: 14px; font-weight: 600; color: var(--muted); }

/* میان‌برها */
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.quick-link { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); color: var(--ink-soft); font-size: 13px; font-weight: 600; transition: all .15s; }
.quick-link:hover { color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.quick-link svg { color: var(--primary); }

/* نوار پیشرفت پراپ */
.prop-bar { margin: 6px 0 4px; }
.prop-bar-track { position: relative; height: 14px; background: var(--border); border-radius: 8px; overflow: hidden; }
.prop-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 8px; transition: width .5s ease; }
.prop-bar.over .prop-bar-fill { background: linear-gradient(90deg, var(--warning), #E8B061); }
.prop-bar-tick { position: absolute; top: 0; width: 2px; height: 100%; background: rgba(255,255,255,.75); }
.prop-bar-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.prop-bar-meta span { font-variant-numeric: tabular-nums; }

.prop-card { margin-bottom: 14px; }
.prop-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.prop-card-head h2 { font-size: 17px; }
.prop-eta { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.prop-eta svg { color: var(--primary); }
.prop-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.9; background: var(--page); padding: 10px 12px; border-radius: 10px; }
.prop-done { margin-top: 8px; display: flex; align-items: center; gap: 8px; color: var(--success); font-weight: 700; font-size: 13.5px; }
.prop-inactive { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* نمودار ساده */
.mini-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.mc-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.mc-bar { width: 100%; max-width: 34px; background: linear-gradient(180deg, var(--accent), var(--primary)); border-radius: 6px 6px 3px 3px; min-height: 4px; transition: opacity .15s; }
.mc-col:hover .mc-bar { opacity: .8; }
.mc-lbl { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* قرارداد */
.contract-card { display: flex; flex-direction: column; gap: 10px; }
.contract-card.signed { border: 1px solid var(--accent); }
.contract-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.contract-card-head h2 { font-size: 16px; }
.contract-text { background: var(--page); border: 1px solid var(--border); border-radius: 12px; padding: 18px; font-size: 13.5px; line-height: 2.1; max-height: 360px; overflow-y: auto; white-space: pre-wrap; }
.otp-input { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 10px; font-variant-numeric: tabular-nums; padding: 12px !important; }

/* تیکت / چت */
.ticket-head { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chat { display: flex; flex-direction: column; gap: 12px; max-height: 520px; overflow-y: auto; padding: 4px 2px; }
.chat-msg { display: flex; }
.chat-msg.mine { justify-content: flex-start; }
.chat-msg.theirs { justify-content: flex-end; }
.chat-bubble { max-width: 78%; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.9; position: relative; }
.chat-msg.mine .chat-bubble { background: var(--primary-soft); border: 1px solid var(--border-mid); border-bottom-right-radius: 4px; }
.chat-msg.theirs .chat-bubble { background: var(--page); border: 1px solid var(--border-mid); border-bottom-left-radius: 4px; }
.chat-who { font-size: 11.5px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.chat-msg.theirs .chat-who { color: var(--ink-soft); }
.chat-bubble time { display: block; font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.chat-att { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; color: var(--primary); font-weight: 600; }
.chat-form { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.chat-form-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.file-mini { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.file-mini input[type=file] { max-width: 190px; font-size: 11.5px; }

/* نوار نصب اپلیکیشن */
.install-bar { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--accent); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.install-bar[hidden] { display: none; }
.install-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.install-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.install-txt b { font-size: 13.5px; }
.install-txt span { font-size: 12px; color: var(--muted); }
.install-x { background: none; border: 0; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; padding: 0 4px; }

/* ردیف زیان */
.loss-row td { background: var(--danger-soft); }
.success-text { color: var(--success); }

.app-footer { text-align: center; padding: 18px 0 8px; font-size: 12px; color: var(--muted); }

@media (max-width: 700px) {
    .quick-links { grid-template-columns: repeat(2, 1fr); }
    .status-card { flex-direction: row; padding: 16px; }
    .status-card-val { font-size: 20px; }
    .chat-bubble { max-width: 88%; }
}

/* ═══════════ افزوده‌های نسخه‌ی جدید ═══════════ */

/* ── لوگو در دو حالت روشن/تیره ── */
.brand-logo.for-light { display: var(--logo-light); }
.brand-logo.for-dark  { display: var(--logo-dark); }

/* ── انتقال نرم بین تم‌ها ── */
/* ترنزیشن سبک تم — بدون * تا لگ نکند */
html.theme-anim body, html.theme-anim .app, html.theme-anim .sidebar, html.theme-anim .topbar,
html.theme-anim .card, html.theme-anim .main, html.theme-anim .stat, html.theme-anim .table-card,
html.theme-anim table, html.theme-anim tbody tr, html.theme-anim .nav-link, html.theme-anim .m-card {
    transition: background-color .3s var(--ease), border-color .3s var(--ease), color .25s var(--ease) !important;
}
/* موج انتقال تم */
.theme-ripple { position: fixed; border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%) scale(0); opacity: .35; }
@keyframes ripple-out { to { transform: translate(-50%,-50%) scale(1); opacity: 0; } }

/* ── دکمه‌ی تم ── */
.theme-btn { position: relative; overflow: hidden; }
.theme-btn .ic-sun, .theme-btn .ic-moon { transition: transform .45s var(--ease), opacity .3s var(--ease); position: absolute; }
html:not([data-theme="dark"]) .theme-btn .ic-moon { transform: rotate(-90deg) scale(.4); opacity: 0; }
html:not([data-theme="dark"]) .theme-btn .ic-sun  { transform: rotate(0) scale(1); opacity: 1; }
html[data-theme="dark"] .theme-btn .ic-sun  { transform: rotate(90deg) scale(.4); opacity: 0; }
html[data-theme="dark"] .theme-btn .ic-moon { transform: rotate(0) scale(1); opacity: 1; }

/* ── ساعت در هدر ── */
.hdr-clock {
    display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 13px;
    background: var(--primary); color: var(--on-primary); position: relative; overflow: hidden;
    flex-shrink: 0;
}
.hdr-clock::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 82% 18%, rgba(255,255,255,.16), transparent 58%); pointer-events: none; }
.hdr-clock-time { font-size: 17px; font-weight: 800; letter-spacing: .6px; font-variant-numeric: tabular-nums; direction: ltr; position: relative; }
.hdr-clock-date { font-size: 11px; opacity: .78; position: relative; white-space: nowrap; }
.hdr-clock-sep { width: 1px; height: 22px; background: rgba(255,255,255,.22); position: relative; }

/* ── انیمیشن ورود صفحه و کارت‌ها ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.main > * { animation: fadeUp .38s var(--ease) both; }
.main > *:nth-child(1) { animation-delay: .02s; }
.main > *:nth-child(2) { animation-delay: .06s; }
.main > *:nth-child(3) { animation-delay: .10s; }
.main > *:nth-child(4) { animation-delay: .14s; }
.main > *:nth-child(5) { animation-delay: .18s; }
.stats .stat { animation: fadeUp .4s var(--ease) both; }
.stats .stat:nth-child(2) { animation-delay: .05s; }
.stats .stat:nth-child(3) { animation-delay: .10s; }
.stats .stat:nth-child(4) { animation-delay: .15s; }

/* ترنزیشن عمومی نرم */
.card, .btn, .nav-link, .stat, .row-item, .quick-link, .icon-btn, .badge {
    transition: background-color .2s var(--ease), border-color .2s var(--ease),
                color .2s var(--ease), transform .18s var(--ease), box-shadow .22s var(--ease);
}
.card:hover { box-shadow: var(--shadow-soft); }
.btn:active { transform: scale(.97); }
.nav-link:active { transform: scale(.985); }
tbody tr { transition: background-color .16s var(--ease); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── اعلان‌ها: ریسپانسیو کامل ── */
.notif-drop:not(.mobile-fixed) { width: 340px; max-width: calc(100vw - 24px); }
@media (max-width: 620px) {
    .notif-bell { position: static; }
    .notif-drop {
        position: fixed; top: auto; right: 12px; left: 12px; width: auto; max-width: none;
        margin-top: 8px;
    }
    .notif-drop-list { max-height: 54vh; }
}
.notif-drop-txt { min-width: 0; overflow: hidden; }
.notif-drop-txt b, .notif-drop-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; }

/* صفحه‌ی اعلان‌ها در موبایل */
@media (max-width: 620px) {
    .notif-row { flex-wrap: wrap; padding: 14px; gap: 10px; }
    .notif-main { flex: 1 1 100%; order: 2; min-width: 0; }
    .notif-ic { order: 1; width: 36px; height: 36px; }
    .notif-actions { order: 3; flex: 1 1 100%; justify-content: flex-end; }
    .notif-title, .notif-body { word-break: break-word; overflow-wrap: anywhere; }
}
.notif-title, .notif-body { overflow-wrap: anywhere; }

/* ── آموزش گام‌به‌گام ── */
.tour-mask { position: fixed; inset: 0; z-index: 2000; background: rgba(4,10,24,.62); backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s var(--ease); }
.tour-mask.on { opacity: 1; }
.tour-hole { position: absolute; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(4,10,24,.62), 0 0 0 3px var(--accent); transition: all .4s var(--ease); pointer-events: none; }
.tour-pop {
    position: fixed; z-index: 2001; width: 320px; max-width: calc(100vw - 28px);
    background: var(--card); color: var(--ink); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.34);
    padding: 18px; opacity: 0; transform: translateY(8px); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.tour-pop.on { opacity: 1; transform: none; }
.tour-step { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.tour-title { font-size: 16px; font-weight: 800; margin-bottom: 7px; color: var(--primary); }
.tour-body { font-size: 13px; line-height: 2; color: var(--ink-soft); }
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.tour-actions .spacer { flex: 1; }
.tour-dots { display: flex; gap: 5px; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-mid); transition: all .25s var(--ease); }
.tour-dot.on { background: var(--primary); width: 18px; border-radius: 3px; }
.help-btn { width: 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); border: 0; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: all .2s var(--ease); }
.help-btn:hover { background: var(--primary); color: var(--on-primary); transform: scale(1.06); }
@media (max-width: 620px) {
    .tour-pop { width: auto; right: 14px; left: 14px; }
}

/* ── سوییچ حالت شب در سایدبار موبایل ── */
.side-tools { display: flex; gap: 8px; padding: 12px 4px 4px; border-top: 1px solid var(--border); margin-top: 10px; }
.side-tools .btn { flex: 1; }

/* سربرگ صفحه با دکمه راهنما */
.page-head-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head-title h1 { order: 1; }
.page-head-title .help-btn { order: 2; }
.page-head-title .vid-btn { order: 2; }   /* هم‌رتبه‌ی دکمه‌ی آموزش؛ در HTML بعد از آن است، پس بعد از عنوان و آیکن آموزش می‌نشیند */
.page-head-title .page-sub { order: 3; flex-basis: 100%; }

/* ═══════════ نسخه ۱۸ ═══════════ */

/* ── رفع زوم خودکار iOS: فونت ورودی‌ها هرگز زیر 16px نباشد ── */
@media (max-width: 900px) {
    input, select, textarea,
    input[type="text"], input[type="search"], input[type="tel"],
    input[type="number"], input[type="date"], input[type="password"], input[type="email"] {
        font-size: 16px !important;
    }
    .otp-input { font-size: 24px !important; }
}
input, select, textarea { -webkit-text-size-adjust: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ── سبک نئونی ── */
:root {
    --neon: #3E7BFA; --neon-2: #7A5CFF; --neon-3: #22D3A8;
    --glow: 0 0 0 rgba(0,0,0,0);
    --neon-line: linear-gradient(90deg, transparent, var(--neon), var(--neon-2), transparent);
}
html[data-theme="dark"] {
    --neon: #5B8CFF; --neon-2: #9B7BFF; --neon-3: #2FE9BC;
}

/* خط نئونی بالای کارت‌ها */
.card, .stat, .m-card {
    position: relative;
    border: 1px solid var(--border);
}
.card::before, .stat::before {
    content: ''; position: absolute; top: 0; right: 12%; left: 12%; height: 1px;
    background: var(--neon-line); opacity: .55; pointer-events: none;
    border-radius: 2px;
}
html[data-theme="dark"] .card::before, html[data-theme="dark"] .stat::before { opacity: .8; }

.stat.featured {
    background: linear-gradient(135deg, var(--primary), #1B2B52 70%, #24407A);
    box-shadow: 0 6px 26px rgba(1,17,53,.30), 0 0 0 1px rgba(62,123,250,.22) inset;
}
html[data-theme="dark"] .stat.featured {
    box-shadow: 0 6px 30px rgba(0,0,0,.5), 0 0 22px rgba(91,140,255,.18) inset;
}

.btn.primary {
    box-shadow: 0 3px 14px rgba(1,17,53,.22), 0 0 0 1px rgba(62,123,250,.18) inset;
}
.btn.primary:hover {
    box-shadow: 0 5px 20px rgba(1,17,53,.30), 0 0 16px rgba(62,123,250,.32);
    transform: translateY(-1px);
}
html[data-theme="dark"] .btn.primary:hover { box-shadow: 0 5px 22px rgba(0,0,0,.5), 0 0 20px rgba(91,140,255,.42); }

.nav-link.active {
    box-shadow: 0 0 0 1px rgba(62,123,250,.20) inset, 0 2px 12px rgba(1,17,53,.14);
}
html[data-theme="dark"] .nav-link.active { box-shadow: 0 0 18px rgba(91,140,255,.20), 0 0 0 1px rgba(91,140,255,.25) inset; }

.badge { box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset; }
html[data-theme="dark"] .b-success { box-shadow: 0 0 12px rgba(79,192,141,.18); }
html[data-theme="dark"] .b-danger  { box-shadow: 0 0 12px rgba(240,133,115,.18); }
html[data-theme="dark"] .b-warning { box-shadow: 0 0 12px rgba(229,169,63,.18); }

/* درخشش ملایم روی مقادیر مالی */
.money.glow, .stat-val.money { text-shadow: 0 0 18px rgba(62,123,250,.18); }
html[data-theme="dark"] .money.glow, html[data-theme="dark"] .stat-val.money { text-shadow: 0 0 20px rgba(91,140,255,.35); }

/* آیکن داخل دکمه‌ها */
.btn svg { vertical-align: -3px; margin-inline-end: 6px; }
.btn.tiny svg { margin-inline-end: 4px; }
.btn.icon-only svg { margin: 0; }

/* انیمیشن‌های بیشتر */
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes glowPulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.card, .m-card { animation: popIn .34s var(--ease) both; }
.badge { animation: popIn .26s var(--ease) both; }

/* ── جدول → کارت در موبایل ── */
.m-cards { display: none; }
@media (max-width: 820px) {
    .table-card .tbl-scroll { display: none; }
    .m-cards { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
    .table-card { padding: 0; }
}
.m-card {
    background: var(--card); border: 1px solid var(--border-mid); border-radius: 14px;
    padding: 13px 14px; cursor: pointer; position: relative; overflow: hidden;
    transition: transform .16s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.m-card:active { transform: scale(.985); }
.m-card:hover { border-color: var(--accent); }
.m-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-card-title { font-size: 14px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; min-width: 0; }
.m-card-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-card-sub { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 9px; font-size: 12.5px; color: var(--ink-soft); }
.m-card-sub b { color: var(--ink); font-weight: 700; }
.m-card-chev { color: var(--muted); flex-shrink: 0; transition: transform .2s var(--ease); }

/* شیت پایین‌آمدنی */
.sheet-mask {
    position: fixed; inset: 0; background: rgba(4,10,24,.55); backdrop-filter: blur(3px);
    z-index: 2400; opacity: 0; transition: opacity .28s var(--ease);
}
.sheet-mask.on { opacity: 1; }
.sheet {
    position: fixed; right: 0; left: 0; bottom: 0; z-index: 2401;
    background: var(--card); border-radius: 22px 22px 0 0;
    max-height: 86vh; overflow-y: auto; transform: translateY(100%);
    transition: transform .34s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 -10px 40px rgba(0,0,0,.30);
    padding-bottom: env(safe-area-inset-bottom, 12px);
}
.sheet.on { transform: translateY(0); }
.sheet::before {
    content: ''; position: absolute; top: 0; right: 20%; left: 20%; height: 2px;
    background: var(--neon-line); opacity: .7;
}
.sheet-grip { width: 42px; height: 4px; border-radius: 3px; background: var(--border-mid); margin: 11px auto 4px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 18px 14px; border-bottom: 1px solid var(--border); }
.sheet-head h3 { font-size: 16px; font-weight: 800; color: var(--primary); margin: 0; }
.sheet-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.sheet-body { padding: 6px 18px 18px; }
.sheet-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.sheet-row:last-child { border-bottom: 0; }
.sheet-row dt { color: var(--muted); flex-shrink: 0; font-size: 12.5px; }
.sheet-row dd { margin: 0; text-align: left; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px 6px; border-top: 1px solid var(--border); }
.sheet-actions .btn { flex: 1; justify-content: center; }
body.sheet-open { overflow: hidden; }

/* ── منوی کشویی پروفایل در هدر (موبایل) ── */
.user-menu { position: relative; }
.user-menu-btn { background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.user-drop {
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0; min-width: 210px;
    background: var(--card); border: 1px solid var(--border-mid); border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0,0,0,.18); padding: 8px; z-index: 300;
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97);
    transition: opacity .2s var(--ease), transform .22s var(--ease), visibility .22s;
}
.user-menu.open .user-drop { opacity: 1; visibility: visible; transform: none; }
.user-drop::before { content: ''; position: absolute; top: 0; right: 20%; left: 20%; height: 1px; background: var(--neon-line); opacity: .6; }
.user-drop-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-drop-head b { display: block; font-size: 13.5px; }
.user-drop-head span { font-size: 11.5px; color: var(--muted); }
.user-drop-item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px;
    border: 0; background: none; border-radius: 11px; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft); text-align: start;
    transition: background .16s var(--ease), color .16s var(--ease);
}
.user-drop-item:hover { background: var(--primary-soft); color: var(--primary); }
.user-drop-item svg { flex-shrink: 0; }
.user-drop-item .val { margin-inline-start: auto; font-size: 11.5px; color: var(--muted); }
.user-drop form { margin: 0; }

/* در دسکتاپ دکمه‌های تم/زبان مستقیم در هدر می‌مانند */
@media (max-width: 820px) {
    .topbar-right > .theme-btn, .topbar-right > .lang-btn { display: none; }
    .topbar-user-info { display: none; }
    .logout-mini { display: none; }
}
@media (min-width: 821px) {
    .user-drop-item.only-mobile { display: none; }
}

/* آیکن ترون */
.trx-ic { width: 18px; height: 18px; vertical-align: -4px; margin-inline-end: 5px; }
.wallet-field { position: relative; }
.wallet-field input { padding-inline-start: 38px !important; font-family: inherit; }
.wallet-field .trx-badge {
    position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; display: grid; place-items: center; pointer-events: none;
}

/* ── کیف پول ── */
.wallet-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    background: linear-gradient(135deg, var(--primary), #16244A 60%, #24407A);
    color: #fff; border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 16px;
    position: relative; overflow: hidden;
    box-shadow: 0 8px 30px rgba(1,17,53,.28);
}
.wallet-hero::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(62,123,250,.30), transparent 60%);
    pointer-events: none;
}
.wallet-hero-main { display: flex; flex-direction: column; gap: 4px; position: relative; }
.wallet-hero-label { font-size: 13px; opacity: .78; }
.wallet-hero-val { font-size: 34px; font-weight: 800; letter-spacing: .5px; text-shadow: 0 0 26px rgba(120,170,255,.45); }
.wallet-hero-sub { font-size: 12.5px; opacity: .85; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.wallet-hero-ic { opacity: .20; position: relative; flex-shrink: 0; }

.wtx-type { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.wtx-type.in svg  { color: var(--success); }
.wtx-type.out svg { color: var(--danger); }

.wallet-addr-box { background: var(--page); border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 5px; }
.trx-wallet-val { display: inline-flex; align-items: center; gap: 6px; }
.trx-wallet-val code { font-size: 12px; word-break: break-all; direction: ltr; background: none; padding: 0; }
.tiny-input { width: 130px; padding: 5px 8px !important; font-size: 12px !important; border-radius: 8px; margin-inline-end: 4px; }

/* ── دعوت از دوستان ── */
.ref-hero {
    text-align: center; padding: 30px 22px; border-radius: var(--r-lg); margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary), #1B2B52 65%, #2A4785);
    color: #fff; position: relative; overflow: hidden;
    box-shadow: 0 8px 30px rgba(1,17,53,.26);
}
.ref-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(122,92,255,.32), transparent 62%); pointer-events: none; }
.ref-hero-ic { opacity: .9; margin-bottom: 10px; position: relative; }
.ref-hero h2 { font-size: 21px; margin-bottom: 8px; color: #fff; position: relative; }
.ref-hero p { font-size: 13px; opacity: .84; position: relative; }
.ref-code {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; position: relative;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
    border-radius: 14px; padding: 10px 12px 10px 16px; backdrop-filter: blur(4px);
}
.ref-code code { font-size: 19px; font-weight: 800; letter-spacing: 1.5px; direction: ltr; background: none; color: #fff; }
.ref-code .btn { background: #fff; color: var(--primary); border: 0; }
.ref-code .btn.copied { background: var(--success); color: #fff; }

.ref-steps .ref-step { display: flex; gap: 13px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--border); }
.ref-steps .ref-step:last-of-type { border-bottom: 0; }
.ref-num {
    width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
    display: grid; place-items: center; font-weight: 800; font-size: 13.5px; flex-shrink: 0;
}
.ref-step b { display: block; font-size: 14px; margin-bottom: 2px; }
.ref-step span { font-size: 12.5px; color: var(--ink-soft); }

/* پراپ فوری */
.prop-instant {
    display: flex; align-items: center; gap: 9px; margin-top: 8px; padding: 12px 14px;
    background: var(--info-soft); border: 1px solid var(--info); border-radius: 12px;
    color: var(--info); font-size: 13px; font-weight: 600;
}
.prop-instant b { font-weight: 800; }
.prop-instant-toggle { margin: 12px 0; padding: 12px 14px; background: var(--page); border-radius: 12px; align-items: flex-start; }
.prop-bar.compact .prop-bar-track { height: 8px; }

.status-card.welcome { background: linear-gradient(135deg, var(--primary-soft), var(--card)); border-color: var(--accent); }

.c-primary { color: var(--primary); }
.c-muted { color: var(--muted); }

/* ── چیدمان LTR برای زبان انگلیسی ── */
html[lang="en"] body { font-family: 'Estedad', -apple-system, 'Segoe UI', Roboto, sans-serif; }
html[lang="en"] .money, html[lang="en"] code { direction: ltr; }
html[lang="en"] .nav-dot { right: auto; left: 0; border-radius: 0 4px 4px 0; }
html[lang="en"] .sheet-row dd { text-align: right; }
html[lang="en"] .pct { direction: ltr; }
html[lang="en"] .topbar-right { margin-inline-start: auto; }
/* در LTR سایدبار از سمت چپ می‌آید */
@media (max-width: 860px) {
}
.login-lang-switch { display: flex; justify-content: flex-end; margin-bottom: 8px; }

/* ── فونت شمارنده‌ی اعلان‌ها و بج‌ها ── */
.nav-count, .bell-badge, .count-pill, .badge, .m-card .badge {
    font-family: 'Estedad', -apple-system, 'Segoe UI', Tahoma, sans-serif !important;
    font-feature-settings: 'ss02';
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.bell-badge { font-size: 10px; font-weight: 800; letter-spacing: 0; }
.nav-count  { font-size: 11px; font-weight: 800; }

/* ── انتخابگر جستجوپذیر ── */
.ssel { position: relative; }
.ssel-native { position: absolute !important; opacity: 0; pointer-events: none; height: 0; width: 0; }
.ssel-field { position: relative; display: flex; align-items: center; }
.ssel-input {
    width: 100%; padding: 11px 13px !important; padding-inline-end: 32px !important;
    border: 1px solid var(--border-mid); border-radius: var(--r-sm);
    background: var(--card); color: var(--ink); font: inherit; font-size: 14px;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.ssel-input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ssel-caret { position: absolute; inset-inline-end: 12px; color: var(--muted); pointer-events: none; font-size: 11px; transition: transform .2s var(--ease); }
.ssel.open .ssel-caret { transform: rotate(180deg); }
.ssel.err .ssel-input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.ssel-list {
    display: none; position: absolute; top: calc(100% + 5px); inset-inline: 0; z-index: 220;
    background: var(--card); border: 1px solid var(--border-mid); border-radius: 13px;
    box-shadow: 0 12px 34px rgba(0,0,0,.16); max-height: 260px; overflow-y: auto; padding: 5px;
    animation: popIn .18s var(--ease);
}
.ssel.open .ssel-list { display: block; }
.ssel-item { padding: 10px 12px; border-radius: 9px; font-size: 13.5px; cursor: pointer; transition: background .12s var(--ease); }
.ssel-item:hover, .ssel-item.hl { background: var(--primary-soft); color: var(--primary); }
.ssel-item.on { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.ssel-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* آیکن ردیف در کارت موبایل */
.m-card-ic {
    width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
    background: var(--primary-soft); color: var(--primary);
    display: grid; place-items: center;
}
html[data-theme="dark"] .m-card-ic { box-shadow: 0 0 14px rgba(91,140,255,.18); }
.m-card-title { gap: 10px; }

/* چیدمان رسید در صفحات صورتحساب */
.rcp-holder { display: flex; justify-content: center; padding: 6px 0 18px; }
.rcp-admin-grid { align-items: start; }
@media (max-width: 900px) { .rcp-admin-grid { grid-template-columns: 1fr; } }
@media print { .rcp-side, .sidebar, .topbar { display: none !important; } .rcp-admin-grid { display: block; } }
.prop-mini-meta { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 5px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prop-mini-meta b { color: var(--primary); }
.prop-bar.compact { margin: 2px 0 0; }

/* ═══════════ رفع ایرادات نسخه ۱۹ ═══════════ */

/* ── فونت سراسری روی همه‌ی عناصر فرم و کد (ریشه‌ی مشکل نبود فونت) ── */
button, input, select, textarea, optgroup, code, kbd, samp, pre {
    font-family: 'Estedad', -apple-system, 'Segoe UI', Tahoma, sans-serif;
}
code, pre, kbd { font-variant-numeric: tabular-nums; }
.user-menu-btn, .user-menu-btn * { font-family: 'Estedad', Tahoma, sans-serif; }
.topbar-user-info b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.topbar-user-info span { font-size: 11.5px; color: var(--muted); }

/* ── آیکن ترون: SVG واقعی، جای درست ── */
.wallet-field { position: relative; display: block; margin-top: 6px; }
.wallet-field input { padding-inline-start: 42px !important; margin-top: 0 !important; }
.wallet-field .trx-badge {
    position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; display: grid; place-items: center;
    pointer-events: none; z-index: 2;
}
.wallet-field .trx-badge img, .wallet-field .trx-badge svg { width: 20px; height: 20px; display: block; }
.trx-ic { width: 18px; height: 18px; vertical-align: -4px; margin-inline-end: 5px; display: inline-block; }
.trx-wallet-val { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.trx-wallet-val code { font-size: 12px; word-break: break-all; direction: ltr; background: none; padding: 0; }

/* ── کد معرف: فونت درست ── */
.ref-code code {
    font-family: 'Estedad', Tahoma, sans-serif !important;
    font-size: 20px; font-weight: 800; letter-spacing: 2px;
    direction: ltr; background: none; color: #fff; font-variant-numeric: tabular-nums;
}
.ref-hero .stat-mini-val { color: var(--ink); }

/* ── دکمه‌ی زبان با پرچم ── */
.flag-ic {
    width: 20px; height: 14px; border-radius: 2.5px; display: inline-block;
    vertical-align: -2px; object-fit: cover; flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,.10);
}
.lang-btn .flag-ic { margin-inline-end: 2px; }
.lang-inline { display: inline-flex; align-items: center; gap: 7px; }

/* ── ارتقای نوار آمار (مشترک بین هر دو پنل) ── */
.stat-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ss-item {
    position: relative; overflow: hidden;
    border: 1px solid var(--border-mid);
    transition: transform .18s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
    animation: popIn .32s var(--ease) both;
}
.ss-item:nth-child(2) { animation-delay: .04s; }
.ss-item:nth-child(3) { animation-delay: .08s; }
.ss-item:nth-child(4) { animation-delay: .12s; }
.ss-item:nth-child(5) { animation-delay: .16s; }
.ss-item::before {
    content: ''; position: absolute; top: 0; right: 14%; left: 14%; height: 1px;
    background: var(--neon-line); opacity: .5; pointer-events: none;
}
.ss-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: var(--accent); }
.ss-val { direction: ltr; unicode-bidi: plaintext; text-align: start; display: block; }
html[data-theme="dark"] .ss-primary .ss-val { text-shadow: 0 0 18px rgba(91,140,255,.35); }
html[data-theme="dark"] .ss-success .ss-val { text-shadow: 0 0 18px rgba(79,192,141,.30); }
html[data-theme="dark"] .ss-danger .ss-val  { text-shadow: 0 0 18px rgba(240,133,115,.28); }
.ss-default { border-inline-start-color: var(--border-mid); }
@media (max-width: 560px) {
    .ss-item { min-width: calc(50% - 5px); padding: 12px 13px; }
    .ss-val { font-size: 19px; }
}

/* ═══════════ رفع باگ‌های نسخه ۲۳ ═══════════ */

/* ── همبرگر: حذف حاشیه‌ی پیش‌فرض دکمه ── */
button.hamburger, .hamburger {
    background: none !important; border: 0 !important; outline: 0;
    -webkit-appearance: none; appearance: none; box-shadow: none !important;
    color: var(--ink); line-height: 0;
}
button.hamburger:hover, .hamburger:hover { background: var(--page) !important; }
button.hamburger:focus-visible { box-shadow: 0 0 0 3px var(--primary-soft) !important; }
.hamburger span { display: block; }

/* ── badge زنگوله در موبایل: روی خود زنگوله بماند ── */
@media (max-width: 620px) {
    .notif-bell { position: relative; }         /* قبلاً static بود و badge جابه‌جا می‌شد */
    .notif-drop {
        position: fixed; top: 62px; right: 12px; left: 12px; width: auto; max-width: none;
    }
}
.bell-badge { pointer-events: none; z-index: 3; }

/* ── دکمه‌ی تم در منوی کشویی: آیکن‌ها روی هم نیفتند ── */
.user-drop-item.theme-btn { position: relative; }
.user-drop-item .ic-sun, .user-drop-item .ic-moon {
    position: absolute; inset-inline-start: 12px; top: 50%;
    width: 18px; height: 18px; display: grid; place-items: center;
    transform-origin: center;
}
.user-drop-item.theme-btn > span:not(.ic-sun):not(.ic-moon) { margin-inline-start: 28px; }
html:not([data-theme="dark"]) .user-drop-item .ic-moon { transform: translateY(-50%) rotate(-90deg) scale(.4); opacity: 0; }
html:not([data-theme="dark"]) .user-drop-item .ic-sun  { transform: translateY(-50%); opacity: 1; }
html[data-theme="dark"] .user-drop-item .ic-sun  { transform: translateY(-50%) rotate(90deg) scale(.4); opacity: 0; }
html[data-theme="dark"] .user-drop-item .ic-moon { transform: translateY(-50%); opacity: 1; }

/* دکمه‌ی تم در هدر دسکتاپ */
.icon-btn.theme-btn { position: relative; display: grid; place-items: center; }
.icon-btn.theme-btn .ic-sun, .icon-btn.theme-btn .ic-moon {
    position: absolute; top: 50%; left: 50%; margin: -10px 0 0 -10px;
    width: 20px; height: 20px; display: grid; place-items: center;
}
html:not([data-theme="dark"]) .icon-btn.theme-btn .ic-moon { transform: rotate(-90deg) scale(.4); opacity: 0; }
html:not([data-theme="dark"]) .icon-btn.theme-btn .ic-sun  { transform: none; opacity: 1; }
html[data-theme="dark"] .icon-btn.theme-btn .ic-sun  { transform: rotate(90deg) scale(.4); opacity: 0; }
html[data-theme="dark"] .icon-btn.theme-btn .ic-moon { transform: none; opacity: 1; }

/* ── نئون بیشتر ── */
.card::before, .stat::before, .ss-item::before { opacity: .75; height: 1.5px; }
html[data-theme="dark"] .card::before, html[data-theme="dark"] .stat::before,
html[data-theme="dark"] .ss-item::before { opacity: 1; }
.card, .ss-item, .m-card {
    box-shadow: var(--shadow), 0 0 0 1px color-mix(in oklab, var(--neon) 6%, transparent);
}
html[data-theme="dark"] .card, html[data-theme="dark"] .ss-item {
    box-shadow: var(--shadow), 0 0 0 1px color-mix(in oklab, var(--neon) 14%, transparent),
                0 0 26px -12px color-mix(in oklab, var(--neon) 55%, transparent);
}
.page-head h1 {
    background: linear-gradient(95deg, var(--ink) 40%, var(--neon));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
html[data-theme="dark"] .page-head h1 { background: linear-gradient(95deg, var(--ink) 30%, var(--neon-2)); -webkit-background-clip: text; background-clip: text; }
/* بدون تغییر position — سایدبار در موبایل باید fixed بماند */
.sidebar::after {
    content: ''; position: absolute; inset-inline-start: 0; top: 8%; bottom: 8%; width: 1px;
    background: linear-gradient(180deg, transparent, var(--neon), var(--neon-2), transparent);
    opacity: .28; pointer-events: none;
}
html[data-theme="dark"] .sidebar::after { opacity: .5; }
.nav-link.active::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(90deg, color-mix(in oklab, var(--neon) 12%, transparent), transparent 60%);
}
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
    transition: left .55s var(--ease); pointer-events: none;
}
.btn.primary:hover::after { left: 120%; }
/* topbar از قبل position:sticky دارد — دست نمی‌زنیم */
.topbar::after {
    content: ''; position: absolute; bottom: 0; right: 6%; left: 6%; height: 1px;
    background: var(--neon-line); opacity: .35;
}
html[data-theme="dark"] .topbar::after { opacity: .6; }
.b-success, .b-info, .b-warning, .b-danger, .b-primary { position: relative; }
html[data-theme="dark"] .badge { text-shadow: 0 0 10px currentColor; }

/* ── فیلترها در یک ردیف ── */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.filters > label, .filters .ssel, .filters .fld {
    display: flex; flex-direction: column; gap: 5px; min-width: 150px; flex: 1 1 150px; margin: 0;
    font-size: 12px; color: var(--ink-soft);
}
.filters .fld input, .filters > label input, .filters > label select { margin-top: 0 !important; }
.filters .btn { flex: 0 0 auto; }
@media (max-width: 700px) { .filters > label, .filters .ssel, .filters .fld { flex-basis: calc(50% - 5px); min-width: 0; } }

/* ── آیکن کارت موبایل: مطمئن شویم دیده می‌شود ── */
.m-card-ic { width: 34px; height: 34px; }
.m-card-ic svg { width: 17px; height: 17px; display: block; stroke: currentColor; fill: none; }

/* ═══════════ رسید صورتحساب (پرینتر حرارتی) ═══════════ */
.rcp-root {
    --rcp-w: 340px;
    display: flex; flex-direction: column; align-items: center;
    width: 100%; max-width: var(--rcp-w); margin: 0 auto;
    /* برش خروجی تا کاغذ از بیرون کادر نزند */
    /* contain حذف شد — باعث بریدگی می‌شد */
}

/* بدنه‌ی دستگاه — بالاتر از کاغذ */
.rcp-machine {
    position: relative; z-index: 30; width: 100%; overflow: hidden;
    border-radius: 22px; padding: 12px 12px 26px;
    background: linear-gradient(180deg, #22305510, #131E3A 55%, #0C1428);
    background-color: #16213F;
    border: 1px solid #2B3A63;
    box-shadow: 0 18px 34px -20px rgba(1,17,53,.7), inset 0 1px 0 rgba(255,255,255,.10);
}
html[data-theme="dark"] .rcp-machine { background-color: #101A33; border-color: #223055; }
.rcp-machine::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background-image: radial-gradient(circle at 18% 12%, rgba(255,255,255,.07), transparent 45%);
}
.rcp-slot {
    position: absolute; inset-inline: 20px; bottom: 11px; height: 8px; border-radius: 4px;
    background: #04070D; box-shadow: inset 0 2px 5px rgba(0,0,0,.95);
}
.rcp-head { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 4px; }
.rcp-head img { height: 22px; width: auto; }
.rcp-brand { font-size: 11.5px; color: #8FA3C8; }

.rcp-screen {
    position: relative; border-radius: 13px; padding: 13px;
    background: #060B16; border: 1px solid #0A1226; color: #E7EDF8;
    box-shadow: inset 0 0 20px 3px rgba(0,0,0,.7);
}
.rcp-screen::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(120,170,255,.05) 0 1px, transparent 1px 3px);
}
.rcp-screen-inner { position: relative; z-index: 2; }
.rcp-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rcp-line-info { min-width: 0; }
.rcp-line p { margin: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcp-line .sub { font-size: 11px; color: #8FA3C8; margin-top: 2px; }
.rcp-line strong { font-size: 15px; font-weight: 800; color: #fff; direction: ltr; white-space: nowrap; text-shadow: 0 0 14px rgba(110,160,255,.5); }

.rcp-status { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed rgba(143,163,200,.28); }
.rcp-status-ic { width: 18px; height: 18px; display: grid; place-items: center; flex-shrink: 0; color: #8FA3C8; }
.rcp-status-txt { font-size: 11.5px; font-weight: 700; color: #8FA3C8; }
.rcp-status.s-paid .rcp-status-ic, .rcp-status.s-paid .rcp-status-txt { color: #4FC08D; }
.rcp-status.s-unpaid .rcp-status-ic, .rcp-status.s-unpaid .rcp-status-txt { color: #E5A93F; }
.rcp-status.s-expired .rcp-status-ic, .rcp-status.s-expired .rcp-status-txt { color: #94A3B8; }
.rcp-status.s-cancelled .rcp-status-ic, .rcp-status.s-cancelled .rcp-status-txt { color: #8FA3C8; }
/* آیکن در حالت انتظار آرام نبض می‌زند (نه چرخش دائمی) */
.rcp-status.s-unpaid .rcp-status-ic { animation: rcpPulse 1.8s ease-in-out infinite; }
@keyframes rcpPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* خروجی کاغذ — زیر دستگاه */
.rcp-output {
    position: relative; z-index: 10; width: calc(100% - 34px);
    margin-top: -18px; overflow: hidden; padding-bottom: 8px;
}
.rcp-paper-wrap {
    position: relative;
    transform: translateY(-101%);
    transition: transform 1.6s cubic-bezier(.33,1,.68,1);
}
.rcp-root.is-out .rcp-paper-wrap { transform: translateY(0); }
/* حرکت پله‌ای واقعی پرینتر */
.rcp-root.is-feeding .rcp-paper-wrap { animation: rcpFeed 1.7s steps(1,end) forwards; }
@keyframes rcpFeed {
    0%   { transform: translateY(-101%); }
    8%   { transform: translateY(-92%); }  12% { transform: translateY(-92%); }
    20%  { transform: translateY(-81%); }  24% { transform: translateY(-81%); }
    32%  { transform: translateY(-69%); }  36% { transform: translateY(-69%); }
    44%  { transform: translateY(-56%); }  48% { transform: translateY(-56%); }
    56%  { transform: translateY(-42%); }  60% { transform: translateY(-42%); }
    68%  { transform: translateY(-28%); }  72% { transform: translateY(-28%); }
    80%  { transform: translateY(-15%); }  84% { transform: translateY(-15%); }
    92%  { transform: translateY(-5%);  }  96% { transform: translateY(-5%); }
    100% { transform: translateY(0); }
}
/* سایه‌ی شکاف روی کاغذ */
.rcp-output::before {
    content: ''; position: absolute; inset-inline: 0; top: 0; height: 10px; z-index: 5;
    background: linear-gradient(180deg, rgba(3,7,15,.55), transparent); pointer-events: none;
}

.rcp-paper {
    background: #FCFBF7; color: #14202F; padding: 36px 18px 24px;  /* بالای کاغذ زیر بدنه‌ی دستگاه می‌ماند */
    font-family: 'Estedad', Tahoma, sans-serif; direction: rtl;
    background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.012) 0 2px, transparent 2px 4px);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4px),
        97.5% 100%, 95% calc(100% - 4px), 92.5% 100%, 90% calc(100% - 4px), 87.5% 100%, 85% calc(100% - 4px),
        82.5% 100%, 80% calc(100% - 4px), 77.5% 100%, 75% calc(100% - 4px), 72.5% 100%, 70% calc(100% - 4px),
        67.5% 100%, 65% calc(100% - 4px), 62.5% 100%, 60% calc(100% - 4px), 57.5% 100%, 55% calc(100% - 4px),
        52.5% 100%, 50% calc(100% - 4px), 47.5% 100%, 45% calc(100% - 4px), 42.5% 100%, 40% calc(100% - 4px),
        37.5% 100%, 35% calc(100% - 4px), 32.5% 100%, 30% calc(100% - 4px), 27.5% 100%, 25% calc(100% - 4px),
        22.5% 100%, 20% calc(100% - 4px), 17.5% 100%, 15% calc(100% - 4px), 12.5% 100%, 10% calc(100% - 4px),
        7.5% 100%, 5% calc(100% - 4px), 2.5% 100%, 0 calc(100% - 4px));
    box-shadow: 0 8px 20px rgba(1,17,53,.18);
}
.rcp-paper h3 { text-align: center; font-size: 14.5px; font-weight: 800; margin: 0 0 2px; color: #14202F; }
.rcp-sub { text-align: center; font-size: 10.5px; color: #6B7789; margin-bottom: 10px; }
.rcp-hr { border: 0; border-top: 1.5px dashed #C3CBD8; margin: 10px 0; }
.rcp-dl { margin: 0; }
.rcp-dl > div { display: flex; align-items: baseline; gap: 6px; padding: 4px 0; font-size: 12px; }
.rcp-dl dt { color: #6B7789; white-space: nowrap; flex-shrink: 0; }
.rcp-dl dd { margin: 0; font-weight: 700; direction: ltr; white-space: nowrap; flex-shrink: 0; }
.rcp-dots { flex: 1; border-bottom: 1px dotted #C3CBD8; transform: translateY(-3px); min-width: 10px; }
.rcp-total { display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; font-weight: 800; padding: 8px 0 4px; }
.rcp-total .amt { direction: ltr; }
.rcp-items { font-size: 11px; }
.rcp-items .it { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; color: #3C4759; }
.rcp-items .it span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcp-items .it span:last-child { direction: ltr; flex-shrink: 0; }
.rcp-foot { text-align: center; font-size: 10px; color: #6B7789; margin-top: 10px; line-height: 1.9; }
.rcp-barcode { display: flex; gap: 1.5px; justify-content: center; margin: 10px 0 4px; height: 30px; align-items: flex-end; }
.rcp-barcode i { display: block; background: #14202F; }
.rcp-stamp {
    display: inline-block; margin-top: 4px; padding: 3px 11px; border: 2px solid #1E7A52;
    color: #1E7A52; border-radius: 5px; font-size: 11px; font-weight: 800; transform: rotate(-5deg);
}
.rcp-stamp.unpaid { border-color: #C67E14; color: #C67E14; }
.rcp-stamp.expired { border-color: #97A3B4; color: #97A3B4; }
.rcp-stamp.cancelled { border-color: #8B95A7; color: #8B95A7; text-decoration: line-through; }
.rcp-root[data-status="cancelled"] .rcp-paper { filter: grayscale(.5); opacity: .92; }

/* چیدمان در صفحات */
.rcp-holder { display: flex; justify-content: center; padding: 4px 0 16px; width: 100%; overflow: hidden; }
.rcp-admin-grid { align-items: start; }
@media (max-width: 900px) { .rcp-admin-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .rcp-root { --rcp-w: 100%; } .rcp-paper { padding: 32px 14px 22px; } }
@media (prefers-reduced-motion: reduce) {
    .rcp-paper-wrap { transition: none; transform: translateY(0); }
    .rcp-root.is-feeding .rcp-paper-wrap { animation: none; transform: translateY(0); }
    .rcp-status-ic { animation: none !important; }
}
@media print { .rcp-root { display: none; } }

/* ── نوار نصب و به‌روزرسانی PWA ── */
.pwa-bar {
    position: fixed; z-index: 2600; inset-inline: 14px; bottom: 14px;
    display: flex; align-items: center; gap: 11px;
    background: var(--card); border: 1px solid var(--accent); border-radius: 16px;
    padding: 12px 14px; box-shadow: 0 12px 34px rgba(1,17,53,.24);
    opacity: 0; transform: translateY(16px); transition: opacity .3s var(--ease), transform .34s var(--ease);
    max-width: 460px; margin: 0 auto;
}
.pwa-bar.on { opacity: 1; transform: none; }
.pwa-bar::before { content:''; position:absolute; top:0; right:16%; left:16%; height:1.5px; background: var(--neon-line); opacity:.8; }
.pwa-bar img { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; }
.pwa-bar span { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 13px; }
.pwa-bar b { font-size: 13.5px; }
.pwa-bar small { font-size: 11.5px; color: var(--muted); }
.pwa-x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
html[data-theme="dark"] .pwa-bar { box-shadow: 0 12px 34px rgba(0,0,0,.55), 0 0 22px -8px var(--neon); }

/* ══════════ طرح‌ها و درخواست‌ها ══════════ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.plan-card {
    background: var(--card); border: 1px solid var(--border-mid); border-radius: var(--r-lg);
    padding: 18px; position: relative; overflow: hidden;
    transition: transform .18s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
    animation: popIn .34s var(--ease) both;
}
.plan-card::before { content:''; position:absolute; top:0; right:12%; left:12%; height:1.5px; background:var(--neon-line); opacity:.7; }
.plan-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-soft); }
.plan-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.plan-card h3 { font-size: 16px; font-weight: 800; margin: 0 0 2px; color: var(--primary); }
.plan-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.9; margin: 8px 0; }
.plan-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 8px 0 12px; }
.tier-list { display: flex; flex-direction: column; gap: 8px; }
.tier-opt {
    display: flex; flex-direction: column; gap: 2px; text-align: start; width: 100%;
    background: var(--page); border: 1.5px solid var(--border-mid); border-radius: 13px;
    padding: 11px 13px; cursor: pointer; font: inherit; color: var(--ink);
    transition: all .16s var(--ease);
}
.tier-opt:hover { border-color: var(--primary); background: var(--primary-soft); }
.tier-opt.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.tier-opt.on::after { content: '✓'; position: absolute; }
.tier-cap { font-size: 16px; font-weight: 800; color: var(--primary); direction: ltr; }
.tier-fee { font-size: 12px; color: var(--ink-soft); }
.tier-half { font-size: 11.5px; color: var(--muted); }

.pay-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.pay-split > div {
    background: var(--page); border: 1px solid var(--border); border-radius: 12px; padding: 12px;
    display: flex; flex-direction: column; gap: 3px; text-align: center;
}
.pay-split span { font-size: 11.5px; color: var(--muted); }
.pay-split b { font-size: 17px; color: var(--primary); direction: ltr; }
.pay-split small { font-size: 10.5px; color: var(--muted); }
.code-row { display: flex; gap: 8px; margin-top: 6px; }
.code-row input { flex: 1; margin-top: 0 !important; }
.cap-closed { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--warning); background: var(--warning-soft); padding: 8px 12px; border-radius: 10px; }

/* تایم‌لاین درخواست */
.req-card { margin-bottom: 14px; }
.req-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.req-head h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin: 0 0 3px; }
.req-steps { display: flex; align-items: flex-start; gap: 4px; margin: 16px 0; }
.req-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; }
.req-step::before {
    content: ''; position: absolute; top: 13px; right: 50%; left: -50%; height: 2px; background: var(--border-mid); z-index: 0;
}
.req-step:first-child::before { display: none; }
.req-step.done::before, .req-step.now::before { background: var(--primary); }
.req-dot {
    width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
    background: var(--border); color: var(--muted); font-size: 12px; font-weight: 800; z-index: 1; position: relative;
    transition: all .25s var(--ease);
}
.req-step.done .req-dot { background: var(--success); color: #fff; }
.req-step.now .req-dot { background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 4px var(--primary-soft); animation: reqPulse 2s ease-in-out infinite; }
.req-step.fail .req-dot { background: var(--danger); color: #fff; }
@keyframes reqPulse { 0%,100% { box-shadow: 0 0 0 4px var(--primary-soft); } 50% { box-shadow: 0 0 0 8px transparent; } }
.req-lbl { font-size: 11px; color: var(--muted); line-height: 1.5; }
.req-step.now .req-lbl { color: var(--primary); font-weight: 700; }
.req-money { margin: 12px 0; }
@media (max-width: 560px) { .req-lbl { font-size: 10px; } .pay-split { grid-template-columns: 1fr; } }

/* حجم‌ها در پنل ادمین */
.tier-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tier-row:last-of-type { border-bottom: 0; }
.tier-row b { font-size: 14px; color: var(--primary); direction: ltr; display: block; }
.tier-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tier-preview { font-size: 12.5px; color: var(--ink-soft); background: var(--page); border-radius: 10px; padding: 9px 12px; margin: 8px 0; min-height: 18px; }

/* ═══════════ محافظ سرریز افقی و ریسپانسیو ═══════════ */

/* ریشه: هیچ‌وقت پهن‌تر از صفحه نشود */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }

/* کانتینرهای اصلی */
.app { max-width: 100%; overflow-x: clip; }
.content, .main { min-width: 0; max-width: 100%; }

/* ── ریشه‌ی باگ: فرزندان گرید/فلکس به‌صورت پیش‌فرض کوچک نمی‌شوند ── */
.grid2 > *, .grid2-side > *, .grid3 > *, .stats > *, .stat-strip > *,
.main > *, .content > *, .quick-links > *, .plan-grid > * {
    min-width: 0;
}
.grid2, .grid2-side, .grid3, .stats, .plan-grid { max-width: 100%; }

/* کارت‌ها و جدول‌ها هرگز سرریز نکنند */
.card { max-width: 100%; overflow-wrap: anywhere; }
.table-card { overflow: hidden; max-width: 100%; }
.tbl-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-scroll table { min-width: max-content; }
@media (max-width: 820px) { .tbl-scroll table { min-width: 0; } }

/* عناصر بلندِ بدون فاصله (آدرس ولت، کد تراکنش، لینک) */
code, .money, .trx-wallet-val code, .sheet-row dd, .notif-body, .chat-bubble p {
    overflow-wrap: anywhere; word-break: break-word;
}
img, svg, video, canvas { max-width: 100%; }

/* فرم‌ها */
input, select, textarea { max-width: 100%; }
.form-card { max-width: min(780px, 100%); }
.filters { max-width: 100%; }

/* ── نقاط شکست ── */
@media (max-width: 1100px) {
    .grid2-side { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .grid2 { grid-template-columns: 1fr; gap: 0; }
    .grid3 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .plan-grid { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
    .page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .page-head .actions .btn { flex: 1 1 auto; justify-content: center; }
    .rcp-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .stats { grid-template-columns: 1fr; }
    .ss-item { min-width: calc(50% - 5px); }
}

/* ── رسید: بدون contain، همیشه داخل کادر ── */
.rcp-root { contain: none; max-width: min(340px, 100%); }
.rcp-holder { max-width: 100%; overflow: hidden; }
.rcp-output { max-width: 100%; }
.rcp-paper { max-width: 100%; }
.rcp-dl > div { flex-wrap: wrap; }
.rcp-dl dd { min-width: 0; overflow-wrap: anywhere; white-space: normal; }

/* در دسکتاپ رسید کنار جزئیات، بدون فشار به ستون دیگر */
.rcp-admin-grid { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
@media (max-width: 900px) { .rcp-admin-grid { grid-template-columns: 1fr; } }

/* هدر در موبایل جمع‌وجور */
@media (max-width: 620px) {
    .topbar { padding: 10px 12px; gap: 8px; }
    .topbar-right { gap: 6px; margin-inline-start: auto; }
    .page-head h1 { font-size: 20px; }
}

/* ── اعلان‌ها در موبایل: باید آخرین قانون باشد تا بر قوانین قبلی غلبه کند ── */
@media (max-width: 620px) {
    .notif-bell { position: relative; }
    .notif-drop {
        position: fixed !important;
        top: 66px !important; right: 12px !important; left: 12px !important;
        width: auto !important; max-width: none !important;
    }
    .notif-drop-list { max-height: 56vh; }
}

/* ═══════════ اصلاحات نسخه ۲۶ ═══════════ */

/* ── ۱) سایدبار موبایل در حالت انگلیسی (LTR) ── */
@media (max-width: 860px) {
    /* فارسی/RTL: از راست می‌آید */
    .sidebar { inset: 0 0 0 auto; transform: translateX(100%); }
    body.nav-open .sidebar { transform: translateX(0); }

    /* انگلیسی/LTR: باید از چپ بیاید — قبلاً از راست بود و نصفه می‌ماند */
    html[lang="en"] .sidebar { inset: 0 auto 0 0; transform: translateX(-100%); }
    html[lang="en"] body.nav-open .sidebar { transform: translateX(0); }
}

/* ── ۲) نشانگر منوی فعال: در LTR سمت چپ با گوشه‌ی برعکس ── */
html[lang="en"] .nav-dot { right: auto; left: 0; border-radius: 0 4px 4px 0; }

/* ── ۳) فیلترها در یک ردیف (گرید قطعی به‌جای flex-basis) ── */
.filters-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.6fr) minmax(130px, 1fr) minmax(130px, 1fr) auto;
    align-items: end; gap: 10px;
}
.filters-row .fld { display: flex; flex-direction: column; gap: 5px; margin: 0; min-width: 0; font-size: 12px; color: var(--ink-soft); }
.filters-row .fld > span { font-size: 12px; color: var(--ink-soft); }
.filters-row .fld input, .filters-row .fld select { margin-top: 0 !important; width: 100%; }
/* انتخابگر جستجوپذیر داخل فیلتر نباید flex-basis بگیرد */
.filters-row .ssel { display: block; flex: none; min-width: 0; width: 100%; }
.filters-row .ssel-input { width: 100%; }
.filters-row .fld-actions { flex-direction: row; gap: 8px; align-items: stretch; }
.filters-row .fld-actions .btn { white-space: nowrap; }
@media (max-width: 860px) {
    .filters-row { grid-template-columns: 1fr 1fr; }
    .filters-row .fld:first-child { grid-column: 1 / -1; }
    .filters-row .fld-actions { grid-column: 1 / -1; }
    .filters-row .fld-actions .btn { flex: 1; justify-content: center; }
}

/* ── ۴) مهر رسید: رنگ متناسب با وضعیت ── */
.rcp-stamp { border-color: #1E7A52; color: #1E7A52; background: rgba(30,122,82,.06); }
.rcp-stamp.paid      { border-color: #1E7A52; color: #1E7A52; background: rgba(30,122,82,.08); }
.rcp-stamp.unpaid    { border-color: #C67E14; color: #C67E14; background: rgba(198,126,20,.08); }
.rcp-stamp.expired   { border-color: #97A3B4; color: #97A3B4; background: rgba(151,163,180,.08); }
.rcp-stamp.cancelled { border-color: #8B95A7; color: #8B95A7; background: rgba(139,149,167,.08); text-decoration: line-through; }

/* ── ۵) آیکن ردیف‌های شیت جزئیات ── */
.sheet-row { align-items: center; }
.sheet-row dt { display: flex; align-items: center; gap: 8px; }
.sheet-ic {
    width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
    background: var(--primary-soft); color: var(--primary); display: grid; place-items: center;
}
.sheet-ic svg { width: 14px; height: 14px; display: block; stroke: currentColor; fill: none; }
html[data-theme="dark"] .sheet-ic { box-shadow: 0 0 10px rgba(91,140,255,.16); }

/* ── ۶) هشدار طرح بدون حجم ── */
.plan-warn { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--warning);
    background: var(--warning-soft); border-radius: 9px; padding: 8px 11px; margin-top: 8px; }

/* ── آمار اپلیکیشن ── */
.app-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.app-split-item {
    display: flex; align-items: center; gap: 11px; padding: 13px;
    background: var(--page); border: 1.5px solid var(--border-mid); border-radius: 13px;
    transition: all .16s var(--ease);
}
.app-split-item:hover, .app-split-item.on { border-color: var(--primary); background: var(--primary-soft); }
.asi-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--card); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.asi-main { display: flex; flex-direction: column; min-width: 0; }
.asi-main b { font-size: 12.5px; color: var(--ink); }
.asi-num { font-size: 21px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.asi-main small { font-size: 11px; color: var(--muted); }
.split-bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--border); margin: 10px 0 8px; }
.sb-pwa { background: var(--info); }
.split-legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-soft); }
.split-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; }
.lg-pwa { background: var(--info); }
@media (max-width: 560px) { .app-split { grid-template-columns: 1fr; } }

/* ── تب‌های صفحه‌ی درخواست‌ها ── */
.req-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.req-tab {
    display: flex; align-items: center; gap: 7px; padding: 11px 16px;
    background: var(--card); border: 1.5px solid var(--border-mid); border-radius: 13px;
    font-size: 13.5px; font-weight: 700; color: var(--ink-soft); transition: all .16s var(--ease);
}
.req-tab:hover { border-color: var(--accent); color: var(--primary); }
.req-tab.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.req-tab.on .badge { background: rgba(255,255,255,.22); color: #fff; }
@media (max-width: 560px) { .req-tab { flex: 1; justify-content: center; font-size: 12.5px; padding: 10px 12px; } }

/* ── وضعیت درخواست در صفحات اکانت و پراپ ── */
.req-inline { margin-bottom: 12px; border-inline-start: 3px solid var(--info); }
.req-inline-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.req-inline-head > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req-inline .alert { margin: 0; }

/* ═══════════ ناحیه‌ی امن (نوچ، دوربین، نوار خانه) ═══════════ */
/* فقط وقتی اپ به‌صورت نصب‌شده اجرا می‌شود، وگرنه مرورگر خودش فاصله دارد */

/* پس‌زمینه‌ی پشت نوار وضعیت هم‌رنگ صفحه بماند */
@supports (padding: env(safe-area-inset-top)) {
    /* فقط به‌اندازه‌ی ناحیه‌ی امن، بدون فاصله‌ی اضافه */
    .standalone .app {
        padding-top: max(10px, env(safe-area-inset-top));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        padding-inline-start: max(12px, env(safe-area-inset-left));
        padding-inline-end: max(12px, env(safe-area-inset-right));
    }
    .standalone .topbar { top: max(6px, env(safe-area-inset-top)); }

    /* سایدبار موبایل تمام‌قد */
    @media (max-width: 860px) {
        .standalone .sidebar {
            padding-top: calc(16px + env(safe-area-inset-top));
            padding-bottom: calc(16px + env(safe-area-inset-bottom));
        }
    }
    /* شیت پایین‌آمدنی بالای نوار خانه */
    .standalone .sheet { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
    .standalone .pwa-bar { bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* اگر مرورگر safe-area را نشناسد، حداقل فاصله‌ی امن بده */
@supports not (padding: env(safe-area-inset-top)) {
    .standalone .app { padding-top: 22px; }
    .standalone .topbar { top: 10px; }
}

/* صفحات مستقل (ورود/ثبت‌نام) */
@supports (padding: env(safe-area-inset-top)) {
    .standalone .lead-wrap { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

/* ── راهنمای پرداخت کریپتویی ── */
.pay-guide h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pay-amount {
    display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
    background: linear-gradient(135deg, var(--primary), #1B2B52 70%);
    color: #fff; border-radius: var(--r-md); padding: 18px; margin-bottom: 16px;
    position: relative; overflow: hidden;
}
.pay-amount::after { content:''; position:absolute; inset:0; background: radial-gradient(circle at 80% 15%, rgba(62,123,250,.30), transparent 60%); }
.pay-amount span { font-size: 12px; opacity: .8; position: relative; }
.pay-amount b { font-size: 30px; font-weight: 800; direction: ltr; position: relative; text-shadow: 0 0 22px rgba(120,170,255,.5); }
.pay-amount small { font-size: 11px; opacity: .7; position: relative; }

.pay-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 14px; }
.pay-step { display: flex; gap: 12px; align-items: flex-start; }
.pay-step > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pay-step b { font-size: 13.5px; }
.ps-num {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary); color: var(--on-primary);
    display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.pay-wallet {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px;
    background: var(--page); border: 1px dashed var(--accent); border-radius: 11px; padding: 11px 13px;
}
.pay-wallet code {
    flex: 1; min-width: 0; font-size: 12.5px; direction: ltr; word-break: break-all;
    background: none; padding: 0; font-weight: 700; color: var(--ink);
}
.pay-claim { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.pay-claim summary {
    cursor: pointer; font-size: 13px; font-weight: 700; color: var(--primary);
    display: flex; align-items: center; gap: 7px; list-style: none;
}
.pay-claim summary::-webkit-details-marker { display: none; }
.pay-claim summary::after { content: '▾'; margin-inline-start: auto; transition: transform .2s var(--ease); }
.pay-claim[open] summary::after { transform: rotate(180deg); }

/* ═══════════ فیلد آدرس ترون — آیکن داخل فیلد، سمت چپ ═══════════ */
.addr-field { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.addr-label { font-size: 11.5px; color: var(--muted); }
.addr-box {
    display: flex; align-items: center; gap: 9px;
    background: var(--page); border: 1px dashed var(--accent); border-radius: 11px;
    padding: 10px 12px; min-width: 0;
}
.addr-box.compact { padding: 6px 9px; border-style: solid; border-color: var(--border-mid); gap: 6px; }
/* آیکن همیشه سمت چپِ بصری، چون آدرس LTR است */
.addr-ic { order: -1; width: 22px; height: 22px; display: grid; place-items: center; flex-shrink: 0; }
.addr-box.compact .addr-ic { width: 18px; height: 18px; }
.addr-ic img, .addr-ic svg { width: 100%; height: 100%; display: block; margin: 0 !important; }
.addr-box code {
    flex: 1; min-width: 0; direction: ltr; text-align: left;
    font-size: 12.5px; font-weight: 700; color: var(--ink);
    background: none; padding: 0; word-break: break-all; line-height: 1.7;
}
.addr-box.compact code { font-size: 11.5px; font-weight: 600; }
.addr-copy { flex-shrink: 0; }
@media (max-width: 480px) {
    .addr-box { flex-wrap: wrap; }
    .addr-box code { flex-basis: calc(100% - 32px); }
    .addr-copy { margin-inline-start: auto; }
}

/* فیلد ورودی آدرس ترون: آیکن داخل، سمت چپ */
.wallet-field { position: relative; display: block; margin-top: 6px; }
.wallet-field input {
    padding-inline-start: 13px !important;
    padding-inline-end: 13px !important;
    padding-left: 42px !important;          /* همیشه سمت چپ، چون آدرس LTR است */
    direction: ltr; text-align: left;
}
.wallet-field .trx-badge {
    position: absolute; left: 12px; right: auto; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; display: grid; place-items: center; pointer-events: none; z-index: 2;
}
.wallet-field .trx-badge img, .wallet-field .trx-badge svg { width: 20px; height: 20px; display: block; margin: 0 !important; }

/* آیکن ترون درون متن‌ها بدون حاشیه‌ی اضافه */
.trx-ic { vertical-align: -4px; }

/* ── کارت پرداخت از کیف پول ── */
.pay-wallet-card { border: 1px solid var(--accent); margin-bottom: 14px; }
.pwc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pwc-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.pwc-head > div { display: flex; flex-direction: column; gap: 2px; }
.pwc-head b { font-size: 14.5px; }
.pwc-head .small b { color: var(--primary); font-size: 13px; }
html[data-theme="dark"] .pay-wallet-card { box-shadow: var(--shadow), 0 0 22px -10px var(--neon); }

/* ── پیام‌های خودکار (Flash) ── */
.flash-msg {
    position: relative; overflow: hidden; padding-inline-end: 42px !important;
    opacity: 0; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), margin .3s var(--ease);
}
.flash-msg.shown { opacity: 1; transform: none; }
.flash-msg.closing { opacity: 0; transform: translateY(-8px); margin-bottom: -8px; }
.flash-bar {
    position: absolute; bottom: 0; inset-inline-start: 0; height: 3px; width: 100%;
    background: currentColor; opacity: .35; border-radius: 3px;
}
.flash-x {
    position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; font-size: 21px; line-height: 1; cursor: pointer;
    color: currentColor; opacity: .55; padding: 0 4px; transition: opacity .15s var(--ease);
}
.flash-x:hover { opacity: 1; }
.flash-msg:hover .flash-bar { opacity: .55; }

/* ── انتخاب نوع سرمایه در درخواست اکانت ── */
.mode-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.mode-card {
    display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    background: var(--card); border: 2px solid var(--border-mid); border-radius: var(--r-lg);
    padding: 22px 18px; cursor: pointer; font: inherit; color: var(--ink);
    transition: all .18s var(--ease); position: relative; overflow: hidden;
}
.mode-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.mode-card.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 4px var(--primary-soft); }
.mode-card.on::after { content: '✓'; position: absolute; top: 10px; inset-inline-end: 12px; color: var(--primary); font-weight: 800; }
.mc-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.mode-card.on .mc-ic { background: var(--primary); color: var(--on-primary); }
.mode-card b { font-size: 14.5px; }
.mode-card > span:last-child { font-size: 12.5px; color: var(--ink-soft); line-height: 1.9; }

.fund-steps { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.fund-step { display: flex; gap: 11px; align-items: flex-start; }
.fund-step > span {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary-soft); color: var(--primary);
    display: grid; place-items: center; font-weight: 800; font-size: 12.5px;
}
.fund-step b { display: block; font-size: 13.5px; }
.fund-step small { font-size: 12px; color: var(--ink-soft); }

/* ── اکانت آزمایشی ── */
.demo-card { margin-bottom: 14px; border-inline-start: 3px solid var(--info); }
.demo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.demo-head h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin: 0 0 3px; }
.demo-actions { display: flex; align-items: center; gap: 7px; }
.demo-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.demo-figures > div {
    background: var(--page); border-radius: 12px; padding: 13px;
    display: flex; flex-direction: column; gap: 3px; text-align: center;
}
.demo-figures > div > span { font-size: 11.5px; color: var(--muted); }   /* نه span درصد داخل <b> (pct) */
.demo-figures b { font-size: 17px; direction: ltr; }
.demo-log { margin-top: 12px; }
.demo-log summary {
    cursor: pointer; font-size: 13px; font-weight: 700; color: var(--primary);
    display: flex; align-items: center; gap: 7px; list-style: none;
}
.demo-log summary::-webkit-details-marker { display: none; }
.demo-log summary::after { content: '▾'; margin-inline-start: auto; transition: transform .2s var(--ease); }
.demo-log[open] summary::after { transform: rotate(180deg); }
.demo-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.demo-tab {
    flex: 1; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--border-mid);
    background: var(--card); font: inherit; font-size: 13px; font-weight: 700;
    color: var(--ink-soft); cursor: pointer; transition: all .16s var(--ease);
}
.demo-tab.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.demo-quick { display: flex; gap: 7px; flex-wrap: wrap; margin: 8px 0 10px; }
.tier-opt.demo-tier.on { border-color: var(--info); background: var(--info-soft); }
@media (max-width: 560px) { .demo-figures { grid-template-columns: 1fr; } }

/* ── موقعیت پیام‌ها: پایین صفحه، در دسکتاپ پایین سمت چپ ── */
.flash-stack {
    position: fixed; z-index: 3000; display: flex; flex-direction: column; gap: 9px;
    pointer-events: none;
    /* موبایل: پایین، تمام‌عرض با حاشیه */
    left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 700px) {
    .flash-stack {
        /* دسکتاپ: بالا سمت چپ، زیر نوار بالا — پایین صفحه روی محتوا می‌افتاد و دیده نمی‌شد */
        right: auto; left: 22px; bottom: auto; top: 92px; width: 360px; max-width: calc(100vw - 44px);
    }
    /* از بالا پایین بیاید؛ html جلوی قاعده‌های پایه‌ی بعدی را می‌گیرد */
    html .flash-stack .flash-msg { transform: translateY(-14px); }
    html .flash-stack .flash-msg.shown { transform: none; }
    html .flash-stack .flash-msg.closing { transform: translateY(-14px) scale(.97); }
}
.flash-stack .flash-msg {
    pointer-events: auto; margin: 0 !important; width: 100%;
    box-shadow: 0 10px 32px rgba(1,17,53,.22);
    border-radius: 14px; font-size: 13.5px; padding: 13px 42px 13px 15px !important;
    transform: translateY(14px);
}
html[dir="ltr"] .flash-stack .flash-msg { padding: 13px 15px 13px 42px !important; }
.flash-stack .flash-msg.shown { transform: none; }
.flash-stack .flash-msg.closing { transform: translateY(14px) scale(.97); }
html[data-theme="dark"] .flash-stack .flash-msg { box-shadow: 0 10px 32px rgba(0,0,0,.55); }
/* پیام داخل پشته جای خودش را از پشته می‌گیرد. در پنل مدیریت کلاس قدیمی .toast هم روی پیام است
   (fixed + top/left:20px + max-width)؛ آن فاصله‌ها پیام را در موبایل ۲۰ پیکسل به راست هل می‌داد
   و از لبه‌ی صفحه بیرون می‌زد. */
.flash-stack .flash-msg {
    position: relative !important; inset: auto !important;
    max-width: none !important; box-sizing: border-box; z-index: auto;
}

/* ── میان‌برهای خرید در داشبورد ── */
.quick-buy { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.qb-card {
    display: flex; align-items: center; gap: 12px; padding: 16px 18px;
    background: var(--card); border: 1px solid var(--border-mid); border-radius: var(--r-lg);
    position: relative; overflow: hidden; transition: all .18s var(--ease);
    box-shadow: var(--shadow);
}
.qb-card::before { content:''; position:absolute; top:0; right:14%; left:14%; height:1.5px; background: var(--neon-line); opacity:.7; }
.qb-card:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow-soft); }
.qb-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.qb-card:hover .qb-ic { background: var(--primary); color: var(--on-primary); }
.qb-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.qb-txt b { font-size: 14.5px; color: var(--ink); }
.qb-txt small { font-size: 11.5px; color: var(--muted); }
.qb-go { color: var(--muted); flex-shrink: 0; transition: transform .2s var(--ease); }
.qb-card:hover .qb-go { transform: translateX(-4px); color: var(--primary); }
html[lang="en"] .qb-card:hover .qb-go { transform: translateX(4px) rotate(180deg); }
html[lang="en"] .qb-go { transform: rotate(180deg); }
html[data-theme="dark"] .qb-card { box-shadow: var(--shadow), 0 0 20px -12px var(--neon); }
@media (max-width: 620px) { .quick-buy { grid-template-columns: 1fr; gap: 10px; } .qb-card { padding: 14px; } }

/* ── نوار مراحل سفارش ── */
.order-steps { display: flex; align-items: flex-start; gap: 4px; margin: 0 0 18px; }
.os-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; }
.os-step::before {
    content: ''; position: absolute; top: 14px; right: 50%; left: -50%; height: 2px;
    background: var(--border-mid); z-index: 0;
}
.os-step:first-child::before { display: none; }
.os-step.done::before, .os-step.now::before { background: var(--primary); }
.os-dot {
    width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center;
    background: var(--border); color: var(--muted); font-size: 12.5px; font-weight: 800;
    z-index: 1; position: relative; transition: all .25s var(--ease);
}
.os-step.done .os-dot { background: var(--success); color: #fff; }
.os-step.now .os-dot { background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.os-lbl { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.os-step.now .os-lbl { color: var(--primary); font-weight: 700; }
@media (max-width: 520px) { .os-lbl { font-size: 10px; } .os-dot { width: 26px; height: 26px; font-size: 11.5px; } }

/* ═══════════ گفتگوی تیکت (سبک چت) ═══════════ */
.chat {
    display: flex; flex-direction: column; gap: 14px;
    background: var(--page); border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 18px 16px; max-height: 62vh; overflow-y: auto; margin-bottom: 14px;
    scroll-behavior: smooth;
}
.chat-msg { display: flex; max-width: 100%; }
.chat-msg.mine   { justify-content: flex-start; }   /* پیام خودم: سمت شروع */
.chat-msg.theirs { justify-content: flex-end; }     /* طرف مقابل: سمت پایان */

.chat-bubble {
    position: relative; max-width: 76%; min-width: 130px;
    padding: 12px 15px 26px; border-radius: 16px;
    font-size: 13.5px; line-height: 2; word-break: break-word;
    box-shadow: 0 2px 10px rgba(1,17,53,.08);
    animation: popIn .26s var(--ease) both;
}
/* پیام خودم — سورمه‌ای پررنگ */
.chat-msg.mine .chat-bubble {
    background: linear-gradient(135deg, var(--primary), #1B2B52);
    color: #fff; border-end-start-radius: 5px;
}
.chat-msg.mine .chat-who { color: rgba(255,255,255,.72); }
.chat-msg.mine time { color: rgba(255,255,255,.6); }
.chat-msg.mine .chat-att { color: #CFE0FF; border-color: rgba(255,255,255,.28); }
/* پیام طرف مقابل — روشن */
.chat-msg.theirs .chat-bubble {
    background: var(--card); color: var(--ink);
    border: 1px solid var(--border-mid); border-end-end-radius: 5px;
}
.chat-msg.theirs .chat-who { color: var(--primary); }
html[data-theme="dark"] .chat-msg.theirs .chat-bubble { background: var(--card); }

.chat-who { font-size: 11.5px; font-weight: 800; margin-bottom: 5px; }
.chat-bubble p { margin: 0; }
.chat-bubble time {
    position: absolute; inset-inline-end: 14px; bottom: 7px;
    font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr;
}
.chat-att {
    display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
    font-size: 12px; padding: 5px 10px; border: 1px solid var(--border-mid);
    border-radius: 9px; text-decoration: none;
}
.chat-form { display: flex; flex-direction: column; gap: 10px; }
/* روز جداکننده */
.chat-day { align-self: center; font-size: 11px; color: var(--muted);
    background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 4px 14px; }
@media (max-width: 620px) { .chat-bubble { max-width: 88%; } .chat { padding: 14px 11px; max-height: 55vh; } }

/* ── چیدمان صفحه‌ی تیکت: ستون کناری نریزد ── */
.ticket-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 16px; align-items: start; }
.ticket-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: sticky; top: 90px; }
.ticket-side .card { margin: 0; }
@media (max-width: 1000px) {
    .ticket-grid { grid-template-columns: 1fr; }
    .ticket-side { position: static; }
}
/* انتخابگر جستجوپذیر در ستون کناری نباید بیرون بزند */
.ticket-side .ssel { position: relative; }
.ticket-side .ssel-list { max-height: 220px; }

/* شناسه‌ی تیکت */
.tk-code {
    display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
    background: var(--primary-soft); color: var(--primary);
    padding: 4px 10px; border-radius: 8px; direction: ltr; font-variant-numeric: tabular-nums;
}

/* کارت کیف پول در داشبورد */
.dash-wallet { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; transition: all .18s var(--ease); }
.dash-wallet:hover { border-color: var(--primary); transform: translateY(-2px); }
.dw-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.dw-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.dw-txt b { font-size: 14px; } .dw-txt small { font-size: 11.5px; color: var(--muted); }
.dw-val { font-size: 20px; font-weight: 800; color: var(--primary); direction: ltr; }

/* ══════════ دعوت از دوستان — لینک و جدول امتیاز ══════════ */
.ref-link {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; position: relative;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24);
    border-radius: 14px; padding: 11px 12px; backdrop-filter: blur(4px);
}
.ref-link code {
    flex: 1; min-width: 0; direction: ltr; text-align: left; word-break: break-all;
    font-size: 13px; font-weight: 700; color: #fff; background: none; padding: 0; line-height: 1.7;
}
.ref-link .btn { background: #fff; color: var(--primary); border: 0; flex-shrink: 0; }
.ref-link .btn.copied { background: var(--success); color: #fff; }

.ref-share { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; position: relative; }
.rs-btn {
    font: inherit; font-size: 12.5px; font-weight: 700; padding: 9px 20px; border-radius: 11px;
    border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.10); color: #fff;
    cursor: pointer; text-decoration: none; transition: all .16s var(--ease);
}
.rs-btn:hover { background: rgba(255,255,255,.20); transform: translateY(-1px); }
.ref-code-hint { font-size: 12px; opacity: .72; margin-top: 12px; position: relative; }
.ref-code-hint b { direction: ltr; }

/* فیلد قفل‌شده‌ی معرف در ثبت‌نام */
.ref-locked { background: var(--success-soft) !important; border-color: var(--success) !important; font-weight: 700; }

/* ── جدول امتیاز ── */
.lb-card { margin-bottom: 14px; }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lb-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.lb-me-rank {
    font-size: 12.5px; font-weight: 700; color: var(--primary);
    background: var(--primary-soft); padding: 6px 13px; border-radius: 10px;
}
.lb-me-rank b { font-size: 15px; }
.lb-list { display: flex; flex-direction: column; gap: 7px; }
.lb-row {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px;
    background: var(--page); border: 1px solid var(--border); border-radius: 12px;
    transition: transform .16s var(--ease);
    animation: popIn .3s var(--ease) both;
}
.lb-row:hover { transform: translateX(-3px); }
.lb-rank {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 14px; font-weight: 800;
    background: var(--border); color: var(--ink-soft);
}
.lb-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-you { color: var(--primary); font-size: 12px; }
.lb-count { font-size: 13px; font-weight: 800; color: var(--primary); flex-shrink: 0; }
.lb-count small { font-size: 10.5px; font-weight: 500; color: var(--muted); }

/* سه نفر برتر */
.lb-row.r1, .lb-row.r2, .lb-row.r3 { border-width: 1.5px; }
.lb-row.r1 {
    background: linear-gradient(135deg, #FFF6DE, var(--card)); border-color: #E3B84B;
    box-shadow: 0 3px 16px -6px rgba(227,184,75,.55);
}
.lb-row.r2 { background: linear-gradient(135deg, #F2F4F8, var(--card)); border-color: #B9C2CF; }
.lb-row.r3 { background: linear-gradient(135deg, #FBEFE4, var(--card)); border-color: #CDA07A; }
.lb-row.r1 .lb-rank, .lb-row.r2 .lb-rank, .lb-row.r3 .lb-rank { background: transparent; font-size: 22px; }
.lb-row.r1 .lb-name { font-size: 15.5px; font-weight: 800; }
.lb-row.r2 .lb-name { font-size: 14.5px; font-weight: 800; }
.lb-row.r3 .lb-name { font-size: 14px; font-weight: 800; }
.lb-row.r1 .lb-count { font-size: 16px; }
html[data-theme="dark"] .lb-row.r1 { background: linear-gradient(135deg, #3A310F, var(--card)); }
html[data-theme="dark"] .lb-row.r2 { background: linear-gradient(135deg, #23282F, var(--card)); }
html[data-theme="dark"] .lb-row.r3 { background: linear-gradient(135deg, #33261C, var(--card)); }

.lb-row.is-me { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.lb-outside { margin-top: 10px; border-style: dashed; }

/* طرح دوم در فهرست مراحل */
.ref-plan2 {
    display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px;
    background: var(--info-soft); border: 1px solid var(--info); border-radius: 13px;
}
.rp-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--info); color: #fff;
    display: grid; place-items: center; flex-shrink: 0; }
.ref-plan2 b { display: block; font-size: 13.5px; color: var(--info); margin-bottom: 3px; }
.ref-plan2 span { font-size: 12.5px; color: var(--ink-soft); line-height: 2; }
@media (max-width: 520px) { .ref-link code { flex-basis: 100%; font-size: 12px; } }

/* ── دعوت از دوستان: اصلاحات چیدمان ── */
.ref-hero { display: block; }               /* محافظ در برابر ارث‌بری flex از والد */
.ref-hero > * { position: relative; z-index: 1; }
.lb-card, .ref-steps, .ref-hero { width: 100%; }

/* جدول امتیاز در موبایل */
@media (max-width: 560px) {
    .lb-row { padding: 10px 11px; gap: 9px; }
    .lb-rank { width: 30px; height: 30px; font-size: 13px; }
    .lb-row.r1 .lb-rank, .lb-row.r2 .lb-rank, .lb-row.r3 .lb-rank { font-size: 19px; }
    .lb-name { font-size: 12.5px; }
    .lb-row.r1 .lb-name { font-size: 13.5px; }
    .lb-count { font-size: 12px; }
    .lb-head { gap: 8px; }
    .lb-me-rank { font-size: 11.5px; padding: 5px 11px; }
    .ref-hero { padding: 24px 16px; }
    .ref-hero h2 { font-size: 17px; line-height: 1.9; }
    .ref-hero p { font-size: 12.5px; }
    .ref-share { gap: 6px; }
    .rs-btn { padding: 8px 14px; font-size: 12px; }
    .ref-plan2 { flex-direction: column; gap: 9px; }
}

/* ═══════════ طرح پرایم ═══════════ */
.sec-title { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 9px; margin: 22px 0 14px; }
.sec-title:first-of-type { margin-top: 4px; }

/* ── شبکه‌ی صندوق‌ها ── */
.chest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 8px; }

.chest {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 22px 16px 16px; border-radius: var(--r-lg); overflow: hidden;
    background: var(--card); border: 1.5px solid var(--border-mid);
    box-shadow: var(--shadow); transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
    text-decoration: none; color: var(--ink);
    animation: chestIn .45s var(--ease) both;
}
@keyframes chestIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.chest-grid .chest:nth-child(2) { animation-delay: .07s; }
.chest-grid .chest:nth-child(3) { animation-delay: .14s; }
.chest-grid .chest:nth-child(4) { animation-delay: .21s; }
.chest-grid .chest:nth-child(n+5) { animation-delay: .28s; }

.chest:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); }

/* حالت فعال — طلایی و درخشان */
.chest.live { border-color: #D9AE4E; }
.chest.live::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 50% 8%, rgba(224,177,74,.20), transparent 62%);
}
.chest-glow {
    position: absolute; top: -46px; left: 50%; transform: translateX(-50%);
    width: 168px; height: 168px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(232,190,102,.42), transparent 68%);
    animation: chestPulse 3.4s ease-in-out infinite;
}
@keyframes chestPulse { 0%,100% { opacity: .55; transform: translateX(-50%) scale(1); }
                        50%     { opacity: .95; transform: translateX(-50%) scale(1.12); } }

/* حالت بسته و پایان‌یافته */
.chest.closed { opacity: .82; }
.chest.done { border-color: var(--border-mid); background: linear-gradient(160deg, var(--page), var(--card)); }
.chest.done .chest-svg { filter: grayscale(.35) brightness(.96); }

/* ── تصویر صندوق ── */
.chest-art { display: block; width: 108px; margin-bottom: 2px; position: relative; }
.chest-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ch-fill  { fill: #B9812C; }
.ch-belt  { fill: #E8BE66; }
.ch-lock  { fill: #F0D48C; }
.ch-hole  { fill: #7A5417; }
.ch-coins ellipse { fill: #F5D889; opacity: 0; }
.ch-rays  path { fill: #FFE9A8; opacity: 0; }
.ch-lid   { transform-origin: 13px 44px; transition: transform .5s cubic-bezier(.34,1.4,.5,1); }

html[data-theme="dark"] .ch-fill { fill: #9A6A22; }
html[data-theme="dark"] .ch-belt { fill: #D9AE4E; }

/* صندوق فعال: تکان خوردن و باز شدن با hover */
.chest.live .chest-svg { animation: chestWiggle 4.5s ease-in-out infinite; }
@keyframes chestWiggle {
    0%, 88%, 100% { transform: rotate(0deg); }
    91% { transform: rotate(-3.5deg); }
    94% { transform: rotate(3.5deg); }
    97% { transform: rotate(-1.5deg); }
}
.chest.live:hover .ch-lid { transform: rotate(-30deg); }
.chest.live:hover .ch-coins ellipse { opacity: 1; animation: coinPop .45s var(--ease) both; }
.chest.live:hover .ch-coins ellipse:nth-child(2) { animation-delay: .07s; }
.chest.live:hover .ch-coins ellipse:nth-child(3) { animation-delay: .13s; }
.chest.live:hover .ch-rays path { opacity: .9; animation: rayUp .5s var(--ease) both; }
@keyframes coinPop { from { opacity: 0; transform: translateY(9px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes rayUp   { from { opacity: 0; transform: translateY(7px); } to { opacity: .9; transform: none; } }

/* صندوق پایان‌یافته: همیشه باز */
.chest.done .ch-lid { transform: rotate(-30deg); }
.chest.done .ch-coins ellipse { opacity: .95; }

/* ── متن‌های صندوق ── */
.chest-name { font-size: 15.5px; font-weight: 800; text-align: center; line-height: 1.7; }
.chest-price { font-size: 21px; font-weight: 800; color: var(--primary); direction: ltr; display: flex; align-items: baseline; gap: 5px; }
.chest-price small { font-size: 11px; font-weight: 600; color: var(--muted); }
.chest-est { font-size: 11.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.chest-est b { color: var(--success); font-size: 13.5px; font-weight: 800; }
.chest-final { font-size: 24px; font-weight: 800; display: flex; flex-direction: column; align-items: center; direction: ltr; }
.chest-final small { font-size: 10.5px; font-weight: 600; color: var(--muted); direction: rtl; }
.chest-final.up { color: var(--success); }
.chest-final.down { color: var(--danger); }

.chest-timer {
    font-size: 13px; font-weight: 800; direction: ltr; letter-spacing: .5px;
    display: inline-flex; align-items: baseline; gap: 1px;
    background: var(--page); border-radius: 9px; padding: 5px 12px; color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.chest-timer.urgent { background: var(--danger-soft); color: var(--danger); animation: urgentBlink 1.6s ease-in-out infinite; }
@keyframes urgentBlink { 0%,100% { opacity: 1; } 50% { opacity: .62; } }
/* طرح منتشرشده‌ای که پذیره‌نویسی‌اش هنوز شروع نشده */
.chest.soon { border-color: var(--info); }
.chest-soon-lbl { font-size: 11px; font-weight: 700; color: var(--info); margin-bottom: -4px; }
.chest-timer.soon, .chest-timer.soon.urgent { background: var(--info-soft); color: var(--info); animation: none; }
.pd-timer-card.soon { border: 1px solid var(--info); }
/* تایمر «پایان طرح و اجرای آن» — آرام، بدون چشمک قرمزِ «کمتر از یک روز» */
.pd-timer-card.run .pdt-label > span { display: flex; flex-direction: column; gap: 3px; }
.pd-timer-card.run .pdt-label small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
/* قرمزِ «کمتر از یک روز» فقط برای پایان پذیره‌نویسی است؛ شروع و پایان اجرا هشدار نیستند */
.pd-timer-card.run .pd-timer.urgent .pdt-unit, .pd-timer-card.soon .pd-timer.urgent .pdt-unit { background: var(--primary); }
.pd-timer-card.soon .pdt-label { color: var(--info); }
.pd-timer-card.soon .pdt-label > span { display: flex; flex-direction: column; gap: 3px; }
.pd-timer-card.soon .pdt-label small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.chest-timer.closed-lbl { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

.chest-prog { width: 100%; height: 7px; background: var(--border); border-radius: 5px; overflow: hidden; margin-top: 4px; }
.chest-prog i {
    display: block; height: 100%; border-radius: 5px;
    background: linear-gradient(90deg, #D9AE4E, #F0D48C);
    animation: fillBar 1s var(--ease) both; position: relative;
}
.chest.done .chest-prog i { background: linear-gradient(90deg, var(--success), #6FD3A5); }
@keyframes fillBar { from { width: 0 !important; } }
.chest-meta { display: flex; justify-content: space-between; width: 100%; font-size: 11px; color: var(--muted); }
.chest-badge {
    position: absolute; top: 11px; inset-inline-start: 11px;
    font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 7px;
    background: var(--success-soft); color: var(--success);
}

/* ── صفحه‌ی جزئیات ── */
.pd-hero {
    display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--primary), #1B2B52 72%);
    color: #fff; border-radius: var(--r-lg); padding: 26px 26px; margin-bottom: 14px;
    position: relative; overflow: hidden;
}
.pd-hero::after { content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 88% 12%, rgba(232,190,102,.30), transparent 58%); }
.pd-hero.done { background: linear-gradient(135deg, #14361F, #0C2416 72%); }
.pd-chest { width: 118px; flex-shrink: 0; position: relative; z-index: 1; }
.pd-chest .ch-lid { transform: rotate(-30deg); }
.pd-chest .ch-coins ellipse { opacity: 1; }
.pd-chest .ch-rays path { opacity: .85; }
.pd-info { flex: 1; min-width: 220px; position: relative; z-index: 1; }
.pd-code { font-size: 11.5px; opacity: .7; direction: ltr; letter-spacing: 1px; }
.pd-info h2 { color: #fff; font-size: 24px; margin: 3px 0 14px; }
.pd-figs { display: flex; gap: 26px; flex-wrap: wrap; }
.pd-figs > div { display: flex; flex-direction: column; gap: 2px; }
/* فقط برچسب (span مستقیم)؛ قبلاً «.pd-figs span» به span خودِ pct() داخل <b> هم می‌خورد و درصد سود ۱۱٫۵px و کم‌رنگ می‌شد */
.pd-figs > div > span { font-size: 11.5px; opacity: .72; }
.pd-figs b { font-size: 20px; direction: ltr; }
.pd-figs b.up { color: #7FE3B0; } .pd-figs b.down { color: #FF9C8A; }

/* تایمر بزرگ */
.pd-timer-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pdt-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.pd-timer { display: flex; gap: 9px; direction: ltr; }
.pdt-unit {
    display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px;
    background: var(--primary); color: var(--on-primary); border-radius: 12px; padding: 9px 6px;
}
.pdt-unit b { font-size: 22px; font-weight: 800; direction: ltr; font-variant-numeric: tabular-nums; }
.pdt-unit small { font-size: 10px; opacity: .75; }
.pd-timer.urgent .pdt-unit { background: var(--danger); }

/* نوار پیشرفت جزئیات */
.pd-prog { margin-top: 4px; }
.pdp-bar { height: 13px; background: var(--border); border-radius: 8px; overflow: hidden; }
.pdp-bar span {
    display: block; height: 100%; border-radius: 8px;
    background: linear-gradient(90deg, #D9AE4E, #F0D48C, #D9AE4E);
    background-size: 200% 100%; animation: fillBar 1.1s var(--ease) both, shimmer 2.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.pdp-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 9px; font-size: 12.5px; color: var(--ink-soft); }
.pdp-meta b { color: var(--primary); }
.pd-desc { font-size: 13.5px; line-height: 2.2; color: var(--ink-soft); }

/* خرید */
.pd-buy { border: 1.5px solid var(--primary); }
.pd-wallet {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--page); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px;
}
.pd-wallet span { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.pd-wallet b { font-size: 17px; color: var(--primary); direction: ltr; }
.pd-stepper { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pds-btn {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; cursor: pointer;
    border: 1.5px solid var(--border-mid); background: var(--card);
    font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1;
}
.pds-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.pd-stepper input { flex: 1; text-align: center; font-size: 19px !important; font-weight: 800; margin: 0 !important; }
.pd-quick { display: flex; gap: 7px; flex-wrap: wrap; margin: 10px 0 14px; }
.pd-total {
    display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
    background: linear-gradient(135deg, var(--primary), #1B2B52); color: #fff;
    border-radius: 14px; padding: 16px; margin-bottom: 12px;
}
.pd-total span { font-size: 12px; opacity: .8; }
.pd-total b { font-size: 30px; font-weight: 800; direction: ltr; text-shadow: 0 0 20px rgba(232,190,102,.5); }
.pd-total small { font-size: 11.5px; opacity: .72; }
.pd-mine { border-inline-start: 3px solid var(--success); }
.pd-final { text-align: center; padding: 30px 20px; }
.pdf-ic { display: inline-grid; place-items: center; width: 66px; height: 66px; border-radius: 50%;
    background: var(--success-soft); color: var(--success); margin-bottom: 12px; }
.pd-final h2 { justify-content: center; margin-bottom: 8px; }
.pd-final p { font-size: 13.5px; color: var(--ink-soft); line-height: 2.1; }

/* نوار پیشرفت کوچک در پنل مدیریت */
.prog-mini { height: 7px; background: var(--border); border-radius: 5px; overflow: hidden; margin-bottom: 4px; }
.prog-mini span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #D9AE4E, #F0D48C); }
.prime-adm-prog { margin-top: 6px; }
.pap-bar { height: 11px; background: var(--border); border-radius: 7px; overflow: hidden; }
.pap-bar span { display: block; height: 100%; background: linear-gradient(90deg, #D9AE4E, #F0D48C); border-radius: 7px; }
.pap-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--ink-soft); }

/* برچسب new در منو */
.nav-new {
    font-size: 9.5px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px; border-radius: 6px;
    background: linear-gradient(135deg, #D9AE4E, #F0D48C); color: #4A3208;
    margin-inline-start: auto; flex-shrink: 0; animation: newPulse 2.4s ease-in-out infinite;
}
@keyframes newPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(217,174,78,.55); } 55% { box-shadow: 0 0 0 6px rgba(217,174,78,0); } }

@media (max-width: 560px) {
    .chest-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .chest { padding: 16px 10px 12px; }
    .chest-art { width: 78px; }
    .chest-name { font-size: 13px; }
    .chest-price { font-size: 17px; }
    .chest-timer { font-size: 11.5px; padding: 4px 8px; }
    .pd-hero { padding: 20px 16px; gap: 14px; justify-content: center; text-align: center; }
    .pd-chest { width: 92px; }
    .pd-info h2 { font-size: 19px; }
    .pd-figs { justify-content: center; gap: 18px; }
    .pdt-unit { min-width: 48px; padding: 7px 4px; }
    .pdt-unit b { font-size: 18px; }
    .pd-timer-card { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .chest-glow, .chest.live .chest-svg, .chest-timer.urgent, .nav-new, .pdp-bar span { animation: none !important; }
}

/* ── صفحه‌ی آمار ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.sec-card h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sub-h { font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 8px;
    padding-top: 10px; border-top: 1px solid var(--border); }
.srow { display: grid; grid-template-columns: 1fr 80px auto; gap: 10px; align-items: center;
    padding: 7px 0; font-size: 12.5px; }
.srow > span:first-child { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow b { font-size: 13px; text-align: end; }
.sbar { display: block; height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.sbar i { display: block; height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    animation: fillBar .8s var(--ease) both; }
.rate-box { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--page); border-radius: 11px; padding: 12px 14px; margin-top: 12px; font-size: 13px; }
.rate-box b { font-size: 19px; }
.rank-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px;
    background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 800;
    margin-inline-end: 6px; }
.plan-row { grid-template-columns: 1fr auto; row-gap: 2px; }
.plan-row small { display: block; font-weight: 500; }
.prime-sec { border-inline-start: 3px solid #D9AE4E; }
.trend { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 8px; }
.tr-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.tr-col b { font-size: 12px; color: var(--primary); }
.tr-col i { width: 100%; max-width: 42px; border-radius: 7px 7px 0 0;
    background: linear-gradient(180deg, var(--accent), var(--primary));
    animation: growUp .7s var(--ease) both; }
@keyframes growUp { from { height: 0 !important; } }
.tr-col small { font-size: 10.5px; color: var(--muted); }
.info-text { color: var(--info); }
.warning-text { color: var(--warning); }
@media (max-width: 560px) { .stats-grid { grid-template-columns: 1fr; } .srow { grid-template-columns: 1fr 56px auto; } }

/* ── دکمه‌ی پرایم در داشبورد ── */
.qb-prime {
    border-color: #D9AE4E; background: linear-gradient(135deg, #FFF8E8, var(--card));
    margin-bottom: 12px; position: relative; overflow: hidden;
    animation: newPulse 2.6s ease-in-out infinite;
}
html[data-theme="dark"] .qb-prime { background: linear-gradient(135deg, #322708, var(--card)); }
.qb-prime .qb-ic { background: linear-gradient(135deg, #D9AE4E, #F0D48C); color: #4A3208; }
.qb-prime:hover { border-color: #C79A32; transform: translateY(-2px); }
.qbp-shine { position: absolute; top: 0; bottom: 0; width: 42%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
    animation: shineMove 3.2s ease-in-out infinite; }
@keyframes shineMove { 0% { inset-inline-start: -45%; } 60%, 100% { inset-inline-start: 110%; } }
.qbp-tag { font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; vertical-align: middle;
    background: linear-gradient(135deg, #D9AE4E, #F0D48C); color: #4A3208; margin-inline-start: 6px; }

/* ── محاسبه‌گر سود ── */
.pcalc { background: var(--page); border: 1.5px solid var(--border-mid); border-radius: var(--r-md);
    padding: 15px; margin-bottom: 12px; transition: transform .2s var(--ease); }
.pcalc.bump { animation: calcBump .32s var(--ease); }
@keyframes calcBump { 50% { transform: scale(1.015); } }
.pcalc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pcalc-ic { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center;
    background: linear-gradient(135deg, #D9AE4E, #F0D48C); color: #4A3208; }
.pcalc-head b { display: block; font-size: 13.5px; }
.pcalc-head small { font-size: 11.5px; color: var(--muted); }
.pcalc-rows { display: flex; flex-direction: column; gap: 7px; }
.pcr { display: flex; align-items: center; gap: 9px; padding: 9px 11px; background: var(--card);
    border-radius: 10px; font-size: 12.5px; }
.pcr-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.pcr-cap { background: var(--info-soft); color: var(--info); }
.pcr-pro { background: var(--success-soft); color: var(--success); }
.pcr-tot { background: linear-gradient(135deg, #D9AE4E, #F0D48C); color: #4A3208; }
.pcr-lbl { flex: 1; color: var(--ink-soft); }
.pcr b { font-size: 15px; direction: ltr; }
.pcr.up b { color: var(--success); }
.pcr.total { background: var(--primary); color: #fff; }
.pcr.total .pcr-lbl { color: rgba(255,255,255,.82); }
.pcr.total b { font-size: 17px; color: #fff; }
.pcalc-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.pcalc-foot span { display: flex; align-items: center; gap: 5px; }
.pcalc-foot b { color: var(--ink); }
.pcalc-note { font-size: 11px; color: var(--muted); line-height: 1.9; margin-top: 10px; }
.req-cancel { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .qbp-shine, .qb-prime { animation: none !important; } }

/* ═══════════ گردونه‌ی شانس ═══════════ */
.wheel-page { max-width: 560px; margin: 0 auto; }

.wp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wp-back { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
    background: var(--card); border: 1px solid var(--border-mid); color: var(--ink); }
.wp-back:hover { border-color: var(--primary); color: var(--primary); }
.wp-spins {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 30px;
    background: linear-gradient(135deg, #D9AE4E, #F0D48C); color: #4A3208;
    font-size: 12.5px; font-weight: 800; box-shadow: 0 3px 12px -4px rgba(217,174,78,.9);
}
.wp-spins b { font-size: 15px; }

.wp-badge { display: grid; place-items: center; margin: 6px 0 10px; }
.wp-badge span {
    width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
    background: var(--card); color: #D9AE4E;
    box-shadow: 0 6px 22px rgba(1,17,53,.14), inset 0 0 0 2px rgba(217,174,78,.45);
}
.wp-title { font-size: 23px; font-weight: 800; text-align: center; margin-bottom: 3px; }
.wp-sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 18px; }

/* ── صحنه‌ی گردونه ── */
.wheel-stage { position: relative; width: min(400px, 90vw); aspect-ratio: 1; margin: 0 auto 6px; }
.wheel-ptr {
    position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 4;
    width: 0; height: 0; border-left: 19px solid transparent; border-right: 19px solid transparent;
    border-top: 40px solid var(--primary);
    filter: drop-shadow(0 4px 7px rgba(1,17,53,.42));
}
.wheel-ptr::after {
    content: ''; position: absolute; top: -46px; left: 50%; transform: translateX(-50%);
    width: 15px; height: 15px; border-radius: 50%; background: var(--primary);
    box-shadow: 0 2px 6px rgba(1,17,53,.4);
}
.wheel-disc { width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
.wd-svg { width: 100%; height: 100%; display: block; }
.wd-ring {
    position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
    border: 6px solid transparent;
    background: linear-gradient(135deg,#D9AE4E,#F0D48C,#C79A32) border-box;
    -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.wseg { transition: fill .35s var(--ease); }
.wseg.won { filter: drop-shadow(0 0 10px rgba(217,174,78,.55)); }
.wtxt { transition: fill .35s var(--ease); pointer-events: none; }

/* دکمه‌ی مرکزی */
.wheel-hub {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 5;
    width: 94px; height: 94px; border-radius: 50%; cursor: pointer; border: 0;
    background: linear-gradient(140deg, var(--primary), #1B2B52);
    color: #fff; font: inherit; font-size: 15px; font-weight: 800;
    box-shadow: 0 6px 20px rgba(1,17,53,.4), inset 0 0 0 4px rgba(255,255,255,.92);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.wheel-hub:not(:disabled):hover { transform: translate(-50%,-50%) scale(1.07); }
.wheel-hub:not(:disabled)::after {
    content: ''; position: absolute; inset: -9px; border-radius: 50%;
    border: 2px solid rgba(217,174,78,.55); animation: hubPulse 2.2s ease-out infinite;
}
@keyframes hubPulse { 0% { transform: scale(.95); opacity: .9; } 100% { transform: scale(1.2); opacity: 0; } }
.wheel-hub:disabled { background: var(--border); color: var(--muted); cursor: not-allowed;
    box-shadow: inset 0 0 0 4px var(--card); }
.wheel-hub.spinning { pointer-events: none; }

/* وضعیت و آمار */
.wp-state { text-align: center; margin: 16px 0 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wp-ready { font-size: 14px; color: var(--ink-soft); }
.wp-ready b { color: var(--primary); }
.ww-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.wp-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-bottom: 14px; }
.wp-stats > div { background: var(--card); border: 1px solid var(--border); border-radius: 13px;
    padding: 13px 7px; text-align: center; display: flex; flex-direction: column; gap: 3px; }
.wps-v { font-size: 16px; font-weight: 800; color: var(--primary); direction: ltr; }
.wps-l { font-size: 10.5px; color: var(--muted); }
.wp-log { margin-bottom: 12px; }
.code-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px;
    background: var(--page); border: 1px dashed var(--accent); border-radius: 8px; padding: 4px 8px; }
.code-chip code { direction: ltr; font-size: 12px; font-weight: 700; background: none; padding: 0; }

/* مودال نتیجه */
.wheel-modal { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 20px;
    background: rgba(1,17,53,.62); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s var(--ease); }
.wheel-modal.show { opacity: 1; }
.wm-box { position: relative; overflow: hidden; background: var(--card); border-radius: var(--r-lg);
    padding: 34px 26px 24px; max-width: 370px; width: 100%; text-align: center;
    transform: scale(.86); transition: transform .4s cubic-bezier(.34,1.5,.5,1);
    box-shadow: 0 22px 60px rgba(0,0,0,.4); }
.wheel-modal.show .wm-box { transform: scale(1); }
.wm-ic { display: inline-grid; place-items: center; width: 82px; height: 82px; border-radius: 50%;
    background: linear-gradient(135deg,#D9AE4E,#F0D48C); color: #4A3208; margin-bottom: 14px;
    animation: wmPop .5s var(--ease) both; }
.wm-ic.sad { background: var(--border); color: var(--muted); }
@keyframes wmPop { from { transform: scale(.4) rotate(-25deg); opacity: 0; } }
.wm-box h2 { justify-content: center; font-size: 20px; margin-bottom: 6px; }
.wm-prize { font-size: 26px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.wm-note { font-size: 13.5px; color: var(--ink-soft); line-height: 2; margin-bottom: 16px; }
.wm-code { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap;
    background: var(--page); border: 1px dashed var(--accent); border-radius: 12px;
    padding: 12px; margin-bottom: 16px; }
.wm-code code { direction: ltr; font-size: 17px; font-weight: 800; letter-spacing: 1px;
    background: none; padding: 0; color: var(--primary); }
.wm-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wm-confetti i { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px;
    animation: confFall 2.6s linear forwards; }
@keyframes confFall { to { top: 108%; transform: rotate(680deg); } }

/* پنل مدیریت */
.chance-bar { display: flex; height: 24px; border-radius: 9px; overflow: hidden; margin-top: 14px; background: var(--border); }
.chance-bar span { display: block; }
.clr-dot { display: inline-block; width: 18px; height: 18px; border-radius: 6px; }
.clr-pick { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 6px; }
.clr-opt { cursor: pointer; }
.clr-opt input { display: none; }
.clr-opt span { display: block; width: 30px; height: 30px; border-radius: 9px; border: 2.5px solid transparent; }
.clr-opt input:checked + span { border-color: var(--ink); transform: scale(1.12); }

@media (max-width: 560px) {
    .wheel-stage { width: min(340px, 88vw); }
    .wheel-hub { width: 80px; height: 80px; font-size: 13.5px; }
    .wp-stats { grid-template-columns: repeat(2,1fr); }
    .wp-title { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .wheel-disc { transition: none !important; }
    .wm-confetti { display: none; }
    .wheel-hub::after { animation: none; }
}

/* ── تراز فیلدهای کد معرف ── */
.ca-grid { align-items: start; }
.ca-grid label { min-height: 0; }
.ca-grid label small.muted { display: block; min-height: 2.6em; line-height: 1.6; margin-top: 2px; }
.ca-grid input { margin-top: 0 !important; }
.code-row { align-items: center; }
.code-row .btn, .code-row form { flex-shrink: 0; margin: 0; }
.code-row form { display: inline-flex; }

/* ── تراز آیکن کنار عنوان کارت‌ها ── */
.card > h2, .form-card > h2, .sec-card > h2, .lb-card > h2 {
    display: flex; align-items: center; gap: 8px; line-height: 1.5;
}
.card > h2 > svg, .form-card > h2 > svg, .sec-card > h2 > svg {
    flex-shrink: 0; display: block;
}
/* آیکن نباید در ابتدای خط شناور بماند */
.card > h2 img, .card > h2 svg { vertical-align: middle; }

/* ── کارت شانس گردونه در داشبورد ── */
.qb-wheel {
    position: relative; overflow: hidden; margin-bottom: 12px;
    border-color: #D9AE4E;
    background: linear-gradient(135deg, #FFF8E8, var(--card));
    animation: newPulse 2.6s ease-in-out infinite;
}
html[data-theme="dark"] .qb-wheel { background: linear-gradient(135deg, #322708, var(--card)); }
.qb-wheel .qb-ic { background: linear-gradient(135deg,#D9AE4E,#F0D48C); color: #4A3208; }
.qbw-count {
    font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 7px; vertical-align: middle;
    background: var(--primary); color: var(--on-primary); margin-inline-start: 6px;
}
.qb-wheel .qbp-shine { position: absolute; top: 0; bottom: 0; width: 42%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent);
    animation: shineMove 3.2s ease-in-out infinite; }

/* ── جعبه‌ی پاداش‌های دعوت ── */
.rewards-box { margin-bottom: 14px; }
.rw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.rw-item { background: var(--page); border: 1px solid var(--border); border-radius: 14px; padding: 15px; }
.rw-item.you { border-color: var(--primary); }
.rw-item.friend { border-color: var(--info); }
.rw-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 9px; }
.rw-item.you .rw-ic { background: var(--primary-soft); color: var(--primary); }
.rw-item.friend .rw-ic { background: var(--info-soft); color: var(--info); }
.rw-item > b { display: block; font-size: 14px; margin-bottom: 8px; }
.rw-item ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rw-item li { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px;
    color: var(--ink-soft); line-height: 1.9; }
.rw-item li svg { flex-shrink: 0; margin-top: 4px; color: var(--muted); }
.rw-item li b { color: var(--primary); }
@media (max-width: 560px) { .rw-grid { grid-template-columns: 1fr; } }

/* ── عمق سه‌بعدی گردونه ── */
.wheel-stage { filter: drop-shadow(0 18px 30px rgba(1,17,53,.22)); }
.wd-ring { display: none; }   /* حلقه حالا داخل SVG رسم می‌شود */
.wheel-hub {
    background:
        radial-gradient(circle at 34% 26%, rgba(255,255,255,.30), transparent 52%),
        linear-gradient(145deg, #12306B, var(--primary) 45%, #000A22);
    box-shadow:
        0 10px 22px rgba(1,17,53,.48),
        0 2px 0 rgba(255,255,255,.22) inset,
        0 -3px 8px rgba(0,0,0,.35) inset,
        0 0 0 5px #fff,
        0 0 0 7px rgba(217,174,78,.55);
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.wheel-hub:not(:disabled):active { transform: translate(-50%,-50%) scale(.95); box-shadow: 0 4px 12px rgba(1,17,53,.5), 0 0 0 5px #fff; }
.wheel-ptr {
    border-top-color: transparent;
    width: 0; height: 0;
    filter: drop-shadow(0 5px 8px rgba(1,17,53,.5));
}
.wheel-ptr::before {
    content: ''; position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; border-left: 19px solid transparent; border-right: 19px solid transparent;
    border-top: 40px solid var(--primary);
}
.wheel-ptr::after {
    top: -52px; width: 19px; height: 19px;
    background: radial-gradient(circle at 34% 30%, #3E5486, var(--primary));
    box-shadow: 0 2px 6px rgba(1,17,53,.5), 0 0 0 3px #fff;
}
.spin-err { margin: 12px 0; }
/* پیام خطا در حالت مخفی جا نگیرد */
.spin-err[hidden] { display: none !important; }

/* ── تضمین کلیک‌پذیری گردونه ── */
.wheel-stage {
    cursor: pointer;
    /* فضای کافی تا سایه‌ها بریده نشوند */
    margin: 26px auto 10px !important;
    padding: 0;
    overflow: visible;
}
.wheel-page { overflow: visible; padding: 0 6px 8px; }
.wheel-page .card, .wheel-page .wp-stats { overflow: visible; }

/* هیچ لایه‌ای جلوی کلیک را نگیرد */
.wheel-disc, .wd-svg, .wd-svg *, .wheel-ptr, .wheel-ptr::before, .wheel-ptr::after { pointer-events: none !important; }
.wheel-hub { pointer-events: none !important; }      /* کلیک را صحنه می‌گیرد */
.wheel-hub, .wheel-hub * { user-select: none; }
.wheel-hub { z-index: 20 !important; display: grid; place-items: center; }
.wheel-stage:hover .wheel-hub:not(.spinning) { transform: translate(-50%,-50%) scale(1.06); }
.wheel-stage:active .wheel-hub:not(.spinning) { transform: translate(-50%,-50%) scale(.95); }
.wheel-stage:focus-visible { outline: 3px solid var(--primary); outline-offset: 8px; border-radius: 50%; }

/* دکمه‌ی اصلی زیر گردونه */
.spin-main { margin: 4px 0 14px; font-size: 16px !important; }
.spin-main:disabled { opacity: .55; cursor: not-allowed; }

/* سایه‌ی گردونه نباید بریده شود */
.wheel-stage { filter: none; }
.wd-svg { filter: drop-shadow(0 14px 26px rgba(1,17,53,.20)); overflow: visible; }

/* ══════════════════════════════════════════════════════════════
   محافظ سراسری: هر عنصری که صفت hidden دارد واقعاً مخفی شود.
   بدون این، قانون display در CSS بر [hidden] مرورگر غلبه می‌کند و
   عنصر نامرئی ولی کلیک‌گیر باقی می‌ماند — دقیقاً همان باگی که
   باعث شد هیچ دکمه‌ای در صفحه‌ی گردونه کار نکند.
   ══════════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }

/* ── ماسک‌ها فقط وقتی باز هستند کلیک بگیرند ──
   این ماسک‌ها با جاوااسکریپت ساخته می‌شوند و پس از بستن در DOM می‌مانند.
   بدون این قانون، با opacity صفر نامرئی‌اند ولی همچنان کلیک‌ها را می‌بلعند. */
.sheet-mask, .tour-mask { pointer-events: none; }
.sheet-mask.on, .tour-mask.on { pointer-events: auto; }
.sheet { pointer-events: none; }
.sheet.on { pointer-events: auto; }

/* ── مودال گردونه: پوشش کامل صفحه ──
   مودال با جاوااسکریپت به body منتقل می‌شود، چون .main > * انیمیشن
   با transform و fill-mode:both دارد که containing block می‌سازد و
   position:fixed را به همان ظرف محدود می‌کند. */
body > .wheel-modal {
    position: fixed !important; inset: 0 !important;
    z-index: 5000; margin: 0;
}
.wheel-modal { background: rgba(1,17,53,.70); }
@supports (backdrop-filter: blur(4px)) {
    .wheel-modal { background: rgba(1,17,53,.58); backdrop-filter: blur(5px); }
}
.wm-box { animation: none; }
.wheel-modal.show .wm-box { animation: wmIn .42s cubic-bezier(.34,1.5,.5,1) both; }
@keyframes wmIn { from { transform: scale(.86); opacity: .4; } to { transform: scale(1); opacity: 1; } }

/* جلوگیری از اسکرول پس‌زمینه هنگام باز بودن مودال */
body.wheel-open { overflow: hidden; }

/* دکمه‌ی مرکزی: نشانگر موس روی کل گردونه */
.wheel-stage { cursor: pointer; }
.wheel-stage.no-spin { cursor: default; }
.wheel-stage.no-spin .wheel-hub { background: var(--border); color: var(--muted);
    box-shadow: 0 0 0 5px #fff, 0 0 0 7px rgba(217,174,78,.3); }

/* ═══════════ طرح درآمدزایی محتوا ═══════════ */

/* نشان NEW با گرادیان اینستاگرام */
.nav-new-ig {
    background: linear-gradient(45deg,
        #F58529 0%, #FEDA77 18%, #DD2A7B 48%, #8134AF 74%, #515BD4 100%) !important;
    color: #fff !important;
    animation: igPulse 2.6s ease-in-out infinite !important;
}
@keyframes igPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(221,42,123,.55); }
    55%      { box-shadow: 0 0 0 6px rgba(221,42,123,0); }
}

/* معرفی طرح */
.cm-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: linear-gradient(135deg, #FFF3F7, var(--card)); border-color: #DD2A7B; }
html[data-theme="dark"] .cm-hero { background: linear-gradient(135deg, #2C0E1D, var(--card)); }
.cm-hero-ic { width: 62px; height: 62px; border-radius: 18px; flex-shrink: 0; display: grid; place-items: center;
    background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); color: #fff;
    box-shadow: 0 6px 18px -6px rgba(221,42,123,.7); }
.cm-hero h2 { font-size: 20px; margin-bottom: 5px; }
.cm-hero p { font-size: 13px; color: var(--ink-soft); line-height: 2.1; }

/* مراحل */
.cm-steps { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.cm-step { display: flex; gap: 13px; align-items: flex-start; padding: 13px;
    background: var(--page); border-radius: 13px; border: 1px solid var(--border); }
.cms-n { width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
    background: linear-gradient(45deg, #DD2A7B, #8134AF); color: #fff; font-size: 13px; font-weight: 800; }
.cm-step > div > b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.cm-step span.cms-n { color: #fff; font-size: 13px; line-height: 1; }
.cm-step > div > span { font-size: 12.5px; color: var(--ink-soft); line-height: 2.1; }

/* محاسبه‌گر */
.cm-calc-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.cm-calc-out { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 12px 0; padding: 16px 18px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #1B2B52); color: #fff;
    transition: transform .2s var(--ease); }
.cm-calc-out.on { transform: scale(1.01); }
.cm-calc-out span { font-size: 12.5px; opacity: .82; }
.cm-calc-out b { font-size: 28px; font-weight: 800; direction: ltr;
    text-shadow: 0 0 22px rgba(217,174,78,.55); }
.cm-examples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cm-ex { font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 3px; align-items: center;
    padding: 11px 6px; border-radius: 12px; border: 1px solid var(--border-mid); background: var(--card); }
.cm-ex:hover { border-color: #DD2A7B; transform: translateY(-2px); }
.cm-ex span { font-size: 11px; color: var(--muted); }
.cm-ex b { font-size: 14px; color: var(--primary); direction: ltr; }

/* قوانین */
.cm-rules ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.cm-rules li { position: relative; padding-inline-start: 22px; font-size: 12.5px;
    color: var(--ink-soft); line-height: 2.1; }
.cm-rules li::before { content: '•'; position: absolute; inset-inline-start: 4px; color: #DD2A7B;
    font-size: 18px; line-height: 1.3; }

/* پیج‌ها */
.cm-pages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.cm-page { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 13px;
    background: var(--page); border: 1px solid var(--border); border-radius: 12px; }
.cm-page.approved { border-inline-start: 3px solid var(--success); }
.cm-page.rejected { border-inline-start: 3px solid var(--danger); opacity: .75; }
.cm-page.pending  { border-inline-start: 3px solid var(--warning); }
.cmp-user { font-weight: 800; font-size: 13.5px; direction: ltr; }
.cmp-fol { font-size: 11.5px; color: var(--muted); }
.cmp-note { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }

/* فرم‌ها */
.cm-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 12px; }
.cm-form h3 { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 7px; margin: 0; }
.cm-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-soft); }
.cm-agree { flex-direction: row !important; align-items: flex-start; gap: 9px;
    background: var(--warning-soft); border: 1px solid var(--warning); border-radius: 12px; padding: 12px; }
.cm-agree span { font-size: 12.5px; line-height: 2; color: var(--ink); }

/* فرم بررسی در پنل مدیریت */
.vid-form { display: flex; flex-direction: column; gap: 6px; min-width: 210px; }
.vf-row { display: flex; gap: 5px; flex-wrap: wrap; }
.vf-in { padding: 6px 9px !important; font-size: 12px !important; border-radius: 8px; width: 88px; margin: 0 !important; }
.vf-in.sm { width: 68px; }
.vf-in.wide { width: 100%; }
.vf-calc { font-size: 11px; min-height: 15px; color: var(--success) !important; font-weight: 700; }

@media (max-width: 560px) {
    .cm-examples { grid-template-columns: repeat(2, 1fr); }
    .cm-hero { text-align: center; justify-content: center; }
    .cm-calc-out b { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .nav-new-ig { animation: none !important; } }
/* NEW گیم مانی: گرادیان آبی برند ← فیروزه‌ای، با موج فیروزه‌ای */
.nav-new-game { background: linear-gradient(135deg, #002AFA 0%, #63F7F9 100%) !important; color: #fff !important;
    animation: gamePulse 2.4s ease-in-out infinite !important; }
@keyframes gamePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(99,247,249,.6); } 55% { box-shadow: 0 0 0 6px rgba(99,247,249,0); } }
@media (prefers-reduced-motion: reduce) { .nav-new-game { animation: none !important; } }

/* ── آواتار ── */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden;
    flex-shrink: 0; color: #fff; font-weight: 800; line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.av-txt { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.avatar.av-txt, .avatar.av-txt * { color: #fff !important; -webkit-text-fill-color: #fff; }
.av-big { box-shadow: 0 4px 16px rgba(1,17,53,.18), 0 0 0 3px var(--card), 0 0 0 5px var(--border-mid); }
.av-chat { vertical-align: middle; margin-inline-end: 5px; font-size: 9px !important; }
.av-sup { background: var(--primary) !important; color: #fff !important; }
.av-drop { margin-bottom: 6px; }
.avatar-card { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.av-edit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.av-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.av-actions .btn { cursor: pointer; margin: 0; }

/* ── جدول تنظیمات اعلان ── */
.np-table { border: 1px solid var(--border-mid); border-radius: var(--r-md); overflow: hidden; }
.np-head, .np-row { display: grid; grid-template-columns: 1fr 84px 84px; align-items: center; gap: 8px; }
.np-head { background: var(--page); padding: 11px 14px; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.np-head span:not(:first-child) { text-align: center; display: flex; align-items: center;
    justify-content: center; gap: 5px; }
.np-row { padding: 12px 14px; border-top: 1px solid var(--border); }
.np-row.locked { background: var(--info-soft); }
.np-lbl b { display: block; font-size: 13px; margin-bottom: 2px; }
.np-lbl small { font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.np-chk { display: grid; place-items: center; cursor: pointer; margin: 0; }

/* تگ پیج رسمی */
.tag-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px;
    background: var(--page); border: 1px dashed var(--accent); border-radius: 8px; padding: 3px 8px; }
.tag-hint code { direction: ltr; font-size: 12px; font-weight: 700; background: none; padding: 0; }
.vf-tag { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); margin: 0; }
.vf-tag input { width: 14px; height: 14px; margin: 0; }

@media (max-width: 560px) {
    .np-head, .np-row { grid-template-columns: 1fr 56px 56px; gap: 6px; padding: 11px 10px; }
    .np-head span:not(:first-child) { font-size: 10px; }
    .av-edit { justify-content: center; }
}

/* ── چیدمان کارت عکس پروفایل ── */
.avatar-card { padding: 18px; max-width: 780px; }
.avatar-card h2 { margin-bottom: 4px; }
.av-edit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.av-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; min-width: 0; }
.av-actions .btn { margin: 0; cursor: pointer; }
.av-actions label.btn { display: inline-flex; align-items: center; gap: 6px; }

/* ── برش تصویر ── */
.av-crop { display: flex; flex-direction: column; gap: 12px; align-items: center;
    padding-top: 14px; border-top: 1px solid var(--border); margin-top: 4px; }
.av-crop > p { text-align: center; margin: 0; }
.avc-stage { position: relative; width: 280px; height: 280px; border-radius: var(--r-md);
    overflow: hidden; background: var(--page); cursor: grab; touch-action: none; }
.avc-stage:active { cursor: grabbing; }
.avc-stage canvas { display: block; width: 100%; height: 100%; }
.avc-mask { position: absolute; inset: 0; pointer-events: none;
    box-shadow: 0 0 0 999px rgba(1,17,53,.45); border-radius: 50%;
    border: 2px solid rgba(255,255,255,.9); }
.avc-zoom { display: flex; align-items: center; gap: 10px; width: 280px; color: var(--muted); }
.avc-zoom input { flex: 1; accent-color: var(--primary); margin: 0; }
.avc-actions { display: flex; gap: 8px; }
.avc-actions .btn { margin: 0; }
@media (max-width: 420px) {
    .avc-stage, .avc-zoom { width: 240px; }
    .avc-stage { height: 240px; }
}

/* ═══════════ تیک یکپارچه — همه‌جای هر دو پنل ═══════════ */
.chk { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk > span {
    width: 24px; height: 24px; border-radius: 8px; background: var(--card);
    border: 2px solid var(--border-mid); display: grid; place-items: center;
    transition: background .16s var(--ease), border-color .16s var(--ease);
}
.chk > span::after {
    content: ''; width: 11px; height: 6px; margin-top: -3px;
    border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) scale(0); transition: transform .16s var(--ease);
}
.chk input:checked + span { background: var(--primary); border-color: var(--primary); }
.chk input:checked + span::after { transform: rotate(-45deg) scale(1); }
.chk input:disabled + span { opacity: .55; cursor: not-allowed; }
.chk input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-soft); }

.chk-row {
    /* با متن چندخطی، align-items:center تیک را وسط پاراگراف می‌انداخت */
    display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 11px;
    padding: 12px 14px; background: var(--page); border: 1px solid var(--border);
    border-radius: 12px; cursor: pointer; margin: 0;
}
.chk-row:hover { border-color: var(--accent); }
.chk-row > .chk { margin-top: 2px; }
.chk-lbl { font-size: 13px; color: var(--ink); line-height: 1.9; flex: 1; }

/* چک‌باکس‌های قدیمیِ label.inline هم همین ظاهر را بگیرند */
label.inline { display: flex; flex-direction: row !important; align-items: flex-start; gap: 10px; cursor: pointer; }
label.inline input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; flex-shrink: 0; margin: 1px 0 0;
    width: 22px; height: 22px; border-radius: 7px; background: var(--card);
    border: 2px solid var(--border-mid); display: grid; place-items: center; cursor: pointer;
    transition: background .16s var(--ease), border-color .16s var(--ease);
}
label.inline input[type="checkbox"]::after {
    content: ''; width: 10px; height: 5.5px; margin-top: -2px;
    border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) scale(0); transition: transform .16s var(--ease);
}
label.inline input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
label.inline input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }
label.inline input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 3px var(--primary-soft); }
label.inline > span { font-size: 13px; line-height: 1.9; }

/* ── فاصله‌ی ستون‌ها: کارت‌ها تمام عرض ستون را بگیرند ── */
.grid2-side > div > .card,
.grid2-side > div > .form-card,
.grid2-side > .card,
.grid2-side .avatar-card { max-width: none; }
.grid2-side { gap: 14px; }

/* ── تراز آیکن و متن داخل هشدارها ──
   ⚠️ اینجا نباید display:flex باشد: با فلکس، هر <b>/<code>/<a> داخل جمله یک آیتم
   جداگانه می‌شود و متن به چند ستون باریک تکه‌تکه می‌شود (روی موبایل فاجعه). آیکن
   به‌صورت inline تراز می‌شود تا جمله یکپارچه بماند. */
.alert { display: block; line-height: 1.9; }
/* آیکن باید inline بماند؛ .ic به‌صورت سراسری display:block است و کل جمله را به خط بعد می‌برد */
.alert > svg, .alert > .ic { display: inline-block; vertical-align: -4px; margin-inline-end: 6px; }

/* ── پیام‌های شناور: پس‌زمینه‌ی مات ── */
.flash-stack .flash-msg {
    background: var(--card) !important;
    border: 1px solid var(--border-mid);
    color: var(--ink);
    backdrop-filter: none;
}
.flash-stack .flash-msg.success { background: var(--success-soft) !important; border-color: var(--success); color: var(--success); }
.flash-stack .flash-msg.info    { background: var(--info-soft)    !important; border-color: var(--info);    color: var(--info); }
.flash-stack .flash-msg.warning { background: var(--warning-soft) !important; border-color: var(--warning); color: var(--warning); }
.flash-stack .flash-msg.danger  { background: var(--danger-soft)  !important; border-color: var(--danger);  color: var(--danger); }
html[data-theme="dark"] .flash-stack .flash-msg { background: var(--card) !important; }


/* فاصله‌ی «…» در صفحه‌بندی پنجره‌ای */
.pager .pg-gap { padding: 0 6px; color: var(--muted); align-self: center; }

/* بازه‌ی سکوت پیامک در تنظیمات اعلان مشتری */
.np-quiet { margin-top: 16px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--page); }
.np-quiet h3 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.np-quiet .grid2 { margin-top: 10px; }

/* ── کیف پول: برداشت و شارژ بالا، تاریخچه‌ی ۱۰تایی ته صفحه ── */
.wallet-cols { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .wallet-cols { grid-template-columns: 1fr 1fr; align-items: start; } }
/* زبانه‌ی واریز: یک ستون، عرض خوانا */
@media (min-width: 900px) { .wallet-cols.wallet-one { grid-template-columns: minmax(0, 760px); } }
.wallet-tabs { margin-bottom: 14px; }
.wallet-history { margin-top: 18px; }
.wallet-history .table-card { margin: 0; }

/* ── شارژ کیف پول چندارزی: ارز ← شبکه ← آدرس ← ثبت ── */
.dep-card h2 { margin-bottom: 4px; }
.dep-intro { margin: 0 0 14px; line-height: 1.9; }
.dep-step { border-top: 1px dashed var(--border-mid); padding-top: 14px; margin-top: 14px; }
/* :first-of-type روی <form> هم می‌خورد؛ فقط قدم اول بی‌خط باشد */
.dep-step[data-step="1"] { border-top: 0; padding-top: 0; margin-top: 0; }
.dep-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dep-step-head b { font-size: 14.5px; }
.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.coin-opt {
    display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px 10px;
    background: var(--page); border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer;
    color: var(--ink); font: inherit; transition: border-color .15s, transform .15s, background .15s;
}
.coin-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.coin-opt.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.coin-opt .coin-name { font-size: 13px; font-weight: 700; }
.coin-opt .coin-sym { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.coin-ic { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.net-list { display: flex; flex-direction: column; gap: 8px; }
.net-opt {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
    padding: 12px 14px; background: var(--page); border: 1.5px solid var(--border); border-radius: 12px;
    cursor: pointer; font: inherit; color: var(--ink); text-align: start;
}
.net-opt:hover { border-color: var(--accent); }
.net-opt.on { border-color: var(--primary); background: var(--primary-soft); }
.net-opt.on::after { content: '✓'; color: var(--primary); font-weight: 800; }
.dep-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dep-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
    background: var(--page); border: 1px solid var(--border); font-size: 12.5px;
}
.dep-memo { margin: 8px 0; font-size: 13px; }
.dep-warn { margin: 12px 0 0 !important; }
.dep-card .addr-box code { word-break: break-all; }
@media (max-width: 420px) { .coin-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── احراز هویت (پروفایل) ── */
.kyc-wrap { max-width: 640px; margin: 0 auto; }
.kyc-state, .kyc-intro { display: flex; gap: 16px; align-items: flex-start; }
.kyc-state h2, .kyc-intro h2 { margin: 0 0 4px; font-size: 16.5px; }
.kyc-state p, .kyc-intro p { margin: 0 0 10px; line-height: 1.9; }
.kyc-state-ic { flex-shrink: 0; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary); }
.kyc-state.ok .kyc-state-ic { background: var(--success-soft); color: var(--success); }
.kyc-state.wait .kyc-state-ic { background: var(--info-soft); color: var(--info); }
.kyc-state .def { margin-top: 6px; }
.kyc-step { border-top: 1px dashed var(--border-mid); padding-top: 14px; margin-top: 14px; }
.kyc-step:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.kyc-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kyc-step-head b { font-size: 14.5px; }
.kyc-doc-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kyc-doc-opt { position: relative; margin: 0; cursor: pointer; }
.kyc-doc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kyc-doc-opt > span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px;
    border: 1.5px solid var(--border); border-radius: 14px; background: var(--page); text-align: center; transition: all .15s; }
.kyc-doc-opt > span small { color: var(--muted); font-size: 11.5px; }
.kyc-doc-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.kyc-doc-opt input:focus-visible + span { outline: 2px solid var(--accent); }
.kyc-drop { position: relative; display: block; margin: 0; cursor: pointer; border: 2px dashed var(--border-mid);
    border-radius: 16px; background: var(--page); min-height: 150px; overflow: hidden; transition: border-color .15s; }
.kyc-drop:hover { border-color: var(--accent); }
.kyc-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.kyc-drop-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 150px; padding: 18px; text-align: center; color: var(--muted); pointer-events: none; }
.kyc-drop-empty b { color: var(--ink); font-size: 14px; }
.kyc-drop.has .kyc-drop-empty { display: none; }
.kyc-drop.has { border-style: solid; border-color: var(--success); }
.kyc-preview { display: block; width: 100%; max-height: 320px; object-fit: contain; background: #000; }
.kyc-tips { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; color: var(--muted); line-height: 2; }
.kyc-form .chk-row { margin: 16px 0 14px; }
@media (max-width: 420px) { .kyc-state, .kyc-intro { flex-direction: column; } }
/* .ic سراسری display:block است؛ داخل متن باید کنار کلمات بماند */
.kyc-form p .ic { display: inline-block; vertical-align: -2px; }
.kyc-history { margin-top: 14px; }

/* تقویم شمسی: انتخاب ماه و سال از فهرست */
.jdp-sel { display: inline-flex; gap: 6px; align-items: center; }
.jdp-sel select { font: inherit; font-size: 13px; font-weight: 700; padding: 3px 6px; border-radius: 8px;
    border: 1px solid var(--border-mid); background: var(--card); color: var(--ink); cursor: pointer; }
/* مشخصات هویتی قفل‌شده در فرم اطلاعات */
.id-locked { margin-bottom: 10px; }
.kyc-lock-note { margin: 2px 0 0; line-height: 1.9; }
.kyc-lock-note .ic, .id-locked + p .ic { display: inline-block; vertical-align: -2px; }

/* منوی اعلان وقتی به body منتقل شده (گوشی/تبلت) — نمایش با کلاس خودش */
.notif-drop.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

/* ═══════════ اسکلتون (Skeleton Loader) ═══════════
   تا صفحه‌ی بعد از سرور برسد، جای محتوا اسکلتونِ چشمک‌زن نشان داده می‌شود تا کاربر بداند
   درخواستش در حال انجام است (به‌جای صفحه‌ای که «یخ زده» به نظر می‌رسد و دوباره کلیک می‌شود). */
:root { --sk-base: #E2E7EE; --sk-shine: rgba(255, 255, 255, .8); }
html[data-theme="dark"] { --sk-base: #1A2336; --sk-shine: rgba(255, 255, 255, .06); }
.sk {
    display: block; position: relative; overflow: hidden;
    background: var(--sk-base); border-radius: 8px; height: 12px;
}
.sk::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(90deg, transparent 0%, var(--sk-shine) 50%, transparent 100%);
    transform: translateX(100%);
    animation: skShine 1.35s ease-in-out infinite;
}
/* راست‌چین: درخشش از راست به چپ حرکت می‌کند */
@keyframes skShine { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
html[dir="ltr"] .sk::after { animation-name: skShineLtr; }
@keyframes skShineLtr { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk-c { border-radius: 50%; flex: 0 0 auto; }
.sk-pill { border-radius: 999px; }

/* اسکلتون تمام‌صفحه هنگام رفتن به صفحه‌ی بعد */
.main.sk-loading > :not(.sk-screen) { display: none !important; }
.sk-screen { display: block; animation: none !important; }
/* لودر برند وقتی رفتن به صفحه‌ی بعد طول کشید (Uiverse · dovatgabriel) — کلیک‌گیر نیست */
.nav-ping { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; pointer-events: none; }
.ping { --uib-size: 50px; --uib-speed: 1s; --uib-color: #002AFA; position: relative; width: var(--uib-size); height: var(--uib-size); }
html[data-theme="dark"] .ping { --uib-color: #3D5CFF; }
.ping::before, .ping::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%;
    background-color: var(--uib-color); transform: scale(0); opacity: 0;
    animation: navPing var(--uib-speed) linear infinite;
}
.ping::after { animation-delay: calc(var(--uib-speed) / -2); }
@keyframes navPing { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ping::before { animation: none !important; transform: scale(.45); opacity: .9; } .ping::after { animation: none !important; } }
.sk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.sk-head-t { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sk-stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sk-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sk-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.sk-row { display: flex; align-items: center; gap: 12px; }
.sk-row-t { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
@media (max-width: 860px) {
    .sk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sk-grid { grid-template-columns: minmax(0, 1fr); }
    .sk-grid > .sk-card:nth-child(2) { display: none; }
}

/* ردیف‌های اسکلتون جدول (جست‌وجوی زنده) */
tr.sk-tr td { padding-top: 14px; padding-bottom: 14px; }
/* عکس‌های پروفایل تا بارگذاری کامل، زمینه‌ی اسکلتون دارند */
.avatar img { background: var(--sk-base); }

@media (prefers-reduced-motion: reduce) {
    .sk::after { animation: none; display: none; }
}

/* احراز هویت: سه گزینه‌ی مدرک (کارت ملی، شناسنامه، گذرنامه) */
.kyc-doc-pick.kyc-doc-pick3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .kyc-doc-pick.kyc-doc-pick3 { grid-template-columns: minmax(0, 1fr); } }

/* ═══════════ ورود به پنل الیت (فقط کاربران الیت) ═══════════ */
.nav-link.nav-elit {
    background: linear-gradient(135deg, #C9A227 0%, #E9C766 55%, #B8902A 100%);
    color: #2A1E00 !important; font-weight: 800; margin-bottom: 8px;
    box-shadow: 0 6px 18px rgba(201, 162, 39, .35);
}
.nav-link.nav-elit .nav-ic { color: #2A1E00; }
.nav-link.nav-elit:hover { filter: brightness(1.05); }
.elit-cta {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
    padding: 16px 18px; border-radius: var(--r-lg); text-decoration: none;
    background: linear-gradient(135deg, #0B1220 0%, #1A2440 60%, #2A2310 100%);
    border: 1.5px solid #C9A227; color: #F4E7C0; box-shadow: 0 10px 28px rgba(201, 162, 39, .18);
}
.elit-cta-ic { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #C9A227, #E9C766); color: #2A1E00; flex: 0 0 auto; }
.elit-cta-txt { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.elit-cta-txt b { font-size: 17px; color: #FFE9A8; }
.elit-cta-txt small { color: #C9BFA0; font-size: 12.5px; line-height: 1.8; }
.elit-cta-go { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 12px; font-weight: 800;
    background: linear-gradient(135deg, #C9A227, #E9C766); color: #2A1E00; white-space: nowrap; }
@media (max-width: 560px) { .elit-cta-go { width: 100%; justify-content: center; } }

/* ══════════ صفحه‌ی معرفی و عضویت الیت ══════════ */
.ej { display: grid; gap: 16px; }
.ej > * { min-width: 0; }
.ej h2 { display: flex; align-items: center; gap: 7px; }
.ej-hero { background: linear-gradient(135deg, #0B1220 0%, #1A2440 60%, #2A2310 100%); border: 1.5px solid #C9A227; color: #F4E7C0; }
.ej-hero h2 { color: #FFE9A8; font-size: 21px; margin: 12px 0 8px; }
.ej-hero p { color: #D9CFB0; line-height: 2; margin: 0; }
.ej-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 800;
    background: linear-gradient(135deg, #C9A227, #E9C766); color: #2A1E00; direction: ltr; }
.ej-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.ej-stats > div { background: rgba(255,255,255,.06); border: 1px solid rgba(201,162,39,.35); border-radius: 14px; padding: 12px; text-align: center; min-width: 0; }
.ej-stats b { display: block; font-size: 22px; color: #FFE9A8; }
.ej-stats span { font-size: 12px; color: #C9BFA0; }
.ej-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: ej; }
.ej-steps li { counter-increment: ej; background: var(--page); border-radius: 14px; padding: 14px 14px 14px 14px; display: flex; flex-direction: column; gap: 4px; position: relative; min-width: 0; }
.ej-steps li::before { content: counter(ej); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
    background: linear-gradient(135deg, #C9A227, #E9C766); color: #2A1E00; margin-bottom: 4px; }
.ej-steps span { font-size: 12.5px; color: var(--muted); }
.ej-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ej-plan { position: relative; border: 1px solid var(--border-mid); border-radius: 14px; padding: 16px 12px; text-align: center; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ej-plan small { color: var(--muted); font-weight: 700; }
.ej-plan b { font-size: 22px; color: var(--primary); }
.ej-plan span { font-size: 12px; color: var(--ink-soft); }
.ej-plan.hot { border: 2px solid #C9A227; box-shadow: 0 8px 22px rgba(201,162,39,.2); }
.ej-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 800;
    padding: 2px 10px; border-radius: 99px; background: linear-gradient(135deg, #C9A227, #E9C766); color: #2A1E00; }
.ej-limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ej-limits > div { background: var(--danger-soft); border-radius: 14px; padding: 12px; text-align: center; min-width: 0; }
.ej-limits b { display: block; font-size: 24px; color: var(--danger); }
.ej-limits span { font-size: 12px; }
.ej-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ej-rule { border-radius: 14px; padding: 12px 14px; min-width: 0; }
.ej-rule h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 0 0 8px; }
.ej-rule ul { margin: 0; padding-inline-start: 18px; line-height: 2; font-size: 13px; }
.ej-rule.ok { background: var(--success-soft); } .ej-rule.ok h3 { color: var(--success); }
.ej-rule.must { background: var(--warning-soft); } .ej-rule.must h3 { color: var(--warning); }
.ej-rule.no { background: var(--danger-soft); } .ej-rule.no h3 { color: var(--danger); }
.ej-risk { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.9; }
.ej-join { border: 1.5px solid #C9A227; }
.ej-agree { margin: 12px 0 14px; align-items: flex-start; }
.ej-modal { position: fixed; inset: 0; z-index: 5000; background: rgba(5, 10, 20, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ej-box { background: var(--card); border-radius: 20px; padding: 24px 22px; width: 100%; max-width: 400px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.ej-box h3 { margin: 10px 0 6px; font-size: 18px; }
.ej-box p { color: var(--ink-soft); line-height: 1.9; font-size: 13.5px; margin: 0 0 16px; }
.ej-ic { width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #C9A227, #E9C766); color: #2A1E00; }
.ej-ic.warn { background: var(--warning-soft); color: var(--warning); }
.ej-btns { display: grid; gap: 8px; }
@media (max-width: 1100px) { .ej-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ej-limits { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .ej-rules { grid-template-columns: minmax(0, 1fr); } }

/* ══════════ کیف پول‌های برداشت (پروفایل) و انتخاب مقصد برداشت ══════════ */
.cw-intro p { margin: 0; line-height: 2; font-size: 13.5px; }
.cw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.cw-grid > * { min-width: 0; }
.cw-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border-mid); }
.cw-card.has { border-color: var(--success); }
.cw-card.off { opacity: .62; }
.cw-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cw-name { flex: 1; min-width: 140px; display: flex; flex-direction: column; line-height: 1.6; }
.cw-addr { display: block; background: var(--page); border-radius: 10px; padding: 8px 10px; font-size: 12px; overflow-wrap: anywhere; }
.cw-lock { background: var(--warning-soft); border-radius: 10px; padding: 8px 10px; margin: 0; }
.cw-form label { margin-bottom: 8px; }
.cw-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cw-btns .btn { flex: 1; }
.wd-open { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wd-dests { display: grid; gap: 8px; margin: 8px 0 12px; }
.wd-dest { position: relative; margin: 0 !important; cursor: pointer; }
.wd-dest input { position: absolute; opacity: 0; pointer-events: none; }
.wd-dest-box { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--border-mid); border-radius: 13px; min-width: 0; }
.wd-dest input:checked + .wd-dest-box { border-color: var(--primary); background: var(--primary-soft, var(--page)); box-shadow: 0 0 0 3px rgba(31,122,84,.12); }
.wd-dest input:focus-visible + .wd-dest-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.wd-dest-txt { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.wd-dest-txt b { font-size: 13px; }
.wd-dest-txt code { font-size: 11.5px; overflow-wrap: anywhere; color: var(--muted); }
.cw-form input[dir="ltr"], .cw-addr, .wd-dest-txt code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
/* NEW روی دکمه‌ی طلایی الیت: سفید تا روی طلایی دیده شود */
.nav-link.nav-elit .nav-new { background: #fff; color: #7A5A0C; box-shadow: none; animation: newPulseW 2.4s ease-in-out infinite; }
@keyframes newPulseW { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 55% { box-shadow: 0 0 0 6px rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .nav-link.nav-elit .nav-new { animation: none !important; } }

/* ── شماره‌ی پشتیبانی در هدر (لمس = تماس) — دکمه مثل بقیه‌ی هدر، آیکن سورمه‌ای برند ── */
.hdr-phone {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; border-radius: 12px;
    padding: 0 7px;                 /* فاصله‌ی داخلی برابر دو طرف = فاصله‌ی بالا/پایین آیکن ((۴۲−۲۸)÷۲) */
    direction: ltr;                 /* آیکن سمت چپ شماره */
    background: var(--page); color: var(--ink);
    text-decoration: none; font-weight: 800; white-space: nowrap; flex-shrink: 0; transition: all .15s; }
.hdr-phone:hover { background: var(--primary-soft); color: var(--primary); }
.hdr-phone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hdr-phone-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
    background: var(--primary); color: var(--on-primary); flex-shrink: 0; }
.hdr-phone-num { font-size: 14px; letter-spacing: .3px; word-spacing: 5px; }  /* فاصله‌ی گروه‌های رقم در فونت استدادِ کم‌عرض */
@media (max-width: 560px) {
    .hdr-phone { padding: 0 8px; gap: 6px; }        /* آیکن ۲۶ → (۴۲−۲۶)÷۲ = ۸ */
    .hdr-phone-ic { width: 26px; height: 26px; border-radius: 8px; }
    .hdr-phone-num { font-size: 12px; letter-spacing: 0; word-spacing: 3px; }
}

/* ── ویدیوی آموزش صفحه ── */
.vid-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: 10px; border: 0; cursor: pointer;
    background: var(--primary); color: var(--on-primary); font: inherit; font-size: 12.5px; font-weight: 800; flex-shrink: 0; transition: all .2s var(--ease); }
.vid-btn:hover { background: var(--primary-light); transform: translateY(-1px); }
/* اطلاعیه‌ی برداشت: متن بلند داخل بدنه اسکرول می‌خورد؛ دکمه‌ها همیشه دیده می‌شوند */
.wdn-modal { position: fixed; inset: 0; z-index: 5000; background: rgba(3, 8, 20, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.wdn-box { width: 100%; max-width: 620px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column;
    background: var(--card); border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.45); overflow: hidden; animation: aiPanelIn .35s cubic-bezier(.16, 1, .3, 1) both; }
.wdn-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--ink); }
.wdn-head .ic { color: var(--warning); flex-shrink: 0; }
.wdn-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px; font-size: 14px; line-height: 2.1; color: var(--ink); overscroll-behavior: contain; }
.wdn-body p { margin: 0 0 10px; }
.wdn-body ul { margin: 0 0 10px; padding-inline-start: 20px; }
.wdn-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.wdn-hint { flex: 1 1 100%; text-align: center; }
.wdn-foot .btn { min-width: 110px; }
.vid-modal { position: fixed; inset: 0; z-index: 5000; background: rgba(3, 8, 20, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.vid-box { width: 100%; max-width: 900px; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.vid-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.vid-title { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vid-x { background: var(--page); border: 0; width: 34px; height: 34px; border-radius: 10px; font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.vid-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
body.vid-open { overflow: hidden; }
@media (max-width: 560px) { .vid-btn span { display: none; } .vid-btn { width: 32px; padding: 0; justify-content: center; } .vid-modal { padding: 8px; } }

/* ══════════ دستیار هوشمند ══════════ */
.ai-fab { position: fixed; bottom: 18px; left: 18px; z-index: 4500; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px 0 14px;
    border: 0; border-radius: 25px; cursor: pointer; font: inherit; font-weight: 800; font-size: 13.5px; color: #fff;
    background: linear-gradient(135deg, var(--primary), #3E5486); box-shadow: 0 10px 28px rgba(1, 17, 53, .35); transition: transform .2s var(--ease); }
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab.on span { display: none; }
.ai-fab.on { padding: 0 14px; }
.ai-panel { position: fixed; bottom: 80px; left: 18px; z-index: 4600; width: 390px; max-width: calc(100vw - 24px); height: min(620px, calc(100vh - 110px));
    display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border-mid); border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0,0,0,.28); overflow: hidden; }
.ai-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: linear-gradient(135deg, var(--primary), #2A3C68); color: #fff; }
.ai-head b { flex: 1; font-size: 14.5px; }
.ai-ava { width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.ai-hbtn { background: rgba(255,255,255,.14); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 9px; font-size: 18px; line-height: 1; cursor: pointer; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--page); }
.ai-msg { display: flex; flex-direction: column; max-width: 88%; }
.ai-msg.me { align-self: flex-start; }
.ai-msg.bot { align-self: flex-end; }
html[dir="ltr"] .ai-msg.me { align-self: flex-end; }
html[dir="ltr"] .ai-msg.bot { align-self: flex-start; }
.ai-bubble { padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.9; overflow-wrap: anywhere; }
.ai-msg.me .ai-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.bot .ai-bubble { background: var(--card); color: var(--ink); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.ai-bubble ul { margin: 4px 0; padding-inline-start: 18px; }
.ai-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ai-act { border: 1.5px solid var(--primary); background: var(--card); color: var(--primary); border-radius: 10px; padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.ai-act:hover { background: var(--primary); color: #fff; }
.ai-act.ghost { border-style: dashed; }
.ai-act:disabled { opacity: .5; cursor: default; }
.ai-rate { display: flex; gap: 4px; margin-top: 4px; }
.ai-rate button { background: none; border: 0; cursor: pointer; font-size: 13px; opacity: .45; padding: 2px 4px; }
.ai-rate button.on, .ai-rate button:hover { opacity: 1; }
.ai-typing .ai-bubble { display: flex; gap: 4px; padding: 12px 14px; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: aiDot 1s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s; }
.ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; background: var(--card); border-top: 1px solid var(--border); flex-shrink: 0; scrollbar-width: none; }
.ai-chips::-webkit-scrollbar { display: none; }
.ai-chip { flex-shrink: 0; border: 1px solid var(--border-mid); background: var(--page); color: var(--ink); border-radius: 16px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.ai-chip:hover { border-color: var(--primary); color: var(--primary); }
.ai-form { display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px 12px; background: var(--card); border-top: 1px solid var(--border); }
.ai-form textarea { flex: 1; min-width: 0; resize: none; margin: 0; min-height: 40px; max-height: 110px; padding: 9px 11px; border-radius: 12px; font: inherit; font-size: 13.5px; }
.ai-send { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 12px; cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.ai-send { background: var(--primary); color: #fff; transform: scaleX(-1); }
html[dir="ltr"] .ai-send { transform: none; }
.ai-panel.busy .ai-send { opacity: .5; pointer-events: none; }
/* اشاره روی صفحه */
.ai-hl { outline: 3px solid #F5B301 !important; outline-offset: 3px; box-shadow: 0 0 0 8px rgba(245, 179, 1, .25) !important; animation: aiPulse 1.2s ease-in-out 4; position: relative; z-index: 2; }
@keyframes aiPulse { 50% { box-shadow: 0 0 0 14px rgba(245, 179, 1, .08); } }
.ai-filled { background-color: rgba(245, 179, 1, .12) !important; }
.ai-tip { position: absolute; z-index: 4700; max-width: 260px; background: #F5B301; color: #2A1E00; font-size: 13px; font-weight: 800; line-height: 1.8;
    padding: 8px 12px; border-radius: 12px; box-shadow: 0 10px 26px rgba(0,0,0,.25); pointer-events: none; }
.ai-tip::before { content: ''; position: absolute; top: -7px; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: #F5B301; }
.ai-tip.up::before { top: auto; bottom: -7px; border-bottom: 0; border-top: 7px solid #F5B301; }
.ai-nudge { position: fixed; bottom: 78px; left: 18px; z-index: 4500; max-width: 240px; background: var(--card); color: var(--ink); border: 1.5px solid var(--primary);
    border-radius: 14px 14px 14px 4px; padding: 9px 12px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 26px rgba(0,0,0,.2); }
/* ── انیمیشن‌های دستیار ── */
/* دکمه: ورود فنری، درخشش آرام دوره‌ای، تکان کوچک آیکن با هاور، فشردن با کلیک */
.ai-fab { animation: aiFabIn .6s cubic-bezier(.34, 1.56, .64, 1) backwards .35s; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s; }
.ai-fab::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: 0 0 0 0 rgba(62, 84, 134, .55); animation: aiGlow 3.2s ease-out 1.4s infinite; }

.ai-fab svg { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.ai-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 34px rgba(1, 17, 53, .42); }
.ai-fab:hover svg { animation: aiWiggle .7s ease-in-out; }
.ai-fab:active { transform: scale(.94); }
.ai-fab.on::after { animation: none; }
.ai-fab.on svg { transform: rotate(90deg) scale(.9); }
@keyframes aiFabIn { from { opacity: 0; transform: translateY(24px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes aiGlow { 0% { box-shadow: 0 0 0 0 rgba(62, 84, 134, .5); } 70%, 100% { box-shadow: 0 0 0 14px rgba(62, 84, 134, 0); } }
@keyframes aiWiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg) scale(1.12); } 55% { transform: rotate(10deg) scale(1.08); } 80% { transform: rotate(-4deg); } }
/* پنل: باز شدن از سمت دکمه، بستن نرم */
.ai-panel { transform-origin: bottom left; animation: aiPanelIn .55s cubic-bezier(.16, 1, .3, 1) both; }
.ai-panel.ai-out { animation: aiPanelOut .38s cubic-bezier(.55, 0, .45, 1) both; }
@keyframes aiPanelIn { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes aiPanelOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes aiSheetIn { from { transform: translateY(100%); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes aiSheetOut { from { transform: none; opacity: 1; } to { transform: translateY(100%); opacity: .6; } }
/* پیام تازه: لغزیدن و پیدا شدن؛ دکمه‌های اقدام کمی بعدتر */
.ai-msg.ai-new { animation: aiMsgIn .45s cubic-bezier(.16, 1, .3, 1) both; }
.ai-msg.me.ai-new { transform-origin: bottom left; }
.ai-msg.bot.ai-new { transform-origin: bottom right; }
.ai-msg.ai-new .ai-acts { animation: aiFade .3s ease-out .18s both; }
@keyframes aiMsgIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes aiFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ai-typing { animation: aiFade .25s ease-out both; }
.ai-chip { animation: aiFade .3s ease-out backwards; transition: transform .2s, border-color .2s, color .2s; }
.ai-chip:nth-child(2) { animation-delay: .06s; } .ai-chip:nth-child(3) { animation-delay: .12s; }
.ai-chip:hover, .ai-act:hover { transform: translateY(-1px); }
.ai-act { transition: background .2s, color .2s, transform .2s; }
.ai-send { transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), opacity .2s; }
.ai-send:active { transform: scaleX(-1) scale(.88); }
html[dir="ltr"] .ai-send:active { transform: scale(.88); }
.ai-rate button { transition: opacity .2s, transform .25s cubic-bezier(.34, 1.56, .64, 1); }
.ai-rate button.on { transform: scale(1.25); }
.ai-tip { animation: aiTipIn .35s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes aiTipIn { from { opacity: 0; transform: translateY(6px) scale(.85); } to { opacity: 1; transform: none; } }
.ai-nudge { animation: aiMsgIn .4s cubic-bezier(.22, 1.2, .36, 1) both; }
@media (prefers-reduced-motion: reduce) {
    .ai-fab, .ai-fab::after, .ai-fab:hover svg, .ai-panel, .ai-panel.ai-out, .ai-msg.ai-new, .ai-msg.ai-new .ai-acts, .ai-chip, .ai-tip, .ai-nudge, .ai-typing { animation: none !important; }
}
@media (max-width: 560px) {
    .ai-fab { bottom: calc(22px + env(safe-area-inset-bottom)); left: 14px; height: 48px; padding: 0 13px;
              box-shadow: 0 6px 16px rgba(1, 17, 53, .3); }
    .ai-fab span { display: none; }
    .ai-nudge { bottom: calc(80px + env(safe-area-inset-bottom)); left: 14px; }
    .ai-panel { transform-origin: bottom center; animation-name: aiSheetIn; }
    .ai-panel.ai-out { animation-name: aiSheetOut; }
    .ai-panel { left: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 82vh; height: 82dvh; border-radius: 20px 20px 0 0; }
    .ai-form { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* ستون کیف پول داشبورد: کیف پول اندازه‌ی خودش؛ زیرش سرمایه‌ی تحت مدیریت کل دلارکس (باقی ارتفاع ردیف را پر می‌کند) */
.dash-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dash-col > .dash-wallet { margin-bottom: 0; }
.dash-aum { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; position: relative; overflow: hidden;
    background: radial-gradient(120% 90% at 0% 0%, var(--primary-soft), transparent 60%), var(--card); }
.dash-aum::after { content: ''; position: absolute; inset-inline-start: -40px; bottom: -40px; width: 170px; height: 170px; border-radius: 50%;
    border: 18px solid var(--primary-soft); opacity: .7; pointer-events: none; }
.da-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.da-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary);
    display: grid; place-items: center; flex-shrink: 0; }
.da-lbl { font-size: 14px; font-weight: 700; color: var(--text); }
.da-tag { font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-soft); padding: 3px 9px; border-radius: 999px; }
.da-val { font-size: 32px; font-weight: 800; color: var(--primary); letter-spacing: .5px; line-height: 1.2; position: relative; z-index: 1;
    align-self: flex-start; }
.da-note { position: relative; z-index: 1; padding-top: 12px; border-top: 1px dashed var(--border);
    font-size: 12px; line-height: 1.9; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.da-note svg { flex-shrink: 0; margin-top: 4px; }
/* صفحه‌ی ورود: کد در بله هم ارسال شد */
.otp-via { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 14px; padding: 10px 12px; border-radius: 12px;
    background: var(--primary-soft); color: var(--text); font-size: 12.5px; line-height: 1.9; }
.otp-via svg { flex-shrink: 0; margin-top: 4px; color: var(--primary); }

/* ارسال مجدد کد / تماس صوتی: کنار هم، هر دو با شمارش معکوس */
.otp-alt { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.otp-alt > .btn { flex: 1 1 140px; justify-content: center; }

/* رابط جدید (آزمایشی): دکمه‌ی کوچک «امتحان دوباره» برای مشتری‌ای که به نسخه‌ی قبلی برگشته (ui2_bar) */
.ui2-try { display: flex; justify-content: center; padding: 8px 16px 0; margin: 0; }
.ui2-try button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px;
    border: 1px solid var(--border-mid); background: var(--card); color: var(--primary); font: inherit; font-size: 12.5px;
    cursor: pointer; transition: background .2s var(--ease); }
.ui2-try button:hover { background: var(--primary-soft); }

/* ══ گیم مانی (کوییز روزانه) — رنگ‌های دیزاین سیستم Figma: آبی برند #002AFA، سرمه‌ای #00139E، فیروزه‌ای #63F7F9 ══ */
.qz { max-width: 760px; margin-inline: auto;
    --qz-blue: #002AFA; --qz-navy: #00139E; --qz-cyan: #63F7F9; --qz-link: #002AFA; --qz-soft: #EEF1FF;
    --qz-grad: linear-gradient(135deg, #00139E 0%, #002AFA 100%); }
html[data-theme="dark"] .qz { --qz-link: #8FA2FF; --qz-soft: rgba(61,92,255,.14); }
.qz-slogan { text-align: center; font-size: 20px; font-weight: 900; margin: -4px 0 16px; letter-spacing: -.2px;
    background: linear-gradient(90deg, #002AFA, #1FB8F5); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="dark"] .qz-slogan { background-image: linear-gradient(90deg, #8FA2FF, #63F7F9); }

.qz-hero { text-align: center; padding: 28px 22px; color: #fff; border: 0; position: relative; overflow: hidden;
    background: radial-gradient(circle at 15% 0%, rgba(99,247,249,.28), transparent 45%), var(--qz-grad); }
.qz-hero-lead { opacity: .9; margin: 12px auto 16px; max-width: 460px; line-height: 1.9; }
.qz-hero-ic { display: inline-flex; width: 64px; height: 64px; border-radius: 20px; align-items: center; justify-content: center;
    background: rgba(255,255,255,.14); color: var(--qz-cyan); box-shadow: 0 0 0 6px rgba(99,247,249,.10); animation: qzFloat 3s ease-in-out infinite; }
@keyframes qzFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.qz-rules { list-style: none; padding: 0; margin: 0 auto 18px; max-width: 520px; text-align: start; display: grid; gap: 9px; }
.qz-rules li { display: flex; gap: 9px; align-items: flex-start; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.9; }
.qz-rules li > svg { flex-shrink: 0; margin-top: 5px; color: var(--qz-cyan); }
.qz-hero form { margin: 0; }
.qz-hero .btn.qz-start { background: var(--qz-cyan); color: var(--qz-navy); border-color: var(--qz-cyan); min-width: 220px; justify-content: center;
    font-weight: 800; box-shadow: 0 8px 24px rgba(99,247,249,.30); }   /* بر .btn.primary غلبه کند */
.qz-hero .btn.qz-start:hover { background: #8FFAFB; color: var(--qz-navy); }

.qz-game { padding: 20px; }
.qz-game.qz-in { animation: qzIn .35s var(--ease) both; }
@keyframes qzIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.qz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.qz-prog { display: flex; flex-direction: column; gap: 8px; }
.qz-step { font-weight: 800; color: var(--ink); }
.qz-dots { display: flex; gap: 6px; }
.qz-dots i { width: 22px; height: 6px; border-radius: 4px; background: var(--border-mid); transition: background .3s var(--ease), width .3s var(--ease); }
.qz-dots i.done { background: var(--qz-link); }
.qz-dots i.now { width: 34px; background: linear-gradient(90deg, var(--qz-cyan), var(--qz-blue)); }

/* تایمر حلقه‌ای: کمان گرادیانی فیروزه‌ای ← آبی که با گذشت زمان کوتاه می‌شود؛ ۵ ثانیه‌ی آخر قرمز و تپنده */
.qz-ring { position: relative; width: 80px; height: 80px; flex-shrink: 0; display: grid; place-items: center; }
.qz-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.qz-ring circle { fill: none; stroke-width: 7; }
.qz-ring-bg { stroke: var(--qz-soft); }
.qz-ring-fg { stroke: url(#qzGrad); stroke-linecap: round; stroke-dasharray: 213.6; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear, stroke .3s; }
.qz-ring-t { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }   /* یک بلوک وسط حلقه */
.qz-ring b { font-size: 24px; font-weight: 900; line-height: 1; color: var(--qz-link); font-variant-numeric: tabular-nums; }
.qz-ring small { font-size: 10px; line-height: 1; color: var(--muted); margin-top: 3px; }
.qz-hurry .qz-ring-fg { stroke: #F04438; }
.qz-hurry .qz-ring b { color: #F04438; }
.qz-hurry .qz-ring { animation: qzPulse .8s ease-in-out infinite; }
@keyframes qzPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }

.qz-q { font-size: 17px; font-weight: 800; line-height: 2; color: var(--ink); margin: 0 0 14px; user-select: none; -webkit-user-select: none; }
.qz-opts { display: grid; gap: 10px; user-select: none; -webkit-user-select: none; }
.qz-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 13px 14px; min-height: 52px;
    border: 1.5px solid var(--border-mid); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-size: 14.5px;
    cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease), transform .1s var(--ease); }
.qz-opt:hover:not(:disabled) { border-color: var(--qz-link); background: var(--qz-soft); }
.qz-opt:active:not(:disabled) { transform: scale(.985); }
.qz-opt:disabled { cursor: default; opacity: .6; }
.qz-opt.picked { opacity: 1; border-color: var(--qz-link); background: var(--qz-soft); }
.qz-let { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--qz-soft); font-size: 12px; font-weight: 800; color: var(--qz-link); }
.qz-opt.picked .qz-let { background: var(--qz-grad); color: #fff; }

.qz-result { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 22px; }
.qz-result.won { border: 1.5px solid var(--qz-cyan); background: linear-gradient(160deg, var(--card) 55%, rgba(99,247,249,.16)); }
.qz-score { width: 104px; height: 104px; border-radius: 50%; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--qz-grad); color: #fff; box-shadow: 0 10px 26px rgba(0,42,250,.28); }
.qz-result.won .qz-score { background: linear-gradient(135deg, #63F7F9 0%, #002AFA 100%); }
.qz-score b { font-size: 38px; line-height: 1; }
.qz-score span { font-size: 12px; opacity: .85; margin-top: 4px; }
.qz-res-txt { flex: 1 1 260px; min-width: 0; }
.qz-res-txt h2 { margin: 0 0 8px; font-size: 18px; }
.qz-res-txt .btn.primary { background: var(--qz-grad); border-color: var(--qz-blue); color: #fff; }
.qz-prize { display: flex; gap: 7px; align-items: flex-start; color: var(--success); font-size: 13.5px; line-height: 1.9; margin: 0 0 8px; }
.qz-prize svg { flex-shrink: 0; margin-top: 5px; }
.qz-cta-txt { line-height: 2; color: var(--ink-soft); margin: 0 0 12px; }
.qz-next { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.qz-next > span:first-child { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--ink-soft); }
.qz-next .chest-timer, .qz-next .chest-timer.soon { background: var(--qz-soft); color: var(--qz-link); }
.qz-next small { flex-basis: 100%; }
.qz-review { padding: 16px 18px; border-inline-start: 4px solid var(--success); }
.qz-review.bad { border-inline-start-color: var(--danger); }
.qz-rv-head { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.qz-rv-head > b { flex: 1 1 240px; line-height: 1.9; min-width: 0; }
.qz-rv-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--success); white-space: nowrap; }
.qz-review.bad .qz-rv-badge { color: var(--danger); }
.qz-rv-opts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.qz-rv-opts li { padding: 8px 12px; border-radius: 10px; background: var(--page); font-size: 13.5px; display: flex; justify-content: space-between; gap: 8px; }
.qz-rv-opts li small { font-weight: 700; white-space: nowrap; }
.qz-rv-opts li.right { background: var(--success-soft); color: var(--success); font-weight: 700; }
.qz-rv-opts li.wrong { background: var(--danger-soft); color: var(--danger); }
.qz-explain { display: flex; gap: 7px; margin: 10px 0 0; font-size: 13px; line-height: 1.9; color: var(--ink-soft); }
.qz-explain svg { flex-shrink: 0; margin-top: 5px; color: var(--qz-link); }
@media (max-width: 600px) {
    .qz-hero { padding: 22px 14px; }
    .qz-result { flex-direction: column; text-align: center; }
    .qz-res-txt { flex-basis: auto; }   /* در ستون، پایه‌ی ۲۶۰px ارتفاع خالی می‌ساخت */
    .qz-prize { justify-content: center; }
    .qz-q { font-size: 16px; }
    .qz-ring { width: 70px; height: 70px; }
}
@media (prefers-reduced-motion: reduce) { .qz-hero-ic, .qz-game.qz-in, .qz-hurry .qz-ring { animation: none !important; } }

/* تصویر پیش‌فرض پروفایل (avatar_tag بدون عکس): روز = آبی برند، شب = گرادیان آبی←فیروزه‌ای */
.avatar.av-def { background: transparent; }
.avatar.av-def img.av-l { display: var(--logo-light); }
.avatar.av-def img.av-d { display: var(--logo-dark); }

/* ── نسخه‌ی بتا: برچسب منو و نوار بالای صفحه‌ی امکانِ در حال آزمایش ── */
.nav-new-beta { background: linear-gradient(135deg, #6D28D9 0%, #A78BFA 100%) !important; color: #fff !important; animation: none !important; letter-spacing: .6px; }
.beta-strip { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-md);
    background: rgba(124,58,237,.08); border: 1px dashed rgba(124,58,237,.45); color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.beta-strip .beta-tag { padding: 2px 9px; border-radius: 6px; background: linear-gradient(135deg, #6D28D9, #A78BFA); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .6px; }
.beta-strip > span:nth-child(2) { flex: 1 1 220px; min-width: 0; }
.beta-strip a { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: #6D28D9; white-space: nowrap; }
html[data-theme="dark"] .beta-strip a { color: #C4B5FD; }
/* هانی‌پات فرم ورود: برای انسان نامرئی و بیرون از ترتیب Tab؛ ربات‌ها پرش می‌کنند */
.hp-field { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
