:root {
    --bg-color: #020617;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --accent: #06b6d4;
    --cyan: #22d3ee;
    --card-bg: #1e293b;
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-color: rgba(59, 130, 246, 0.5);

    /* فاز ۴-۱: design tokens یکپارچه (radius / spacing / shadow / font)
       مرجع واحد برای کامپوننت‌ها — افزوده شده بدون تغییر مقادیر قبلی */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.3);
    --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);
    --font-main: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #fbbf24;
}

/* تم روشن فقط با فعال‌سازی صریح data-theme؛ روی تصاویر overlay نمی‌شود. */
[data-theme="light"] {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --text-muted: #475569;
    --card-bg: #ffffff;
    --border-color: rgba(15, 23, 42, 0.14);
    --glow-color: rgba(37, 99, 235, 0.2);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    /* overflow-x:hidden از اینجا حذف شد (فاز ۰-۴): مخفی‌سازی کل صفحه باعث قطع
       محتوای مشروع می‌شد. به‌جاش جداول عریض توی .table-scroll-wrapper قرار گرفتن.
       ریشه اصلی (min-width در comparison-table) هم اصلاح شد (زیر). */
    direction: rtl; 
}

/* فاز ۰-۲: focus state قابل‌دیدن برای دسترس‌پذیری (فرم‌های لاگین/ثبت‌نام) */
.form-control:focus,
.form-control:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent, #3b82f6);
    outline-offset: 2px;
}

a { text-decoration: none; color: inherit; }

/* فاز ۴-۲: skip link برای دسترس‌پذیری کیبورد (WCAG 2.4.1) */
.kh-skip-link {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10000;
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-weight: 700;
    transform: translateY(calc(-100% - 24px));
    transition: transform 0.2s;
}
.kh-skip-link:focus { transform: translateY(0); outline: 3px solid var(--warning); }
ul { list-style: none; padding: 0; margin: 0; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Background Glow Effect */
.glow-bg {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(2,6,23,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* --- Navbar Fixed --- */
.navbar {
    width: 100%;
    padding: 20px 0;
    margin-bottom: 0; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- New Logo Styles --- */
.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.neon-logo-svg {
    width: 45px;
    height: 45px;
    filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.8)); 
}

.neon-logo-path {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.neon-logo-circle {
    fill: var(--cyan);
}

.brand-name {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
    font-family: sans-serif;
}

/* --- Navigation Links --- */
.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-color); }

/* --- Buttons --- */
.btn-login-neon {
    background: rgba(34, 211, 238, 0.05);
    color: var(--cyan);
    border: 1px solid var(--cyan);
    padding: 8px 20px;
    border-radius: 8px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: bold;
}

.btn-login-neon:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: bold;
    transition: opacity 0.3s;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 0 100px 0;
    flex-wrap: wrap;
    gap: 40px;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-val {
    font-weight: bold;
    font-size: 1.1rem;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Features Section */
.features {
    text-align: center;
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 50px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 16px;
    text-align: right;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px 0;
    margin-top: 50px;
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 { margin-bottom: 20px; color: var(--text-color); }
.footer-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; margin-top: 15px; max-width: 300px; }

.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-links a:hover { color: var(--primary); padding-right: 5px; }

.social-icons { display: flex; gap: 15px; margin-top: 20px; }
.social-icons a { color: var(--text-muted); font-size: 1.2rem; transition: 0.3s; }
.social-icons a:hover { color: var(--primary); transform: translateY(-3px); }

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}


/* --- Docs Styles --- */

.docs-wrapper {
    padding-top: 40px;
    padding-bottom: 50px;
    min-height: 100vh;
    background-color: var(--bg-color);
}

.docs-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
    background: rgba(30, 41, 59, 0.5); 
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.sidebar-header {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-links {
    list-style: none;
    padding: 0;
}

.sidebar-links li {
    margin-bottom: 10px;
}

.sidebar-links a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.sidebar-links a:hover, .sidebar-links a.active-link {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

/* Main Content */
.docs-content {
    color: var(--text-color);
}

.docs-section {
    margin-bottom: 50px;
    scroll-margin-top: 120px;
}

.docs-section h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #fff, var(--primary)); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.docs-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--accent); 
    margin-top: 30px;
}

.docs-section h3 {
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 10px;
    color: #fff;
}

.docs-lead {
    font-size: 1.1rem;
    color: var(--text-muted); 
    line-height: 1.8;
}

.divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    margin: 40px 0;
}

/* Base URL Box */
.info-box {
    background: rgba(6, 182, 212, 0.1); 
    border: 1px solid var(--accent); 
    padding: 15px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.info-box .label {
    font-weight: bold;
    color: var(--accent); 
}

.info-box code {
    font-family: 'Courier New', monospace;
    color: #fff;
}

/* Params Table */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.params-table th, .params-table td {
    text-align: right;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.params-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary); 
}

.params-table td code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent); 
    font-family: monospace;
}

/* Code Blocks */
.code-block {
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 15px;
    overflow-x: auto;
    max-width: 100%;
    position: relative;
    direction: ltr;
}
/* code-block در موبایل نباید باعث overflow سند شود (معیار ۲) */
.code-block pre { max-width: 100%; }

/* کدهای درون‌خطی طولانی (مثل base-url) نباید سند را اسکرول کنند (معیار ۲،۷) */
code {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.base-url {
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
    direction: ltr;
    unicode-bidi: isolate;
}

.code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.code-block pre {
    padding: 20px;
    margin: 0;
    overflow-x: auto;
    text-align: left;
}

.code-block code {
    font-family: 'Courier New', monospace;
    color: #a9b7c6;
}

/* Badges */
.method-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 8px;
}

.method-badge.get {
    background: rgba(61, 220, 132, 0.2);
    color: #3ddc84;
    border: 1px solid #3ddc84;
}

/* Responsive */
@media (max-width: 768px) {
    .docs-container {
        grid-template-columns: 1fr;
    }
    .docs-sidebar {
        display: none; 
    }
    .nav-links { display: none; }
    .hero { flex-direction: column-reverse; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 600px) {
    .neon-logo-svg {
        width: 35px;
        height: 35px;
    }
    .brand-name {
        font-size: 1.4rem;
    }
}

/* --- Pricing Page Styles --- */

.pricing-header {
    padding: clamp(42px, 6vw, 72px) 0 clamp(28px, 4vw, 44px);
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.24), rgba(2, 6, 23, 0));
}

.pricing-header h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4.2vw, 3.35rem);
    line-height: 1.25;
}

.pricing-header .hero-desc {
    max-width: 720px;
    color: #b9c5d8;
    font-size: clamp(0.98rem, 1.35vw, 1.12rem);
    line-height: 2;
}

.pricing-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(22px, 2.2vw, 32px);
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto 76px;
    padding: 8px 0 0;
    box-sizing: border-box;
}

.pricing-card {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.52)),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 38%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 24px;
    padding: clamp(24px, 2.3vw, 32px);
    min-width: 0;
    min-height: 535px;
    text-align: right;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pricing-card:hover {
    transform: translateY(-8px);
}

.pricing-card h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(1.28rem, 1.55vw, 1.52rem);
    font-weight: 950;
    line-height: 1.45;
    letter-spacing: -0.02em;
}

.pricing-card .plan-desc {
    min-height: 104px;
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.9;
}

.pricing-card .price {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: auto;
    margin: auto 0 4px;
    color: #f8fafc;
    font-size: clamp(1.55rem, 2vw, 1.95rem);
    font-weight: 950;
    line-height: 1.45;
    letter-spacing: -0.03em;
    text-align: right;
}

.pricing-card .price .currency {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: normal;
}

.pricing-card .price-note {
    display: block;
    min-height: 28px;
    margin: 0 0 18px;
    color: #9fb0c6;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.7;
    text-align: right;
}

.card-icon-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0 0 18px auto;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    font-size: 1.85rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.features-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 22px;
    text-align: right;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: #c1ccdc;
    font-size: 0.96rem;
    font-weight: 550;
    line-height: 1.85;
}

.features-list li i {
    flex: 0 0 auto;
    margin-top: 0.48em;
    color: var(--primary);
    font-size: 0.78rem;
}

.features-list bdi,
.comparison-table bdi {
    unicode-bidi: isolate;
    white-space: nowrap;
}

.features-list .feature-emphasis,
.feature-emphasis {
    color: #22d3ee;
    font-weight: 950;
    text-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}

.btn-plan {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 0;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.4;
    text-align: center;
    transition: 0.3s;
    border: 1px solid transparent;
}

/* --- Specific Card Colors --- */

/* 1. Developer */
.card-dev { border-top: 4px solid var(--text-muted); }
.card-dev .card-icon-top { color: var(--text-muted); }
.card-dev:hover { box-shadow: 0 18px 48px rgba(148, 163, 184, 0.2); }

/* 2. Startup */
.card-startup {
    border-top: 4px solid var(--accent);
    border-color: rgba(6, 182, 212, 0.3);
}
.card-startup .card-icon-top { color: var(--accent); }
.card-startup:hover { box-shadow: 0 18px 56px rgba(6, 182, 212, 0.28); }
.card-startup .btn-plan { background: var(--accent); color: #000; }
.card-startup .btn-plan:hover { box-shadow: 0 0 15px var(--accent); }

/* Badge for Startup */
.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #22d3ee, #a855f7);
    color: #020617;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 10px 28px rgba(34, 211, 238, 0.22);
}

