/* ============================================================
   GMO Strategy Hub - Styles
   ترکیب ظاهر Marketplace با هویت بصری GoldAI
   نسخه 5.1: افزودن badge «توکن غیرفعال»
   ============================================================ */

   *, ::after, ::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0a2b5c;
    --primary-light: #1a4a8a;
    --primary-dark: #061a3a;
    --secondary: #e8a838;
    --secondary-light: #f5c95a;

    --sig-green: #22a67e;
    --sig-green-bg: rgba(34, 166, 126, 0.12);
    --sig-red: #dc3545;
    --sig-red-bg: rgba(220, 53, 69, 0.12);
    --sig-blue: #2d7fc1;
    --sig-blue-bg: rgba(45, 127, 193, 0.12);
    --sig-yellow: #e8b82a;
    --sig-yellow-bg: rgba(232, 184, 42, 0.12);

    --text-dark: #1a1a2e;
    --text-light: #f0f4f8;
    --text-muted: #7a8a9e;
    --bg-light: #eef2f7;
    --bg-card: #ffffff;
    --bg-code: #0d1117;

    --shadow: 0 4px 20px rgba(10, 43, 92, 0.08);
    --shadow-hover: 0 12px 40px rgba(10, 43, 92, 0.15);
    --radius: 14px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================================
   Fonts
   ============================================================ */
@font-face {
    font-family: Vazir;
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/vazir.woff2) format('woff2');
    font-display: swap;
}

@font-face {
    font-family: Vazir;
    font-style: normal;
    font-weight: 700;
    src: url(../fonts/vazir-bold.woff) format('woff');
    font-display: swap;
}

@font-face {
    font-family: Yekan;
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/yekan.woff) format('woff');
    font-display: swap;
}

@font-face {
    font-family: FontAwesome;
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/fontawesome-webfont.woff2) format('woff2');
    font-display: swap;
}

/* ============================================================
   Font Awesome Icons
   ============================================================ */
.fa {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.fa-key::before { content: "\f084"; }
.fa-upload::before { content: "\f093"; }
.fa-search::before { content: "\f002"; }
.fa-globe::before { content: "\f0ac"; }
.fa-user::before { content: "\f007"; }
.fa-code-fork::before { content: "\f126"; }
.fa-star::before { content: "\f005"; }
.fa-percent::before { content: "\f295"; }
.fa-balance-scale::before { content: "\f24e"; }
.fa-sort::before { content: "\f0dc"; }
.fa-chevron-down::before { content: "\f078"; }
.fa-sign-in::before { content: "\f090"; }
.fa-arrow-left::before { content: "\f060"; }
.fa-arrow-right::before { content: "\f061"; }
.fa-refresh::before { content: "\f021"; }
.fa-check::before { content: "\f00c"; }
.fa-copy::before { content: "\f0c5"; }
.fa-paste::before { content: "\f0ea"; }
.fa-eye::before { content: "\f06e"; }
.fa-eye-slash::before { content: "\f070"; }
.fa-download::before { content: "\f019"; }
.fa-clock-o::before { content: "\f017"; }
.fa-lock::before { content: "\f023"; }
.fa-thumbs-up::before { content: "\f164"; }
.fa-comment::before { content: "\f075"; }
.fa-comments::before { content: "\f086"; }
.fa-ellipsis-h::before { content: "\f141"; }
.fa-exclamation-triangle::before { content: "\f071"; }
.fa-info-circle::before { content: "\f05a"; }
.fa-pencil::before { content: "\f040"; }
.fa-trash::before { content: "\f1f8"; }
.fa-trash-o::before { content: "\f014"; }
.fa-times::before { content: "\f00d"; }
.fa-file-code-o::before { content: "\f1c9"; }
.fa-list::before { content: "\f03a"; }
.fa-code::before { content: "\f121"; }
.fa-plus::before { content: "\f067"; }
.fa-share-alt::before { content: "\f1e0"; }
.fa-flask::before { content: "\f0c3"; }
.fa-line-chart::before { content: "\f201"; }
.fa-trophy::before { content: "\f091"; }
.fa-th-large::before { content: "\f009"; }
.fa-bar-chart::before { content: "\f080"; }
.fa-unlock::before { content: "\f09c"; }
.fa-sign-out::before { content: "\f08b"; }
.fa-spinner::before { content: "\f110"; }

/* ============================================================
   پایه
   ============================================================ */
html { scroll-behavior: smooth; }

body {
    font-family: Vazir, Yekan, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.25;
    background: var(--bg-light);
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   Links
   ============================================================ */
a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-light);
}

a.btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--secondary);
    color: var(--primary-dark);
    box-shadow: 0 6px 24px rgba(232, 168, 56, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(232, 168, 56, 0.45);
    color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
    color: var(--secondary-light);
}

.btn-outline-dark {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-dark:hover {
    background: var(--primary);
    color: #fff;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

/* ============================================================
   Page Header (Hero کوچک)
   ============================================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    padding: 70px 0 90px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(232, 168, 56, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(45, 127, 193, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 46px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 14px;
}

.page-header h1 span {
    color: var(--secondary);
}

.page-header .subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 8px;
    font-weight: 300;
}

.page-header .tagline {
    font-size: 20px;
    color: var(--secondary-light);
    font-weight: 700;
    margin-bottom: 18px;
    font-family: Yekan, Vazir, sans-serif;
}

.page-header p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 650px;
    margin: 0 auto 32px;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   Banner Bar (آمار کلی)
   ============================================================ */
.banner-bar {
    background: var(--bg-card);
    padding: 24px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-top: -40px;
    position: relative;
    z-index: 3;
    border-radius: var(--radius);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    border-top: 4px solid var(--secondary);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 40px;
}

.banner-icon {
    font-size: 46px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(232, 168, 56, 0.3));
}

.banner-text {
    flex: 1;
    min-width: 0;
}

.banner-text h3 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.banner-text h3 span {
    color: var(--secondary);
}

.banner-text p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0;
}

