/* Portfolio page (v2/pages/portfolio.js). Built only from app.css tokens. */

/* ── head + sub-tabs ───────────────────────────────────────────────────── */
.pf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 6px 4px 30px; }
.pf-ttl { min-width: 0; }
.pf-lead { display: flex; align-items: center; flex-wrap: wrap; margin: 8px 0 0; min-height: 22px; font-size: 15px; color: var(--text-2); }
.pf-lead b { color: var(--text); font-weight: 600; margin: 0 .25em; }
.pf-lead b.up { color: var(--up); } .pf-lead b.down { color: var(--down); }
.pf-lead .sk { margin-top: 4px; }
.pf-sep { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); margin: 0 10px; opacity: .6; }
.pf-view { animation: page-in .38s var(--ease) both; }
.pf-blk { margin-top: var(--gap); }
.grid.pf-blk { margin-top: var(--gap); }
.pf-sec { margin-top: 40px; }
.pf-sec-t { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pf-sec-t .t-cap { margin-left: 0; }
.pf-alerts { display: grid; gap: 10px; margin-top: var(--gap); }
.pf-foot-note { margin: 24px 4px 0; max-width: 92ch; line-height: 1.5; }
.pf-th { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.pf-h4 { font-size: 15px; font-weight: 600; margin: 0 0 10px; letter-spacing: -.01em; }
.pf-actions { gap: 18px; padding-top: 2px; }
.pf-actions .btn svg { width: 15px; height: 15px; }
.pf .kpi-v small, .sheet .kpi-v small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 4px; letter-spacing: 0; }
.pf .kpi-s .meter { margin-top: 8px; }
.pf .kpi-s .meter-bar { height: 5px; }

/* KPI strip: one surface, hairline dividers (Apple spec-sheet feel) */
.pf-kstrip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 24px 6px; }
.pf-kstrip > .kpi { padding: 2px 22px; border-left: 1px solid var(--hair); }
.pf-kstrip > .kpi:first-child { border-left: 0; }
.pf-kstrip .kpi-v { font-size: 26px; }