/* 3. Analyst */
.card-analyst {
    border-top: 4px solid #a855f7;
    border-color: rgba(168, 85, 247, 0.34);
}
.card-analyst .card-icon-top { color: #a855f7; }
.card-analyst .features-list li i { color: #a855f7; }
.card-analyst:hover { box-shadow: 0 18px 56px rgba(168, 85, 247, 0.3); }
.card-analyst .btn-plan { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; border-color: #a855f7; }
.card-analyst .btn-plan:hover { background: #a855f7; color: #fff; }

/* 4. Enterprise */
.card-enterprise {
    border-top: 4px solid #3b82f6;
    border-color: rgba(59, 130, 246, 0.28);
}
.card-enterprise .card-icon-top { color: #3b82f6; }
.card-enterprise:hover { box-shadow: 0 18px 56px rgba(59, 130, 246, 0.3); }
.card-enterprise .btn-plan { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }

/* 5. Credit */
.card-credit {
    border-top: 4px solid #64748b;
}
.card-credit .card-icon-top { color: #64748b; }
.card-credit:hover { box-shadow: 0 10px 30px rgba(100, 116, 139, 0.2); }


/* --- Comparison Table --- */
.comparison-section {
    margin-top: 6px;
    padding-bottom: 80px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(30, 41, 59, 0.34);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
}

.comparison-table th, .comparison-table td {
    padding: 18px 20px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    line-height: 1.7;
}

.comparison-table th {
    background: rgba(2, 6, 23, 0.84);
    font-size: 1.02rem;
    color: #fff;
}

.comparison-table th:first-child, .comparison-table td:first-child {
    min-width: 210px;
    text-align: right;
    font-weight: 850;
    color: var(--text-muted);
}

.comparison-table tr:hover {
    background: rgba(255,255,255,0.02);
}

.comparison-table .highlight-row {
    background: rgba(34, 211, 238, 0.08);
    box-shadow: inset 3px 0 0 rgba(34, 211, 238, 0.75);
}

/* موبایل: جدول مقایسه تعرفه بدون عرض ثابت (رفع overflow افقی) */
@media (max-width: 768px) {
    .comparison-table { min-width: 0; width: 100%; font-size: 0.82rem; }
    .comparison-table th, .comparison-table td { padding: 10px 8px; }
}

.comparison-table .highlight-row td:first-child {
    color: #22d3ee;
    font-weight: 950;
}

/* Table Colors */
.col-dev { color: var(--text-muted); }
.col-startup { color: var(--accent); }
.col-analyst { color: #a855f7; }
.col-ent { color: #3b82f6; }

.text-green { color: #10b981; }
.text-red { color: #ef4444; opacity: 0.5; }

/* Responsive Table */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

@media (max-width: 1180px) {
    .pricing-container {
        width: min(960px, calc(100% - 36px));
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pricing-card {
        min-height: 500px;
    }
    .pricing-card.card-enterprise {
        grid-column: 1 / -1;
        width: min(540px, 100%);
        justify-self: center;
    }
    .pricing-card .plan-desc {
        min-height: 78px;
    }
}

@media (max-width: 860px) {
    .pricing-container {
        width: min(620px, calc(100% - 32px));
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 58px;
    }
    .pricing-card,
    .pricing-card.card-enterprise {
        grid-column: auto;
        width: 100%;
        min-height: auto;
        justify-self: stretch;
    }
    .pricing-card .plan-desc {
        min-height: auto;
    }
    .comparison-table th,
    .comparison-table td {
        padding: 16px 14px;
    }

    /* موبایل: جدول مقایسه به حالت کارت */
    .comparison-table,
    .comparison-table thead,
    .comparison-table tbody,
    .comparison-table tr,
    .comparison-table th,
    .comparison-table td {
        display: block;
        width: 100%;
    }
    .comparison-table thead {
        display: none;
    }
    .comparison-table tr {
        margin-bottom: 1rem;
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 14px;
        overflow: hidden;
        background: rgba(30, 41, 59, 0.34);
    }
    .comparison-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 11px 14px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .comparison-table td:last-child {
        border-bottom: none;
    }
    .comparison-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: #94a3b8;
        margin-left: 12px;
        font-size: 0.82rem;
    }
    .comparison-table tr:first-child td:first-child {
        background: rgba(2, 6, 23, 0.7);
        font-weight: 800;
        color: #fff;
    }
}

@media (max-width: 576px) {
    .pricing-header {
        padding: 36px 16px 26px;
    }
    .pricing-header .hero-desc {
        line-height: 1.9;
    }
    .pricing-container {
        width: calc(100% - 28px);
        gap: 16px;
        margin-bottom: 50px;
    }
    .pricing-card {
        padding: 22px 18px;
        border-radius: 20px;
    }
    .card-icon-top {
        width: 48px;
        height: 48px;
        margin-bottom: 14px;
        border-radius: 16px;
        font-size: 1.55rem;
    }
    .pricing-card .plan-desc,
    .features-list li {
        font-size: 0.93rem;
    }
    .features-list {
        gap: 9px;
        margin-bottom: 18px;
    }
    .pricing-card .price-note {
        font-size: 0.9rem;
    }
    .btn-plan {
        min-height: 46px;
        font-size: 0.92rem;
    }
    .comparison-section {
        padding-bottom: 58px;
    }
    .comparison-section .container {
        padding-left: 14px;
        padding-right: 14px;
        box-sizing: border-box;
    }
    /* فاز ۰-۴: جداول عریض توی wrapper اسکرول‌پذیر (نه شکستن لایه/قطع محتوا) */
    .comparison-table {
        width: 100%;
        min-width: 660px;
    }
    .table-scroll-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .comparison-table td:first-child,
    .comparison-table th:first-child {
        min-width: 170px;
    }
    .comparison-table th,
    .comparison-table td {
        padding: 13px 12px;
        font-size: 0.9rem;
    }
}

.price-saving {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    margin: -10px 0 16px;
    padding: 5px 10px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.1);
    color: #86efac;
    font-size: 0.82rem;
    font-weight: 850;
}
.price-saving[hidden] {
    display: none;
}

.mobile-comparison {
    display: none;
}

@media (max-width: 860px) {
    .comparison-section .table-responsive {
        display: none;
    }
    .mobile-comparison {
        display: grid;
        gap: 12px;
    }
    .mobile-comparison__hint {
        margin: -8px 0 4px;
        color: #94a3b8;
        font-size: 0.9rem;
        text-align: center;
    }
    .mobile-comparison__group {
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 16px;
        background: rgba(15, 23, 42, 0.68);
    }
    .mobile-comparison__group summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 54px;
        padding: 12px 16px;
        color: #f8fafc;
        font-weight: 900;
        cursor: pointer;
        list-style: none;
    }
    .mobile-comparison__group summary::-webkit-details-marker {
        display: none;
    }
    .mobile-comparison__group summary::after {
        content: "+";
        color: #67e8f9;
        font-size: 1.35rem;
        line-height: 1;
    }
    .mobile-comparison__group[open] summary::after {
        content: "−";
    }
    .mobile-feature {
        padding: 14px;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
    }
    .mobile-feature > strong {
        display: block;
        margin-bottom: 11px;
        color: #dbeafe;
        font-size: 0.94rem;
    }
    .mobile-feature__plans {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }
    .mobile-feature__plans span {
        display: flex;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        padding: 9px 4px;
        border-radius: 10px;
        background: rgba(2, 6, 23, 0.55);
        text-align: center;
    }
    .mobile-feature__plans b {
        max-width: 100%;
        overflow: hidden;
        color: #94a3b8;
        font-size: 0.68rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-feature__plans i {
        font-size: 0.76rem;
        font-style: normal;
        font-weight: 900;
    }
    .mobile-feature__plans .is-yes {
        color: #34d399;
    }
    .mobile-feature__plans .is-no {
        color: #64748b;
    }
}

/* --- Contact Page Styles --- */

.contact-header {
    padding: 60px 0 40px 0;
    text-align: center;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 80px;
}

/* Info Cards */
.info-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.3);
}

.info-card h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-neon {
    color: var(--accent);
    filter: drop-shadow(0 0 5px var(--accent));
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-item .label {
    color: var(--text-muted);
}

.info-item .value {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.info-item .value:hover {
    color: var(--primary);
}

.ltr-text {
    direction: ltr;
    font-family: monospace;
    font-size: 1.1rem;
}

.address-text {
    line-height: 1.8;
    color: #e2e8f0;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: 0.3s;
    border: 1px solid transparent;
}

.social-btn i {
    font-size: 1.4rem;
}

/* WhatsApp Color */
.social-btn.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    border-color: #25D366;
    color: #25D366;
}
.social-btn.whatsapp:hover {
    background: #25D366;
    color: #fff;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

/* Telegram Color */
.social-btn.telegram {
    background: rgba(0, 136, 204, 0.1);
    border-color: #0088cc;
    color: #0088cc;
}
.social-btn.telegram:hover {
    background: #0088cc;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.4);
}

/* Instagram Color */
.social-btn.instagram {
    background: rgba(225, 48, 108, 0.1);
    border-color: #E1306C;
    color: #E1306C;
}
.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); 
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(225, 48, 108, 0.4);
}

/* Map Section */
.contact-map-col {
    height: 100%;
    min-height: 400px;
}

.map-frame {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-map-col {
        min-height: 300px;
    }
}
/* --- Sources Page Styles --- */

.sources-header {
    padding: 60px 0 40px 0;
    text-align: center;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Filters */
.sources-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

/* Grid Layout */
.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 80px;
}

/* Source Card */
.source-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.source-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

/* Icons */
.source-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.bg-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.bg-green { background: linear-gradient(135deg, #10b981, #047857); }
.bg-purple { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.bg-telegram { background: linear-gradient(135deg, #0088cc, #005f8f); }
.bg-orange { background: linear-gradient(135deg, #f97316, #c2410c); }
.bg-red { background: linear-gradient(135deg, #ef4444, #b91c1c); }


/* Live Indicator */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.source-card h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.source-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

/* Tags */
.source-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Crawl Info */
.crawl-info {
    font-size: 0.8rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}
/* Sources Header Text Alignment */
.sources-header .hero-desc {
    text-align: center;
    max-width: 800px;
    margin: 15px auto 0 auto;
    display: block;
    width: 100%;
}

.sources-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- User Panel Styles (Corrected & Improved) --- */

.panel-body {
    background-color: var(--bg-color);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- Sidebar --- */
.panel-sidebar {
    width: 260px;
    background-color: var(--card-bg);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    transition: width 0.3s ease-in-out;
}

.sidebar-header {
    padding: 10px 20px;
    margin-bottom: 30px;
    text-align: center;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 15px 30px;
    font-size: 0.95rem;
    transition: all 0.3s;
    border-right: 3px solid transparent;
}

.sidebar-nav li a:hover {
    color: #fff;
    background-color: rgba(59, 130, 246, 0.1);
}

.sidebar-nav li.active a {
    color: #fff;
    font-weight: bold;
    background-color: rgba(59, 130, 246, 0.15);
    border-right-color: var(--primary);
}

.sidebar-nav i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-footer a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.sidebar-footer a:hover {
    color: #fff;
}


/* --- Main Content --- */
.panel-main-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 35%);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.header-left h1 {
    font-size: 2rem;
    color: #fff;
    margin: 0;
}

.header-left p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.plan-badge {
    background-color: rgba(37, 99, 235, 0.2);
    border: 1px solid var(--primary);
    padding: 8px 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.plan-badge strong {
    color: var(--cyan);
    text-shadow: 0 0 5px var(--cyan);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.user-info span {
    display: block;
    color: #fff;
    font-weight: bold;
}
.user-info small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Glass Card - Reusable Component */
.glass-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.card-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
}

.card-icon {
    font-size: 1.5rem;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.card-footer-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 15px;
    display: block;
}

/* Stats Grid */
.panel-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

/* API Key Card */
.api-key-container {
    display: flex;
    gap: 10px;
}
.api-key-container input {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    color: #fff;
    font-family: 'monospace';
    font-size: 0.9rem;
    text-align: left;
    direction: ltr;
}
.api-key-container button {
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}
.api-key-container button:hover {
    background-color: var(--primary);
    color: #fff;
}
.api-key-container button .fa-check {
    color: var(--accent);
}

/* Usage Card - Updated */
.usage-display {
    margin-top: 10px;
}
.usage-numbers {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}
.current-usage {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}
.total-usage {
    font-size: 1rem;
    color: var(--text-muted);
}
.progress-bar {
    width: 100%;
    height: 12px;
    background-color: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    border-radius: 12px;
    box-shadow: 0 0 10px var(--cyan);
    transition: width 0.5s ease-out;
}

/* Chart Section */
.panel-chart-section {
    margin-bottom: 30px;
}
.chart-container {
    height: 400px;
    position: relative;
}
#usageChart {
    width: 100% !important;
    height: 100% !important;
}

/* Panel Responsive Styles */
@media (max-width: 992px) {
    .panel-main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .panel-body {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .panel-sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0;
    }
    .sidebar-header, .sidebar-footer {
        display: none;
    }
    .sidebar-nav {
        width: 100%;
    }
    .sidebar-nav ul {
        display: flex;
        justify-content: center;
        gap: 5px;
    }
    .sidebar-nav li {
        flex: 1;
        text-align: center;
    }
    .sidebar-nav li a {
        padding: 15px 10px;
        justify-content: center;
        border-right: none;
        border-bottom: 3px solid transparent;
    }
    .sidebar-nav li.active a {
        border-right: none;
        border-bottom-color: var(--primary);
    }
}
.panel-section-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}


.hint {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 8px;
    font-family: monospace;
}

/* =========================================================
   Analyst Research Panel Styles (Pro Layout)
   ========================================================= */

.analyst-panel {
    background-color: var(--bg-color);
    min-height: 100vh;
    padding: 30px 5%; /* کمی فاصله از بغل */
}

/* --- Header Section --- */
.analyst-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
}

.analyst-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.analyst-header .role {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* --- Filter Bar Container --- */
.analyst-filters {
    background: #0f172a; /* رنگ تیره متفاوت برای نوار */
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

/* دکمه طلایی اکسل */
.btn-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.2);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(251, 191, 36, 0.4);
}

/* اینپوت سرچ بزرگ */
.search-group {
    flex-grow: 2; /* فضای خالی را پر کند */
    position: relative;
}

.search-input {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    color: white;
    padding: 12px 15px 12px 40px; /* فضای آیکون */
    border-radius: 10px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus { border-color: var(--primary); }

/* سلکت باکس‌ها و تاریخ */
.filter-select, .filter-date {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

/* --- News Cards Container (Grid) --- */
.news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Single News Card Style --- */
.news-card {
    background: #1e293b; /* رنگ پس زمینه کارت */
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-card:hover {
    transform: translateY(-3px);
    border-color: #475569;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* نوار رنگی کنار کارت */
.news-card::before {
    content: '';
    position: absolute;
    right: 0; top: 20px; bottom: 20px;
    width: 4px;
    background: var(--primary);
    border-radius: 4px 0 0 4px;
    box-shadow: 0 0 10px var(--glow-color);
}

/* هدر کارت */
.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.6;
    margin: 0;
}

/* متادیتای کارت (منبع، تاریخ) */
.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.8rem;
    color: #94a3b8;
    align-items: center;
}

.meta-badge {
    background: rgba(148, 163, 184, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-summary {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.8;
    text-align: justify;
    opacity: 0.9;
}

/* تگ‌های پایین کارت */
.tags-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.tag-item {
    font-size: 0.75rem;
    background: #0f172a;
    color: #64748b;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #334155;
}

/* وضعیت لودینگ */
.loading-text {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}
/* استایل برای ردیف ۳ ستونه */
.form-row.three-cols {
    display: flex;
    gap: 10px;
}
.form-row.three-cols .form-group {
    flex: 1; /* هر ۳ آیتم عرض مساوی می‌گیرند */
    min-width: 0; /* جلوگیری از سرریز در فایرفاکس */
}

/* استایل تیتر که شامل سوییچ است */
.toggle-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}
.section-title-inline {
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
}

/* استایل وسط چین کردن متن اینپوت‌ها */
.text-center {
    text-align: center;
}

/* استایل ردیف انواع نوتیفیکیشن */
.notification-types-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #121a2e; /* کمی تیره‌تر برای تمایز */
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #0f3460;
}

.toggle-row.compact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    flex: 1;
    justify-content: center;
}

/* خط جداکننده عمودی بین فوری و روزانه */
.vertical-line {
    width: 1px;
    height: 20px;
    background: #333;
    margin: 0 10px;
}

/* کوچک کردن اسلایدر برای زیبایی بیشتر در پایین */
.small-switch {
    width: 34px;
    height: 18px;
}
.small-switch .slider:before {
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
}
.small-switch input:checked + .slider:before {
    transform: translateX(16px);
}



/* --- Global Responsive Refinements --- */
* {
    min-width: 0;
}

.nav-container {
    gap: 18px;
}

.nav-links {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
}

.nav-buttons {
    flex: 0 0 auto;
}

@media (max-width: 1180px) {
    .navbar {
        padding: 16px 0;
    }
    .nav-links {
        gap: 16px;
    }
    .nav-links a {
        font-size: 0.9rem;
    }
    .btn-login-neon {
        padding: 8px 14px;
        font-size: 0.86rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    .navbar {
        padding: 14px 0;
    }
    .nav-container {
        justify-content: center;
        gap: 14px;
    }
    .brand-container {
        gap: 9px;
    }
    .neon-logo-svg {
        width: 38px;
        height: 38px;
    }
    .brand-name {
        font-size: 1.55rem;
    }
    .nav-buttons {
        margin-inline-start: auto;
    }
    .hero {
        padding: 32px 0 72px;
        gap: 28px;
    }
    .hero h1 {
        font-size: clamp(2.1rem, 8vw, 3rem);
    }
    .hero-desc {
        font-size: 1rem;
    }
    .cards-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .navbar {
        padding: 12px 0;
    }
    .nav-container {
        justify-content: space-between;
    }
    .neon-logo-svg {
        width: 34px;
        height: 34px;
    }
    .brand-name {
        font-size: 1.35rem;
    }
    .btn-login-neon {
        padding: 7px 10px;
        gap: 6px;
        font-size: 0.8rem;
        border-radius: 9px;
    }
    .hero-btns,
    .hero-stats {
        flex-direction: column;
    }
    .section-title {
        font-size: 1.55rem;
        line-height: 1.45;
        margin-bottom: 30px;
    }
    .feature-card,
    .info-card {
        padding: 22px 18px;
    }
}

/* KHAPI landing conversion redesign */
.navbar.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 22px;
    padding-bottom: 22px;
    position: relative;
    z-index: 100;
}

.nav-right,
.nav-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.nav-right {
    gap: 15px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-right: 30px;
}

.nav-menu a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.5;
}

.nav-menu a:hover {
    color: #fff;
}

.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: clamp(32px, 5vw, 62px) 20px 24px;
    text-align: center;
    isolation: isolate;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: -80px 8% auto;
    height: 360px;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 18%, rgba(34, 211, 238, 0.18), transparent 34%),
        radial-gradient(circle at 26% 24%, rgba(59, 130, 246, 0.14), transparent 24%),
        radial-gradient(circle at 72% 32%, rgba(168, 85, 247, 0.10), transparent 26%);
    filter: blur(2px);
}

.hero-title {
    max-width: 980px;
    margin: 0 auto 18px;
    background: linear-gradient(to bottom, #fff 58%, #b8c5d8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(2.18rem, 5.1vw, 4.35rem);
    font-weight: 950;
    line-height: 1.25;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.hero-desc {
    max-width: 790px;
    margin: 0 auto 34px;
    color: #b7c4d6;
    font-size: clamp(1rem, 1.55vw, 1.22rem);
    font-weight: 520;
    line-height: 2;
    text-wrap: balance;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: clamp(34px, 5vw, 54px);
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 14px 30px;
    border-radius: 999px;
    font-weight: 900;
    line-height: 1.4;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

/* === انتخاب‌گر نقش در Hero (فاز ۲-۱) === */
.hero-roles {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(28px, 4vw, 44px);
}
.hero-roles__label {
    font-size: 0.9rem;
    color: var(--muted, #94a3b8);
}
.hero-roles__btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.hero-role-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.18s ease;
}
.hero-role-btn:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.12);
    color: #fff;
    transform: translateY(-2px);
}

/* === انتخاب‌گر دوره پرداخت (فاز ۲-۲) === */
.billing-toggle {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 auto 32px;
    padding: 5px;
    width: fit-content;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.18);
}
.billing-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #94a3b8;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}
.billing-opt.is-active {
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    color: #02111f;
    box-shadow: 0 8px 22px rgba(34, 211, 238, 0.28);
}
.billing-save {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}
.billing-opt.is-active .billing-save {
    background: rgba(2, 17, 31, 0.2);
    color: #02111f;
}

.btn-hero-primary {
    color: #02111f;
    background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 48%, #a7f3d0 100%);
    border: 1px solid rgba(125, 249, 255, 0.72);
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.38);
    font-size: 1.06rem;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 62px rgba(34, 211, 238, 0.38), 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.btn-hero-secondary {
    color: #eaf8ff;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
    font-size: 1rem;
}

.btn-hero-secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.10);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.hero-image-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

.hero-img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 32px rgba(34, 211, 238, 0.16));
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.stats-strip {
    position: relative;
    z-index: 20;
    margin-top: -28px;
    margin-bottom: 64px;
    padding: 22px 0;
    background: linear-gradient(90deg, rgba(11, 18, 33, 0.96), rgba(15, 23, 42, 0.94));
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
}

.stats-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 16px 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    color: #e2e8f0;
    font-size: 0.94rem;
    font-weight: 750;
    line-height: 1.7;
}

.stat-icon {
    font-size: 1.35rem;
}

.icon-gold {
    color: #facc15;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.42);
}

.icon-cyan {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.42);
}

.section-title {
    margin-top: 18px;
    margin-bottom: 42px;
    text-align: center;
}

.section-title h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.45;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
    margin-bottom: 84px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 360px;
    padding: 28px;
    overflow: hidden;
    text-align: right;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.64));
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 28px 76px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.card-title {
    color: #fff;
    font-size: 1.38rem;
    font-weight: 900;
    direction: ltr;
}

.card-title-analyst {
    color: #facc15;
}

.card-icon {
    margin-bottom: 0;
    font-size: 1.8rem;
}

.card-icon-dev,
.card-action-dev {
    color: #38bdf8;
}

.card-icon-analyst,
.card-action-analyst {
    color: #facc15;
}

.card-icon-enterprise {
    color: #f43f5e;
}

.card-action-enterprise {
    color: #7dd3fc;
}

.card-desc {
    flex-grow: 1;
    margin: 0 0 24px;
    color: #aab7ca;
    font-size: 0.95rem;
    font-weight: 520;
    line-height: 1.9;
}

.visual-area {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 118px;
    margin-bottom: 18px;
}

.code-snippet {
    width: 100%;
    padding: 12px;
    direction: ltr;
    text-align: left;
    color: #a5b4fc;
    background: #000;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-family: monospace;
    font-size: 0.75rem;
    line-height: 1.65;
}

.kwd { color: #c084fc; }
.str { color: #4ade80; }

.excel-sheet {
    width: 100%;
    overflow: hidden;
    color: #333;
    background: #fff;
    border-radius: 8px;
    font-size: 0.7rem;
}

.excel-header { height: 15px; background: #107c41; }
.excel-row { display: flex; padding: 4px; border-bottom: 1px solid #eee; }
.excel-row span { flex: 1; text-align: center; }
.excel-row:first-child { background: #f0f0f0; font-weight: bold; }

.pie-chart {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: conic-gradient(#3b82f6 0% 65%, #ef4444 65% 100%);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.34);
}

.pie-chart::after {
    content: '';
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: #0f172a;
    border-radius: 50%;
}

.card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: auto;
    padding: 11px 16px;
    border: 1px solid currentColor;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1.45;
    text-align: center;
}

.card-action:hover {
    color: #020617;
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.16);
}

.card-action-dev:hover,
.card-action-enterprise:hover {
    background: #38bdf8;
    border-color: #38bdf8;
}

.card-action-analyst:hover {
    background: #facc15;
    border-color: #facc15;
}

.card-gold-border {
    border-color: rgba(250, 204, 21, 0.36);
    box-shadow: 0 24px 70px rgba(250, 204, 21, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.logos-section {
    padding: 34px 0 38px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.logos-kicker {
    margin: 0 0 18px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 850;
    text-align: center;
}

.logo-scroller {
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-track {
    display: inline-block;
    animation: scroll 30s linear infinite;
}

.logo-item {
    height: 35px;
    margin: 0 30px;
    opacity: 0.7;
    filter: grayscale(100%) brightness(2);
    transition: 0.3s;
}

.logo-item:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px white);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.site-footer {
    padding: 80px 0 30px;
    color: #f8fafc;
    background-color: #0b1120;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand h2 {
    margin-top: 0;
    color: #fff;
    font-size: 1.5rem;
    direction: ltr;
    text-align: right;
}

.footer-brand .brand-dot {
    display: inline-block;
    color: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan);
}

.site-footer .footer-desc {
    max-width: 300px;
    margin-top: 15px;
    color: var(--text-muted);
    line-height: 1.8;
}

.site-footer .footer-col h3 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 1.1rem;
}

.site-footer .footer-links li {
    margin-bottom: 12px;
}

.site-footer .footer-links a {
    color: var(--text-muted);
    transition: color 0.3s;
}

.site-footer .footer-links a:hover {
    color: var(--cyan);
}

.support-email {
    display: block;
    margin-bottom: 20px;
    color: #fff;
    font-family: monospace;
    font-size: 1.1rem;
    direction: ltr;
    text-align: right;
}

.site-footer .social-icons {
    display: flex;
    gap: 20px;
}

.site-footer .social-icons a {
    color: var(--text-muted);
    font-size: 1.4rem;
    transition: 0.3s;
}

.site-footer .social-icons a:hover {
    color: #fff;
    transform: translateY(-3px);
}

.site-footer .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 30px;
    color: #64748b;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 1100px) {
    .nav-menu {
        gap: 16px;
        margin-right: 18px;
    }
    .cards-grid {
        gap: 18px;
    }
    .feature-card {
        padding: 24px;
    }
}

@media (max-width: 900px) {
    .nav-menu {
        display: none;
    }
    .cards-grid {
        grid-template-columns: 1fr;
        width: min(620px, 100%);
        margin-right: auto;
        margin-left: auto;
    }
    .feature-card {
        min-height: auto;
    }
    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 640px) {
    .navbar.container {
        padding-top: 14px;
        padding-bottom: 14px;
    }
    .hero-section {
        padding-top: 26px;
        padding-bottom: 16px;
    }
    .hero-title {
        font-size: clamp(2rem, 10vw, 2.55rem);
        line-height: 1.34;
    }
    .hero-desc {
        margin-bottom: 24px;
        font-size: 1rem;
        line-height: 1.9;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        margin-bottom: 34px;
    }
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        min-height: 50px;
        padding-inline: 18px;
    }
    .stats-strip {
        margin-top: -8px;
        margin-bottom: 46px;
        padding: 18px 0;
    }
    .stats-container {
        align-items: stretch;
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }
    .stat-item {
        justify-content: center;
        padding: 10px 12px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.035);
        font-size: 0.9rem;
    }
    .cards-grid {
        gap: 16px;
        margin-bottom: 58px;
    }
    .feature-card {
        padding: 22px 18px;
        border-radius: 20px;
    }
    .visual-area {
        min-height: 98px;
    }
    .card-action {
        min-height: 48px;
    }
    .logo-item {
        height: 28px;
        margin: 0 18px;
    }
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .site-footer .footer-desc {
        margin-right: auto;
        margin-left: auto;
    }
    .support-email,
    .footer-brand h2 {
        text-align: center;
    }
    .site-footer .social-icons,
    .site-footer .footer-bottom {
        justify-content: center;
    }
    .site-footer .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .khapi-market-ticker__item:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 480px) {
    .khapi-market-ticker__item:nth-child(n+5) {
        display: none;
    }
}

/* KHAPI market ticker unified styles */
body {
    padding-top: max(54px, var(--khapi-ticker-height, 48px));
}

/* صفحات عمومی بدون تیکر (about/terms/privacy/sla) فضای خالی بالا نگیرن */
body.public-page {
    padding-top: 0;
}

.khapi-market-ticker {
    --khapi-ticker-height: 48px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: block;
    width: 100%;
    max-width: 100vw;
    height: var(--khapi-ticker-height);
    overflow: hidden;
    direction: rtl;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(8, 13, 30, 0.92));
    border-bottom: 1px solid rgba(34, 211, 238, 0.22);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.khapi-market-ticker__viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.khapi-market-ticker__track {
    display: flex;
    align-items: center;
    width: max-content;
    height: 100%;
    animation: khapiTickerScroll 52s linear infinite;
    will-change: transform;
}

.khapi-market-ticker:hover .khapi-market-ticker__track {
    animation-play-state: paused;
}

.khapi-market-ticker__group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.khapi-market-ticker__item {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    height: 100%;
    margin: 0;
    padding: 0 15px;
    color: #dffbff;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    border-inline-start: 1px solid rgba(34, 211, 238, 0.18);
    text-shadow: 0 0 5px rgba(34, 211, 238, 0.55), 0 0 12px rgba(34, 211, 238, 0.25);
}

.khapi-market-ticker__item strong {
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 0 6px rgba(250, 204, 21, 0.5), 0 0 14px rgba(34, 211, 238, 0.32);
}

.khapi-market-ticker__item[hidden] {
    display: none !important;
}

@keyframes khapiTickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

@media (max-width: 768px) {
    body {
        padding-top: var(--khapi-ticker-height, 44px);
    }

    .khapi-market-ticker {
        --khapi-ticker-height: 44px;
    }

    .khapi-market-ticker__item {
        padding: 0 12px;
        font-size: 0.78rem;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .khapi-market-ticker {
        --khapi-ticker-height: 40px;
    }

    .khapi-market-ticker__track {
        animation-duration: 58s;
    }

    .khapi-market-ticker__item {
        padding: 0 10px;
        font-size: 0.72rem;
    }

    .khapi-market-ticker__label {
        font-size: 0.8rem;
        height: 26px;
        margin-inline-start: 8px;
        padding: 0 9px;
    }
}
/* End KHAPI market ticker unified styles */

/* KHAPI market page fintech redesign */
.khapi-market-dashboard {
    padding: 30px 0 88px;
    background:
        radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.14), transparent 30%),
        radial-gradient(circle at 88% 8%, rgba(16, 185, 129, 0.10), transparent 25%),
        linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(15, 23, 42, 0.26));
}

.khapi-market-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.khapi-market-hero--seo {
    display: block;
    margin-bottom: 18px;
    padding: 28px 28px 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.76));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.khapi-market-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: #22d3ee;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(34, 211, 238, 0.42);
}

.khapi-market-hero h1 {
    max-width: 850px;
    margin: 0 0 10px;
    color: #f8fafc;
    font-size: clamp(1.7rem, 3.2vw, 2.75rem);
    line-height: 1.3;
}

.khapi-market-hero p {
    max-width: 840px;
    margin: 0;
    color: #a6b3c5;
    font-size: 1rem;
    line-height: 2;
}

.khapi-market-live-box {
    display: inline-flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.khapi-market-live-pill,
.khapi-market-live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #dffdf2;
    font-size: 0.82rem;
    font-weight: 850;
}

.khapi-market-live-pill {
    margin-top: 0;
    padding: 8px 12px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.08);
}

.khapi-market-live-pill span,
.khapi-market-live-status i,
.khapi-market-table-head i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #39ff88;
    box-shadow: 0 0 0 0 rgba(57, 255, 136, 0.72), 0 0 14px rgba(57, 255, 136, 0.88);
    animation: khapiLivePulse 1.45s ease-out infinite;
}

@keyframes khapiLivePulse {
    70% { box-shadow: 0 0 0 9px rgba(57, 255, 136, 0), 0 0 14px rgba(57, 255, 136, 0.88); }
    100% { box-shadow: 0 0 0 0 rgba(57, 255, 136, 0), 0 0 14px rgba(57, 255, 136, 0.88); }
}

.khapi-market-last-update {
    margin: 0;
    padding-inline-start: 2px;
    color: #9fb1c7;
    font-size: 0.86rem;
    line-height: 1.8;
}

.khapi-market-last-update time {
    color: #dffdf2;
    font-weight: 850;
}

.khapi-market-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.62);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.20);
}

