/* ==========================================================================
   Zaya — Design System v7 "Aurora Midnight"
   Deep dark SaaS look: glass-glow cards, violet→cyan gradient accents,
   solid dark navbar, bigger page titles, full RTL + mobile-first responsive.
   ========================================================================== */

/* ---------------- فونت وزیر (داخلی، بدون نیاز به CDN) ---------------- */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-FD-WOL.woff2') format('woff2'),
         url('../fonts/Vazir-FD-WOL.woff') format('woff'),
         url('../fonts/Vazir-FD-WOL.ttf') format('truetype'),
         url('../fonts/Vazir-FD-WOL.eot') format('embedded-opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Bold-FD-WOL.woff2') format('woff2'),
         url('../fonts/Vazir-Bold-FD-WOL.woff') format('woff'),
         url('../fonts/Vazir-Bold-FD-WOL.ttf') format('truetype'),
         url('../fonts/Vazir-Bold-FD-WOL.eot') format('embedded-opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* برند: بنفش-نیلی الکتریکی به فیروزه‌ای درخشان — ترکیبی متفاوت از تم قبلی */
    --brand: #7c6cff;
    --brand-2: #9d8bff;
    --brand-dark: #b9adff;      /* برای متن روی زمینه‌ی تیره */
    --brand-light: rgba(124, 108, 255, .16);
    --accent: #2dd4bf;
    --accent-2: #ffb84d;
    --ink: #f5f6fc;
    --ink-soft: #cdd0e6;
    --muted: #9296b3;
    --bg: #0a0b13;
    --bg-2: #0d0f1a;
    --surface: #14151f;
    --surface-2: #191b28;
    --border: rgba(255, 255, 255, .09);
    --border-strong: rgba(255, 255, 255, .16);
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .35);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, .45);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .55);
    --glow: 0 0 0 1px rgba(124, 108, 255, .18), 0 10px 30px rgba(124, 108, 255, .18);
    --font: 'Vazir', Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}
body { overflow-x: hidden; }

body {
    font-family: var(--font);
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 480px at 100% -10%, rgba(124, 108, 255, .14), transparent 60%),
        radial-gradient(700px 420px at -10% 20%, rgba(45, 212, 191, .09), transparent 60%);
    background-attachment: fixed;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand); color: #fff; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover, a:focus { text-decoration: none; }

/* ---------------- تیتر صفحات، کمی بزرگ‌تر و پررنگ‌تر در همه‌جا ---------------- */
h1, h2, h3, h4, h5, h6 { color: var(--ink); }
h1 { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.05rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 1.1rem + .75vw, 1.65rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-weight: 800; }

/* ---------------- Scrollbar ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 20px; border: 2px solid var(--bg); }

/* ---------------- Navbar ----------------
   ناوبر تیره‌ی شیشه‌ای (glass) که با پس‌زمینه‌ی صفحه یکدست می‌شود؛ برای
   خوانایی لوگو در حالت‌های مختلف، یک لایه‌ی محو زیر برند اضافه شده است. */
:root {
    --nav-bg: linear-gradient(135deg, rgba(20, 21, 33, .88) 0%, rgba(13, 14, 23, .88) 100%);
    --nav-ink: #f5f6fc;
    --nav-border: rgba(255, 255, 255, .08);
    --nav-link-color: rgba(245, 246, 252, .68);
    --nav-link-hover-color: #fff;
    --nav-link-hover-bg: rgba(255, 255, 255, .07);
    --nav-toggler-border: rgba(255, 255, 255, .18);
    --nav-toggler-hover-bg: rgba(255, 255, 255, .06);
    --nav-toggler-hover-border: rgba(255, 255, 255, .32);
    --account-toggle-bg: rgba(255, 255, 255, .05);
    --brand-name-grad-start: #fff;
    --btn-close-filter: invert(1) grayscale(1) brightness(1.8);
    --lp-form-bg: rgba(20, 21, 31, .78);
    --scrollbar-thumb: #2a2d3d;
    --alert-success-text: #6ee7d8;
    --alert-danger-text: #ff9b9b;
    --alert-warning-text: #ffcf8a;
    --tint-text: #fff;
    /* لایه‌های نازک شیشه‌ای/کنتراست (زبرا، تِرَک نوار پیشرفت، بج‌ها) که روی
       زمینه‌ی تیره با سفیدِ نیمه‌شفاف کار می‌کنند؛ در تم روشن باید با
       تیره‌ی نیمه‌شفاف جایگزین شوند وگرنه روی سطح روشن دیده نمی‌شوند. */
    --tint-015: rgba(255, 255, 255, .015);
    --tint-06: rgba(255, 255, 255, .06);
    --tint-08: rgba(255, 255, 255, .08);
    --tint-2: rgba(255, 255, 255, .2);
}

/* ==========================================================================
   تم روشن — با افزودن data-theme="light" روی <html> (توسط assets/js/theme.js
   و بر اساس انتخاب ذخیره‌شده‌ی کاربر) فعال می‌شود. تم تیره پیش‌فرض و بدون
   تغییر باقی می‌ماند؛ تمام رنگ‌های پایه اینجا بازتعریف می‌شوند تا همه‌ی
   صفحات به‌صورت خودکار (بدون تغییر در HTML هر صفحه) هماهنگ شوند. چند بخشِ
   عمداً رنگی/گرادیانی (هیرو، CTA، بنتوی بزرگ لندینگ) به‌عنوان المان برند
   در هر دو تم تیره باقی می‌مانند. */
