/* صفحه‌ی «تحلیل سهم پایه» — فقط چیدمان؛ رنگ و دکمه و ورودی از theme.css می‌آید */
.ua-main { display: flex; flex-direction: column; gap: 12px; }
.ua-main[hidden] { display: none; }
.ua-msg { border: 1px solid var(--c-amber); color: var(--c-amber); border-radius: var(--radius); padding: 6px 10px; font-size: 14px; }
.ua-msg[hidden] { display: none; }

/* ---------- قفل: مهمان و کاربر بدون اشتراک ---------- */
.ua-denied { padding: 28px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ua-denied[hidden] { display: none; }
.ua-denied .ui-icon { width: 30px; height: 30px; color: var(--text-muted); }
.ua-denied p { margin: 0; font-size: 16px; color: var(--text-light); }

/* ---------- نوار نماد و عددهای کوچک ---------- */
.ua-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 8px 12px; }
.ua-bar select { width: 190px; max-width: 100%; }
.ua-kpis { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; }
.ua-kpis span { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.ua-kpis i { font-style: normal; font-size: 13px; color: var(--text-muted); }
.ua-kpis b { font-size: 15px; font-weight: 500; color: var(--text-strong); }
.ua-jumps { display: flex; gap: 6px; flex-wrap: wrap; margin-right: auto; }
.ua-jumps .ui-btn { text-decoration: none; }

/* ---------- نوار ابزار نمودار ---------- */
.ua-tools { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 8px 12px; }
.ua-tools .ui-seg button { height: 30px; padding: 0 12px; font-size: 15px; }
.ua-tools select { width: 170px; height: 30px; font-size: 15px; }
#uaAdjustWrap[hidden] { display: none; }
.ua-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.ua-toggles .ui-btn[hidden] { display: none; }

/* منوی اندیکاتور */
.ua-menu-wrap { position: relative; }
.ua-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; width: 190px; padding: 8px 10px;
    display: flex; flex-direction: column; gap: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.ua-menu[hidden] { display: none; }
.ua-menu b { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.ua-menu .ui-check { font-size: 15px; }

/* ---------- نمودار ---------- */
.ua-chart { position: relative; padding: 0; overflow: hidden; }
.ua-chart-host { width: 100%; height: 540px; }
.ua-drawbar { display: flex; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--border-color); }
.ua-drawbar[hidden] { display: none; }
.ua-chart-empty { padding: 40px 16px; text-align: center; color: var(--text-muted); font-size: 15px; }
.ua-chart-empty[hidden] { display: none; }
.ua-chart.empty .ua-chart-host { display: none; }
.ua-chart.empty { min-height: 120px; }

/* ---------- جعبه‌های عددی زیر نمودار ---------- */
.ua-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.ua-card { padding: 10px 12px; min-width: 0; }
.ua-card[hidden] { display: none; }
.ua-card h3 { font-size: 14px; font-weight: 500; color: var(--text-muted); margin: 0 0 6px 0; }
.ua-card-body { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--text-light); min-width: 0; }
.ua-card-body .row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ua-card-body .row i { font-style: normal; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.ua-card-body .row b { font-size: 15px; font-weight: 500; color: var(--text-strong); white-space: nowrap; }
.ua-card-body .muted { color: var(--text-muted); font-size: 14px; }
.ua-up { color: var(--c-green) !important; }
.ua-down { color: var(--c-red) !important; }

@media (max-width: 800px) {
    .ua-bar { padding: 8px 10px; gap: 8px; }
    .ua-bar select { width: 100%; }
    .ua-jumps { margin-right: 0; width: 100%; }
    .ua-jumps .ui-btn { flex: 1; padding: 0 6px; }
    .ua-tools { padding: 8px 10px; }
    .ua-tools select { width: 100%; }
    .ua-drawbar { display: none; }
    .ua-chart-host { height: 360px; }
    .ua-menu { width: 160px; }
}

/* ---------- دو نما: رادار بازار / تحلیل نماد ---------- */
.ua-main.ua-off, .ua-radar.ua-off { display: none !important; }
.ua-views { flex: none; }
.ua-views button { height: 32px; padding: 0 12px; font-size: 15px; }

/* ---------- رادار بازار (فاز ۳B) ---------- */
.ua-radar { display: flex; flex-direction: column; gap: 12px; }
.ua-radar[hidden] { display: none; }
.ua-radar-bar { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 8px 12px; }
.ua-radar-bar input { width: 190px; height: 30px; font-size: 15px; }
.ua-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ua-radar-stamp { margin-right: auto; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.ua-radar-wrap { padding: 0; overflow: auto; max-height: calc(100vh - 210px); }
.ua-radar-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.ua-radar-table thead th { position: sticky; top: 0; z-index: 3; background: var(--bg-raised); color: var(--text-muted);
    font-size: 14px; font-weight: 500; text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--border-color);
    white-space: nowrap; cursor: pointer; user-select: none; }
.ua-radar-table thead th[data-sort]::after { content: "↕"; font-size: 11px; margin-inline-start: 4px; opacity: 0; }
.ua-radar-table thead th[data-sort]:hover::after { opacity: .45; }
.ua-radar-table thead th.active { color: var(--text-strong); }
.ua-radar-table thead th.active::after { content: "↑"; opacity: 1; }
.ua-radar-table thead th.active.desc::after { content: "↓"; }
.ua-radar-table tbody td { padding: 7px 10px; border-bottom: 1px solid var(--border-color); text-align: right; white-space: nowrap; }
.ua-radar-row { cursor: pointer; }
.ua-radar-row:hover td { background: var(--bg-raised); }
.ua-radar-row .ua-sticky { position: sticky; inset-inline-start: 0; z-index: 2; background: var(--bg-card); }
.ua-radar-row:hover .ua-sticky { background: var(--bg-raised); }
.ua-radar-table thead th.ua-sticky { z-index: 4; inset-inline-start: 0; }
.ua-sticky b { font-weight: 600; color: var(--text-strong); font-size: 16px; }
.ua-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; background: transparent; }
.ua-dot.up { background: var(--c-green); }
.ua-dot.down { background: var(--c-red); }
.ua-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 13px; line-height: 1.7;
    border: 1px solid var(--border-strong); color: var(--text-muted); white-space: nowrap; }