.khapi-market-tab {
    flex: 0 0 auto;
    border: 0;
    border-radius: 16px;
    padding: 11px 16px;
    color: #a6b3c5;
    background: transparent;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.khapi-market-tab:hover,
.khapi-market-tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(16, 185, 129, 0.13));
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.20), 0 0 24px rgba(34, 211, 238, 0.08);
}

.khapi-market-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.khapi-market-kpi-card,
.khapi-market-table-card {
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(2, 6, 23, 0.76);
    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
}

.khapi-market-kpi-card {
    padding: 16px;
    border-radius: 22px;
}

.khapi-market-kpi-price {
    margin: 14px 0 10px;
    color: #fff;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.khapi-market-kpi-price small,
.khapi-market-price span,
.khapi-market-asset small,
.khapi-market-updated,
.khapi-market-table-head span,
.khapi-market-table-meta {
    color: #94a3b8;
}

.khapi-market-panel[hidden] {
    display: none !important;
}

.khapi-market-table-card {
    overflow: hidden;
    border-radius: 26px;
}

/* موبایل: جدول بازار به حالت کارت */
@media (max-width: 768px) {
    .khapi-market-table,
    .khapi-market-table thead,
    .khapi-market-table tbody,
    .khapi-market-table tr,
    .khapi-market-table td {
        display: block;
        width: 100%;
    }
    .khapi-market-table thead {
        display: none;
    }
    .khapi-market-table tr {
        margin-bottom: 0.8rem;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 14px;
        overflow: hidden;
        background: rgba(2, 6, 23, 0.5);
    }
    .khapi-market-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 14px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    }
    .khapi-market-table td:last-child {
        border-bottom: none;
    }
    .khapi-market-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: #94a3b8;
        margin-left: 12px;
        font-size: 0.82rem;
    }
}

