@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

body {
  margin: 0;
}
#pvt-print-container, #pvt-print-container * {
  font-family: 'Poppins', Arial, sans-serif;
  box-sizing: border-box;
}
#pvt-print-container {
  width: 100%;
  margin: 0;
  padding: 0 0 40px 0;
  background: #fff;
  color: #333;
  font-size: 11px;
}

/* Document Header */
.pvt-header {
  background: #fff;
  margin: 0 0 14px;
  color: #333;
  padding: 0;
}
.pvt-header-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #eef0f4;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.pvt-header-title {
  font-size: 17px;
  font-weight: 700;
  color: #062172;
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0.1px;
  flex: 1;
}


.pvt-header-status {
  display: inline-block;
  background: #062172;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pvt-header-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 24px;
  padding: 0 20px 18px;
}
.pvt-meta-item {
  padding: 0;
}
.pvt-meta-item-wide {
  grid-column: auto;
}
.pvt-meta-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #062172;
  margin-bottom: 3px;
}
.pvt-meta-value {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #333;
  line-height: 1.4;
}

/* Color strip */
.pvt-color-strip {
  height: 5px;
  background: #062172;
}

/* Tab title (major section) — level 1 */
.pvt-tab-title {
  background: #43d596;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 11px 14px;
  margin: 28px 0 10px 0;
  page-break-before: always;
}
.pvt-tab-title-first {
  page-break-before: avoid;
  /* margin-top: 0; */
}

/* Section title — level 2 */
.pvt-section {
  margin: 0;
}
.pvt-section-title {
  background: #062172;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  margin: 0 0 8px 0;
}

/* Subsection — level 3 */
.pvt-subsection {
  padding: 10px 0 6px;
  border-bottom: 1px solid #e8eef4;
}
.pvt-subsection:last-child {
  border-bottom: none;
}
.pvt-subsection-title {
  background: #ddeaf8;
  color: #062172;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 10px 6px 12px;
  margin: 0 0 8px 0;
  border-left: 3px solid #062172;
  border-radius: 0;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Field groups */
.pvt-field {
  margin: 4px 0 8px 0;
  padding: 0 20px;
}
.pvt-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #062172;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  margin-bottom: 3px;
}
.pvt-value {
  display: block;
  font-size: 11px;
  color: #333;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}
.pvt-value-empty {
  color: #aaa;
  font-style: italic;
}

/* Rating — plain status text, not a button */
.pvt-rating {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #333;
  line-height: 1.55;
}

/* Tables */
.pvt-table-wrap {
  overflow-x: auto;
  margin-bottom: 10px;
  border: 1px solid #c3d1e3;
  border-radius: 2px;
}
.pvt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.pvt-table th {
  background: #ddeaf8;
  color: #062172;
  padding: 7px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: bottom;
  border-bottom: 2px solid #062172;
}
.pvt-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #dce6f0;
  vertical-align: top;
  line-height: 1.45;
}
.pvt-table tr:last-child td {
  border-bottom: none;
}
.pvt-table tr:nth-child(even) td {
  background: #f0f4ff;
}
.pvt-table-sep td {
  height: 6px;
  background: #e4ecf5 !important;
  border-top: 2px solid #062172;
  padding: 0;
}
.pvt-subtable-label {
  font-size: 10px;
  font-weight: 700;
  color: #062172;
  padding: 6px 10px 6px 12px;
  margin: 0 0 8px 0;
  background: #ddeaf8;
  border-left: 3px solid #062172;
  border-radius: 0;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pvt-doc-link {
  color: #062172;
  text-decoration: underline;
}

/* SCG Window card */
.pvt-scg-card {
  border: 1px solid #c3d1e3;
  border-radius: 3px;
  padding: 12px 16px;
  margin: 8px 0;
}
/* Generic light-bordered card, used to group a rating + previous rating + description
   as one visual unit (Overall Progress, Components, Management Performance) */
.pvt-card {
  border: 1px solid #c3d1e3;
  border-radius: 3px;
  padding: 12px 16px;
  margin: 8px 0;
}
.pvt-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.pvt-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

/* VP Dimension */
.pvt-vp-dim {
  background: #f3f6fc;
  border-left: 4px solid #43d596;
  padding: 10px 14px;
  margin: 12px 0 4px;
}
.pvt-vp-dim-title {
  font-size: 11px;
  font-weight: 700;
  color: #062172;
  margin-bottom: 4px;
}
.pvt-vp-indicators {
  margin-left: 12px;
}
.pvt-vp-ind-card {
  border: 1px solid #c3d1e3;
  border-left: 3px solid #062172;
  border-radius: 2px;
  padding: 8px 12px;
  margin: 6px 0;
}
/* .pvt-field's own 20px left/right padding is meant for fields sitting
   directly under a section/subsection. Inside this card it stacks on top
   of the card's own padding, indenting Indicator/Revised Achievements/
   Evidence 20px further right than the unpadded grid rows below them. */
.pvt-vp-ind-card > .pvt-field {
  padding-left: 0;
  padding-right: 0;
}
.pvt-ind-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
/* Indicator's own value can run long (free text); keep it out of the grid row
   with the short Baseline/Target/Achievement fields so it doesn't stretch
   their row to match its wrapped height. */
.pvt-ind-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
/* Grid rows stretch cells to equal height by default, but a short label leaves
   its value sitting near the top while a long-wrapping neighbor's value sits
   lower. Anchor every value to the bottom of its cell so all values in a row
   land on the same baseline regardless of how many lines each label wraps to. */
.pvt-form-row > div,
.pvt-form-row-3 > div,
.pvt-ind-row > div,
.pvt-ind-row-3 > div {
  display: flex;
  flex-direction: column;
}
.pvt-form-row > div .pvt-value,
.pvt-form-row > div .pvt-rating,
.pvt-form-row-3 > div .pvt-value,
.pvt-form-row-3 > div .pvt-rating,
.pvt-ind-row > div .pvt-value,
.pvt-ind-row > div .pvt-rating,
.pvt-ind-row-3 > div .pvt-value,
.pvt-ind-row-3 > div .pvt-rating {
  margin-top: auto;
}
.pvt-ind-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
}