.hub-stats {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
    padding-right: 24px;
    border-right: 2px solid var(--bg-light);
}

.hub-stat {
    text-align: center;
    min-width: 70px;
}

.hub-stat-number {
    display: block;
    font-family: Yekan, Vazir, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.hub-stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   Section
   ============================================================ */
.section {
    padding: 60px 0;
}

.bg-light {
    background: var(--bg-light);
}

/* ============================================================
   Tabs
   ============================================================ */
.hub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(10, 43, 92, 0.1);
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: none;
}

.hub-tabs::-webkit-scrollbar {
    display: none;
}

.hub-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    margin-bottom: -2px;
}

.hub-tab:hover {
    color: var(--primary);
    background: rgba(10, 43, 92, 0.04);
}

.hub-tab.active {
    color: var(--primary);
    border-bottom-color: var(--secondary);
}

.hub-tab .fa {
    font-size: 14px;
}

.hub-tab-badge {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 20px;
    margin-right: 4px;
}

/* ============================================================
   Toolbar (جستجو و فیلتر)
   ============================================================ */
.hub-toolbar {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.hub-search {
    flex: 1;
    min-width: 240px;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 50px;
    padding: 0 18px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.hub-search:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 4px 20px rgba(232, 168, 56, 0.2);
}

.hub-search .fa-search {
    color: var(--text-muted);
    font-size: 15px;
    margin-left: 10px;
}

.hub-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-dark);
    padding: 14px 0;
    min-width: 0;
}

.hub-search input::placeholder {
    color: var(--text-muted);
}

.hub-search-clear {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: var(--transition);
}

.hub-search-clear:hover {
    color: var(--sig-red);
}

/* ============================================================
   فیلترهای Dropdown
   ============================================================ */
.hub-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hub-filter-dropdown {
    position: relative;
}

.hub-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 50px;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    white-space: nowrap;
}

.hub-filter-btn:hover {
    border-color: var(--secondary);
    color: var(--primary);
}

.hub-filter-btn .fa-chevron-down {
    font-size: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

.hub-filter-dropdown.open .hub-filter-btn {
    border-color: var(--secondary);
    color: var(--primary);
}

.hub-filter-dropdown.open .hub-filter-btn .fa-chevron-down {
    transform: rotate(180deg);
}

.hub-filter-menu {
    position: fixed; 
    top: -9999px;
    left: -9999px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 200px;
    max-width: calc(100vw - 16px); 
    z-index: 1000;
    display: none;
    animation: dropdownFadeIn 0.2s ease;
}

.hub-filter-dropdown.open .hub-filter-menu {
    display: block;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hub-filter-menu label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.hub-filter-menu label:hover {
    background: var(--bg-light);
}

.hub-filter-menu input[type="radio"] {
    accent-color: var(--secondary);
    cursor: pointer;
}

/* ============================================================
   Results Info
   ============================================================ */
.hub-results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 10px;
}

.hub-results-info strong {
    color: var(--primary);
    font-weight: 700;
}

.hub-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(10, 43, 92, 0.15);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.hub-reset-filters:hover {
    color: var(--sig-red);
    border-color: var(--sig-red);
}

/* ============================================================
   Grid
   ============================================================ */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    position: relative;
    min-height: 200px;
}

/* ============================================================
   Strategy Card
   ============================================================ */
.strategy-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--primary);
    cursor: pointer;
}

.strategy-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.strategy-card[data-pf="excellent"] { border-top-color: var(--sig-green); }
.strategy-card[data-pf="good"] { border-top-color: var(--sig-yellow); }
.strategy-card[data-pf="weak"] { border-top-color: var(--sig-red); }

.strategy-card-header {
    padding: 18px 20px 12px;
    position: relative;
}

