/*
 * LinsGeek ERP —— 「报表 → 利润报表」页面样式（配合 50-profit-report.js；按钮 / 提示沿用 44-ml-questions.css 的 .mlq-btn / .mlq-link / .mlq-toast）
 * 回滚：删除 50-profit-report.css + 50-profit-report.js。
 */
#lg-profit {
  --p-brand: #0d7b6d; --p-bright: #13b8a6; --p-soft: #e7f2f0; --p-ink: #0f1a18; --p-muted: #6b7a77; --p-line: rgba(15, 35, 30, .08); --p-grid: #e6ecea;
  --p-pos: #1f8a4c; --p-neg: #d64545; --p-neg-bg: #fdecec; --p-warn: #b7791f; --p-warn-bg: #fff7ea; --p-minus: #4b5a57;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--p-ink); padding: 4px 0 40px; min-width: 0;
}
#lg-profit *, #lg-profit *::before, #lg-profit *::after { box-sizing: border-box; }
#lg-profit svg:not(.pf-wf):not(.pf-trend) { width: 16px; height: 16px; flex: 0 0 auto; }

/* 标题 */
#lg-profit .pf-head { margin-bottom: 12px; }
#lg-profit .pf-title h1 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
#lg-profit .pf-title h1 svg { width: 30px; height: 30px; padding: 6px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #0d7b6d, #13b8a6); }
#lg-profit .pf-title p { margin: 6px 0 0; color: var(--p-muted); font-size: 13.5px; line-height: 1.55; max-width: 860px; }

/* 标签 + 筛选 */
#lg-profit .pf-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 10px; background: #fff; border: 1px solid var(--p-line); border-radius: 14px; position: sticky; top: 0; z-index: 5; }
#lg-profit .pf-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
#lg-profit .pf-tabs::-webkit-scrollbar { display: none; }
#lg-profit .pf-tab, #lg-profit .pf-subtab { all: unset; cursor: pointer; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #4b5a57; white-space: nowrap; font-family: inherit; display: inline-flex; align-items: center; }
#lg-profit .pf-tab:hover, #lg-profit .pf-subtab:hover { background: #f3f7f6; }
#lg-profit .pf-tab.on, #lg-profit .pf-subtab.on { background: var(--p-soft); color: var(--p-brand); }
#lg-profit .pf-tab:focus-visible, #lg-profit .pf-subtab:focus-visible { outline: 2px solid var(--p-bright); outline-offset: 1px; }
#lg-profit .pf-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#lg-profit .pf-filters.dim { opacity: .45; pointer-events: none; }
#lg-profit .pf-select, #lg-profit .pf-date, #lg-profit .pf-field input, #lg-profit .pf-field select { font: inherit; font-size: 13.5px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid #dfe6e4; background: #fff; outline: none; min-width: 0; color: var(--p-ink); }
#lg-profit .pf-select:focus, #lg-profit .pf-date:focus, #lg-profit .pf-field input:focus, #lg-profit .pf-field select:focus { border-color: var(--p-bright); box-shadow: 0 0 0 3px rgba(19,184,166,.15); }
#lg-profit .pf-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--p-muted); }
#lg-profit .pf-custom[hidden] { display: none; }

/* 数据完整度 */
#lg-profit .pf-comp:empty { display: none; }
#lg-profit .pf-comp-in { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 12px; border-radius: 12px; background: var(--p-warn-bg); border: 1px solid rgba(183,121,31,.2); font-size: 13px; }
#lg-profit .pf-comp-in > b { display: inline-flex; align-items: center; gap: 6px; color: #7a4f10; margin-right: 4px; }
#lg-profit .pf-comp-in > b svg { color: var(--p-warn); }
#lg-profit .pf-comp-in.ok { background: var(--p-soft); border-color: transparent; color: #23413c; }
#lg-profit .pf-comp-in.ok svg { color: var(--p-brand); }
#lg-profit .pf-comp-item { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid rgba(183,121,31,.25); color: #5c4010; font-family: inherit; font-size: 12.5px; }
#lg-profit .pf-comp-item span { color: var(--p-brand); font-weight: 600; }
#lg-profit .pf-comp-item.bad { border-color: rgba(214,69,69,.3); color: #8c2a2a; }
#lg-profit .pf-comp-item:hover { box-shadow: 0 2px 8px -4px rgba(0,0,0,.25); }
#lg-profit .pf-comp-item:focus-visible { outline: 2px solid var(--p-bright); }

/* 总览卡片 */
#lg-profit .pf-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
#lg-profit .pf-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: #fff; border: 1px solid var(--p-line); border-radius: 16px; min-width: 0; }
#lg-profit .pf-card > span { font-size: 12.5px; color: var(--p-muted); }
#lg-profit .pf-card b { font-size: 21px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lg-profit .pf-card.hero { background: linear-gradient(120deg, #0d7b6d, #13b8a6); color: #fff; border-color: transparent; box-shadow: 0 16px 30px -24px rgba(13,123,109,.9); }
#lg-profit .pf-card.hero > span, #lg-profit .pf-card.hero .pf-delta { color: rgba(255,255,255,.88) !important; }
#lg-profit .pf-card.neg { background: var(--p-neg-bg); border-color: rgba(214,69,69,.25); }
#lg-profit .pf-card.neg b { color: var(--p-neg); }
#lg-profit .pf-delta { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
#lg-profit .pf-delta.up { color: var(--p-pos); }
#lg-profit .pf-delta.down { color: var(--p-neg); }
#lg-profit .pf-vs { margin: 4px 2px 10px; color: var(--p-muted); font-size: 12px; text-align: right; }
#lg-profit .pf-oldnew { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: #f3f7f6; color: #23413c; font-size: 13px; line-height: 1.6; }
#lg-profit .pf-oldnew svg { color: var(--p-brand); margin-top: 2px; }

