/* «Отчёт о прибыли» (/inside/income-report) and «Прибыль по товарам» (/inside/profit). Canvas «DigiHelper — кабинет», pages «Отчёт о прибыли»,
   «Прибыль по товарам» v35 (approved 2026-11-25). Uses dha- (ai-page), sk- (stock-page), dx-/ac- (account-page), tf- (twofa-page), InfoTip.
   Prefixes: pf- both pages, pl- the profit and loss statement. */
/* app.css sets a font on every element and pads sections: both set back here. */
.pl *, .pf-mi, .pl-it, .pl-it *, .pl-lst *, .pf-tax, .pf-tax *, .pl-vs label { font-family: var(--dhs-body); }
.pf-ctl { display: flex; align-items: center; gap: 12px; }
.pf-seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--dhs-surface-2); }
.pf-seg button { height: 40px; min-width: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--dhs-ink-2); font: 500 14.5px/20px var(--dhs-body); white-space: nowrap; cursor: pointer; }
.pf-seg button:hover { color: var(--dhs-ink); }
.pf-seg [aria-pressed="true"] { background: var(--dhs-surface); color: var(--dhs-ink); font-weight: 600; box-shadow: var(--dhs-shadow-sm); }
.pf-ctl .dha-sel { height: 48px; border-radius: 14px; width: 220px; }
.pf-tax { display: inline-flex; align-items: center; gap: 10px; font: 400 14.5px/20px var(--dhs-body); color: var(--dhs-ink-2); }
.pf-tax .dha-inp { width: 64px; height: 48px; border-radius: 14px; text-align: center; padding: 0 6px; }
.pf-ctl .dha-btn { height: 48px; border-radius: 14px; }
.pf-sp { flex: 1; }
.pf-date { font: 400 14px/20px var(--dhs-body); color: var(--dhs-muted); white-space: nowrap; }