.strategy-card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.strategy-card-title {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.strategy-card-title .fa-file-code-o {
    color: var(--primary-light);
    font-size: 14px;
    flex-shrink: 0;
}

.strategy-card-version {
    display: inline-block;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(10, 43, 92, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.strategy-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: var(--primary-dark);
    border-radius: 50%;
    font-size: 9px;
    margin-right: 4px;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(232, 168, 56, 0.4);
    flex-shrink: 0;
    position: relative;
    top: -1px;
    transition: transform 0.2s ease;
}

.strategy-verified-badge .fa {
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.strategy-card:hover .strategy-verified-badge {
    transform: scale(1.15);
}

.strategy-card-visibility {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

.strategy-card-visibility.public {
    background: rgba(34, 166, 126, 0.12);
    color: var(--sig-green);
}

.strategy-card-visibility.private {
    background: rgba(122, 138, 158, 0.15);
    color: var(--text-muted);
}

.strategy-card-author {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
}

.strategy-card-author .fa-user {
    font-size: 10px;
}

.strategy-card-description {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.strategy-card-stats {
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid rgba(10, 43, 92, 0.06);
    border-bottom: 1px solid rgba(10, 43, 92, 0.06);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.strategy-stat {
    text-align: center;
}

.strategy-stat-value {
    display: block;
    font-family: Yekan, Vazir, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
}

.strategy-stat-value.positive { color: var(--sig-green); }
.strategy-stat-value.negative { color: var(--sig-red); }
.strategy-stat-value.neutral { color: var(--primary); }
.strategy-stat-value.warning { color: var(--sig-yellow); }

.strategy-stat-label {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.strategy-card-footer {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.strategy-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.strategy-card-footer-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.strategy-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.strategy-meta-item .fa {
    font-size: 11px;
    color: var(--text-muted);
}

.strategy-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--secondary);
}

.strategy-rating .fa {
    font-size: 11px;
}

.strategy-rating-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-right: 4px;
}

.strategy-card-menu {
    background: var(--bg-card);
    border: 1px solid rgba(10, 43, 92, 0.1);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
    padding: 0;
}

.strategy-card-menu:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.05);
}

.strategy-card-menu .fa {
    font-size: 12px;
    line-height: 1;
}

/* ============================================================
   Card Context Menu
   ============================================================ */
.card-context-menu {
    position: fixed;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 6px;
    min-width: 170px;
    z-index: 1000;
    direction: rtl;
    font-family: Vazir, sans-serif;
    animation: dropdownFadeIn 0.2s ease;
}

.card-context-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #1a1a2e;
    transition: background 0.15s;
}

.card-context-item:hover {
    background: #f8fafc;
}

.card-context-item.danger {
    color: #dc3545;
}

.card-context-item.danger:hover {
    background: rgba(220, 53, 69, 0.08);
}

.card-context-item .fa {
    width: 16px;
    opacity: 0.7;
    text-align: center;
}

/* ============================================================
   Loading
   ============================================================ */
.hub-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.hub-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(10, 43, 92, 0.1);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hub-loading p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================================
   Empty State
   ============================================================ */
.hub-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hub-empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.6;
}

.hub-empty h3 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 20px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.hub-empty p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ============================================================
   Load More
   ============================================================ */
.hub-load-more-wrapper {
    text-align: center;
    margin-top: 32px;
}

/* ============================================================
   Publish CTA Section
   ============================================================ */
.publish-cta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
    padding: 40px 48px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-right: 4px solid var(--secondary);
}

.publish-cta-icon {
    font-size: 42px;
    display: block;
    margin-bottom: 12px;
}

.publish-cta-content h2 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.publish-cta-content h2 span {
    color: var(--secondary);
}

.publish-cta-content > p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 20px;
    max-width: 600px;
}

.publish-features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.publish-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dark);
}

.publish-features li .fa {
    color: var(--sig-green);
    font-size: 12px;
}

.publish-cta-action {
    text-align: center;
}

.publish-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background: var(--primary-dark);
    padding: 32px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer a {
    color: var(--secondary);
}

.footer a:hover {
    color: var(--secondary-light);
}

/* ============================================================
   Modal (احراز هویت)
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    max-width: 460px;
    width: 90%;
    padding: 32px 28px;
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: slideUp 0.35s ease;
    max-height: 90vh;
    overflow-y: auto;
    direction: rtl;
}

.modal-box .modal-close {
    position: absolute;
    top: 12px;
    left: 18px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    background: none;
    border: none;
    transition: var(--transition);
    font-family: inherit;
    line-height: 1;
}

.modal-box .modal-close:hover {
    color: var(--sig-red);
    transform: rotate(90deg);
}

.modal-box h3 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
    text-align: center;
}

.modal-box .modal-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.modal-box .form-group {
    margin-bottom: 16px;
}

.modal-box .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.modal-box .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: #fafbfc;
    text-align: right;
    direction: rtl;
}

.modal-box .form-group input:focus {
    outline: 0;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.15);
}

.modal-box .captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.modal-box .captcha-row .captcha-img {
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    width: 170px;
    height: 50px;
    background: silver;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box .captcha-row .captcha-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-box .captcha-row .captcha-refresh {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    padding: 0 6px;
    transition: var(--transition);
}

.modal-box .captcha-row .captcha-refresh:hover {
    transform: rotate(60deg);
    color: var(--secondary);
}

.modal-box .captcha-row input {
    flex: 1;
}

.modal-box .btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--secondary);
    color: var(--primary-dark);
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(232, 168, 56, 0.3);
    margin-top: 8px;
}

.modal-box .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(232, 168, 56, 0.4);
}

.modal-box .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.modal-box .error-msg {
    color: var(--sig-red);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.modal-box .error-msg.show {
    display: block;
}

.modal-box .form-note {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
   Delete Strategy Modal
   ============================================================ */
.hub-delete-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    direction: rtl;
    font-family: Vazir, sans-serif;
}

.hub-delete-modal-overlay.active {
    opacity: 1;
}

.hub-delete-modal {
    background: #ffffff;
    max-width: 440px;
    width: 100%;
    border-radius: 20px;
    padding: 32px 28px 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    transform: translateY(30px) scale(0.94);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.hub-delete-modal-overlay.active .hub-delete-modal {
    transform: translateY(0) scale(1);
}

.hub-delete-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    background: linear-gradient(145deg, #fee2e2, #fecaca);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: deleteIconPulse 2s ease-in-out infinite;
}

.hub-delete-icon .fa {
    font-size: 30px;
    color: var(--sig-red);
}

@keyframes deleteIconPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.35);
    }
    50% {
        box-shadow: 0 0 0 14px rgba(220, 53, 69, 0);
    }
}

