@font-face { font-family:"Vazir"; src:url("../fonts/Vazir-Regular.woff2") format("woff2"); font-style:normal; font-weight:400; font-display:swap; }
@font-face { font-family:"Vazir"; src:url("../fonts/Vazir-Bold.woff2") format("woff2"); font-style:normal; font-weight:700; font-display:swap; }
@font-face { font-family:"Samim"; src:url("../fonts/Samim-Regular.woff2") format("woff2"); font-style:normal; font-weight:400; font-display:swap; }
@font-face { font-family:"Samim"; src:url("../fonts/Samim-Bold.woff2") format("woff2"); font-style:normal; font-weight:700; font-display:swap; }

:root {
  color-scheme:dark; --page:#071525; --page-glow:rgba(25,120,145,.18); --surface:#0d2037; --surface-raised:#112841;
  --surface-soft:#091a2e; --line:rgba(171,196,224,.14); --line-strong:rgba(171,196,224,.24); --text:#edf4fb;
  --muted:#8fa4bb; --accent:#32c2bd; --accent-ink:#062329; --green:#3bd39f; --red:#ff7187; --warning:#f2bd62;
  --table-head:#15304d; --row-alt:rgba(106,147,184,.055); --row-hover:rgba(50,194,189,.09); --overlay:rgba(0,8,22,.72);
  --shadow:0 16px 42px rgba(0,8,24,.22); --radius-lg:16px; --radius-md:11px; --radius-sm:8px; --control-height:38px;
  font-family:"Vazir",Tahoma,Arial,sans-serif;
}
:root[data-theme="light"] {
  color-scheme:light; --page:#f4f7fa; --page-glow:rgba(28,155,151,.08); --surface:#fff; --surface-raised:#fff;
  --surface-soft:#f3f6f8; --line:rgba(36,59,82,.12); --line-strong:rgba(36,59,82,.2); --text:#182b3d; --muted:#66798c;
  --accent:#087f7c; --accent-ink:#fff; --green:#087f5b; --red:#c83b53; --warning:#a86500; --table-head:#e9eff4;
  --row-alt:#f7f9fb; --row-hover:#eaf6f5; --overlay:rgba(20,35,50,.42); --shadow:0 12px 32px rgba(30,50,70,.09);
}

* { box-sizing:border-box; }
[hidden] { display:none!important; }
html { background:var(--page); }
body { min-width:320px; min-height:100vh; margin:0; color:var(--text); background:radial-gradient(circle at 8% 0%,var(--page-glow),transparent 29rem),var(--page); transition:color .18s ease,background-color .18s ease; }
button,input { font:inherit; } button { cursor:pointer; }
button:focus-visible,input:focus-visible,a:focus-visible,.table-wrap:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
h1,h2,p { margin:0; } h1 { font-size:clamp(1.35rem,2vw,1.75rem); line-height:1.35; } h2 { font-size:clamp(1rem,1.5vw,1.2rem); line-height:1.4; }

.app-shell { display:grid; grid-template-columns:208px minmax(0,1fr); gap:16px; min-height:100vh; padding:16px; }
.workspace { width:100%; max-width:1500px; min-width:0; margin:0 auto; }
.sidebar { position:sticky; top:16px; align-self:start; display:flex; flex-direction:column; min-height:calc(100vh - 32px); padding:14px 10px; border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); box-shadow:var(--shadow); }
.main-nav { display:grid; gap:5px; }
.content-shortcuts { display:flex; gap:5px; margin-bottom:9px; padding-bottom:9px; border-bottom:1px solid var(--line); }
.content-shortcuts a { flex:1; padding:5px 7px; border:1px solid var(--line); border-radius:7px; color:var(--muted); text-align:center; text-decoration:none; font-size:.7rem; }
.content-shortcuts a:hover { color:var(--accent); border-color:var(--accent); }
.nav-tab,.theme-options button { display:flex; align-items:center; gap:9px; width:100%; min-height:var(--control-height); border:1px solid transparent; border-radius:var(--radius-sm); padding:8px 10px; color:var(--muted); background:transparent; text-align:right; font-size:.82rem; transition:color .15s ease,border-color .15s ease,background-color .15s ease; }
.nav-tab:hover,.nav-tab.active { color:var(--text); border-color:var(--line); background:var(--surface-soft); }
.nav-tab.active { box-shadow:inset -3px 0 0 var(--accent); }
.sidebar-settings { margin-top:auto; padding-top:12px; }
.theme-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.theme-options button { justify-content:center; min-height:34px; padding:6px 7px; font-size:.7rem; }
.theme-options button[aria-checked="true"] { color:var(--accent); border-color:var(--line-strong); background:var(--surface-raised); }
.ui-icon { flex:0 0 auto; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.topbar,.topbar-actions,.panel-head,.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.topbar { min-height:62px; padding:4px 3px 14px; }
.topbar-actions { flex-wrap:wrap; }
.eyebrow { margin-bottom:2px; color:var(--accent); font-size:.72rem; }
.status-pill { display:inline-flex; align-items:center; gap:7px; min-height:var(--control-height); padding:7px 11px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:var(--surface); font-size:.75rem; }
.status-pill i { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px color-mix(in srgb,var(--green) 14%,transparent); }
.status-pill.loading i { background:var(--warning); animation:pulse 1s infinite; } .status-pill.error i { background:var(--red); }
@keyframes pulse { 50% { opacity:.35; transform:scale(.75); } }
.refresh-button { min-height:var(--control-height); border:0; border-radius:var(--radius-sm); padding:8px 13px; color:var(--accent-ink); background:var(--accent); font-size:.82rem; font-weight:800; transition:filter .15s ease,transform .15s ease; }
.refresh-button:hover { filter:brightness(1.08); transform:translateY(-1px); } .refresh-button:disabled { cursor:wait; opacity:.62; transform:none; }
.button-icon { display:inline-block; margin-left:6px; font-size:1rem; } .refresh-button:disabled .button-icon { animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(-360deg); } }