/* 图表 */
#lg-profit .pf-grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
#lg-profit .pf-panel { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: 12px 14px 10px; min-width: 0; }
#lg-profit .pf-panel h3 { margin: 0 0 8px; font-size: 14.5px; }
#lg-profit .pf-chartwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#lg-profit .pf-wf, #lg-profit .pf-trend { display: block; width: 100%; min-width: 560px; height: auto; }
#lg-profit .pf-wf .axis, #lg-profit .pf-trend .axis { stroke: #c9d3d1; stroke-width: 1.5; }
#lg-profit .pf-wf .conn { stroke: #b8c2bf; stroke-dasharray: 3 3; }
#lg-profit .pf-wf rect.start { fill: #5aa9e6; }
#lg-profit .pf-wf rect.minus { fill: #f2a8a3; }
#lg-profit .pf-wf rect.sub { fill: #13b8a6; }
#lg-profit .pf-wf rect.neg { fill: var(--p-neg); }
#lg-profit .pf-wf rect.pend { fill: #c6cecc; }
#lg-profit .pf-wf text, #lg-profit .pf-trend text { font-family: inherit; text-anchor: middle; }
#lg-profit .pf-wf .val { font-size: 13px; font-weight: 700; fill: #23413c; }
#lg-profit .pf-wf .val.minus { fill: #a33a3a; font-weight: 600; }
#lg-profit .pf-wf .val.pend { fill: #8a9895; font-weight: 500; font-size: 13px; }
#lg-profit .pf-wf .lab { font-size: 13px; fill: #3c4a47; }
#lg-profit .pf-wf .sub { font-size: 12.5px; fill: #8a9895; }
/* 2026-11-25：「利润是怎么来的」横向明细。条长 = 占销售额的比例；超过 100% 画满 + 斜纹 */
#lg-profit .pf-wfl { display: grid; gap: 2px; max-width: 980px; }
#lg-profit .pf-wfl-head, #lg-profit .pf-wfl-row { display: grid; grid-template-columns: minmax(96px, 150px) minmax(80px, 1fr) 160px 72px; align-items: center; column-gap: 12px; }
#lg-profit .pf-wfl-head { font-size: 12px; color: var(--p-muted); text-align: right; padding: 0 8px 2px; }
#lg-profit .pf-wfl-row { min-height: 32px; padding: 3px 8px; border-radius: 8px; font-size: 13.5px; }
#lg-profit .pf-wfl-row:hover { background: #f6f9f8; }
#lg-profit .pf-wfl-row .lab { display: flex; align-items: baseline; gap: 6px; color: #3c4a47; min-width: 0; }
#lg-profit .pf-wfl-row .lab i { flex: 0 0 10px; font-style: normal; color: #9aa7a4; text-align: center; }
#lg-profit .pf-wfl-row .track { height: 14px; border-radius: 4px; background: #f1f5f4; overflow: hidden; }
#lg-profit .pf-wfl-row .bar { display: block; height: 100%; border-radius: 4px; background: #f2a8a3; }
#lg-profit .pf-wfl-row .amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: #a33a3a; }
#lg-profit .pf-wfl-row .pct { text-align: right; font-size: 12.5px; color: var(--p-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
#lg-profit .pf-wfl-row.k-start .bar { background: #5aa9e6; }
#lg-profit .pf-wfl-row.k-start .amt, #lg-profit .pf-wfl-row.k-start .lab { color: var(--p-ink); font-weight: 700; }
#lg-profit .pf-wfl-row.result { margin-top: 4px; background: var(--p-soft); }
#lg-profit .pf-wfl-row.result .lab { color: var(--p-ink); font-weight: 700; }
#lg-profit .pf-wfl-row.result .track { background: rgba(255, 255, 255, .7); }
#lg-profit .pf-wfl-row.result .bar { background: var(--p-bright); }
#lg-profit .pf-wfl-row.result .amt { color: var(--p-pos); font-weight: 700; }
#lg-profit .pf-wfl-row.result .pct { color: #23413c; font-weight: 600; }
#lg-profit .pf-wfl-row.result.k-neg { background: var(--p-neg-bg); }
#lg-profit .pf-wfl-row.result.k-neg .bar { background: var(--p-neg); }
#lg-profit .pf-wfl-row.result.k-neg .amt, #lg-profit .pf-wfl-row.result.k-neg .pct { color: var(--p-neg); }
#lg-profit .pf-wfl-row.total { min-height: 38px; font-size: 14.5px; }
#lg-profit .pf-wfl-row.over .bar { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .45) 0 6px, transparent 6px 12px); }
#lg-profit .pf-wfl-row.k-minus.over .bar { background-color: #e0625c; }
#lg-profit .pf-wfl-row.k-minus.over .pct { color: var(--p-neg); font-weight: 700; }
#lg-profit .pf-wfl-zero { margin: 8px 8px 2px; font-size: 12.5px; line-height: 1.6; color: var(--p-muted); }
@media (max-width: 720px) {
  #lg-profit .pf-wfl-head { display: none; }
  #lg-profit .pf-wfl-row { grid-template-columns: minmax(0, 1fr) auto 62px; row-gap: 4px; padding: 6px 8px; }
  #lg-profit .pf-wfl-row .track { grid-column: 1 / -1; grid-row: 2; height: 8px; }
}
#lg-profit .pf-trend .grid { stroke: #eef2f1; }
#lg-profit .pf-trend .ax { font-size: 12px; fill: #8a9895; text-anchor: end; }
#lg-profit .pf-trend .bar { fill: #cfe8e3; }
#lg-profit .pf-trend .line { fill: none; stroke: var(--p-brand); stroke-width: 3; }
#lg-profit .pf-trend .dot { fill: #fff; stroke: var(--p-brand); stroke-width: 3; }
#lg-profit .pf-trend .dot.neg { stroke: var(--p-neg); }
#lg-profit .pf-trend .val { font-size: 13px; font-weight: 700; fill: #23413c; }
#lg-profit .pf-trend .lab { font-size: 13.5px; fill: #3c4a47; }
#lg-profit .pf-trend .warn { font-size: 12px; fill: var(--p-warn); }
#lg-profit .pf-legend { display: flex; gap: 14px; font-size: 12px; color: var(--p-muted); margin-top: 4px; }
#lg-profit .pf-legend span { display: inline-flex; align-items: center; gap: 6px; }
#lg-profit .pf-legend i.bar { width: 12px; height: 10px; border-radius: 2px; background: #cfe8e3; }
#lg-profit .pf-legend i.line { width: 14px; height: 3px; border-radius: 2px; background: var(--p-brand); }

