/* =========================================================
   کارت‌من — سیستم طراحی پایه (Design System)
   ========================================================= */

:root {
    --bg: #f5fafa;
    --surface: #ffffff;
    --surface-2: #ecf5f5;
    --border: #dceaea;
    --text: #12232a;
    --text-soft: #55686e;
    --text-faint: #61757b;

    --primary: #0e7c86;
    --primary-dark: #0a5f67;
    --primary-soft: #e2f4f5;
    --accent: #f2543f;
    --accent-2: #1b93c9;
    --accent-warm: #ff8a70;
    --accent-soft: #7fd8dd;
    --grad-brand: linear-gradient(135deg, #12a0a8 0%, #0e7c86 45%, #f2543f 100%);

    --success: #14996b;
    --success-soft: #e4f5ed;
    --danger: #ce4040;
    --danger-soft: #fdecec;

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-full: 999px;
    --radius-btn: 12px;

    --shadow-sm: 0 1px 2px rgba(9, 35, 40, .04), 0 1px 3px rgba(9, 35, 40, .05);
    --shadow: 0 4px 10px rgba(9, 35, 40, .05), 0 10px 24px rgba(9, 35, 40, .07);
    --shadow-lg: 0 10px 24px rgba(9, 35, 40, .08), 0 24px 48px rgba(9, 35, 40, .12);

    --container: 1180px;
    --ease: cubic-bezier(.22, 1, .36, 1);

    --font-body: 'BNazanin', 'Vazirmatn', Tahoma, sans-serif;
    --font-heading: 'Baloo Bhaijaan 2', 'Vazirmatn', Tahoma, sans-serif;
}

/* Vazirmatn روی خود سایت (جایگزین متن و تیترها؛ دیگر از گوگل دریافت نمی‌شود) */
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 100 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Black.woff2') format('woff2'); font-weight: 800 900; font-style: normal; font-display: swap; }
@font-face {
    font-family: 'BNazanin';
    src: url('../fonts/BNazanin.woff') format('woff'), url('../fonts/BNazanin.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0c1416;
        --surface: #121d20;
        --surface-2: #18272b;
        --border: #23383d;
        --text: #eef6f6;
        --text-soft: #a9bcbf;
        --text-faint: #8ba1a5;
        --primary-soft: #0d3237;
        --success-soft: #0e2a20;
        --danger-soft: #2c1518;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
}
h1 { font-weight: 800; }
p { margin: 0; }
.brand-text, .btn, .tab-btn, .nav-toggle, .dcard-name, .mini-name, .error-code {
    font-family: var(--font-heading);
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- دکمه‌ها ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s, border-color .2s, filter .2s;
    white-space: nowrap;
}
.btn .ico, .btn .ico-sm { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); filter: brightness(.97); }
.btn:focus-visible { outline-offset: 3px; }

.btn-primary {
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 92%, white 8%), var(--primary));
    color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 1px 2px rgba(10, 95, 103, .12), 0 6px 16px rgba(10, 95, 103, .24);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 2px 4px rgba(10, 95, 103, .16), 0 10px 22px rgba(10, 95, 103, .3); filter: brightness(1.03); }

.btn-light { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-sm); border-color: var(--border); }
.btn-light:hover { box-shadow: var(--shadow); }

.btn-outline {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.btn-outline:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); color: var(--primary-dark); background: var(--primary-soft); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 8px 14px; font-size: .82rem; border-radius: 9px; }

/* ---------- فرم‌ها ---------- */
.field { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-label { font-size: .85rem; font-weight: 600; color: var(--text-soft); }

.field-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
}
.field-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea.field-control { resize: vertical; min-height: 90px; }


.field-error { color: var(--danger); font-size: .8rem; }
.field-hint { color: var(--text-faint); font-size: .78rem; }