.market-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.panel { margin-top:14px; padding:16px; border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); box-shadow:var(--shadow); }
.panel-head { margin-bottom:12px; }
.precious-panel { background:linear-gradient(145deg,color-mix(in srgb,#8c6b1a 28%,var(--surface)),var(--surface)); }
.certificate-panel { background:linear-gradient(145deg,var(--surface),color-mix(in srgb,#087f83 18%,var(--surface))); }
.search-box { display:flex; align-items:center; gap:7px; width:min(270px,100%); min-height:var(--control-height); padding:0 10px; border:1px solid var(--line); border-radius:var(--radius-sm); color:var(--muted); background:var(--surface-soft); }
.search-box:focus-within { border-color:var(--accent); }
.search-box input { width:100%; border:0; outline:0; padding:8px 0; color:var(--text); background:transparent; font-size:.78rem; }
.search-box input::placeholder { color:var(--muted); opacity:.8; }
.empty-state { padding:36px 16px; border:1px dashed var(--line-strong); border-radius:var(--radius-md); color:var(--muted); text-align:center; font-size:.82rem; }
.table-wrap { overflow:auto; max-height:510px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }
table { width:100%; min-width:670px; border-collapse:collapse; direction:rtl; font-size:.78rem; }
th,td { height:43px; padding:8px 11px; border-bottom:1px solid var(--line); text-align:right; white-space:nowrap; }
th { position:sticky; top:0; z-index:2; color:var(--text); background:var(--table-head); font-size:.71rem; font-weight:700; }
.sort-button { display:flex; align-items:center; justify-content:flex-start; gap:4px; width:100%; min-height:27px; padding:0; border:0; color:inherit; background:transparent; text-align:right; font-size:inherit; font-weight:inherit; }
.sort-icon { color:var(--muted); font-size:.55rem; line-height:1; opacity:.8; }
th[aria-sort]:not([aria-sort="none"]) .sort-icon { color:var(--accent); opacity:1; }
td { color:var(--text); font-family:"Samim",Tahoma,sans-serif; font-size:.86rem; font-weight:700; }
tbody tr:nth-child(even) { background:var(--row-alt); } tbody tr:hover { background:var(--row-hover); }
.number { direction:ltr; font-family:"Samim",Tahoma,sans-serif; font-size:.8rem; font-weight:700; }
.price-value { display:inline-flex; align-items:baseline; gap:4px; direction:rtl; }
.price-value small { order:2; font-family:"Vazir",Tahoma,sans-serif; color:var(--muted); font-size:.7rem; font-weight:400; }
.positive,.p-nav-good { color:var(--green); } .negative { color:var(--red); } .muted,.fund-name { color:var(--muted); }
.certificate-panel th { background:color-mix(in srgb,var(--accent) 28%,var(--table-head)); }
.chart-item-button { max-width:310px; padding:3px 0; border:0; border-bottom:1px dashed color-mix(in srgb,var(--accent) 48%,transparent); color:inherit; background:transparent; text-align:right; white-space:normal; line-height:1.55; }
.chart-item-button:hover,.chart-item-button.active { color:var(--accent); border-bottom-color:var(--accent); }.chart-item-button.active { font-weight:900; }
.certificate-dashboard { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr); gap:14px; align-items:start; }
.certificate-dashboard>.panel { margin-top:14px; }
.certificate-panel table { min-width:590px; table-layout:auto; }
.car-certificate-row { background:color-mix(in srgb,var(--accent) 8%,transparent); border-top:2px solid var(--accent); }
.car-certificate-row td:first-child { font-weight:700; }
.certificate-panel th,.certificate-panel td { height:39px; padding:6px 7px; }
.certificate-panel th:first-child,.certificate-panel td:first-child { white-space:normal; line-height:1.55; }
.market-chart-stack { display:grid; gap:12px; min-width:0; overflow:hidden; background:linear-gradient(145deg,color-mix(in srgb,#18b8ad 8%,var(--surface)),var(--surface)); }
.market-charts-header { padding-bottom:10px; border-bottom:1px solid var(--line); }.market-charts-header h2 { margin-top:2px; color:var(--text); font-size:1rem; }
.market-chart-card { min-width:0; overflow:hidden; padding:10px; border:1px solid var(--line); border-radius:var(--radius-md); background:color-mix(in srgb,#18b8ad 5%,var(--surface-soft)); }
.market-chart-card-coin { background:color-mix(in srgb,#d5a83d 6%,var(--surface-soft)); }
.market-chart-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.market-chart-head h2 { font-size:.92rem; }.chart-kicker { display:block; margin-bottom:2px; color:var(--muted); font-size:.65rem; }
.chart-type-label { display:flex; align-items:center; gap:7px; margin:0; font-size:1.02rem; line-height:1.4; }.chart-type-label i { position:relative; width:13px; height:13px; flex:0 0 13px; border:2px solid currentColor; border-radius:50%; }.chart-type-label i::after { content:""; position:absolute; top:-5px; right:-4px; width:5px; height:5px; border:1px solid currentColor; border-radius:50%; opacity:.7; }.chart-type-bubble { color:#32c2bd; }.chart-type-return { color:#d5a83d; }.chart-type-return i { border-radius:50% 50% 50% 2px; transform:rotate(-45deg); }.chart-type-caption { display:block; margin:1px 20px 0 0; color:var(--muted); font-size:.61rem; }
.chart-last-value { direction:ltr; color:var(--text); font-family:"Samim",Tahoma,sans-serif; font-size:.77rem; white-space:nowrap; }
.chart-range-mask { position:relative; margin:10px -4px 8px; overflow:hidden; }
.chart-range-mask::before,.chart-range-mask::after { content:""; position:absolute; z-index:2; top:0; bottom:0; width:30px; pointer-events:none; }
.chart-range-mask::before { right:0; background:linear-gradient(to left,var(--surface),transparent); }
.chart-range-mask::after { left:0; background:linear-gradient(to right,var(--surface),transparent); }
.chart-range-tabs { display:flex; gap:6px; overflow-x:auto; padding:2px 22px 5px; scrollbar-width:none; scroll-snap-type:x proximity; }
.chart-range-tabs::-webkit-scrollbar { display:none; }.chart-range-tabs button { flex:0 0 auto; scroll-snap-align:center; min-height:29px; padding:4px 9px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:var(--surface-soft); font-size:.66rem; }
.chart-range-tabs button:hover { color:var(--text); border-color:var(--accent); }.chart-range-tabs button.active { color:var(--accent-ink); border-color:var(--accent); background:var(--accent); font-weight:800; }
.gradient-area-chart { position:relative; min-height:170px; overflow:hidden; border-radius:10px; background:color-mix(in srgb,var(--surface-soft) 78%,transparent); }
.gradient-area-chart svg { display:block; width:100%; height:auto; direction:ltr; animation:chart-arrive .32s ease-out both; }.gradient-area-chart .chart-series-line { stroke-dasharray:1; stroke-dashoffset:1; animation:chart-draw .48s ease-out forwards; }.gradient-area-chart text { fill:var(--muted); font-family:"Samim",Tahoma,sans-serif; font-size:10px; }
@keyframes chart-arrive { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } } @keyframes chart-draw { to { stroke-dashoffset:0; } }
.area-chart-tooltip { position:absolute; z-index:3; display:grid; gap:2px; min-width:130px; padding:7px 9px; border:1px solid var(--line-strong); border-radius:8px; direction:rtl; color:var(--text); background:color-mix(in srgb,var(--surface-raised) 94%,transparent); box-shadow:0 8px 22px rgba(0,0,0,.2); pointer-events:none; }.area-chart-tooltip strong { direction:ltr; font-family:"Samim",Tahoma,sans-serif; font-size:.72rem; }.area-chart-tooltip small { color:var(--muted); font-size:.62rem; }
.market-chart-message { display:grid; min-height:170px; place-items:center; color:var(--muted); font-size:.72rem; text-align:center; }
.history-button,.range-picker button { min-height:31px; padding:5px 9px; border:1px solid var(--line-strong); border-radius:7px; color:var(--text); background:var(--surface-soft); font-size:.74rem; }
.history-button:hover { color:var(--accent); border-color:var(--accent); }
.last-update { padding:11px 4px 0; color:var(--muted); font-size:.75rem; }
.history-dialog { width:min(780px,calc(100% - 24px)); max-height:calc(100% - 24px); padding:16px; border:1px solid var(--line); border-radius:var(--radius-lg); color:var(--text); background:var(--surface-raised); box-shadow:var(--shadow); }
.history-dialog::backdrop { background:var(--overlay); }
.close-button { display:grid; place-items:center; width:34px; height:34px; padding:0; border:1px solid var(--line); border-radius:var(--radius-sm); color:var(--text); background:var(--surface-soft); font-size:1.35rem; }
.range-picker { display:flex; flex-wrap:wrap; gap:6px; margin:14px 0; }
.range-picker button.active { color:var(--accent-ink); border-color:var(--accent); background:var(--accent); font-weight:800; }
.history-message { padding:16px; color:var(--muted); text-align:center; font-size:.8rem; }
.error-list { margin-top:10px; padding:10px 13px; border-right:3px solid var(--warning); border-radius:var(--radius-sm); color:var(--warning); background:color-mix(in srgb,var(--warning) 9%,transparent); font-size:.8rem; }
.toast { position:fixed; left:18px; bottom:18px; z-index:20; max-width:min(340px,calc(100vw - 36px)); padding:10px 13px; border:1px solid var(--line); border-radius:var(--radius-sm); color:var(--text); background:var(--surface-raised); box-shadow:var(--shadow); opacity:0; transform:translateY(72px); transition:opacity .2s ease,transform .2s ease; font-size:.78rem; }
.toast.show { opacity:1; transform:translateY(0); } .toast.error { color:#fff; background:#7d2e44; }

.bourse-header { align-items:flex-end; } .bourse-export-actions { display:flex; flex-wrap:wrap; gap:6px; }
.export-button { display:inline-flex; align-items:center; gap:5px; min-height:30px; padding:5px 8px; border:1px solid var(--line-strong); border-radius:7px; color:var(--text); background:var(--surface-soft); text-decoration:none; font-size:.73rem; line-height:1; transition:border-color .15s ease,background-color .15s ease; }
.export-button:hover { border-color:#16885f; background:color-mix(in srgb,#16885f 10%,var(--surface-soft)); }
.export-button-all { color:#fff; border-color:#16885f; background:#16885f; font-weight:800; } .export-button-all:hover { background:#11724f; }
.excel-icon { display:block; width:1.05em; height:1.05em; flex:0 0 1.05em; border-radius:3px; object-fit:cover; }
.bourse-panel { margin-top:0; padding:14px; }
.bourse-tools { align-items:end; gap:10px; margin-bottom:10px; }
.category-area { display:grid; min-width:0; gap:6px; }
.category-tabs { display:flex; gap:5px; overflow:auto; padding:1px; scrollbar-width:thin; }
.category-tabs button { --category-color:var(--accent); flex:0 0 auto; min-height:30px; padding:5px 9px; border:1px solid var(--line); border-radius:7px; color:var(--muted); background:transparent; font-size:.73rem; transition:color .15s ease,border-color .15s ease,background-color .15s ease; }
.category-tabs button:hover { color:var(--category-color); border-color:var(--category-color); }
.category-tabs button { color:var(--category-color); border-color:color-mix(in srgb,var(--category-color) 58%,var(--line)); background:color-mix(in srgb,var(--category-color) 12%,var(--surface-soft)); }
.category-tabs button.active { color:var(--category-color); border-color:var(--category-color); background:color-mix(in srgb,var(--category-color) 23%,var(--surface-soft)); font-weight:800; box-shadow:inset 0 -2px 0 var(--category-color); }
.category-tabs [data-category="fixed_income"],.category-export[data-category="fixed_income"] { --category-color:#2da9a9; }
.category-tabs [data-category="gold"],.category-export[data-category="gold"] { --category-color:#d4a600; }
.category-tabs [data-category="equity"],.category-export[data-category="equity"] { --category-color:#8794a4; }
.category-tabs [data-category="mixed"],.category-export[data-category="mixed"] { --category-color:#b68d61; }
.category-tabs [data-category="real_estate"],.category-export[data-category="real_estate"] { --category-color:#ec7134; }
.category-tabs [data-category="leveraged"],.category-export[data-category="leveraged"] { --category-color:#dc3b87; }
.category-tabs [data-category="saffron"],.category-export[data-category="saffron"] { --category-color:#e96237; }
.category-tabs [data-category="other"],.category-export[data-category="other"] { --category-color:#78909c; }
.car-source-summary { margin-bottom:10px; padding:9px 11px; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:var(--surface-soft); font-size:.75rem; }
.car-category-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:14px; }
.car-category-card { display:grid; align-content:start; gap:6px; min-height:108px; padding:11px; border:1px solid var(--line); border-radius:11px; color:var(--text); background:var(--surface-soft); text-align:right; }
.car-category-card:hover,.car-category-card.active { border-color:var(--accent); background:var(--row-hover); }.car-category-card.active { box-shadow:inset 0 -3px 0 var(--accent); }
.car-category-card span,.car-category-card small { color:var(--muted); font-size:.7rem; }.car-category-card strong { font-size:.8rem; }.car-category-head { display:flex; align-items:center; justify-content:space-between; gap:7px; }.car-category-card .car-category-price { direction:ltr; color:var(--text); font-family:"Samim",Tahoma,sans-serif; font-size:.86rem; font-weight:800; text-align:right; }.car-category-card .car-category-change { display:inline-flex; align-items:center; direction:ltr; font-family:"Samim",Tahoma,sans-serif; font-size:.63rem; font-weight:800; white-space:nowrap; }.car-category-card .car-category-change.positive { color:var(--green); }.car-category-card .car-category-change.negative { color:var(--red); }
.car-range-picker { display:flex; flex-wrap:wrap; gap:7px; margin:2px 0 12px; }.car-range-picker button { min-height:32px; padding:5px 11px; border:1px solid var(--line-strong); border-radius:999px; color:var(--muted); background:var(--surface-soft); font-size:.72rem; }.car-range-picker button:hover { color:var(--text); border-color:var(--accent); }.car-range-picker button.active { color:var(--accent-ink); border-color:var(--accent); background:var(--accent); font-weight:800; }
.car-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:14px; margin-bottom:16px; }.car-chart-card { display:grid; grid-template-rows:auto 1fr; min-width:0; overflow:hidden; padding:12px; border:1px solid var(--line); border-radius:var(--radius-md); background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 5%,var(--surface-soft)),var(--surface-soft)); }.car-chart-card:nth-child(2) { background:linear-gradient(145deg,color-mix(in srgb,#4b9cff 7%,var(--surface-soft)),var(--surface-soft)); }.car-chart-head { min-height:48px; padding:0 2px 9px; }.car-chart-head h2 { margin:0 0 3px; font-size:.86rem; }.car-chart-head p { color:var(--muted); font-size:.65rem; line-height:1.55; }.car-chart-card .gradient-area-chart,.car-chart-card .compare-chart-empty { width:100%; min-height:0; aspect-ratio:2.05/1; }.car-chart-card .compare-chart-empty { padding:14px; }.car-chart-mean-label { paint-order:stroke; stroke:var(--surface-soft); stroke-width:3px; }
.car-dollar-summary { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin:-1px 0 9px; padding:7px 8px; border:1px solid color-mix(in srgb,#4b9cff 32%,var(--line)); border-radius:8px; background:color-mix(in srgb,#4b9cff 7%,var(--surface-raised)); font-size:.67rem; }.car-dollar-summary strong { direction:ltr; color:var(--text); font-family:"Samim",Tahoma,sans-serif; }.car-dollar-change { font-family:"Samim",Tahoma,sans-serif; white-space:nowrap; }.car-dollar-change.positive { color:var(--green); }.car-dollar-change.negative { color:var(--red); }.car-dollar-change.muted { color:var(--muted); }
.category-export { justify-self:start; min-height:27px; padding:4px 7px; color:var(--category-color); background:transparent; }
.bourse-panel table { min-width:1120px; }
.codal-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(330px,.9fr); gap:14px; align-items:start; }
.codal-section-tabs { display:flex; gap:7px; overflow-x:auto; margin:0 0 12px; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--surface-soft); }
.codal-section-tabs button { flex:0 0 auto; min-height:34px; padding:6px 14px; border:1px solid transparent; border-radius:8px; color:var(--muted); background:transparent; font-size:.76rem; font-weight:800; }
.codal-section-tabs button:hover { color:var(--text); border-color:var(--line-strong); }
.codal-section-tabs button.active { color:var(--accent-ink); border-color:var(--accent); background:var(--accent); box-shadow:0 5px 14px color-mix(in srgb,var(--accent) 22%,transparent); }
.codal-pharma-panel { min-width:0; }
.codal-pharma-panel table { min-width:980px; }
.codal-pharma-panel tbody td:first-child { color:var(--accent); font-weight:900; }
.codal-pharma-panel a { color:var(--accent); text-decoration:none; border-bottom:1px dashed currentColor; }
.codal-source-badge { padding:5px 8px; border:1px solid color-mix(in srgb,var(--accent) 40%,var(--line)); border-radius:999px; color:var(--accent); background:color-mix(in srgb,var(--accent) 8%,var(--surface-soft)); font-size:.65rem; font-weight:800; }
.codal-issuers-panel,.codal-history-panel,.codal-analysis-panel { min-width:0; }
.codal-analysis-panel { grid-column:1/-1; }
.codal-issuers-panel table { min-width:760px; }
.codal-issuers-panel tbody tr.active { background:color-mix(in srgb,var(--accent) 13%,var(--surface-soft)); }
.codal-symbol-button { padding:2px 0; border:0; border-bottom:1px dashed color-mix(in srgb,var(--accent) 55%,transparent); color:var(--accent); background:transparent; font:inherit; font-weight:900; }
.codal-symbol-button:hover { border-bottom-color:var(--accent); }
.codal-correction { color:var(--warning); font-weight:800; }.codal-original { color:var(--green); }
.codal-queue-note { margin:9px 2px 0; color:var(--muted); font-size:.64rem; line-height:1.65; }.codal-queue-note strong { color:var(--warning); }
.codal-chart-heading { align-items:flex-start; }
.codal-industry-row th { position:sticky; top:0; z-index:1; padding:7px 10px; color:var(--accent); background:color-mix(in srgb,var(--accent) 10%,var(--surface-raised)); border-block:1px solid color-mix(in srgb,var(--accent) 28%,var(--line)); font-size:.76rem; font-weight:900; text-align:right; }
.codal-range-tabs { padding:0; }
.codal-chart { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:12px; }
.codal-category-block { min-width:0; padding:11px; border:1px solid color-mix(in srgb,var(--category-color,var(--accent)) 28%,var(--line)); border-radius:var(--radius-md); background:linear-gradient(145deg,color-mix(in srgb,var(--category-color,var(--accent)) 9%,var(--surface-soft)),var(--surface-soft) 72%); box-shadow:inset 0 3px 0 color-mix(in srgb,var(--category-color,var(--accent)) 64%,transparent); }
.codal-category-block>header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:1px 3px 9px; border-bottom:1px solid color-mix(in srgb,var(--category-color,var(--accent)) 30%,var(--line)); }
.codal-category-block>header h3 { margin:0; color:color-mix(in srgb,var(--category-color,var(--accent)) 84%,var(--text)); font-size:1rem; font-weight:900; }.codal-category-block>header small { color:var(--muted); font-size:.66rem; }
.codal-energy-block { grid-column:1/-1; }.codal-energy-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.codal-product-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:9px; }
.codal-metric-card { min-width:0; padding:9px; border:1px solid var(--line); border-radius:var(--radius-md); background:color-mix(in srgb,var(--accent) 4%,var(--surface-soft)); }
.codal-metric-card header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:4px; }
.codal-metric-card h4 { margin:0; font-size:.73rem; }.codal-metric-card strong { direction:ltr; font-family:"Samim",Tahoma,sans-serif; font-size:.7rem; }
.codal-metric-card svg { display:block; width:100%; height:auto; direction:ltr; }.codal-metric-card text { fill:var(--muted); font-family:"Samim",Tahoma,sans-serif; font-size:10px; }
.codal-chart-actions { display:flex; align-items:center; gap:7px; }.codal-chart-detail-button { display:grid; width:27px; height:27px; place-items:center; padding:0; border:1px solid var(--line); border-radius:7px; color:var(--muted); background:var(--surface-raised); font-size:.8rem; }.codal-chart-detail-button:hover,.codal-chart-detail-button:focus-visible { color:var(--accent); border-color:var(--accent); }
.codal-chart-plot { position:relative; min-width:0; }.codal-point-target,.codal-x-hover-target { cursor:crosshair; outline:none; }.codal-point-target:focus { stroke:var(--text); stroke-width:2; }
.codal-point-tooltip { position:absolute; z-index:4; display:grid; gap:2px; min-width:175px; padding:7px 9px; border:1px solid var(--line-strong); border-radius:8px; direction:rtl; color:var(--text); background:color-mix(in srgb,var(--surface-raised) 96%,transparent); box-shadow:0 8px 22px rgba(0,0,0,.2); pointer-events:none; }.codal-point-tooltip strong,.codal-point-tooltip span { font-family:"Samim",Tahoma,sans-serif; font-size:.69rem; }.codal-point-tooltip small { color:var(--muted); font-size:.61rem; }
.codal-category-empty { margin:10px 2px 2px; color:var(--muted); font-size:.68rem; }.codal-expand-category { margin-top:9px; }
.codal-analytics-title { margin:13px 2px 0; padding-top:10px; border-top:1px dashed var(--line-strong); color:var(--text); font-size:.72rem; }.codal-analytics-grid { margin-top:7px; }
.codal-chart-dialog { width:min(980px,calc(100% - 24px)); max-height:calc(100% - 24px); overflow:auto; padding:16px; border:1px solid var(--line); border-radius:var(--radius-lg); color:var(--text); background:var(--surface-raised); box-shadow:var(--shadow); }.codal-chart-dialog::backdrop { background:var(--overlay); }.codal-chart-dialog-body { margin-top:12px; }.codal-metric-card-expanded { padding:14px; }.codal-metric-card-expanded h4 { font-size:.9rem; }.codal-metric-card-expanded svg { min-height:320px; }
.codal-chart-dialog #codal-chart-dialog-title { font-size:1.35rem; }.codal-chart-dialog #codal-chart-dialog-category { font-size:.82rem; font-weight:800; }
.codal-comparison-panel { margin-top:12px; padding:11px; border:1px solid var(--line); border-radius:var(--radius-md); background:color-mix(in srgb,#8b5cf6 5%,var(--surface-soft)); }.codal-comparison-panel>header { display:flex; align-items:center; justify-content:space-between; gap:10px; }.codal-comparison-panel h3 { margin:0; font-size:.82rem; }.codal-comparison-controls { display:grid; grid-template-columns:1fr 1.35fr; gap:8px; margin:10px 0; }.codal-comparison-controls label { display:grid; gap:4px; color:var(--muted); font-size:.65rem; }.codal-comparison-controls select { width:100%; min-width:0; height:35px; padding:5px 8px; border:1px solid var(--line-strong); border-radius:7px; color:var(--text); background:var(--surface-raised); }.codal-comparison-grouping { display:flex; gap:5px; }.codal-comparison-grouping button { min-height:29px; padding:4px 9px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:transparent; font-size:.65rem; }.codal-comparison-grouping button.active { color:var(--accent-ink); border-color:var(--accent); background:var(--accent); font-weight:800; }.codal-comparison-chart { min-width:0; }.codal-comparison-chart svg { display:block; width:100%; height:auto; direction:ltr; }.codal-comparison-chart text { fill:var(--muted); font-family:"Samim",Tahoma,sans-serif; font-size:10px; }.codal-comparison-bar { cursor:crosshair; outline:none; }.codal-comparison-bar:focus { stroke:var(--text); stroke-width:2; }.codal-comparison-legend { display:flex; justify-content:center; gap:14px; margin-bottom:3px; color:var(--muted); font-size:.65rem; }.codal-comparison-legend span::before { content:""; display:inline-block; width:16px; height:3px; margin-left:5px; border-radius:99px; vertical-align:middle; background:var(--series-color); }
.codal-comparison-mean { pointer-events:none; }.codal-month-axis-label { font-size:8px!important; }.codal-comparison-legend { flex-wrap:wrap; row-gap:5px; }.codal-comparison-legend .codal-mean-label { font-size:.61rem; }.codal-comparison-legend .codal-mean-label::before { height:0; border-top:1px dashed var(--series-color); border-radius:0; background:transparent; }
.codal-analytic-year-legend { margin:3px 0 0; }.codal-analytic-comparison-bar { pointer-events:none; }.codal-analytic-zero { stroke:var(--line-strong); stroke-width:1; stroke-dasharray:3 3; pointer-events:none; }.codal-analytic-bar-card .codal-chart-plot { margin-top:1px; }
.codal-history-summary { margin-top:10px; padding-top:9px; border-top:1px solid var(--line); color:var(--muted); font-size:.68rem; }
.codal-pharma-period { direction:rtl; unicode-bidi:isolate; text-align:right; white-space:nowrap; font-family:"Vazir",Tahoma,sans-serif; }
.fund-name { display:block; max-width:220px; overflow:hidden; text-overflow:ellipsis; font-size:.72rem; font-weight:400; }
.symbol-cell { font-family:"Vazir",Tahoma,sans-serif; font-size:.8rem; font-weight:800; }
.compare-header { align-items:flex-end; }
.compare-period { padding:6px 10px; border:1px solid var(--line); border-radius:8px; color:var(--text); background:var(--surface-soft); font-size:.76rem; font-weight:800; }
.compare-intro,.compare-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.compare-selection-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:stretch; margin:10px 0 8px; }.compare-selection-row .compare-selection { margin:0; }.compare-selection-row .compare-add { min-width:118px; }
.compare-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 14px; margin-bottom:10px; padding:7px 9px; border:1px solid var(--line); border-radius:10px; background:color-mix(in srgb,var(--surface-soft) 84%,transparent); }
.compare-range-picker { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin:0; }.compare-range-picker>span { margin-left:2px; color:var(--muted); font-size:.68rem; }.compare-range-picker button { min-height:29px; padding:4px 9px; border:1px solid var(--line-strong); border-radius:999px; color:var(--muted); background:var(--surface-soft); font-size:.68rem; }.compare-range-picker button:hover { color:var(--text); border-color:var(--accent); }.compare-range-picker button.active { color:var(--accent-ink); border-color:var(--accent); background:var(--accent); font-weight:800; }
.compare-currency-picker { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin:0; }.compare-currency-picker>span { margin-left:2px; color:var(--muted); font-size:.68rem; }.compare-currency-picker button { min-height:29px; padding:4px 10px; border:1px solid var(--line-strong); border-radius:999px; color:var(--text); background:var(--surface-soft); font-size:.68rem; font-weight:700; }.compare-currency-picker [data-compare-currency="toman"] { border-color:color-mix(in srgb,#f59e0b 60%,var(--line)); }.compare-currency-picker [data-compare-currency="usd"] { border-color:color-mix(in srgb,#22c55e 60%,var(--line)); }.compare-currency-picker [data-compare-currency="toman"].active { color:#fff; border-color:#fbbf24; background:linear-gradient(115deg,#b45309,#f59e0b,#d97706); box-shadow:0 0 0 2px color-mix(in srgb,#fbbf24 28%,transparent),0 0 13px color-mix(in srgb,#f59e0b 52%,transparent); animation:compare-currency-glow 2.2s ease-in-out infinite; }.compare-currency-picker [data-compare-currency="usd"].active { color:#fff; border-color:#4ade80; background:linear-gradient(115deg,#166534,#22c55e,#15803d); box-shadow:0 0 0 2px color-mix(in srgb,#4ade80 25%,transparent),0 0 13px color-mix(in srgb,#22c55e 48%,transparent); animation:compare-currency-glow 2.2s ease-in-out infinite; }
@keyframes compare-currency-glow { 0%,100% { filter:brightness(1); } 50% { filter:brightness(1.18); } }
.liquidity-basis-note { display:block; margin-top:4px; color:var(--accent); font-size:.62rem; font-weight:700; }
.compare-intro p,.compare-hint { margin-top:5px; color:var(--muted); font-size:.78rem; line-height:1.8; }
.compare-add { min-height:35px; flex:0 0 auto; border:1px solid var(--line-strong); border-radius:var(--radius-sm); padding:7px 10px; color:var(--accent); background:var(--surface-soft); font-size:.78rem; font-weight:700; }
.compare-add:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 10%,var(--surface-soft)); }
.compare-selection { display:flex; flex-wrap:wrap; gap:7px; min-height:42px; margin:14px 0; padding:5px 7px; border:1px dashed var(--line-strong); border-radius:var(--radius-md); background:var(--surface-soft); }
.compare-selection:empty::after { content:"ابزاری انتخاب نشده است"; align-self:center; color:var(--muted); font-size:.76rem; }
.compare-chip { display:inline-flex; align-items:center; gap:7px; max-width:100%; min-height:30px; padding:4px 5px 4px 9px; border:1px solid var(--line-strong); border-radius:999px; color:var(--text); background:var(--surface-raised); font-size:.74rem; }
.compare-chip span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.compare-chip button { display:grid; place-items:center; width:20px; height:20px; padding:0; border:0; border-radius:50%; color:var(--muted); background:transparent; font-size:1rem; line-height:1; }
.compare-chip button:hover { color:var(--red); background:color-mix(in srgb,var(--red) 12%,transparent); }
.compare-actions { margin-bottom:14px; }.compare-actions .compare-hint { margin:0; }
.compare-chart-empty { display:grid; min-height:285px; place-items:center; padding:20px; border:1px dashed var(--line-strong); border-radius:var(--radius-md); color:var(--muted); text-align:center; font-size:.8rem; }
.compare-chart { overflow:hidden; min-height:285px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }
.compare-chart svg { display:block; width:100%; min-width:680px; height:auto; direction:ltr; }
.compare-bubble-section { margin-top:18px; padding-top:14px; border-top:1px dashed var(--line-strong); }.compare-bubble-section h3 { margin:0; color:var(--text); font-size:.9rem; }.compare-bubble-section .compare-intro { margin-bottom:9px; }.compare-bubble-section .compare-chart-empty { min-height:180px; }.compare-bubble-section .compare-chart { min-height:180px; }.compare-bubble-section .compare-bubble-empty { min-height:54px; padding:10px 14px; }
.compare-return-bars { display:grid; gap:8px; margin:0 12px 14px; padding:13px; border-top:1px dashed var(--line-strong); }.compare-return-bars h3 { margin:0 0 3px; font-size:.78rem; }.compare-return-bars-body { display:flex; align-items:stretch; justify-content:space-around; gap:12px; min-width:max-content; overflow-x:auto; padding:4px 2px 8px; }.compare-return-bar-row { display:grid; width:clamp(78px,11vw,125px); grid-template-rows:22px 150px 36px; gap:6px; justify-items:center; align-items:center; font-size:.68rem; }.compare-return-bar-name { display:-webkit-box; overflow:hidden; color:var(--muted); text-align:center; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-height:1.45; }.compare-return-bar-track { position:relative; width:32px; height:150px; overflow:hidden; border-radius:5px; background:color-mix(in srgb,var(--line) 55%,transparent); }.compare-return-bar-track::after { position:absolute; top:50%; right:0; left:0; height:1px; content:""; background:var(--line-strong); }.compare-return-bar-fill { position:absolute; right:3px; left:3px; height:var(--bar-height); max-height:50%; border-radius:4px; background:linear-gradient(to top,color-mix(in srgb,var(--bar-color) 72%,#000),var(--bar-color)); }.compare-return-bar-fill.positive { bottom:50%; }.compare-return-bar-fill.negative { top:50%; background:linear-gradient(to bottom,var(--bar-color),color-mix(in srgb,var(--bar-color) 70%,#000)); }.compare-return-bar-value { direction:ltr; color:var(--text); text-align:center; font-family:"Samim",Tahoma,sans-serif; font-weight:800; }
.compare-return-bars { min-width:0; }.compare-return-bars-body { width:100%; min-width:0; }.compare-return-bar-row { flex:1 0 78px; }
.compare-legend { display:flex; flex-wrap:wrap; gap:10px; padding:12px; }
.compare-legend-item { display:inline-flex; align-items:center; gap:7px; min-height:31px; padding:5px 9px; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:var(--surface-raised); font-size:.7rem; }.compare-legend-item i { width:8px; height:8px; flex:0 0 8px; border-radius:3px; }.compare-legend-item strong { color:var(--text); font-family:"Samim",Tahoma,sans-serif; font-size:.68rem; }
.compare-tooltip rect { fill:var(--surface-raised); stroke:var(--line-strong); filter:drop-shadow(0 5px 10px rgba(0,0,0,.16)); }.compare-tooltip text { fill:var(--text); font-family:"Vazir",Tahoma,sans-serif; }.compare-end-label { pointer-events:none; }.compare-end-label-card { display:flex; width:100%; height:100%; align-items:center; justify-content:space-between; gap:5px; overflow:hidden; color:var(--text); direction:rtl; font-family:"Vazir",Tahoma,sans-serif; font-size:clamp(7px,.82vw,10px); line-height:1; }.compare-end-label-card span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.compare-end-label-card strong { flex:0 0 auto; direction:ltr; unicode-bidi:isolate; font-family:"Samim",Tahoma,sans-serif; font-size:1em; }
.relative-panel { margin-top:16px; border-color:color-mix(in srgb,#8b5cf6 48%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#8b5cf6 10%,var(--surface)),var(--surface) 42%); box-shadow:inset 0 3px 0 color-mix(in srgb,#8b5cf6 72%,transparent),var(--shadow); }.relative-panel h2 { color:color-mix(in srgb,#a78bfa 82%,var(--text)); }.relative-controls { display:grid; grid-template-columns:minmax(190px,1fr) minmax(220px,1.15fr) minmax(190px,1fr) auto; gap:12px; align-items:start; margin:16px 0; }.relative-controls label { display:grid; grid-template-rows:auto 40px 18px; gap:6px; color:var(--muted); font-size:.74rem; }.relative-controls select,.relative-controls input { width:100%; height:40px; padding:7px 10px; border:1px solid color-mix(in srgb,#8b5cf6 42%,var(--line-strong)); border-radius:8px; color:var(--text); background:var(--surface-raised); }.relative-controls .refresh-button { margin-top:24px; }.relative-field-caption,.relative-selected { overflow:hidden; color:var(--accent); font-size:.7rem; line-height:18px; text-overflow:ellipsis; white-space:nowrap; }.relative-picker { position:relative; }.relative-results { position:absolute; z-index:8; top:70px; right:0; left:0; max-height:260px; overflow:auto; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface-raised); box-shadow:var(--shadow); }.relative-results button { display:block; width:100%; padding:9px 11px; border:0; border-bottom:1px solid var(--line); color:var(--text); background:transparent; text-align:right; }.relative-results button:hover { background:var(--row-hover); }
.relative-range-picker { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin:-2px 0 15px; }.relative-range-picker>span { margin-left:3px; color:var(--muted); font-size:.72rem; }.relative-range-picker button { min-height:32px; padding:5px 11px; border:1px solid color-mix(in srgb,#8b5cf6 34%,var(--line-strong)); border-radius:999px; color:var(--muted); background:color-mix(in srgb,#8b5cf6 5%,var(--surface-soft)); font-size:.72rem; transition:border-color .16s ease,color .16s ease,background .16s ease; }.relative-range-picker button:hover { color:var(--text); border-color:color-mix(in srgb,#8b5cf6 70%,var(--line-strong)); }.relative-range-picker button.active { color:var(--text); border-color:#8b5cf6; background:color-mix(in srgb,#8b5cf6 18%,var(--surface-raised)); box-shadow:0 0 0 1px color-mix(in srgb,#8b5cf6 18%,transparent); font-weight:800; }
.compare-dialog { width:min(650px,calc(100% - 24px)); max-height:calc(100% - 24px); padding:16px; border:1px solid var(--line); border-radius:var(--radius-lg); color:var(--text); background:var(--surface-raised); box-shadow:var(--shadow); }
.compare-dialog::backdrop { background:var(--overlay); }.compare-search { width:100%; margin:14px 0 10px; }
.compare-catalog { display:grid; max-height:min(50vh,440px); overflow:auto; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }
.compare-catalog-item { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:54px; padding:8px 11px; border:0; border-bottom:1px solid var(--line); color:var(--text); background:transparent; text-align:right; }
.compare-catalog-item:hover { background:var(--row-hover); }.compare-catalog-item:disabled { cursor:default; color:var(--muted); opacity:.7; }
.content-feeds { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:18px; }.content-feed { min-width:0; padding:12px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }.content-feed>header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }.content-feed h2 { margin:0; font-size:.86rem; }.content-feed header a { color:var(--accent); font-size:.67rem; text-decoration:none; }.content-feed header a:hover { text-decoration:underline; }.content-feed-items { display:grid; }.content-feed-items a,.content-feed-items p { display:block; overflow:hidden; padding:7px 1px; border-top:1px solid var(--line); color:var(--text); font-size:.72rem; line-height:1.6; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; }.content-feed-items p { color:var(--muted); }.content-feed-items a:hover { color:var(--accent); }
.compare-catalog-item span { display:grid; gap:2px; min-width:0; }.compare-catalog-item strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.78rem; }.compare-catalog-item small { color:var(--muted); font-size:.68rem; }.compare-catalog-item em { flex:0 0 auto; color:var(--accent); font-size:.72rem; font-style:normal; }
.hidden { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:absolute; top:-50px; right:16px; z-index:30; padding:8px; color:#001; background:#fff; } .skip-link:focus { top:10px; }

@media(max-width:900px) {
  .app-shell { grid-template-columns:1fr; gap:10px; padding:10px; }
  .sidebar { position:sticky; top:0; z-index:8; display:flex; min-height:0; padding:6px; border-radius:12px; flex-direction:row; align-items:center; gap:6px; }
  .content-shortcuts { flex:0 0 auto; margin:0; padding:0 0 0 6px; border:0; border-left:1px solid var(--line); }.content-shortcuts a { min-width:44px; }
  .main-nav { display:flex; min-width:0; flex:1 1 auto; gap:5px; overflow-x:auto; padding:2px; scroll-snap-type:x proximity; scrollbar-width:thin; }
  .nav-tab { width:auto; min-width:max-content; flex:0 0 auto; justify-content:center; min-height:36px; padding:6px 10px; scroll-snap-align:start; white-space:nowrap; font-size:.75rem; } .nav-tab.active { box-shadow:inset 0 -3px 0 var(--accent); }
  .sidebar-settings { position:relative; flex:0 0 auto; margin:0; padding:0 5px 0 0; }
  .theme-options { width:150px; }
  .market-grid { grid-template-columns:1fr; }
  .certificate-dashboard { grid-template-columns:1fr; }
  .market-chart-stack { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }.market-charts-header,.market-chart-stack>.chart-range-mask,.market-chart-stack-return-only .market-chart-card-coin { grid-column:1/-1; }
  .car-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .codal-chart { grid-template-columns:1fr; }.codal-energy-block { grid-column:auto; }
}
@media(max-width:650px) {
  .app-shell { gap:8px; padding:8px; }
  .topbar,.bourse-header { align-items:stretch; flex-direction:column; } .topbar { min-height:0; padding:4px 2px 10px; }
  .topbar-actions { width:100%; } .refresh-button { flex:1; }
  .panel { padding:12px; border-radius:13px; } .panel-head,.bourse-tools { align-items:stretch; flex-direction:column; }
  .search-box { width:100%; } .bourse-panel { padding:10px; } .category-tabs { margin:0 -1px; }
  th,td { height:40px; padding:7px 9px; }
  .compare-header { align-items:stretch; }.compare-intro,.compare-actions { align-items:stretch; flex-direction:column; }.compare-selection-row { grid-template-columns:1fr; }.compare-add { width:100%; }.compare-actions .refresh-button { width:100%; }.compare-toolbar { align-items:stretch; flex-direction:column; }.compare-chart { overflow:auto; }.compare-selection { min-height:42px; }
  .relative-controls { grid-template-columns:1fr; }
  .market-chart-stack { grid-template-columns:1fr; gap:12px; }
  .car-chart-grid { grid-template-columns:1fr; }
  .content-feeds { grid-template-columns:1fr; }
  .certificate-panel { overflow:hidden; }.certificate-panel table { min-width:540px; }
}
@media(max-width:480px) { .sidebar { align-items:stretch; flex-wrap:wrap; }.main-nav { order:3; flex-basis:100%; }.content-shortcuts { border-left:0; }.sidebar-settings { margin-right:auto; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; }.gradient-area-chart .chart-series-line { stroke-dashoffset:0; } }
.chart-export-actions { display:flex; align-items:center; justify-content:center; gap:7px; padding:7px 4px 1px; direction:rtl; }
.chart-export-button { display:inline-flex; align-items:center; gap:5px; min-height:30px; padding:4px 9px; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:var(--surface-raised); font:inherit; font-size:.63rem; cursor:pointer; transition:color .18s,border-color .18s,transform .18s; }
.chart-export-button:hover,.chart-export-button:focus-visible { color:var(--accent); border-color:var(--accent); transform:translateY(-1px); }
.chart-export-button svg { width:15px!important; height:15px!important; min-width:15px!important; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; animation:none!important; }
.chart-export-button.chart-export-done { color:#16a085; border-color:#16a085; }
.chart-export-button:disabled { cursor:wait; opacity:.62; transform:none; }
.housing-chart-card { margin-bottom:10px; }.housing-chart-card .gradient-area-chart { min-height:220px; }
.housing-chart-card .car-chart-head { align-items:flex-start; }.housing-chart-card .car-range-picker { margin:0; }.housing-ads-card { margin:0 0 10px; }.housing-ads-chart { position:relative; min-height:150px; }.housing-ads-chart svg { display:block; width:100%; height:auto; }.housing-ads-chart text { fill:var(--muted); font-size:12px; font-family:inherit; }
.housing-legend-card { display:flex; flex-wrap:wrap; gap:9px; margin:0 0 16px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 5%,transparent); }
.housing-legend-card .housing-legend { padding:5px 8px; border:1px solid var(--line-strong); border-radius:999px; color:var(--text); background:var(--surface-raised); font-size:.8rem; font-weight:800; }
.housing-region-search { display:grid; max-width:360px; gap:5px; margin:0 0 14px; color:var(--muted); font-size:.72rem; }
.housing-region-search input { width:100%; min-height:38px; padding:7px 11px; border:1px solid var(--line-strong); border-radius:9px; color:var(--text); background:var(--surface-soft); }
.housing-table-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.housing-region-summary { grid-column:1/-1; }
.housing-table-grid h2 { margin:0 0 8px; font-size:.82rem; }
.housing-legend::before { content:""; display:inline-block; width:17px; height:3px; margin-left:6px; border-radius:99px; vertical-align:middle; background:#efb644; }
.housing-legend-usd::before { background:#4b9cff; }
@media(max-width:760px) { .housing-table-grid { grid-template-columns:1fr; } }
@media(max-width:1050px) { .codal-layout { grid-template-columns:1fr; }.codal-history-panel { order:-1; } }
@media(max-width:700px) { .codal-header { align-items:stretch; flex-direction:column; }.codal-header .refresh-button { width:100%; }.codal-chart-heading { align-items:stretch; flex-direction:column; }.codal-range-tabs { width:100%; }.codal-range-tabs button { flex:1; }.codal-product-grid,.codal-comparison-controls { grid-template-columns:1fr; }.codal-comparison-panel>header { align-items:flex-start; flex-direction:column; }.codal-metric-card-expanded svg { min-height:220px; } }

/* ابزار تحلیل قبض از داده‌های روزانه جدا نگه داشته شده تا هر ورودی قابل ممیزی باشد. */
.electricity-header { align-items:flex-end; }
.electricity-intro { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:14px; padding:12px 14px; border:1px solid color-mix(in srgb,#efb644 38%,var(--line)); border-radius:var(--radius-md); color:var(--muted); background:linear-gradient(125deg,color-mix(in srgb,#efb644 10%,var(--surface)),var(--surface)); font-size:.77rem; line-height:1.8; }
.electricity-intro strong { color:var(--text); font-size:.8rem; }
.electricity-layout { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(238px,.7fr); gap:14px; align-items:start; }
.electricity-form-panel { margin-top:0; background:linear-gradient(145deg,color-mix(in srgb,#4f8cff 4%,var(--surface)),var(--surface)); }
.electricity-form { display:grid; gap:16px; }
.electricity-fieldset { min-width:0; margin:0; padding:13px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }
.electricity-period-card { border-color:color-mix(in srgb,#4f8cff 32%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#4f8cff 12%,var(--surface-soft)),var(--surface-soft)); }
.electricity-consumption-card { border-color:color-mix(in srgb,#8b5cf6 32%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#8b5cf6 12%,var(--surface-soft)),var(--surface-soft)); }
.electricity-bill-rates-card { border-color:color-mix(in srgb,#efb644 34%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#efb644 13%,var(--surface-soft)),var(--surface-soft)); }
.electricity-alternative-card { border-color:color-mix(in srgb,#32c2bd 34%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#32c2bd 12%,var(--surface-soft)),var(--surface-soft)); }
.electricity-purchase-card { border-color:color-mix(in srgb,#ef6f91 30%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#ef6f91 11%,var(--surface-soft)),var(--surface-soft)); }
.electricity-fieldset legend { padding:0 5px; color:var(--text); font-size:.8rem; font-weight:800; }
.electricity-field-help { margin:0 0 10px; color:var(--muted); font-size:.7rem; line-height:1.75; }
.electricity-input-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; }
.electricity-input-grid label { display:grid; gap:5px; min-width:0; color:var(--muted); font-size:.7rem; line-height:1.3; }
.electricity-input-grid input,.electricity-input-grid select { width:100%; min-width:0; height:38px; padding:7px 9px; border:1px solid var(--line-strong); border-radius:8px; direction:ltr; color:var(--text); background:var(--surface-raised); text-align:right; font-family:"Samim",Tahoma,sans-serif; font-size:.83rem; font-weight:700; }
.electricity-input-grid select { direction:rtl; font-family:"Vazir",Tahoma,sans-serif; font-size:.72rem; font-weight:400; }
.electricity-input-grid input:hover,.electricity-input-grid select:hover { border-color:color-mix(in srgb,#efb644 55%,var(--line-strong)); }
.electricity-input-grid input:focus,.electricity-input-grid select:focus { outline:2px solid color-mix(in srgb,#efb644 55%,transparent); outline-offset:1px; border-color:#efb644; }
.electricity-input-grid input::placeholder { color:var(--muted); font-family:"Vazir",Tahoma,sans-serif; font-size:.66rem; font-weight:400; }
.electricity-rates { border-color:color-mix(in srgb,#32c2bd 34%,var(--line)); }
.electricity-purchase-grid { grid-template-columns:minmax(190px,.65fr) minmax(0,1.35fr); align-items:end; }
.electricity-purchase-grid .electricity-field-help { margin:0; padding:9px 11px; border-right:2px solid var(--accent); background:color-mix(in srgb,var(--accent) 7%,transparent); }
.electricity-summary-stack { display:grid; gap:14px; }
.electricity-summary-stack .panel { margin-top:0; }
.electricity-summary-card { display:grid; gap:4px; padding:14px; border-color:color-mix(in srgb,#efb644 30%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#efb644 8%,var(--surface)),var(--surface)); }
.electricity-summary-card:nth-child(2) { border-color:color-mix(in srgb,#32c2bd 30%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#32c2bd 8%,var(--surface)),var(--surface)); }
.electricity-summary-card:nth-child(3) { border-color:color-mix(in srgb,#8b5cf6 32%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#8b5cf6 8%,var(--surface)),var(--surface)); }
.electricity-summary-card .eyebrow { margin:0; }
.electricity-summary-card>strong { direction:ltr; color:var(--text); font-family:"Samim",Tahoma,sans-serif; font-size:1.15rem; text-align:right; }
.electricity-summary-card>span { color:var(--muted); font-size:.68rem; }
.electricity-summary-card dl { display:grid; gap:0; margin:9px 0 0; border-top:1px solid var(--line); }
.electricity-summary-card dl>div { display:flex; align-items:baseline; justify-content:space-between; gap:9px; min-height:28px; border-bottom:1px solid var(--line); }
.electricity-summary-card dt { color:var(--muted); font-size:.67rem; }
.electricity-summary-card dd { margin:0; direction:ltr; color:var(--text); font-family:"Samim",Tahoma,sans-serif; font-size:.68rem; font-weight:700; text-align:left; }
.electricity-audit-note { margin:8px 0 0; padding:7px 8px; border-radius:7px; color:var(--muted); background:color-mix(in srgb,var(--surface-soft) 78%,transparent); font-size:.67rem; line-height:1.65; }
.electricity-audit-note.warning { color:var(--warning); background:color-mix(in srgb,var(--warning) 10%,transparent); }
.electricity-results-panel { margin-top:14px; border-color:color-mix(in srgb,#32c2bd 25%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#32c2bd 4%,var(--surface)),var(--surface)); }
.electricity-validation { margin:0 0 10px; padding:9px 11px; border-right:3px solid var(--accent); border-radius:7px; color:var(--muted); background:color-mix(in srgb,var(--accent) 6%,transparent); font-size:.73rem; line-height:1.7; }
.electricity-validation.warning { border-color:var(--warning); color:var(--warning); background:color-mix(in srgb,var(--warning) 9%,transparent); }
.electricity-results-wrap { max-height:none; }
.electricity-results-table { min-width:1090px; }
.electricity-results-table thead th { min-width:128px; padding:11px 10px; vertical-align:middle; text-align:center; white-space:nowrap; line-height:1.4; }
.electricity-results-table thead th:first-child { min-width:220px; text-align:right; }
.electricity-results-table tbody td:not(:first-child) { text-align:center; }
.electricity-results-table td { font-size:.73rem; }
.electricity-results-table td:not(:first-child) { direction:ltr; text-align:left; }
.electricity-results-table .electricity-tool-name { direction:rtl; font-family:"Vazir",Tahoma,sans-serif; font-size:.76rem; font-weight:800; text-align:right; }
.electricity-results-table small { display:block; margin-top:2px; direction:rtl; color:var(--muted); font-family:"Vazir",Tahoma,sans-serif; font-size:.61rem; font-weight:400; text-align:right; white-space:normal; }
.electricity-results-table .saving { color:var(--green); }.electricity-results-table .extra-cost { color:var(--red); }.electricity-results-table .pending { color:var(--muted); }
.electricity-result-footnote { margin:10px 1px 0; color:var(--muted); font-size:.69rem; line-height:1.75; }
@media(max-width:1050px) { .electricity-layout { grid-template-columns:1fr; }.electricity-summary-stack { grid-template-columns:repeat(3,minmax(0,1fr)); }.electricity-input-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .electricity-header { align-items:stretch; flex-direction:column; }.electricity-header .refresh-button { width:100%; }.electricity-intro { display:grid; gap:3px; }.electricity-input-grid,.electricity-summary-stack { grid-template-columns:1fr; }.electricity-purchase-grid { grid-template-columns:1fr; }.electricity-form-panel,.electricity-results-panel { padding:11px; }.electricity-fieldset { padding:11px; } }

/* ابزارهای اقتصادی و مالی */
.liquidity-tool-panel { margin-top:0; background:linear-gradient(145deg,color-mix(in srgb,#8b5cf6 7%,var(--surface)),var(--surface) 45%); }
.liquidity-tool-heading p:last-child { max-width:760px; margin:5px 0 0; color:var(--muted); font-size:.75rem; line-height:1.8; }
.liquidity-controls { display:grid; grid-template-columns:minmax(190px,1fr) minmax(230px,1.2fr) auto; gap:12px; align-items:end; margin:16px 0; padding:13px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }
.liquidity-controls label { display:grid; gap:6px; color:var(--muted); font-size:.72rem; }
.liquidity-controls input,.liquidity-controls select { width:100%; height:40px; padding:7px 10px; border:1px solid var(--line-strong); border-radius:8px; color:var(--text); background:var(--surface-raised); }
.liquidity-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; }
.liquidity-result-card { display:grid; gap:5px; min-width:0; padding:14px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }
.liquidity-result-card span,.liquidity-result-card small { color:var(--muted); font-size:.67rem; }
.liquidity-result-card strong { overflow:hidden; direction:ltr; color:var(--text); font-family:"Samim",Tahoma,sans-serif; font-size:1.28rem; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.liquidity-result-primary { border-color:color-mix(in srgb,#8b5cf6 60%,var(--line)); background:color-mix(in srgb,#8b5cf6 11%,var(--surface-soft)); box-shadow:inset 0 3px 0 #8b5cf6; }
.liquidity-result-primary strong { color:color-mix(in srgb,#b9a1ff 88%,var(--text)); font-size:1.55rem; }
.liquidity-status { margin:11px 0 0; padding:9px 11px; border:1px solid color-mix(in srgb,var(--warning) 42%,var(--line)); border-radius:8px; color:var(--muted); background:color-mix(in srgb,var(--warning) 6%,var(--surface-soft)); font-size:.7rem; line-height:1.8; }
.liquidity-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:13px; }
.liquidity-chart-card { min-width:0; padding:12px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }
.liquidity-chart-card header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.liquidity-chart-card h3 { margin:0; font-size:.8rem; }.liquidity-chart-card header span { color:var(--muted); font-size:.62rem; }
.liquidity-chart { position:relative; min-height:220px; overflow:hidden; direction:ltr; }
.liquidity-chart svg { display:block; width:100%; height:auto; color:var(--muted); }.liquidity-chart text { fill:var(--muted); font-family:"Samim",Tahoma,sans-serif; font-size:10px; }
.liquidity-chart-empty { display:grid; min-height:210px; place-items:center; direction:rtl; color:var(--muted); font-size:.72rem; }
.liquidity-method { margin-top:13px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:var(--surface-soft); font-size:.69rem; line-height:1.9; }
.liquidity-method summary { cursor:pointer; color:var(--text); font-weight:700; }.liquidity-method a { color:var(--accent); }
@media(max-width:1000px) { .liquidity-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .liquidity-controls,.liquidity-summary-grid,.liquidity-chart-grid { grid-template-columns:1fr; }.liquidity-controls .refresh-button { width:100%; }.liquidity-chart { min-height:190px; } }

/* غربالگری تأمین مالی */
.financing-tool-panel { border-color:color-mix(in srgb,#efb644 40%,var(--line)); background:linear-gradient(145deg,color-mix(in srgb,#efb644 6%,var(--surface)),var(--surface) 48%); }
.financing-tool-heading { align-items:flex-start; }.financing-tool-heading p:last-child { max-width:760px; margin:5px 0 0; color:var(--muted); font-size:.74rem; line-height:1.8; }
.financing-head-actions { display:flex; gap:7px; }
.financing-form>details { margin-top:10px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }
.financing-form>details>summary { cursor:pointer; padding:12px 14px; color:var(--text); font-size:.78rem; font-weight:800; }
.financing-form>details[open]>summary { border-bottom:1px solid var(--line); }
.financing-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; padding:13px; }
.financing-fields label { display:grid; align-content:start; gap:5px; min-width:0; color:var(--muted); font-size:.68rem; }
.financing-fields input,.financing-fields select,.financing-fields textarea { width:100%; min-width:0; min-height:39px; padding:7px 9px; border:1px solid var(--line-strong); border-radius:7px; color:var(--text); background:var(--surface-raised); font:inherit; }
.financing-fields input { direction:ltr; text-align:right; font-family:"Samim",Tahoma,sans-serif; }.financing-fields textarea { min-height:72px; resize:vertical; }.financing-wide { grid-column:1/-1; }
.financing-policy>p { margin:10px 13px 0; color:var(--warning); font-size:.68rem; }
.financing-validation { min-height:20px; margin:8px 0; color:var(--red); font-size:.72rem; }
.financing-submit { display:flex; align-items:center; gap:12px; margin-top:14px; }.financing-submit span { color:var(--muted); font-size:.66rem; }
.financing-overview { margin-top:16px; }.financing-decision { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }.financing-decision>span,.financing-route-card header span { padding:4px 8px; border-radius:999px; font-size:.64rem; font-weight:800; }.financing-decision>small { color:var(--muted); }
.status-eligible>span,.status-eligible header span { color:var(--green); background:color-mix(in srgb,var(--green) 13%,transparent); }.status-conditional>span,.status-conditional header span,.status-needs_configuration>span,.status-needs_configuration header span { color:var(--warning); background:color-mix(in srgb,var(--warning) 13%,transparent); }.status-ineligible>span,.status-ineligible header span { color:var(--red); background:color-mix(in srgb,var(--red) 12%,transparent); }
.financing-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:11px; }.financing-metrics article { display:grid; gap:4px; padding:11px; border:1px solid var(--line); border-radius:8px; background:var(--surface-soft); }.financing-metrics span,.financing-metrics small { color:var(--muted); font-size:.63rem; }.financing-metrics strong { direction:ltr; font-family:"Samim",Tahoma,sans-serif; font-size:1.15rem; text-align:right; }
.financing-route-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; margin-top:11px; }.financing-route-card { min-width:0; padding:12px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface-soft); }.financing-route-card header { display:flex; justify-content:space-between; gap:8px; align-items:center; }.financing-route-card h3 { margin:0; font-size:.8rem; }.financing-route-card>strong { display:block; margin:10px 0; direction:ltr; font-family:"Samim",Tahoma,sans-serif; text-align:right; }.financing-route-card ul { margin:8px 0; padding-right:18px; color:var(--muted); font-size:.67rem; line-height:1.8; }.financing-route-card details { font-size:.65rem; }.financing-route-card.status-eligible { border-color:color-mix(in srgb,var(--green) 42%,var(--line)); }.financing-route-card.status-conditional,.financing-route-card.status-needs_configuration { border-color:color-mix(in srgb,var(--warning) 42%,var(--line)); }.financing-route-card.status-ineligible { border-color:color-mix(in srgb,var(--red) 38%,var(--line)); }
.financing-schedule { margin-top:12px; }.financing-schedule>summary { cursor:pointer; margin-bottom:8px; font-size:.72rem; font-weight:800; }.financing-schedule table { min-width:580px; }
@media(max-width:1000px) { .financing-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }.financing-route-grid { grid-template-columns:1fr; } }
@media(max-width:700px) { .financing-tool-heading,.financing-submit,.financing-decision { align-items:stretch; grid-template-columns:1fr; flex-direction:column; }.financing-head-actions { width:100%; }.financing-head-actions button { flex:1; }.financing-fields,.financing-metrics { grid-template-columns:1fr; }.financing-wide { grid-column:auto; }.financing-submit .refresh-button { width:100%; } }
