/* UX-P10 — consistent document form geometry and clear weekly navigation.
   Scoped to the document editor: other form designs and server payloads are untouched. */
.document-workspace-dialog .document-editor #documentForm{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:0;
  align-content:start;
  width:100%;
}
.document-workspace-dialog .document-top{
  margin:0 0 22px;
  padding:0 0 18px;
  border-bottom:1px solid #343d36;
  min-height:46px;
}
.document-workspace-dialog .document-form-field{min-width:0;margin:0 0 23px}
.document-workspace-dialog .document-form-field>label{
  display:block;
  margin:0 0 9px;
  font-size:13px;
  font-weight:600;
  line-height:1.45;
  color:#c2d2c5;
}
.document-workspace-dialog .document-form-field>input,
.document-workspace-dialog .document-form-field>select,
.document-workspace-dialog .document-form-field>textarea{display:block;width:100%;min-width:0;margin:0}
.document-workspace-dialog .document-form-field>input,
.document-workspace-dialog .document-form-field>select{height:44px;min-height:44px}
.document-workspace-dialog .document-form-field>textarea{min-height:104px;resize:vertical;line-height:1.65;padding:13px}
.document-workspace-dialog .document-form-link-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:start;
  column-gap:22px;
  row-gap:14px;
  margin:0;
}
.document-workspace-dialog .document-form-link-row>.document-form-field{margin-bottom:23px}
.document-workspace-dialog .document-form-link-row .project-lookup-field{min-width:0}
.document-workspace-dialog .document-form-link-row .project-lookup-field select{min-width:0;width:100%;max-width:100%}
.document-workspace-dialog .document-form-link-row .project-lookup-field .project-lookup-launch{flex:0 0 auto}
.document-workspace-dialog .document-form-link-row .project-lookup-field .project-lookup-launch{min-width:62px}
.document-workspace-dialog .document-proposal-field:nth-last-child(1){margin-bottom:8px}
.document-workspace-dialog .reference-manager{margin:0 0 23px}
.document-workspace-dialog .document-output-options{margin:0 0 24px;padding:14px 0}
.document-workspace-dialog .document-summary-field{margin-bottom:18px}
.document-workspace-dialog .document-table-heading{margin:2px 0 14px}
.document-workspace-dialog .document-table-hint{margin:0 0 12px;line-height:1.6}
.document-workspace-dialog .document-table-wrap{
  overflow-x:auto;
  scrollbar-gutter:stable;
  -webkit-overflow-scrolling:touch;
  border-color:#4a594d;
}
.document-workspace-dialog .document-table{min-width:1250px}
.document-workspace-dialog .document-table th{padding:12px 10px;white-space:normal;line-height:1.5}
.document-workspace-dialog .document-table td{padding:7px;vertical-align:top}
.document-workspace-dialog .document-table td textarea{
  min-height:104px;
  padding:10px;
  border:1px solid #39483e;
  border-radius:5px;
  line-height:1.5;
  resize:vertical;
}
.document-workspace-dialog .document-row-references{width:174px;min-width:174px}
.document-workspace-dialog .document-row-references select{max-width:100%;width:100%;margin:8px 0}
.document-workspace-dialog .document-row-references>.quiet{width:100%;min-height:34px;border:1px solid #415546;background:#28332b}
.document-workspace-dialog .document-row-actions{width:104px;white-space:normal}
.document-workspace-dialog .document-row-actions .quiet{display:inline-block;min-width:35px;min-height:34px;padding:6px;margin:2px}
.document-workspace-dialog .document-footer{margin-top:25px;gap:16px;padding-top:23px}
/* The week selector is one balanced group, not three cramped independent buttons. */
.production-week-controls{display:grid;grid-template-columns:minmax(115px,1fr) minmax(188px,1.5fr) minmax(115px,1fr);gap:10px;align-items:stretch;width:min(100%,535px)}
.production-week-controls>button{height:48px;min-height:48px;width:100%;padding:10px 15px;font-size:13px;text-align:center;border-radius:7px}
.production-week-controls #productionWeekPick{min-width:0;font-size:14px;font-weight:700;letter-spacing:.1px}
.production-week-controls #productionWeekPrev,.production-week-controls #productionWeekNext{background:#212825;border:1px solid #45554a;color:#cbd8ce}
.production-week-controls #productionWeekPrev:hover,.production-week-controls #productionWeekNext:hover{border-color:#89b196;background:#29392e}
@media(max-width:800px){
 .production-week-controls{width:100%;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr);gap:7px}
 .production-week-controls>button{min-width:0;padding:8px 6px;font-size:12px}
 .production-week-controls #productionWeekPick{font-size:12px}
 .document-workspace-dialog .document-form-link-row{grid-template-columns:1fr;row-gap:0}
 .document-workspace-dialog .document-form-field{margin-bottom:19px}
}
.document-workspace-dialog .document-form-link-row .project-lookup-field{margin-top:0}