/* result panel */
.pf-res { --c: #3dd69b; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; padding: 36px 40px; }
.pf-res.loss { --c: #ff8a7d; }
.pf-l { display: flex; align-items: center; gap: 10px; font: 500 16px/22px var(--dhs-body); color: var(--dhs-on-night-muted); }
.pf-n { margin-top: 12px; font: 600 84px/84px var(--dhs-display); letter-spacing: -.035em; color: #fff; white-space: nowrap; }
.pf-n small { font-size: 44px; letter-spacing: -.02em; color: var(--dhs-on-night-muted); }
.pf-sub { margin-top: 14px; font: 400 15px/22px var(--dhs-body); color: var(--dhs-on-night-muted); }
.pf-sub b { color: var(--dhs-on-night); font-weight: 600; }
.pf-f { display: grid; grid-template-columns: repeat(var(--k, 2), auto); gap: 22px 44px; margin: 0; }
.pf-f dt { font: 400 14px/20px var(--dhs-body); color: var(--dhs-on-night-muted); white-space: nowrap; }
.pf-f dd { margin: 2px 0 0; font: 600 28px/34px var(--dhs-display); letter-spacing: -.01em; white-space: nowrap; }

.pf-card { background: var(--dhs-surface); border: 1px solid var(--dhs-line); border-radius: 28px; padding: 28px 32px; }
.pf-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .pf-h h2 { margin: 0; font: 600 22px/28px var(--dhs-display); } .pf-h .pf-date { margin-left: auto; }
.pf-rep { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 52px; border-top: 1px solid var(--dhs-line); font: 400 15px/21px var(--dhs-body); }
.pf-rep:first-of-type { border-top: 0; } .pf-rep > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pf-rep b { font: 600 20px/26px var(--dhs-display); }
/* first screen */
.pf-start { --c: #1fa1f1; padding: 56px 56px 60px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.pf-start h2 { margin: 0; font: 600 40px/46px var(--dhs-display); letter-spacing: -.02em; max-width: 15em; text-wrap: balance; }
.pf-start .dha-btn { height: 60px; padding: 0 32px; border-radius: 18px; font-size: 17px; }
.pf-ben { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; font: 400 17px/24px var(--dhs-body); color: var(--dhs-on-night); } .pf-ben li { display: flex; gap: 12px; } .dha .pf-ben .dhs-ic { color: #63e2b0; margin-top: 2px; }
/* product picker */
.pf-pick { position: relative; } .dha .pf-pick .dha-btn .dhs-ic { width: 18px; height: 18px; }
.pf-menu { position: absolute; left: 0; top: 56px; z-index: 5; width: 440px; background: var(--dhs-surface); border: 1px solid var(--dhs-line); border-radius: 20px; box-shadow: var(--dhs-shadow-lg); padding: 12px; }
.pf-menu .sk-search { width: 100%; margin-bottom: 8px; }
.pf-mi { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 10px; border-radius: 12px; font: 400 15px/21px var(--dhs-body); cursor: pointer; } .pf-mi:hover { background: var(--dhs-surface-2); } .pf-mi input { width: 20px; height: 20px; margin: 0; accent-color: var(--dhs-brand); }
.pf-mf { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 10px 0 0 10px; border-top: 1px solid var(--dhs-line); font: 400 14px/20px var(--dhs-body); color: var(--dhs-muted); }
/* product table */
.pf-tb { display: flex; align-items: center; gap: 16px; padding: 20px 24px; } .pf-tb .sk-search { width: 260px; } .pf-tb .pf-seg { border-radius: 12px; padding: 3px; } .pf-tb .pf-seg button { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.pf-tb .pf-seg b { margin-left: 6px; font-weight: 600; } .pf-tb .w { color: var(--dhs-warning); } .pf-tb .d { color: var(--dhs-danger); }
.pf-tb .sv { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tf .r { text-align: right; } .tf.pf th.r > button, .tf.pf th.r > span { justify-content: flex-end; }
.tf.pf th button.pf-th { display: inline-flex; gap: 4px; border: 0; background: none; padding: 0; min-height: 36px; align-items: center; font: inherit; color: inherit; cursor: pointer; } .tf.pf th[aria-sort="descending"] { color: var(--dhs-ink); font-weight: 600; }
.tf.pf th, .tf.pf td { padding: 0 10px; } .tf.pf th:first-child, .tf.pf td:first-child { padding-left: 24px; } .tf.pf th:last-child, .tf.pf td:last-child { padding-right: 24px; }
.tf.pf td { height: 72px; } .tf.pf .m { color: var(--dhs-muted); }
.pf-sm { display: block; font: 400 13px/18px var(--dhs-body); color: var(--dhs-muted); }
.pf-cost { display: inline-grid; grid-template-columns: 74px 36px; border: 1px solid var(--dhs-line); border-radius: 12px; height: 44px; overflow: hidden; background: var(--dhs-surface); }
.pf-cost input { border: 0; min-width: 0; background: transparent; text-align: right; padding: 0 8px; font: 500 15px/1 var(--dhs-body); color: var(--dhs-ink); } .pf-cost button { border: 0; border-left: 1px solid var(--dhs-line); background: var(--dhs-bg); color: var(--dhs-muted); font: 600 14px/1 var(--dhs-body); cursor: pointer; }
.pf-cost.need { border-color: var(--dhs-warning); } .pf-cost.ed { border-color: var(--dhs-brand); box-shadow: 0 0 0 3px var(--dhs-brand-soft); }
.pf-pr { font: 600 16px/22px var(--dhs-body); } .pos { color: var(--dhs-success); } .neg { color: var(--dhs-danger); }
.tf.pf th { white-space: nowrap; }

/* P&L statement («Отчёт о прибылях и убытках») */
.pl-2 { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 20px; align-items: start; }
.pl-side { display: flex; flex-direction: column; gap: 20px; }
.pl-doc { background: var(--dhs-surface); border: 1px solid var(--dhs-line); border-radius: 24px; padding: 36px 40px 40px; }
.pl-dh { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; padding-bottom: 20px; }
.pl-dh h2 { margin: 0; font: 600 24px/30px var(--dhs-display); letter-spacing: -.01em; } .pl-dh p { margin: 6px 0 0; font: 400 14.5px/21px var(--dhs-body); color: var(--dhs-muted); } .pl-dh p + p { margin-top: 0; }
table.pl { width: 100%; border-collapse: collapse; table-layout: fixed; font: 400 15px/21px var(--dhs-body); font-variant-numeric: tabular-nums; }
.pl th, .pl td { font-family: var(--dhs-body); padding: 0 0 0 12px; text-align: right; white-space: nowrap; } .pl th:first-child, .pl td:first-child { padding-left: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.pl thead th { height: 44px; border-top: 2px solid var(--dhs-ink); border-bottom: 1px solid var(--dhs-ink); font-weight: 600; font-size: 13.5px; }
.pl tbody td { height: 40px; }
.pl .h td { height: 48px; padding-top: 10px; font-weight: 600; }
.pl .i td:first-child { padding-left: 24px; }
.pl .s td { font-weight: 600; } .pl .s td:not(:first-child) { border-top: 1px solid var(--dhs-ink); }
.pl .g td { height: 50px; font: 600 17px/24px var(--dhs-body); border-top: 1px solid var(--dhs-ink); border-bottom: 1px solid var(--dhs-ink); background: var(--dhs-bg); } .pl .g td:first-child { padding-left: 12px; }
.pl .n td { height: 60px; font: 600 20px/26px var(--dhs-body); border-top: 1px solid var(--dhs-ink); border-bottom: 4px double var(--dhs-ink); }
.pl .sp td { height: 14px; }
.pl .pct { color: var(--dhs-muted); font-weight: 400; font-size: 14px; }
.pl .v::after { content: ")"; visibility: hidden; } .pl .v.ng::after { content: none; }
.pl .ed { padding: 3px 0; } .pl .ed .dha-inp { width: 118px; height: 36px; border-radius: 10px; padding: 0 calc(.36em + 8px) 0 8px; margin-right: -8px; text-align: right; font: 400 15px/1 var(--dhs-body); font-variant-numeric: tabular-nums; }
.pl .nm .dha-inp { width: 230px; height: 36px; border-radius: 10px; margin-left: -12px; font: 400 15px/1 var(--dhs-body); } .pl .nm { overflow: visible !important; } .pl .nm span { display: inline-flex; align-items: center; gap: 2px; }
.pl .ad { border: 0; background: none; padding: 0; min-height: 40px; font: 600 14.5px/20px var(--dhs-body); color: var(--dhs-brand-strong); display: inline-flex; gap: 8px; align-items: center; cursor: pointer; } .pl .ad .dhs-ic { width: 18px; height: 18px; }
.pl .lb { display: inline-flex; align-items: center; gap: 8px; }
.pl-net { --c: #3dd69b; padding: 28px; border-radius: 28px; display: flex; flex-direction: column; gap: 6px; } .pl-net b { font: 600 48px/52px var(--dhs-display); letter-spacing: -.025em; color: #fff; white-space: nowrap; } .pl-net .dha-btn { margin-top: 14px; height: 52px; border-radius: 14px; width: 100%; } .pl-net span { font: 400 14.5px/21px var(--dhs-body); color: var(--dhs-on-night-muted); }
/* saved */
.pl-sv { background: var(--dhs-surface); border: 1px solid var(--dhs-line); border-radius: 24px; padding: 24px; } .pl-sv h2 { margin: 0; font: 600 20px/26px var(--dhs-display); } .pl-sv .pf-h { margin-bottom: 8px; }
.pl-it { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 64px; border-top: 1px solid var(--dhs-line); cursor: pointer; } .pl-it:first-of-type { border-top: 0; } .pl-it input { width: 20px; height: 20px; margin: 0; accent-color: var(--dhs-brand); }
.pl-it b { display: block; font: 600 15px/20px var(--dhs-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pl-it small { display: block; font: 400 13px/18px var(--dhs-body); color: var(--dhs-muted); } .pl-it > :last-child { font: 600 15px/20px var(--dhs-body); white-space: nowrap; }
.pl-sv .dha-btn { width: 100%; height: 48px; border-radius: 14px; margin-top: 12px; }
.pl-lst { display: grid; grid-template-columns: 24px minmax(0, 1fr) 180px 170px 130px 84px; gap: 16px; align-items: center; min-height: 64px; border-top: 1px solid var(--dhs-line); font: 400 15px/21px var(--dhs-body); color: var(--dhs-ink-2); } .pl-lst:first-of-type { border-top: 0; } .pl-lst input { width: 20px; height: 20px; margin: 0; accent-color: var(--dhs-brand); } .pl-lst b { font-weight: 600; color: var(--dhs-ink); } .pl-lst .r { text-align: right; }
.pl-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; } .pl-bar h2 { margin: 0; font: 600 22px/28px var(--dhs-display); } .pl-bar .dha-btn { margin-left: auto; }
/* compare */
.pl-vs { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); gap: 16px; align-items: end; } .pl-vs .dha-sel { width: 100%; height: 56px; border-radius: 16px; font-size: 16px; } .pl-vs label { display: block; margin-bottom: 8px; font: 500 14px/20px var(--dhs-body); color: var(--dhs-muted); } .dha .pl-sw { width: 48px; height: 48px; margin-bottom: 4px; border: 1px solid var(--dhs-line); border-radius: 14px; background: var(--dhs-surface); color: var(--dhs-ink-2); display: grid; place-items: center; cursor: pointer; }
.pl thead small { display: block; font: 400 13px/17px var(--dhs-body); color: var(--dhs-muted); } .pl.cmp thead th { height: 62px; }
.pl .up { color: var(--dhs-success); } .pl .dn { color: var(--dhs-danger); } .pl.cmp td:nth-child(4) { border-left: 1px solid var(--dhs-line); } .pl.cmp th:nth-child(4) { border-left: 1px solid var(--dhs-line); }
.pl.cmp thead th { vertical-align: bottom; padding-bottom: 8px; } .pl.cmp thead .v::after { content: none; } .pl.cmp thead .v { padding-right: .36em; } .pl.cmp td:nth-child(3), .pl.cmp th:nth-child(3) { padding-right: 12px; } .pl td.ed { position: relative; z-index: 1; }

section.pl-doc, section.pl-sv, section.pf-card, section.pl-net, section.pf-res, section.pf-start { margin: 0; }
.pf-ctl { flex-wrap: wrap; }
.pf-ctl .dha-sel { width: auto; min-width: 180px; max-width: 260px; }
.pf-seg button:disabled { opacity: .55; cursor: default; }
.pf-menu-l { max-height: 320px; overflow-y: auto; }
.pf-mi span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-back { position: fixed; inset: 0; z-index: 4; }
.pf-menu { z-index: 60; max-width: calc(100vw - 48px); }
.pf-ctl--r { position: relative; }
.pf-range { width: 420px; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.pf-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pf-months button { min-height: 52px; border: 1px solid var(--dhs-line); border-radius: 12px; background: var(--dhs-surface); color: var(--dhs-ink); font: 600 14.5px/19px var(--dhs-body); cursor: pointer; } .pf-months button:hover { background: var(--dhs-surface-2); }
.pf-months small { display: block; font: 400 12.5px/16px var(--dhs-body); color: var(--dhs-muted); } .pf-months [aria-pressed="true"] { border-color: var(--dhs-brand); box-shadow: 0 0 0 1px var(--dhs-brand); }
.pf-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .pf-dates .dha-inp { width: 100%; min-width: 0; }
.pf-range .dha-btn { width: 100%; }
.pf-warn { margin: 0; padding: 14px 18px; border-radius: 16px; background: var(--dhs-warning-soft); color: var(--dhs-warning); font: 500 14.5px/21px var(--dhs-body); }
.pf-muted { margin: 0; padding: 16px 10px; font: 400 14.5px/21px var(--dhs-body); color: var(--dhs-muted); }
.pf-scroll { overflow-x: auto; border-radius: 0 0 24px 24px; } .tf.pf { min-width: 1000px; }
.pf-cost:focus-within { border-color: var(--dhs-focus); box-shadow: 0 0 0 3px var(--dhs-brand-soft); } .pf-cost input:focus { outline: none; }
.pl-h { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 40px; } .pl-h:hover { color: var(--dhs-brand-strong); }
.pl-h b { color: inherit; } .pl-it { cursor: default; }
.pl-back { padding: 0; border: 0; background: none; cursor: pointer; width: fit-content; min-height: 32px; } .pl-back:hover { color: var(--dhs-ink); }
.pl-net.loss { --c: #ff8a7d; }
.pl-net .dha-btn .dhs-ic { width: 20px; height: 20px; }
.pl td.ed, .pl td.nm { overflow: visible; }
.pl .bad { color: var(--dhs-danger); }
.pl-note { margin: 18px 0 0; font: 400 13.5px/20px var(--dhs-body); color: var(--dhs-muted); }
.pl-scroll { overflow-x: auto; }
@media (max-width: 1180px) { .pl-2 { grid-template-columns: minmax(0, 1fr); } .pf-res { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 760px) {
    .pf-n { font-size: 52px; line-height: 56px; } .pf-n small { font-size: 28px; } .pf-res { padding: 28px 24px; } .pf-f { gap: 18px 24px; } .pf-f dd { font-size: 20px; line-height: 26px; }
    .pf-seg { max-width: 100%; overflow-x: auto; } .pf-seg button { padding: 0 12px; }
    .pf-start { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; gap: 28px; } .pf-start h2 { font-size: 30px; line-height: 36px; } .pf-start .dha-btn { width: 100%; }
    .pl-doc { padding: 24px 18px; } .pl-vs { grid-template-columns: minmax(0, 1fr); } .pl-sw { margin: 0 auto; } .pl.cmp { min-width: 760px; }
    .pl { font-size: 14px; } .pl .i td:first-child { padding-left: 10px; } .pl .nm .dha-inp { width: 130px; } .pl .nm { padding-left: 10px; } .pl .nm .dha-inp { margin-left: -6px; } .pl .ed .dha-inp { width: 96px; }
    .pl:not(.cmp) col:nth-child(2) { width: 118px !important; } .pl:not(.cmp) col:nth-child(3) { width: 72px !important; }
    .pl-lst { grid-template-columns: 24px minmax(0, 1fr) auto auto; padding: 8px 0; } .pl-lst > span:nth-of-type(1), .pl-lst > span:nth-of-type(2) { display: none; }
    .pl-bar { flex-wrap: wrap; }
}