/* 工具栏 */
#lg-profit .pf-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
#lg-profit .pf-search { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid #dfe6e4; border-radius: 10px; flex: 1 1 260px; min-width: 0; color: var(--p-muted); background: #fff; }
#lg-profit .pf-search:focus-within { border-color: var(--p-bright); box-shadow: 0 0 0 3px rgba(19,184,166,.15); }
#lg-profit .pf-search input { border: 0; outline: none; font: inherit; font-size: 13.5px; flex: 1 1 auto; min-width: 0; background: transparent; color: var(--p-ink); }
#lg-profit .pf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
#lg-profit .pf-chip { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #dfe6e4; background: #fff; font-size: 13px; font-weight: 600; color: #4b5a57; white-space: nowrap; font-family: inherit; }
#lg-profit .pf-chip svg { width: 14px; height: 14px; }
#lg-profit .pf-chip.on { background: var(--p-brand); border-color: var(--p-brand); color: #fff; }
#lg-profit .pf-chip:focus-visible { outline: 2px solid var(--p-bright); outline-offset: 2px; }

/* 表格 */
#lg-profit .pf-tablewrap { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
#lg-profit .pf-table { width: 100%; min-width: 1180px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
#lg-profit .pf-table.shops { min-width: 820px; }
#lg-profit .pf-table.cost { min-width: 860px; }
#lg-profit .pf-table.exp { min-width: 560px; }
#lg-profit .pf-table th, #lg-profit .pf-table td { padding: 9px 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--p-grid); background: #fff; }
#lg-profit .pf-table thead th { position: sticky; top: 0; z-index: 2; background: #f6f9f8; color: #4b5a57; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
#lg-profit .pf-table tfoot td { background: #f6f9f8; border-top: 2px solid var(--p-grid); border-bottom: 0; }
#lg-profit .pf-table tbody tr:hover > td { background: #f8fbfa; }
#lg-profit .pf-table tbody.dim { opacity: .55; }
#lg-profit .pf-table .c0 { position: sticky; left: 0; z-index: 1; min-width: 230px; max-width: 300px; box-shadow: 1px 0 0 var(--p-grid); }
#lg-profit .pf-table thead .c0 { z-index: 3; }
#lg-profit .pf-table tr.r-loss > td.c0 { box-shadow: inset 3px 0 0 var(--p-neg), 1px 0 0 var(--p-grid); }
#lg-profit .pf-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#lg-profit .pf-table .minus { color: var(--p-minus); }
#lg-profit .pf-table .old { color: #8a9895; }
#lg-profit .pf-num.pos { color: var(--p-pos); }
#lg-profit .pf-num.neg { color: var(--p-neg); }
#lg-profit .pf-margin.neg { color: var(--p-neg); font-weight: 700; }
#lg-profit .pf-margin.low { color: var(--p-warn); font-weight: 600; }
#lg-profit .pf-prod { display: flex; align-items: center; gap: 8px; min-width: 0; }
#lg-profit .pf-prod img, #lg-profit .pf-noimg { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: #f1f4f3; border: 1px solid var(--p-line); }
#lg-profit .pf-prod.sm img { width: 30px; height: 30px; }
#lg-profit .pf-prod > div { min-width: 0; }
#lg-profit .pf-prod b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-weight: 600; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
#lg-profit .pf-prod small { display: block; color: var(--p-muted); font-size: 11.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lg-profit .pf-src { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; line-height: 18px; background: #eef2f1; color: #4b5a57; white-space: nowrap; vertical-align: middle; }
#lg-profit .pf-src.s-purchase { background: var(--p-soft); color: var(--p-brand); }
#lg-profit .pf-src.s-manual, #lg-profit .pf-src.s-adjust { background: #eef1fb; color: #3d4f99; }
#lg-profit .pf-src.s-estimated { background: var(--p-warn-bg); color: #7a5a10; }
#lg-profit .pf-src.s-missing { background: var(--p-neg-bg); color: var(--p-neg); }
#lg-profit .pf-dash { color: #b8c2bf; }
#lg-profit .pf-state { text-align: center; padding: 36px 16px; color: var(--p-muted); font-size: 14px; }
#lg-profit .pf-state.warn { display: flex; justify-content: center; align-items: center; gap: 8px; color: #7a4f10; background: var(--p-warn-bg); border-radius: 12px; padding: 18px; }
#lg-profit .pf-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 2px; font-size: 13px; color: var(--p-muted); }
#lg-profit .pf-barcell { position: relative; display: flex; justify-content: flex-end; align-items: center; min-width: 140px; }
#lg-profit .pf-barcell span { position: absolute; left: 0; top: 50%; height: 8px; margin-top: -4px; border-radius: 999px; background: #cfe8e3; }
#lg-profit .pf-barcell span.neg { background: #f6c4c0; }
#lg-profit .pf-barcell b { position: relative; }

