.profit-dashboard{--profit-green:#c0392b;--profit-orange:#168469;--profit-muted:#7c8b9b;min-width:0;color:#29415e}
.profit-toolbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px;margin:18px 0}
.profit-title{display:flex;align-items:center;gap:12px;min-width:0;flex-wrap:wrap}.profit-title h2{font-size:20px;margin:0;color:#254266}.profit-title button{padding:7px 11px;font-size:12px;white-space:nowrap}
.profit-sort{display:flex;align-items:center;justify-content:center;gap:3px;background:#f2f6fc;border:1px solid #dce6f2;padding:4px;border-radius:8px}.profit-sort>span{font-size:12px;color:#71849a;margin:0 8px}.profit-sort button{font-size:12px;padding:6px 12px;background:transparent;border:1px solid transparent;color:#5c718b;white-space:nowrap}.profit-sort button.active{background:#fff;border-color:#c4d9f4;box-shadow:0 1px 3px #244b7810;color:#1268ce;font-weight:600}
.profit-date{display:flex;justify-content:flex-end;align-items:center;gap:10px;font-size:12px;color:#6d8198}.profit-date button{font-size:12px;padding:7px 12px}
.profit-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}.profit-overview>article{display:flex;flex-direction:column;gap:8px;min-width:0;background:#f7faff;border:1px solid #dce7f4;border-radius:10px;padding:17px 18px}.profit-overview>article>span{font-size:13px;color:#6c8099}.profit-overview strong{font-size:clamp(20px,2vw,28px);line-height:1.3;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:#294668}.profit-overview>article>small{font-size:11px;color:#7b8da2}.profit-overview .profit-coverage strong{font-size:23px;white-space:nowrap}.profit-coverage strong small{font-size:12px;font-weight:400;margin:0 4px;color:#7b8da2}
.profit-overview .positive strong,.profit-dashboard .positive .profit-card-amount,.profit-dashboard .positive .profit-card-ratio b,.profit-dashboard .positive .profit-rank-value,.profit-dashboard .positive .profit-rank-ratio,.profit-detail-summary .positive b{color:var(--profit-green,#168469)}
.profit-overview .negative strong,.profit-dashboard .negative .profit-card-amount,.profit-dashboard .negative .profit-card-ratio b,.profit-dashboard .negative .profit-rank-value,.profit-dashboard .negative .profit-rank-ratio,.profit-detail-summary .negative b{color:var(--profit-orange,#c36c1c)}
.profit-scope{font-size:12px;color:#77899f;line-height:1.7;margin:11px 0 17px}.profit-board{border:1px solid #dce6f2;border-radius:12px;background:#fcfdff;padding:15px}.profit-board-caption{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-8px -15px 6px;padding:8px 15px;flex-wrap:wrap;background:#fcfdff;border-bottom:1px solid #e7eef7;box-shadow:0 8px 12px -12px #244b7833}.profit-legend{display:flex;flex-wrap:wrap;gap:15px;font-size:12px}.profit-legend .positive{color:var(--profit-green)}.profit-legend .negative{color:var(--profit-orange)}.profit-legend .neutral{color:#65788e}.profit-legend .pending{color:#9ba7b5}.profit-board-caption>small{color:#8190a4;font-size:11px}
.profit-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;padding:2px 4px 4px 2px}.profit-cards,.profit-rank-list{max-height: min(64vh,840px);overflow-y:auto;scrollbar-gutter:stable}
.profit-store{cursor:pointer;font:inherit;text-align:left;min-width:0;transition:border-color .15s,box-shadow .15s}.profit-store:focus-visible{outline:3px solid #559df2;outline-offset:1px}.profit-store:hover{border-color:#a4bfdc;box-shadow:0 3px 12px #214a7510}
.profit-card{display:flex;flex-direction:column;gap:10px;border:1px solid #dfe8f0;border-top:3px solid #b5c0cd;border-radius:9px;background:#fff;padding:13px 14px 10px;white-space:normal;color:#37516c}.profit-card.positive{border-top-color:var(--profit-green);background:linear-gradient(150deg,#fff4f1,#fff 65%)}.profit-card.negative{border-top-color:#168469;background:linear-gradient(150deg,#f3fbf7,#fff 65%)}.profit-card.pending{background:#f6f8fb;color:#8998aa}.profit-card-heading{display:flex;align-items:start;gap:6px;justify-content:space-between}.profit-card-heading>strong{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;color:#38516d}.profit-badge{flex:none;font-size:10px;background:#eef2f7;color:#738499;border-radius:4px;padding:2px 5px;font-weight:400}.positive .profit-badge{background:#fdecea;color:var(--profit-green)}.negative .profit-badge{background:#e5f5ed;color:var(--profit-orange)}
.profit-card-amount{font-size:23px;font-weight:700;line-height:1.2;letter-spacing:-.5px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.profit-card-ratio{font-size:11px;color:#7f90a4;display:flex;align-items:baseline;gap:6px}.profit-card-ratio b{font-size:17px;font-weight:600}.profit-card-ratio small{font-size:10px}.profit-card-cost{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#8090a3}.profit-card-cost>span{display:flex;justify-content:space-between;gap:6px}.profit-card-cost b{font-weight:500;color:#526a83;font-variant-numeric:tabular-nums}.profit-card-link{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e8eef4;padding-top:7px;color:#7b94ad;font-size:10px}
.profit-ranking{overflow-x:auto}.profit-rank-scroll{max-height:min(64vh,840px);overflow-y:auto;scrollbar-gutter:stable both-edges}.profit-rank-head,.profit-rank-row{display:grid;grid-template-columns:351.5px minmax(220px,1fr) 100px 75px 100px 75px;gap:0.5px;justify-content:start;align-items:center;min-width:0}.profit-rank-head{position:sticky;top:0;z-index:6;background:#fcfdff;padding:10px;font-size:11px;color:#8594a7}.profit-rank-head>span:first-child{text-align:center}.profit-rank-head>span:nth-last-child(-n+4){text-align:center}.profit-axis{position:relative;display:block;width:100%;box-sizing:border-box;min-height:16px;font-size:10px}.profit-axis>span{position:absolute;top:0;white-space:nowrap}.profit-axis-left{left:0;text-align:left}.profit-axis-center{left:50%;transform:translateX(-50%);text-align:center;color:#5c7592}.profit-axis-right{right:0;text-align:right}.profit-rank-list{min-width:0;max-height:none;overflow-y:visible;padding-right:0;scrollbar-gutter:auto}.profit-rank-row{width:100%;border:1px solid transparent;border-bottom-color:#e8eef5;border-radius:5px;background:#fff;padding:10px;min-height:49px;color:#60758c}.profit-rank-row:nth-child(even){background:#f6f9fd}.profit-rank-name{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:8px;min-width:0;text-align:left}.profit-rank-name small{font-size:11px;color:#9caabc;width:22px;flex:none;text-align:center}.profit-rank-name strong{font-size:12px;font-weight:500;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.35}.profit-track{height:19px;position:relative;display:block;width:100%;box-sizing:border-box;background:linear-gradient(90deg,#fff5e8 0%,#fffaf4 49.9%,#eef7f3 50%,#eef7f3 100%);border-radius:3px}.profit-zero{position:absolute;left:50%;height:31px;top:-6px;border-left:1px solid #a9b7c8;z-index:1}.profit-bar{position:absolute;top:2px;height:15px;border-radius:3px;background:var(--profit-green)}.profit-bar.right{left:50%}.profit-bar.left{right:50%;background:#168469}.profit-rank-row.pending .profit-bar{background:#93a3b6}.profit-zero-dot{position:absolute;left:calc(50% - 3px);top:6px;width:6px;height:6px;border-radius:50%;background:#74879d;z-index:2}.profit-track-note{font-size:10px;line-height:19px;position:absolute;right:5px;color:#8d9baa}.profit-rank-gross{font-size:14px;text-align:right;font-weight:600;color:#3f5f7a;font-variant-numeric:tabular-nums}.profit-rank-gross-ratio{font-size:13px;text-align:right;color:#647a91;font-variant-numeric:tabular-nums}.profit-rank-value{font-size:14px;text-align:right;font-weight:600;font-variant-numeric:tabular-nums}.profit-rank-ratio{font-size:13px;text-align:right;font-variant-numeric:tabular-nums}.profit-rank-row.pending .profit-track{background:#f0f3f7}.profit-rank-row.pending .profit-rank-value,.profit-rank-row.pending .profit-rank-ratio,.profit-rank-row.pending .profit-rank-gross,.profit-rank-row.pending .profit-rank-gross-ratio{color:#98a4b4}
.profit-footnote{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px 15px;font-size:11px;color:#8192a6;line-height:1.7;margin:12px 2px}.profit-empty{padding:90px 15px;text-align:center;color:#8799ad;font-size:14px}.profit-error{background:#fff4e2;color:#966421;font-size:13px;padding:12px;border:1px solid #ebce9f;border-radius:7px;margin-bottom:12px}.profit-error button{margin-left:12px}
.modal.profit-detail-modal{width:min(920px,94vw);max-width:none}.profit-detail-modal .modal-body{padding:18px 24px;min-width:0}.profit-detail-meta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 14px;color:#73869a;font-size:12px}.profit-detail-meta strong{color:#3f5b7b}.profit-detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid #dce6f2;border-radius:8px;background:#f6f9fd;margin-bottom:22px}.profit-detail-summary>div{padding:14px;display:flex;flex-direction:column;gap:7px;min-width:0}.profit-detail-summary span{font-size:12px;color:#7a8a9e}.profit-detail-summary b{font-size:18px;color:#355373;overflow-wrap:anywhere}.profit-detail-modal h3{font-size:14px;color:#385471;margin:18px 0 12px}.profit-component{display:grid;grid-template-columns:minmax(180px,1.6fr) minmax(70px,1fr) minmax(100px,.7fr);align-items:center;gap:15px;padding:10px 0;border-bottom:1px solid #edf1f6}.profit-component>div{min-width:0}.profit-component strong{font-size:13px;font-weight:500;color:#45607c;overflow-wrap:anywhere}.profit-component small{display:block;font-size:10px;line-height:1.6;color:#8898aa;margin-top:3px;overflow-wrap:anywhere}.profit-component-track{height:6px;background:#eef3f9;border-radius:4px;overflow:hidden}.profit-component-track i{display:block;height:100%;border-radius:4px;background:#83aede}.profit-component.deduction i{background:#5bb799}.profit-component>b{font-size:13px;font-weight:500;text-align:right;color:#45607c;white-space:nowrap;font-variant-numeric:tabular-nums}.profit-component.deduction>b{color:#168469}.profit-detail-total{display:flex;justify-content:space-between;padding:13px 0;color:#2c4d72;font-size:13px;border-bottom:2px solid #d9e4f2}.profit-detail-bottom{display:grid;grid-template-columns:1fr 1fr;gap:24px}.profit-detail-bottom dl{font-size:12px;color:#6f8298;margin:0}.profit-detail-bottom dl>div{display:flex;justify-content:space-between;gap:10px;margin:11px 0}.profit-detail-bottom dd{margin:0;color:#45617f;font-variant-numeric:tabular-nums}.profit-detail-bottom .total{border-top:1px solid #dde7f2;padding-top:10px;font-weight:600}.profit-detail-hint{font-size:11px;color:#8393a7;line-height:1.8;margin-bottom:0}.profit-detail-warning{font-size:12px;color:#956b29;border:1px solid #efd7ae;background:#fff8ec;padding:12px;border-radius:7px;margin-bottom:16px}.profit-detail-warning ul{padding-left:18px;line-height:1.8;margin:6px 0 0}
@media(max-width:1250px){.profit-toolbar{grid-template-columns:1fr auto;gap:14px}.profit-sort{grid-row:2;grid-column:1/-1;justify-self:center}.profit-overview>article{padding:14px}.profit-overview .profit-coverage strong{font-size:20px}}
@media(max-width:760px){.profit-title{gap:8px}.profit-title h2{font-size:18px}.profit-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.profit-overview strong{font-size:22px}.profit-board{padding:10px}.profit-board-caption{margin:-8px -10px 6px;padding:8px 10px}.profit-cards{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:9px}.profit-card{padding:11px}.profit-card-amount{font-size:21px}.profit-date{flex-wrap:wrap;gap:6px}.profit-sort{width:max-content;max-width:100%}.profit-detail-modal .modal-body{padding:12px}.profit-detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.profit-detail-bottom{grid-template-columns:1fr;gap:0}.profit-component{grid-template-columns:minmax(0,1fr) 80px;gap:12px}.profit-component-track{display:none}.profit-detail-summary b{font-size:18px}}
@media(max-width:420px){.profit-toolbar{grid-template-columns:minmax(0,1fr)}.profit-date{grid-row:3;justify-content:space-between}.profit-sort{grid-row:2;grid-column:1;justify-self:stretch;justify-content:space-between}.profit-sort>span{margin:0 5px}.profit-sort button{padding:6px 8px}.profit-cards{grid-template-columns:minmax(0,1fr)}.profit-overview>article{padding:12px}.profit-overview strong{font-size:19px}.profit-overview .profit-coverage strong{font-size:18px}}
@media(prefers-reduced-motion:reduce){.profit-store{transition:none}}
.profit-date-range{display:flex;align-items:center;gap:8px;font-size:12px;color:#64748b}.profit-date-range input,.profit-date-range select{height:34px;border:1px solid #d7e0ea;border-radius:8px;padding:0 8px;background:#fff;color:#33475f}
.profit-rank-pending{font-style:normal;font-size:10px;color:#b45309;background:#fff7e6;border:1px solid #f3d19b;border-radius:6px;padding:1px 4px;margin-left:4px}

.profit-overview>article[data-profit-overview]{position:relative;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.profit-overview>article[data-profit-overview]:hover{border-color:#a4bfdc;box-shadow:0 3px 12px #214a7510}
.profit-overview>article[data-profit-overview]:focus-visible{outline:3px solid #559df2;outline-offset:1px}
.profit-overview>article[data-profit-overview]::after{content:'查看明细 ↗';position:absolute;right:12px;top:9px;font-size:10px;color:#8ba0b6;opacity:.55;transition:opacity .15s}
.profit-overview>article[data-profit-overview]:hover::after,.profit-overview>article[data-profit-overview]:focus-visible::after{opacity:1}
.modal.profit-overview-modal{width:min(1080px,96vw);max-width:none}
.profit-overview-detail{display:flex;flex-direction:column;gap:14px;min-width:0}
.profit-overview-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.profit-overview-kpis>div{background:#f7faff;border:1px solid #dce7f4;border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;min-width:0}
.profit-overview-kpis span{font-size:11px;color:#71839a}
.profit-overview-kpis b{font-size:18px;color:#294668;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.profit-overview-kpis b.positive{color:var(--profit-green)}
.profit-overview-kpis b.negative{color:var(--profit-orange)}
.profit-overview-kpis b.neutral{color:#65788e}
.profit-overview-components{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 16px;border:1px solid #e0e8f2;border-radius:8px;padding:8px 14px;background:#fbfdff}
.profit-overview-components>div{display:grid;grid-template-columns:minmax(0,1fr) auto 40px;align-items:baseline;gap:8px;padding:6px 0;border-bottom:1px solid #edf2f8;font-size:12px;color:#60758c;min-width:0}
.profit-overview-components span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profit-overview-components b{font-variant-numeric:tabular-nums;color:#38516d}
.profit-overview-components small{color:#93a2b3;font-size:10px;text-align:right}
.profit-overview-total{display:flex;justify-content:space-between;align-items:baseline;padding:10px 2px;border-bottom:2px solid #d9e4f2;font-size:13px;color:#2c4d72}
.profit-overview-total b{font-size:20px;font-variant-numeric:tabular-nums;color:#294668}
.profit-overview-table{max-height:min(56vh,520px);overflow:auto;border:1px solid #e0e8f2;border-radius:8px}
.profit-overview-table .data-table{min-width:680px;margin:0}
.profit-overview-table th{position:sticky;top:0;z-index:1;background:#f2f7fd;white-space:nowrap}
.profit-overview-table td{white-space:nowrap}
.profit-overview-table tfoot th{position:sticky;bottom:0;background:#f2f7fd}
@media(max-width:760px){.profit-overview-components{grid-template-columns:repeat(2,minmax(0,1fr))}.profit-overview-kpis{grid-template-columns:minmax(0,1fr)}.modal.profit-overview-modal{width:96vw}}