.hub-delete-title {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.hub-delete-message {
    font-size: 14.5px;
    color: var(--text-dark);
    line-height: 1.9;
    margin-bottom: 16px;
}

.hub-delete-message strong {
    color: var(--sig-red);
    font-weight: 700;
    background: rgba(220, 53, 69, 0.08);
    padding: 2px 10px;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    direction: ltr;
    display: inline-block;
    margin: 0 4px;
}

.hub-delete-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fef3c7;
    border-right: 3px solid #f59e0b;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 24px;
    text-align: right;
    font-size: 13px;
    color: #92400e;
    line-height: 1.7;
}

.hub-delete-warning .fa {
    color: #f59e0b;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.hub-delete-actions {
    display: flex;
    gap: 10px;
}

.hub-delete-btn {
    flex: 1;
    padding: 13px 20px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
}

.hub-delete-btn.cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.hub-delete-btn.cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.hub-delete-btn.cancel:active {
    transform: translateY(0);
}

.hub-delete-btn.confirm {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.hub-delete-btn.confirm:hover:not(:disabled) {
    background: linear-gradient(145deg, #f87171, #ef4444);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.hub-delete-btn.confirm:active:not(:disabled) {
    transform: translateY(0);
}

.hub-delete-btn.confirm:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.hub-delete-btn .fa {
    font-size: 13px;
}

.hub-delete-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}

/* ============================================================
   Toast Notification
   ============================================================ */
.hub-toast {
    /* استایل از JS تزریق می‌شود */
}

/* ============================================================
   Publish Strategy Modal
   ============================================================ */
.publish-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    direction: rtl;
    font-family: Vazir, sans-serif;
}

.publish-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.publish-modal {
    background: #ffffff;
    max-width: 780px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.publish-modal-overlay.active .publish-modal {
    transform: translateY(0) scale(1);
}

.publish-modal::-webkit-scrollbar { width: 8px; }
.publish-modal::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.publish-modal::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.publish-modal-close {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 28px;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: all 0.25s ease;
    z-index: 10;
}

.publish-modal-close:hover {
    color: var(--sig-red);
    transform: rotate(90deg);
}

/* Stepper */
.publish-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    padding: 0 20px;
}

.publish-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.publish-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.publish-step.active .publish-step-circle {
    background: var(--secondary);
    color: var(--primary-dark);
    border-color: var(--secondary-light);
    box-shadow: 0 4px 12px rgba(232, 168, 56, 0.4);
}

.publish-step.completed .publish-step-circle {
    background: var(--sig-green);
    color: #fff;
    font-size: 0;
}

.publish-step.completed .publish-step-circle::before {
    content: '✓';
    font-size: 16px;
}

.publish-step-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}

.publish-step.active .publish-step-label {
    color: var(--primary-dark);
}

.publish-step-line {
    flex: 1;
    height: 2px;
    background: #f1f5f9;
    max-width: 60px;
    margin-bottom: 22px;
}

.publish-step.completed ~ .publish-step-line {
    background: var(--sig-green);
}

/* Panels */
.publish-step-panel {
    display: none;
    animation: publishFadeIn 0.35s ease;
}

.publish-step-panel.active {
    display: block;
}

@keyframes publishFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.publish-panel-title {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
    text-align: center;
}

.publish-panel-sub {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.8;
}

.publish-panel-sub code {
    background: rgba(232, 168, 56, 0.15);
    color: var(--secondary);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 12px;
}

.publish-panel-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 24px;
}

.publish-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
}

.publish-btn.primary {
    background: var(--secondary);
    color: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(232, 168, 56, 0.35);
}

.publish-btn.primary:hover:not(:disabled) {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 168, 56, 0.5);
}

.publish-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.publish-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.publish-btn.secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.publish-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--primary-dark);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ============================================================
   Step 1: Code Input (IDE Editor)
   ============================================================ */
.publish-code-input-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.publish-code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 12px;
    flex-wrap: wrap;
}

.publish-code-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Consolas', monospace;
    font-size: 12.5px;
    color: var(--primary-dark);
    font-weight: 600;
}

.publish-code-toolbar-left .fa {
    color: var(--sig-green);
}

.publish-code-toolbar-right {
    display: flex;
    gap: 6px;
}

.publish-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.publish-tool-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.publish-ide-editor {
    display: flex;
    position: relative;
    background: #ffffff;
    min-height: 280px;
    max-height: 450px;
    overflow: hidden;
    border-top: 1px solid #e2e8f0;
    direction: ltr;
}

.publish-ide-line-numbers {
    background: #f0f2f5;
    color: #9ca3af;
    padding: 15px 10px;
    text-align: right;
    font-size: 13px;
    line-height: 1.7;
    user-select: none;
    min-width: 44px;
    border-right: 1px solid #e2e6eb;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    white-space: pre;
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.publish-ide-editor-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    min-width: 0;
}

.publish-ide-textarea {
    flex: 1;
    position: relative;
    z-index: 2;

    background: transparent !important;
    color: transparent !important;
    caret-color: var(--secondary);

    border: none;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    padding: 15px 18px;
    resize: none;
    outline: none;
    direction: ltr;
    text-align: left;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    overflow-y: auto;
    tab-size: 4;
    box-sizing: border-box;
}

.publish-ide-textarea::placeholder {
    color: #b0b8c0;
    font-family: Vazir, sans-serif;
    direction: rtl;
    text-align: right;
}

.publish-ide-textarea::selection {
    background: rgba(232, 168, 56, 0.25);
    color: transparent;
}

.publish-ide-textarea::-moz-selection {
    background: rgba(232, 168, 56, 0.25);
    color: transparent;
}