.khapi-market-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.khapi-market-table-head h2 {
    margin: 0 0 5px;
    color: #f8fafc;
    font-size: 1.16rem;
}

.khapi-market-table-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
}

.khapi-market-table-meta {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
    font-size: 0.82rem;
    font-weight: 800;
}

.khapi-market-table-wrap {
    overflow-x: auto;
}

.khapi-market-table {
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.khapi-market-table th,
.khapi-market-table td {
    padding: 17px 20px;
    text-align: right;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    vertical-align: middle;
    white-space: nowrap;
}

.khapi-market-table th {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 950;
    background: rgba(15, 23, 42, 0.95);
    cursor: pointer;
    user-select: none;
}

.khapi-market-table th[data-direction='asc']::after { content: ' ↑'; color: #22d3ee; }
.khapi-market-table th[data-direction='desc']::after { content: ' ↓'; color: #22d3ee; }

.khapi-market-table tbody tr {
    transition: transform 0.18s ease, background 0.18s ease;
}

.khapi-market-table tbody tr:hover td {
    background: rgba(34, 211, 238, 0.055);
}

/* Keep the card layout inside narrow viewports. The desktop min-width rule
   above otherwise wins over the earlier mobile block in the cascade. */
@media (max-width: 768px) {
    .khapi-market-table {
        min-width: 0;
    }

    .khapi-market-table tr,
    .khapi-market-table td {
        box-sizing: border-box;
        min-width: 0;
    }

    .khapi-market-table td {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

.khapi-market-asset {
    display: flex;
    align-items: center;
    gap: 12px;
}

.khapi-market-asset strong {
    display: block;
    margin-bottom: 4px;
    color: #f8fafc;
    font-size: 1.08rem;
    font-weight: 950;
}

.khapi-market-asset-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 15px;
    background: rgba(34, 211, 238, 0.10);
    border: 1px solid rgba(34, 211, 238, 0.20);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 24px rgba(34, 211, 238, 0.10);
    font-size: 1.3rem;
}

.khapi-market-asset-icon--gold,
.khapi-market-asset-icon--coin {
    background: rgba(250, 204, 21, 0.11);
    border-color: rgba(250, 204, 21, 0.24);
}

.khapi-market-asset-icon--usd,
.khapi-market-asset-icon--eur {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
}

.khapi-market-asset-icon--crypto {
    background: rgba(45, 212, 191, 0.11);
    border-color: rgba(45, 212, 191, 0.24);
}

.khapi-market-asset-icon--index {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.26);
}

.khapi-market-price {
    color: #f8fafc;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    font-size: 1.18rem;
    font-weight: 950;
    letter-spacing: -0.01em;
}

.khapi-market-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 950;
    direction: ltr;
}

.khapi-market-change--up {
    color: #39ff88;
    background: rgba(57, 255, 136, 0.10);
    border: 1px solid rgba(57, 255, 136, 0.22);
    text-shadow: 0 0 10px rgba(57, 255, 136, 0.28);
}

.khapi-market-change--down {
    color: #ff6b7a;
    background: rgba(255, 107, 122, 0.10);
    border: 1px solid rgba(255, 107, 122, 0.22);
    text-shadow: 0 0 10px rgba(255, 107, 122, 0.22);
}

.khapi-market-change--flat {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

@media (max-width: 980px) {
    .khapi-market-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .khapi-market-shell { width: min(100% - 20px, 1180px); }
    .khapi-market-table th, .khapi-market-table td { padding: 14px 15px; }
    .khapi-market-asset strong { font-size: 1rem; }
    .khapi-market-price { font-size: 1.08rem; }
    .khapi-market-hero--seo { padding: 22px 18px; }
    .khapi-market-kpi-grid { grid-template-columns: 1fr; }
    .khapi-market-table-head { align-items: flex-start; flex-direction: column; }
}
/* End KHAPI market page fintech redesign */


/* KHAPI public pages navigation and footer */
.public-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 0%, rgba(34, 211, 238, 0.12), transparent 30%),
        radial-gradient(circle at 86% 8%, rgba(59, 130, 246, 0.10), transparent 26%),
        #020617;
    color: #f8fafc;
    font-family: 'Vazirmatn', sans-serif;
    margin: 0;
}

.public-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 54px;
}