/* 订单展开 */
#lg-profit tr.pf-orow { cursor: pointer; }
#lg-profit .pf-chev { display: inline-flex; color: #8a9895; transition: transform .15s; }
#lg-profit .pf-chev svg { width: 14px; height: 14px; }
#lg-profit tr.pf-orow.open .pf-chev { transform: rotate(90deg); color: var(--p-brand); }
#lg-profit tr.pf-orow.open > td { background: #f6faf9; border-bottom-color: transparent; }
#lg-profit tr.pf-odetail > td, #lg-profit tr.pf-sub > td { background: #f6faf9; padding: 4px 14px 14px; }
#lg-profit .pf-odetail-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 14px; position: sticky; left: 0; max-width: calc(100vw - 48px); }
#lg-profit .pf-items { display: grid; gap: 6px; align-content: start; }
#lg-profit .pf-items > div { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #fff; border: 1px solid var(--p-line); border-radius: 10px; font-size: 13px; }
#lg-profit .pf-items img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }
#lg-profit .pf-items span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lg-profit .pf-items small { color: var(--p-muted); white-space: nowrap; }
#lg-profit .pf-break { background: #fff; border: 1px solid var(--p-line); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
#lg-profit .pf-break > b { display: block; margin-bottom: 6px; }
#lg-profit .pf-break > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
#lg-profit .pf-break > div small { color: var(--p-muted); font-size: 11.5px; }
#lg-profit .pf-break em { font-style: normal; font-variant-numeric: tabular-nums; }
#lg-profit .pf-break em.neg { color: var(--p-minus); }
#lg-profit .pf-break .strong { border-top: 1px dashed var(--p-grid); font-weight: 700; padding-top: 6px; margin-top: 2px; }
#lg-profit .pf-break .old { color: #8a9895; font-size: 12px; border-top: 1px solid var(--p-grid); margin-top: 6px; padding-top: 6px; }

/* 设置 */
#lg-profit .pf-subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
#lg-profit .pf-basis { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: #f3f7f6; color: #23413c; font-size: 12.5px; line-height: 1.55; }
#lg-profit .pf-basis svg { color: var(--p-brand); margin-top: 1px; }
#lg-profit .pf-accs { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px; }
#lg-profit .pf-acc { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#lg-profit .pf-acc-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#lg-profit .pf-acc-h b { font-size: 15px; }
#lg-profit .pf-acc-h small { display: block; color: var(--p-muted); font-size: 12px; margin-top: 2px; }
#lg-profit .pf-methods { display: grid; gap: 4px; }
#lg-profit .pf-radio { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--p-grid); font-size: 13px; cursor: pointer; }
#lg-profit .pf-radio:has(input:checked) { border-color: var(--p-bright); background: var(--p-soft); color: var(--p-brand); font-weight: 600; }
#lg-profit .pf-radio input { accent-color: var(--p-brand); }
#lg-profit .pf-simples { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#lg-profit .pf-simples > div { background: #f6f9f8; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#lg-profit .pf-simples span { font-size: 12px; color: var(--p-muted); }
#lg-profit .pf-simples b { font-size: 18px; font-variant-numeric: tabular-nums; }
#lg-profit .pf-simples b.big { font-size: 24px; color: var(--p-brand); }
#lg-profit .pf-simples small { font-size: 11.5px; color: var(--p-muted); line-height: 1.4; }
#lg-profit .pf-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 12.5px; line-height: 1.55; color: #5c4010; background: var(--p-warn-bg); padding: 8px 10px; border-radius: 10px; }
#lg-profit .pf-note svg { color: var(--p-warn); margin-top: 2px; }
#lg-profit .pf-acc-f { display: flex; justify-content: flex-end; }
#lg-profit .pf-stable { margin-top: 12px; background: #fff; border: 1px solid var(--p-line); border-radius: 12px; padding: 8px 14px; font-size: 13px; }
#lg-profit .pf-stable summary { cursor: pointer; font-weight: 600; }
#lg-profit .pf-stable table { border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
#lg-profit .pf-stable th, #lg-profit .pf-stable td { padding: 4px 14px 4px 0; text-align: left; }
#lg-profit .pf-formcard { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; }
#lg-profit .pf-formcard.slim { padding: 10px 14px; }
#lg-profit .pf-formcard p { margin: 0 0 10px; font-size: 13px; color: #3c4a47; line-height: 1.55; }
#lg-profit .pf-formcard small { color: var(--p-muted); font-size: 12px; }
#lg-profit .pf-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
#lg-profit .pf-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--p-muted); min-width: 120px; }
#lg-profit .pf-field.grow { flex: 1 1 200px; }
#lg-profit .pf-field input, #lg-profit .pf-field select { width: 100%; }
#lg-profit .pf-ops { white-space: nowrap; text-align: right; }
#lg-profit .pf-ops .mlq-link { margin-left: 12px; }
#lg-profit .pf-ops .mlq-link svg { width: 16px; height: 16px; }
#lg-profit .pf-lastin { color: #3c4a47; line-height: 1.4; }
#lg-profit .pf-hist { border-collapse: collapse; width: 100%; font-size: 12.5px; background: #fff; border-radius: 10px; overflow: hidden; }
#lg-profit .pf-hist th, #lg-profit .pf-hist td { padding: 5px 10px; border-bottom: 1px solid var(--p-grid); text-align: left; }
#lg-profit .pf-hist .num { text-align: right; font-variant-numeric: tabular-nums; }
#lg-profit .pf-hist small { color: var(--p-muted); }
#lg-profit .pf-cat { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2f1; color: #4b5a57; }
#lg-profit .pf-cat.c-rent { background: #e8f0fb; color: #2f5d9e; }
#lg-profit .pf-cat.c-staff { background: #f1eefb; color: #5b47a8; }
#lg-profit .pf-cat.c-software { background: var(--p-soft); color: var(--p-brand); }
#lg-profit .pf-cat.c-utilities { background: #fff4d9; color: #7a5a10; }
#lg-profit .pf-cat.c-packaging { background: #fdeee4; color: #9a4d16; }