.publish-ide-textarea::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.publish-ide-textarea::-webkit-scrollbar-track {
    background: #f0f2f5;
}

.publish-ide-textarea::-webkit-scrollbar-thumb {
    background: #c5cbd3;
    border-radius: 4px;
}

.publish-ide-textarea::-webkit-scrollbar-thumb:hover {
    background: #a8b0ba;
}

.publish-ide-highlight {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 15px 18px;

    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre;
    overflow: auto;
    pointer-events: none;

    color: #1e1e1e;
    background: transparent;
    direction: ltr;
    text-align: left;
    tab-size: 4;
    z-index: 1;
    box-sizing: border-box;

    scrollbar-width: none;
    -ms-overflow-style: none;
}

.publish-ide-highlight::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.publish-ide-highlight code {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    white-space: pre;
    display: block;
    background: transparent;
}

/* رنگ‌های syntax */
.publish-ide-highlight .kw         { color: #af00db; font-weight: 700; }
.publish-ide-highlight .var        { color: #001080; }
.publish-ide-highlight .fn         { color: #795e26; }
.publish-ide-highlight .num        { color: #098658; }
.publish-ide-highlight .act-buy    { color: #16825d; font-weight: 700; }
.publish-ide-highlight .act-sell   { color: #c72e2e; font-weight: 700; }
.publish-ide-highlight .siggreen   { color: #1a7f4e; font-weight: 700; }
.publish-ide-highlight .sigred     { color: #c72e2e; font-weight: 700; }
.publish-ide-highlight .sigblue    { color: #0066cc; font-weight: 700; }
.publish-ide-highlight .sigyellow  { color: #b8860b; font-weight: 700; }
.publish-ide-highlight .com        { color: #6a737d; font-style: italic; }

.publish-code-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
}

.publish-code-status-icon {
    font-size: 10px;
    color: #94a3b8;
}

.publish-code-status.idle .publish-code-status-icon { color: #94a3b8; }
.publish-code-status.idle .publish-code-status-text { color: #94a3b8; }

.publish-code-status.success .publish-code-status-icon { color: var(--sig-green); }
.publish-code-status.success .publish-code-status-text { color: var(--sig-green); }

.publish-code-status.error .publish-code-status-icon { color: var(--sig-red); }
.publish-code-status.error .publish-code-status-text { color: var(--sig-red); }

.publish-error-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-right: 3px solid var(--sig-red);
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 13px;
    color: #991b1b;
    animation: publishFadeIn 0.3s ease;
}

.publish-error-box .fa {
    color: var(--sig-red);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================================
   Step 2: Preview
   ============================================================ */
.publish-preview {
    background: #f8fafc;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.publish-preview-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.publish-preview-avatar {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    color: var(--primary);
}

.publish-preview-title {
    flex: 1;
    min-width: 0;
}

.publish-preview-title h3 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.publish-preview-version {
    display: inline-block;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: 700;
    background: rgba(10, 43, 92, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
}

.publish-preview-visibility {
    background: rgba(34, 166, 126, 0.12);
    color: var(--sig-green);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.publish-preview-description {
    font-size: 13px;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 16px;
}

.publish-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.publish-preview-item {
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.publish-preview-item-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.publish-preview-item-value {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
}

.publish-preview-section {
    margin-top: 16px;
}

.publish-preview-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.publish-preview-section-title .fa {
    color: var(--secondary);
}

.publish-preview-params {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.publish-preview-param {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 12.5px;
    font-family: 'Consolas', monospace;
    direction: ltr;
}

.publish-preview-param-name {
    color: var(--sig-blue);
    font-weight: 700;
}

.publish-preview-param-eq {
    color: #94a3b8;
}

.publish-preview-param-value {
    color: var(--primary-dark);
}

.publish-preview-rules {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 2px;
    direction: ltr;
}

.publish-preview-rules::-webkit-scrollbar { width: 6px; }
.publish-preview-rules::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.publish-preview-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    flex-wrap: wrap;
    direction: ltr;
    text-align: left;
}

.publish-preview-rule-signal {
    font-weight: 700;
    color: var(--primary-dark);
}

.publish-preview-rule-arrow {
    color: #94a3b8;
}

.publish-preview-rule-action {
    font-family: 'Consolas', monospace;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.publish-preview-rule-action.buy {
    background: rgba(34, 166, 126, 0.12);
    color: var(--sig-green);
}

.publish-preview-rule-action.sell {
    background: rgba(220, 53, 69, 0.12);
    color: var(--sig-red);
}

.publish-preview-rule-cond {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(10, 43, 92, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    direction: ltr;
}

.publish-preview-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 16px;
}

/* ============================================================
   Step 3: Backtest
   ============================================================ */
.publish-backtest-running {
    text-align: center;
    padding: 20px;
}

.publish-backtest-spinner-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.publish-backtest-spinner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(232, 168, 56, 0.15);
    border-top-color: var(--secondary);
    animation: spin 1s linear infinite;
}

.publish-backtest-progress-circle {
    position: absolute;
    inset: 12px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.publish-backtest-progress-text {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary);
}

.publish-backtest-status-text {
    font-size: 13.5px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 16px;
}

.publish-backtest-progress-bar-wrapper {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}

.publish-backtest-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
    border-radius: 3px;
    width: 0;
    transition: width 0.4s ease;
}

.publish-backtest-result {
    text-align: center;
    animation: publishFadeIn 0.4s ease;
}

.publish-backtest-success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sig-green);
    font-size: 32px;
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 166, 126, 0.35); }
    50% { box-shadow: 0 0 0 16px rgba(34, 166, 126, 0); }
}

.publish-backtest-result h3 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--sig-green);
    margin-bottom: 4px;
}

.publish-backtest-result-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.publish-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.publish-result-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 10px;
    border: 1px solid #e2e8f0;
}

.publish-result-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.publish-result-value {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--primary-dark);
}

.publish-result-value.positive { color: var(--sig-green); }
.publish-result-value.negative { color: var(--sig-red); }
.publish-result-value.warning { color: var(--sig-yellow); }

.publish-backtest-result-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: rgba(45, 127, 193, 0.08);
    border-right: 3px solid var(--sig-blue);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #1e40af;
    text-align: right;
}

.publish-backtest-result-note .fa {
    color: var(--sig-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.publish-backtest-error {
    text-align: center;
    animation: publishFadeIn 0.4s ease;
}

.publish-backtest-error-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: linear-gradient(145deg, #fee2e2, #fecaca);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sig-red);
    font-size: 32px;
}

.publish-backtest-error h3 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--sig-red);
    margin-bottom: 8px;
}

.publish-backtest-error-text {
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.8;
}

.publish-backtest-error-details {
    text-align: right;
}

.publish-error-hint {
    background: #fffbeb;
    border-right: 3px solid var(--sig-yellow);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 12.5px;
    color: #78350f;
}

.publish-error-hint strong {
    display: block;
    margin-bottom: 6px;
}

.publish-error-hint ul {
    margin: 0;
    padding-right: 20px;
}

.publish-error-hint li {
    margin-bottom: 4px;
}

/* ============================================================
   Step 4: Final
   ============================================================ */
.publish-final-preview {
    background: #f8fafc;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.publish-final-preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.publish-final-preview-header h3 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 2px;
}

.publish-final-preview-stats {
    display: flex;
    gap: 20px;
    justify-content: space-around;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 12.5px;
    color: var(--text-muted);
}

.publish-final-preview-stats strong {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 14px;
    color: var(--primary-dark);
    display: block;
    margin-bottom: 2px;
}

.publish-visibility-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.publish-visibility-option {
    cursor: pointer;
    position: relative;
}

.publish-visibility-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.publish-visibility-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.2s ease;
    height: 100%;
}

.publish-visibility-option input:checked + .publish-visibility-card {
    border-color: var(--secondary);
    background: rgba(232, 168, 56, 0.05);
    box-shadow: 0 4px 16px rgba(232, 168, 56, 0.2);
}

.publish-visibility-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.publish-visibility-icon.public {
    background: rgba(34, 166, 126, 0.12);
    color: var(--sig-green);
}

.publish-visibility-icon.private {
    background: rgba(10, 43, 92, 0.08);
    color: var(--text-muted);
}

.publish-visibility-content h4 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.publish-visibility-content p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.publish-terms {
    margin-bottom: 4px;
}

.publish-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1.7;
}

.publish-terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--secondary);
    cursor: pointer;
    flex-shrink: 0;
}

.publish-terms-checkbox a {
    color: var(--secondary);
    text-decoration: underline;
}

/* ============================================================
   Step 5: Success
   ============================================================ */
.publish-success {
    text-align: center;
    padding: 20px;
}

.publish-success-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sig-green);
    font-size: 44px;
    animation: successPulse 2s ease-in-out infinite;
}