html[data-theme="light"] {
    --brand-dark: #5b48e8;
    --brand-light: rgba(124, 108, 255, .10);
    --ink: #1a1b25;
    --ink-soft: #454a63;
    --muted: #6b7086;
    --bg: #f4f5fa;
    --bg-2: #eceef5;
    --surface: #ffffff;
    --surface-2: #f4f5fa;
    --border: rgba(20, 21, 40, .10);
    --border-strong: rgba(20, 21, 40, .18);
    --shadow-sm: 0 2px 12px rgba(20, 21, 40, .07);
    --shadow-md: 0 14px 34px rgba(20, 21, 40, .09);
    --shadow-lg: 0 22px 55px rgba(20, 21, 40, .13);
    --glow: 0 0 0 1px rgba(124, 108, 255, .18), 0 10px 26px rgba(124, 108, 255, .16);

    --nav-bg: linear-gradient(135deg, rgba(255, 255, 255, .92) 0%, rgba(247, 247, 252, .92) 100%);
    --nav-ink: #1a1b25;
    --nav-border: rgba(20, 21, 40, .08);
    --nav-link-color: rgba(26, 27, 37, .62);
    --nav-link-hover-color: #14151f;
    --nav-link-hover-bg: rgba(20, 21, 40, .05);
    --nav-toggler-border: rgba(20, 21, 40, .18);
    --nav-toggler-hover-bg: rgba(20, 21, 40, .05);
    --nav-toggler-hover-border: rgba(20, 21, 40, .32);
    --account-toggle-bg: rgba(20, 21, 40, .04);
    --brand-name-grad-start: #1a1b25;
    --btn-close-filter: none;
    --lp-form-bg: rgba(255, 255, 255, .82);
    --scrollbar-thumb: #d7d9e6;
    --alert-success-text: #0f9b6c;
    --alert-danger-text: #c22b2b;
    --alert-warning-text: #a15b06;
    --tint-text: var(--brand-dark);
    --tint-015: rgba(20, 21, 40, .03);
    --tint-06: rgba(20, 21, 40, .05);
    --tint-08: rgba(20, 21, 40, .07);
    --tint-2: rgba(20, 21, 40, .12);
}
html[data-theme="light"] body {
    background-image:
        radial-gradient(900px 480px at 100% -10%, rgba(124, 108, 255, .08), transparent 60%),
        radial-gradient(700px 420px at -10% 20%, rgba(45, 212, 191, .06), transparent 60%);
}
html[data-theme="light"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26,27,37,0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar {
    background: var(--nav-bg) !important;
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 1px 0 var(--nav-border), 0 10px 30px rgba(0, 0, 0, .4);
    border-bottom: 1px solid var(--nav-border);
    padding-top: .65rem;
    padding-bottom: .65rem;
}
.navbar > .container { align-items: center; }
.navbar-brand {
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex-shrink: 0;
    color: var(--nav-ink) !important;
}
.navbar-brand.has-logo { gap: 0; }
.navbar-brand.has-logo .brand-name { display: none; }
.navbar-brand .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: linear-gradient(90deg, var(--brand-name-grad-start), var(--brand-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.navbar-brand img.brand-logo {
    height: 34px;
    max-height: 34px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
    /* لوگوهای مشکی/تیره روی ناوبر تیره گم می‌شوند؛ یک چیپ سفید پررنگ پشت
       لوگو گذاشته می‌شود تا همیشه واضح و پیدا دیده شود، صرف‌نظر از رنگ لوگو. */
    background: #fff;
    padding: 4px 10px;
}
.navbar-nav {
    gap: .2rem;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: .3rem;
}
@media (min-width: 992px) {
    .navbar-nav { flex-wrap: nowrap; }
}
.navbar .nav-link {
    font-weight: 700;
    color: var(--nav-link-color);
    border-radius: 10px;
    padding: .55rem .8rem !important;
    transition: background .15s ease, color .15s ease, transform .15s ease;
    font-size: .92rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
@media (min-width: 992px) and (max-width: 1320px) {
    .navbar .nav-link { padding: .55rem .6rem !important; font-size: .87rem; }
}
.navbar .nav-link:hover,
.navbar .nav-link:focus { color: var(--nav-link-hover-color); background: var(--nav-link-hover-bg); }
.navbar .nav-link.active-link {
    color: #fff !important;
    background: linear-gradient(90deg, #5b48e8, var(--brand));
    box-shadow: 0 6px 18px rgba(124, 108, 255, .38);
}
.navbar .nav-link.nav-cta:not(.active-link) {
    color: var(--accent-2);
    background: rgba(255, 184, 77, .1);
    border: 1px solid rgba(255, 184, 77, .25);
}
.navbar .nav-link.nav-cta:not(.active-link):hover {
    background: rgba(255, 184, 77, .18);
    color: var(--accent-2);
}
.navbar-toggler {
    border: 1.5px solid var(--nav-toggler-border);
    border-radius: 10px;
    box-shadow: none !important;
    flex-shrink: 0;
    padding: .4rem .55rem;
    transition: border-color .15s ease, background .15s ease;
}
.navbar-toggler:hover { background: var(--nav-toggler-hover-bg); border-color: var(--nav-toggler-hover-border); }
.navbar-toggler-icon { width: 1.3em; height: 1.3em; filter: none; }

/* ---------------- دکمه‌ی تعویض تم (روشن/تیره) در ناوبر — همیشه قابل مشاهده،
   چه در دسکتاپ و چه در موبایل (چه منوی همبرگر باز باشد چه بسته) ---------------- */
.theme-toggle-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid var(--nav-toggler-border);
    background: transparent;
    color: var(--nav-ink);
    font-size: 1.05rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.theme-toggle-icon-btn:hover { background: var(--nav-toggler-hover-bg); border-color: var(--nav-toggler-hover-border); }
.theme-toggle-icon-btn:active { transform: scale(.92); }
.theme-toggle-icon-btn .theme-icon-dark { display: none; }
html[data-theme="light"] .theme-toggle-icon-btn .theme-icon-light { display: none; }
html[data-theme="light"] .theme-toggle-icon-btn .theme-icon-dark { display: inline-block; }
.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(245,246,252,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------------- Navbar: منوی موبایل (زیر lg) ---------------- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--nav-bg);
        margin: .65rem -1rem -.65rem;
        padding: .5rem 1rem .85rem;
        border-top: 1px solid var(--nav-border);
    }
    .navbar-nav { gap: .15rem; }
    .navbar .nav-link { padding: .65rem .95rem !important; border-radius: 10px; font-size: .93rem; }
    .navbar .nav-link i { width: 20px; text-align: center; }
}

/* ---------------- Navbar: منوی «پروفایل» (dropdown) ---------------- */
.account-toggle {
    background: var(--account-toggle-bg);
    border: 1px solid var(--nav-border);
}
.account-toggle::after { margin-inline-start: .5em; }
.account-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-inline-end: .45rem;
    text-transform: uppercase;
}
.account-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-dropdown {
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    background: var(--surface-2);
    padding: .4rem;
    min-width: 200px;
}
.account-dropdown .dropdown-item {
    border-radius: 9px;
    padding: .55rem .7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    color: var(--ink-soft);
}
.account-dropdown .dropdown-item:hover,
.account-dropdown .dropdown-item:focus { background: var(--brand-light); color: var(--tint-text); }
.dropdown-menu { background: var(--surface-2); border: 1px solid var(--border); }
.dropdown-divider { border-color: var(--border); }
@media (max-width: 991.98px) {
    .account-toggle { background: transparent; border-color: transparent; justify-content: flex-start; }
    .account-name { max-width: none; }
}

/* ---------------- Cards ----------------
   خط تاکید گرادیانی نازک بالای هر کارت + پس‌زمینه‌ی کمی لایه‌دار برای
   حس عمق بیشتر، به‌جای یک باکس تخت ساده. */
.card {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), var(--surface);
    color: var(--ink);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:not(.modal-content)::before {
    content: '';
    position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    opacity: .55;
}
.card:not(.modal-content):not(.no-hover):hover {
    box-shadow: var(--glow);
    border-color: rgba(124, 108, 255, .35);
    transform: translateY(-2px);
}
.card-header, .card-footer { background: rgba(255, 255, 255, .02); border-color: var(--border); }
.modal-content { background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); }
.modal-header, .modal-footer { border-color: var(--border); }
.btn-close { filter: var(--btn-close-filter); }

/* ---------------- ورود ملایم محتوای هر صفحه ---------------- */
@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
main.container,
main.container-fluid { animation: page-fade-in .35s ease both; }
@media (prefers-reduced-motion: reduce) {
    main.container, main.container-fluid { animation: none; }
}

/* ---------------- Buttons ---------------- */
.btn {
    border-radius: 12px;
    font-weight: 700;
    padding: .55rem 1.1rem;
    letter-spacing: -.01em;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
    background: linear-gradient(90deg, var(--brand), var(--accent));
    border: none;
    box-shadow: 0 8px 24px rgba(124, 108, 255, .38);
}
.btn-primary:hover, .btn-primary:focus {
    filter: brightness(1.08);
    box-shadow: 0 12px 28px rgba(124, 108, 255, .48);
}
.btn-outline-primary {
    border: 1.5px solid var(--brand);
    color: var(--brand-dark);
}
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-success { background: linear-gradient(90deg, #17b894, var(--accent)); border: none; }
.btn-light { background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); }
.btn-light:hover { background: var(--surface-2); filter: brightness(1.15); color: var(--ink); }
.btn-secondary { background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--ink); }
.btn-sm { border-radius: 9px; }
.btn-icon {
    width: 40px; height: 40px; padding: 0; display: inline-flex;
    align-items: center; justify-content: center; border-radius: 12px;
}

/* ---------------- Forms ----------------
   نکته‌ی مهم: از background-color (نه background شورت‌هند) استفاده می‌شود
   تا background-image/repeat/position آیکون فلش select بوت‌استرپ که بعداً
   ست می‌شود، پاک/ریست نشود (باگ قبلی: فلش‌های تکرارشونده داخل select). */
.form-control, .form-select {
    border-radius: 11px;
    border: 1.5px solid var(--border);
    padding: .6rem .9rem;
    background-color: var(--surface-2);
    color: var(--ink);
}
.form-control::placeholder { color: var(--muted); }
.form-control:disabled, .form-control[readonly],
.form-select:disabled {
    background-color: var(--surface);
    color: var(--muted);
    border-color: var(--border);
    opacity: 1;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(124, 108, 255, .2);
    background-color: var(--surface-2);
    color: var(--ink);
}
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239296b3' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left .75rem center;
    background-size: 16px 12px;
}
.form-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%237c6cff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left .75rem center;
    background-size: 16px 12px;
}
.form-select option { background: var(--surface-2); color: var(--ink); }
.form-label { font-weight: 700; font-size: .87rem; color: var(--ink-soft); margin-bottom: .4rem; }
.input-group-text { background: var(--brand-light); border: 1.5px solid var(--border); color: var(--brand-dark); font-weight: 600; }