.public-subnav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.public-subnav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #aab7ca;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.5;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.public-subnav__link:hover {
    color: #f8fafc;
    border-color: rgba(34, 211, 238, 0.24);
    background: rgba(34, 211, 238, 0.08);
    transform: translateY(-1px);
}

.public-subnav__link.active {
    color: #04111d;
    border-color: rgba(125, 249, 255, 0.74);
    background: linear-gradient(135deg, #22d3ee, #facc15);
    box-shadow: 0 12px 34px rgba(34, 211, 238, 0.18);
}

.public-card {
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.68)),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 38%);
    box-shadow: 0 28px 86px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.public-card h1 {
    margin: 0 0 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: #f8fafc;
    font-size: clamp(1.75rem, 4vw, 2.65rem);
    font-weight: 950;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

/* موبایل: جدول SLA به حالت کارت */
@media (max-width: 768px) {
    .public-table,
    .public-table thead,
    .public-table tbody,
    .public-table tr,
    .public-table td {
        display: block;
        width: 100%;
    }
    .public-table thead {
        display: none;
    }
    .public-table tr {
        margin-bottom: 0.8rem;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 14px;
        overflow: hidden;
        background: rgba(2, 6, 23, 0.42);
    }
    .public-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 10px 14px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    }
    .public-table td:last-child {
        border-bottom: none;
    }
    .public-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: #94a3b8;
        margin-left: 12px;
        font-size: 0.82rem;
    }
}