/* ── ไม้ที่ถือ: leg cards ──────────────────────────────────────────────── */
.pp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.pp-grid.is-empty { grid-template-columns: 1fr; }
.pl-w { min-width: 0; }
.pl { display: flex; flex-direction: column; width: 100%; height: 100%; text-align: left; border: 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 24px 26px 20px; cursor: pointer; font: inherit; color: inherit; transition: transform var(--t) var(--spring), box-shadow var(--t) var(--ease); -webkit-tap-highlight-color: transparent; }
.pl:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.pl:active { transform: scale(.99); }
.pl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pl-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; padding-top: 3px; }
.pl-sym { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin-right: 2px; }
.pl-pnl { font-size: 30px; font-weight: 600; letter-spacing: -.022em; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-pnl .unit { font-size: 14px; }
.pl-sub { display: flex; justify-content: space-between; gap: 4px 14px; flex-wrap: wrap; margin: 8px 0 18px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pl-r b { font-weight: 600; }
.pl-noplan { padding: 12px 0; }
.pl-liq { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.pl-liq svg { width: 13px; height: 13px; flex: none; }
.pl-time { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair); }
.pl-time .meter { margin-top: 0; }
.pl-time .meter-bar { height: 6px; }
.pl-time-n { margin-top: 2px; line-height: 1.4; }
.pl-time.warn .meter-top b { color: var(--warn); }
.pl-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 16px; }

/* leg / trade sheet */
.lg2-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.lg2-pnl { font-size: 44px; font-weight: 600; letter-spacing: -.025em; line-height: 1.08; white-space: nowrap; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.lg2-pnl .unit { font-size: 16px; }
.lg2-chips { gap: 6px; }
.pf-tl { list-style: none; margin: 0; padding: 0; }
.pf-tl li { position: relative; display: flex; gap: 12px; padding: 7px 0; }
.pf-tl li + li::before { content: ""; position: absolute; left: 13.5px; top: -9px; height: 16px; width: 1px; background: var(--hair-2); }
.pf-tl-i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.pf-tl-i svg { width: 15px; height: 15px; }
.pf-tl b { display: block; font-weight: 500; font-size: 14px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.pf-tl .t-cap2 { display: block; margin-top: 2px; }

/* ── ปฏิทินกำไร ────────────────────────────────────────────────────────── */
.pc-bar { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin: 0 4px 18px; }
.pc-nav { display: flex; align-items: center; gap: 12px; }
.pc-month { min-width: 180px; text-align: center; }
.pc-legend { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; color: var(--text-3); }
.pc-ramp { display: inline-flex; gap: 2px; }
.pc-ramp i { width: 15px; height: 10px; border-radius: 3px; }
.pc-ramp i.mid { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--hair); }
.pc-stamp { white-space: nowrap; }
.pos.l1 { --lv: rgba(52, 199, 89, .12); } .pos.l2 { --lv: rgba(52, 199, 89, .22); }
.pos.l3 { --lv: rgba(52, 199, 89, .34); } .pos.l4 { --lv: rgba(52, 199, 89, .50); }
.neg.l1 { --lv: rgba(255, 59, 48, .10); } .neg.l2 { --lv: rgba(255, 59, 48, .18); }
.neg.l3 { --lv: rgba(255, 59, 48, .28); } .neg.l4 { --lv: rgba(255, 59, 48, .40); }
.pc-ramp i.pos, .pc-ramp i.neg { background: var(--lv); }

.pc-tiles { padding: 8px 6px; }
.pc-kgrid, .ph-kgrid.split { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pc-kgrid > * { padding: 16px 22px; border-left: 1px solid var(--hair); min-width: 0; }
.pc-kgrid > :nth-child(4n + 1) { border-left: 0; }
.pc-kgrid > :nth-child(n + 5) { border-top: 1px solid var(--hair); }
.pc-kgrid .kpi-v { font-size: 24px; }
.pc-kgrid .kpi-v.sm { font-size: 21px; }
.pc-kbtn { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; transition: background var(--t-fast); }
.pc-kbtn:hover { background: var(--surface-2); }
.pc-kbtn .kpi-s::after { content: " ›"; color: var(--accent); }

.pcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, .9fr); gap: 6px; }
.pcal-wd { font-size: 12px; color: var(--text-3); padding: 0 8px 4px; }
.pcal-wd.wk { text-align: right; }
.pcal-c { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 98px; padding: 9px 10px 13px; border: 0; border-radius: 14px; background: var(--lv, var(--surface-2)); box-shadow: inset 0 0 0 1px var(--hair); color: var(--text); text-align: left; font: inherit; overflow: hidden; }
button.pcal-c { cursor: pointer; transition: transform .22s var(--spring), box-shadow var(--t-fast); -webkit-tap-highlight-color: transparent; }
button.pcal-c:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 8px 22px rgba(0, 0, 0, .10); z-index: 1; }
button.pcal-c:active { transform: scale(.98); }
.pcal-c.pos, .pcal-c.neg { box-shadow: none; }
.pcal-c.flat { background: var(--surface-3); box-shadow: none; }
.pcal-c.pad { background: transparent; box-shadow: none; }
.pcal-c.future { background: transparent; box-shadow: inset 0 0 0 1px var(--hair); }
.pcal-c.none { background: rgba(0, 0, 0, .028); box-shadow: none; }
.pcal-c.future .pcal-d, .pcal-c.none .pcal-d { color: var(--text-3); font-weight: 500; }
.pcal-c.eq { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .55) 0 3px, transparent 3px 8px); box-shadow: inset 0 0 0 1px var(--hair-2); }
.pcal-c.today { box-shadow: inset 0 0 0 2px var(--text); }
.pcal-c.sel { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px var(--accent-fill); }
.pcal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; min-width: 0; }
.pcal-d { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.2; }
.pcal-today { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: var(--r-pill); background: var(--text); color: #fff; line-height: 1.2; }
.pcal-fl { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .78); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--hair-2); line-height: 1.2; white-space: nowrap; }
.pcal-v { margin-top: auto; font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcal-v.s { display: none; }
.pcal-s { margin-top: 2px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcal-bar { position: absolute; left: 10px; bottom: 6px; height: 3px; max-width: calc(100% - 20px); border-radius: 2px; background: var(--up-mark); transition: width .9s var(--spring); }
.pcal-bar.neg { background: var(--down-mark); }
.pcal-bar.eq { opacity: .45; }
.pcal-wk { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 2px; padding: 0 10px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.pcal-wk b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.pcal-wk span { font-size: 11.5px; color: var(--text-3); }
.pcal-wk.none { background: transparent; }
.pcal-weeks { display: none; }
.pcal-foot { flex-wrap: wrap; line-height: 1.6; }
.pcal-foot b { font-weight: 600; }
.pcal-note { margin: 12px 0 0; line-height: 1.5; }

/* ── day sheet ─────────────────────────────────────────────────────────── */
@media (min-width: 761px) { .sheet.pf-wide { width: min(900px, calc(100vw - 48px)); } }
.sheet .tbl-wrap { margin: 0 -28px; padding: 0 28px; }
.pd-hero .pd-v { font-size: 48px; font-weight: 600; letter-spacing: -.025em; line-height: 1.05; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pd-hero .pd-v .unit { font-size: 17px; }
.pd-perf { margin: 8px 0 0; line-height: 1.5; }
.pd-perf b { font-weight: 600; }
.pd-flows { margin-top: 10px; gap: 6px; }
.pd-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.pd-h h4 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.pd-h span { font-size: 12px; color: var(--text-3); text-align: right; }
.pd-kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--hair); border-radius: var(--r-sm); overflow: hidden; box-shadow: inset 0 0 0 1px var(--hair); }
.pd-kgrid > .kpi { background: var(--surface); padding: 12px 14px; }
.pd-kgrid .kpi-v.sm { font-size: 19px; }
.pd-kgrid .kpi-s { color: var(--text-2); }
.pd-empty { margin: 0; line-height: 1.5; }
.pd-chart { --fc-h: 210px; height: 210px; margin: 0 -4px; }
.pd-ohlc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.pd-ohlc div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-3); }
.pd-ohlc b { font-size: 15px; font-weight: 600; color: var(--text); }
.pd-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.dbars { display: grid; grid-template-columns: minmax(64px, max-content) minmax(60px, 1fr) auto; gap: 9px 12px; align-items: center; font-size: 13px; }
.db-l { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.db-l small { margin-left: 6px; color: var(--text-3); font-size: 11.5px; font-weight: 400; }
.db-t { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); }
.db-t::before { content: ""; position: absolute; left: var(--z); top: -3px; bottom: -3px; width: 1px; background: var(--hair-2); }
.db-t i { position: absolute; top: 0; bottom: 0; border-radius: 5px; transition: width .8s var(--spring), left .8s var(--spring); }
.db-t i.pos { background: var(--up-mark); }
.db-t i.neg { background: var(--down-mark); }
.db-v { text-align: right; font-weight: 600; min-width: 54px; }
.pd-more { margin-top: 12px; font-size: 13px; }
.pd-tbl { font-size: 13.5px; }
.pd-tbl td { padding: 10px 8px; white-space: nowrap; }
.pd-tbl .pd-tx td { white-space: normal; }
.pd-tbl th { padding-left: 8px; padding-right: 8px; }
.pd-t { white-space: nowrap; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pd-sym { white-space: nowrap; }
.pd-sym b, .ph-sym b { font-weight: 600; margin-right: 7px; }
.pd-px { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-2); }
.pd-tr.open td, .pd-tx td { background: var(--surface-2); }
.pd-tr:focus-visible { outline: none; box-shadow: none; }
.pd-tr:focus-visible td { background: var(--accent-fill); }
.tbl .pd-tx td { padding-top: 0; border-bottom: 1px solid var(--hair); }
.pd-tfacts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 2px 0 6px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pd-tfacts em { font-style: normal; color: var(--text-3); margin-right: 6px; }
.pd-tfacts .link { font-size: 12.5px; }
.pd-note { margin: 10px 0 0; line-height: 1.5; }
.pd-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pd-counts div { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.pd-counts b { font-size: 21px; font-weight: 600; line-height: 1.1; }
.pd-counts span { font-size: 12px; color: var(--text-2); }
.pd-counts .zero b { color: var(--text-3); font-weight: 500; }
.pd-subh { font-size: 12px; color: var(--text-3); margin: 14px 0 7px; }
.pd-sec .pd-subh:first-of-type { margin-top: 0; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 4px 0 12px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .05); font-size: 12.5px; font-weight: 500; }
.pd-chip b { display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface); font-size: 11.5px; font-weight: 600; }
.pd-ai-last { margin-top: 14px; padding: 13px 15px; border-radius: var(--r-sm); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); }
.pd-ai-last p { margin: 5px 0 0; font-size: 14px; line-height: 1.55; }