/* اصلاح گروه‌های ورودی LTR (مثل کلید API و لینک افیلیت) داخل صفحه‌ی RTL:
   چون از bootstrap.rtl.css استفاده می‌شود، گردی گوشه‌ها و چیدمان دکمه‌ی کپی
   با dir="ltr" محلی خودکار درست نمی‌شد و برعکس نمایش داده می‌شد. */
.input-group[dir="ltr"] > .form-control:not(:last-child) {
    border-top-left-radius: 11px !important;
    border-bottom-left-radius: 11px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.input-group[dir="ltr"] > .btn:not(:first-child) {
    border-top-right-radius: 11px !important;
    border-bottom-right-radius: 11px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin-right: 0 !important;
    margin-left: -1px !important;
}
.form-control-color { border-radius: 11px; height: 46px; }
.form-check-input { background-color: var(--surface-2); border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.text-muted { color: var(--muted) !important; }
.text-body { color: var(--ink) !important; }
.form-text { color: var(--muted); }

/* دکمه‌ی «Choose File» در اینپوت‌های آپلود فایل، هماهنگ با تم تیره */
input[type="file"].form-control { padding: .5rem .6rem; }
input[type="file"].form-control::file-selector-button {
    background: var(--surface); color: var(--ink-soft); border: 1px solid var(--border);
    border-radius: 8px; padding: .45rem .9rem; margin-inline-end: .75rem; font-weight: 700;
    cursor: pointer; transition: all .15s ease;
}
input[type="file"].form-control::file-selector-button:hover { background: var(--brand-light); color: var(--tint-text); border-color: var(--brand); }
input[type="file"].form-control::-webkit-file-upload-button {
    background: var(--surface); color: var(--ink-soft); border: 1px solid var(--border);
    border-radius: 8px; padding: .45rem .9rem; margin-inline-end: .75rem; font-weight: 700; cursor: pointer;
}

/* ---------------- Hero ---------------- */
.hero {
    background: linear-gradient(135deg, #241f52 0%, #120f2e 100%);
    border-radius: 28px;
    color: #fff;
    padding: 3.4rem 2.2rem;
    margin-bottom: -3.5rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, .06);
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(500px 260px at 100% 0%, rgba(124, 108, 255, .3), transparent 60%),
        radial-gradient(420px 240px at 0% 100%, rgba(45, 212, 191, .18), transparent 60%);
}
.hero h1 { font-weight: 800; position: relative; font-size: clamp(1.55rem, 1.3rem + 1vw, 2.05rem); }
.hero .lead { opacity: .92; position: relative; }
.hero-form-card { position: relative; z-index: 2; margin-top: 2rem; }

/* ---------------- Misc ---------------- */
.short-link-box { direction: ltr; text-align: left; font-weight: 700; }
.plan-card { transition: transform .18s ease, box-shadow .18s ease; }
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--glow); }
.plan-card.current { border: 2px solid var(--brand); background: var(--brand-light); }

/* جدول‌ها: کانتینر گرد و قاب‌دار + هدر برجسته + راه‌راه ملایم برای خوانایی بهتر */
.table-responsive {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
}
.table-responsive .table { margin-bottom: 0; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-active-color: var(--ink); --bs-table-hover-color: var(--ink); --bs-table-striped-color: var(--ink); }
.table th, .table td { vertical-align: middle; border-color: var(--border); padding: .8rem .9rem; }
.table thead th {
    background: rgba(124, 108, 255, .14);
    color: var(--brand-dark);
    font-weight: 700;
    border: none;
    font-size: .82rem;
    letter-spacing: .01em;
    text-transform: uppercase;
    padding: .9rem .9rem;
}
.table > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: var(--tint-015); background-color: var(--tint-015); }
.table-hover > tbody > tr:hover > * {
    background-color: rgba(124, 108, 255, .1);
    --bs-table-accent-bg: rgba(124, 108, 255, .1);
    color: var(--ink);
}
.table-hover > tbody > tr:hover a { color: var(--brand-dark); }
.badge { border-radius: 8px; font-weight: 700; padding: .45em .75em; letter-spacing: -.01em; }