.public-card h2 {
    margin: 30px 0 12px;
    color: #e2e8f0;
    font-size: 1.24rem;
    line-height: 1.6;
}

.public-card p,
.public-card li {
    color: #c4cedd;
    font-size: 1rem;
    font-weight: 500;
    line-height: 2;
    text-align: justify;
}

.public-card ul {
    margin: 0;
    padding-right: 22px;
}

.public-muted {
    margin-top: 28px;
    color: #7f8da3 !important;
    font-size: 0.9rem !important;
}

.public-shell--blue .public-card h1 { color: #7dd3fc; }
.public-shell--green .public-card h1 { color: #34d399; }
.public-shell--amber .public-card h1 { color: #fbbf24; }
.public-shell--cyan .public-card h1 { color: #67e8f9; }

.about-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 34px;
}

.about-feature-card {
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.38);
}

.about-feature-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    margin-bottom: 14px;
    padding: 0 10px;
    border-radius: 16px;
    color: #020617;
    background: linear-gradient(135deg, #22d3ee, #facc15);
    font-weight: 950;
}

.about-feature-card h2 {
    margin-top: 0;
}

.about-feature-card p {
    margin-bottom: 0;
    text-align: right;
}

.public-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.public-table {
    width: 100%;
    min-width: 640px;
    margin-top: 18px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
}

.public-table th,
.public-table td {
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    text-align: center;
    line-height: 1.7;
}

.public-table th {
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.88);
}

.public-footer {
    margin-top: 0;
    padding: 46px 20px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), #020617);
    color: #f8fafc;
}

.public-footer__inner {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(150px, 1fr));
    gap: 28px;
    width: min(1120px, 100%);
    margin: 0 auto 28px;
}

.public-footer__logo {
    display: inline-flex;
    margin-bottom: 12px;
    color: #fff;
    font-family: sans-serif;
    font-size: 1.75rem;
    font-weight: 950;
    letter-spacing: 1px;
    text-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
}

.public-footer__brand p {
    max-width: 390px;
    margin: 0;
    color: #9fb0c6;
    font-size: 0.95rem;
    line-height: 1.9;
}

.public-footer__col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.public-footer__col h3 {
    margin: 0 0 8px;
    color: #e2e8f0;
    font-size: 1rem;
}

.public-footer__col a {
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 650;
    transition: color 0.22s ease, transform 0.22s ease;
}

.public-footer__col a:hover {
    color: #22d3ee;
    transform: translateX(-3px);
}

.public-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1120px, 100%);
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
    color: #74839a;
    font-size: 0.86rem;
}

@media (max-width: 900px) {
    .about-feature-grid,
    .public-footer__inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .public-shell {
        width: min(100% - 24px, 1040px);
        padding: 24px 0 38px;
    }
    .public-subnav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px;
        border-radius: 16px;
    }
    .public-subnav__link {
        flex: 0 0 auto;
        min-height: 38px;
        font-size: 0.86rem;
        white-space: nowrap;
    }
    .public-card {
        border-radius: 22px;
    }
    .public-card p,
    .public-card li {
        font-size: 0.95rem;
        line-height: 1.95;
    }
    .about-feature-grid,
    .public-footer__inner {
        grid-template-columns: 1fr;
    }
    .public-footer {
        padding: 38px 16px 20px;
    }
    .public-footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}


/* KHAPI home UI polish */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    color: #9ff6ff;
    background: rgba(34, 211, 238, 0.075);
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 0 28px rgba(34, 211, 238, 0.08);
}

.hero-section {
    padding-top: clamp(42px, 6.5vw, 82px);
}

.hero-title {
    max-width: 1040px;
    text-shadow: 0 18px 70px rgba(34, 211, 238, 0.08);
}

.hero-desc {
    max-width: 850px;
    color: #c3cfdf;
}

.hero-actions {
    gap: 14px;
}

.btn-hero-primary {
    min-height: 60px;
    padding: 16px 38px;
    color: #03121e;
    background: linear-gradient(135deg, #facc15 0%, #22d3ee 52%, #a7f3d0 100%);
    border-color: rgba(250, 204, 21, 0.72);
    font-size: 1.12rem;
    box-shadow: 0 22px 58px rgba(250, 204, 21, 0.18), 0 18px 44px rgba(34, 211, 238, 0.28), inset 0 1px 0 rgba(255,255,255,0.45);
}

.btn-hero-secondary {
    min-height: 52px;
    padding: 13px 25px;
    color: #dbeafe;
    background: rgba(2, 6, 23, 0.36);
    border-color: rgba(125, 211, 252, 0.34);
    font-size: 0.98rem;
}

.stats-strip {
    margin-top: -18px;
    padding: 18px 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.90)),
        radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.09), transparent 42%);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-item {
    min-height: 72px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stat-item strong {
    color: #f8fafc;
    font-size: 1.08em;
    font-weight: 950;
}

.section-kicker {
    display: inline-flex;
    margin: 0 0 10px;
    color: #22d3ee;
    font-size: 0.86rem;
    font-weight: 950;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, rgba(34,211,238,0), rgba(34,211,238,0.8), rgba(250,204,21,0));
    opacity: 0.28;
}

.card-title {
    direction: rtl;
    letter-spacing: -0.01em;
}

.visual-area {
    min-height: 150px;
}

.code-snippet {
    position: relative;
    margin: 0;
    padding: 18px 16px 16px;
    color: #c7d2fe;
    background: linear-gradient(180deg, #020617, #050816);
    border-color: rgba(56, 189, 248, 0.22);
    border-radius: 16px;
    font-size: 0.8rem;
    line-height: 1.75;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
    overflow-x: auto;
}

.code-snippet::before {
    content: 'Python';
    display: block;
    margin-bottom: 10px;
    color: #7dd3fc;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.code-snippet code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
    white-space: pre;
}

.excel-sheet {
    direction: rtl;
    color: #dbeafe;
    background: #0b1220;
    border: 1px solid rgba(250, 204, 21, 0.24);
    border-radius: 16px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.excel-header {
    display: flex;
    align-items: center;
    height: auto;
    min-height: 34px;
    padding: 7px 12px;
    color: #020617;
    background: linear-gradient(90deg, #facc15, #fde68a);
    font-size: 0.78rem;
    font-weight: 950;
}

.excel-row {
    gap: 4px;
    padding: 8px 10px;
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

.excel-row span {
    color: #cbd5e1;
    font-size: 0.74rem;
    line-height: 1.55;
}

.excel-row-head {
    background: rgba(250, 204, 21, 0.08) !important;
}

.excel-row-head span {
    color: #fef3c7;
    font-weight: 900;
}

.enterprise-visual {
    align-items: stretch;
}

.enterprise-signal-card {
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    min-height: 132px;
    padding: 18px;
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: 18px;
    background:
        radial-gradient(circle at 15% 20%, rgba(244, 63, 94, 0.22), transparent 28%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.78));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

.enterprise-signal-card span {
    color: #fecdd3;
    font-size: 0.82rem;
    font-weight: 850;
}

.enterprise-signal-card strong {
    margin: 8px 0 6px;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 950;
}

.enterprise-signal-card small {
    color: #aab7ca;
    font-size: 0.82rem;
    line-height: 1.7;
}

.khapi-market-ticker__item strong {
    min-width: 78px;
    text-align: start;
}

.khapi-market-ticker[data-market-status="error"] .khapi-market-ticker__item strong {
    color: #cbd5e1;
    text-shadow: none;
}

@media (max-width: 980px) {
    .stats-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .hero-eyebrow {
        font-size: 0.78rem;
    }
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
    }
    .btn-hero-primary {
        min-height: 56px;
    }
    .stats-container {
        grid-template-columns: 1fr;
    }
    .stat-item {
        min-height: 58px;
        justify-content: flex-start;
    }
    .visual-area {
        min-height: 128px;
    }
    .code-snippet {
        font-size: 0.72rem;
    }
}


/* KHAPI live homepage UX refinements */
.hero-section {
    padding-bottom: clamp(18px, 3.2vw, 34px);
}

.hero-eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.72);
}

.hero-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: -18px auto clamp(28px, 4vw, 44px);
    color: #b8c7db;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.7;
}