/* ── ประวัติ ───────────────────────────────────────────────────────────── */
.ph-srch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 14px; }
.ph-kgrid + .ph-srch { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--hair); }
.ph-kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px; }
.ph-kgrid + .ph-kgrid { margin-top: 18px; }
.ph-kgrid.sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ph-kgrid .kpi-v { font-size: 26px; }
.ph-kgrid.sm .kpi-v, .ph-kgrid .kpi-v.sm { font-size: 19px; }
.ph-dd { display: flex; flex-direction: column; }
/* fees + income streams (history tab) */
.ph-money { margin-top: var(--gap); align-items: stretch; }
.ph-money > .card { display: flex; flex-direction: column; min-width: 0; }
.ph-money .card-f { margin-top: auto; }
.ph-money > .card > .dl, .ph-fee-ent { margin-bottom: 4px; }
.ph-fee-k { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 22px; }
.ph-fee-k .kpi-v small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.ph-fee-mix { margin: 18px 0; padding: 14px 0 12px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.ph-fee-mix .meter-top { flex-wrap: wrap; }
.ph-fee-bar { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; margin-bottom: 8px; }
.ph-fee-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--up-mark); }
.ph-fee-ent { margin-top: 18px; }
.ph-fee-ent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ph-fee-ent li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.ph-fee-ent li b { font-weight: 600; }
.ph-fee-ent li .t-cap2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ph-money .card-h .seg > button { padding: 6px 11px; font-size: 12.5px; }
.ph-inc { list-style: none; margin: 0; padding: 0; }
.ph-inc-r { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 13px 0; border-top: 1px solid var(--hair); }
.ph-inc-r:first-child { border-top: 0; padding-top: 2px; }
.ph-inc-r > div:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ph-inc-r b { font-size: 14.5px; font-weight: 600; }
.ph-inc-r .t-cap2 { line-height: 1.45; }
.ph-inc-v { flex: none; font-size: 17px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ph-inc-off { font-size: 13px; font-weight: 500; color: var(--text-3); }
.ph-inc-f span { white-space: normal; line-height: 1.5; }
.ph-inc-f b { font-weight: 600; }
.pl-mfe { margin: -10px 0 16px; }
.pf-mfe-n { margin: 8px 0 0; }
.ph-dd-v { font-size: 48px; font-weight: 600; letter-spacing: -.025em; line-height: 1.05; margin-bottom: 8px; }
.ph-ddl { margin-top: auto; padding-top: 18px; display: grid; }
.ph-ddl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; color: var(--text-2); }
.ph-ddl b { color: var(--text); font-weight: 600; white-space: nowrap; }
.ph-ddl small { font-size: 11px; color: var(--text-3); font-weight: 500; }
.ph-dd .meter { margin-top: 16px; }
.ph-dd-n { margin: 8px 0 0; line-height: 1.5; }
.ph-eq-chart { --fc-h: 290px; height: 290px; }
.ph-eq-chart > .sk.block, .ph-bars > .sk.block { height: 100%; }
.ph-eq-foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 22px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair); }
.ph-eq-foot:empty { display: none; }
.ph-eq-foot .kpi-l { font-size: 12px; }
.ph-bars { --fc-h: 230px; height: 230px; cursor: pointer; }
#ph-dtbl { margin-top: 16px; }
.ph-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ph-tools > div { min-width: 0; max-width: 100%; }
.pf-search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .055); color: var(--text-3); flex: 1 1 170px; max-width: 280px; transition: background var(--t-fast), box-shadow var(--t-fast); }
.pf-search svg { width: 15px; height: 15px; flex: none; }
.pf-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: 14px; color: var(--text); padding: 0; }
.pf-search input::-webkit-search-cancel-button { cursor: pointer; }
.pf-search:focus-within { background: var(--surface); box-shadow: var(--focus); }
.ph-fsum { margin: 0 0 6px; min-height: 18px; }
.ph-fsum b { color: var(--text); font-weight: 600; }
.ph-tbl td { padding-top: 12px; padding-bottom: 12px; }
.ph-tbl tbody tr, .ph-dt tbody tr { cursor: pointer; }
.ph-tbl tbody tr:focus-visible { outline: none; box-shadow: none; }
.ph-tbl tbody tr:focus-visible td { background: var(--accent-fill); }
.th-sort { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.th-sort:hover, .th-sort.on { color: var(--text); }
.th-arr { display: inline-block; min-width: 9px; font-size: 11px; }
.ph-sym { display: inline-flex; align-items: center; white-space: nowrap; }
.ph-when { display: none; }
.pf-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }
.pf-pager:empty { display: none; }
.ph-otbl { font-size: 13.5px; }
.ph-otbl td { white-space: nowrap; }
.ph-ot { color: var(--text-2); }