.ua-pill.up { color: var(--c-green); border-color: var(--c-green); }
.ua-pill.down { color: var(--c-red); border-color: var(--c-red); }
.ua-pill.blue { color: var(--accent-blue); border-color: var(--accent-blue); }
.ua-pill.amber { color: var(--c-amber); border-color: var(--c-amber); }
/* داخل خانه‌های جدول هرگز flex نگذارید: خانه از چیدمان جدول بیرون می‌زند و خط‌ها می‌شکنند */
.ua-iv, .ua-sr { white-space: nowrap; }
.ua-iv > span { margin-inline-end: 6px; }
.ua-rank { display: inline-block; font-style: normal; font-size: 12px; color: var(--text-muted); border: 1px solid var(--border-strong);
    border-radius: 999px; padding: 0 6px; -webkit-text-fill-color: var(--text-muted); }
.ua-hit { color: var(--c-amber) !important; font-weight: 600; }
.ua-sr span { font-size: 14px; }
.ua-radar-empty { text-align: center; padding: 26px 12px; color: var(--text-muted); }

/* ---------- پنل تابلوخوانی ---------- */
.ua-flow .ua-card-body .row .ua-pill { font-size: 14px; }

@media (max-width: 800px) {
    .ua-views { order: 4; width: 100%; }
    .ua-views button { flex: 1 1 0; }
    .ua-radar-bar { padding: 8px 10px; }
    .ua-radar-bar input { width: 100%; }
    .ua-filters { flex-wrap: wrap; width: 100%; }
    .ua-filters .ui-btn { flex: none; padding: 0 8px; }
    .ua-radar-stamp { margin-right: 0; }
    .ua-radar-wrap { max-height: calc(100dvh - 260px); -webkit-overflow-scrolling: touch; }
    .ua-radar-table thead th { padding: 8px 10px; }
    .ua-radar-table tbody td { padding: 6px 10px; }
    .ua-sticky b { font-size: 15px; }
}

/* ---------- زبانه‌های ۲ تا ۴ زیر نوار نماد ---------- */
.ua-tab { display: flex; flex-direction: column; gap: 12px; }
.ua-tab[hidden] { display: none !important; }
.ua-flow-tab { gap: 12px; }