.hero-proof span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.hero-proof i {
    color: #22d3ee;
    font-size: 0.86rem;
}

.hero-image-container {
    max-width: 1040px;
}

.khapi-market-ticker {
    display: flex;
    align-items: center;
}

.khapi-market-ticker__label {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    height: 28px;
    margin-inline-start: 14px;
    padding: 0 11px;
    color: #020617;
    background: linear-gradient(135deg, #facc15, #22d3ee);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.22);
}

.khapi-market-ticker__viewport {
    min-width: 0;
}

.khapi-market-ticker__item strong:empty,
.khapi-market-ticker__item strong:not([data-market-news-count]) {
    border-radius: 6px;
}

.khapi-market-ticker__item strong {
    position: relative;
}


.stat-item {
    justify-content: center;
    text-align: center;
}

.stat-item span {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.feature-card {
    min-height: 392px;
}

.card-desc {
    min-height: 72px;
}

.visual-area {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 22px;
}

.code-snippet,
.excel-sheet,
.enterprise-signal-card {
    width: 100%;
}

.card-action {
    letter-spacing: -0.01em;
}

@media (max-width: 1100px) and (min-width: 901px) {
    .nav-menu {
        gap: 12px;
        margin-right: 16px;
    }
    .nav-menu a {
        font-size: 0.88rem;
    }
    .feature-card {
        padding: 24px 20px;
    }
}

@media (max-width: 900px) {
    .hero-proof {
        margin-top: -14px;
    }
    .feature-card {
        min-height: auto;
    }
    .card-desc {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding-inline: 14px;
    }
    .hero-title {
        letter-spacing: -0.025em;
    }
    .hero-proof {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
        max-width: 360px;
        margin-top: -12px;
        font-size: 0.84rem;
    }
    .hero-proof span {
        justify-content: center;
        border-radius: 14px;
    }
    .khapi-market-ticker__label {
        height: 24px;
        margin-inline-start: 8px;
        padding: 0 8px;
        font-size: 0.66rem;
    }
    .stats-strip {
        margin-bottom: 38px;
    }
    .stat-item {
        justify-content: flex-start;
        text-align: right;
    }
    .stat-item span {
        justify-content: flex-start;
    }
    .section-title {
        margin-bottom: 28px;
    }
    .card-header {
        align-items: flex-start;
    }
    .card-title {
        font-size: 1.22rem;
    }
    .card-desc {
        margin-bottom: 18px;
        font-size: 0.94rem;
    }
}


/* KHAPI requested hero/ticker tightening */
.hero-section {
    padding-top: clamp(18px, 3.2vw, 42px);
    padding-bottom: clamp(12px, 2.2vw, 24px);
}

.hero-title {
    margin-bottom: 14px;
}

.hero-desc {
    margin-bottom: 24px;
}

.hero-actions {
    gap: 12px;
    margin-bottom: 22px;
}

.btn-hero-primary {
    min-height: 64px;
    padding: 17px 42px;
    font-size: clamp(1.16rem, 1.7vw, 1.34rem);
    font-weight: 950;
}

.btn-hero-secondary {
    min-height: 56px;
    padding: 14px 28px;
    font-size: clamp(1.02rem, 1.25vw, 1.12rem);
    font-weight: 900;
}

.hero-proof {
    gap: 12px;
    margin: 0 auto clamp(22px, 3vw, 34px);
    font-size: clamp(1rem, 1.15vw, 1.08rem);
    font-weight: 850;
}

.hero-proof span {
    padding: 10px 15px;
    color: #dbeafe;
    border-color: rgba(125, 211, 252, 0.18);
}

.hero-proof i {
    font-size: 0.98rem;
}

.hero-image-container {
    max-width: 980px;
}

.stats-strip {
    margin-top: -12px;
    margin-bottom: 44px;
}

.section-title {
    margin-top: 8px;
    margin-bottom: 30px;
}

.cards-grid {
    margin-bottom: 66px;
}

.khapi-market-ticker {
    --khapi-ticker-height: 54px;
    background:
        linear-gradient(180deg, rgba(1, 8, 18, 0.98), rgba(7, 15, 32, 0.96)),
        radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.20), transparent 48%);
    border-bottom-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.khapi-market-ticker__label {
    height: 32px;
    margin-inline-start: 16px;
    padding: 0 13px;
    font-size: 0.82rem;
    letter-spacing: -0.01em;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.32), 0 6px 18px rgba(250, 204, 21, 0.14);
}

.khapi-market-ticker__item {
    gap: 8px;
    padding: 0 18px;
    color: #aaf6ff;
    font-size: 1rem;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.70), 0 0 18px rgba(34, 211, 238, 0.34), 0 1px 0 rgba(255, 255, 255, 0.18);
}

.khapi-market-ticker__item strong {
    color: #fff;
    font-size: 1.02em;
    font-weight: 950;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.28), 0 0 14px rgba(34, 211, 238, 0.22);
}

@media (max-width: 768px) {
    body {
        padding-top: var(--khapi-ticker-height, 48px);
    }
    .khapi-market-ticker {
        --khapi-ticker-height: 48px;
    }
    .khapi-market-ticker__item {
        padding: 0 14px;
        font-size: 0.9rem;
        gap: 7px;
    }
    .khapi-market-ticker__label {
        height: 28px;
        font-size: 0.74rem;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding-top: 18px;
        padding-bottom: 12px;
    }
    .hero-title {
        margin-bottom: 12px;
    }
    .hero-desc {
        margin-bottom: 20px;
    }
    .hero-actions {
        gap: 10px;
        margin-bottom: 18px;
    }
    .btn-hero-primary {
        min-height: 58px;
        font-size: 1.14rem;
    }
    .btn-hero-secondary {
        min-height: 52px;
        font-size: 1.02rem;
    }
    .hero-proof {
        max-width: 380px;
        gap: 9px;
        margin-bottom: 24px;
        font-size: 0.96rem;
    }
    .hero-proof span {
        padding: 10px 12px;
    }
    .stats-strip {
        margin-top: -6px;
        margin-bottom: 32px;
    }
    .section-title {
        margin-top: 2px;
        margin-bottom: 22px;
    }
    .cards-grid {
        margin-bottom: 48px;
    }
}

@media (max-width: 480px) {
    .khapi-market-ticker {
        --khapi-ticker-height: 46px;
    }
    .khapi-market-ticker__label {
        height: 26px;
        margin-inline-start: 8px;
        padding: 0 8px;
        font-size: 0.68rem;
    }
    .khapi-market-ticker__item {
        padding: 0 12px;
        font-size: 0.84rem;
    }
}


.public-footer__contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.public-footer__contact a {
    color: #e2e8f0;
    font-weight: 850;
    text-decoration: none;
}

.public-footer__contact a:hover {
    color: #22d3ee;
}

/* Public header/footer consistency */
.khapi-market-ticker__label {
    height: 30px;
    color: #dffbff;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(34, 211, 238, 0.34);
    box-shadow: none;
    white-space: nowrap;
}

.public-footer__contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    direction: ltr;
    font-style: normal;
}

.public-footer__contact a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    color: #e2e8f0;
    line-height: 1;
    unicode-bidi: isolate;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.public-footer__contact a:hover,
.public-footer__contact a:focus-visible {
    color: #67e8f9;
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(34, 211, 238, 0.08);
}

@media (max-width: 640px) {
    .public-footer__bottom {
        gap: 12px;
    }

    .public-footer__contact {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .public-footer__contact a {
        width: min(100%, 260px);
    }

    .hero-actions .btn-hero-primary {
        width: auto;
        max-width: 260px;
        min-height: 44px;
        padding: 10px 18px;
        font-size: 0.95rem;
        line-height: 1.4;
        align-self: center;
    }

    .hero-actions .btn-hero-secondary {
        box-sizing: border-box;
        max-width: 100%;
    }
}

/* Compact three-column public footer on mobile. */
@media (max-width: 640px) {
    .public-footer {
        padding: 24px 12px 14px;
    }
    .public-footer__inner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 8px;
        margin-bottom: 14px;
    }
    .public-footer__brand {
        grid-column: 1 / -1;
        text-align: center;
    }
    .public-footer__logo {
        margin-bottom: 4px;
        font-size: 1.35rem;
    }
    .public-footer__brand p {
        max-width: 100%;
        font-size: 0.72rem;
        line-height: 1.6;
    }
    .public-footer__col {
        gap: 3px;
        min-width: 0;
    }
    .public-footer__col h3 {
        margin-bottom: 3px;
        font-size: 0.78rem;
    }
    .public-footer__col a {
        min-height: 30px;
        font-size: 0.7rem;
        line-height: 1.35;
        white-space: normal;
    }
    .public-footer__bottom {
        flex-direction: column;
        gap: 8px;
        padding-top: 12px;
        font-size: 0.7rem;
        text-align: center;
    }
    .public-footer__contact {
        width: auto;
        flex-direction: row;
        gap: 6px;
    }
    .public-footer__contact a {
        min-height: 30px;
        padding: 0 8px;
        font-size: 0.72rem;
    }
}