/* 菜单：复制出来的「利润报表」在本页时高亮；本页时原菜单项不高亮 */
aside [data-lg-profit-item] .lg-profit-active { background: #E8F8F6 !important; color: #0d7b6d; }
body.lg-profit-on aside li:not([data-lg-profit-item]) > a .\!bg-\[\#E8F8F6\] { background: transparent !important; }

/* 窄屏 */
@media (max-width: 1280px) {
  #lg-profit .pf-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #lg-profit .pf-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  #lg-profit .pf-title h1 { font-size: 20px; }
  #lg-profit .pf-bar { position: static; flex-direction: column; align-items: stretch; }
  #lg-profit .pf-filters > * { flex: 1 1 calc(50% - 4px); }
  #lg-profit .pf-custom { flex: 1 1 100%; }
  #lg-profit .pf-custom input { flex: 1 1 0; }
  #lg-profit .pf-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #lg-profit .pf-card b { font-size: 18px; }
  #lg-profit .pf-table .c0 { min-width: 170px; max-width: 190px; }
  #lg-profit .pf-accs { grid-template-columns: minmax(0, 1fr); }
  #lg-profit .pf-simples { grid-template-columns: minmax(0, 1fr); }
  #lg-profit .pf-odetail-in { grid-template-columns: minmax(0, 1fr); max-width: calc(100vw - 32px); }
  #lg-profit .pf-row > * { flex: 1 1 100%; }
}

/* 2026-11-23：佣金列下面小字显示佣金率 */
#lg-profit .pf-rate { display: block; font-size: 11px; color: #8a9895; font-weight: 500; }

/* 2026-11-23：订单利润明细重做（顶部结论 / 每 R$100 去向 / 分组明细 / 商品成本 / 新旧对比） */
#lg-profit tr.pf-odetail > td { padding: 0 0 16px; }
#lg-profit .pf-odetail-in { display: block; position: sticky; left: 0; max-width: none; padding: 14px 16px 4px; }
#lg-profit .pf-od-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 12px; }
#lg-profit .pf-od-id { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
#lg-profit .pf-od-id b { font-size: 15px; }
#lg-profit .pf-od-id small { color: var(--p-muted); font-size: 12px; }
#lg-profit .pf-od-kpis { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#lg-profit .pf-od-kpis > div { display: flex; flex-direction: column; padding: 6px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--p-line); min-width: 110px; }
#lg-profit .pf-od-kpis > div span { font-size: 11.5px; color: var(--p-muted); }
#lg-profit .pf-od-kpis > div b { font-size: 17px; font-variant-numeric: tabular-nums; }
#lg-profit .pf-od-kpis > div b.neg { color: var(--p-neg); }
#lg-profit .pf-od-kpis > div.hero { background: linear-gradient(120deg, #0d7b6d, #13b8a6); border-color: transparent; color: #fff; }
#lg-profit .pf-od-kpis > div.hero span { color: rgba(255,255,255,.88); }
#lg-profit .pf-od-kpis > div.hero.neg { background: var(--p-neg); }
#lg-profit .pf-od-kpis > i { font-style: normal; color: #9aa7a4; }
#lg-profit .pf-od-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 14px; align-items: start; }
#lg-profit .pf-od-left { display: grid; gap: 12px; min-width: 0; }
#lg-profit .pf-od-t { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #23413c; }
#lg-profit .pf-od-where, #lg-profit .pf-od-items, #lg-profit .pf-od-table { background: #fff; border: 1px solid var(--p-line); border-radius: 14px; padding: 12px 14px; }
#lg-profit .pf-od-seg { display: flex; height: 18px; border-radius: 6px; overflow: hidden; gap: 2px; background: #eef2f1; }
#lg-profit .pf-od-seg i, #lg-profit .pf-od-legend i { display: block; min-width: 3px; }
#lg-profit .c-comm { background: #e46a5f; }
#lg-profit .c-fees { background: #f2a8a3; }
#lg-profit .c-ship { background: #f0a13a; }
#lg-profit .c-tax { background: #9b7fd1; }
#lg-profit .c-cost { background: #5aa9e6; }
#lg-profit .c-fixed { background: #9fb3c8; }
#lg-profit .c-ads { background: #f2c230; }
#lg-profit .c-exp { background: #c6a589; }
#lg-profit .c-net { background: #13b8a6; }
#lg-profit .c-loss { background: var(--p-neg); }
#lg-profit .pf-od-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: #3c4a47; }
#lg-profit .pf-od-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
#lg-profit .pf-od-legend i { width: 10px; height: 10px; border-radius: 3px; }
#lg-profit .pf-od-legend b { font-variant-numeric: tabular-nums; }
#lg-profit .pf-od-legend b.pos { color: var(--p-pos); }
#lg-profit .pf-od-legend b.neg { color: var(--p-neg); }
#lg-profit .pf-od-lossnote { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--p-neg); }
#lg-profit .pf-od-lossnote svg { width: 14px; height: 14px; }
#lg-profit .pf-od-items table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
#lg-profit .pf-od-items th { text-align: left; font-weight: 600; color: var(--p-muted); padding: 4px 6px; border-bottom: 1px solid var(--p-grid); }
#lg-profit .pf-od-items td { padding: 6px; border-bottom: 1px solid #f1f4f3; vertical-align: middle; }
#lg-profit .pf-od-items tr:last-child td { border-bottom: 0; }
#lg-profit .pf-od-items .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#lg-profit .pf-od-items .pf-prod b { -webkit-line-clamp: 1; }
#lg-profit .pf-od-old { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 10px; background: #f3f7f6; font-size: 12.5px; color: #3c4a47; line-height: 1.55; }
#lg-profit .pf-od-old svg { color: var(--p-brand); margin-top: 2px; width: 14px; height: 14px; }
#lg-profit .pf-od-cols, #lg-profit .pf-od-line, #lg-profit .pf-od-total { display: grid; grid-template-columns: minmax(0, 1fr) auto 58px; gap: 10px; align-items: baseline; }
#lg-profit .pf-od-cols { font-size: 11.5px; color: var(--p-muted); padding-bottom: 6px; border-bottom: 1px solid var(--p-grid); }
#lg-profit .pf-od-cols span:nth-child(n+2) { text-align: right; }
#lg-profit .pf-od-group { padding: 6px 0; border-bottom: 1px solid #f1f4f3; }
#lg-profit .pf-od-gt { font-size: 11.5px; font-weight: 700; color: #8a9895; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 2px; }
#lg-profit .pf-od-line { padding: 3px 0; font-size: 13px; }
#lg-profit .pf-od-line > div, #lg-profit .pf-od-total > div { min-width: 0; }
#lg-profit .pf-od-line small, #lg-profit .pf-od-total small { display: block; font-size: 11.5px; color: var(--p-muted); line-height: 1.35; }
#lg-profit .pf-od-line em, #lg-profit .pf-od-total em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#lg-profit .pf-od-line em.neg { color: #a33a3a; }
#lg-profit .pf-od-line em.zero { color: #b8c2bf; }
#lg-profit .pf-od-line i, #lg-profit .pf-od-total i { font-style: normal; text-align: right; font-size: 12px; color: var(--p-muted); font-variant-numeric: tabular-nums; }
#lg-profit .pf-od-total { padding: 8px 0; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--p-grid); }
#lg-profit .pf-od-total em { color: var(--p-pos); }
#lg-profit .pf-od-total.neg em { color: var(--p-neg); }
#lg-profit .pf-od-total.big { border-bottom: 0; border-top: 2px solid #23413c; margin-top: 2px; font-size: 15px; }
#lg-profit .pf-od-total.big i { color: inherit; font-weight: 700; }
@media (max-width: 900px) {
  #lg-profit .pf-od-grid { grid-template-columns: minmax(0, 1fr); }
  #lg-profit .pf-od-kpis > div { min-width: 0; flex: 1 1 0; }
  #lg-profit .pf-od-kpis { width: 100%; }
}
@media (max-width: 720px) {
  #lg-profit .pf-odetail-in { padding: 12px 10px 4px; }
  #lg-profit .pf-od-kpis > i { display: none; }
  #lg-profit .pf-od-items th:nth-child(2), #lg-profit .pf-od-items td:nth-child(2) { display: none; }
}
/* 2026-11-23：手机上葡语标签较长，标签行和筛选不要被内容撑宽（标签行在框内横滑） */
@media (max-width: 720px) {
  #lg-profit .pf-bar > .pf-tabs, #lg-profit .pf-bar > .pf-filters { width: 100%; max-width: 100%; min-width: 0; }
  #lg-profit .pf-filters .pf-select { width: 0; min-width: 0; }
}

/* 2026-11-23：订单利润详情独立页面；列表里订单号是链接，整行可点 */
#lg-profit .pf-olink { font-weight: 700; font-size: 13px; color: var(--p-brand); text-decoration: none; }
#lg-profit .pf-olink:hover { text-decoration: underline; }
#lg-profit tr.pf-orow:hover > td { background: #f1f8f6; }
#lg-profit .pf-go { display: inline-flex; vertical-align: middle; margin-left: 6px; color: #9aa7a4; }
#lg-profit .pf-go svg { width: 14px; height: 14px; }
#lg-profit tr.pf-orow:hover .pf-go { color: var(--p-brand); }
#lg-profit.pf-page-order { max-width: 1280px; }
#lg-profit .pf-op-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
#lg-profit .pf-op-top h1 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; flex-wrap: wrap; }
#lg-profit .pf-op-top h1 svg { width: 28px; height: 28px; padding: 6px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #0d7b6d, #13b8a6); }
#lg-profit .pf-op-top h1 span { font-size: 15px; font-weight: 600; color: var(--p-muted); }
#lg-profit .pf-back { text-decoration: none; }
#lg-profit .pf-odetail-in.page { position: static; width: auto !important; padding: 0; }
#lg-profit .pf-odetail-in.page .pf-od-head { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: 14px 16px; }
#lg-profit .pf-odetail-in.page .pf-od-grid { grid-template-columns: minmax(0, 1fr) minmax(380px, 480px); }
@media (max-width: 900px) {
  #lg-profit .pf-odetail-in.page .pf-od-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  #lg-profit .pf-op-top h1 { font-size: 18px; }
  #lg-profit .pf-odetail-in.page .pf-od-head { padding: 12px; }
}

/* ===== 2026-11-23：订单利润详情页 v2（概要 / 利润构成 / 商品明细 / 诊断 / 对比 / 数据来源） ===== */
#lg-profit.pf-page-order { max-width: 1320px; }
#lg-profit .pf-op-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
#lg-profit .pf-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--p-muted); flex-wrap: wrap; min-width: 0; }
#lg-profit .pf-crumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--p-brand); text-decoration: none; font-weight: 600; }
#lg-profit .pf-crumb a:hover { text-decoration: underline; }
#lg-profit .pf-crumb a svg { width: 16px; height: 16px; }
#lg-profit .pf-crumb b { color: var(--p-ink); }
#lg-profit .pf-op-nav { display: flex; align-items: center; gap: 8px; }
#lg-profit .pf-op-nav small { color: var(--p-muted); font-size: 12px; white-space: nowrap; }
#lg-profit .pf-op-nav a { text-decoration: none; }
#lg-profit .pf-op-nav [aria-disabled="true"] { opacity: .4; cursor: default; }

#lg-profit .pf-op-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--p-line); margin-bottom: 14px; position: relative; overflow: hidden; }
#lg-profit .pf-op-hero::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--p-bright); }
#lg-profit .pf-op-hero.v-loss::before { background: var(--p-neg); }
#lg-profit .pf-op-hero.v-low::before { background: #f0a13a; }
#lg-profit .pf-op-kicker { font-size: 12px; color: var(--p-muted); font-weight: 600; letter-spacing: .02em; }
#lg-profit .pf-op-id h1 { margin: 2px 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
#lg-profit .pf-op-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#lg-profit .pf-op-chips span { padding: 2px 10px; border-radius: 999px; background: #f1f4f3; color: #3c4a47; font-size: 12.5px; }
#lg-profit .pf-op-chips span.st.ok { background: var(--p-soft); color: var(--p-brand); font-weight: 600; }
#lg-profit .pf-op-chips span.st.wait { background: var(--p-warn-bg); color: #7a5a10; font-weight: 600; }
#lg-profit .pf-op-pid { display: block; margin-top: 8px; color: #8a9895; font-size: 12px; }
#lg-profit .pf-op-result { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right; }
#lg-profit .pf-op-verdict { padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--p-soft); color: var(--p-brand); }
#lg-profit .v-loss .pf-op-verdict { background: var(--p-neg-bg); color: var(--p-neg); }
#lg-profit .v-low .pf-op-verdict { background: var(--p-warn-bg); color: #7a5a10; }
#lg-profit .pf-op-result b { font-size: 34px; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--p-pos); }
#lg-profit .v-loss .pf-op-result b { color: var(--p-neg); }
#lg-profit .v-low .pf-op-result b { color: #9a5b0b; }
#lg-profit .pf-op-result small { color: var(--p-muted); font-size: 12.5px; margin-top: 2px; }
#lg-profit .pf-op-kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--p-grid); border-radius: 12px; overflow: hidden; }
#lg-profit .pf-op-kpi { background: #f8fbfa; padding: 10px 14px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#lg-profit .pf-op-kpi span { font-size: 12px; color: var(--p-muted); }
#lg-profit .pf-op-kpi b { font-size: 18px; font-variant-numeric: tabular-nums; }
#lg-profit .pf-op-kpi b.neg { color: var(--p-neg); }
#lg-profit .pf-op-kpi small { font-size: 12px; color: var(--p-muted); }

#lg-profit .pf-op-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
#lg-profit .pf-op-col { display: grid; gap: 14px; min-width: 0; }
#lg-profit .pf-op-side { display: grid; gap: 14px; position: sticky; top: 12px; min-width: 0; }
#lg-profit .pf-op-card { background: #fff; border: 1px solid var(--p-line); border-radius: 16px; padding: 14px 16px; min-width: 0; }
#lg-profit .pf-op-card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 10px; }
#lg-profit .pf-op-card h2 { margin: 0; font-size: 15px; }
#lg-profit .pf-op-card > header small { color: var(--p-muted); font-size: 12px; }

/* 利润构成 */
#lg-profit .pf-cp-start, #lg-profit .pf-cp-row, #lg-profit .pf-cp-sub { display: grid; grid-template-columns: minmax(170px, 1.3fr) minmax(80px, 1fr) 104px 56px; gap: 12px; align-items: center; }
#lg-profit .pf-cp-start { padding: 8px 0 10px; border-bottom: 1px solid var(--p-grid); font-weight: 700; }
#lg-profit .pf-cp-start span { grid-column: 1 / 3; }
#lg-profit .pf-cp-start small { display: block; font-weight: 400; font-size: 11.5px; color: var(--p-muted); }
#lg-profit .pf-cp-start em, #lg-profit .pf-cp-row em, #lg-profit .pf-cp-sub em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#lg-profit .pf-cp-start b, #lg-profit .pf-cp-row b, #lg-profit .pf-cp-sub b { text-align: right; font-size: 12px; color: var(--p-muted); font-variant-numeric: tabular-nums; font-weight: 600; }
#lg-profit .pf-cp-group { padding: 6px 0; border-bottom: 1px solid #f1f4f3; }
#lg-profit .pf-cp-gt { font-size: 11px; font-weight: 700; color: #8a9895; text-transform: uppercase; letter-spacing: .03em; margin: 2px 0; }
#lg-profit .pf-cp-row { padding: 5px 0; font-size: 13px; }
#lg-profit .pf-cp-l { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
#lg-profit .pf-cp-l .dot { width: 9px; height: 9px; border-radius: 3px; margin-top: 5px; flex: 0 0 auto; }
#lg-profit .pf-cp-l small { display: block; color: var(--p-muted); font-size: 11.5px; line-height: 1.35; }
#lg-profit .pf-cp-bar { height: 8px; border-radius: 999px; background: #f1f4f3; overflow: hidden; }
#lg-profit .pf-cp-bar i { display: block; height: 100%; border-radius: inherit; }
#lg-profit .pf-cp-row em { color: #a33a3a; }
#lg-profit .pf-cp-row.zero em { color: #b8c2bf; font-size: 12px; }
#lg-profit .pf-cp-row.zero .pf-cp-l span { color: #8a9895; }
#lg-profit .pf-cp-sub { padding: 10px 0; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--p-grid); }
#lg-profit .pf-cp-sub span { grid-column: 1 / 3; }
#lg-profit .pf-cp-sub em { color: var(--p-pos); }
#lg-profit .pf-cp-sub.neg em, #lg-profit .pf-cp-sub.neg b { color: var(--p-neg); }
#lg-profit .pf-cp-sub.big { border-bottom: 0; border-top: 2px solid #23413c; margin-top: 4px; font-size: 16px; }
#lg-profit .pf-cp-sub.big b { color: inherit; font-size: 13px; }
#lg-profit .pf-cp-sub.big.neg b { color: var(--p-neg); }

/* 商品明细 */
#lg-profit .pf-op-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#lg-profit .pf-op-items { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; }
#lg-profit .pf-op-items th { text-align: left; font-size: 12px; font-weight: 600; color: var(--p-muted); padding: 6px 8px; border-bottom: 1px solid var(--p-grid); white-space: nowrap; }
#lg-profit .pf-op-items td { padding: 10px 8px; border-bottom: 1px solid #f1f4f3; vertical-align: middle; }
#lg-profit .pf-op-items tr:last-child td { border-bottom: 0; }
#lg-profit .pf-op-items .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#lg-profit .pf-op-items .minus { color: var(--p-minus); }
#lg-profit .pf-op-items td small { display: block; font-size: 11.5px; color: var(--p-muted); margin-top: 2px; }
#lg-profit .pf-op-items td small.neg { color: var(--p-neg); font-weight: 600; }
#lg-profit .pf-op-items .pf-prod { min-width: 220px; }

/* 诊断 */
#lg-profit .pf-dx ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#lg-profit .pf-dx li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; padding: 8px 10px; border-radius: 10px; background: #f6f9f8; }
#lg-profit .pf-dx li svg { width: 15px; height: 15px; margin-top: 2px; flex: 0 0 auto; }
#lg-profit .pf-dx li.bad { background: var(--p-neg-bg); color: #8c2a2a; }
#lg-profit .pf-dx li.bad svg { color: var(--p-neg); }
#lg-profit .pf-dx li.warn { background: var(--p-warn-bg); color: #5c4010; }
#lg-profit .pf-dx li.warn svg { color: var(--p-warn); }
#lg-profit .pf-dx li.info svg { color: #6b7a77; }
#lg-profit .pf-dx li.ok { background: var(--p-soft); color: #1f5a4f; }
#lg-profit .pf-dx li.ok svg { color: var(--p-brand); }

/* 对比 */
#lg-profit .pf-bn-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(70px, 1fr) 54px; gap: 10px; align-items: center; font-size: 12.5px; padding: 5px 0; }
#lg-profit .pf-bn-row.me { font-weight: 700; }
#lg-profit .pf-bn-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lg-profit .pf-bn-track { position: relative; height: 10px; border-radius: 999px; background: #f1f4f3; }
#lg-profit .pf-bn-track .zero { position: absolute; top: -3px; bottom: -3px; width: 1px; background: #9aa7a4; }
#lg-profit .pf-bn-track .bar { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
#lg-profit .pf-bn-track .bar.pos { background: #13b8a6; }
#lg-profit .pf-bn-track .bar.neg { background: #e46a5f; }
#lg-profit .pf-bn-row b { text-align: right; font-variant-numeric: tabular-nums; }
#lg-profit .pf-bn-row b.pos { color: var(--p-pos); }
#lg-profit .pf-bn-row b.neg { color: var(--p-neg); }

/* 数据来源 */
#lg-profit .pf-src-card dl { margin: 0; display: grid; gap: 6px; }
#lg-profit .pf-src-card dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
#lg-profit .pf-src-card dt { color: var(--p-muted); }
#lg-profit .pf-src-card dd { margin: 0; text-align: right; font-weight: 600; }
#lg-profit .pf-src-card dd.warn { color: #9a5b0b; }
#lg-profit .pf-src-card dd.bad { color: var(--p-neg); }
#lg-profit .pf-op-oldnew { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--p-grid); font-size: 13px; }
#lg-profit .pf-op-oldnew span { color: var(--p-muted); }
#lg-profit .pf-op-oldnew s { color: #8a9895; }
#lg-profit .pf-op-oldnew b { color: var(--p-pos); font-size: 15px; }
#lg-profit .pf-op-oldnew b.neg { color: var(--p-neg); }
#lg-profit .pf-op-oldnote { display: block; color: var(--p-muted); font-size: 11.5px; margin-top: 4px; }

@media (max-width: 1180px) {
  #lg-profit .pf-op-main { grid-template-columns: minmax(0, 1fr); }
  #lg-profit .pf-op-side { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
@media (max-width: 720px) {
  #lg-profit .pf-op-hero { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  #lg-profit .pf-op-result { align-items: flex-start; text-align: left; }
  #lg-profit .pf-op-result b { font-size: 28px; }
  #lg-profit .pf-op-id h1 { font-size: 21px; }
  #lg-profit .pf-op-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #lg-profit .pf-op-bar { flex-direction: column; align-items: stretch; }
  #lg-profit .pf-op-nav { justify-content: space-between; }
  #lg-profit .pf-op-card { padding: 12px; }
  #lg-profit .pf-cp-row, #lg-profit .pf-cp-start, #lg-profit .pf-cp-sub { grid-template-columns: minmax(0, 1fr) 92px 46px; gap: 8px; }
  #lg-profit .pf-cp-row .pf-cp-bar { grid-column: 1 / -1; grid-row: 2; }
  #lg-profit .pf-cp-start span, #lg-profit .pf-cp-sub span { grid-column: 1; }
}

/* 2026-11-23：真实后端第一次打开时后台补算的提示 */
#lg-profit .pf-comp-in.calc { background: #fff8e6; border-color: #f2d48a; color: #7a5a00; margin-bottom: 8px; }
#lg-profit .pf-comp-in.calc svg { color: #c98a00; }

/* 2026-11-23 Shopee：店铺表里的平台名 */
#lg-profit .pf-plat { display: block; font-size: 11px; color: #8a9895; font-weight: 500; }
