/* Employment controls are isolated so radio sizing never affects text inputs. */
.page .radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-weight: 400;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  flex: 0 0 20px;
  margin: 0;
  padding: 0;
  accent-color: #151515;
}

.radio-option .radio-text {
  display: inline;
  line-height: 1.35;
}

.gross-field input:not([type="radio"]) {
  width: 100%;
  min-height: 48px;
  height: 48px;
}

.gross-field {
  display: grid !important;
  align-items: stretch !important;
  gap: 7px !important;
  margin-top: 4px;
  font-weight: 600 !important;
}

.document-group {
  display: grid;
  gap: 9px;
  padding: 2px 0 12px;
}

.document-group + .document-group {
  border-top: 1px solid #ecece8;
  padding-top: 14px;
}

.document-help {
  margin: 0;
  color: #666;
  font-size: 12px;
}

.identity-slots {
  display: grid;
  gap: 6px;
}

.identity-slots > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.identity-slots span {
  display: block;
  min-width: 0;
  padding: 9px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px dashed #d2d2cd;
  border-radius: 8px;
  color: #555;
  font-size: 12px;
}

.document-files {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 24px;
}

.document-files li {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.document-files span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-delete {
  min-height: 36px;
  border: 1px solid #d3d0ca;
  border-radius: 8px;
  background: #fff;
  color: #8a1f17;
  padding: 0 10px;
  flex: 0 0 auto;
}

.quality-gate {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}

.quality-pass { background: #e9f6ec; color: #245b31; }
.quality-review { background: #fff4dd; color: #805000; }

.archive-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0 6px;
}

@media (max-width: 480px) {
  .archive-actions { grid-template-columns: 1fr; }
}

.archive-actions button {
  min-height: 48px;
  width: 100%;
  border-radius: 10px;
  padding: 0 10px;
}

.batch-summary {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #efefec;
  color: #4d4d49;
  font-size: 13px;
  font-weight: 650;
}

.batch-relation h2 {
  margin-top: 14px;
}

.related-employees,
.archive-documents {
  display: grid;
  gap: 8px;
}

.related-employee {
  min-height: 48px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e2de;
  border-radius: 9px;
  background: #fff;
  color: #151515;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.related-employee b {
  font-size: 22px;
  font-weight: 400;
}

.shared-document {
  display: grid;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid #e5e5e1;
}

.shared-document small {
  color: #666;
  font-size: 12px;
  font-weight: 650;
}

.document-link {
  display: block;
  width: 100%;
  min-height: 44px;
  overflow: hidden;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e5e1;
  background: transparent;
  color: #151515;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.document-viewer {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f7f7f5;
}

.document-viewer-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding-left: max(10px, env(safe-area-inset-left));
  padding-right: max(10px, env(safe-area-inset-right));
}

.document-viewer-header > strong {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-viewer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.document-viewer-action {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  background: transparent;
  color: #151515;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.document-viewer-action:disabled {
  color: #8a8a84;
}

.document-viewer-status {
  margin: 0;
  padding: 8px 14px;
  background: #fff7e5;
  color: #6d4b00;
  font-size: 13px;
  text-align: center;
}

.pdf-preview-fallback {
  display: grid;
  gap: 9px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #d9d9d5;
  text-align: center;
}

.pdf-preview-fallback div {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pdf-preview-fallback .document-viewer-action {
  border: 1px solid #151515;
  padding: 0 14px;
}

.pdf-preview-fallback .document-viewer-action.primary {
  background: #151515;
  color: #fff;
}

.acceptance-recipient-lock {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #d8b469;
  border-radius: 9px;
  background: #fff9eb;
}

.acceptance-recipient-lock p {
  margin: 5px 0 0;
  color: #5e4a22;
  font-size: 13px;
}

.document-preview {
  flex: 1;
  min-height: calc(100dvh - 58px);
  display: grid;
  place-items: center;
  overflow: auto;
  background: #e9e9e6;
}

.document-preview iframe {
  width: 100%;
  height: 100%;
  min-height: calc(100dvh - 58px);
  border: 0;
  background: #fff;
}

.document-preview img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 58px);
  object-fit: contain;
}

@media (max-width: 430px) {
  .document-viewer-header { gap: 3px; }
  .document-viewer-action { padding: 0 5px; font-size: 13px; }
}