/* Public mobile navigation and interactive source controls */
.public-menu-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 9px 12px;
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-color);
    font: inherit;
    cursor: pointer;
}
.public-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 990;
    border: 0;
    background: rgba(2, 6, 23, 0.68);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.public-menu-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}
body.public-menu-open {
    overflow: hidden;
}
.nav-menu a.active,
.nav-menu a[aria-current="page"] {
    color: var(--text-color);
}
.source-card[hidden] { display: none !important; }
.sources-empty { text-align: center; color: var(--text-muted); padding: 24px; }
@media (max-width: 900px) {
    .public-menu-toggle { display: inline-flex; }
    .navbar .nav-container, .navbar.container { position: relative; }
    .navbar .nav-links, .navbar .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 16px;
        left: 16px;
        z-index: 1000;
        flex-direction: column;
        gap: 4px;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: 14px;
        background: rgba(2, 6, 23, 0.98);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
    }
    .navbar .nav-links.is-open, .navbar .nav-menu.is-open { display: flex; }
    .navbar .nav-links a, .navbar .nav-menu a { display: block; padding: 11px 12px; border-radius: 8px; }
    .navbar .nav-links a:hover, .navbar .nav-menu a:hover { background: rgba(34, 211, 238, 0.08); }
}
@media (min-width: 901px) {
    .public-menu-backdrop {
        display: none;
    }
}

/* === حالت خطای استاندارد (Error State) — مشترک بین پنل‌ها === */
.khapi-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 20px;
    text-align: center;
    color: #94a3b8;
}
.khapi-error-state__icon { font-size: 1.8rem; line-height: 1; }
.khapi-error-state__title { font-weight: 800; color: #f87171; font-size: 1.02rem; }
.khapi-error-state__desc { font-size: 0.86rem; max-width: 360px; color: #94a3b8; }
.khapi-error-state__meta { font-size: 0.78rem; color: #64748b; }
.khapi-error-state__retry {
    margin-top: 6px;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.khapi-error-state__retry:hover { background: rgba(34, 211, 238, 0.18); }

.kh-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* شفافیت منبع و تازگی داده در صفحه بازار */
.khapi-market-disclosure {
    display: grid;
    grid-template-columns: minmax(180px, .55fr) minmax(0, 1.45fr);
    gap: 18px;
    align-items: center;
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.055);
    color: #cbd5e1;
}
.khapi-market-disclosure strong,
.khapi-market-disclosure span { display: block; }
.khapi-market-disclosure strong { margin-bottom: 4px; color: #fde68a; font-size: .86rem; }
.khapi-market-disclosure span,
.khapi-market-disclosure p { color: #a6b3c5; font-size: .82rem; line-height: 1.85; }
.khapi-market-disclosure p { margin: 0; }
.khapi-market-provider-list {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0 18px 0 0;
    color: #a6b3c5;
    font-size: .82rem;
    line-height: 1.75;
    list-style: disc;
}
.khapi-market-provider-list li {
    list-style: disc;
}
.khapi-market-live-pill.is-stale { color: #fde68a; border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); }
.khapi-market-live-pill.is-stale span { background: #f59e0b; box-shadow: 0 0 12px rgba(245,158,11,.7); animation: none; }
.khapi-market-live-pill.is-unavailable { color: #fecaca; border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.khapi-market-live-pill.is-unavailable span { background: #ef4444; box-shadow: none; animation: none; }
@media (max-width: 640px) {
    .khapi-market-disclosure { grid-template-columns: 1fr; gap: 8px; }
}

/* Market integrity, live refresh and compact mobile controls */
.khapi-market-ticker__toggle {
    z-index: 2;
    flex: 0 0 auto;
    min-width: 52px;
    min-height: 32px;
    margin-inline-start: 7px;
    padding: 0 9px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 9px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.88);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 850;
    cursor: pointer;
}
.khapi-market-ticker.is-paused .khapi-market-ticker__track {
    animation-play-state: paused;
}
.khapi-market-ticker__item[data-market-item-status="delayed"] strong {
    color: #fde68a;
}
.khapi-market-ticker__item[data-market-item-status="expired"] {
    color: #fca5a5;
    text-shadow: none;
}
.khapi-market-ticker__item[data-market-item-status="expired"] strong {
    color: #fecaca;
    text-shadow: none;
}
.khapi-market-ticker[data-market-status="stale"] {
    border-bottom-color: rgba(245, 158, 11, 0.48);
}

.khapi-market-live-pill b,
.khapi-market-live-status b {
    font: inherit;
}
.khapi-market-live-status.is-delayed {
    color: #fde68a;
}
.khapi-market-live-status.is-delayed i {
    background: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.64);
    animation: none;
}
.khapi-market-live-status.is-expired {
    color: #fecaca;
}
.khapi-market-live-status.is-expired i {
    background: #ef4444;
    box-shadow: none;
    animation: none;
}
.khapi-market-kpi-card.is-delayed,
.khapi-market-table tr.is-delayed td {
    background: rgba(245, 158, 11, 0.035);
}
.khapi-market-kpi-card.is-expired,
.khapi-market-table tr.is-expired td {
    background: rgba(239, 68, 68, 0.045);
}
.khapi-market-kpi-card.is-expired {
    border-color: rgba(239, 68, 68, 0.30);
}
.khapi-market-kpi-state {
    display: block;
    margin-top: 10px;
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 800;
}
.khapi-market-kpi-card.is-delayed .khapi-market-kpi-state { color: #fde68a; }
.khapi-market-kpi-card.is-expired .khapi-market-kpi-state { color: #fecaca; }
.khapi-market-row-meta {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    max-width: 310px;
    margin-top: 6px;
    color: #7f8da3;
    font-size: 0.72rem;
    line-height: 1.65;
    white-space: normal;
}
.khapi-market-row-meta [data-market-provider] {
    overflow-wrap: anywhere;
}
.khapi-market-table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.khapi-market-mobile-sort {
    display: none;
}
.khapi-market-table th {
    min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
    .khapi-market-ticker__track,
    .khapi-market-live-pill span,
    .khapi-market-live-status i,
    .khapi-market-table-head i {
        animation: none !important;
    }
}

@media (max-width: 768px) {
    .khapi-market-ticker__toggle {
        min-width: 46px;
        min-height: 30px;
        margin-inline-start: 5px;
        padding-inline: 7px;
        font-size: 0.68rem;
    }
    .khapi-market-table-actions {
        width: 100%;
        justify-content: space-between;
    }
    .khapi-market-mobile-sort {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #94a3b8;
        font-size: 0.78rem;
        font-weight: 800;
    }
    .khapi-market-mobile-sort select {
        min-height: 44px;
        max-width: 165px;
        padding: 7px 10px;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 10px;
        color: #e2e8f0;
        background: #0f172a;
        font: inherit;
    }
    .khapi-market-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        padding: 12px;
    }
    .khapi-market-table td {
        display: flex;
        width: auto;
        padding: 0;
        border: 0;
    }
    .khapi-market-table td::before {
        display: none;
    }
    .khapi-market-table td:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }
    .khapi-market-table td:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        justify-content: flex-end;
        text-align: left;
    }
    .khapi-market-table td:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
        align-items: center;
    }
    .khapi-market-table td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        align-items: flex-end;
        flex-direction: column;
        text-align: left;
    }
    .khapi-market-row-meta {
        align-items: flex-end;
        max-width: 145px;
        text-align: left;
    }
    .khapi-market-row-meta [data-market-provider],
    .khapi-market-row-meta > span[aria-hidden="true"] {
        display: none;
    }
    .khapi-market-change {
        min-width: 82px;
        padding: 7px 10px;
        font-size: 0.82rem;
    }
    .khapi-market-asset {
        min-width: 0;
    }
    .khapi-market-asset > div {
        min-width: 0;
    }
    .khapi-market-asset strong {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 680px) {
    .khapi-market-kpi-grid {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 5px;
    }
    .khapi-market-kpi-card {
        flex: 0 0 min(82vw, 280px);
        scroll-snap-align: start;
    }
}

/* =========================================================================
   قانون سراسری Touch Targets (معیار ۴) — اضافه‌شده برای یکپارچه‌سازی
   همه لینک‌ها/دکمه‌ها/ورودی‌های عملیاتی حداقل ۴۴×۴۴px.
   همه صفحات style.css را لود می‌کنند، پس اینجا مرکزی‌ترین جاست.
   ========================================================================= */
a, button, input[type="submit"], input[type="button"], .btn,
.brand-container, .btn-login-neon,
.filter-btn, .sort-select, .refresh-btn,
.nav-links a, .navbar a, .navbar .nav-links a {
  min-height: 44px;
}
/* المنت‌های inline باید flex شوند تا min-height اعمال گردد */
.brand-container, .btn-login-neon, .filter-btn, .sort-select, .refresh-btn,
.value.ltr-text, a.value, .nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* لینک‌های تماس (تلفن/ایمیل) در /contact (معیار ۴: touch ≥44px) */
.value.ltr-text, a.value { min-height: 44px; padding: 0 4px; }
/* المنت‌های LTR داخل محتوای RTL (معیار ۷) */
.ltr-text, [dir="ltr"] { unicode-bidi: isolate; }