/* ---------------------------------------------------------------------
   جدول‌ها در موبایل → کارت
   ---------------------------------------------------------------------
   app.js با خواندن متن thead، برچسب (data-label) هر <td> را ست می‌کند.
   در عرض‌های کوچک، ردیف‌های جدول به‌شکل کارت عمودی (برچسب: مقدار) نمایش
   داده می‌شوند تا نیازی به اسکرول افقی برای دیدن گزارش‌ها نباشد.
   ------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* فقط وقتی جاوااسکریپت برچسب‌ها را ساخت (table-cards-ready) به کارت تبدیل شو؛
       اگر جاوااسکریپت غیرفعال باشد، رفتار قبلی (اسکرول افقی) حفظ می‌شود */
    .table-responsive.table-cards-ready { border: none; background: transparent; overflow: visible; }
    .table-responsive.table-cards-ready table,
    .table-responsive.table-cards-ready thead,
    .table-responsive.table-cards-ready tbody,
    .table-responsive.table-cards-ready tr,
    .table-responsive.table-cards-ready th,
    .table-responsive.table-cards-ready td {
        display: block;
        width: 100%;
    }
    .table-responsive.table-cards-ready thead {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
    }
    .table-responsive.table-cards-ready tbody > tr {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        padding: .3rem 1rem;
        margin-bottom: .75rem;
        box-shadow: var(--shadow-sm);
    }
    .table-responsive.table-cards-ready tbody > tr:last-child { margin-bottom: 0; }
    .table-responsive.table-cards-ready tbody > tr:nth-of-type(odd) > * { background: transparent; }
    .table-responsive.table-cards-ready td {
        border: none;
        border-bottom: 1px dashed var(--border);
        padding: .65rem 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .9rem;
        /* جهت td همیشه از سند (راست‌به‌چپ) پیروی می‌کند تا ترتیب برچسب/مقدار
           در همه‌ی ردیف‌ها یکسان باشد؛ جهتِ اصلیِ سلول (مثلاً ایمیل/لینک که
           dir="ltr" داشت) با جاوااسکریپت روی خودِ span.td-value منتقل می‌شود. */
        direction: rtl;
        text-align: start;
    }
    .table-responsive.table-cards-ready td:last-child { border-bottom: none; }
    .table-responsive.table-cards-ready td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: .78rem;
        color: var(--muted);
        flex-shrink: 0;
    }
    /* مقدار واقعیِ سلول: قابل کوچک‌شدن، با تراز و جهتِ مخصوص به خودش */
    .table-responsive.table-cards-ready td .td-value {
        min-width: 0;
        flex: 1 1 auto;
        text-align: start;
    }
    /* ستون‌های بدون برچسب (مثل عملیات) کل عرض کارت را می‌گیرند و دکمه‌ها به‌صورت شبکه‌ای چیده می‌شوند */
    .table-responsive.table-cards-ready td:not([data-label]) {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .table-responsive.table-cards-ready td .btn,
    .table-responsive.table-cards-ready td form { margin: .15rem 0; }
    .table-responsive.table-cards-ready td.text-nowrap { white-space: normal; }
    .table-responsive.table-cards-ready td.text-truncate {
        /* دیگر کل ردیف را باریک نمی‌کنیم؛ فقط مقدار داخل آن بریده می‌شود */
        max-width: none !important;
    }
    .table-responsive.table-cards-ready td.text-truncate .td-value {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1 1 0%;
    }
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.4rem 1.2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.stat-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent)); opacity: .55;
}
.stat-card::after {
    content: ''; position: absolute; inset: auto -30% -60% auto; width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(124, 108, 255, .18), transparent 70%);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--glow); border-color: rgba(124, 108, 255, .3); }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; background: linear-gradient(90deg, var(--brand-dark), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .stat-label { color: var(--muted); font-size: .84rem; font-weight: 600; }

/* ---------------- Dashboard home ---------------- */
.dash-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: linear-gradient(120deg, rgba(124, 108, 255, .14), transparent 65%), var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.6rem 1.7rem; box-shadow: var(--shadow-sm);
}
.dash-hero h2 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); }
.dash-hero-plan {
    display: inline-flex; align-items: center; gap: .4rem; background: var(--surface-2); border: 1.5px solid var(--brand);
    color: var(--brand-dark); font-weight: 700; font-size: .85rem; padding: .5rem 1rem; border-radius: 999px;
    box-shadow: var(--shadow-sm); white-space: nowrap;
}

