/* «Портфель» (deploy106b, 11.10.2026). Те же токены, что у «Обзора», «Опционов» и «Арбитража». */
.pfl-page { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); }
.pfl-wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 12px 14px 40px; display: grid; gap: 10px; }
.pfl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pfl-title { font-size: 20px; font-weight: 700; margin: 0; }
.pfl-sp { flex: 1; }
.pfl-lead { margin: -2px 0 0; color: var(--text-muted); font-size: 12.5px; }
.pfl-muted { color: var(--text-muted); font-size: 12px; }
.pfl-warn { color: #d29922; font-size: 12px; }
.pfl-up { color: var(--green, #26a69a); }
.pfl-dn { color: var(--red, #ef5350); }
.pfl-num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.pfl-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pfl-seg-b { border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; padding: 6px 12px; cursor: pointer; min-height: 32px; }
.pfl-seg-b + .pfl-seg-b { border-left: 1px solid var(--border); }
.pfl-seg-b.is-on { background: var(--primary, #3b82f6); color: #fff; }
.pfl-btn { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 8px; padding: 6px 12px;
    font: inherit; font-size: 13px; cursor: pointer; min-height: 32px; }
.pfl-btn:hover { background: var(--surface-3); }
.pfl-btn:disabled { opacity: .6; cursor: default; }
.pfl-btn-main { background: var(--primary, #3b82f6); border-color: var(--primary, #3b82f6); color: #fff; font-weight: 600; }
.pfl-btn-main:hover { background: var(--primary-hover, #2563eb); }
.pfl-btn-s { min-height: 26px; padding: 2px 9px; font-size: 12px; }
.pfl-btn-x { color: var(--text-muted); }
.pfl-link { border: 0; background: none; padding: 0; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.pfl-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; min-width: 0; display: grid; gap: 8px; align-content: start; }
.pfl-h { font-size: 15px; font-weight: 700; margin: 0; }
.pfl-h3 { font-size: 14px; font-weight: 700; margin: 8px 0 0; }
.pfl-foot { margin: 0; }
.pfl-err { color: var(--red, #ef5350); background: rgba(239, 83, 80, .08); border: 1px solid rgba(239, 83, 80, .35); border-radius: 8px; padding: 8px 11px; font-size: 13px; }
.pfl-ok { color: var(--green, #26a69a); background: rgba(38, 166, 154, .08); border: 1px solid rgba(38, 166, 154, .35); border-radius: 8px; padding: 8px 11px; font-size: 13px; }
.pfl-empty { color: var(--text-muted); }
.pfl-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pfl-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.pfl-tile > span:first-child { color: var(--text-muted); font-size: 12px; }
.pfl-tile b { font-size: 18px; font-variant-numeric: tabular-nums; }
.pfl-scroll { overflow-x: auto; }
.pfl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pfl-table th, .pfl-table td { padding: 7px 9px; border-top: 1px solid var(--border); text-align: right; }
.pfl-table th { color: var(--text-muted); font-weight: 500; font-size: 12px; border-top: 0; white-space: nowrap; }
.pfl-table th:first-child, .pfl-table td:first-child { text-align: left; }
.pfl-g.is-open td { background: var(--surface-2); }
.pfl-g-pos > td { padding: 4px 9px 8px 24px; background: var(--surface-2); }
.pfl-pos { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px dashed var(--border); font-size: 13px; }
.pfl-pos:first-child { border-top: 0; }
.pfl-pos-n { min-width: 0; overflow-wrap: anywhere; }
.pfl-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.pfl-tag-opt { border-color: #6366f1; color: #a5b4fc; }
.pfl-tag-arb { border-color: #0ea5e9; color: #7dd3fc; }
.pfl-tag-own { border-color: #a3a3a3; color: var(--text); }
:root[data-theme="light"] .pfl-tag-opt { color: #4f46e5; }
:root[data-theme="light"] .pfl-tag-arb { color: #0369a1; }
.pfl-closed > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; list-style: none; }
.pfl-closed > summary::before { content: '▸ '; color: var(--text-muted); }
.pfl-closed[open] > summary::before { content: '▾ '; }
.pfl-closed[open] > summary { margin-bottom: 6px; }
.pfl-closed-own { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.pfl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pfl-chip { border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; min-height: 30px; }
.pfl-chip.is-on { background: var(--primary, #3b82f6); border-color: var(--primary, #3b82f6); color: #fff; }
.pfl-chip.is-on .pfl-muted { color: rgba(255, 255, 255, .8); }
.pfl-chip-s { font-size: 12px; padding: 3px 10px; }
.pfl-heat td { min-width: 64px; }
.pfl-heat th:first-child { white-space: nowrap; }
.pfl-c0 { color: var(--text) !important; }
.pfl-c00 { outline: 2px solid var(--text-muted); outline-offset: -2px; font-weight: 700; }
.pfl-stress td:first-child { min-width: 260px; }
.pfl-own-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 10px; }
.pfl-search { width: 100%; }
.pfl-res { display: grid; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pfl-res > p { margin: 0; padding: 9px 11px; }
.pfl-rg { padding: 6px 11px; font-size: 12px; font-weight: 600; background: var(--surface-2); }
.pfl-ri { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 11px; border: 0; border-top: 1px solid var(--border);
    background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.pfl-ri:hover { background: var(--surface-2); }
.pfl-ri.is-sel { background: rgba(59, 130, 246, .16); box-shadow: inset 3px 0 0 var(--primary, #3b82f6); }
.pfl-inst { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 9px 11px; background: var(--surface-2); border-radius: 8px; }
.pfl-inst b { font-size: 15px; }
.pfl-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pfl-f { display: grid; gap: 4px; min-width: 0; }
.pfl-f label { font-size: 12px; color: var(--text-muted); }
.pfl-wide { grid-column: 1 / -1; }
.pfl-in { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; color: var(--text); font: inherit; font-size: 14px; min-height: 36px; width: 100%; min-width: 0; }
.pfl-in:focus { outline: 2px solid var(--primary, #3b82f6); outline-offset: -1px; }
.pfl-in-s { width: 88px; min-height: 28px; padding: 3px 7px; font-size: 13px; }
.pfl-side { display: flex; gap: 6px; }
.pfl-sb { flex: 1; border: 1px solid var(--border); background: transparent; color: var(--text-muted); border-radius: 8px; min-height: 36px; font: inherit; font-size: 13px; cursor: pointer; }
.pfl-buy.is-on { border-color: var(--green, #26a69a); color: var(--green, #26a69a); background: rgba(38, 166, 154, .1); }
.pfl-sell.is-on { border-color: var(--red, #ef5350); color: var(--red, #ef5350); background: rgba(239, 83, 80, .1); }
.pfl-cp.is-on { border-color: var(--primary, #3b82f6); color: var(--text); background: rgba(59, 130, 246, .14); }
.pfl-cmp { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pfl-cmp .pfl-table th { background: var(--surface-2); padding-top: 7px; }
.pfl-ar { color: var(--text-muted); text-align: center !important; width: 24px; }
.pfl-wi-wait { padding: 4px 0; }
.pfl-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pfl-note { padding: 8px 11px; border-radius: 8px; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3); color: #d29922; font-size: 12.5px; }
.pfl-note-j { background: rgba(99, 102, 241, .1); border-color: rgba(99, 102, 241, .4); color: var(--text); }
.pfl-close { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pfl-mob { display: none; }
.pfl-gc, .pfl-oc { border-top: 1px solid var(--border); padding: 9px 0; display: grid; gap: 3px; font-size: 13px; }
.pfl-gc:first-child, .pfl-oc:first-child { border-top: 0; }
.pfl-gc-h, .pfl-gc-m, .pfl-gc-a, .pfl-oc-r { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pfl-gc-m { color: var(--text-muted); font-size: 12.5px; }
.pfl-gc-pos .pfl-pos { grid-template-columns: auto minmax(0, 1fr) auto; }
.pfl-gc-pos .pfl-pos > :nth-child(4) { display: none; }
.pfl-gc-pos .pfl-pos > :nth-child(5) { grid-column: 2 / -1; justify-self: start; }
@media (max-width: 1100px) {
    .pfl-own-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .pfl-wrap { padding: 10px 10px 90px; }
    .pfl-tiles { grid-template-columns: 1fr 1fr; }
    .pfl-tile b { font-size: 16px; }
    .pfl-desk { display: none; }
    .pfl-mob { display: block; }
    .pfl-form { grid-template-columns: 1fr 1fr; }
    .pfl-cmp .pfl-table th, .pfl-cmp .pfl-table td { padding: 6px 7px; font-size: 12.5px; }
    .pfl-pos { grid-template-columns: auto minmax(0, 1fr) auto; }
    .pfl-pos > :nth-child(4) { display: none; }
    .pfl-pos > :nth-child(5) { grid-column: 2 / -1; justify-self: start; }
    .pfl-heat td { min-width: 52px; padding: 6px 5px; font-size: 12px; }
    .pfl-stress td:first-child { min-width: 180px; }
    .pfl-head .pfl-muted { display: none; }
}

/* 109 (11.10.2026): доля ГО актива полоской в ячейке */
.pfl-gobar { display: block; height: 4px; margin-top: 4px; margin-left: auto; width: 100%; max-width: 120px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pfl-gobar i { display: block; height: 100%; border-radius: 999px; background: #f59e0b; }
.pfl-gc-m .pfl-gobar { display: inline-block; width: 60px; margin: 0 0 0 6px; vertical-align: middle; }

/* 110 (11.10.2026): «Картина портфеля» в сводке и «Риск» как в OptionStrat */
.pfl-viz-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pfl-viz { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 7px; align-content: start; min-width: 0; }
.pfl-viz-h { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.pfl-viz-f { font-size: 11px; }
.pfl-bar-r { display: grid; grid-template-columns: minmax(64px, 30%) minmax(40px, 1fr) auto; gap: 8px; align-items: center; font-size: 12.5px; }
.pfl-bar-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfl-bar-t { position: relative; height: 10px; border-radius: 5px; background: rgba(127, 127, 127, .12); }
.pfl-bar-t::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--text-muted); opacity: .5; }
.pfl-bar-t i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.pfl-bar-t i.up { background: #26a69a; }
.pfl-bar-t i.dn { background: #ef5350; }
.pfl-bar-r b { font-size: 12.5px; min-width: 72px; text-align: right; }
.pfl-ring { display: flex; align-items: center; gap: 12px; }
.pfl-ring svg { width: 116px; height: 116px; flex: 0 0 auto; }
.pfl-ring-s { font-size: 9px; fill: var(--text-muted); }
.pfl-ring-v { font-size: 13px; font-weight: 700; fill: var(--text); }
.pfl-legs { display: grid; gap: 4px; min-width: 0; flex: 1; }
.pfl-leg { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 6px; align-items: center; font-size: 12.5px; }
.pfl-leg i { width: 10px; height: 10px; border-radius: 3px; }
.pfl-leg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfl-spark { display: inline-block; vertical-align: middle; }
.pfl-spark-z { stroke: var(--border); stroke-width: 1; }
.pfl-prof { white-space: nowrap; }

.pfl-rk-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.pfl-rk-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pfl-rk-t { border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; display: grid; gap: 2px; min-width: 0; }
.pfl-rk-t span { font-size: 11.5px; color: var(--text-muted); }
.pfl-rk-t b { font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pfl-rk-box { position: relative; }
.pfl-rk-chart { display: block; width: 100%; height: 320px; cursor: crosshair; touch-action: pan-y; }
.pfl-rk-tip { position: absolute; z-index: 3; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; font-size: 12px; line-height: 1.55; font-variant-numeric: tabular-nums; min-width: 160px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.pfl-rk-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 11.5px; color: var(--text-muted); }
.pfl-rk-l::before { content: ''; display: inline-block; width: 16px; height: 0; vertical-align: 3px; margin-right: 6px; border-top: 2px solid var(--text); }
.pfl-rk-l.sel::before { border-top: 3px solid #26a69a; }
.pfl-rk-l.now::before { border-top: 2px dashed #3b82f6; }
.pfl-rk-l.px::before { border-top: 2px dotted #f59e0b; }
.pfl-rk-sl { display: grid; grid-template-columns: 2fr 1.5fr 1fr 1.2fr; gap: 10px 16px; align-items: start; }
.pfl-rk-s { display: grid; gap: 4px; font-size: 12px; color: var(--text-muted); min-width: 0; }
.pfl-rk-s b { color: var(--text); font-weight: 600; }
.pfl-rk-s input { width: 100%; accent-color: #3b82f6; }
.pfl-rk-table th, .pfl-rk-table td { white-space: nowrap; text-align: right; padding: 5px 8px; font-size: 12px; }
.pfl-rk-table td { min-width: 58px; font-variant-numeric: tabular-nums; }
.pfl-rk-table .pfl-rk-c0 { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.pfl-rk-table tr.is-now th, .pfl-rk-table tr.is-now td { font-weight: 700; box-shadow: inset 0 1px 0 #f59e0b, inset 0 -1px 0 #f59e0b; }
.pfl-rk-table td.is-sel { box-shadow: inset 2px 0 0 #3b82f6, inset -2px 0 0 #3b82f6; }
.pfl-rk-table tr.is-now td.is-sel { box-shadow: inset 2px 0 0 #3b82f6, inset -2px 0 0 #3b82f6, inset 0 1px 0 #f59e0b, inset 0 -1px 0 #f59e0b; }
.pfl-rk-table th.is-sel { box-shadow: inset 2px 2px 0 #3b82f6, inset -2px 0 0 #3b82f6; }
.pfl-rk-table th.is-exp button { color: #f59e0b; }
.pfl-rk-tn { font-size: 11.5px; }
@media (max-width: 1100px) { .pfl-viz-g { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .pfl-viz-g { grid-template-columns: 1fr; }
  .pfl-rk-tiles { grid-template-columns: 1fr 1fr; }
  .pfl-rk-sl { grid-template-columns: 1fr; }
  .pfl-rk-table th, .pfl-rk-table td { padding: 5px 6px; font-size: 11.5px; }
  .pfl-rk-table td { min-width: 50px; }
}
.pfl-rk > *, .pfl-vizs > * { min-width: 0; }

/* 113c (12.10.2026): ссылка «Подробнее» в отказе «нет в подписке» */
.pfl-more { color: var(--accent, #14b8a6); font-weight: 600; white-space: nowrap; }

/* 113g (12.10.2026): «Из CSV» — файл, колонки, проверка */
.pfl-file { position: relative; overflow: hidden; cursor: pointer; }
.pfl-file input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.pfl-file:focus-within { outline: 2px solid var(--primary, #3b82f6); outline-offset: 2px; }
.pfl-check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: 13px; cursor: pointer; }
.pfl-check input { margin-top: 2px; }
.pfl-empty-acts { margin-top: 10px; justify-content: center; }
.pfl-csv-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.pfl-csv-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-muted, #94a3b8); }
.pfl-csv-f select { width: 100%; }
.pfl-csv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.pfl-csv-chip, .pfl-csv-st { display: inline-block; border: 1px solid var(--border, #334155); border-radius: 999px; padding: 2px 9px; font-size: 12px; white-space: nowrap; }
.pfl-csv-ok { border-color: rgba(38, 166, 154, .6); color: var(--green, #26a69a); }
.pfl-csv-dup, .pfl-csv-closed { border-color: rgba(148, 163, 184, .6); color: var(--text-muted, #94a3b8); }
.pfl-csv-bad, .pfl-csv-noopt { border-color: rgba(239, 83, 80, .55); color: var(--red, #ef5350); }
.pfl-csv-limit { border-color: rgba(245, 158, 11, .6); color: #f59e0b; }
.pfl-csv-raw { font-family: var(--mono, ui-monospace, monospace); font-size: 11px; overflow-wrap: anywhere; }
.pfl-csv-go { margin-top: 12px; }
.pfl-csv-go .pfl-btn[disabled] { opacity: .55; cursor: not-allowed; }
@media (max-width: 600px) {
    .pfl-csv-map { grid-template-columns: 1fr 1fr; }
    .pfl-csv-go .pfl-btn { width: 100%; }
}
.pfl-csv-table th, .pfl-csv-table td { text-align: left; vertical-align: top; }
.pfl-csv-table th:nth-child(4), .pfl-csv-table td:nth-child(4), .pfl-csv-table th:nth-child(5), .pfl-csv-table td:nth-child(5), .pfl-csv-table th:nth-child(7), .pfl-csv-table td:nth-child(7) { text-align: right; }
.pfl-csv-table td:last-child .pfl-muted { max-width: 300px; }

/* 114g (13.10.2026): несколько портфелей — выбор, меню, подтверждения, корзина, перенос записи */
.pfl-books { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.pfl-book-sel { width: auto; min-width: 180px; max-width: 320px; font-weight: 600; }
.pfl-bk-n { flex: 1; min-width: 160px; }
.pfl-bk-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pfl-btn.is-on { border-color: var(--primary, #3b82f6); color: var(--primary, #3b82f6); }
.pfl-bk-p { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; display: grid; gap: 8px; font-size: 13.5px; }
.pfl-bk-p p { margin: 0; }
.pfl-bk-p .pfl-f { max-width: 420px; }
.pfl-bk-warn { border-color: rgba(210, 153, 34, .55); background: rgba(210, 153, 34, .06); }
.pfl-btn-warn { background: #b42318; border-color: #b42318; }
.pfl-btn-warn:hover { background: #912018; }
.pfl-pos-a { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.pfl-move { width: auto; min-width: 128px; max-width: 180px; }
.pfl-csv-book { max-width: 320px; }
@media (max-width: 760px) {
    .pfl-books { padding: 8px 10px; }
    .pfl-book-sel { flex: 1; min-width: 0; max-width: none; }
    .pfl-bk-n { flex-basis: 100%; order: 3; }
    .pfl-bk-acts { flex-basis: 100%; order: 4; }
}

/* 114h (13.10.2026): «Риск» по образцу OptionStrat — сводка, единицы, IV ×, множитель контрактов */
.pfl-h3 { font-size: 13px; font-weight: 600; margin: 4px 0 6px; color: var(--text); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pfl-rk-sum { margin-bottom: 10px; }
.pfl-rk-tiles-s { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.pfl-rk-t small { font-size: 11px; line-height: 1.3; }
.pfl-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(245,158,11,.16); color: #f59e0b; }
.pfl-seg-s .pfl-seg-b { padding: 3px 8px; min-height: 26px; font-size: 12px; }
.pfl-seg-s { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; width: max-content; }
.pfl-seg-wrap { flex-wrap: wrap; }
.pfl-rk-ub { display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 12px; }
.pfl-rk-kr { display: flex; gap: 6px; align-items: center; }
.pfl-rk-kr .pfl-in-s { width: 72px; }
.pfl-rk-table tr.is-be th, .pfl-rk-table tr.is-be td { border-top: 1px dashed var(--text-muted); border-bottom: 1px dashed var(--text-muted); }
.pfl-rk-betag { font-size: 10.5px; color: var(--text-muted); border: 1px dashed var(--text-muted); border-radius: 6px; padding: 0 4px; }
@media (max-width: 760px) {
  .pfl-rk-sl { grid-template-columns: 1fr; }
  .pfl-rk-tiles-s { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pfl-rk-l.be::before { border-top: 2px dashed var(--text-muted); }

/* 124 (17.10.2026): лимиты риска портфеля на вкладке «Сводка» */
.pfl-lim-r { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1.2fr) 150px minmax(110px, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); }
.pfl-lim-n { font-size: 14px; }
.pfl-lim-v { font-size: 13px; font-variant-numeric: tabular-nums; }
.pfl-lim-i input { width: 100%; box-sizing: border-box; min-height: 32px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg, transparent); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.pfl-lim-i input:disabled { opacity: .55; }
.pfl-lim-s { font-size: 13px; }
.pfl-lim-st.is-over { color: #d29922; font-weight: 600; }
.pfl-lim-st.is-ok { color: var(--muted, #8b949e); }
.pfl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 700px) {
    .pfl-lim-r { grid-template-columns: 1fr 120px; }
    .pfl-lim-v, .pfl-lim-s { grid-column: 1 / -1; }
    .pfl-lim-v { order: 3; } .pfl-lim-s { order: 4; }
}

/* 126 (17.10.2026): «Риск-панель» — этап 14 плана 118 (Risk Cockpit) */
.pfl-kp-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; font-size: 13px; }
.pfl-kp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pfl-kp-cap { grid-column: span 2; }
.pfl-kp-cap label { color: var(--text-muted); font-size: 12px; }
.pfl-kp-capr { display: flex; gap: 6px; align-items: center; }
.pfl-kp-capr input { flex: 1 1 auto; min-width: 0; min-height: 32px; box-sizing: border-box; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg, transparent); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.pfl-kp-table td { vertical-align: top; }
.pfl-kp-table td:nth-child(2) { text-align: left; white-space: normal; min-width: 220px; }
.pfl-kp-table th:nth-child(2) { text-align: left; }
.pfl-kp-g { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.pfl-kp-t { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }
.pfl-kp-table tr.is-worst td { background: rgba(239, 83, 80, .07); }
.pfl-kp-wtag { font-size: 10.5px; font-weight: 600; color: #ef5350; border: 1px solid rgba(239, 83, 80, .5); border-radius: 6px; padding: 0 5px; margin-left: 4px; }
.pfl-kp-srcs summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; cursor: pointer; font-size: 14px; }
.pfl-kp-src { display: grid; grid-template-columns: auto minmax(140px, 1fr) minmax(0, 2fr); gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.pfl-kp-legs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pfl-kp-leg.is-stale { color: #d29922; }
@media (max-width: 760px) {
  .pfl-kp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pfl-kp-cap { grid-column: 1 / -1; }
  .pfl-kp-table td:nth-child(2) { min-width: 140px; }
  .pfl-kp-table th:nth-child(4), .pfl-kp-table td:nth-child(4) { display: none; }
  .pfl-kp-table th, .pfl-kp-table td { padding: 6px 5px; }
  .pfl-kp-g { display: none; }
  .pfl-kp-table th:first-child { display: none; }
  .pfl-kp-src { grid-template-columns: auto 1fr; }
  .pfl-kp-legs { grid-column: 1 / -1; }
}

/* 127 (18.10.2026): стресс по видам активов — вклад активов и «Свой стресс» */
.pfl-kp-by { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.pfl-kp-by b { font-weight: 600; white-space: nowrap; }
.pfl-kp-by > span { white-space: nowrap; }
.pfl-kp-mix { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.pfl-kp-mix-h { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 14px; }
.pfl-kp-mix-h .pfl-muted { font-size: 12px; }
.pfl-kp-mix-f { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pfl-kp-mi { display: grid; gap: 3px; font-size: 12px; color: var(--text-muted); }
.pfl-kp-mi input { width: 100%; min-width: 0; min-height: 32px; box-sizing: border-box; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg, transparent); color: var(--text); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .pfl-kp-mix-f { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pfl-kp-by > span { white-space: normal; } }

/* 128 (18.10.2026): связка худшего стресса с лентой — отметка лимита у строки и события портфеля из ленты */
.pfl-kp-table .pfl-lim-st { margin-left: 4px; font-size: 11px; }
.pfl-kp-evs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pfl-kp-ev { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--surface-2); }
.pfl-kp-ev-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 12px; margin-bottom: 4px; }
.pfl-kp-ev-t { white-space: pre-line; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }

/* 129 (18.10.2026): худший стресс за день — плитки, кто был худшим, график по времени */
.pfl-kd-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pfl-kd-who { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; }
.pfl-kd-chip { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.pfl-kd-svg { width: 100%; max-width: 760px; height: auto; display: block; }
.pfl-kd-limt { fill: #d29922; }
.pfl-kd-ax { stroke: var(--border); stroke-width: 1; }
.pfl-kd-lim { stroke: #d29922; stroke-width: 1.2; stroke-dasharray: 5 4; }
.pfl-kd-ln { fill: none; stroke: #ef5350; stroke-width: 2; stroke-linejoin: round; }
.pfl-kd-tx { font-size: 11px; fill: var(--text-muted, #8b949e); }
.pfl-kd-prev { margin: 0; }
@media (max-width: 760px) { .pfl-kd-tiles { grid-template-columns: 1fr; } .pfl-kd-chip { white-space: normal; } }

/* 130 (18.10.2026): сравнение дней по худшему стрессу — таблица с полосами и линия прошлого дня */
.pfl-kd-h3 { font-size: 13px; font-weight: 600; margin: 4px 0 0; }
.pfl-kd-cmp { margin: 0; font-size: 13px; }
.pfl-kd-ln0 { fill: none; stroke: var(--text-muted, #8b949e); stroke-width: 1.5; stroke-dasharray: 3 3; opacity: .8; }
.pfl-kd-leg { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-muted, #8b949e); }
.pfl-kd-leg i { display: inline-block; width: 16px; height: 0; vertical-align: middle; margin-right: 5px; border-top: 2px solid #ef5350; }
.pfl-kd-leg i.pfl-kd-k0 { border-top: 2px dashed var(--text-muted, #8b949e); }
.pfl-kd-table td { vertical-align: middle; }
.pfl-kd-table th:nth-child(-n+3), .pfl-kd-table td:nth-child(-n+3), .pfl-kd-table th:last-child, .pfl-kd-table td:last-child { text-align: left; }
.pfl-kd-table tr.is-live td { background: var(--surface-2); }
.pfl-kd-barc { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.pfl-kd-bar { position: relative; flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); min-width: 80px; }
.pfl-kd-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: #64748b; }
.pfl-kd-bar i.is-over { background: #ef5350; }
.pfl-kd-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #d29922; }
.pfl-kd-nm { white-space: nowrap; }
@media (max-width: 760px) { .pfl-kd-barc { min-width: 140px; } }

/* 141 (18.10.2026): P/L в процентах от капитала счёта — рядом с рублями */
.pfl-pct { font-size: 0.72em; font-weight: 500; margin-left: 4px; white-space: nowrap; }