/* ---------- انتخاب ستون‌های دیده‌بان: منوی کشویی جمع‌وجورِ «اندیکاتور» ---------- */
.ua-cols-menu { width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 480px); overflow-y: auto; }
.ua-cols-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ua-cols-head b { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.ua-cols-close { padding: 0 4px; }
/* دو ستون کوتاه؛ در هر ردیف متن سمت راست و مربع یک‌ردیف در سمت چپ */
.ua-cols-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.ua-cols-list b { grid-column: 1 / -1; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.ua-cols-list .ui-check { display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; font-size: 14.5px; white-space: nowrap; }
.ua-cols-list .ui-check span { white-space: nowrap; }
.ua-cols-reset { align-self: flex-start; }
.ua-type { color: var(--text-muted); font-size: 13px; white-space: nowrap; }

/* ---------- روند تاریخی تابلوخوانی ---------- */
.ua-history { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ua-history-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.ua-history-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-strong); }
.ua-history-head .ui-seg { margin-right: auto; }
.ua-history-head .ui-seg button { height: 28px; padding: 0 10px; font-size: 14px; }
.ua-hist-chart { width: 100%; height: 260px; min-width: 0; }
.ua-hist-legend { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; min-height: 18px; font-size: 12.5px; color: var(--text-muted); }
.ua-hist-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ua-hist-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.ua-hist-legend i.ln { height: 0; border-top: 2px solid; border-radius: 0; background: none; }
.ua-hist-line { display: flex; flex-direction: column; gap: 4px; }
.ua-hist-switch { align-self: flex-start; }
.ua-hist-switch button { height: 26px; padding: 0 9px; font-size: 13px; }
.ua-hist-note { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.ua-hist-note[hidden] { display: none; }
.ua-fund-empty { margin: 0; font-size: 14px; color: var(--text-muted); }

@media (max-width: 800px) {
    .ua-hist-chart { height: 210px; }
    .ua-history-head .ui-seg { margin-right: 0; width: 100%; }
    .ua-history-head .ui-seg button { flex: 1 1 0; padding: 0 6px; }
    .ua-hist-switch { align-self: stretch; }
    .ua-hist-switch button { flex: 1 1 0; }
    .ua-cols-menu { width: min(340px, calc(100vw - 24px)); }
}

/* ---------- پنجره‌ی «نمودار پایه» (فاز ۲): از آزمایشگاه و جدول استراتژی باز می‌شود ---------- */
/* فاز ۵: در کامپیوتر پنجره‌ی شناور و جابه‌جاشدنی با پس‌زمینه‌ی غیرمسدودکننده (جدول زیرش کار می‌کند)؛
   در گوشی همان برگه‌ی تمام‌عرض با پس‌زمینه‌ی تیره. جای پنجره در هر نشست یادش می‌ماند. */
.ucm-backdrop { position: fixed; inset: 0; z-index: 1200; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px 20px; overflow-y: auto; }
.ucm-backdrop[hidden] { display: none; }
.ucm-box { width: 100%; max-width: 980px; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); display: flex; flex-direction: column; min-width: 0; }
.ucm-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; }
.ucm-head h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--text-strong); display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ucm-badge { font-size: 13px; font-weight: 400; color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.ucm-head .ucm-full { margin-right: auto; text-decoration: none; }
.ucm-tools { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--border-color); }
.ucm-tools .ui-seg button { height: 30px; padding: 0 12px; font-size: 15px; }
.ucm-tools select { width: 165px; height: 30px; font-size: 15px; }
#ucmAdjustWrap[hidden] { display: none; }
.ucm-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.ucm-toggles .ui-btn[hidden] { display: none; }
.ucm-chart { position: relative; }
.ucm-chart-host { width: 100%; height: 440px; }
.ucm-chart.empty .ucm-chart-host { display: none; }
.ucm-empty { padding: 40px 16px; text-align: center; color: var(--text-muted); font-size: 15px; }
.ucm-empty[hidden] { display: none; }
.ucm-strip { display: flex; align-items: baseline; gap: 6px 18px; flex-wrap: wrap; padding: 7px 12px; border-top: 1px solid var(--border-color); min-width: 0; }
.ucm-strip[hidden] { display: none; }
.ucm-strip span { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; min-width: 0; }
.ucm-strip i { font-style: normal; font-size: 13px; color: var(--text-muted); }
.ucm-strip b { font-size: 15px; font-weight: 500; color: var(--text-strong); }
.ucm-msg { padding: 8px 12px; border-top: 1px solid var(--border-color); color: var(--c-amber); font-size: 14px; }
.ucm-msg[hidden] { display: none; }

