/* Planning and reporting (pl- prefix): statement layout, filter bar, grids, scorecard, commentary. */
.pl-tabs { margin-bottom: 2px; }
.pl-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; background: #fff; border: 1px solid var(--line, #dfe6ed); border-radius: 4px; padding: 10px 12px; position: relative; min-width: 0; }
.pl-bar > label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pl-bar > label > span, .pl-dimgrid label > span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.pl-bar select.ct-input, .pl-bar input.ct-input { min-width: 120px; max-width: 260px; }
.pl-bar .pl-wide select.ct-input { min-width: 260px; max-width: 100%; }
.pl-barbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.pl-dims { flex: 1 1 100%; order: 9; }
.pl-dims > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--brand-primary); padding: 4px 0; list-style: none; }
.pl-dims > summary::-webkit-details-marker { display: none; }
.pl-dimgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 10px; padding-top: 6px; }
.pl-dimgrid label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pl-dimgrid select { width: 100%; }

.pl-stmt td.pl-acc, .pl-stmt th.pl-acc, .pl-grid .pl-acc { min-width: 240px; white-space: normal; }
.pl-stmt td.pl-acc a { color: inherit; text-decoration: none; }
.pl-stmt td.pl-acc a:hover { color: var(--brand-primary); text-decoration: underline; }
.ct-tbl tr.pl-sec td { background: #eef3f8; color: #2f5f88; font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding-top: 7px; padding-bottom: 7px; }
.ct-tbl tr.pl-grand td { font-weight: 800; background: #e6eef6; border-top: 2px solid #c9d7e5; }
.pl-good { color: var(--okFg, #0d7a50); font-weight: 700; }
.pl-bad { color: var(--badFg, #b42335); font-weight: 700; }
.pl-notes { margin: 0; padding-left: 18px; color: var(--text2); font-size: 12.5px; line-height: 1.55; }
.pl-notes li + li { margin-top: 4px; }
.pl-pad { padding: 10px 12px; }
.pl-matrix td.num, .pl-matrix th.r { min-width: 84px; }

.pl-grid th, .pl-grid td { font-size: 12px; }
.pl-grid td.num { min-width: 64px; }
.pl-grid th.pl-act, .pl-grid td.pl-act { background: #f4f7fa; color: #4b5d70; }
.pl-edit td { padding: 4px 3px; }
.pl-edit .pl-acc { min-width: 300px; }
.pl-num { width: 82px; min-width: 70px !important; text-align: right; padding: 0 6px; }
.pl-sm { width: 90px; min-width: 70px !important; }
.pl-dimrow { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.pl-dimrow select { flex: 1 1 120px; min-width: 110px !important; }
.pl-edit textarea { width: 100%; margin-top: 4px; }
.pl-just { color: #6d5a1e !important; }
.pl-x { text-align: center; font-weight: 800; color: var(--muted); }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
.pl-chip { padding: 4px 10px; border-radius: 12px; background: #eef4fa; border: 1px solid #d6e2ee; font-size: 12px; }
.pl-chip b { color: #12324f; }
.ct-tbl tr.pl-cur td { background: #f0f6fd; }
.ct-tbl tr.pl-flag td { background: #fff8e8; }
.pl-sens th { background: #f5f8fb; white-space: nowrap; }
.pl-sens td.pl-mid, .pl-grid td.pl-mid { outline: 2px solid var(--brand-primary); outline-offset: -2px; font-weight: 800; }
.pl-inlinesel { display: inline-block; margin-top: 4px; }
.pl-inlinesel select { height: 28px; font-size: 12px; min-width: 120px; }

.pl-thread { list-style: none; margin: 0; padding: 0; }
.pl-thread li { padding: 9px 12px; border-bottom: 1px solid #edf1f5; }
.pl-thread li.q { border-left: 3px solid #d99a06; }
.pl-thread li.d { border-left: 3px solid #12a079; }
.pl-thread li.done { opacity: .78; }
.pl-thread .h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.pl-thread .h form, .pl-thread .h .ct-pill { margin-left: auto; }
.pl-thread .b { margin-top: 4px; font-size: 13px; color: var(--text2); white-space: normal; overflow-wrap: anywhere; }
.pl-cform textarea { width: 100%; }
.pl-crow, .pl-aform { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.pl-crow select, .pl-aform select { flex: 0 1 150px; min-width: 0; }
.pl-aform input { flex: 1 1 140px; min-width: 0; }

.pl-comment p { display: flex; gap: 10px; margin: 0 0 10px; padding: 9px 11px; border-radius: 4px; background: #f5f8fb; border-left: 3px solid #12a079; line-height: 1.5; font-size: 13px; }
.pl-comment p.warn { border-left-color: #d99a06; background: #fffaf0; }
.pl-comment p.bad { border-left-color: #c2334a; background: #fff4f5; }
.pl-comment p > i { font-size: 16px; color: #2f5f88; flex: 0 0 auto; margin-top: 1px; }
.pl-comment p > span { min-width: 0; overflow-wrap: anywhere; }
.pl-comment.big p { font-size: 14px; padding: 12px 14px; }
.pl-ai { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.pl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #c3ced9; vertical-align: middle; }
.pl-dot.ok { background: #12a079; } .pl-dot.warn { background: #d99a06; } .pl-dot.bad { background: #d6455d; }
.pl-quote { white-space: normal; line-height: 1.55; padding: 10px 12px; background: #f7f9fb; border-left: 3px solid #c9d7e5; border-radius: 3px; overflow-wrap: anywhere; }

@media (max-width: 760px) {
    .pl-bar { padding: 8px; }
    .pl-bar > label { flex: 1 1 140px; }
    .pl-bar select.ct-input, .pl-bar input.ct-input { width: 100%; max-width: none; min-width: 0; }
    .pl-bar .pl-wide select.ct-input { min-width: 0; }
    .pl-barbtns { margin-left: 0; width: 100%; }
    .pl-barbtns .ct-btn { min-height: 40px; }
    .pl-stmt td.pl-acc, .pl-stmt th.pl-acc, .pl-grid .pl-acc { min-width: 170px; }
}
@media print {
    .pl-bar, .pl-tabs, .ct-toolbar, .pl-barbtns { display: none !important; }
}
.pl-expl { min-width: 300px !important; }
