/* Personnel task dialog: compact layout only; authorization rules stay in the module. */
.wa-drawer-layer.wa-person-layer { inset: 0; z-index: 90; }
.wa-drawer.wa-person-modal {
  width: min(960px, calc(100vw - 48px));
  height: min(800px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  /* The shell must never scroll when a descendant receives focus. */
  overflow: clip;
  border-radius: 14px;
}
.wa-person-modal .wa-drawer-head { flex: 0 0 auto; padding: 20px 28px 16px; align-items: center; }
.wa-person-modal .wa-overline { font-size: 11px; letter-spacing: .04em; }
.wa-person-modal .wa-drawer-head h2 { margin: 4px 0 6px; font-size: 21px; line-height: 1.35; }
.wa-person-modal .wa-drawer-head p { font-size: 12px; line-height: 1.5; }
.wa-person-modal .wa-drawer-head .icon-button { flex: 0 0 auto; }
.wa-person-modal .wa-person-progress { flex: 0 0 auto; gap: 12px; padding: 0 28px; background: #fff; }
.wa-person-modal .wa-person-progress::before { display: none; }
.wa-person-modal .wa-person-progress button { min-height: 48px; gap: 8px; padding: 8px 4px; border-radius: 0; border-bottom: 2px solid transparent; }
.wa-person-modal .wa-person-progress button span { width: 22px; height: 22px; flex: 0 0 auto; font-size: 11px; }
.wa-person-modal .wa-person-progress button strong { font-size: 12px; line-height: 1.4; }
.wa-person-modal .wa-person-progress button.active { background: transparent; border-bottom-color: var(--bo-teal-700); }
.wa-person-modal .wa-person-progress button.error { border-bottom-color: var(--bo-red-600); }
.wa-person-modal .wa-drawer-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  gap: 20px;
  padding: 20px 28px 28px;
  background: #fff;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-padding-block: 16px;
}
.wa-person-modal .wa-form-section { flex: 0 0 auto; width: 100%; padding: 0 0 22px; border: 0; border-bottom: 1px solid var(--bo-border); border-radius: 0; scroll-margin-top: 0; }
.wa-person-modal .wa-form-section:last-child { padding-bottom: 0; border-bottom: 0; }
.wa-person-modal .wa-form-section.wa-account-readonly { padding: 14px 16px; background: #f5f8fa; border: 1px solid var(--bo-border); border-radius: 10px; }
.wa-account-summary { display: flex; align-items: center; gap: 24px; min-width: 0; }
.wa-account-person { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 32%; }
.wa-account-person > div, .wa-account-email { display: grid; gap: 3px; min-width: 0; }
.wa-account-person strong { font-size: 14px; line-height: 1.5; }
.wa-account-person > div > span, .wa-account-email > span { color: var(--bo-muted); font-size: 12px; }
.wa-account-email { flex: 1 1 auto; }
.wa-account-email strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.wa-account-person > div > span { overflow-wrap: anywhere; }
.wa-account-summary > .wa-tag { margin-left: auto; flex-shrink: 0; font-size: 11px; }
.wa-person-modal .wa-section-head { margin-bottom: 14px; }
.wa-person-modal .wa-section-head h3 { margin-bottom: 5px; font-size: 15px; line-height: 1.4; }
.wa-person-modal .wa-section-head p { font-size: 12px; line-height: 1.5; }
.wa-person-modal .wa-lookup-result { display: block; padding: 0; overflow: hidden; }
.wa-person-modal .wa-lookup-person { display: flex; align-items: center; gap: 12px; padding: 14px; }
.wa-person-modal .wa-lookup-person .wa-stack { min-width: 0; }
.wa-person-modal .wa-lookup-person .wa-stack strong { font-size: 13px; }
.wa-person-modal .wa-lookup-person .wa-stack > span { display: flex; align-items: center; flex-wrap: wrap; color: var(--bo-muted); font-size: 11px; white-space: normal; }
.wa-person-modal .wa-lookup-person > .wa-tag { margin-left: auto; flex: 0 0 auto; }
.wa-duplicate-guidance { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; border-top: 1px solid #edd8a7; background: #fffdf7; }
.wa-duplicate-guidance > div:first-child { min-width: 0; }
.wa-duplicate-guidance strong { display: block; color: var(--bo-navy-900); font-size: 13px; line-height: 1.5; }
.wa-duplicate-guidance p { margin: 4px 0 0; color: var(--bo-muted); font-size: 12px; line-height: 1.55; }
.wa-duplicate-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.wa-duplicate-actions .btn { min-height: 40px; }
.wa-drawer.wa-person-modal.is-duplicate-account { height: min(560px, calc(100dvh - 48px)); }
.wa-person-modal.is-duplicate-account .wa-drawer-body { justify-content: flex-start; }
.wa-person-modal.is-duplicate-account #wa-person-account { padding-bottom: 0; border-bottom: 0; }
.wa-person-modal .wa-position-picker legend { margin-bottom: 12px; font-size: 12px; }
.wa-person-modal .wa-position-picker legend small { font-size: 12px; }
.wa-person-modal .wa-position-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wa-person-modal .wa-position-options .wa-check-card { padding: 12px; min-height: 78px; align-items: flex-start; gap: 10px; border-radius: 9px; }
.wa-person-modal .wa-position-options .wa-check-card input { margin-top: 3px; width: 16px; height: 16px; }
.wa-person-modal .wa-position-options .wa-check-card strong { font-size: 13px; }
.wa-person-modal .wa-position-options .wa-check-card small { font-size: 12px; line-height: 1.45; margin-top: 4px; }
.wa-person-modal .wa-binding-modes { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 10px 0 0; }
.wa-person-modal .wa-binding-modes button { min-height: 34px; padding: 0 8px; color: var(--bo-teal-700); border-color: transparent; background: transparent; font-size: 12px; box-shadow: none; }
.wa-person-modal .wa-binding-modes button:hover { background: #edf9fa; }
.wa-person-modal .wa-binding-modes > span { color: var(--bo-muted); font-size: 12px; }
.wa-person-modal .wa-inline-position { margin-top: 12px; }
.wa-person-modal .wa-binding-preview { justify-content: space-between; flex-wrap: nowrap; gap: 16px; margin-top: 12px; padding: 12px 14px; border: 0; border-radius: 8px; background: #f3f8f9; }
.wa-selection-summary { display: flex; gap: 10px; align-items: center; min-width: 0; }
.wa-selection-summary > svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--bo-teal-700); }
.wa-selection-summary > span { display: grid; gap: 3px; min-width: 0; }
.wa-selection-summary small { color: var(--bo-muted); font-size: 11px; }
.wa-selection-summary strong { color: var(--bo-ink); font-size: 12px; line-height: 1.5; font-weight: 500; overflow-wrap: anywhere; }
.wa-preview-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; min-height: 34px; padding: 4px; border: 0; background: transparent; color: var(--bo-teal-700); font: inherit; font-size: 12px; cursor: pointer; }
.wa-preview-link svg { width: 15px; height: 15px; }
.wa-preview-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.wa-preview-link:focus-visible { outline: 2px solid var(--bo-teal-700); outline-offset: 3px; border-radius: 4px; }
.wa-person-modal .wa-drawer-foot { position: static; flex: 0 0 auto; min-height: 72px; gap: 16px; padding: 12px 28px; background: #fff; }
.wa-person-modal .wa-drawer-foot small { font-size: 11px; line-height: 1.5; }
.wa-person-modal .wa-drawer-foot .btn { min-height: 40px; padding-inline: 18px; font-size: 13px; }
.wa-person-modal .wa-error-summary { flex: 0 0 auto; font-size: 12px; }
.wa-person-modal .wa-decision-card, .wa-person-modal .wa-review-card { max-height: 100%; overflow: auto; }
@media (max-width: 760px) {
  .wa-drawer.wa-person-modal { width: calc(100vw - 24px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
  .wa-person-modal .wa-drawer-head, .wa-person-modal .wa-drawer-body { padding-inline: 18px; }
  .wa-person-modal .wa-person-progress { padding-inline: 18px; gap: 6px; }
  .wa-person-modal .wa-person-progress button { gap: 5px; }
  .wa-person-modal .wa-position-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-person-modal .wa-drawer-foot { padding-inline: 18px; }
  .wa-account-summary { flex-wrap: wrap; gap: 12px; }
  .wa-account-person { flex: 1 1 auto; }
  .wa-account-email { order: 3; flex-basis: 100%; }
  .wa-duplicate-guidance { align-items: stretch; flex-direction: column; gap: 12px; }
  .wa-duplicate-actions { justify-content: flex-end; }
}
@media (max-width: 480px) {
  .wa-person-modal .wa-position-options { grid-template-columns: 1fr; }
  .wa-person-modal .wa-person-progress button { flex-direction: column; gap: 4px; }
  .wa-person-modal .wa-person-progress button strong { font-size: 11px; }
  .wa-person-modal .wa-binding-preview { align-items: flex-start; flex-direction: column; gap: 6px; }
  .wa-person-modal .wa-binding-modes > span { flex-basis: 100%; }
  .wa-person-modal .wa-drawer-foot { flex-wrap: wrap; gap: 8px; }
  .wa-person-modal .wa-drawer-actions { margin-left: auto; }
}