/* ── เงินเข้า-ออก ──────────────────────────────────────────────────────── */
.pw-total { font-size: 46px; font-weight: 600; letter-spacing: -.025em; line-height: 1.05; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pw-total .unit { font-size: 17px; }
.pw-stack { display: flex; gap: 2px; height: 12px; margin: 20px 0 14px; border-radius: 6px; overflow: hidden; background: var(--track); }
.pw-stack i { height: 100%; transition: width .9s var(--spring); }
.s0 { --sw: rgba(29, 29, 31, .86); } .s1 { --sw: rgba(29, 29, 31, .46); } .s2 { --sw: rgba(29, 29, 31, .30); }
.s3 { --sw: rgba(29, 29, 31, .20); } .s4 { --sw: rgba(29, 29, 31, .13); } .s5 { --sw: rgba(29, 29, 31, .08); }
.pw-stack i, .pw-legend i { background: var(--sw); }
.pw-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.pw-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 52px; align-items: center; gap: 10px; font-size: 14px; }
.pw-legend i { width: 10px; height: 10px; border-radius: 3px; }
.pw-legend b { font-weight: 600; }
.pw-legend .t-cap2 { text-align: right; }
.pw-margin { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair); }
.pw-margin .meter { margin-top: 0; }
.pw-margin .t-cap2 { margin-top: 6px; }
.pw-zero { margin: 12px 0 0; }
.pw-net > div { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: 15px; }
.pw-net b { min-width: 86px; text-align: right; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.pw-net .tot { border-bottom: 0; }
.pw-net .tot span:nth-child(2) { font-weight: 600; }
.pw-net .tot b { font-size: 24px; }
.pw-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.pw-ico svg { width: 16px; height: 16px; }
.pw-explain { margin-top: 14px; }
.pw-explain p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.55; }
.pw-explain p + p { margin-top: 8px; }
.pw-explain b { color: var(--text); font-weight: 600; }
.pw-net + .inset + .error { margin-top: 12px; }
.pw-list { list-style: none; margin: -6px -10px; padding: 0; }
.pw-list li + li { border-top: 1px solid var(--hair); }
.pw-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 14px 10px; border: 0; border-radius: 14px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background var(--t-fast); }
.pw-row:hover { background: var(--surface-2); }
.pw-row .pw-ico { width: 40px; height: 40px; }
.pw-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pw-main b { font-size: 15px; font-weight: 600; }
.pw-man { color: var(--text-2); line-height: 1.45; }
.pw-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; white-space: nowrap; }
.pw-amt b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.pw-code { display: block; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); font: 12.5px/1.5 var(--mono); overflow-wrap: anywhere; }
.pw-ilist { list-style: none; margin: 0; padding: 0; }
.pw-ilist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.pw-ilist li:last-child { border-bottom: 0; }
.pw-route { display: flex; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.pw-route b { font-weight: 500; }
.pw-route svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }
.pw-iamt { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 15px; font-weight: 600; white-space: nowrap; }
.pw-stbl td b { font-weight: 600; }
#pw-spot { display: flex; flex-direction: column; }
.pw-spot-n { margin: auto 0 0; padding-top: 16px; line-height: 1.5; }
.pw-rtbl td { white-space: nowrap; }
.pw-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .05); font-size: 11.5px; font-weight: 500; color: var(--text); }
.pw-tag.ext { background: var(--accent-fill); color: var(--accent); }
.pw-tag.int { background: transparent; box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--text-2); }

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .pf-kstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .pf-kstrip > .kpi:nth-child(4) { border-left: 0; }
  .pp-grid { grid-template-columns: 1fr; }
  .pcal-c { min-height: 86px; }
  .pcal-v { font-size: 15px; }
}
@media (max-width: 900px) {
  .ph-top > .card, .pw-top > .card, .grid.pf-blk > .card, .ph-money > .card { grid-column: 1 / -1; }
  .ph-kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-two { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .pf-head { margin: 4px 2px 20px; }
  .pf-head .t-title { font-size: 32px; }
  .pf-lead { font-size: 13.5px; }
  .pf-lead-t { display: none; }
  .pf-lead .pf-sep:last-of-type { display: none; }
  .pf-segw { width: 100%; }
  .pf-segw .seg { display: flex; width: 100%; }
  .pf-segw .seg > a { flex: 1 1 auto; padding: 7px 10px; text-align: center; }
  .pf-sec { margin-top: 28px; }
  .pf-kstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 2px; row-gap: 16px; }
  .pf-kstrip > .kpi { padding: 0 14px; }
  .pf-kstrip > .kpi:nth-child(odd) { border-left: 0; }
  .pf-kstrip > .kpi:nth-child(4) { border-left: 1px solid var(--hair); }
  .pf-kstrip > .kpi:last-child { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--hair); }
  .pf-kstrip .kpi-v { font-size: 22px; }
  .pl { padding: 18px 18px 16px; }
  .pl-sym { font-size: 21px; }
  .pl-pnl { font-size: 25px; }
  .pl-sub { margin-bottom: 14px; }
  .lg2-pnl { font-size: 36px; }

  .pc-bar { margin-bottom: 14px; }
  .pc-nav { width: 100%; justify-content: space-between; }
  .pc-month { min-width: 0; }
  .pc-legend { margin-left: 0; }
  .pc-stamp { margin-left: auto; }
  .pc-tiles { padding: 4px 2px; }
  .pc-kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-kgrid > * { padding: 12px 14px; }
  .pc-kgrid > :nth-child(4n + 1) { border-left: 1px solid var(--hair); }
  .pc-kgrid > :nth-child(odd) { border-left: 0; }
  .pc-kgrid > :nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .pc-kgrid .kpi-v { font-size: 20px; }
  .pc-kgrid .kpi-v.sm { font-size: 18px; }
  .pcal { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .pcal-wd { padding: 0 2px 4px; text-align: center; font-size: 11.5px; }
  .pcal-wd.wk, .pcal-wk { display: none; }
  .pcal-c { min-height: 52px; padding: 5px 4px 8px; border-radius: 10px; align-items: center; text-align: center; }
  .pcal-top { justify-content: center; width: 100%; }
  .pcal-d { font-size: 11.5px; }
  .pcal-today, .pcal-s { display: none; }
  .pcal-fl { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; padding: 0; font-size: 0; border-radius: 50%; background: var(--text-2); box-shadow: none; }
  .pcal-v { font-size: 10.5px; letter-spacing: -.03em; }
  .pcal-v.l { display: none; }
  .pcal-v.s { display: block; }
  .pcal-bar { left: 5px; bottom: 4px; height: 2px; max-width: calc(100% - 10px); }
  .pcal-weeks { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 10px 14px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 13.5px; }
  .pcal-wrow { display: contents; }
  .pcal-wrow b { font-weight: 600; text-align: right; }

  .sheet .tbl-wrap { margin: 0 -20px; padding: 0 20px; }
  .pd-hero .pd-v { font-size: 40px; }
  .pd-kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-chart { --fc-h: 180px; height: 180px; }
  .pd-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pd-tbl td, .pd-tbl th { padding-left: 6px; padding-right: 6px; }
  .pf-view .hm, .sheet .pd-tbl .hm, .sheet .ph-otbl .hm { display: none; }

  .ph-kgrid, .ph-kgrid.sm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .ph-kgrid .kpi-v { font-size: 22px; }
  .ph-dd-v { font-size: 40px; }
  .ph-eq-chart { --fc-h: 220px; height: 220px; }
  .ph-eq-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-bars { --fc-h: 200px; height: 200px; }
  .ph-tools { gap: 10px; }
  .ph-tools .seg { max-width: 100%; }
  .pf-search { max-width: none; flex-basis: 100%; order: 3; }
  .ph-tbl td { padding-top: 11px; padding-bottom: 11px; }
  .ph-sym { display: flex; }
  .ph-when { display: block; margin-top: 3px; }
  .pw-rtbl td, .pw-rtbl th, .ph-otbl td, .ph-otbl th { padding-left: 6px; padding-right: 6px; }
  .pw-rtbl td:nth-child(2), .pw-rtbl th:nth-child(2), .ph-otbl td:nth-child(2), .ph-otbl th:nth-child(2) { padding-left: 0; }
  .card-h { flex-wrap: wrap; }

  .pw-total { font-size: 38px; }
  .pw-net b { font-size: 17px; min-width: 0; }
  .pw-net .tot b { font-size: 21px; }
  .pw-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 12px 8px; }
  .pw-row .pw-ico { width: 34px; height: 34px; }
  .pw-amt b { font-size: 16px; }
}

