/* Project workspace type scale and document library. */
.project-page-hero {
  align-items: center;
  gap: 18px;
  padding: 17px 20px;
  border-radius: 17px;
}

.project-page-hero h1 {
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.project-page-hero .status { margin-bottom: 7px; }
.project-page-hero .eyebrow { margin-block: 6px 4px; }
.project-page-hero #projectPageCode { font-size: 11px; }
.project-page-hero #projectPageDescription { max-width: 760px; font-size: 13px; line-height: 1.5; }
.project-page-hero .project-page-start-date { width:max-content; margin:10px 0 0; padding:6px 9px; border:1px solid rgba(255,255,255,.2); border-radius:9px; background:rgba(255,255,255,.08); color:#d9eff6; font-size:11px; font-weight:750; }
.project-page-hero-actions button { min-height: 40px; padding-inline: 14px; font-size: 12px; }
.project-health { padding: 8px 11px; font-size: 11px; }

.project-page-metrics article { min-height: 76px; justify-content: center; padding: 14px 16px; }
.project-page-metrics small { font-size: 12px; line-height: 1.4; }
.project-page-metrics b { font-size: 18px; line-height: 1.25; font-variant-numeric: tabular-nums; }

.project-detail-tabs { gap: 4px; padding: 5px; }
.project-detail-tabs button { min-height: 38px; padding-inline: 14px; font-size: 12px; }
.project-page-section { padding: 20px; }
.project-page-section .card-head h3 { font-size: 20px; }
.project-page-section .card-head h4 { margin: 0; font-size: 17px; line-height: 1.3; }
.project-page-section .eyebrow { font-size: 11px; }
.project-page-section .empty-state { font-size: 13px; line-height: 1.55; }
.section-support-copy { max-width: 720px; margin: 6px 0 0; color: #718792; font-size: 13px; line-height: 1.55; }

.detail-progress b,
.detail-progress strong { font-size: 13px; }
.detail-summary p { min-height: 48px; padding: 13px 15px; }
.detail-summary b { font-size: 13px; }
.detail-summary span { font-size: 13px; line-height: 1.45; }
.project-inline-item { min-height: 62px; gap: 13px; padding-block: 14px; }
.project-inline-item > span { width: 38px; height: 38px; }
.project-inline-item b { font-size: 13px; }
.project-inline-item small,
.project-inline-item time { font-size: 12px; line-height: 1.5; }
.report-attachment-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.report-attachment-links a { padding: 6px 9px; border-radius: 8px; background: #e9f5fb; color: #156a94; font-size: 12px; font-style: normal; font-weight: 800; text-decoration: none; }

/* Financial comparison remains readable on wide project screens. */
.project-finance-table-head,
.project-finance-row { padding: 13px 16px; }
.project-finance-table-head { font-size: 11px; letter-spacing: .075em; }
.project-finance-row > span { gap: 4px; }
.project-finance-row > span b { font-size: 13px; line-height: 1.35; }
.project-finance-row > span small { font-size: 11px; line-height: 1.4; }
.project-finance-row > strong { font-size: 13px; }
.project-finance-row > em { padding: 6px 9px; font-size: 11px; }
.project-finance-formula { padding: 12px 14px; font-size: 12px; }

.document-head-actions { display: flex; align-items: center; gap: 8px; }
.document-head-actions .primary-button { min-height: 38px; padding-inline: 13px; }
.document-limit-badge { padding: 7px 10px; border-radius: 999px; background: #eaf6fb; color: #176c95; font-size: 12px; font-weight: 850; white-space: nowrap; }
.project-document-workspace { margin-top: 16px; }
.project-document-form { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 14px; padding: 22px; border: 0; background: #fff; }
.project-document-modal { width: min(680px,calc(100vw - 24px)); }
.project-document-modal .modal-head { grid-column: 1/-1; margin-bottom: 2px; }
.project-document-modal .modal-head h2 { margin-bottom: 5px; }
.project-document-modal .modal-head p:last-child { margin: 0; color: #718792; font-size: 12px; line-height: 1.5; }
.project-document-form .full { grid-column: 1/-1; }
.document-form-heading { grid-column: 1/-1; display: flex; align-items: center; gap: 11px; margin-bottom: 2px; }
.document-form-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 12px; background: #dff1fa; color: #1674a2; }
.document-form-icon svg { width: 19px; }
.document-form-heading h4 { margin: 0 0 4px; color: #173a4b; font-size: 18px; }
.document-form-heading p { margin: 0; color: #718792; font-size: 13px; line-height: 1.5; }
.project-document-form label { display: grid; gap: 7px; color: #55717e; font-size: 13px; font-weight: 800; }
.project-document-form input,
.project-document-form select,
.project-document-form textarea { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #cfdfe6; border-radius: 11px; background: #fff; color: #193a49; font: inherit; font-size: 14px; outline: 0; }
.project-document-form textarea { min-height: 86px; line-height: 1.5; resize: vertical; }
.project-document-form input:focus,
.project-document-form select:focus,
.project-document-form textarea:focus { border-color: #4598c4; box-shadow: 0 0 0 3px rgba(45,145,196,.1); }
.project-document-drop { min-height: 104px; place-items: center; padding: 16px; border: 1px dashed #9fc8dc; border-radius: 13px; background: #f8fcfe; text-align: center; cursor: pointer; transition: .18s ease; }
.project-document-drop:hover { border-color: #2283b2; background: #f3faff; }
.project-document-drop svg { width: 23px; color: #247da8; }
.project-document-drop b { color: #244b5e; font-size: 14px; }
.project-document-drop small { color: #7f939c; font-size: 12px; font-weight: 600; }
.document-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.document-form-actions > small { max-width: 260px; color: #6f8792; font-size: 12px; line-height: 1.45; }
.document-form-actions button { min-height: 43px; }

.project-document-library { overflow: hidden; border: 1px solid #d9e6eb; border-radius: 16px; background: #fff; }
.document-library-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid #e4ecef; background: #f8fbfc; }
.document-library-head h4 { margin: 3px 0 0; color: #173a4b; font-size: 18px; }
.document-library-head > span { padding: 6px 9px; border-radius: 999px; background: #eaf1f4; color: #647e8a; font-size: 12px; font-weight: 850; }
.project-document-list { display: grid; }
.project-document-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto 32px; align-items: center; gap: 12px; min-height: 82px; padding: 14px 16px; border-bottom: 1px solid #edf2f4; color: inherit; text-decoration: none; transition: .18s ease; }
.project-document-row:last-child { border-bottom: 0; }
.project-document-row:hover { background: #f5fafc; box-shadow: inset 3px 0 #3b9dca; }
.project-document-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: #e5f3f9; color: #176f9a; }
.project-document-icon svg { width: 18px; }
.project-document-copy { display: grid; gap: 4px; min-width: 0; }
.project-document-copy b { overflow: hidden; color: #173847; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.project-document-copy small { overflow: hidden; color: #718792; font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.project-document-copy em { color: #36738f; font-size: 11px; font-style: normal; font-weight: 800; }
.project-document-meta { display: grid; justify-items: end; gap: 4px; }
.project-document-meta strong { color: #315568; font-size: 12px; }
.project-document-meta small { color: #8899a1; font-size: 11px; white-space: nowrap; }
.project-document-open { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #d1e0e6; border-radius: 9px; color: #1474a2; font-size: 14px; font-weight: 900; }
.document-empty { display: grid; min-height: 190px; place-items: center; align-content: center; gap: 7px; padding: 24px; color: #78909a; text-align: center; }
.document-empty > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #edf5f8; color: #4c89a5; }
.document-empty svg { width: 21px; }
.document-empty b { color: #3f6272; font-size: 14px; }
.document-empty p { max-width: 360px; margin: 0; font-size: 12px; line-height: 1.55; }
.project-contract-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: #69818c; font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.project-contract-divider::before,
.project-contract-divider::after { height: 1px; flex: 1; background: #dce7eb; content: ""; }
.card-head.compact { margin-bottom: 7px; }
.project-contract-row { min-height: 64px; color: inherit; text-decoration: none; }
.project-contract-row b { font-size: 14px; }
.project-contract-row small { font-size: 12px; }
.contract-project-context { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid #dbe7ec; background: linear-gradient(135deg,#f1f9fc,#f8fcfd); }
.contract-project-context > span { display: grid; gap: 3px; min-width: 0; }
.contract-project-context small { color: #718994; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contract-project-context b { overflow: hidden; color: #173d50; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.file-optimization-note { display: flex; align-items: flex-start; gap: 7px; margin: -2px 0 0; padding: 10px 12px; border-radius: 10px; background: #edf7fb; color: #587684; font-size: 12px; line-height: 1.5; }
.file-optimization-note svg { width: 15px; flex: 0 0 15px; margin-top: 1px; color: #217aa5; }

@media (max-width: 980px) {
  .project-document-workspace { grid-template-columns: 1fr; }
  .document-empty { min-height: 180px; }
}

@media (max-width: 700px) {
  .project-page-hero { gap: 14px; padding: 16px; }
  .project-page-hero h1 { font-size: 24px; }
  .project-page-hero #projectPageDescription { font-size: 12px; }
  .project-page-hero .project-page-start-date { font-size:10px; }
  .project-page-metrics { grid-template-columns: 1fr 1fr; }
  .project-page-metrics article { min-height: 76px; padding: 14px; }
  .project-page-section { padding: 16px; }
  .project-detail-tabs button { min-height: 38px; padding-inline: 12px; font-size: 11px; }
  .project-document-form { grid-template-columns: 1fr; padding: 18px; }
  .project-document-form .full,
  .document-form-heading { grid-column: auto; }
  .document-form-actions { align-items: stretch; flex-direction: column; }
  .document-form-actions > small { max-width: none; }
  .document-form-actions button { width: 100%; }
  .document-head-actions { align-items: flex-end; flex-direction: column; }
  .document-head-actions .document-limit-badge { display: none; }
  .document-head-actions .primary-button { min-height: 38px; }
  .project-document-row { grid-template-columns: 40px minmax(0,1fr) 28px; padding: 13px; }
  .project-document-meta { display: none; }
  .project-document-copy small { white-space: normal; }
  .project-finance-row > span b,
  .project-finance-row > strong { font-size: 12px; }
  .project-finance-row > span small { font-size: 10px; }
  .project-finance-row > em { font-size: 10px; }
  .project-finance-formula { font-size: 11px; }
  .contract-project-context { align-items: stretch; flex-direction: column; }
  .contract-project-context .secondary-button { justify-content: center; width: 100%; }
}

@media (max-width: 420px) {
  .project-page-metrics { grid-template-columns: 1fr; }
  .project-page-hero-actions { width: 100%; }
  .project-page-hero-actions button { flex: 1; }
}