.publish-success h2 {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.publish-success p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 24px;
}

.publish-success p strong {
    color: var(--sig-green);
    font-family: 'Consolas', monospace;
    background: rgba(34, 166, 126, 0.1);
    padding: 2px 10px;
    border-radius: 6px;
}

.publish-success-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .hub-stats {
        gap: 16px;
        padding-right: 16px;
    }

    .hub-stat-number {
        font-size: 22px;
    }

    .publish-cta {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px;
        text-align: center;
    }

    .publish-cta-content > p {
        margin-left: auto;
        margin-right: auto;
    }

    .publish-features {
        text-align: right;
    }
}

@media (max-width: 700px) {
    .page-header {
        padding: 50px 0 70px;
    }

    .page-header h1 {
        font-size: 30px;
    }

    .page-header .tagline {
        font-size: 16px;
    }

    .page-header p {
        font-size: 13px;
    }

    .banner-bar {
        margin-top: -30px;
        padding: 20px 0;
    }

    .banner-content {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
        gap: 16px;
    }

    .hub-stats {
        padding-right: 0;
        border-right: none;
        padding-top: 16px;
        border-top: 2px solid var(--bg-light);
        width: 100%;
        justify-content: space-around;
    }

    .hub-tabs {
        gap: 4px;
    }

    .hub-tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .hub-tab .fa {
        font-size: 12px;
    }

    .hub-toolbar {
        gap: 10px;
    }

    .hub-search {
        min-width: 100%;
        order: -1;
    }

    .hub-filters {
        width: 100%;
        justify-content: space-between;
    }

    .hub-filter-btn {
        padding: 10px 14px;
        font-size: 12px;
    }

    .hub-filter-btn .fa-chevron-down {
        display: none;
    }

    .hub-grid {
        grid-template-columns: 1fr;
    }

    .publish-cta {
        padding: 24px 20px;
    }

    .publish-cta-content h2 {
        font-size: 20px;
    }

    .publish-features {
        grid-template-columns: 1fr;
    }

    .strategy-card-stats {
        grid-template-columns: repeat(3, 1fr);
        padding: 12px 16px;
    }

    .strategy-stat-value {
        font-size: 13px;
    }

    .strategy-card-footer {
        padding: 10px 16px;
    }

    .strategy-card-meta {
        gap: 10px;
    }

    .modal-box {
        padding: 24px 18px;
    }

    .modal-box .captcha-row {
        flex-wrap: wrap;
    }

    .modal-box .captcha-row .captcha-img {
        width: 100%;
        height: 52px;
    }

    .publish-modal {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .publish-stepper {
        gap: 4px;
        padding: 0;
    }

    .publish-step-circle {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .publish-step-label {
        font-size: 10px;
    }

    .publish-step-line {
        max-width: 30px;
    }

    .publish-panel-title {
        font-size: 17px;
    }

    .publish-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .publish-preview-params {
        grid-template-columns: 1fr;
    }

    .publish-result-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .publish-visibility-options {
        grid-template-columns: 1fr;
    }

    .publish-panel-actions {
        flex-direction: column-reverse;
    }

    .publish-panel-actions .publish-btn {
        width: 100%;
        justify-content: center;
    }

    .publish-success h2 {
        font-size: 18px;
    }

    .publish-success-icon {
        width: 70px;
        height: 70px;
        font-size: 34px;
    }

    .publish-ide-editor {
        min-height: 220px;
        max-height: 350px;
    }

    .publish-ide-line-numbers {
        font-size: 12px;
        padding: 12px 6px;
        min-width: 34px;
    }

    .publish-ide-textarea,
    .publish-ide-highlight {
        font-size: 12px;
        padding: 12px 10px;
        line-height: 1.6;
    }
}

@media (max-width: 500px) {
    .hub-delete-modal {
        padding: 26px 20px 20px;
        border-radius: 16px;
    }

    .hub-delete-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 14px;
    }

    .hub-delete-icon .fa {
        font-size: 24px;
    }

    .hub-delete-title {
        font-size: 18px;
    }

    .hub-delete-message {
        font-size: 13px;
    }

    .hub-delete-warning {
        font-size: 12px;
        padding: 10px 12px;
    }

    .hub-delete-actions {
        flex-direction: column-reverse;
    }

    .hub-delete-btn {
        padding: 12px 16px;
        font-size: 13.5px;
    }
}

@media (max-width: 400px) {
    .page-header h1 {
        font-size: 26px;
    }

    .hub-stat-number {
        font-size: 18px;
    }

    .hub-stat-label {
        font-size: 11px;
    }

    .strategy-card-title {
        font-size: 15px;
    }

    .strategy-stat-value {
        font-size: 12px;
    }

    .strategy-card-title-row {
        flex-wrap: wrap;
    }

    .strategy-card-footer {
        gap: 6px;
    }

    .publish-ide-editor {
        min-height: 200px;
        max-height: 300px;
    }
}

/* ============================================================
   Badge عدم انتشار
   ============================================================ */
.strategy-card-unpublished-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(122, 138, 158, 0.15);
    color: var(--text-muted);
    flex-shrink: 0;
}