/* ---------- Alert / Flash ---------- */
.flash-wrap { padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.alert {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: .9rem; font-weight: 500;
    animation: slideDown .4s var(--ease);
}
.alert .ico { width: 18px; height: 18px; flex-shrink: 0; }
.alert-success { background: var(--success-soft); color: #067a55; }
.alert-error { background: var(--danger-soft); color: #b32a2a; }
.alert-info { background: var(--primary-soft); color: var(--primary-dark); align-items: flex-start; line-height: 1.8; }

/* ---------- هدر ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateZ(0);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}
.brand-mark .ico { width: 18px; height: 18px; }
.brand-mark.lg { width: 52px; height: 52px; border-radius: 16px; margin-inline: auto; }
.brand-mark.lg .ico { width: 28px; height: 28px; }

.main-nav { display: flex; gap: 22px; margin-inline-end: auto; }
.main-nav a { color: var(--text-soft); font-size: .92rem; font-weight: 500; transition: color .2s; }
.main-nav a:hover { color: var(--primary-dark); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.main-nav .nav-mobile-only { display: none; }
.inline-form { display: inline; }

.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; border-radius: 10px; }
.nav-toggle:hover { background: var(--surface-2); }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 860px) {
    .main-nav { position: absolute; top: 72px; inset-inline: 0; background: var(--surface); flex-direction: column; padding: 16px 20px; border-bottom: 1px solid var(--border); display: none; }
    .main-nav.open { display: flex; }
    .nav-toggle { display: flex; }
    .header-actions > .btn-ghost { display: none; }
    .main-nav .nav-mobile-only { display: block; }
    .main-nav .nav-sep { height: 1px; background: var(--border); margin: 2px 0; }
    .field-row { grid-template-columns: 1fr; }
    /* منوی ☰ سمت راست (اول در راست‌به‌چپ)، دکمه‌ها سمت چپ */
    .nav-toggle { order: -1; margin-inline-start: -8px; }
    .header-actions { margin-inline-start: auto; }
}
@media (max-width: 480px) {
    /* گوشی: «ساخت کارت رایگان» در منوی ☰ و بالای صفحه هست؛ جا برای «ورود» و منو باز می‌شود */
    .header-actions > .btn-primary { display: none; }
    .header-inner { gap: 12px; }
}

/* ---------- فوتر ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 50px 0 24px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand { max-width: 280px; }
.footer-brand p { color: var(--text-faint); font-size: .85rem; margin-top: 10px; }
.footer-cols { display: flex; gap: 60px; }
.footer-cols h4 { font-size: .85rem; color: var(--text-faint); margin-bottom: 12px; }
.footer-cols a { display: block; color: var(--text-soft); font-size: .92rem; margin-bottom: 8px; transition: color .2s; }
.footer-cols a:hover { color: var(--primary-dark); }
/* پایین فوتر: کپی‌رایت + سازنده (لوگوی SAH) */
.footer-bottom {
    flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
    padding-top: 20px; border-top: 1px solid var(--border);
}
.footer-bottom .copyright { margin: 0; width: auto; }
.footer-credit { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: .82rem; }
.credit-badge {
    display: inline-flex; padding: 6px 12px; border-radius: 14px;
    /* لوگو متن سرمه‌ای دارد؛ در حالت تاریک هم روی زمینه روشن بماند تا خوانا باشد */
    background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.credit-badge img { display: block; width: 150px; height: auto; }
/* نماد اینماد: تصویر از سرور اینماد می‌آید؛ روی زمینه سفید تا در حالت تاریک هم خوانا باشد */
.enamad-seal a { display: inline-flex; padding: 4px; border-radius: 12px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.enamad-seal img { display: block; width: 84px; height: auto; min-height: 84px; }
@media (max-width: 600px) {
    .footer-bottom { flex-direction: column-reverse; text-align: center; }
    .footer-credit { flex-direction: column; gap: 8px; }
}
.copyright { width: 100%; text-align: center; color: var(--text-faint); font-size: .8rem; margin-top: 30px; }

/* ---------- انیمیشن‌ها ---------- */
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(3deg); } }
@keyframes pulseSoft { 0%, 100% { box-shadow: 0 0 0 0 rgba(219, 43, 102, .4); } 70% { box-shadow: 0 0 0 14px rgba(219, 43, 102, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-pop { opacity: 0; transform: scale(.7); transition: opacity .45s var(--ease), transform .45s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.reveal-pop.in-view { opacity: 1; transform: scale(1); }
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
.delay-3 { transition-delay: .3s; }
.delay-4 { transition-delay: .4s; }

/* ---------- صفحه خطا ---------- */
.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 60px 0; }
.error-box { text-align: center; }
.error-code { font-size: 6rem; font-weight: 900; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-box h1 { margin: 10px 0 24px; font-size: 1.3rem; color: var(--text-soft); }

/* ---------- آیکون‌ها ---------- */
/* ---------- کادر تمرکز (Focus Ring) یکسان برای دسترسی‌پذیری ---------- */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.ico { width: 20px; height: 20px; }
.ico-sm { width: 16px; height: 16px; }
.ico-xs { width: 14px; height: 14px; }
.ico-xl { width: 42px; height: 42px; }

/* نشان تعداد (مثلاً پاسخ جدید پشتیبانی در منوی کاربر) */
.site-header .nav-badge {
    display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 4px;
    border-radius: 999px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; line-height: 1;
}

/* ================= لودر ورود صفحه (views/partials/site-loader.php) =================
   body در این سایت transform دارد، پس position: fixed نسبت به body است، نه صفحه؛
   برای همین لودر کل body را می‌پوشاند و محتوایش با sticky وسط صفحه نمایش می‌ماند. */
.site-loader {
    position: fixed; inset: 0; z-index: 9999; min-height: 100vh;
    background: var(--bg);
    transition: opacity .55s cubic-bezier(.4, 0, .2, 1), visibility .55s;
    /* اگر JS اجرا نشد، خودش کنار می‌رود */
    animation: sl-failsafe .5s 6s forwards;
}
.sl-stage {
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.sl-glow {
    position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
    filter: blur(70px); opacity: .26; pointer-events: none;
    animation: sl-drift 6s ease-in-out infinite alternate;
}
.sl-glow-1 { background: #12a0a8; top: -14vmax; right: -12vmax; }
.sl-glow-2 { background: #f2543f; bottom: -18vmax; left: -14vmax; opacity: .18; animation-delay: -3s; }

.sl-logo {
    position: relative; width: 132px; height: 132px; margin-bottom: 18px;
    display: grid; place-items: center;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1), filter .6s;
}
.sl-orbit {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 55%, rgba(18, 160, 168, .9) 78%, #f2543f 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    opacity: 0; animation: sl-in .5s .15s forwards, sl-spin 1.4s linear infinite;
}
.sl-orbit-2 {
    inset: 14px; opacity: 0;
    background: conic-gradient(from 180deg, transparent 0 65%, rgba(242, 84, 63, .7) 100%);
    animation: sl-in .5s .3s forwards, sl-spin 2.2s linear infinite reverse;
}
.sl-tile {
    position: relative; width: 78px; height: 78px; border-radius: 22px; overflow: hidden;
    background: linear-gradient(135deg, #12a0a8 0%, #0e7c86 50%, #f2543f 100%);
    box-shadow: 0 14px 34px -10px rgba(14, 124, 134, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
    transform: scale(.4) rotate(-12deg); opacity: 0;
    animation: sl-pop .6s cubic-bezier(.34, 1.56, .64, 1) forwards, sl-breathe 2.4s 1s ease-in-out infinite;
}
.sl-mark { width: 100%; height: 100%; display: block; }
.sl-bolt {
    fill: rgba(255, 255, 255, 0); stroke: #fff; stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round;
    stroke-dasharray: 100; stroke-dashoffset: 100;
    animation: sl-draw .6s .25s cubic-bezier(.65, 0, .35, 1) forwards, sl-fill .4s .85s forwards;
}
.sl-shine {
    position: absolute; inset: -40%; pointer-events: none;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%);
    transform: translateX(-120%);
    animation: sl-shine 2.4s .9s ease-in-out infinite;
}
.sl-word {
    font-family: var(--font-heading); font-weight: 800; font-size: 2rem; line-height: 1.3;
    background: linear-gradient(90deg, #f2543f, #0e7c86 45%, #12a0a8);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    clip-path: inset(0 0 0 100%);
    animation: sl-reveal .55s .35s cubic-bezier(.65, 0, .35, 1) forwards;
}
.sl-tag {
    font-family: 'Vazirmatn', Tahoma, sans-serif; color: var(--text-faint); font-size: .85rem;
    opacity: 0; transform: translateY(6px);
    animation: sl-rise .45s .6s ease-out forwards;
}
.sl-bar {
    position: relative; width: 150px; height: 3px; margin-top: 18px; border-radius: 99px; overflow: hidden;
    background: var(--border);
    opacity: 0; animation: sl-in .4s .5s forwards;
}
.sl-bar span {
    position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: inherit;
    background: linear-gradient(90deg, #12a0a8, #f2543f);
    animation: sl-indeterminate 1.1s ease-in-out infinite;
}
.site-loader.is-complete .sl-bar span { animation: none; width: 100%; transition: width .25s ease-out; }

/* بدون برند سایت (کارت‌های پلان بدون برند) */
.site-loader.is-plain .sl-logo { width: 96px; height: 96px; margin-bottom: 4px; }
.sl-dots { display: flex; gap: 7px; }
.sl-dots i {
    width: 9px; height: 9px; border-radius: 50%; background: var(--primary);
    animation: sl-dot 1s ease-in-out infinite;
}
.sl-dots i:nth-child(2) { animation-delay: .15s; }
.sl-dots i:nth-child(3) { animation-delay: .3s; }

/* خروج */
.site-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.site-loader.is-done .sl-logo { transform: scale(1.18); filter: blur(4px); }

@keyframes sl-in { to { opacity: 1; } }
@keyframes sl-spin { to { transform: rotate(360deg); } }
@keyframes sl-pop { to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes sl-breathe {
    0%, 100% { box-shadow: 0 14px 34px -10px rgba(14, 124, 134, .6), inset 0 1px 0 rgba(255, 255, 255, .25); }
    50%      { box-shadow: 0 18px 46px -8px rgba(242, 84, 63, .5), inset 0 1px 0 rgba(255, 255, 255, .25); }
}
@keyframes sl-draw { to { stroke-dashoffset: 0; } }
@keyframes sl-fill { to { fill: rgba(255, 255, 255, .18); } }
@keyframes sl-shine { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }
@keyframes sl-reveal { to { clip-path: inset(0 0 0 0); } }
@keyframes sl-rise { to { opacity: 1; transform: none; } }
@keyframes sl-indeterminate { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes sl-drift { to { transform: translate(-4vmax, 3vmax) scale(1.08); } }
@keyframes sl-dot { 0%, 100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-8px); opacity: 1; } }
@keyframes sl-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

@media (prefers-reduced-motion: reduce) {
    .site-loader *, .site-loader *::before { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
    .sl-orbit, .sl-orbit-2 { display: none; }
}
@media print { .site-loader { display: none !important; } }

/* ================= نوار پیشرفت آپلود و کارهای طولانی (assets/js/upload-progress.js) =================
   body در این سایت transform دارد، پس fixed نسبت به body است؛ کارت با sticky وسط صفحه دیده می‌شود. */
html.kp-lock { overflow: hidden; }
.kp {
    position: fixed; inset: 0; z-index: 9998; display: none; min-height: 100vh;
    background: rgba(12, 28, 32, .42);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.kp.is-open { display: block; animation: kp-fade .25s ease-out; }
.kp-card {
    position: sticky; top: 50vh; transform: translateY(-50%);
    width: min(340px, calc(100vw - 32px)); margin: 0 auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
    box-shadow: 0 24px 60px -12px rgba(9, 35, 40, .35);
    padding: 28px 24px 24px; text-align: center;
    animation: kp-card-in .35s cubic-bezier(.34, 1.56, .64, 1);
}
.kp-visual { position: relative; width: 124px; height: 124px; margin: 0 auto 10px; }
.kp-ring { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.kp-track { fill: none; stroke: var(--surface-2); stroke-width: 7; }
.kp-fill {
    fill: none; stroke: url(#kpGrad); stroke-width: 7; stroke-linecap: round;
    transition: stroke-dashoffset .25s ease-out;
}
.kp.is-indeterminate .kp-fill { stroke-dashoffset: 240 !important; transition: none; }
.kp.is-indeterminate .kp-ring { animation: kp-spin 1s linear infinite; }
.kp-center { position: absolute; inset: 16px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; }
.kp-thumb { position: absolute; inset: 0; background: center / cover no-repeat; display: none; }
.kp.has-thumb .kp-thumb { display: block; }
.kp.has-thumb .kp-tile { display: none; }
.kp-tile {
    width: 64px; height: 64px; border-radius: 19px; display: grid; place-items: center;
    background: linear-gradient(135deg, #12a0a8 0%, #0e7c86 50%, #f2543f 100%);
    box-shadow: 0 10px 24px -8px rgba(14, 124, 134, .6);
    animation: kp-breathe 2s ease-in-out infinite;
}
.kp-icon { width: 40px; height: 40px; fill: none; stroke: #fff; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.kp.is-done .kp-tile { background: linear-gradient(135deg, #1fb57f, #14996b); animation: kp-pop .4s cubic-bezier(.34, 1.56, .64, 1); }
.kp.is-done .kp-thumb { display: none; }
.kp.is-done .kp-tile { display: grid; }
.kp.is-done .kp-icon polyline { stroke-dasharray: 60; stroke-dashoffset: 60; animation: kp-draw .45s .1s ease-out forwards; }
.kp.is-done .kp-fill { stroke: #14996b; }
.kp.is-error .kp-tile { display: grid; background: linear-gradient(135deg, #e0605a, #ce4040); animation: kp-shake .45s; }
.kp.is-error .kp-thumb { display: none; }
.kp.is-error .kp-fill { stroke: #ce4040; stroke-dashoffset: 0 !important; }
.kp.is-error .kp-ring { animation: none; }
.kp.is-error .kp-bar { display: none; }
.kp-pct { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); min-height: 1.2em; line-height: 1.2; }
.kp-title { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; color: var(--text); margin-top: 4px; }
.kp-sub { font-size: .86rem; color: var(--text-soft); margin-top: 4px; min-height: 1.3em; }
.kp-bar { position: relative; height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 16px 6px 0; }
.kp-bar span { position: absolute; inset: 0 0 0 auto; width: 0; border-radius: inherit; background: linear-gradient(270deg, #12a0a8, #f2543f); transition: width .25s ease-out; }
.kp.is-indeterminate .kp-bar span { width: 40% !important; animation: kp-slide 1.1s ease-in-out infinite; }
.kp-actions { margin-top: 16px; }
.kp-actions[hidden] { display: none; }

@keyframes kp-fade { from { opacity: 0; } }
@keyframes kp-card-in { from { transform: translateY(-50%) scale(.85); opacity: 0; } }
@keyframes kp-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes kp-spin { to { transform: rotate(270deg); } }
@keyframes kp-breathe { 50% { transform: scale(1.06); } }
@keyframes kp-draw { to { stroke-dashoffset: 0; } }
@keyframes kp-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes kp-slide { 0% { transform: translateX(110%); } 100% { transform: translateX(-260%); } }
@media (prefers-reduced-motion: reduce) {
    .kp *, .kp { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ================= اعلان‌ها: زنگوله سربرگ، فهرست کشویی و صفحه /notifications ================= */
.notif-wrap { position: relative; }
.notif-btn {
    position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-soft); display: grid; place-items: center; transition: color .2s, border-color .2s;
}
.notif-btn:hover, .notif-btn[aria-expanded="true"] { color: var(--primary-dark); border-color: var(--primary); }
.notif-btn .ico { width: 20px; height: 20px; }
.notif-badge {
    position: absolute; top: -6px; inset-inline-start: -6px; min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 99px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800;
    display: grid; place-items: center; line-height: 1; border: 2px solid var(--bg);
    animation: notif-pulse 2s ease-in-out infinite;
}
@keyframes notif-pulse { 50% { transform: scale(1.12); } }
.notif-panel {
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 360px; max-height: min(70vh, 520px);
    display: flex; flex-direction: column; overflow: hidden; z-index: 60;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 20px 50px -12px rgba(9, 35, 40, .28);
    animation: notif-in .2s ease-out;
}
.notif-panel[hidden] { display: none; }
@keyframes notif-in { from { opacity: 0; transform: translateY(-6px); } }
.notif-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-panel-head a { font-size: .82rem; color: var(--primary-dark); font-weight: 600; }
.notif-panel .notif-list { overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: start; }
.notif-item:last-child { border-bottom: 0; }
.notif-item.is-unread { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.notif-item.is-action { background: linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 80%, transparent), color-mix(in srgb, #fde7e2 60%, transparent)); }
.notif-ico {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
    background: var(--surface-2); color: var(--primary-dark);
}
.notif-ico-showcase_request { background: linear-gradient(135deg, #12a0a8, #f2543f); color: #fff; }
.notif-ico-announcement { background: linear-gradient(135deg, #0e7c86, #1b93c9); color: #fff; }
.notif-ico-job_request { background: #fef3c7; color: #92400e; }
.notif-ico-job_approved { background: var(--success-soft); color: var(--success); }
.notif-ico-job_rejected { background: var(--danger-soft); color: var(--danger); }
.notif-ico-mission_approved { background: var(--success-soft); color: var(--success); }
.notif-ico-mission_rejected { background: var(--danger-soft); color: var(--danger); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { display: block; font-size: .9rem; color: var(--text); line-height: 1.6; }
.notif-text { margin: 4px 0 0; font-size: .82rem; color: var(--text-soft); line-height: 1.8; }
.notif-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.notif-actions form { margin: 0; }
.notif-answer { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: .78rem; color: var(--text-faint); }
.notif-answer.is-yes { color: var(--success); }
.notif-answer .ico-sm { width: 14px; height: 14px; }
.notif-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .74rem; color: var(--text-faint); }
.notif-meta a { color: var(--primary-dark); font-weight: 600; }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; color: var(--text-faint); font-size: .88rem; }
.notif-empty .ico { width: 30px; height: 30px; opacity: .6; }
.notif-page { max-width: 720px; padding-top: 32px; padding-bottom: 20px; }
.notif-page-head h1 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; margin: 0 0 4px; }
.notif-page-head { margin-bottom: 18px; }
.notif-list-page { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.notif-pager { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
@media (max-width: 480px) {
    /* گوشی: فهرست اعلان تمام‌عرض زیر سربرگ */
    .notif-wrap { position: static; }
    .notif-panel { position: absolute; top: 72px; inset-inline: 10px; width: auto; }
}

/* ================= جستجوی آنی (assets/js/live-search.js) ================= */
.ls-hide { display: none !important; }
/* کشویی قابل جستجو */
.ls-combo { position: relative; }
.ls-combo .ls-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.ls-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
    text-align: start; cursor: pointer; font: inherit; color: var(--text);
}
.ls-trigger::after {
    content: ''; flex-shrink: 0; width: 8px; height: 8px; margin-inline-start: 4px;
    border-inline-end: 2px solid var(--text-faint); border-bottom: 2px solid var(--text-faint);
    transform: translateY(-2px) rotate(45deg); transition: transform .2s;
}
.ls-combo.is-open .ls-trigger::after { transform: translateY(2px) rotate(-135deg); }
.ls-trigger-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-trigger.is-empty .ls-trigger-text { color: var(--text-faint); }
.ls-combo.is-open .ls-trigger, .ls-trigger:focus-visible { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.ls-combo.is-invalid .ls-trigger { border-color: var(--danger); }
.ls-panel {
    position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 70; min-width: 220px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 18px 40px -12px rgba(9, 35, 40, .3); padding: 8px; animation: notif-in .15s ease-out;
}
.ls-panel[hidden] { display: none; }
.ls-input {
    width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface-2); color: var(--text); font: inherit; font-size: .9rem; outline: none;
}
.ls-input:focus { border-color: var(--primary); background: var(--surface); }
.ls-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: min(320px, 45vh); overflow-y: auto; }
.ls-group { padding: 8px 10px 4px; font-size: .74rem; font-weight: 700; color: var(--text-faint); position: sticky; top: 0; background: var(--surface); }
.ls-opt { padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: .9rem; color: var(--text); }
.ls-opt.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.ls-opt.is-placeholder { color: var(--text-faint); }
.ls-opt[hidden], .ls-group[hidden] { display: none; }
.ls-empty { padding: 16px; text-align: center; color: var(--text-faint); font-size: .85rem; }
/* فیلتر فهرست‌ها و جدول‌ها */
.ls-filter { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ls-filter-input { flex: 1; max-width: 420px; padding-inline-start: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2361757b' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.5' y2='16.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
.ls-count { color: var(--text-faint); font-size: .8rem; white-space: nowrap; }
.ls-none td, .ls-none-block { text-align: center; color: var(--text-faint); padding: 18px; }
.ls-none-block { margin: 8px 0 0; }
/* نتایج در حال بارگذاری (جستجوی سروری) */
[data-live-results] { transition: opacity .15s; }
[data-live-results].ls-loading { opacity: .5; pointer-events: none; }
.ls-server-form { display: flex; margin-bottom: 14px; }
.ls-server-form .ls-filter-input { max-width: 460px; }

/* ================= نمایش رمز ================= */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-left: 48px !important; }
.pw-eye {
    position: absolute; top: 50%; left: 6px; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px;
    background: transparent; color: var(--text-faint); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--primary-dark); background: var(--surface-2); }
.pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ================= ابزار عکس (assets/js/image-tools.js) ================= */
html.ic-lock { overflow: hidden; }
html.ic-lock body { transform: none; }
.ic-photo { cursor: pointer; position: relative; }
.ic-photo:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.img-now.ic-photo::after, .dcard-avatar.ic-photo::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(9,35,40,.35) center / 30px no-repeat
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
    opacity: 0; transition: opacity .2s;
}
.img-now.ic-photo:hover::after, .dcard-avatar.ic-photo:hover::after { opacity: 1; }
.gm-thumb.ic-photo:hover { outline: 3px solid var(--primary-soft); }

.ic-menu {
    position: fixed; z-index: 9990; min-width: 220px; padding: 8px; border-radius: 16px; background: var(--surface);
    border: 1px solid var(--border); box-shadow: 0 20px 50px -12px rgba(9,35,40,.35); animation: notif-in .15s ease-out;
}
.ic-menu.is-sheet { left: 12px !important; right: 12px; bottom: 12px; top: auto !important; border-radius: 20px; padding: 10px; }
.ic-menu-head { padding: 6px 10px 8px; font-size: .8rem; color: var(--text-faint); font-weight: 700; }
.ic-menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 12px; border: 0; border-radius: 12px; background: none;
    font: inherit; font-size: .95rem; font-weight: 600; color: var(--text); cursor: pointer; text-align: start;
}
.ic-menu-item:hover, .ic-menu-item:focus-visible { background: var(--primary-soft); color: var(--primary-dark); outline: none; }
.ic-menu-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic-menu-cancel { justify-content: center; color: var(--text-faint); border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; margin-top: 4px; }

.ic-lightbox { position: fixed; inset: 0; z-index: 9995; background: rgba(6,16,19,.9); display: grid; place-items: center; padding: 24px; animation: kp-fade .2s ease-out; cursor: zoom-out; }
.ic-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); cursor: default; }
.ic-close { position: absolute; top: 16px; right: 16px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ic-close svg, .ic-btn-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ic-crop { position: fixed; inset: 0; z-index: 9996; background: rgba(6,16,19,.75); display: grid; place-items: center; padding: 14px; animation: kp-fade .2s ease-out; }
.ic-crop-card { width: min(560px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ic-crop-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; text-align: center; }
.ic-crop-title small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--text-faint); margin-top: 2px; }
.ic-stage { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 58vh; border-radius: 16px; overflow: hidden; background: #0d1517 repeating-conic-gradient(#1a2427 0 25%, #0d1517 0 50%) 0 0 / 24px 24px; touch-action: none; cursor: grab; user-select: none; }
.ic-stage:active { cursor: grabbing; }
.ic-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ic-frame { position: absolute; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(6,16,19,.55); pointer-events: none; }
.ic-frame.is-circle { border-radius: 50%; }
.ic-tools { display: flex; align-items: center; gap: 12px; }
.ic-tools input[type=range] { flex: 1; accent-color: var(--primary); }
.ic-btn-icon { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.ic-ratios { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ic-chip { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: .85rem; font-weight: 700; color: var(--text-soft); cursor: pointer; }
.ic-chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.ic-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ic-actions .btn { flex: 1; }

/* ---------- بنر کمپین تخفیف ---------- */
.camp-bar { background: linear-gradient(90deg, #c2410c, #db2777, #7c3aed); background-size: 200% 100%; animation: camp-shift 8s ease-in-out infinite alternate; color: #fff; font-size: .86rem; }
@keyframes camp-shift { to { background-position: 100% 0; } }
.camp-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; padding-top: 8px; padding-bottom: 8px; position: relative; padding-inline-end: 36px; }
.camp-timer { display: inline-flex; align-items: center; gap: 6px; }
.camp-clock { background: rgba(0, 0, 0, .22); border-radius: 8px; padding: 2px 9px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.camp-left { opacity: .85; }
.camp-cta { background: #fff; color: #9d174d; font-weight: 800; border-radius: 99px; padding: 4px 14px; text-decoration: none; white-space: nowrap; }
.camp-cta:hover { background: #fde68a; color: #7c2d12; }
.camp-close { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; opacity: .8; padding: 4px 8px; }
.camp-close:hover { opacity: 1; }
@media (max-width: 600px) { .camp-bar { font-size: .78rem; } }
@media (prefers-reduced-motion: reduce) { .camp-bar { animation: none; } }

/* ---------- قیمت با تخفیف ---------- */
.price-old { color: var(--text-faint); font-size: .62em; font-weight: 400; margin-inline-end: 4px; }
.price-off { display: inline-block; vertical-align: middle; background: var(--danger-soft); color: var(--danger); font-size: .58rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; font-family: var(--font-body, inherit); }
.price-note { display: block; font-size: .72rem; font-weight: 400; color: var(--text-faint); margin-top: 4px; line-height: 1.6; }

/* ---------- به‌روزرسانی زنده: پنجره کوچک اعلان، نوار «تغییرات تازه»، صدا ---------- */
.km-toasts { position: fixed; z-index: 9000; top: 84px; left: 16px; width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.km-toast { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 13px 16px 13px 36px; border-radius: 14px; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-inline-start: 4px solid var(--primary); box-shadow: 0 12px 32px rgba(15, 40, 45, .18);
    text-decoration: none; pointer-events: auto; opacity: 0; transform: translateY(-10px) scale(.98); transition: opacity .3s, transform .3s; }
.km-toast.is-in { opacity: 1; transform: none; }
.km-toast strong { font-size: .92rem; }
.km-toast span { font-size: .82rem; color: var(--text-soft); line-height: 1.7; }
a.km-toast:hover { border-color: var(--primary); }
.km-toast-x { position: absolute; top: 6px; left: 8px; border: 0; background: none; color: var(--text-faint); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 2px 6px; }
.km-live-bar { display: block; width: 100%; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--primary); background: var(--primary-soft); color: var(--primary-dark); font: inherit; font-weight: 700; cursor: pointer; }
.km-live-flash { animation: km-live-flash 1.4s ease-out; }
@keyframes km-live-flash { 0% { box-shadow: 0 0 0 3px var(--primary-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
.notif-sound { border: 0; background: none; color: var(--text-soft); font: inherit; font-size: .78rem; cursor: pointer; padding: 2px 6px; border-radius: 8px; margin-inline-start: auto; margin-inline-end: 8px; }
.notif-sound:hover { background: var(--primary-soft); }
.nav-badge.is-bump { animation: km-bump .6s ease; }
@keyframes km-bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.35); } }
@media (max-width: 600px) { .km-toasts { top: auto; bottom: 16px; left: 16px; right: 16px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .km-toast, .km-live-flash, .nav-badge.is-bump { transition: none; animation: none; } }

/* ---------- کپچای عددی ---------- */
.km-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.km-captcha { margin: 6px 0 4px; }
.km-captcha-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.km-captcha-img { border-radius: 10px; border: 1px solid var(--border); background: #f3f8f8; width: 170px; height: 56px; flex: 0 0 auto; }
.km-captcha-new { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 1.1rem; flex: 0 0 auto; }
.km-captcha-new:hover { border-color: var(--primary); background: var(--primary-soft); }
.km-captcha-input { flex: 1 1 120px; width: auto; min-width: 0; text-align: center; letter-spacing: 6px; font-size: 1.15rem; font-weight: 700; }
