.profit-overview{display:grid;gap:12px}.profit-period-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.profit-period-card{min-width:0;padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--white);box-shadow:var(--surface-shadow,none)}.profit-period-card small,.profit-period-card span{display:block;color:var(--muted);font-size:.75rem;line-height:1.35}.profit-period-card strong{display:block;margin:4px 0 5px;font-size:clamp(1rem,2.7vw,1.3rem);line-height:1.25;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.profit-period-card strong.positive{color:#28745c}.profit-period-card strong.negative{color:var(--danger)}.profit-period-card strong.is-pending{color:var(--muted);font-size:1rem}.profit-curve-panel{margin:0}.profit-curve-panel .panel-head{padding:13px 15px}.profit-curve-panel .panel-body{padding:10px 14px 12px}.profit-curve{min-width:0}.profit-curve-svg{display:block;width:100%;height:142px;overflow:visible}.profit-curve-zero{stroke:var(--line);stroke-width:1;stroke-dasharray:3 4}.profit-curve-line{fill:none;stroke:var(--green);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.profit-curve-points circle{fill:var(--accent);stroke:var(--green);stroke-width:1.5}.profit-curve-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin-top:-2px}.profit-curve-days span{min-width:0;text-align:center}.profit-curve-days b,.profit-curve-days small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profit-curve-days b{font-size:.6875rem}.profit-curve-days small{color:var(--muted);font-size:.625rem}.profit-curve-days .is-unknown{opacity:.62}.profit-curve-status{margin:8px 0 0;color:var(--muted);font-size:.6875rem;line-height:1.35}.profit-overview-note{padding:0 3px;color:var(--muted);font-size:.75rem;line-height:1.5}.profit-overview-note summary{cursor:pointer;color:inherit;font-weight:650}.profit-overview-note p{margin:8px 0 0}.profit-overview-note .tiny{font-size:.6875rem}@media(max-width:700px){.profit-period-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.profit-period-card{padding:10px 11px}.profit-period-card strong{font-size:1.05rem}.profit-curve-panel .panel-body{padding-inline:10px}.profit-curve-svg{height:126px}}@media(max-width:360px){.profit-period-card small,.profit-period-card span{font-size:.6875rem}.profit-curve-days small{display:none}}

/* Distinct lines remain legible in light and dark themes. */
.profit-curve{--profit-chart-line:#175343;--profit-expense-line:#a65312}.profit-curve-legend{display:flex;gap:16px;align-items:center;margin:0 0 8px;font-size:.75rem;color:var(--muted)}.profit-curve-legend span{display:inline-flex;align-items:center;gap:6px}.profit-curve-legend span:before{content:"";width:20px;border-top:3px solid var(--profit-chart-line)}.profit-curve-legend .profit-curve-legend-expense:before{border-color:var(--profit-expense-line);border-top-style:dashed}.profit-curve-line{stroke:var(--profit-chart-line)}.profit-curve-points circle{stroke:var(--profit-chart-line)}.profit-curve-value{fill:var(--profit-chart-line)}.profit-curve-expenses{fill:none;stroke:var(--profit-expense-line);stroke-width:2.5;stroke-dasharray:5 3;stroke-linecap:round;stroke-linejoin:round}.profit-curve-expense-points circle{fill:var(--white);stroke:var(--profit-expense-line);stroke-width:2}.profit-curve-detail{margin-top:8px;color:var(--muted);font-size:.75rem}.profit-curve-detail summary{cursor:pointer;font-weight:650;min-height:36px;display:flex;align-items:center}.profit-curve-detail table{width:100%;border-collapse:collapse}.profit-curve-detail th,.profit-curve-detail td{padding:6px 4px;border-bottom:1px solid var(--line);text-align:right}.profit-curve-detail th:first-child{text-align:left}:root[data-theme=dark] .profit-curve{--profit-chart-line:#a8e2b9;--profit-expense-line:#ffc17a}