.strategy-card-unpublished-badge .fa {
    font-size: 10px;
}

.strategy-card.unpublished {
    opacity: 0.7;
    position: relative;
}

.strategy-card.unpublished::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(122, 138, 158, 0.03) 10px,
        rgba(122, 138, 158, 0.03) 20px
    );
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}

.strategy-card.unpublished > * {
    position: relative;
    z-index: 1;
}

.strategy-card.unpublished:hover {
    opacity: 0.9;
}

/* ============================================================
   فیلد توضیحات در مودال انتشار
   ============================================================ */
.publish-description-field {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.publish-description-field label {
    display: block;
    font-family: Yekan, Vazir, sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.publish-description-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: Vazir, sans-serif;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-dark);
    background: #fafbfc;
    resize: vertical;
    min-height: 80px;
    outline: none;
    direction: rtl;
    text-align: right;
    transition: var(--transition);
    box-sizing: border-box;
}

.publish-description-field textarea:focus {
    border-color: var(--secondary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.15);
}

.publish-description-hint {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.7;
}

/* ============================================================
   User Bar — نوار کاربر (ورود / حساب)
   ============================================================ */
.user-bar {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    direction: rtl;
}

.user-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--secondary);
    color: var(--primary-dark);
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(232, 168, 56, 0.35);
    white-space: nowrap;
}

.user-login-btn:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 168, 56, 0.5);
}

.user-login-btn .fa {
    font-size: 14px;
}

.user-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.user-account-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.user-account-btn .user-avatar-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--secondary), var(--secondary-light));
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.user-account-btn .user-phone-text {
    font-family: 'Consolas', monospace;
    letter-spacing: 0.5px;
    direction: ltr;
    text-align: right;
}