/* label/value grids inside this page's sheets: hairlines per cell, so a short last row stays white */
.pf-sheet .dl { gap: 0; background: var(--surface); box-shadow: none; border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
.pf-sheet .dl > div { box-shadow: inset -1px -1px 0 var(--hair); }

/* ── เงินเข้า-ออก: every coin (ledger) ─────────────────────────────────── */
.pw-net > .pw-coins { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 12px 44px; }
.pw-net > div:has(+ .pw-coins) { border-bottom: 0; padding-bottom: 6px; }
.pw-unit { font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }

/* ── สมุดบัญชี ─────────────────────────────────────────────────────────── */
.lg-bridge .card-h { align-items: center; }
.lg-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 4px 0 8px; }
.lg-si { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 2px 22px; border-left: 1px solid var(--hair); }
.lg-si:first-child { border-left: 0; padding-left: 0; }
.lg-si .kpi-l { margin: 0; }
.lg-si b { font-size: 28px; font-weight: 600; letter-spacing: -.022em; line-height: 1.12; white-space: nowrap; }

/* waterfall: one row per step, bar from the running level before to after (up = green, down = red, totals = ink) */
.wf { display: grid; gap: 2px; margin: 22px -10px 0; }
.wf-r { display: grid; grid-template-columns: minmax(150px, 25%) minmax(0, 1fr) 118px; align-items: center; gap: 18px; width: 100%; padding: 7px 10px; border: 0; border-radius: 12px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background var(--t-fast); -webkit-tap-highlight-color: transparent; }
.wf-r:hover { background: var(--surface-2); }
.wf-r:focus-visible { outline: none; box-shadow: var(--focus); }
.wf-l { min-width: 0; }
.wf-l b { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.wf-l .t-cap2 { display: block; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-t { position: relative; height: 24px; }
.wf-b { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; transition: left .7s var(--spring), width .7s var(--spring); }
.wf-b.pos { background: var(--up-mark); }
.wf-b.neg { background: var(--down-mark); }
.wf-b.tot { background: rgba(29, 29, 31, .82); }
.wf-b.zero { min-width: 2px; background: var(--hair-2); }
.wf-b.cut { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px); mask-image: linear-gradient(90deg, transparent 0, #000 22px); }
.wf-c { position: absolute; top: -27px; height: 39px; width: 1px; margin-left: -.5px; background: var(--hair-2); }
.wf-r[data-wf="deposits"] .wf-c { top: -24px; height: 36px; }
.wf-v { text-align: right; font-size: 15px; font-weight: 600; white-space: nowrap; }
.wf-r.tot .wf-l b { font-weight: 600; }
.wf-r.tot .wf-v { font-size: 17px; }
.wf-r[data-wf="end"] { margin-top: 8px; padding-top: 13px; border-radius: 0 0 12px 12px; box-shadow: inset 0 1px 0 var(--hair); }
.wf-r[data-wf="end"] .wf-c { display: none; }
.wf-r.warn .wf-v { color: var(--warn); }
.wf-ok { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--up); }
.wf-r.warn .wf-ok { color: var(--warn); }
.wf-ok.info, .wf-ok.bad { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-size: 10.5px; font-weight: 700; vertical-align: 1px; color: #fff; background: var(--text-3); }
.wf-ok.bad { background: var(--warn-mark); }
.wf-axis { margin: 8px 0 0; }
.lg-notes { margin-top: 16px; }
.lg-notes p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.lg-notes p + p { margin-top: 6px; }
.lg-method { margin-top: 14px; }
.lg-method summary { cursor: pointer; font-size: 13px; color: var(--accent); list-style: none; }
.lg-method summary::-webkit-details-marker { display: none; }
.lg-method summary::after { content: " ›"; }
.lg-method[open] summary::after { content: " ‹"; }
.lg-method p { margin: 8px 0 0; max-width: 90ch; line-height: 1.55; }

/* assets */
.lg-atbl td { white-space: nowrap; }
.lg-tot td { font-weight: 600; box-shadow: inset 0 1px 0 var(--hair-2); }
.lg-fut { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 16px; border-radius: var(--r-sm); overflow: hidden; background: var(--hair); box-shadow: inset 0 0 0 1px var(--hair); }
.lg-fut > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 14px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.lg-fut b { font-size: 15px; font-weight: 600; color: var(--text); }
.lg-fut b.up { color: var(--up); } .lg-fut b.down { color: var(--down); }
.lg-check { margin: 12px 0 0; }

/* live orders */
.lo-leg { padding: 14px 0; }
.lo-leg:first-child { padding-top: 0; }
.lo-leg + .lo-leg { border-top: 1px solid var(--hair); }
.lo-h { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.lo-h > b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.lo-upl { margin-left: auto; font-weight: 600; }
.lo-os { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.lo-o { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; column-gap: 10px; row-gap: 3px; min-width: 0; padding: 10px 13px; border: 0; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background var(--t-fast), transform .15s var(--spring); }
.lo-o:hover { background: var(--surface-3); }
.lo-o:active { transform: scale(.985); }
.lo-o b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lo-k { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.lo-k svg { width: 13px; height: 13px; }
.lo-o.stop .lo-k { color: var(--down); }
.lo-o.tp .lo-k { color: var(--up); }
.lo-meta { grid-column: 1 / -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lo-miss { display: flex; align-items: center; gap: 6px; padding: 10px 13px; border-radius: 12px; background: var(--down-fill); color: var(--down); font-size: 13px; font-weight: 500; }
.lo-miss svg { width: 15px; height: 15px; }
.lo-risk { margin-top: 8px; }
.lo-orph { margin-top: 14px; }

/* the book (tabs) */
#lg-tabs .tabs { margin: -4px 0 22px; }
.lg-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.lg-sel { height: 36px; max-width: 190px; padding: 0 30px 0 14px; border: 0; border-radius: var(--r-pill); background: rgba(0, 0, 0, .055) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; }
.lg-sel:focus-visible, .lg-date:focus-within { outline: none; box-shadow: var(--focus); }
.lg-date { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .055); font-size: 12.5px; color: var(--text-3); }
.lg-date input { border: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--text); padding: 0; min-width: 0; width: 118px; }
.lg-tools .pf-search { flex: 1 1 200px; max-width: 300px; }
.lg-csv { margin-left: auto; }
.lg-bsum { margin: 0 0 6px; min-height: 18px; }
.lg-bsum .link { font-size: 12px; }
#lg-btbl { transition: opacity .2s var(--ease); }
#lg-btbl.loading { opacity: .5; }
.lg-btbl td, .lg-ftbl td, .lg-rtbl td { padding-top: 11px; padding-bottom: 11px; }
.lg-btbl tbody tr, .lg-rtbl tbody tr { cursor: pointer; }
.lg-btbl tbody tr:hover td, .lg-rtbl tbody tr:hover td { background: var(--surface-2); }
.lg-btbl tbody tr:focus-visible, .lg-rtbl tbody tr:focus-visible { outline: none; }
.lg-btbl tbody tr:focus-visible td, .lg-rtbl tbody tr:focus-visible td { background: var(--accent-fill); }
.lg-t { white-space: nowrap; }
.lg-ty { display: block; font-weight: 500; }
.lg-tyc { display: block; margin-top: 2px; }
.lg-mob { display: none; }
.lg-ftbl td, .lg-dtbl td { white-space: nowrap; }
.lg-kstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 20px; padding: 16px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.lg-kstrip > .kpi { padding: 0 20px; border-left: 1px solid var(--hair); }
.lg-kstrip > .kpi:first-child { border-left: 0; padding-left: 0; }
.lg-kstrip .kpi-v { font-size: 24px; }
.lg-kstrip .kpi-v.sm { font-size: 21px; }
.lg-kstrip .kpi-v .warn { color: var(--warn); }
.lg-lead { margin: 0 0 12px; line-height: 1.5; }
.lg-lead + .tbl-wrap + .lg-lead { margin: 14px 0 0; }
.lg-feebar { position: relative; display: inline-block; width: 40px; height: 6px; margin-right: 10px; border-radius: 3px; background: var(--track); overflow: hidden; vertical-align: middle; }
.lg-feebar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--down-mark); opacity: .75; }
.lg-why { margin-bottom: 16px; }
.lg-why p { margin: 0; font-size: 13.5px; line-height: 1.55; }
.lg-why p + p { margin-top: 6px; }
.lg-whys { display: grid; gap: 2px; margin-bottom: 18px; }
.lg-wy { display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(60px, 160px) 70px; align-items: center; gap: 12px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--hair); }
.lg-wy b { text-align: right; font-weight: 600; }
.lg-wbar { position: relative; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.lg-wbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--warn-mark, #ff9f0a); }
.lg-rtbl td.warn, .lg-rtbl .warn { color: var(--warn); }
.lg-vo { margin-top: 28px; }
.lg-vlist { list-style: none; margin: 0; padding: 0; }
.lg-vlist li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.lg-vlist li:last-child { border-bottom: 0; }
.lg-vlist .t-cap2 { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-vlist .num { font-weight: 600; text-align: right; }
.lg-ctbl td { white-space: nowrap; }
.lg-eps { list-style: none; margin: 0; padding: 0; }
.lg-eps li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.lg-eps li:last-child { border-bottom: 0; }
.lg-eps code { font: 12.5px/1.4 var(--mono); overflow-wrap: anywhere; }
.lg-gaps { margin: 0; padding-left: 18px; }
.lg-gaps li + li { margin-top: 6px; }
.lg-stbl td { white-space: nowrap; }

@media (max-width: 900px) {
  .lg-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .lg-si:nth-child(3) { border-left: 0; padding-left: 0; }
  .lg-kstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .lg-kstrip > .kpi:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 760px) {
  .pf-segw .seg > a { padding: 7px 8px; font-size: 13px; }
  .lg-bridge .card-h > div:last-child { width: 100%; }
  .lg-bridge .card-h .seg { display: flex; width: 100%; }
  .lg-bridge .card-h .seg > button { flex: 1 1 auto; padding: 7px 8px; }
  .lg-si { padding: 0 14px; }
  .lg-si b { font-size: 22px; }
  .wf { margin: 16px -6px 0; }
  .wf-r { grid-template-columns: minmax(0, 36%) minmax(0, 1fr) auto; gap: 10px; padding: 6px 6px; }
  .wf-l b { font-size: 13.5px; }
  .wf-l .t-cap2 { font-size: 11px; }
  .wf-v { font-size: 13.5px; min-width: 58px; }
  .wf-r.tot .wf-v { font-size: 15px; }
  .wf-t { height: 20px; }
  .wf-c { top: -25px; height: 35px; }
  .lo-os { gap: 6px; }
  .lo-o { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k d" "v v" "m m"; padding: 9px 11px; column-gap: 6px; }
  .lo-o .lo-k { grid-area: k; } .lo-o .lo-d { grid-area: d; } .lo-o b { grid-area: v; font-size: 16px; } .lo-o .lo-meta { grid-area: m; }
  .lg-tools { gap: 8px; }
  .lg-sel { flex: 1 1 calc(33.3% - 8px); min-width: 0; max-width: none; padding: 0 24px 0 12px; background-position: right 9px center; font-size: 13px; }
  .lg-date { flex: 1 1 calc(50% - 8px); min-width: 0; padding: 0 10px; }
  .lg-date span { display: none; }
  .lg-date input { width: 100%; font-size: 13px; }
  .lg-tools .pf-search { max-width: none; flex: 1 1 0; min-width: 0; order: 3; }
  .lg-tools .pf-search input { width: 0; }
  .lg-csv { order: 4; margin-left: 0; }
  .lg-mob { display: inline; }
  .lg-rtbl .lg-mob { display: block; margin-top: 2px; }
  .lg-feebar { display: none; }
  .lg-wy { grid-template-columns: minmax(0, 1fr) 40px 60px 62px; gap: 8px; }
  .lg-vlist li { grid-template-columns: auto auto auto; }
  .lg-vlist .t-cap2 { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .lg-btbl td, .lg-btbl th, .lg-ftbl td, .lg-ftbl th, .lg-rtbl td, .lg-rtbl th, .lg-dtbl td, .lg-dtbl th { padding-left: 6px; padding-right: 6px; }
  .lg-btbl td:first-child, .lg-ftbl td:first-child, .lg-rtbl td:first-child, .lg-dtbl td:first-child { padding-left: 0; }
  .lg-t { white-space: normal; min-width: 64px; }
}
#lg-tab > .lg-kstrip:first-child { border-top: 0; padding-top: 2px; }