/* Beneficiary table first col */
.pvt-table.pvt-ben-table td:first-child {
  font-weight: 600;
  color: #062172;
}

/* Section padding */
.pvt-section-body {
  padding: 8px 20px 4px;
}

/* Divider */
.pvt-hr {
  border: none;
  border-top: 1px solid #dce6f0;
  margin: 8px 20px;
  display:none;
}

/* Rich text content */
.pr-rich-content p { margin: 0 0 6px; }
.pr-rich-content ul, .pr-rich-content ol { margin: 0 0 6px; padding-left: 20px; }
.pr-rich-content li { margin-bottom: 3px; }

/* Text field border — boxes long free-text values (descriptions, explanations)
   so they read as written content, not a data point; short fields stay plain. */
.pvt-value.pr-rich-content {
  border: 1px solid #c3d1e3;
  padding: 8px 10px;
  background: #fafbfd;
  border-radius: 2px;
  min-height: 20px;
  white-space: pre-wrap;
}

/* Print media */
/* Keep in sync with PDF_PAGE_MARGIN_MM in pr-print-draft.js — that constant
   drives the html2canvas/html2pdf capture path; this rule is what applies
   when /pr-print or /cr-print is printed directly from the browser instead. */
@page {
  margin: 10mm 0;
}
@media print {
  body { margin: 0; }
  #pvt-print-container { padding: 0; }
  .pvt-tab-title { page-break-before: always; }
  .pvt-tab-title-first { page-break-before: avoid; }
  .pvt-section-title { page-break-after: avoid; }
  .pvt-subsection-title { page-break-after: avoid; }
  .pvt-table th, .pvt-table td { font-size: 9px; }
  a { color: #062172 !important; text-decoration: none !important; }
}