.user-account-btn .fa-chevron-down {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.user-account-btn.open .fa-chevron-down {
    transform: rotate(180deg);
}

.user-account-menu {
    position: fixed;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    padding: 8px;
    min-width: 200px;
    max-width: calc(100vw - 16px);
    z-index: 10000;
    direction: rtl;
    font-family: Vazir, sans-serif;
    animation: dropdownFadeIn 0.2s ease;
    border: 1px solid rgba(10, 43, 92, 0.08);
}

.user-account-menu .menu-header {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.user-account-menu .menu-header strong {
    display: block;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: var(--primary-dark);
    direction: ltr;
    text-align: right;
    margin-top: 2px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.user-account-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #1a1a2e;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.user-account-menu .menu-item:hover {
    background: #f8fafc;
}

.user-account-menu .menu-item.danger {
    color: var(--sig-red);
}

.user-account-menu .menu-item.danger:hover {
    background: rgba(220, 53, 69, 0.08);
}

.user-account-menu .menu-item .fa {
    width: 16px;
    opacity: 0.7;
    text-align: center;
}

@media (max-width: 700px) {
    .user-bar {
        top: 12px;
        left: 12px;
    }

    .user-login-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .user-account-btn {
        padding: 6px 10px 6px 8px;
        font-size: 12px;
    }

    .user-account-btn .user-avatar-icon {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .user-account-btn .user-phone-text {
        font-size: 11.5px;
    }
}

/* ============================================================
   Token Request Badge — نشانگر درخواست توکن روی کارت
   ============================================================ */
.strategy-token-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, #dc3545, #b91c1c);
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    animation: tokenBadgePulse 2s ease-in-out infinite;
}

.strategy-token-badge .fa {
    font-size: 10px;
}

@keyframes tokenBadgePulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 2px 16px rgba(220, 53, 69, 0.7);
    }
}

.strategy-card.has-token-requests {
    position: relative;
}

.strategy-card.has-token-requests::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #dc3545, #b91c1c);
    border-radius: 0 4px 4px 0;
    animation: tokenBorderPulse 2s ease-in-out infinite;
}

@keyframes tokenBorderPulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

[dir="rtl"] .strategy-card.has-token-requests::after {
    right: 0;
    left: auto;
}

@media (max-width: 700px) {
    .strategy-token-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* ============================================================
   ⭐ Token Disabled Badge — نشانگر توکن غیرفعال روی کارت
   ============================================================ */
.strategy-token-disabled-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(122, 138, 158, 0.15);
    color: var(--text-muted);
    flex-shrink: 0;
}

.strategy-token-disabled-badge .fa {
    font-size: 10px;
}

/* ═══ نوار کناری کارت با توکن غیرفعال ═══ */
.strategy-card.has-token-disabled {
    position: relative;
}

.strategy-card.has-token-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #94a3b8, #64748b);
    border-radius: 0 4px 4px 0;
    opacity: 0.6;
}

[dir="rtl"] .strategy-card.has-token-disabled::after {
    right: 0;
    left: auto;
}

/* اگر هم pending token و هم token disabled وجود داشته باشد، pending اولویت دارد */
.strategy-card.has-token-requests.has-token-disabled::after {
    background: linear-gradient(180deg, #dc3545, #b91c1c);
    opacity: 1;
}

@media (max-width: 700px) {
    .strategy-token-disabled-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* ============================================================
   Token Notification Modal — مودال اعلان درخواست‌های توکن
   ============================================================ */
.token-notification-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    direction: rtl;
    font-family: Vazir, sans-serif;
}

.token-notification-overlay.active {
    opacity: 1;
    visibility: visible;
}

.token-notification-box {
    background: #ffffff;
    max-width: 480px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    padding: 32px 28px 24px;
    position: relative;
    text-align: center;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.token-notification-overlay.active .token-notification-box {
    transform: translateY(0) scale(1);
}

.token-notification-close {
    position: absolute;
    top: 14px;
    left: 18px;
    font-size: 26px;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: all 0.25s ease;
    z-index: 10;
}

.token-notification-close:hover {
    color: var(--sig-red);
    transform: rotate(90deg);
}

.token-notification-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    background: linear-gradient(145deg, #dbeafe, #bfdbfe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 36px;
    box-shadow: 0 6px 24px rgba(45, 127, 193, 0.25);
    animation: tokenNotifPulse 2s ease-in-out infinite;
}

@keyframes tokenNotifPulse {
    0%, 100% {
        box-shadow: 0 6px 24px rgba(45, 127, 193, 0.25);
    }
    50% {
        box-shadow: 0 6px 32px rgba(45, 127, 193, 0.5);
    }
}

.token-notification-title {
    font-family: Yekan, Vazir, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.token-notification-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 20px;
}

.token-notification-message strong {
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
}

.token-notification-stats {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    text-align: right;
    max-height: 200px;
    overflow-y: auto;
}

.token-notification-stats::-webkit-scrollbar {
    width: 6px;
}
.token-notification-stats::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.token-notification-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
}

.token-notification-stat-item:last-child {
    border-bottom: none;
}

.token-notification-stat-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.12);
    color: var(--sig-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.token-notification-stat-name {
    flex: 1;
    min-width: 0;
    font-family: Yekan, Vazir, sans-serif;
    font-weight: 600;
    color: var(--primary-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: right;
}

.token-notification-stat-count {
    font-family: 'Consolas', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--sig-red);
    background: rgba(220, 53, 69, 0.1);
    padding: 2px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.token-notification-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.token-notification-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.token-notification-btn.primary {
    background: var(--secondary);
    color: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(232, 168, 56, 0.35);
}

.token-notification-btn.primary:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 168, 56, 0.5);
}

.token-notification-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.token-notification-btn.secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.token-notification-hide-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    line-height: 1.6;
}

.token-notification-hide-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--secondary);
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 500px) {
    .token-notification-box {
        padding: 26px 20px 20px;
    }

    .token-notification-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
        margin-bottom: 14px;
    }

    .token-notification-title {
        font-size: 17px;
    }

    .token-notification-message {
        font-size: 13px;
    }

    .token-notification-actions {
        flex-direction: column-reverse;
    }

    .token-notification-btn {
        width: 100%;
        padding: 11px 16px;
        font-size: 13px;
    }
}