[data-finance-panel="dailyProfit"] {
  --dp-bg: #f5f2ee;
  --dp-panel: #ffffff;
  --dp-panel-soft: #faf8f5;
  --dp-border: #ded8e2;
  --dp-border-strong: #cfc4d8;
  --dp-text: #303846;
  --dp-muted: #7d8794;
  --dp-accent: #6f5a82;
  --dp-accent-soft: #eee8f5;
  --dp-green: #128467;
  --dp-green-soft: #e8f5ef;
  --dp-red: #c84f61;
  --dp-red-soft: #fbecef;
  --dp-cyan: #4d9c92;
  --dp-blue: #4f7fa4;
  --dp-purple: #8b6fa2;
  color: var(--dp-text);
  font-size: 12px;
}

[data-finance-panel="dailyProfit"] > .daily-profit-hero,
[data-finance-panel="dailyProfit"] > .panel {
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--dp-border);
  border-radius: 9px;
  background: var(--dp-panel);
  box-shadow: 0 2px 8px rgba(57, 47, 63, .04);
}

[data-finance-panel="dailyProfit"] .daily-profit-hero .daily-profit-method-note { display: none; }
[data-finance-panel="dailyProfit"] .daily-profit-hero .daily-profit-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 8px 0 0; overflow: hidden; border: 1px solid var(--dp-border); border-radius: 7px; background: var(--dp-border); }
[data-finance-panel="dailyProfit"] .dashboard-kpi-card { min-height: 54px; padding: 7px 10px; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-head { margin: 0 0 3px; color: var(--dp-muted); font-size: 10px; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-body { display: flex; align-items: baseline; gap: 7px; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-body strong { font-size: 17px; line-height: 1.1; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-body small { min-height: 0; color: var(--dp-muted); font-size: 9px; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-tools,
[data-finance-panel="dailyProfit"] .dashboard-sparkline { display: none; }
[data-finance-panel="dailyProfit"] .panel-heading { gap: 8px; margin-bottom: 8px; }
[data-finance-panel="dailyProfit"] .panel-heading h2 { font-size: 15px; font-weight: 600; }
[data-finance-panel="dailyProfit"] .panel-heading > span { color: var(--dp-muted); font-size: 11px; }
[data-finance-panel="dailyProfit"] .daily-profit-toolbar { align-items: center; gap: 6px; margin: 0; padding: 0; }
[data-finance-panel="dailyProfit"] .daily-profit-toolbar :is(button, select, input) { min-height: 30px; height: 30px; padding: 4px 9px; border-radius: 6px; font-size: 12px; }

.daily-profit-period-toggle { display: inline-flex; gap: 4px; }
.daily-profit-period-toggle button { min-width: 34px; }
.daily-profit-period-toggle button.active,
.daily-profit-page-numbers button.active { color: #fff; background: var(--dp-accent); border-color: var(--dp-accent); }
.daily-profit-period-field { display: inline-flex; align-items: center; gap: 5px; color: var(--dp-muted); }

.daily-profit-compare-dashboard { display: none; }
.daily-profit-compare-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 7px; }
.daily-profit-compare-summary article { min-height: 66px; padding: 9px 11px; background: var(--dp-panel); border: 1px solid var(--dp-border); border-top: 3px solid var(--dp-accent); border-radius: 7px; }
.daily-profit-compare-summary span { display: block; color: var(--dp-muted); font-size: 11px; }
.daily-profit-compare-summary strong { display: block; margin: 4px 0 2px; color: var(--dp-text); font-size: 20px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.daily-profit-compare-summary small { color: var(--dp-muted); font-size: 10px; }

[data-finance-panel="dailyProfit"] .daily-profit-store-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 7px; }
[data-finance-panel="dailyProfit"] .daily-profit-store { display: block; min-height: 104px; padding: 8px 10px 6px; color: var(--dp-text); background: var(--dp-panel); border: 1px solid var(--dp-border); border-radius: 7px; text-align: left; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
[data-finance-panel="dailyProfit"] .daily-profit-store:hover,
[data-finance-panel="dailyProfit"] .daily-profit-store.active { border-color: var(--dp-accent); background: var(--dp-accent-soft); box-shadow: 0 2px 9px rgba(111, 90, 130, .10); }
.daily-profit-store-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.daily-profit-store-head b { font-weight: 600; }
.daily-profit-store-head em { font-style: normal; font-size: 10px; }
.daily-profit-store-profit { display: block; margin: 5px 0 4px; font-size: 18px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.daily-profit-store-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.daily-profit-store-metrics span { color: var(--dp-muted); font-size: 10px; }
.daily-profit-store-metrics strong { display: block; margin-top: 1px; color: var(--dp-text); font-size: 11px; font-weight: 500; }
.daily-profit-store-sparkline { display: block; width: 100%; height: 19px; margin-top: 2px; }
.daily-profit-store-sparkline polyline { fill: none; stroke: var(--dp-cyan); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.daily-profit-store.is-up .daily-profit-store-sparkline polyline { stroke: var(--dp-green); }
.daily-profit-store.is-down .daily-profit-store-sparkline polyline { stroke: var(--dp-red); }

.daily-profit-compare-bottom { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr); gap: 7px; }
.daily-profit-trend-panel,
.daily-profit-judgement-panel { min-width: 0; overflow: hidden; background: var(--dp-panel); border: 1px solid var(--dp-border); border-radius: 7px; }
.daily-profit-compare-heading { min-height: 34px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--dp-panel-soft); border-bottom: 1px solid var(--dp-border); }
.daily-profit-compare-heading strong { font-size: 12px; }
.daily-profit-compare-heading span { color: var(--dp-muted); font-size: 10px; }
.daily-profit-trend-chart { min-height: 180px; padding: 7px 9px 3px; }
.daily-profit-trend-chart svg { display: block; width: 100%; height: 164px; }
.daily-profit-trend-legend { min-height: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--dp-muted); font-size: 9px; }
.daily-profit-trend-legend span { display: inline-flex; align-items: center; gap: 4px; }
.daily-profit-trend-legend i { width: 11px; height: 3px; border-radius: 2px; }
.daily-profit-trend-chart text { fill: var(--dp-muted); font-size: 9px; }
.daily-profit-trend-chart .grid-line { stroke: #ddd8df; stroke-width: 1; }

.daily-profit-judgement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--dp-border); }
.daily-profit-judgement-grid div { min-height: 62px; padding: 9px 10px; background: var(--dp-panel); border-left: 3px solid #b9a7c8; }
.daily-profit-judgement-grid span { display: block; color: var(--dp-muted); font-size: 10px; }
.daily-profit-judgement-grid strong { display: block; margin-top: 6px; color: var(--dp-text); font-size: 14px; font-weight: 600; }

[data-finance-panel="dailyProfit"] .trend-up,
[data-finance-panel="dailyProfit"] .money-plus { color: var(--dp-green) !important; }
[data-finance-panel="dailyProfit"] .trend-down,
[data-finance-panel="dailyProfit"] .money-minus { color: var(--dp-red) !important; }

.daily-profit-column-filter { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 100%; padding: 1px 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.daily-profit-column-filter span { color: #8d8792; font-size: 9px; }
.daily-profit-column-filter:hover,
.daily-profit-column-filter.active { color: var(--dp-accent); }
.daily-profit-column-filter.active span { color: var(--dp-accent); }

.daily-profit-column-popover { position: fixed; z-index: 10020; width: 292px; padding: 14px; border: 1px solid var(--dp-border-strong); border-radius: 9px; background: #fff; box-shadow: 0 16px 42px rgba(57, 47, 63, .18); color: var(--dp-text); }
.daily-profit-column-popover-head,
.daily-profit-column-popover-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.daily-profit-column-popover-head { margin-bottom: 12px; }
.daily-profit-column-popover-head button { border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.daily-profit-column-popover label { display: grid; gap: 5px; margin-bottom: 10px; color: var(--dp-muted); font-size: 12px; }
.daily-profit-column-popover input,
.daily-profit-column-popover select { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--dp-border-strong); border-radius: 6px; background: #fff; color: var(--dp-text); }
.daily-profit-column-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.daily-profit-column-popover-actions { margin-top: 4px; }

.daily-profit-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 6px 0; color: var(--dp-muted); font-size: 11px; }
.daily-profit-page-numbers { display: flex; align-items: center; gap: 4px; }
.daily-profit-page-numbers button { min-width: 28px; height: 28px; padding: 0 7px; border: 1px solid var(--dp-border-strong); border-radius: 6px; background: #fff; color: #4c5562; cursor: pointer; }
.daily-profit-page-numbers button:disabled { cursor: not-allowed; opacity: .45; }
.daily-profit-page-ellipsis { padding: 0 2px; }
.daily-profit-page-size { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.daily-profit-page-size select { height: 28px; border: 1px solid var(--dp-border-strong); border-radius: 6px; background: #fff; }

[data-finance-panel="dailyProfit"] .finance-summary-table { border: 1px solid var(--dp-border); border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(57, 47, 63, .04); }
[data-finance-panel="dailyProfit"] .finance-summary-table table { min-width: 1400px; border-collapse: separate; border-spacing: 0; font-size: 11px; font-variant-numeric: tabular-nums; }
[data-finance-panel="dailyProfit"] .finance-summary-table th,
[data-finance-panel="dailyProfit"] .finance-summary-table td { height: 31px; padding: 5px 7px; border-right: 1px solid #dddfe1; border-bottom: 1px solid #dddfe1; background: #fff; text-align: center; white-space: nowrap; }
[data-finance-panel="dailyProfit"] .finance-summary-table th { position: sticky; top: 0; z-index: 4; color: #3d4652; font-weight: 600; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(1),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(1) { background: #eeeae5; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(2),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(2) { background: #f6f3f7; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(3),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(3),
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(10),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(10) { background: #f0f8f5; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(4),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(4),
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(9),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(9) { background: #fcf1ed; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(n+5):nth-child(-n+8),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(n+5):nth-child(-n+8) { background: #edf5fa; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(11),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(11) { background: #f5f1f9; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(12),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(12) { background: #eef7f3; }
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(n+3) { text-align: center; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:first-child,
[data-finance-panel="dailyProfit"] .finance-summary-table td:first-child { position: sticky; left: 0; z-index: 3; min-width: 102px; font-weight: 600; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(2),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(2) { position: sticky; left: 102px; z-index: 3; min-width: 152px; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:first-child,
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(2) { z-index: 6; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody tr:hover td { box-shadow: inset 0 0 0 999px rgba(111, 90, 130, .055); }
[data-finance-panel="dailyProfit"] .finance-summary-table tr > :last-child { border-right: 0; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody tr:last-child td { border-bottom: 0; }

[data-finance-panel="auxiliaryData"] {
  --dp-accent: #6f5a82;
  --dp-border: #ded8e2;
  --dp-border-strong: #cfc4d8;
  --dp-muted: #7d8794;
  min-height: 680px;
  padding: 14px 14px 24px;
  color: #303846;
  background: #f5f2ee;
  font-size: 12px;
}
.auxiliary-page-header small { display: block; color: #6f5a82; font-size: 12px; letter-spacing: .05em; }
.auxiliary-page-header h2 { margin: 5px 0 14px; color: #303846; font-size: 25px; line-height: 1.1; font-weight: 600; }
.auxiliary-page-tabs { display: flex; gap: 7px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #ded8e2; }
.auxiliary-page-tabs button { min-height: 39px; padding: 8px 17px; border: 1px solid #cfc4d8; border-radius: 7px; background: #fff; color: #596575; font: inherit; font-size: 12px; cursor: pointer; }
.auxiliary-page-tabs button.active { border-color: #6f5a82; background: #6f5a82; color: #fff; }
[data-finance-panel="auxiliaryData"] > .panel { margin: 0 0 10px; padding: 0; overflow: hidden; border: 1px solid #ded8e2; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(57,47,63,.05); }
[data-finance-panel="auxiliaryData"] .auxiliary-data-filter-panel { padding: 9px 10px; }
.auxiliary-data-toolbar { display: flex; align-items: end; gap: 8px; margin: 0; padding: 0; background: transparent; }
.auxiliary-data-toolbar label { display: flex; flex-direction: column; gap: 4px; min-width: 168px; color: #7a8593; font-size: 11px; }
.auxiliary-data-toolbar :is(input, select) { width: 100%; height: 34px; padding: 0 10px; border: 1px solid #cfc4d8; border-radius: 7px; background: #fbfaf8; color: #3f4a58; font: inherit; font-size: 12px; }
.auxiliary-data-count { margin-left: auto; padding: 0 4px 8px; color: #748092; font-size: 11px; }
[data-finance-panel="auxiliaryData"] .panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 45px; margin: 0; padding: 0 11px; border-bottom: 1px solid #ded8e2; }
[data-finance-panel="auxiliaryData"] .panel-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
[data-finance-panel="auxiliaryData"] .panel-heading span { color: #7f8997; font-size: 11px; }
.auxiliary-data-note { padding: 8px 11px; border-bottom: 1px solid #ded8e2; background: #f4eef8; color: #62536e; font-size: 11px; }
.auxiliary-data-table { max-height: 460px; overflow: auto; border: 0; border-radius: 0; }
.auxiliary-data-table table { width: 100%; min-width: 2440px; border-collapse: separate; border-spacing: 0; font-size: 11px; font-variant-numeric: tabular-nums; }
.auxiliary-data-table th,
.auxiliary-data-table td { min-width: 90px; height: 31px; padding: 5px 7px; border-right: 1px solid #dddfe1; border-bottom: 1px solid #dddfe1; text-align: center; white-space: nowrap; }
.auxiliary-data-table thead th { position: sticky; top: 0; z-index: 3; color: #3d4652; font-weight: 600; }
.auxiliary-data-table thead tr:first-child th { height: 28px; }
.auxiliary-data-table thead tr:nth-child(2) th { top: 28px; height: 34px; white-space: normal; line-height: 1.15; }
.auxiliary-data-table .aux-date { position: sticky; left: 0; z-index: 5; min-width: 100px; background: #eeeae5; }
.auxiliary-data-table th.aux-share { background: #cfe9df; }
.auxiliary-data-table td.aux-share { background: #f0f8f5; }
.auxiliary-data-table th.aux-loan { background: #d2e4f0; }
.auxiliary-data-table td.aux-loan { background: #edf5fa; }
.auxiliary-data-table th.aux-ad { background: #f4d6cb; }
.auxiliary-data-table td.aux-ad { background: #fcf1ed; }
.auxiliary-data-table th.aux-order { background: #e5dcf2; }
.auxiliary-data-table td.aux-order { background: #f5f1f9; }
.auxiliary-data-table tbody tr:hover td { box-shadow: inset 0 0 0 999px rgba(111,90,130,.055); }
[data-finance-panel="auxiliaryData"] .daily-profit-pagination { min-height: 48px; padding: 8px 11px; background: #fff; }

@media (max-width: 1080px) {
  [data-finance-panel="dailyProfit"] .daily-profit-store-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-profit-compare-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .daily-profit-compare-summary { grid-template-columns: 1fr; }
  [data-finance-panel="dailyProfit"] .daily-profit-hero .daily-profit-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-finance-panel="dailyProfit"] .daily-profit-store-list { grid-template-columns: 1fr; }
  .daily-profit-period-field { width: 100%; }
  .daily-profit-period-field input { min-width: 0; flex: 1; }
  .daily-profit-pagination { flex-wrap: wrap; justify-content: center; }
}

/* Compact auxiliary source-detail layout approved on 2026-10-28. */
[data-finance-panel="auxiliaryData"] { font-size: 10px; }
.auxiliary-page-header small { font-size: 10px; }
.auxiliary-page-header h2 { margin: 3px 0 10px; font-size: 18px; }
.auxiliary-page-tabs { padding-bottom: 8px; margin-bottom: 8px; }
.auxiliary-page-tabs button { min-height: 31px; padding: 6px 13px; border-radius: 6px; font-size: 10px; }
[data-finance-panel="auxiliaryData"] .auxiliary-data-filter-panel { padding: 8px 10px; }
.auxiliary-data-toolbar label { gap: 3px; min-width: 150px; font-size: 10px; }
.auxiliary-data-toolbar :is(input, select) { height: 29px; padding: 0 8px; border-radius: 6px; font-size: 10px; }
.auxiliary-data-count { padding: 0 4px 6px; font-size: 10px; }
[data-finance-panel="auxiliaryData"] .panel-heading { position: relative; min-height: 39px; padding: 6px 10px; }
[data-finance-panel="auxiliaryData"] .panel-heading h2 { font-size: 12px; }
[data-finance-panel="auxiliaryData"] .panel-heading span { display: block; margin-top: 1px; font-size: 10px; }
.auxiliary-source-details { position: relative; flex: 0 0 auto; }
.auxiliary-source-details summary { list-style: none; padding: 4px 7px; border-radius: 5px; background: #eef7f3; color: #28725e; font-size: 10px; cursor: pointer; }
.auxiliary-source-details summary::-webkit-details-marker { display: none; }
.auxiliary-source-popover { position: absolute; z-index: 20; top: 28px; right: 0; width: 250px; padding: 6px 9px; border: 1px solid #d7e3de; border-radius: 7px; background: #fff; box-shadow: 0 9px 24px rgba(47,65,59,.14); }
.auxiliary-source-popover p { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 6px 0; border-bottom: 1px solid #e5ebe8; }
.auxiliary-source-popover p:last-child { border-bottom: 0; }
.auxiliary-source-popover strong { color: #33413c; font-weight: 600; }
.auxiliary-source-popover span { margin: 0 !important; color: #78857f !important; white-space: nowrap; }
.daily-profit-inner-tabs .daily-profit-rules-button { margin-left: auto; border: 0; background: transparent; color: #28725e; font-weight: 600; }
.daily-profit-inner-tabs .daily-profit-rules-button:hover,
.daily-profit-inner-tabs .daily-profit-rules-button:focus-visible { text-decoration: underline; background: transparent; }
.daily-profit-rules-dialog { width: min(680px, calc(100vw - 28px)); max-height: min(84vh, 820px); padding: 0; border: 1px solid #cfded8; border-radius: 8px; background: #fff; color: #33413c; box-shadow: 0 20px 55px rgba(34, 66, 55, .24); }
.daily-profit-rules-dialog::backdrop { background: rgba(29, 48, 42, .52); }
.daily-profit-rules-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; border-bottom: 1px solid #dfe9e5; background: #fff; }
.daily-profit-rules-head h2 { margin: 0; font-size: 17px; color: #24352f; }
.daily-profit-rules-head span { display: block; margin-top: 3px; color: #7a8984; font-size: 11px; }
.daily-profit-rules-head button { width: 28px; height: 28px; border: 0; border-radius: 5px; background: #eef5f2; color: #5d7069; font-size: 20px; line-height: 1; cursor: pointer; }
.daily-profit-rules-content { padding: 3px 18px 18px; font-size: 12px; line-height: 1.65; }
.daily-profit-rules-content section { padding: 12px 0; border-bottom: 1px solid #e6eeeb; }
.daily-profit-rules-content section:last-child { border-bottom: 0; }
.daily-profit-rules-content h3 { margin: 0 0 7px; color: #256b57; font-size: 14px; }
.daily-profit-rules-content p { margin: 5px 0; color: #53665f; }
.daily-profit-rules-content p strong { color: #31463f; }
.daily-profit-rule-formulas { overflow: hidden; border: 1px solid #dbe7e2; border-radius: 7px; }
.daily-profit-rule-formulas p { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; margin: 0; padding: 8px 10px; border-bottom: 1px solid #e5ece9; }
.daily-profit-rule-formulas p:last-child { border-bottom: 0; }
.daily-profit-rule-formulas p:nth-child(odd) { background: #f4f9f7; }
@media (max-width: 720px) {
  .daily-profit-inner-tabs .daily-profit-rules-button { margin-left: 0; }
  .daily-profit-rule-formulas p { grid-template-columns: 1fr; gap: 2px; }
}
.auxiliary-data-note { padding: 6px 10px; font-size: 10px; }
.auxiliary-data-table table { min-width: 2760px; font-size: 10px; }
.auxiliary-data-table th,
.auxiliary-data-table td { min-width: 84px; height: 27px; padding: 4px 6px; }
.auxiliary-data-table thead tr:first-child th { height: 27px; }
.auxiliary-data-table thead tr:nth-child(2) th { top: 27px; height: 29px; }
.auxiliary-data-table .aux-date { min-width: 92px; }
.auxiliary-data-table .aux-cat-total { min-width: 102px; background: #e8f4ef; color: #286c59; font-weight: 600; }
.auxiliary-data-table th.aux-commission { background: #eadff0; }
.auxiliary-data-table td.aux-commission { background: #f7f2f8; }
.auxiliary-data-table thead th { z-index: 7; background-clip: padding-box; }
.auxiliary-data-table thead th.aux-date { z-index: 10; }
.auxiliary-data-table tbody td.aux-date { z-index: 2; }
.auxiliary-data-table th.aux-header-spacer { color: transparent; }
[data-finance-panel="auxiliaryData"] .daily-profit-pagination { min-height: 40px; padding: 6px 10px; }

.daily-profit-inner-tabs {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #ded8e2;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(57, 47, 63, .04);
}

/* 2026-10-29: compact visual dashboard + horizontal store comparison. */
[data-finance-panel="dailyProfit"] .daily-profit-hero .daily-profit-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.daily-profit-compare-dashboard {
  display: block;
  margin: 0 0 8px;
  padding: 8px;
  border: 1px solid #d7e4df;
  border-radius: 9px;
  background: #f7faf8;
  color: var(--dp-text);
  box-shadow: 0 2px 8px rgba(47, 65, 59, .04);
}

.daily-profit-chart-top {
  display: grid;
  grid-template-columns: minmax(280px, .68fr) minmax(520px, 1.32fr);
  gap: 7px;
  margin-bottom: 7px;
}

.daily-profit-chart-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d7e4df;
  border-radius: 7px;
  background: #fff;
}

.daily-profit-chart-panel .daily-profit-compare-heading {
  min-height: 31px;
  padding: 0 9px;
  background: #f4f8f6;
  border-color: #dce8e3;
}

.daily-profit-chart-panel .daily-profit-compare-heading strong { font-size: 11px; }
.daily-profit-chart-panel .daily-profit-compare-heading span { font-size: 9px; }

.daily-profit-share-chart {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 176px;
  padding: 8px 10px;
}

.daily-profit-donut-wrap { display: flex; justify-content: center; perspective: 500px; }
.daily-profit-donut {
  position: relative;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: conic-gradient(var(--donut));
  transform: rotateX(10deg);
  box-shadow: 0 9px 0 rgba(53, 143, 126, .13), 0 13px 20px rgba(47, 91, 80, .13);
}
.daily-profit-donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 2px 7px rgba(53, 83, 74, .09);
}
.daily-profit-donut > div {
  position: absolute;
  z-index: 2;
  inset: 35px 18px;
  display: grid;
  place-content: center;
  text-align: center;
  transform: rotateX(-10deg);
}
.daily-profit-donut strong { color: #246b59; font-size: 15px; line-height: 1.15; }
.daily-profit-donut span { margin-top: 2px; color: var(--dp-muted); font-size: 9px; }

.daily-profit-share-legend { display: grid; gap: 6px; }
.daily-profit-share-legend span { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 6px; font-size: 9px; }
.daily-profit-share-legend i { width: 8px; height: 8px; border-radius: 50%; }
.daily-profit-share-legend b { overflow: hidden; color: #46544f; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.daily-profit-share-legend em { color: #78857f; font-style: normal; font-variant-numeric: tabular-nums; }

.daily-profit-bars-chart { min-height: 176px; padding: 5px 8px 0; }
.daily-profit-bars-chart svg { display: block; width: 100%; height: 154px; }
.daily-profit-bars-chart text,
.daily-profit-trend-chart text { fill: #75837d; font-size: 9px; }
.daily-profit-bars-chart .grid-line,
.daily-profit-trend-chart .grid-line { stroke: #e2ebe7; stroke-width: 1; }
.daily-profit-trend-chart .zero-line { stroke: #cbd8d3; stroke-width: 1; }

.daily-profit-chart-legend {
  min-height: 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  color: #75837d;
  font-size: 9px;
}
.daily-profit-chart-legend span { display: inline-flex; align-items: center; gap: 4px; }
.daily-profit-chart-legend i { width: 9px; height: 9px; border-radius: 2px; }
.daily-profit-chart-legend i.settlement { background: #27aebb; }
.daily-profit-chart-legend i.profit { background: #4fbd79; }

.daily-profit-chart-panel.daily-profit-trend-panel { margin: 0; }
.daily-profit-chart-panel .daily-profit-trend-chart { min-height: 172px; padding: 5px 9px 2px; }
.daily-profit-chart-panel .daily-profit-trend-chart svg { width: 100%; height: 145px; }

[data-finance-panel="dailyProfit"] .finance-summary-table table {
  width: max-content;
  min-width: 100%;
  margin-bottom: 16px;
  font-size: 10px;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th,
[data-finance-panel="dailyProfit"] .finance-summary-table td {
  min-width: 84px;
  height: 29px;
  padding: 4px 6px;
  background: #fff;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:first-child th { top: 0; height: 29px; }
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:nth-child(2) th { top: 29px; height: 28px; }
[data-finance-panel="dailyProfit"] .finance-summary-table th:first-child,
[data-finance-panel="dailyProfit"] .finance-summary-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  min-width: 112px;
  background: #eeeae5;
  font-weight: 600;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th:nth-child(2),
[data-finance-panel="dailyProfit"] .finance-summary-table td:nth-child(2) {
  position: static;
  min-width: 84px;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-store-group {
  border-bottom-color: rgba(107, 130, 121, .16);
  font-size: 10px;
}
[data-finance-panel="dailyProfit"] .finance-summary-table .store-tone-0 { background: #e7f5f0; }
[data-finance-panel="dailyProfit"] .finance-summary-table .store-tone-1 { background: #edf6fb; }
[data-finance-panel="dailyProfit"] .finance-summary-table .store-tone-2 { background: #fff5e7; }
[data-finance-panel="dailyProfit"] .finance-summary-table .store-tone-3 { background: #fcefeb; }
[data-finance-panel="dailyProfit"] .finance-summary-table .store-tone-4 { background: #eef3fb; }
[data-finance-panel="dailyProfit"] .finance-summary-table .store-tone-5 { background: #f3eff8; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td.store-tone-0 { background: #f4faf7; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td.store-tone-1 { background: #f6fafc; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td.store-tone-2 { background: #fffbf4; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td.store-tone-3 { background: #fff8f6; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td.store-tone-4 { background: #f7f9fd; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td.store-tone-5 { background: #faf8fc; }
[data-finance-panel="dailyProfit"] .finance-summary-table .daily-profit-total-row td {
  position: sticky;
  /* Ego/macOS uses an overlay horizontal scrollbar. Keep the shared total row
     above that scrollbar in all three summary views (cats/live/all). */
  bottom: 16px;
  z-index: 2;
  border-top: 2px solid #b9d8cc;
  background: #e4f3ed;
  color: #246b59;
  font-weight: 700;
}
[data-finance-panel="dailyProfit"] .finance-summary-table .daily-profit-total-row td:first-child { z-index: 6; }

@media (max-width: 1080px) {
  .daily-profit-chart-top { grid-template-columns: 1fr; }
  [data-finance-panel="dailyProfit"] .daily-profit-hero .daily-profit-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  [data-finance-panel="dailyProfit"] .daily-profit-hero .daily-profit-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-profit-share-chart { grid-template-columns: 132px minmax(110px, 1fr); }
}

/* Visual polish: match the approved full dashboard demo while staying compact. */
[data-finance-panel="dailyProfit"] > .daily-profit-hero {
  padding: 10px 12px 11px;
  background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
}
[data-finance-panel="dailyProfit"] > .daily-profit-hero > .panel-heading { display: none; }
[data-finance-panel="dailyProfit"] .daily-profit-hero .daily-profit-kpis {
  gap: 8px;
  margin-top: 10px;
  overflow: visible;
  border: 0;
  background: transparent;
}
[data-finance-panel="dailyProfit"] .dashboard-kpi-card {
  position: relative;
  min-height: 76px;
  padding: 12px 10px 10px 50px;
  border: 1px solid #dde8e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(40, 76, 66, .06);
}
[data-finance-panel="dailyProfit"] .dashboard-kpi-card:nth-child(1) { border-top: 3px solid #5b9df0; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-card:nth-child(2) { border-top: 3px solid #42c9a2; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-card:nth-child(3) { border-top: 3px solid #ef7b75; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-card:nth-child(4) { border-top: 3px solid #61c98a; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-card:nth-child(5) { border-top: 3px solid #efbd54; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-head { margin-bottom: 5px; font-size: 11px; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-body { display: block; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-body strong { display: block; font-size: 22px; line-height: 1.05; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-body small { display: block; margin-top: 5px; font-size: 9px; white-space: nowrap; }
.daily-profit-kpi-icon {
  position: absolute;
  top: 16px;
  left: 11px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.daily-profit-kpi-icon.settlement { color: #397fd6; background: #e8f1ff; }
.daily-profit-kpi-icon.income { color: #1e9f7e; background: #e1f7ef; }
.daily-profit-kpi-icon.expense { color: #d85458; background: #fdeaea; }
.daily-profit-kpi-icon.profit { color: #239c62; background: #e6f7ed; font-size: 9px; letter-spacing: -1px; }
.daily-profit-kpi-icon.margin { color: #d99b18; background: #fff4d8; }

.daily-profit-compare-dashboard {
  padding: 9px;
  background:
    radial-gradient(circle at 8% 12%, rgba(72, 190, 164, .08), transparent 28%),
    linear-gradient(180deg, #f8fbfa 0%, #f4f8f6 100%);
  box-shadow: 0 4px 16px rgba(42, 77, 67, .07);
}
.daily-profit-chart-top { grid-template-columns: minmax(330px, .72fr) minmax(560px, 1.28fr); gap: 9px; margin-bottom: 9px; }
.daily-profit-chart-panel { border-color: #d5e3de; box-shadow: 0 3px 12px rgba(38, 78, 66, .055); }
.daily-profit-chart-panel .daily-profit-compare-heading { min-height: 36px; padding: 0 11px; }
.daily-profit-chart-panel .daily-profit-compare-heading strong { font-size: 12px; }
.daily-profit-share-chart { grid-template-columns: 185px minmax(130px, 1fr); min-height: 198px; padding: 9px 13px; }
.daily-profit-donut { width: 156px; height: 156px; box-shadow: 0 11px 0 rgba(53, 143, 126, .15), 0 16px 25px rgba(47, 91, 80, .15); }
.daily-profit-donut::after { inset: 35px; }
.daily-profit-donut > div { inset: 43px 20px; }
.daily-profit-donut strong { font-size: 18px; }
.daily-profit-share-legend { gap: 8px; }
.daily-profit-share-legend span { grid-template-columns: 9px 1fr auto; font-size: 10px; }
.daily-profit-share-legend i { width: 9px; height: 9px; }
.daily-profit-bars-chart { min-height: 198px; padding: 7px 10px 0; }
.daily-profit-bars-chart svg { height: 172px; }
.daily-profit-chart-panel .daily-profit-trend-chart { min-height: 190px; padding: 7px 11px 3px; }
.daily-profit-chart-panel .daily-profit-trend-chart svg { height: 162px; }
.daily-profit-chart-legend { min-height: 22px; font-size: 10px; }

@media (max-width: 1180px) {
  [data-finance-panel="dailyProfit"] .dashboard-kpi-body strong { font-size: 18px; }
  [data-finance-panel="dailyProfit"] .dashboard-kpi-card { padding-left: 43px; }
  .daily-profit-kpi-icon { left: 8px; }
  .daily-profit-chart-top { grid-template-columns: 1fr; }
}

/* Demo-density pass: keep all key content visible in the first desktop screen. */
.workspace:has([data-finance-panel="dailyProfit"].active) > .global-scope-bar { display: none; }
.workspace:has([data-finance-panel="dailyProfit"].active) > .topbar { margin-bottom: 8px; }
[data-finance-panel="dailyProfit"] .daily-profit-inner-tabs {
  min-height: 32px;
  margin-bottom: 6px;
  padding: 3px 6px;
}
[data-finance-panel="dailyProfit"] .daily-profit-inner-tabs button {
  min-height: 25px;
  height: 25px;
  padding: 3px 10px;
  font-size: 9px;
}
[data-finance-panel="dailyProfit"] > .daily-profit-hero { margin-bottom: 6px; padding: 7px 9px 8px; }
[data-finance-panel="dailyProfit"] .daily-profit-toolbar { gap: 5px; }
[data-finance-panel="dailyProfit"] .daily-profit-toolbar :is(button, select, input) { height: 28px; min-height: 28px; }
[data-finance-panel="dailyProfit"] .daily-profit-hero .daily-profit-kpis { gap: 6px; margin-top: 7px; }
[data-finance-panel="dailyProfit"] .dashboard-kpi-card { min-height: 70px; padding-top: 9px; padding-bottom: 8px; }
.daily-profit-kpi-icon { top: 13px; }
.daily-profit-compare-dashboard { margin-bottom: 6px; padding: 6px; }
.daily-profit-chart-top { gap: 6px; margin-bottom: 6px; }
.daily-profit-chart-panel .daily-profit-compare-heading { min-height: 30px; }
.daily-profit-share-chart { grid-template-columns: 165px minmax(120px, 1fr); min-height: 164px; padding: 5px 10px; }
.daily-profit-donut { width: 138px; height: 138px; }
.daily-profit-donut::after { inset: 31px; }
.daily-profit-donut > div { inset: 38px 18px; }
.daily-profit-donut strong { font-size: 17px; }
.daily-profit-share-legend { gap: 5px; }
.daily-profit-bars-chart { min-height: 164px; padding: 3px 8px 0; }
.daily-profit-bars-chart svg { height: 141px; }
.daily-profit-chart-panel .daily-profit-trend-chart { min-height: 145px; padding: 3px 9px 1px; }
.daily-profit-chart-panel .daily-profit-trend-chart svg { height: 121px; }
.daily-profit-chart-legend { min-height: 18px; }
[data-finance-panel="dailyProfit"] > .panel { margin-bottom: 6px; padding: 7px 9px; }
[data-finance-panel="dailyProfit"] .panel-heading { margin-bottom: 5px; }
[data-finance-panel="dailyProfit"] .finance-summary-table th,
[data-finance-panel="dailyProfit"] .finance-summary-table td { height: 26px; padding: 3px 5px; }
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:first-child th { height: 26px; }
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:nth-child(2) th { top: 26px; height: 25px; }

/* Ultra-wide desktop: avoid the charts looking horizontally flattened. */
@media (min-width: 1800px) and (max-height: 1100px) {
  .daily-profit-share-chart {
    grid-template-columns: 190px minmax(150px, 1fr);
    min-height: 184px;
  }
  .daily-profit-donut { width: 152px; height: 152px; }
  .daily-profit-donut::after { inset: 34px; }
  .daily-profit-donut > div { inset: 42px 20px; }
  .daily-profit-bars-chart { min-height: 184px; }
  .daily-profit-bars-chart svg { height: 160px; }
  .daily-profit-chart-panel .daily-profit-trend-chart { min-height: 160px; }
  .daily-profit-chart-panel .daily-profit-trend-chart svg { height: 136px; }
}

/* One stable header row prevents the sub-header from overlapping the first data row. */
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:first-child th {
  top: 0;
  height: 48px;
  padding: 0;
  vertical-align: middle;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-period-column {
  padding: 0 8px;
}
.daily-profit-store-header { min-width: 252px; }
.daily-profit-store-header strong {
  display: block;
  padding: 6px 5px 5px;
  font-size: 10px;
  line-height: 1;
}
.daily-profit-store-header span {
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  border-top: 1px solid rgba(107, 130, 121, .16);
}
.daily-profit-store-header i {
  padding: 5px 4px;
  border-right: 1px solid rgba(107, 130, 121, .16);
  color: #4d5b56;
  font-style: normal;
  font-weight: 600;
}
.daily-profit-store-header i:last-child { border-right: 0; color: #16845f; }

.daily-profit-expense-detail-panel .panel-heading { align-items: flex-end; }
.daily-profit-expense-detail-wrap { max-height: 370px; border: 1px solid #d9e5e0; border-radius: 7px; }
.daily-profit-expense-detail-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font-size: 10px; font-variant-numeric: tabular-nums; }
.daily-profit-expense-detail-table th,
.daily-profit-expense-detail-table td { height: 27px; padding: 4px 8px; border-right: 1px solid #e0e7e4; border-bottom: 1px solid #e0e7e4; text-align: center; white-space: nowrap; }
.daily-profit-expense-detail-table th { position: sticky; top: 0; z-index: 2; background: #e5f3ee; color: #285e51; font-weight: 700; }
.daily-profit-expense-detail-table tbody tr:nth-child(even) td { background: #f8fbfa; }
.daily-profit-expense-detail-table td:nth-child(1) { background: #f1eee9; font-weight: 600; }
.daily-profit-expense-detail-table td:nth-child(2) { background: #f5f2f7; font-weight: 600; }
.daily-profit-expense-detail-table td.expense-total { background: #fff1ec; color: #c24f42; font-weight: 700; }

/* Every header row now has the same explicit column count, so zoom cannot shift store groups. */
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:first-child th {
  top: 0;
  height: 27px;
  padding: 4px 6px;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:nth-child(2) th {
  top: 27px;
  height: 26px;
  padding: 4px 6px;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-store-group { min-width: 252px; }
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-period-spacer {
  border-top: 0;
  color: transparent;
}

/* One physical header row and an explicit colgroup keep every label over its data column. */
[data-finance-panel="dailyProfit"] .finance-summary-table table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}
[data-finance-panel="dailyProfit"] .finance-summary-table col.daily-profit-date-col { width: 112px; }
[data-finance-panel="dailyProfit"] .finance-summary-table col.daily-profit-value-col { width: 84px; }
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:first-child th {
  position: static;
  height: 49px;
  padding: 0;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.daily-profit-period-column {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 112px;
  min-width: 112px;
  padding: 0 8px;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-store-group {
  width: 252px;
  min-width: 252px;
  padding: 0;
}
[data-finance-panel="dailyProfit"] .finance-summary-table .daily-profit-store-header {
  width: 252px;
  min-width: 252px;
}

/* Move the period column with the table; a sticky first column can cover grouped headers. */
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.daily-profit-period-column,
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td.daily-profit-period-column,
[data-finance-panel="dailyProfit"] .finance-summary-table th:first-child,
[data-finance-panel="dailyProfit"] .finance-summary-table td:first-child {
  position: static;
  left: auto;
  z-index: auto;
}

/* Avoid colspan width redistribution: every header cell maps to one real data column. */
[data-finance-panel="dailyProfit"] .finance-summary-table thead th {
  position: static;
  top: auto;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:first-child th {
  height: 27px;
  padding: 0;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:nth-child(2) th {
  height: 26px;
  padding: 4px 6px;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-store-group-start {
  position: relative;
  overflow: visible;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-store-group-start > span {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  display: flex;
  width: calc(300% + 2px);
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(107, 130, 121, .16);
  background: inherit;
  color: #3d4652;
  font-weight: 700;
  pointer-events: none;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-profit-heading { color: #16845f; }

/* Final stable header: one physical row, one header cell per data column. */
[data-finance-panel="dailyProfit"] .finance-summary-table thead,
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr,
[data-finance-panel="dailyProfit"] .finance-summary-table thead th {
  position: static !important;
  top: auto !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr:first-child th {
  height: 50px;
  padding: 0;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header {
  width: 84px;
  min-width: 84px;
  padding: 0;
  vertical-align: middle;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header > span,
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header > b {
  display: flex;
  height: 25px;
  align-items: center;
  justify-content: center;
  overflow: visible;
  white-space: nowrap;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header > span {
  color: #3d4652;
  font-size: 10px;
  font-weight: 700;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header > b {
  border-top: 1px solid rgba(107, 130, 121, .16);
  color: #4d5b56;
  font-weight: 600;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-profit-heading > b { color: #16845f; }

/* Store colors follow the data group, never the table's absolute column number. */
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.store-tone-0 { background: #e7f5f0 !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.store-tone-1 { background: #edf6fb !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.store-tone-2 { background: #fff5e7 !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.store-tone-3 { background: #fcefeb !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.store-tone-4 { background: #eef3fb !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.store-tone-5 { background: #f3eff8 !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody tr:not(.daily-profit-total-row) td.store-tone-0 { background: #f4faf7 !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody tr:not(.daily-profit-total-row) td.store-tone-1 { background: #f6fafc !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody tr:not(.daily-profit-total-row) td.store-tone-2 { background: #fffbf4 !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody tr:not(.daily-profit-total-row) td.store-tone-3 { background: #fff8f6 !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody tr:not(.daily-profit-total-row) td.store-tone-4 { background: #f7f9fd !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table tbody tr:not(.daily-profit-total-row) td.store-tone-5 { background: #faf8fc !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table .daily-profit-group-start { border-left: 2px solid #d3dfdb !important; }
[data-finance-panel="dailyProfit"] .finance-summary-table .daily-profit-group-end { border-right: 2px solid #d3dfdb !important; }

/* Approved workbook-style report hierarchy: compact typography and stable one-cell headers. */
[data-finance-panel="dailyProfit"] .daily-profit-report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 7px;
}
[data-finance-panel="dailyProfit"] .daily-profit-report-tabs button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #b9c8c3;
  border-radius: 6px;
  background: #fff;
  color: #303846;
  font: 12px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
[data-finance-panel="dailyProfit"] .daily-profit-report-tabs button.active {
  border-color: #287763;
  background: #287763;
  color: #fff;
}
[data-finance-panel="dailyProfit"] .finance-summary-table table {
  font-size: 11px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th,
[data-finance-panel="dailyProfit"] .finance-summary-table td {
  height: 31px;
  padding: 5px 7px;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header > span,
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header > b {
  height: 25px;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-report-income,
[data-finance-panel="dailyProfit"] .finance-summary-table td.daily-profit-report-income {
  background: #fcf1ed !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-report-expense,
[data-finance-panel="dailyProfit"] .finance-summary-table td.daily-profit-report-expense {
  background: #edf5fa !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-report-result,
[data-finance-panel="dailyProfit"] .finance-summary-table td.daily-profit-report-result {
  background: #f0f8f5 !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table .daily-profit-total-row td {
  background: #eef7f3 !important;
  color: #216f5c;
  font-weight: 600;
}
[data-finance-panel="dailyProfit"] .finance-summary-table col.daily-profit-date-col { width: 112px; }
[data-finance-panel="dailyProfit"] .finance-summary-table col.daily-profit-value-col { width: 94px; }

/* Full daily-report detail: one date per row, stores grouped horizontally. */
.daily-profit-expense-detail-wrap { max-height: 480px; }
.daily-profit-full-detail-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}
.daily-profit-full-detail-table th,
.daily-profit-full-detail-table td { min-width: 82px; padding: 4px 6px; }
.daily-profit-full-detail-table th.daily-profit-full-date,
.daily-profit-full-detail-table td.daily-profit-full-date {
  min-width: 112px;
  width: 112px;
  background: #f1eee9 !important;
  font-weight: 700;
}
.daily-profit-full-detail-table th.daily-profit-detail-heading {
  height: 50px;
  padding: 0;
  vertical-align: middle;
}
.daily-profit-full-detail-table th.daily-profit-detail-heading > span,
.daily-profit-full-detail-table th.daily-profit-detail-heading > b {
  display: flex;
  height: 25px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.daily-profit-full-detail-table th.daily-profit-detail-heading > span {
  color: #354d46;
  font-size: 10px;
  font-weight: 700;
}
.daily-profit-full-detail-table th.daily-profit-detail-heading > b {
  border-top: 1px solid rgba(107, 130, 121, .16);
  color: #53615c;
  font-size: 10px;
}
.daily-profit-full-detail-table th.daily-profit-detail-profit > b { color: #16845f; }
.daily-profit-full-detail-table .daily-profit-detail-group-start { border-left: 3px solid #c4d7d0 !important; }
.daily-profit-full-detail-table .daily-profit-detail-group-end { border-right: 3px solid #c4d7d0 !important; }
.daily-profit-full-detail-table thead th.store-tone-0 { background: #e7f5f0 !important; }
.daily-profit-full-detail-table thead th.store-tone-1 { background: #edf6fb !important; }
.daily-profit-full-detail-table thead th.store-tone-2 { background: #fff5e7 !important; }
.daily-profit-full-detail-table thead th.store-tone-3 { background: #fcefeb !important; }
.daily-profit-full-detail-table thead th.store-tone-4 { background: #eef3fb !important; }
.daily-profit-full-detail-table thead th.store-tone-5 { background: #f3eff8 !important; }
.daily-profit-full-detail-table tbody tr:not(.daily-profit-full-total) td.store-tone-0 { background: #f4faf7 !important; }
.daily-profit-full-detail-table tbody tr:not(.daily-profit-full-total) td.store-tone-1 { background: #f6fafc !important; }
.daily-profit-full-detail-table tbody tr:not(.daily-profit-full-total) td.store-tone-2 { background: #fffbf4 !important; }
.daily-profit-full-detail-table tbody tr:not(.daily-profit-full-total) td.store-tone-3 { background: #fff8f6 !important; }
.daily-profit-full-detail-table tbody tr:not(.daily-profit-full-total) td.store-tone-4 { background: #f7f9fd !important; }
.daily-profit-full-detail-table tbody tr:not(.daily-profit-full-total) td.store-tone-5 { background: #faf8fc !important; }
.daily-profit-full-detail-table tr.daily-profit-full-total td {
  border-top: 2px solid #b9d8cc;
  background: #e4f3ed !important;
  color: #246b59;
  font-weight: 700;
}

/* Keep the column context visible while reading the full-month wide report. */
[data-finance-panel="dailyProfit"] .finance-summary-table {
  position: relative;
  isolation: isolate;
  max-height: min(56vh, 560px);
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
}
[data-finance-panel="dailyProfit"] #dailyProfitPagination {
  min-height: 42px;
  padding: 7px 8px;
  border-top: 1px solid #d7e4df;
  background: #fff;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead,
[data-finance-panel="dailyProfit"] .finance-summary-table thead tr {
  position: relative !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 9 !important;
  background-clip: padding-box;
  box-shadow: 0 1px 0 #cbd8d3;
}
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td.daily-profit-period-column,
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 7 !important;
  width: 112px;
  min-width: 112px;
  background: #eeeae5 !important;
  background-clip: padding-box;
  box-shadow: 1px 0 0 #cbd8d3;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.daily-profit-period-column,
[data-finance-panel="dailyProfit"] .finance-summary-table thead th:first-child {
  left: 0 !important;
  z-index: 12 !important;
  width: 112px;
  min-width: 112px;
  background: #eeeae5 !important;
  box-shadow: 1px 1px 0 #cbd8d3;
}
[data-finance-panel="dailyProfit"] .finance-summary-table .daily-profit-total-row td.daily-profit-period-column,
[data-finance-panel="dailyProfit"] .finance-summary-table .daily-profit-total-row td:first-child {
  background: #eef7f3 !important;
  z-index: 8 !important;
}

/* 2026-10-31: compact first-screen dashboard so detail rows begin higher. */
@media (min-width: 1181px) {
  [data-finance-panel="dailyProfit"] > .daily-profit-hero {
    padding: 5px 7px 6px;
  }
  [data-finance-panel="dailyProfit"] .daily-profit-toolbar :is(button, select, input) {
    height: 26px;
    min-height: 26px;
    padding-top: 2px;
    padding-bottom: 2px;
  }
  [data-finance-panel="dailyProfit"] .daily-profit-hero .daily-profit-kpis {
    gap: 5px;
    margin-top: 5px;
  }
  [data-finance-panel="dailyProfit"] .dashboard-kpi-card {
    min-height: 54px;
    padding: 7px 8px 6px 42px;
  }
  [data-finance-panel="dailyProfit"] .dashboard-kpi-head {
    margin-bottom: 2px;
    font-size: 10px;
  }
  [data-finance-panel="dailyProfit"] .dashboard-kpi-body {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }
  [data-finance-panel="dailyProfit"] .dashboard-kpi-body strong {
    display: inline;
    font-size: 15px !important;
  }
  [data-finance-panel="dailyProfit"] .dashboard-kpi-body small {
    display: inline;
    margin-top: 0;
    font-size: 8px;
  }
  [data-finance-panel="dailyProfit"] .daily-profit-kpi-icon {
    top: 11px;
    left: 9px;
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
  .daily-profit-compare-dashboard {
    padding: 5px;
  }
  .daily-profit-chart-top {
    gap: 5px;
    margin-bottom: 5px;
  }
  .daily-profit-chart-panel .daily-profit-compare-heading {
    min-height: 25px;
    padding: 0 8px;
  }
  .daily-profit-chart-panel .daily-profit-compare-heading strong {
    font-size: 10px;
  }
  .daily-profit-chart-panel .daily-profit-compare-heading span {
    font-size: 8px;
  }
  .daily-profit-share-chart {
    grid-template-columns: 112px minmax(120px, 1fr);
    gap: 6px;
    min-height: 112px;
    padding: 3px 8px;
  }
  .daily-profit-donut {
    width: 92px;
    height: 92px;
    box-shadow: 0 6px 0 rgba(53, 143, 126, .12), 0 9px 16px rgba(47, 91, 80, .12);
  }
  .daily-profit-donut::after { inset: 21px; }
  .daily-profit-donut > div { inset: 27px 12px; }
  .daily-profit-donut strong { font-size: 14px; }
  .daily-profit-share-legend { gap: 3px; }
  .daily-profit-share-legend span {
    grid-template-columns: 8px 1fr auto;
    font-size: 9px;
  }
  .daily-profit-bars-chart {
    min-height: 112px;
    padding: 2px 7px 0;
  }
  .daily-profit-bars-chart svg {
    height: 92px;
  }
  .daily-profit-chart-panel .daily-profit-trend-chart {
    min-height: 92px;
    padding: 2px 8px 0;
  }
  .daily-profit-chart-panel .daily-profit-trend-chart svg {
    height: 70px;
  }
  .daily-profit-chart-legend {
    min-height: 15px;
    gap: 8px;
    font-size: 8px;
  }
}

/* 2026-10-31: use the wide desktop row for all three overview charts. */
@media (min-width: 1500px) {
  [data-finance-panel="dailyProfit"] > .daily-profit-compare-dashboard {
    display: grid;
    grid-template-columns: minmax(240px, .72fr) minmax(420px, 1.2fr) minmax(360px, 1.08fr);
    align-items: stretch;
    gap: 5px;
  }
  [data-finance-panel="dailyProfit"] .daily-profit-chart-top {
    display: contents;
  }
  [data-finance-panel="dailyProfit"] .daily-profit-chart-panel.daily-profit-trend-panel {
    min-width: 0;
    margin: 0;
  }
  [data-finance-panel="dailyProfit"] .daily-profit-chart-panel .daily-profit-trend-chart {
    min-height: 112px;
  }
  [data-finance-panel="dailyProfit"] .daily-profit-chart-panel .daily-profit-trend-chart svg {
    height: 92px;
  }
}

/* 2026-10-31: compact every horizontal detail view while keeping values readable. */
[data-finance-panel="dailyProfit"] .finance-summary-table th,
[data-finance-panel="dailyProfit"] .finance-summary-table td {
  min-width: 64px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table col.daily-profit-date-col {
  width: 88px !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table col.daily-profit-value-col {
  width: 64px !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header {
  width: 64px !important;
  min-width: 64px !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header > span,
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-flat-header > b {
  font-size: 8.5px !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-group-start {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  z-index: 12 !important;
  overflow: visible;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-group-start > span {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: var(--daily-profit-group-span, 64px);
  box-sizing: border-box;
  justify-content: flex-start !important;
  padding-left: 8px !important;
  background: inherit;
  border-bottom: 1px solid rgba(107, 130, 121, .16);
  pointer-events: none;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-group-start > b {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 25px !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table th.daily-profit-period-column,
[data-finance-panel="dailyProfit"] .finance-summary-table td.daily-profit-period-column,
[data-finance-panel="dailyProfit"] .finance-summary-table thead th:first-child,
[data-finance-panel="dailyProfit"] .finance-summary-table tbody td:first-child {
  width: 88px !important;
  min-width: 88px !important;
}

/* 2026-11-02: keep every compact horizontal header above scrolling values.
   The group-start cell needs to stay positioned for its wide store label, but
   it must remain sticky (not relative), otherwise the first value column can
   scroll into the header area. */
[data-finance-panel="dailyProfit"] .finance-summary-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  background-clip: padding-box;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.daily-profit-group-start {
  position: sticky !important;
  top: 0 !important;
  z-index: 22 !important;
}
[data-finance-panel="dailyProfit"] .finance-summary-table thead th.daily-profit-period-column,
[data-finance-panel="dailyProfit"] .finance-summary-table thead th:first-child {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 24 !important;
}
