/* Business Specifics → Portfolio Reports (portfolio-reports.js). Self-contained; app tokens with fallbacks. */
.lb-page.pr-root { max-width: 1240px; }
.pr-hero h2 { margin: 0.2rem 0 0.4rem; }
.pr-hero .muted { max-width: 720px; }
.pr-root .hidden { display: none !important; }

.pr-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; margin: 1.25rem 0 1rem; }
.pr-card-wrap { display: flex; flex-direction: column; gap: 0.5rem; }
.pr-card {
  display: flex; gap: 0.85rem; align-items: flex-start; text-align: left; width: 100%;
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: var(--radius, 12px);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(15, 45, 61, 0.06)); padding: 1rem 1.1rem; cursor: pointer;
  font: inherit; color: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.pr-card:hover { border-color: var(--bubble-light, #7eb8d4); }
.pr-card.is-selected { border-color: var(--accent, #1e4d6b); box-shadow: 0 0 0 2px var(--accent-light, #e8f2f7), var(--shadow-sm, 0 2px 8px rgba(15, 45, 61, 0.06)); }
.pr-card.is-coming { background: #fafbfc; }
.pr-card.is-coming .pr-card-icon { color: var(--text-3, #94a3b8); background: #f1f5f9; }
.pr-card-icon { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 10px; display: grid; place-items: center; color: var(--accent, #1e4d6b); background: var(--accent-light, #e8f2f7); }
.pr-card-icon svg { width: 1.35rem; height: 1.35rem; }
.pr-card-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.pr-card-name { font-weight: 700; font-size: 1.05rem; }
.pr-card-long { color: var(--text-2, #5c6b7e); font-size: 0.85rem; }
.pr-card-last { color: var(--text-2, #5c6b7e); font-size: 0.8rem; margin-top: 0.3rem; }
.pr-chip { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--accent-light, #e8f2f7); color: var(--accent, #1e4d6b); margin: 0.1rem 0; }
.pr-chip-next { background: #f1f5f9; color: var(--text-2, #5c6b7e); }
.pr-chip-approved { background: var(--success-bg, #dcfce7); color: var(--success, #15803d); }

.pr-history { list-style: none; margin: 0; padding: 0 0.25rem; display: flex; flex-direction: column; gap: 0.2rem; }
.pr-history-item { display: flex; flex-direction: column; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid var(--success, #15803d); padding: 0.25rem 0.6rem; cursor: pointer; font: inherit; color: inherit; border-radius: 0 6px 6px 0; }
.pr-history-item:hover { background: var(--accent-light, #e8f2f7); }
.pr-history-period { font-size: 0.82rem; font-weight: 600; }
.pr-history-meta { font-size: 0.74rem; color: var(--text-2, #5c6b7e); }
.pr-history-empty { font-size: 0.78rem; margin: 0 0.35rem; }
/* Capital Meeting: "Previous reports" folder (opens in place, over the page) */
.pr-folder { position: relative; }
.pr-folder-toggle { display: inline-flex; align-items: center; gap: 0.45rem; width: 100%; font: inherit; font-size: 0.84rem; font-weight: 600; color: var(--text, #1a2332); background: var(--surface, #fff); border: 1px dashed var(--border, #cbd5e1); border-radius: 10px; padding: 0.4rem 0.65rem; cursor: pointer; text-align: left; }
.pr-folder-toggle:hover, .pr-folder-toggle.is-open { border-style: solid; border-color: var(--accent, #1e4d6b); background: var(--accent-light, #e8f2f7); }
.pr-folder-icon { display: grid; place-items: center; color: var(--accent, #1e4d6b); }
.pr-folder-icon svg { width: 1.1rem; height: 1.1rem; }
.pr-folder-count { margin-left: auto; min-width: 1.5rem; text-align: center; font-size: 0.74rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--accent, #1e4d6b); color: #fff; }
.pr-folder-panel { position: absolute; z-index: 30; top: calc(100% + 0.35rem); left: 0; width: min(34rem, 92vw); max-height: 26rem; overflow: auto; background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 12px; box-shadow: var(--shadow-md, 0 12px 40px rgba(15, 45, 61, 0.18)); padding: 0.6rem 0.7rem 0.7rem; }
.pr-folder-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.1rem 0.2rem 0.5rem; border-bottom: 1px solid var(--border, #e2e8f0); margin-bottom: 0.4rem; }
.pr-folder-head .btn { margin-left: auto; }
.pr-folder-filter { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--text-2, #5c6b7e); }
.pr-folder-filter select { font: inherit; font-size: 0.82rem; padding: 0.2rem 0.4rem; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; background: #fff; }
.pr-folder-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.pr-folder-item { display: flex; flex-direction: column; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid var(--success, #15803d); padding: 0.35rem 0.6rem; cursor: pointer; font: inherit; color: inherit; border-radius: 0 8px 8px 0; }
.pr-folder-item:hover, .pr-folder-item:focus-visible { background: var(--accent-light, #e8f2f7); }
.pr-folder-title { font-size: 0.86rem; font-weight: 600; }
.pr-folder-meta { font-size: 0.75rem; color: var(--text-2, #5c6b7e); }
.pr-folder-empty { font-size: 0.8rem; margin: 0.3rem 0.2rem; }
.pr-folder-panel.is-right { left: auto; right: 0; }
.pr-folder-version { display: inline-block; margin-left: 0.3rem; font-size: 0.7rem; font-weight: 700; padding: 0.02rem 0.4rem; border-radius: 999px; background: var(--accent-light, #e8f2f7); color: var(--accent, #1e4d6b); vertical-align: 1px; }
.pr-viewer-note { font-size: 0.76rem; align-self: center; }

.pr-settings { background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: var(--radius, 12px); padding: 1rem 1.2rem; margin-bottom: 1.25rem; }
.pr-settings h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.pr-type-settings { border-bottom: 1px solid var(--border, #e2e8f0); padding-bottom: 0.6rem; margin-bottom: 0.8rem; }
.pr-setting-line { margin: 0.25rem 0; font-size: 0.86rem; color: var(--text-2, #5c6b7e); }
.pr-setting-line strong { color: var(--text, #1a2332); font-weight: 600; margin-right: 0.25rem; }
.pr-form { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; }
.pr-field { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; color: var(--text-2, #5c6b7e); }
.pr-field select, .pr-field input { font: inherit; font-size: 0.9rem; padding: 0.4rem 0.55rem; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; min-width: 12rem; background: #fff; color: var(--text, #1a2332); }
.pr-error { color: var(--danger, #dc2626); font-weight: 600; }

.pr-preview { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.pr-paper { display: flex; flex-direction: column; gap: 1rem; }
.pr-page { background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; box-shadow: var(--shadow-md, 0 12px 40px rgba(15, 45, 61, 0.12)); padding: 1.1rem 1.3rem 1.2rem; border-top: 5px solid var(--accent, #1e4d6b); }
.pr-paper-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border, #e2e8f0); padding-bottom: 0.6rem; margin-bottom: 0.8rem; }
.pr-paper-head h3 { margin: 0; font-size: 1.25rem; }
.pr-paper-head p { margin: 0.1rem 0 0; font-size: 0.78rem; }
.pr-paper-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.85rem; }
.pr-figures { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem; }
.pr-figure { border: 1px solid var(--border, #e2e8f0); border-radius: 8px; padding: 0.45rem 0.6rem; display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.pr-figure-label { font-size: 0.72rem; color: var(--text-2, #5c6b7e); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-figure-value { font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.pr-delta { font-size: 0.7rem; font-weight: 600; }
.pr-delta-good { color: var(--success, #15803d); }
.pr-delta-bad { color: var(--danger, #dc2626); }
.pr-delta-flat { color: var(--text-2, #5c6b7e); }
.pr-figure-sub { font-size: 0.68rem; }
.pr-summary { margin: 0.9rem 0 0.6rem; }
.pr-summary h4, .pr-page h4 { margin: 0 0 0.4rem; font-size: 0.85rem; }
.pr-line { display: flex; gap: 0.45rem; align-items: flex-start; margin-bottom: 0.3rem; }
.pr-line textarea, .pr-red-row textarea { flex: 1; font: inherit; font-size: 0.86rem; border: 1px dashed transparent; border-radius: 6px; padding: 0.15rem 0.35rem; resize: vertical; min-height: 1.6rem; background: transparent; color: var(--text, #1a2332); }
.pr-line textarea:hover, .pr-red-row textarea:hover { border-color: var(--border, #e2e8f0); }
.pr-line textarea:focus, .pr-red-row textarea:focus { border-color: var(--accent, #1e4d6b); outline: none; background: #fff; }
.pr-ai-tag { flex: none; font-size: 0.66rem; font-weight: 700; color: var(--accent, #1e4d6b); background: var(--accent-light, #e8f2f7); border-radius: 4px; padding: 0.1rem 0.3rem; margin-top: 0.25rem; white-space: nowrap; }
.pr-strip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.pr-strip .pr-chart { margin: 0; max-width: 300px; }
.pr-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.75rem; font-size: 0.72rem; color: var(--text-2, #5c6b7e); margin: 0.4rem 0 0.7rem; }
.pr-legend strong { color: var(--text-2, #5c6b7e); }
.pr-legend-item { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text, #1a2332); }
.pr-phase { flex: none; display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; color: #fff; font-size: 0.68rem; font-weight: 700; line-height: 1; }
.pr-legend .pr-phase { width: 1rem; height: 1rem; font-size: 0.62rem; }
.pr-tables { display: flex; flex-direction: column; gap: 0.75rem; }
.pr-dept { width: 100%; border-collapse: collapse; font-size: 0.8rem; table-layout: fixed; }
.pr-dept th, .pr-dept td { text-align: left; vertical-align: top; padding: 0.35rem 0.55rem; }
.pr-dept-head th { background: var(--accent, #1e4d6b); color: #fff; font-size: 0.9rem; }
.pr-dept-head .pr-dept-size { text-align: right; font-weight: 500; font-size: 0.76rem; }
.pr-dept-cols th { background: #f8fafc; color: var(--text-2, #5c6b7e); font-size: 0.7rem; font-weight: 700; }
.pr-dept-cols th:nth-child(1) { width: 30%; } .pr-dept-cols th:nth-child(2) { width: 52%; } .pr-dept-cols th:nth-child(3) { width: 18%; }
.pr-row td { border-bottom: 1px solid var(--border, #e2e8f0); }
.pr-row.is-quiet { background: #fafbfc; }
.pr-proj { display: flex; gap: 0.5rem; align-items: flex-start; }
.pr-proj strong { display: block; font-size: 0.84rem; line-height: 1.3; }
.pr-proj-meta { display: block; font-size: 0.7rem; color: var(--text-2, #5c6b7e); }
.pr-proj-meta .pr-dot { margin-left: 0; }
.pr-bullets { list-style: none; margin: 0; padding: 0; }
.pr-bullets .pr-line { margin-bottom: 0.1rem; }
.pr-bullets .pr-line::before { content: "•"; flex: none; padding-top: 0.15rem; color: var(--text-2, #5c6b7e); }
.pr-bullets textarea { font-size: 0.8rem; min-height: 1.45rem; padding: 0.1rem 0.3rem; overflow: hidden; resize: none; }
.pr-summary textarea { overflow: hidden; resize: none; }
.pr-noupdate { margin: 0; color: var(--text-2, #5c6b7e); font-size: 0.8rem; }
.pr-flag { margin: 0.1rem 0 0; color: var(--text-2, #5c6b7e); font-size: 0.72rem; }
.pr-flag .pr-dot { margin-left: 0; }
.pr-col-pe { font-size: 0.8rem; }
.pr-pe-note { display: block; font-size: 0.68rem; color: var(--text-2, #5c6b7e); }
.pr-chart { margin: 0 0 0.6rem; }
.pr-chart svg { width: 100%; height: auto; display: block; }
.pr-chart svg text { font-family: var(--font, "DM Sans", system-ui, sans-serif) !important; }
.pr-p2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem 1.2rem; }
.pr-p2-charts .pr-chart-trend { max-width: 62%; }
.pr-red-card { border: 1px solid var(--border, #e2e8f0); border-left: 4px solid #dc2626; border-radius: 6px; padding: 0.45rem 0.6rem; margin-bottom: 0.45rem; font-size: 0.78rem; }
.pr-red-card header { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.2rem; }
.pr-red-row { display: flex; gap: 0.4rem; align-items: flex-start; margin: 0.15rem 0; }
.pr-red-label { flex: none; width: 4.2rem; color: var(--text-2, #5c6b7e); font-weight: 600; padding-top: 0.15rem; }
.pr-red-row textarea { font-size: 0.78rem; }
.pr-dq { font-size: 0.76rem; color: var(--text-2, #5c6b7e); border-top: 1px solid var(--border, #e2e8f0); padding-top: 0.5rem; margin: 0.6rem 0 0; }
.pr-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.pr-actions p { margin: 0; font-size: 0.82rem; max-width: 640px; }

.pr-checklist { position: sticky; top: 1rem; background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: var(--radius, 12px); padding: 0.9rem 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.pr-checklist h3 { margin: 0; font-size: 0.98rem; }
.pr-check-hint { font-size: 0.76rem; margin: 0.15rem 0 0.6rem; }
.pr-check-group h4 { margin: 0.6rem 0 0.25rem; font-size: 0.8rem; }
.pr-check-group ul { list-style: none; margin: 0; padding: 0; }
.pr-check-link { display: flex; flex-direction: column; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid var(--text-3, #94a3b8); padding: 0.2rem 0.5rem; margin: 0.12rem 0; cursor: pointer; font: inherit; color: inherit; border-radius: 0 6px 6px 0; }
.pr-check-link:hover { background: var(--accent-light, #e8f2f7); }
.pr-check-high .pr-check-link { border-left-color: #dc2626; }
.pr-check-medium .pr-check-link { border-left-color: #d4a017; }
.pr-check-missing { font-size: 0.74rem; margin: 0.25rem 0 0; line-height: 1.9; }
.pr-chip-link { border: 0; cursor: pointer; font-family: inherit; }
.pr-chip-link:hover { background: var(--bubble-light, #7eb8d4); color: #fff; }
.pr-check-tool { font-size: 0.76rem; font-weight: 600; color: var(--accent, #1e4d6b); }
.pr-check-text { font-size: 0.76rem; color: var(--text-2, #5c6b7e); }

/* Approved: same green border as approved tool documents (#tool-drawer.approved-record); read-only, no download control. */
.pr-viewer { background: #fff; border-radius: var(--radius, 12px); padding: 0.85rem; margin-bottom: 1.25rem; }
.pr-approved { box-shadow: inset 0 0 0 4px #16a34a; }
.pr-viewer header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.pr-viewer header .btn { margin-left: auto; }
.pr-pdf-frame { width: 100%; height: 640px; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; background: #f8fafc; }

@media (max-width: 1100px) {
  .pr-preview { grid-template-columns: 1fr; }
  .pr-checklist { position: static; max-height: none; }
  .pr-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pr-strip, .pr-p2-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) { .pr-cards { grid-template-columns: 1fr; } }

/* Open POs tables */
.pr-dept-pos { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.pr-dept-pos .pr-po-project td { background: var(--accent-light, #e8f2f7); padding: 0.45rem 0.6rem; }
.pr-dept-pos .pr-po-item td { padding: 0.28rem 0.55rem; border-bottom: 1px solid var(--border, #e2e8f0); vertical-align: top; }
.pr-dept-pos .pr-po-item.is-stale td { background: #fff7f7; }
.pr-po-type { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; padding: 0.08rem 0.4rem; border-radius: 999px; }
.pr-po-type-PO { background: #e0e7ff; color: #3730a3; }
.pr-po-type-request { background: #fce7f3; color: #9d174d; }
.pr-po-num, .pr-po-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-po-amt { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.pr-po-issue { margin: 0.25rem 0; font-size: 0.8rem; }
@media (max-width: 1100px) {
  .pr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Notes summary (stamped Notebook notes of the period → AI view, editable) */
.pr-notes { margin-top: 6px; padding: 5px 8px 4px; border-left: 3px solid var(--accent, #1e4d6b); background: #f4f8fb; border-radius: 0 6px 6px 0; }
.pr-notes-head { margin: 0 0 2px; font-size: 0.74rem; color: var(--accent, #1e4d6b); }
.pr-note-line { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; margin-top: 2px; }
.pr-note-label { font-size: 0.72rem; font-weight: 600; color: var(--muted, #5c6b7e); }
.pr-note-line textarea { grid-column: 1 / -1; width: 100%; box-sizing: border-box; font-size: 0.78rem; min-height: 1.45rem; padding: 0.1rem 0.3rem; overflow: hidden; resize: none; }

/* Notes summary: AI unavailable → a visible alert, never invented content. */
.pr-ai-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #fca5a5; border-left: 4px solid var(--danger, #dc2626); border-radius: 8px; background: #fef2f2; color: #991b1b; font-size: 0.86rem; }
.pr-ai-alert strong { color: var(--danger, #dc2626); }
.pr-ai-alert .btn { margin-left: auto; }
.pr-notes.pr-notes-error { border-left-color: var(--danger, #dc2626); background: #fef2f2; }
.pr-notes-error .pr-notes-head { color: var(--danger, #dc2626); }
.pr-notes-alert { margin: 2px 0 1px; font-size: 0.8rem; font-weight: 600; color: var(--danger, #dc2626); }
.pr-approve-blocked { margin: 0 0 6px; color: var(--danger, #dc2626); font-weight: 600; font-size: 0.84rem; }
#pr-approve:disabled { opacity: 0.55; cursor: not-allowed; }

/* Capital Meeting pack: Part 1 initiation list (PM decisions) + Part 2 ongoing projects (own gates) */
.pr-cap-preview { grid-template-columns: minmax(0, 1fr); }
.pr-cap-preview .pr-checklist { position: static; max-height: none; }
.pr-cap-preview .pr-paper-head { margin-bottom: 0; }
.pr-cap-title { font-size: 0.95rem !important; margin: 0 0 0.6rem !important; padding-left: 0.5rem; border-left: 3px solid var(--accent, #1e4d6b); }
.pr-cap-figures { grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); margin-bottom: 0.8rem; }
.pr-cap-figures .pr-figure-value.is-long { font-size: 0.85rem; line-height: 1.25; }
.pr-cap-table thead th { background: var(--accent, #1e4d6b); color: #fff; }
.pr-cap-table td { border-bottom: 1px solid var(--border, #e2e8f0); vertical-align: middle; }
.pr-cap-table td strong { display: block; font-size: 0.82rem; line-height: 1.3; }
.pr-cap-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pr-cap-table tfoot td { background: var(--accent-light, #e8f2f7); border-bottom: 0; }
.pr-cap-init .pr-dept-cols th:nth-child(1) { width: 17%; } .pr-cap-init .pr-dept-cols th:nth-child(2) { width: 9%; }
.pr-cap-init .pr-dept-cols th:nth-child(3) { width: 9%; } .pr-cap-init .pr-dept-cols th:nth-child(4) { width: 12%; }
.pr-cap-init .pr-dept-cols th:nth-child(5) { width: 23%; } .pr-cap-init .pr-dept-cols th:nth-child(6) { width: 18%; }
.pr-cap-init .pr-dept-cols th:nth-child(7) { width: 12%; }
.pr-cap-need { font-size: 0.76rem; line-height: 1.35; }
.pr-cap-src { display: block; font-size: 0.64rem; color: var(--text-2, #5c6b7e); font-weight: 400; }
.pr-cap-decision { width: 100%; font: inherit; font-size: 0.78rem; padding: 0.25rem 0.35rem; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; background: #fff; color: var(--text, #1a2332); }
.pr-cap-decision.is-proceed_rce { border-color: #15803d; background: #f0fdf4; color: #166534; font-weight: 600; }
.pr-cap-decision.is-conditional_hold { border-color: #d4a017; background: #fffbeb; color: #92400e; font-weight: 600; }
.pr-cap-decision.is-deferred { border-color: #64748b; background: #f8fafc; color: #334155; font-weight: 600; }
.pr-cap-decision.is-not_funded { border-color: #dc2626; background: #fef2f2; color: #991b1b; font-weight: 600; }
.pr-cap-prev { display: block; font-size: 0.64rem; margin-top: 0.15rem; }
/* Part 2: 8 columns (the RCE number column is no longer shown; the value stays stored) */
.pr-cap-ongoing .pr-dept-cols th:nth-child(1) { width: 12%; } .pr-cap-ongoing .pr-dept-cols th:nth-child(2) { width: 5%; }
.pr-cap-ongoing .pr-dept-cols th:nth-child(3) { width: 5%; } .pr-cap-ongoing .pr-dept-cols th:nth-child(4) { width: 8%; }
.pr-cap-ongoing .pr-dept-cols th:nth-child(5) { width: 15%; } .pr-cap-ongoing .pr-dept-cols th:nth-child(6) { width: 15%; }
.pr-cap-ongoing .pr-dept-cols th:nth-child(7) { width: 30%; } .pr-cap-ongoing .pr-dept-cols th:nth-child(8) { width: 10%; }
.pr-cap-hl textarea { width: 100%; min-height: 3.2rem; resize: vertical; font: inherit; }
.pr-cap-narrative { margin-top: 1.5rem; }
.pr-cap-nar-project { margin: 0.9rem 0 1.2rem; }
.pr-cap-nar-project h5 { margin: 0 0 0.35rem; font-size: 1rem; color: #1e4d6b; }
.pr-cap-nar-label { font-weight: 650; margin: 0.45rem 0 0.2rem; }
.pr-cap-nar-skipped { margin-top: 0.8rem; }
.pr-viewer-files { display: flex; gap: 0.5rem; margin: 0.6rem 0 0.8rem; }
.pr-viewer-files button[disabled] { opacity: 0.6; cursor: progress; }
.pr-cap-ongoing .pr-dept-cols th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-gates { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px; }
.pr-gate { display: flex; flex-direction: column; justify-content: space-between; gap: 2px; min-height: 2.6rem; padding: 3px 2px; border: 1px solid; border-radius: 4px; text-align: center; overflow: hidden; }
.pr-gate b { font-size: 0.56rem; line-height: 1.12; overflow-wrap: anywhere; hyphens: manual; }
.pr-gate small { font-size: 0.58rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-gate-done { background: #dcfce7; color: #166534; border-color: #15803d; }
.pr-gate-next { background: #dbeafe; color: #1e3a8a; border-color: #2563eb; }
.pr-gate-overdue { background: #fee2e2; color: #991b1b; border-color: #dc2626; }
.pr-gate-planned { background: #f8fafc; color: #475569; border-color: #cbd5e1; }
.pr-gate-none { background: #fff; color: #94a3b8; border-color: #e2e8f0; border-style: dashed; }
.pr-gate-swatch { display: inline-block; width: 1.1rem; height: 0.65rem; border: 1px solid; border-radius: 3px; }
.pr-cap-legend-note { margin-left: auto; }
.pr-cap-status { font-size: 0.78rem; white-space: nowrap; }
.pr-cap-status .pr-dot, .pr-cap-legend .pr-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; vertical-align: middle; margin-left: 0; margin-right: 0.3rem; }
/* Capital approval → Decision Log write results (above the stored PDF) */
.pr-cap-log { margin: 0.4rem 0 0.6rem; padding: 0.5rem 0.7rem; border: 1px solid var(--border, #d8dee8); border-radius: 6px; background: var(--surface-2, #f8fafc); font-size: 0.8rem; }
.pr-cap-log ul { list-style: none; margin: 0.3rem 0 0; padding: 0; display: grid; gap: 0.2rem; }
.pr-cap-log li { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.pr-cap-log li > span:first-child { font-weight: 600; min-width: 12rem; }
/* Available plan-year budget editor (PM / Superuser only; euros stay in settings, not in the pack) */
.pr-cap-plan { margin: 0.6rem 0 0; padding: 0.5rem 0.7rem; border: 1px solid var(--border, #d8dee8); border-radius: 6px; background: var(--surface-2, #f8fafc); }
.pr-cap-plan-form { margin-top: 0.35rem; }
/* Confirm step before Approve archives Not funded projects */
.pr-cap-confirm { margin: 0.6rem 0; padding: 0.7rem 0.8rem; border: 1px solid #f59e0b; border-radius: 6px; background: #fffbeb; }
.pr-cap-confirm ul { margin: 0.35rem 0 0.5rem; padding-left: 1.2rem; }
.pr-cap-confirm-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Part 1 Comment column + history (Capital Meeting) */
.pr-cap-comment { min-width: 11rem; }
.pr-cap-comment-input { width: 100%; font: inherit; font-size: 0.8rem; padding: 0.3rem 0.4rem; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; resize: vertical; background: #fff; color: var(--text, #1a2332); }
.pr-cap-history { margin-top: 0.25rem; font-size: 0.74rem; }
.pr-cap-history summary { cursor: pointer; color: var(--accent, #1e4d6b); font-weight: 600; }
.pr-cap-history ol { list-style: none; margin: 0.25rem 0 0; padding: 0 0 0 0.4rem; border-left: 2px solid var(--border, #e2e8f0); display: flex; flex-direction: column; gap: 0.25rem; }
.pr-cap-history-meta { display: block; color: var(--text-2, #5c6b7e); font-size: 0.7rem; }
.pr-cap-history-text { display: block; color: var(--text, #1a2332); }

/* Business Specifics → Available Plan */
.ap-form { margin: 0.75rem 0; }
.ap-years { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.ap-year { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; min-width: 8.5rem; font: inherit; text-align: left; cursor: pointer; background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 0.45rem 0.7rem; color: var(--text, #1a2332); }
.ap-year.is-selected { border-color: var(--accent, #1e4d6b); box-shadow: 0 0 0 2px var(--accent-light, #e8f2f7); }
.ap-year-tag { font-size: 0.68rem; font-weight: 600; color: var(--accent, #1e4d6b); text-transform: uppercase; letter-spacing: 0.03em; }
.ap-year-src { font-size: 0.72rem; color: var(--text-2, #5c6b7e); }
.ap-year-src.is-cost_centers { color: var(--success, #15803d); }
.ap-year-src.is-legacy { color: #b45309; }
.ap-year-sum { font-size: 0.74rem; font-weight: 600; }
.ap-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: 1rem; align-items: start; }
.ap-main, .ap-checklist { background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: var(--radius, 12px); padding: 0.9rem 1.1rem; }
.ap-main h3, .ap-checklist h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.ap-table { width: 100%; }
.ap-table .num { text-align: right; }
.ap-amount { width: 9rem; text-align: right; font: inherit; font-size: 0.88rem; padding: 0.3rem 0.45rem; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; }
.ap-checklist ul { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; max-height: 26rem; overflow: auto; }
.ap-checklist label { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.85rem; cursor: pointer; }
.ap-legacy { font-size: 0.82rem; color: var(--text-2, #5c6b7e); margin: 0 0 0.6rem; }
.ap-legacy.is-active { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 0.4rem 0.6rem; }
.ap-actions { margin-top: 0.8rem; display: flex; align-items: center; gap: 0.8rem; }
.ap-saved { color: var(--success, #15803d); font-size: 0.85rem; font-weight: 600; }
@media (max-width: 900px) { .ap-body { grid-template-columns: 1fr; } }