/* جابه‌جایی پنجره در کامپیوتر: سربرگ دسته‌ی کشیدن است؛ پس‌زمینه فقط برای گوشی تیره و مسدودکننده است */
@media (min-width: 801px) {
    .ucm-backdrop { background: transparent; pointer-events: none; display: block; padding: 0; overflow: visible; }
    .ucm-box { position: fixed; width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 24px); pointer-events: auto; overflow: hidden; }
    .ucm-head { cursor: grab; user-select: none; touch-action: none; }
    .ucm-head.dragging { cursor: grabbing; }
    .ucm-chart-host { height: min(440px, calc(100vh - 260px)); }
}
@media (max-width: 800px) {
    .ucm-backdrop { padding: 0; }
    .ucm-box { max-width: none; border-radius: 0 0 10px 10px; border-width: 0 0 1px 0; }
    .ucm-head { padding: 8px 10px; }
    .ucm-head h3 { font-size: 16px; }
    .ucm-tools { padding: 8px 10px; gap: 8px; }
    .ucm-tools select { width: 100%; }
    .ucm-chart-host { height: 320px; }
    .ucm-strip { padding: 6px 10px; gap: 4px 12px; }
    .ucm-strip i { font-size: 12px; }
    .ucm-strip b { font-size: 14px; }
}

/* ---------- تحلیل بنیادی و رویدادها (فاز ۴) ---------- */
.ua-fund { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ua-fund[hidden] { display: none; }
.ua-fund-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ua-fund-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-strong); }
.ua-fund-demo { font-size: 12px; color: var(--c-amber); border: 1px solid var(--c-amber); border-radius: 999px; padding: 0 8px; line-height: 1.8; white-space: nowrap; }
.ua-fund-stamp { margin-right: auto; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.ua-fund-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; }
.ua-fund-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ua-fund-cell i { font-style: normal; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ua-fund-cell b { font-size: 15px; font-weight: 500; color: var(--text-strong); overflow-wrap: anywhere; }
.ua-fund-cell b.num { direction: ltr; text-align: right; }
.ua-fund-events { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border-color); padding-top: 8px; }
.ua-fund-events[hidden] { display: none; }
.ua-fund-events b { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.ua-fund-events ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ua-fund-events li { display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--text-light); flex-wrap: wrap; }
.ua-fund-events li .ua-pill { font-size: 12px; }
.ua-fund-events li time { font-size: 13px; color: var(--text-muted); }
.ua-fund-events li span { color: var(--text-muted); font-size: 13px; }
.ua-fund-note { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.7; border-top: 1px solid var(--border-color); padding-top: 8px; }
.ua-fund-note[hidden] { display: none; }
/* نشان رویداد پیش‌رو کنار نام نماد در رادار (ستون تازه‌ای اضافه نمی‌شود) */
.ua-ev { display: inline-block; width: 6px; height: 6px; border-radius: 2px; margin-inline-start: 6px; vertical-align: middle; background: var(--accent-blue); opacity: .9; cursor: help; }

/* ---------- زبانه‌ی بنیادی: صندوق‌ها و کدال (فاز ۶B) ---------- */
.ua-fund-tab { gap: 12px; }
.ua-fund-tab[hidden] { display: none !important; }
/* نشان «خودکار» کنار نام خانه‌ای که از داده‌ی زنده‌ی صندوق پر شده */
.ua-auto { font-style: normal; font-size: 11px; color: var(--text-muted); border: 1px solid var(--border-strong);
    border-radius: 999px; padding: 0 6px; margin-inline-start: 5px; line-height: 1.7; white-space: nowrap; }
.ua-pill.purple { color: var(--c-purple); border-color: var(--c-purple); }

