body[data-view="profit"] :is(.board, .status-cards, .metrics, #product-stats-section, #history-progress) {
  display: none;
}

#profit-section { margin-bottom: 14px; }
#profit-section .panel-heading { flex-wrap: wrap; justify-content: flex-start; gap: 12px; }
#profit-section .panel-heading .title-group { margin-right: auto; }
.profit-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profit-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; padding: 2px 14px 14px; }
.profit-metrics > :is(div, button) { display: grid; align-content: start; gap: 6px; min-width: 0; text-align: left; background: #0b1d31; border: 1px solid #243c54; border-radius: 8px; padding: 13px; }
.profit-metrics > button:hover, .profit-metrics > button:focus-visible { background: #122a41; border-color: #52b4cf; }
.profit-metrics span { font-size: 12px; color: #abc2da; }
.profit-metrics strong { font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.profit-metrics small { font-size: 12px; color: #abc2da; white-space: normal; }
.profit-metrics small:empty { display: none; }
.profit-scope, .profit-estimates { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 8px 14px; }
.profit-scope > small, .profit-estimates > small { color: #abc2da; }
.profit-after-sales { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 5px 8px; min-width: 0; padding: 5px 10px; border: 1px solid #2a465c; border-radius: 6px; background: #102437; }
.profit-after-sales label { color: #c4d9ed; white-space: nowrap; }
.profit-after-sales-input { display: flex; align-items: center; gap: 4px; color: #abc2da; }
.profit-after-sales-input input { width: 84px; }
.profit-after-sales > small { color: #dfbec8; font-variant-numeric: tabular-nums; }
.profit-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 14px; }
.profit-stage { --stage-accent: #80dbbd; --stage-heading: #102c33; min-width: 0; border: 1px solid #2a465c; border-radius: 9px; overflow: hidden; background: #0a1b2c; }
.profit-stage-signed { --stage-accent: #f1cc85; --stage-heading: #302a25; }
.profit-stage-uncompleted { --stage-accent: #9bbdff; --stage-heading: #182b46; }
.profit-stage-heading { display: grid; align-content: start; gap: 6px; padding: 13px 14px; background: var(--stage-heading); border-bottom: 1px solid #2a465c; }
.profit-stage-heading h3, .profit-stage-heading p { margin: 0; }
.profit-stage-heading h3 { color: var(--stage-accent); font-size: 15px; }
.profit-stage-heading p { color: #bbccdf; font-size: 12px; }
.profit-stage-heading button { justify-self: start; margin-top: 2px; }
.profit-stage-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profit-stage-metrics button { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 14px 12px; border: 0; border-radius: 0; background: transparent; text-align: left; white-space: normal; }
.profit-stage-metrics button + button { border-left: 1px solid #243c54; }
.profit-stage-metrics button:hover, .profit-stage-metrics button:focus-visible { background: #142e44; }
.profit-stage-metrics span { color: #c4d9ed; font-size: 12px; }
.profit-stage-metrics small { color: #abc2da; font-size: 11px; }
.profit-stage-metrics strong { font-size: clamp(17px, 1.65vw, 26px); line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.profit-stage-settled strong:not(.profit-negative) { color: var(--stage-accent); }
.profit-estimates { margin-bottom: 4px; }
.profit-estimates button { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; border-color: #52456c; background: #211d36; }
.profit-estimates strong { font-size: 16px; }
.profit-estimates button small { color: #c1b5d6; }
.profit-adjusted-estimate { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; min-width: 0; padding: 7px 10px; border: 1px solid #2a465c; border-radius: 6px; background: #102437; }
.profit-adjusted-estimate small { color: #b9cde0; }
.profit-adjusted-estimate strong { color: #80dbbd; font-variant-numeric: tabular-nums; }
.profit-adjusted-estimate strong.profit-negative { color: #ff8b8b; }
.profit-adjusted-estimate strong[hidden] { display: none; }
.profit-exception-badges { display: grid; grid-template-columns: repeat(4, minmax(95px, 1fr)); gap: 6px; }
.profit-exception-badges button { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 8px; text-align: left; white-space: nowrap; color: #dfbec8; background: #292234; border-color: #564459; }
.profit-exception-badges button b { color: #ffacbb; font-variant-numeric: tabular-nums; }
.profit-exception-badges button[aria-pressed="true"] { border-color: #e67b94; background: #493044; }
.profit-exception-badges button:disabled { opacity: .55; }
.profit-exception-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 14px; color: #e2c2cc; background: #251d2d; }
.profit-exception-summary[hidden] { display: none; }
.profit-exception-summary button { margin-left: auto; }
@media (max-width: 800px) {
  .profit-overview { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .profit-exception-badges { order: 1; grid-template-columns: repeat(2, minmax(95px, 1fr)); width: 100%; }
  .profit-after-sales, .profit-adjusted-estimate { order: 1; flex-basis: 100%; }
}
.profit-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 14px; border-top: 1px solid #243c54; }
.profit-sku-summary { display: flex; flex: 1 1 180px; min-width: 0; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; padding: 5px 8px; border: 1px solid #2a465c; border-radius: 6px; background: #102437; color: #c4d9ed; font-size: 12px; font-variant-numeric: tabular-nums; }
.profit-sku-summary :is(span, small) { white-space: nowrap; }
.profit-sku-summary small { color: #f1cc85; }
.profit-sku-summary[hidden] { display: none; }
@media (max-width: 760px) {
  .profit-sku-summary { order: 1; flex-basis: 100%; }
}
.profit-accounting { margin: 0 14px 10px; color: #bcd3e6; font-size: 13px; border: 1px solid #243c54; border-radius: 8px; }
.profit-accounting summary { cursor: pointer; padding: 10px 12px; }
.profit-accounting summary:hover { color: #e2f1ff; }
.profit-accounting-note { margin: 0; padding: 4px 12px 10px; }
.profit-accounting-note:empty, #profit-platform-feedback:empty { display: none; }
.profit-reconciliation { padding: 4px 12px 8px; }
.profit-reconciliation strong { font-size: 17px; }
.profit-scroll { overflow: auto; max-height: 64vh; }
.profit-scroll[hidden], .profit-tools select[hidden] { display: none; }
.profit-scroll table { min-width: 950px; }
.profit-reference { max-width: 220px; overflow-wrap: anywhere; }
.profit-scroll th { position: sticky; top: 0; z-index: 1; background: #12243a; }
.profit-scroll td { overflow-wrap: anywhere; }
.profit-scroll td:nth-child(n+4) { white-space: nowrap; }
.profit-scroll td.profit-settlement-status { white-space: normal; min-width: 155px; }
.profit-row-actions { display: flex; gap: 5px; }
.profit-row-actions button { white-space: nowrap; }
.profit-value { color: #66dfbd; font-weight: 700; }
.profit-negative { color: #ff8b8b; }
.profit-empty { text-align: center; padding: 25px; color: #abc2da; }
.profit-footer, .profit-pagination, .profit-pagination form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profit-pagination label { white-space: nowrap; }
#profit-page-number { width: 64px; }
#profit-editor { width: min(720px, calc(100% - 30px)); max-height: 88vh; }
.profit-editor-settlement { padding: 11px 12px; border: 1px solid #2a465c; border-radius: 6px; background: #102437; }
.profit-editor-settlement-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; }
.profit-editor-settlement-heading h3 { margin: 0; font-size: 14px; }
.profit-editor-settlement-heading span, .profit-editor-settlement p, .profit-editor-totals dt { color: #b5cce0; }
.profit-editor-settlement p { margin: 7px 0 0; overflow-wrap: anywhere; }
.profit-editor-settlement p:empty { display: none; }
.profit-editor-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 8px 0 0; }
.profit-editor-totals dd { margin: 4px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#profit-editor-edit-cost { display: block; margin-top: 6px; padding: 4px 8px; }
#profit-cost-dialog { width: min(460px, calc(100% - 30px)); }
#profit-cost-sheet { width: min(520px, calc(100% - 30px)); }
#profit-cost-sheet p { color: #c4d9ed; line-height: 1.55; }
#profit-cost-sheet-download { display: inline-block; margin: 0 0 14px; text-decoration: underline; }
#profit-cost-sheet-upload { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
#profit-cost-sheet-upload label { display: grid; gap: 5px; min-width: 0; }
#profit-cost-sheet-status:empty { display: none; }
#profit-cost-form { display: grid; gap: 12px; }
#profit-cost-form label { display: grid; gap: 6px; }
#profit-cost-form label[hidden] { display: none; }
#profit-cost-form label :is(input, select) { width: 100%; }
.profit-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 12px; margin: 12px 0; }
#profit-editor form label { display: grid; gap: 5px; color: #c6daed; font-size: 12px; }
#profit-editor :is(input, textarea) { width: 100%; }
#profit-editor textarea { background: #0b1d31; color: #e0f0ff; border: 1px solid #314966; border-radius: 6px; padding: 8px; resize: vertical; }
#profit-editor-error, #profit-cost-error { color: #ffc0b8; }
#profit-editor-error:empty, #profit-cost-error:empty, #profit-feedback:empty { display: none; }

#profit-locked { padding: 12px 16px; margin-bottom: 14px; }

#profit-cost-sheet-open, #profit-section .profit-row-actions { display:none; }
.profit-sort-heading { display:flex; align-items:center; gap:6px; width:100%; border:0; padding:3px 0; background:transparent; color:inherit; text-align:left; font:inherit; white-space:nowrap; }
.profit-sort-heading span { color:#9ab5cd; }
.profit-scroll th[aria-sort] .profit-sort-heading, .profit-scroll th[aria-sort] .profit-sort-heading span { color:#45e8ff; }