.quick-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
@media (max-width: 768px) { .quick-actions { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .quick-actions { grid-template-columns: repeat(2, 1fr); } }
.quick-action-btn {
    display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.1rem .6rem;
    color: var(--ink); font-weight: 700; font-size: .82rem; text-decoration: none;
    box-shadow: var(--shadow-sm); transition: all .15s;
}
.quick-action-btn:hover { transform: translateY(-3px); box-shadow: var(--glow); color: var(--tint-text); border-color: var(--brand); }
.quick-action-icon {
    width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: #fff;
}
.qa-brand { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.qa-blue  { background: linear-gradient(135deg, #22d3ee, #0284c7); }
.qa-pink  { background: linear-gradient(135deg, #ff6b9d, var(--accent-2)); }
.qa-green { background: linear-gradient(135deg, #22c58b, #0f9b6c); }
.qa-amber { background: linear-gradient(135deg, var(--accent-2), #f97316); }

.stat-card-v2 { text-align: right; padding-top: 1.1rem; height: 100%; display: flex; flex-direction: column; }
.stat-icon-badge {
    width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #fff; margin-bottom: .7rem;
}
.sib-brand { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.sib-blue  { background: linear-gradient(135deg, #22d3ee, #0284c7); }
.sib-amber { background: linear-gradient(135deg, var(--accent-2), #f97316); }
.sib-green { background: linear-gradient(135deg, #22c58b, #0f9b6c); }

.usage-bar { height: 6px; border-radius: 999px; background: var(--tint-08); overflow: hidden; }
.usage-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .3s; }
.usage-bar-fill.usage-bar-danger { background: linear-gradient(90deg, #d13a3a, #ff6b6b); }

#qrCanvasWrap { display: flex; justify-content: center; padding: 1rem; background: #fff; border-radius: 14px; }

/* ---------------- Page heading ----------------
   بلوک عنوان صفحات داخلی (داشبورد/ادمین): عنوان بزرگ‌تر و پررنگ‌تر با
   آیکون گرادیانی درخشان و خط جداکننده‌ی نرم زیرش. */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: .75rem;
    padding-bottom: 1.1rem; margin-bottom: 1.6rem;
    border-bottom: 1px solid var(--border);
}
.page-head .page-head-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.page-title {
    display: flex; align-items: center; gap: .7rem; font-weight: 800; letter-spacing: -.01em;
    font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem);
}
.page-title-icon {
    width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 6px 16px rgba(124, 108, 255, .35);
}
.page-title i { color: var(--brand); }
.page-title-text { display: flex; flex-direction: column; gap: .15rem; }
.page-title-text .page-sub { font-size: .88rem; font-weight: 600; }
.page-sub { color: var(--muted); }
.page-eyebrow {
    display: block; font-size: .76rem; font-weight: 800; color: var(--accent);
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem;
}

/* ---------------- تیک آبی احراز هویت ---------------- */
.verify-badge {
    display: inline-flex; align-items: center; vertical-align: -3px; margin-inline-start: .3rem;
    filter: drop-shadow(0 2px 4px rgba(29, 155, 240, .45));
    transition: transform .15s ease;
}
.verify-badge svg { display: block; }
.name:hover .verify-badge, .bio-name:hover .verify-badge { transform: scale(1.08); }
.verify-hero {
    display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(29, 155, 240, .12), rgba(124, 108, 255, .1));
    border: 1px solid rgba(29, 155, 240, .25);
}
.verify-hero .verify-hero-icon {
    width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1d9bf0, var(--brand)); color: #fff; font-size: 1.4rem; box-shadow: 0 8px 20px rgba(29, 155, 240, .4);
}
.doc-thumb {
    width: 84px; height: 84px; object-fit: cover;
    border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    cursor: zoom-in; transition: transform .15s ease, box-shadow .15s ease;
}
.doc-thumb:hover { transform: scale(1.05); box-shadow: var(--shadow-md); }

/* ---------------- زیرمنوی پنل مدیریت ---------------- */
.admin-subnav {
    display: flex; flex-wrap: wrap; gap: .5rem; width: 100%; max-width: 100%;
    box-sizing: border-box; padding-bottom: 1rem; margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.admin-subnav a {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem .9rem; border-radius: 999px; font-weight: 700; font-size: .87rem;
    color: var(--ink-soft); background: var(--surface); border: 1px solid var(--border);
    white-space: nowrap; transition: all .15s ease;
}
.admin-subnav a:hover { border-color: var(--brand); color: var(--tint-text); }
.admin-subnav a.active {
    background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; border-color: transparent;
    box-shadow: 0 6px 16px rgba(124, 108, 255, .38);
}
.admin-subnav a .nav-count {
    background: var(--tint-2); border-radius: 999px; font-size: .72rem; padding: .05rem .4rem;
}
.admin-subnav a:not(.active) .nav-count { background: var(--accent-2); color: #171a2e; }

/* ---------------- تیکت پشتیبانی ---------------- */
.ticket-row { display: block; padding: .9rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); transition: all .15s ease; }
.ticket-row:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.ticket-thread { display: flex; flex-direction: column; gap: .9rem; }
.tmsg { max-width: 80%; padding: .75rem 1rem; border-radius: 16px; position: relative; color: var(--ink); }
.tmsg-user { align-self: flex-start; background: var(--brand-light); border-bottom-left-radius: 4px; }
.tmsg-admin { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--border); border-bottom-right-radius: 4px; }
.tmsg-meta { font-size: .72rem; color: var(--muted); margin-top: .3rem; }
@media (max-width: 575.98px) { .tmsg { max-width: 92%; } }

/* ---------------- Section card header ---------------- */
.section-card h6 { font-weight: 800; display: flex; align-items: center; gap: .5rem; color: var(--ink); }
.section-card h6 i { color: var(--brand); font-size: 1.05rem; }

/* ---------------- Template picker ---------------- */
.template-pick { cursor: pointer; display: block; }
.template-swatch {
    height: 84px; border-radius: 14px; border: 2px solid transparent;
    transition: all .15s; position: relative; overflow: hidden;
}
.template-pick.active .template-swatch { border-color: var(--brand); box-shadow: 0 6px 18px rgba(124, 108, 255, .35); transform: translateY(-2px); }
.template-pick.active { color: var(--brand-dark); font-weight: 700; }
.tpl-classic  { background: linear-gradient(150deg,#6d5efc,#211c46); }
.tpl-dark     { background: linear-gradient(150deg,#15151f,#000); }
.tpl-minimal  { background: #f4f4f7; border: 1px solid #444 !important; }
.tpl-cards    { background: repeating-linear-gradient(0deg,#6d5efc 0 10px,#eef2ff 10px 18px); }
.tpl-sunset   { background: linear-gradient(150deg,#ff6b9d,#ff9a44); }
.tpl-ocean    { background: linear-gradient(150deg,#00c6fb,#005bea); }
.tpl-forest   { background: linear-gradient(150deg,#134e5e,#71b280); }
.tpl-mono     { background: linear-gradient(150deg,#3a3f5c,#171a2e); }

/* ---------------- Background preset picker (dashboard bio editor) ---------------- */
.bg-preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
@media (max-width: 576px) { .bg-preset-grid { grid-template-columns: repeat(3, 1fr); } }
.bg-preset-pick { cursor: pointer; display: block; }
.bg-preset-swatch {
    height: 64px; border-radius: 14px; border: 2px solid transparent;
    transition: all .15s; position: relative; overflow: hidden;
}
.bg-preset-pick.active .bg-preset-swatch { border-color: var(--brand); box-shadow: 0 6px 18px rgba(124, 108, 255, .35); transform: translateY(-2px); }
.bg-preset-pick.active { color: var(--brand-dark); font-weight: 700; }
.bg-preset-none { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.2rem; }

/* ---------------- Block editor modal (bio builder) ---------------- */
#blockModal .modal-dialog { max-height: calc(100vh - 3.5rem); }
#blockModal .modal-content { max-height: calc(100vh - 3.5rem); }
#blockModal .modal-body {
    max-height: calc(100vh - 12rem);
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
@media (max-width: 576px) {
    #blockModal .modal-dialog, #blockModal .modal-content { max-height: calc(100vh - 1.5rem); }
    #blockModal .modal-body { max-height: calc(100vh - 9rem); }
}

/* ---------------- Social platform picker (block modal) ---------------- */
.social-row-card {
    border: 1.5px solid var(--border); border-radius: 12px; padding: .6rem;
    background: var(--surface-2); transition: border-color .15s, box-shadow .15s;
}
.social-row-card:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.social-row-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.social-value-input { width: 100%; }
.social-row-remove {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center;
    justify-content: center; background: var(--surface); border: 1.5px solid var(--border); color: #ff6b6b; cursor: pointer;
    transition: all .15s;
}
.social-row-remove:hover { background: rgba(255, 107, 107, .12); border-color: rgba(255, 107, 107, .4); }

.social-picker { position: relative; flex: 1; min-width: 0; }
.social-picker-btn {
    width: 100%; display: flex; align-items: center; gap: .5rem; text-align: right;
    background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: .45rem .6rem;
    font-size: .85rem; font-weight: 600; color: var(--ink); cursor: pointer; overflow: hidden;
}
.social-picker-btn:hover { border-color: var(--brand); }
.social-picker-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-picker-chevron { flex-shrink: 0; color: var(--muted); }
.social-picker-icon {
    width: 26px; height: 26px; min-width: 26px; border-radius: 8px; display: flex; align-items: center;
    justify-content: center; font-size: .9rem; flex-shrink: 0;
}
.social-picker-panel {
    display: none; position: fixed; z-index: 1080;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
    padding: .4rem;
}
.social-picker.open .social-picker-panel { display: block; }
.social-picker-list { max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.social-picker-opt {
    display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 9px; cursor: pointer;
    font-size: .85rem; font-weight: 600; color: var(--ink);
}
.social-picker-opt:hover { background: var(--brand-light); }

/* ---------------- Block builder (dashboard bio editor) ---------------- */
.block-type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
@media (max-width: 576px) { .block-type-grid { grid-template-columns: repeat(3, 1fr); } }
.block-type-btn {
    border: 1.5px solid var(--border); background: var(--surface-2); border-radius: 14px;
    padding: .8rem .4rem; text-align: center; cursor: pointer; transition: all .15s;
}
.block-type-btn:hover { border-color: var(--brand); background: var(--brand-light); transform: translateY(-2px); }
.block-type-btn i { font-size: 1.35rem; color: var(--brand); display: block; margin-bottom: .3rem; }
.block-type-btn span { font-size: .74rem; font-weight: 700; color: var(--ink-soft); }

.block-item {
    background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px;
    padding: .9rem 1rem; margin-bottom: .7rem; display: flex; align-items: flex-start; gap: .7rem;
    box-shadow: var(--shadow-sm);
}
.block-item.dragging { opacity: .4; }
.block-drag-handle { cursor: grab; color: var(--muted); padding-top: .2rem; font-size: 1.1rem; }
.block-icon-badge {
    width: 40px; height: 40px; min-width: 40px; border-radius: 11px; background: color-mix(in srgb, var(--btc, var(--brand)) 18%, transparent);
    color: var(--btc, var(--brand-dark)); display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.block-item-body { flex: 1; min-width: 0; }
.block-item-title { font-weight: 700; font-size: .92rem; display: flex; align-items: center; gap: .4rem; }
.block-item-sub { color: var(--muted); font-size: .78rem; }
.block-item-actions { display: flex; gap: .3rem; }
.block-item { border-right: 3px solid var(--btc, transparent); transition: opacity .15s, transform .15s; }
.block-item:hover { transform: translateY(-1px); }
.block-item.is-inactive { opacity: .55; }
.block-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; }

/* ---------------- Block-type picker group labels ---------------- */
.block-group-label {
    font-size: .76rem; font-weight: 700; color: var(--muted); margin: 1rem 0 .5rem;
    text-transform: uppercase; letter-spacing: .02em;
}
.block-group-label:first-of-type { margin-top: .3rem; }
.block-type-btn i { color: var(--btc, var(--brand)); }
.block-type-btn:hover { border-color: var(--btc, var(--brand)); background: color-mix(in srgb, var(--btc, var(--brand)) 12%, transparent); }

/* ---------------- Free / subscription badge on block picker ---------------- */
.block-type-btn { position: relative; }
.bt-tag {
    position: absolute; top: -7px; inset-inline-end: -4px; font-size: .58rem; font-weight: 800;
    padding: .12rem .38rem; border-radius: 999px; line-height: 1.5; letter-spacing: 0;
    border: 1px solid transparent; white-space: nowrap;
}
.bt-tag.free { background: color-mix(in srgb, #22c55e 16%, transparent); color: #15a34a; border-color: color-mix(in srgb, #22c55e 34%, transparent); }
.bt-tag.pro  { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; border-color: color-mix(in srgb, #f59e0b 40%, transparent); }
.block-type-btn.is-locked { opacity: .62; }
.block-type-btn.is-locked:hover { transform: none; border-color: color-mix(in srgb, #f59e0b 45%, transparent); background: color-mix(in srgb, #f59e0b 8%, transparent); }
.block-type-btn.is-locked i::after {
    content: "\F47B"; font-family: "bootstrap-icons"; position: absolute; bottom: 26px; inset-inline-start: 8px;
    font-size: .62rem; color: #b45309;
}

/* ---------------- Repeatable rows (products / marketplaces) ---------------- */
.rep-row {
    border: 1.5px solid var(--border); border-radius: 14px; padding: .8rem; margin-bottom: .7rem;
    background: var(--surface-2); position: relative;
}
.rep-row .rep-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; }
.rep-row .rep-num { font-size: .78rem; font-weight: 800; color: var(--muted); }
.rep-thumb { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.day-chip { display: flex; align-items: center; gap: .35rem; padding: .42rem .7rem; border: 1.5px solid var(--border); border-radius: 999px; font-size: .8rem; font-weight: 700; cursor: pointer; background: var(--surface-2); }
.day-chip input { accent-color: var(--brand); cursor: pointer; }
.day-chip:has(input:checked) { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }
.pro-lock-note { font-size: .78rem; line-height: 1.8; }

/* ---------------- Dark-theme tabs for the bio settings card ---------------- */
.bio-settings-tabs { border-bottom: 1px solid var(--border); gap: .25rem; }
.bio-settings-tabs .nav-link {
    color: var(--muted); font-weight: 700; font-size: .88rem; border: none; border-radius: 10px 10px 0 0;
    padding: .55rem 1rem; background: transparent; display: flex; align-items: center; gap: .4rem;
}
.bio-settings-tabs .nav-link:hover { color: var(--ink-soft); }
.bio-settings-tabs .nav-link.active { color: var(--brand-dark); background: var(--brand-light); }

/* ---------------- Public bio page live preview frame ---------------- */
.bio-preview-wrap { position: sticky; top: 84px; z-index: 1; }
.bio-preview-frame {
    border-radius: 26px; border: 8px solid #05060a; overflow: hidden; max-width: 520px; margin: 0 auto;
    box-shadow: var(--shadow-lg); background: #05060a; height: 560px;
}
.bio-preview-frame iframe { width: 100%; height: 100%; border: none; }
@media (max-width: 991.98px) { .bio-preview-wrap { position: static; } }

@media (max-width: 576px) {
    .container { padding-left: 12px; padding-right: 12px; }
    .hero { border-radius: 18px; padding: 2.3rem 1.3rem; margin-bottom: -2.5rem; }
    .stat-card .stat-value { font-size: 1.6rem; }
}

.lp-hero, .lp-steps-section {
    width: auto; position: relative; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}

/* =========================================================
   لندینگ‌پیج
   ========================================================= */
.lp-hero {
    position: relative; overflow: hidden; padding: 6.5rem 0 4rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    margin-top: -1.5rem;
}
.lp-hero::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(620px 420px at 8% -10%, rgba(124, 108, 255, .28), transparent 60%),
        radial-gradient(560px 380px at 100% 10%, rgba(45, 212, 191, .2), transparent 60%),
        radial-gradient(500px 340px at 55% 120%, rgba(255, 184, 77, .12), transparent 60%);
}
.lp-hero > .container { position: relative; z-index: 1; }

.lp-badge {
    display: inline-flex; align-items: center; gap: .5rem; background: var(--tint-06);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid var(--border-strong);
    color: var(--brand-dark); padding: .45rem 1rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.lp-badge i { color: var(--accent); }
.lp-badge::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, .5); animation: lpPulse 2s ease-out infinite;
}
@keyframes lpPulse {
    0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, .5); }
    70% { box-shadow: 0 0 0 7px rgba(45, 212, 191, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}
.lp-title { font-size: clamp(1.9rem, 1.6rem + 1.3vw, 2.7rem); font-weight: 800; line-height: 1.3; margin: 1.1rem 0; color: var(--ink); letter-spacing: -.02em; }
.lp-title-accent {
    background: linear-gradient(90deg, var(--brand-dark), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-lead { color: var(--muted); font-size: 1.1rem; max-width: 480px; line-height: 1.85; }

.lp-stats { display: flex; gap: 2rem; margin-top: 1.75rem; flex-wrap: wrap; }
.lp-stat-num { display: block; font-size: 1.6rem; font-weight: 800; color: var(--brand-dark); }
.lp-stat-label { display: block; font-size: .8rem; color: var(--muted); }

.lp-mockup { position: relative; max-width: 420px; margin: 0 auto; }
.lp-browser { background: var(--surface); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); transform: rotate(-1.5deg); transition: transform .3s ease; border: 1px solid var(--border-strong); }
.lp-mockup:hover .lp-browser { transform: rotate(0deg) translateY(-4px); }
.lp-browser-bar { background: var(--surface-2); padding: .65rem .9rem; display: flex; align-items: center; gap: 6px; }
.lp-browser-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); display: inline-block; }
.lp-browser-url { margin-right: auto; direction: ltr; background: var(--bg-2); border-radius: 8px; padding: .28rem .65rem; font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 4px; box-shadow: inset 0 0 0 1px var(--border); }
.lp-browser-body { padding: 1.4rem; }
.lp-fake-row { height: 10px; border-radius: 6px; background: var(--surface-2); margin-bottom: .6rem; }
.lp-fake-card { display: flex; align-items: center; gap: .7rem; background: var(--brand-light); border-radius: 12px; padding: .8rem 1rem; margin: 1.1rem 0; }
.lp-fake-card i { font-size: 1.4rem; color: var(--brand-dark); }
.lp-fake-chart { display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.lp-fake-chart span { flex: 1; background: linear-gradient(180deg, var(--brand), var(--accent)); border-radius: 4px 4px 0 0; }

.lp-qr-float, .lp-pin-float {
    position: absolute; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg);
    padding: .6rem .9rem; font-size: .78rem; font-weight: 700; display: flex; align-items: center; gap: 6px;
    animation: lpFloat 3.5s ease-in-out infinite; color: var(--ink);
}
.lp-qr-float { top: -14px; left: -14px; font-size: 1.4rem; padding: .75rem; color: var(--brand-dark); }
.lp-pin-float { bottom: 14px; right: -22px; color: var(--accent); animation-delay: -1.75s; }
@keyframes lpFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.lp-form-card {
    position: relative; z-index: 1;
    background: var(--lp-form-bg);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-radius: 24px; padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-top: 3.25rem;
    border: 1px solid var(--border-strong);
}
.lp-form-card::before {
    content: ''; position: absolute; top: 0; right: 10%; left: 10%; height: 3px; border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    opacity: .9;
}

.lp-section { padding: 4.5rem 0; }
.lp-eyebrow { color: var(--accent); font-weight: 800; font-size: .8rem; letter-spacing: .05em; display: block; margin-bottom: .4rem; text-transform: uppercase; }
.lp-h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.85rem); font-weight: 800; color: var(--ink); }

.lp-bento { background: var(--surface); border-radius: 18px; padding: 1.5rem; height: 100%; border: 1px solid var(--border); transition: transform .15s, box-shadow .15s, border-color .15s; }
.lp-bento:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: rgba(124, 108, 255, .3); }
.lp-bento i { font-size: 1.6rem; color: var(--brand-dark); margin-bottom: .6rem; display: inline-block; }
.lp-bento h5, .lp-bento h6 { font-weight: 800; color: var(--ink); }
.lp-bento p { color: var(--muted); margin-bottom: 0; }
.lp-bento-big { background: linear-gradient(160deg, #2a2266 0%, #14122c 100%); color: #fff; border-color: rgba(124, 108, 255, .25); }
.lp-bento-big i { color: var(--accent); font-size: 2rem; }
.lp-bento-big h5 { color: #fff; font-size: 1.3rem; }
.lp-bento-big p { color: rgba(255, 255, 255, .78); }

.lp-steps-section { background: var(--bg-2); padding: 4.5rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-step { width: 60px; height: 60px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-strong); margin: 0 auto; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.lp-step span { font-size: 1.4rem; font-weight: 800; background: linear-gradient(90deg, var(--brand-dark), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lp-cta { background: linear-gradient(90deg, #2a2266, #120f2e); border: 1px solid rgba(124, 108, 255, .3); border-radius: 22px; padding: 2.5rem; color: #fff; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem; margin: 1rem 0 3rem; box-shadow: var(--shadow-lg); }
.lp-cta h3 { font-weight: 800; margin-bottom: .3rem; font-size: clamp(1.15rem, 1.02rem + .5vw, 1.4rem); color: #fff; }

@media (max-width: 991px) {
    .lp-mockup { max-width: 320px; margin-bottom: 1rem; }
    .lp-form-card { margin-top: 1.5rem; }
    .lp-cta { text-align: center; justify-content: center; }
    .block-type-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------- بنر تبلیغاتی ---------------- */
.ad-banner {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.ad-banner img {
    width: 100%;
    display: block;
    max-height: 160px;
    object-fit: cover;
}
.ad-banner-tag {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: .68rem;
    padding: .18rem .55rem;
    border-radius: 6px;
    backdrop-filter: blur(2px);
}
.ad-banner-dashboard_top img { max-height: 120px; }
.ad-banner-bio_top,
.ad-banner-bio_bottom { margin-left: 1.25rem; margin-right: 1.25rem; }
.ad-banner-bio_top img,
.ad-banner-bio_bottom img { max-height: 140px; border-radius: 14px; }

/* ---------------- سایر عناصر بوت‌استرپ ---------------- */
.alert { border: 1px solid var(--border); }
.alert-success { background: rgba(45, 212, 191, .12); color: var(--alert-success-text); border-color: rgba(45, 212, 191, .3); }
.alert-danger { background: rgba(255, 107, 107, .12); color: var(--alert-danger-text); border-color: rgba(255, 107, 107, .3); }
.alert-warning { background: rgba(255, 184, 77, .12); color: var(--alert-warning-text); border-color: rgba(255, 184, 77, .3); }
.alert-info { background: rgba(124, 108, 255, .12); color: var(--brand-dark); border-color: rgba(124, 108, 255, .3); }
footer.text-muted { color: var(--muted) !important; border-color: var(--border) !important; }
.list-group-item { background: var(--surface); border-color: var(--border); color: var(--ink); }
code { color: var(--accent); }

/* پس‌زمینه‌های روشن بوت‌استرپ (مثلاً بلوک‌های کد API) روی تم تیره */
.bg-light { background: var(--bg-2) !important; color: var(--ink-soft) !important; border: 1px solid var(--border); }
.bg-white { background: var(--surface) !important; color: var(--ink) !important; }
.text-dark { color: var(--ink) !important; }
pre { color: var(--ink-soft); }
hr { border-color: var(--border); opacity: 1; }

/* =========================================================
   PWA — دکمه‌ی نصب اپلیکیشن + سازگاری با نمایش standalone
   ========================================================= */
.pwa-install-btn {
    position: fixed;
    inset-inline-end: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 1080;
    display: flex;
    align-items: center;
    gap: .55rem;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .75rem 1.1rem;
    font-family: var(--font);
    font-weight: 700;
    font-size: .86rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    animation: pwaBtnIn .25s ease;
}
.pwa-install-btn i { font-size: 1rem; }
.pwa-install-close {
    background: rgba(255, 255, 255, .22);
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    line-height: 1;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline-start: .25rem;
}
@keyframes pwaBtnIn {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* وقتی اپ به‌صورت PWA نصب‌شده (standalone) باز می‌شود، فاصله‌ی امن بالا/پایین
   دستگاه (نوار وضعیت/دسته‌ی هوم) رعایت شود */
@media all and (display-mode: standalone) {
    body { padding-top: env(safe-area-inset-top, 0px); }
    .navbar.sticky-top { top: env(safe-area-inset-top, 0px); }
    .pwa-install-btn { display: none; } /* از قبل نصب شده، دیگر لازم نیست */
}

/* =========================================================
   بهبودهای عمومی موبایل — جلوگیری از اسکرول افقی ناخواسته و
   خواناتر شدن کارت‌ها/دکمه‌ها/مودال‌ها در صفحه‌نمایش کوچک
   ========================================================= */
@media (max-width: 575.98px) {
    .container, main.container { padding-left: .85rem; padding-right: .85rem; }
    .page-title { font-size: 1.25rem; }
    .card, .stat-card, .dash-hero { padding: 1rem; }
    .modal-dialog { margin: .6rem; }
    .btn { font-size: .88rem; }
    canvas { max-width: 100% !important; }
    .d-flex.justify-content-between.align-items-center.mb-4 { row-gap: .6rem; }
}


/* ============================================================
   گزارش و آمار پیشرفته (نسخه ۲۱)
   ============================================================ */
.an-row { margin-bottom: .6rem }
.an-bar { height: 6px; border-radius: 6px; background: rgba(127,127,127,.15); overflow: hidden; margin-top: 4px }
.an-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #4f46e5, #8b5cf6) }
.an-up { color: #16a34a; font-weight: 700 }
.an-down { color: #dc2626; font-weight: 700 }
.an-flat { color: #6b7280 }
.an-kpi { border-radius: 16px; padding: 1rem; border: 1.5px solid rgba(127,127,127,.2) }
.an-kpi .v { font-size: 1.6rem; font-weight: 800; line-height: 1.2 }
.an-kpi .l { font-size: .82rem; opacity: .75 }
.an-range .btn { border-radius: 999px }
.an-badge-map { font-size: .72rem; padding: .15rem .45rem; border-radius: 999px }

/* ============================================================
   مرتب‌سازی کشیدنی بلوک‌های یکلینک (نسخه ۲۷)
   دستگیره‌ی کشیدن روی لمس هم کار می‌کند (touch-action:none) و هنگام
   کشیدن، ترنزیشن/هاور بلوک‌ها خاموش می‌شود تا آیتم زیر انگشت «نپرد».
   ============================================================ */
.block-drag-handle {
    cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none;
    background: none; border: 0; padding: .2rem .15rem; border-radius: 8px; color: var(--muted);
}
.block-drag-handle:active { cursor: grabbing; }
.block-drag-handle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
body.bs-no-select, body.bs-no-select * { -webkit-user-select: none !important; user-select: none !important; }
#blockList.bs-sorting .block-item { transition: none !important; }
#blockList.bs-sorting .block-item:hover { transform: none !important; }
.block-item.bs-dragging {
    opacity: .96; transform: scale(1.012); position: relative; z-index: 5;
    border-color: var(--brand) !important; box-shadow: 0 16px 36px rgba(16, 24, 40, .18);
}
.block-item.bs-moved { animation: bsPulse .34s ease; }
@keyframes bsPulse { from { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); } to { background: var(--surface); } }

/* دکمه‌های بالا/پایین: مسیر جایگزین مرتب‌سازی (موبایل، کیبورد، بدون درگ) */
.block-order-btns { display: flex; flex-direction: column; gap: .1rem; margin-inline-end: .1rem; }
.block-order-btns button {
    border: 0; background: none; color: var(--muted); cursor: pointer;
    line-height: 1; padding: .1rem .25rem; border-radius: 6px; font-size: .7rem;
}
.block-order-btns button:hover:not(:disabled) { background: rgba(127, 127, 127, .16); color: inherit; }
.block-order-btns button:disabled { opacity: .3; cursor: default; }

/* نشانگر وضعیت ذخیره‌ی ترتیب */
.sort-status { font-size: .76rem; display: inline-flex; align-items: center; gap: .3rem; }
.sort-status.is-ok { color: #19c37d; }
.sort-status.is-err { color: #e5484d; }
.sort-status.is-busy { color: var(--muted); }

/* بلوکی که انیمیشنش خاموش است */
.block-item.anim-off .block-anim-btn { opacity: .45; }
.block-anim-btn.is-on { color: var(--brand-dark, var(--brand)); }

/* دستگیره‌های مرتب‌سازی در پنل مدیریت (دسته‌بندی ویترین، شبکه‌های اجتماعی) */
.drag-handle { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.drag-handle:active { cursor: grabbing; }
li.bs-dragging { background: rgba(124, 108, 255, .08); }