/* تاریخچه‌ی حباب و NAV صندوق */
.ua-fh { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.ua-fh[hidden] { display: none; }
.ua-fh-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.ua-fh-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-strong); }
.ua-fh-stamp { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.ua-fh-head .ui-seg { margin-right: auto; }
.ua-fh-head .ui-seg button { height: 28px; padding: 0 10px; font-size: 14px; }
/* انتخاب سری نمودار روند بنیادی: هم‌قد دکمه‌های زبانه‌ی همین سرصفحه */
.ua-fh-head .ua-fh-pick { height: 28px; padding: 0 8px; font-size: 14px; margin-right: auto; max-width: 190px; }
.ua-fh-head .ua-fh-pick[hidden] { display: none; }
.ua-fh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; }
.ua-fh-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ua-fh-kpi i { font-style: normal; font-size: 12.5px; color: var(--text-muted); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; }
.ua-fh-kpi b { font-size: 17px; font-weight: 500; color: var(--text-strong); white-space: nowrap; }
.ua-fh-kpi b.num { direction: ltr; text-align: right; }
.ua-fh-kpi span { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ua-fh-charts { display: flex; flex-direction: column; gap: 8px; }
.ua-fh-line { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ua-fh-chart { width: 100%; height: 210px; min-width: 0; }

/* ترکیب دارایی: فقط وقتی جمع درصدها کامل است */
.ua-alloc { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border-color); padding-top: 8px; }
.ua-alloc[hidden] { display: none; }
.ua-alloc > b { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.ua-alloc-bar { display: flex; width: 100%; height: 14px; border-radius: 4px; overflow: hidden;
    background: var(--bg-raised); direction: ltr; }
.ua-alloc-seg { height: 100%; min-width: 2px; font-size: 10px; line-height: 14px; text-align: center;
    color: #0b0e13; overflow: hidden; white-space: nowrap; }
.ua-alloc-seg.a, .ua-alloc-legend i.a { background: var(--accent-blue); }
.ua-alloc-seg.b, .ua-alloc-legend i.b { background: var(--c-purple); }
.ua-alloc-seg.d, .ua-alloc-legend i.d { background: var(--c-amber); }
.ua-alloc-seg.c, .ua-alloc-legend i.c { background: var(--c-green); }
.ua-alloc-seg.o, .ua-alloc-legend i.o { background: var(--text-muted); }
.ua-alloc-legend { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); }
.ua-alloc-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ua-alloc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }

/* ---------- ترکیب پرتفوی صندوق (فاز ۷A) ---------- */
.ua-pf { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.ua-pf[hidden] { display: none; }
.ua-pf-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.ua-pf-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-strong); }
.ua-pf-head .ua-fund-stamp { margin-right: 0; }
.ua-pf-src { margin-right: auto; font-size: 13px; color: var(--accent-blue); text-decoration: none; white-space: nowrap; }
.ua-pf-src:hover { text-decoration: underline; }
.ua-pf-src[hidden] { display: none; }
.ua-pf-fx { display: flex; flex-direction: column; gap: 6px; }
.ua-pf-fx[hidden] { display: none; }
.ua-pf-fx > b { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.ua-pf-line { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ua-pf-line[hidden] { display: none; }
.ua-pf-chart { width: 100%; height: 220px; min-width: 0; }

/* جدول سهام برتر: داخل خانه‌ی جدول flex نمی‌گذاریم؛ نوار وزن inline-block است */
.ua-pf-table-wrap { overflow-x: auto; }
.ua-pf-table-wrap[hidden] { display: none; }
.ua-pf-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ua-pf-table thead th { text-align: right; padding: 6px 8px; font-size: 12.5px; font-weight: 500;
    color: var(--text-muted); border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.ua-pf-table tbody td { padding: 6px 8px; border-bottom: 1px solid var(--border-color); text-align: right;
    white-space: nowrap; vertical-align: middle; }
.ua-pf-table tbody tr:last-child td { border-bottom: 0; }
.ua-pf-table tbody td b { font-weight: 500; color: var(--text-strong); }
.ua-pf-table tbody td .ua-pill { font-size: 12px; }
.ua-pf-sector { color: var(--text-muted); font-size: 13px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.ua-pf-weight b.num { display: inline-block; min-width: 42px; direction: ltr; text-align: right; }
.ua-pf-bar { display: inline-block; width: 90px; height: 5px; border-radius: 3px; overflow: hidden;
    background: var(--bg-raised); vertical-align: middle; margin-inline-start: 8px; }
.ua-pf-bar i { display: block; height: 100%; background: var(--accent-blue); border-radius: 3px; opacity: .7; }

@media (max-width: 800px) {
    .ua-pf-chart { height: 200px; }
    /* گوشی: ستون صنعت جا نمی‌شود؛ نماد و نوع و وزن می‌مانند */
    .ua-pf-table thead th:nth-child(2), .ua-pf-table tbody td:nth-child(2) { display: none; }
    .ua-pf-bar { width: 56px; }
}

/* فهرست اطلاعیه‌های کدال */
.ua-codal { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ua-codal-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.ua-codal-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-strong); }
.ua-codal-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-right: auto; }
.ua-codal-filter .ui-btn { height: 28px; padding: 0 10px; font-size: 13.5px; }
.ua-codal-list { display: flex; flex-direction: column; }
.ua-codal-row { display: grid; grid-template-columns: 88px 118px minmax(0, 1fr) auto; gap: 4px 12px;
    align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.ua-codal-row:last-child { border-bottom: 0; }
.ua-codal-row time { font-size: 13px; color: var(--text-muted); direction: ltr; text-align: right; white-space: nowrap; }
.ua-codal-row .ua-pill { font-size: 12px; justify-self: start; }
.ua-codal-title { color: var(--text-light); text-decoration: none; overflow-wrap: anywhere; line-height: 1.7; }
a.ua-codal-title:hover { color: var(--text-strong); text-decoration: underline; }
.ua-codal-sup { font-style: normal; font-size: 11px; color: var(--c-amber); border: 1px solid var(--c-amber);
    border-radius: 999px; padding: 0 6px; margin-inline-start: 6px; white-space: nowrap; }
.ua-codal-files { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ua-chip { font-size: 11.5px; color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: 4px;
    padding: 0 6px; line-height: 1.8; text-decoration: none; white-space: nowrap; }
.ua-chip:hover { color: var(--text-strong); border-color: var(--text-muted); }
.ua-codal-note { margin: 0; font-size: 14px; color: var(--text-muted); }
.ua-codal-note[hidden] { display: none; }

/* مقایسه: فهرست انتخاب کنار نمودار درصدی؛ در گوشی زیر هم می‌آیند */
.ua-compare { display: flex; flex-direction: column; gap: 10px; }
.ua-compare[hidden] { display: none; }
/* ابزارهایی که با hidden پنهان می‌شوند (مثل لایه‌های اختیار برای شاخص) نباید با display خودشان برگردند */
.ua-tools [hidden], .ua-bar [hidden] { display: none !important; }
.ua-compare-body { display: grid; grid-template-columns: 190px 1fr; gap: 12px; align-items: stretch; }
.ua-compare-body select { width: 100%; height: auto; min-height: 150px; padding: 4px; font-size: 13px; }
.ua-compare-chart-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ua-compare-chart-wrap .ua-fh-chart { height: 240px; }

@media (max-width: 800px) {
    .ua-compare-body { grid-template-columns: 1fr; }
    .ua-compare-body select { min-height: 0; height: 96px; }
    .ua-compare-chart-wrap .ua-fh-chart { height: 200px; }
}

@media (max-width: 800px) {
    .ua-fh-head .ui-seg { margin-right: 0; width: 100%; }
    .ua-fh-head .ui-seg button { flex: 1 1 0; padding: 0 6px; }
    .ua-fh-chart { height: 180px; }
    .ua-fh-kpi b { font-size: 16px; }
    .ua-codal-filter { margin-right: 0; width: 100%; }
    .ua-codal-filter .ui-btn { flex: none; }
    .ua-codal-row { grid-template-columns: auto 1fr; gap: 2px 8px; }
    .ua-codal-row time { grid-column: 1; }
    .ua-codal-row .ua-pill { grid-column: 2; }
    .ua-codal-title { grid-column: 1 / -1; }
    .ua-codal-files { grid-column: 1 / -1; justify-content: flex-start; }
}
