/* Viewport-bound organization editors, including short laptop screens. */
.modal-card.org-modal-wide {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-card.org-modal-wide:not(.assignment-modal-wide) #modalBody {
  max-height: none;
  overflow: visible;
}
.modal-card.assignment-modal-wide #modalBody {
  max-height: calc(100dvh - 64px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.assignment-modal-wide .assignment-editor-layout {
  flex: 1;
  min-height: 0;
}
.assignment-modal-wide .assignment-manual {
  min-height: 0;
}
.assignment-modal-wide .assignment-modal-actions {
  flex-shrink: 0;
}
.extra-duty-row,
.goal-sub-row,
.legal-route-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.extra-duty-row textarea,
.goal-sub-row input,
.legal-route-row select {
  flex: 1;
  min-width: 0;
}
.assignment-custom-duty[hidden] {
  display: none !important;
}
.goal-sub-section {
  padding: 16px;
  border-top: 1px solid #dbe3ef;
}
.goal-sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
}
.goal-sub-summary {
  display: block;
  font-weight: normal;
  white-space: normal;
  font-size: 13px;
  margin-top: 8px;
}
.legal-workflow {
  padding: 20px;
  margin: 16px 0;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
}
.legal-workflow textarea {
  width: 100%;
  min-height: 80px;
}
.legal-approval-history {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.legal-action-fields {
  border-top: 1px solid #dbe3ef;
  margin-top: 12px;
  padding-top: 8px;
  display: grid;
  gap: 8px;
}
.legal-action-fields input[type='checkbox'] {
  width: auto;
}
.legal-action-fields img {
  max-width: 120px;
  max-height: 90px;
  object-fit: contain;
}
.legal-action-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #526579;
  font-size: 12px;
}
.legal-group-modal-table th:first-child {
  width: 50px;
}
.legal-group-modal-table th:nth-child(2) {
  width: 190px;
}
.legal-group-modal-table th:nth-child(3) {
  width: 250px;
}
.legal-group-modal-table th:nth-child(4) {
  width: 170px;
}
.legal-group-modal-table th:nth-child(6) {
  width: 150px;
}
.legal-group-modal-table td {
  overflow-wrap: anywhere;
}
.legal-group-modal-table input,
.legal-group-modal-table select,
.legal-group-modal-table textarea {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.legal-action-fields select,
.legal-action-fields textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccd7e4;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}
.legal-action-fields .legal-inspected-check {
  display: flex;
  align-items: center;
  gap: 7px;
}
.legal-action-fields .legal-inspected-check input {
  flex: none;
  margin: 0;
}
.legal-photo-caption {
  display: block;
  font-size: 12px;
  color: #526579;
  margin-bottom: 7px;
}
.legal-action-photo {
  border-top: 1px solid #dbe3ef;
  padding-top: 12px;
  margin-top: 14px;
  min-width: 0;
}
.legal-group-modal-table .legal-photo-pick {
  display: block;
  position: relative;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
}
.legal-group-modal-table .legal-photo-pick input[type='file'],
.tbm-signature-picker input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.legal-photo-pick:focus-within,
.tbm-signature-picker:focus-within {
  outline: 2px solid #1769e0;
  outline-offset: 3px;
}
.legal-group-modal-table [data-action-photo-name],
.legal-group-modal-table [data-legal-photo-name] {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 11px;
  color: #7b8999;
  margin-top: 5px;
}
.legal-group-modal-table [data-action-photo-preview] img {
  max-width: 100%;
  max-height: 86px;
  object-fit: contain;
}
.tbm-signature-field {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  min-width: 0;
}
.tbm-signature-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tbm-signature-heading b {
  color: #294762;
  font-size: 14px;
}
.tbm-signature-heading p {
  margin: 5px 0 0;
  font-size: 12px;
  color: #758396;
}
.tbm-signature-picker {
  position: relative;
  flex: none;
  cursor: pointer;
  white-space: nowrap;
}
.tbm-signature-files {
  margin: 14px 0;
  border-top: 1px solid #e5eaf1;
  border-bottom: 1px solid #e5eaf1;
}
.tbm-signature-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
}
.tbm-signature-file + .tbm-signature-file {
  border-top: 1px solid #edf0f5;
}
.tbm-signature-file span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.tbm-signature-file b {
  font-size: 13px;
  font-weight: 500;
}
.tbm-signature-file small {
  display: block;
  color: #8590a0;
  font-size: 11px;
  margin-top: 4px;
}
.tbm-signature-empty {
  color: #8b96a5;
  font-size: 13px;
  margin: 14px 0;
}
.tbm-signature-help {
  color: #7b8999;
  font-size: 11px;
  line-height: 1.6;
}
.tbm-legacy-attendance {
  margin: 12px 0;
  color: #687b90;
}
.tbm-legacy-attendance[hidden],
[data-ca-person-add][hidden] {
  display: none !important;
}
.tbm-legacy-attendance summary {
  cursor: pointer;
  padding: 8px 0;
  font-size: 12px;
}
@media (max-width: 700px) {
  .tbm-signature-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
.roster-import-tools {
  margin: 12px 0;
  padding: 14px;
  background: #f3f7fc;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
}
.roster-import-tools small {
  display: block;
  margin: 8px 0;
}
[data-tbm-original-files] img {
  display: block;
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  margin: 12px 0;
}
@media (max-width: 700px) {
  .goal-sub-row {
    grid-template-columns: 1fr;
  }
  .legal-route-row {
    flex-wrap: wrap;
  }
}
/* Policy and organization readability, 2026-10-01. */
.app-logo-row[role='button'] {
  cursor: pointer;
}
.app-logo-row:focus-visible {
  outline: 3px solid #3183c8;
}
.org-edit-guide {
  padding: 16px;
  background: #eaf4ff;
  border: 1px solid #b7d2ed;
  border-radius: 12px;
  margin-bottom: 16px;
}
.org-direct-edit .org-person {
  cursor: pointer;
  outline: 2px dashed #5794c2;
}
.modal-card.assignment-modal-wide {
  width: min(1240px, 96vw);
  max-width: 96vw;
}
.assignment-modal-wide .assignment-editor-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow-y: auto;
}
.assignment-modal-wide .assignment-edit-form {
  min-width: 0;
  overflow: visible;
  max-height: none;
}
.assignment-modal-wide input:disabled,
.assignment-modal-wide textarea:disabled,
.assignment-modal-wide select:disabled {
  opacity: 1;
  color: #24384d;
  background: #f5f8fb;
}
.spw-plan-grid {
  grid-template-columns: minmax(0, 1fr);
}
.spw-policy-block,
.spw-target-block {
  min-height: 0;
}
.spw-target-items > article {
  grid-template-columns: minmax(0, 1fr);
}
.spw-target-items > article > b {
  justify-self: start;
}
.goal-detail-below {
  grid-column: 1/-1;
  border-top: 1px solid #d9e3ed;
  padding-top: 12px;
}
.goal-detail-below h4 {
  margin: 0 0 8px;
}
.goal-detail-below p {
  padding: 10px;
  background: #f1f6fb;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.goal-detail-below span {
  display: block;
  margin-top: 6px;
}
.spw-editor-layout {
  grid-template-columns: minmax(0, 1fr);
}
.spw-guide {
  position: static;
}
.spw-guide ol,
.spw-template-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.spw-form-grid > .wide {
  grid-column: 1/-1;
}
.goal-sub-row {
  grid-template-columns: minmax(0, 1fr);
  padding: 12px;
  border: 1px solid #dae4ed;
  border-radius: 8px;
}
.goal-sub-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #c9d6e3;
  border-radius: 8px;
}
.goal-sub-row button {
  justify-self: end;
}
.spw-target-items strong,
.spw-target-items p,
.spw-bar-label b {
  white-space: normal;
  overflow-wrap: anywhere;
}
.spw-bars article {
  grid-template-columns: minmax(0, 1fr);
}
.goal-performance-scroll {
  overflow: auto;
  max-height: 65vh;
  margin-top: 18px;
}
.goal-performance-table {
  width: 100%;
  min-width: 1600px;
  table-layout: fixed;
  border-collapse: collapse;
}
.goal-performance-table th,
.goal-performance-table td {
  padding: 14px;
  border: 1px solid #d9e2ed;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}
.goal-performance-table th {
  position: sticky;
  top: 0;
  background: #eaf1f8;
  z-index: 1;
}
.goal-performance-table th:nth-child(3),
.goal-performance-table th:last-child {
  width: 210px;
}
.goal-performance-table td button {
  display: block;
  margin-top: 12px;
}
#spwQuickForm > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
#spwQuickForm > label input {
  padding: 10px;
  border: 1px solid #c9d6e3;
  border-radius: 8px;
}
@media (max-width: 800px) {
  .assignment-modal-wide .assignment-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .assignment-modal-wide .assignment-manual {
    display: none;
  }
  .spw-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.modal-card.org-modal-wide {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-card.assignment-modal-wide #modalBody {
  max-height: calc(100dvh - 64px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.assignment-modal-wide .assignment-editor-layout {
  flex: 1;
  min-height: 0;
}
.assignment-modal-wide .assignment-manual {
  min-height: 0;
}
.assignment-modal-wide .assignment-modal-actions {
  flex-shrink: 0;
}
.extra-duty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.extra-duty-row textarea {
  flex: 1;
  min-width: 0;
}
.assignment-custom-duty[hidden] {
  display: none !important;
}
.goal-sub-section {
  padding: 16px;
  border-top: 1px solid #dbe3ef;
}
