/* Scoped department selector: anchored dialog on desktop, bottom sheet on mobile. */
select.cpd-native { display: none !important; }
.cpd-trigger { display:inline-flex; align-items:center; justify-content:space-between; gap:18px; min-height:44px; max-width:100%; padding:10px 14px; border:1px solid #dce4ee; border-radius:12px; background:#fff; color:#24364c; font:inherit; font-weight:650; cursor:pointer; }
.cpd-trigger.is-selected { border-color:#2563eb; background:#eff5ff; color:#1d4ed8; }
.cpd-trigger:disabled { cursor:wait; opacity:.6; }
.cpd-trigger-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cpd-chevron { font-size:17px; font-weight:500; }
dialog.cpd-dialog { position:fixed; top:var(--cpd-top,80px); left:var(--cpd-left,16px); right:auto; bottom:auto; width:min(576px,calc(100vw - 32px)); max-width:calc(100vw - 32px); max-height:min(648px,calc(100dvh - 32px)); box-sizing:border-box; margin:0; padding:0; border:1px solid #dce4ee; border-radius:20px; background:#fff; color:#24364c; box-shadow:0 20px 70px #19355b29; overflow:hidden; font-family:inherit; }
dialog.cpd-dialog[open] { display:flex; flex-direction:column; }
.cpd-dialog::backdrop { background:#1930473d; }
.cpd-dialog *, .cpd-dialog *::before, .cpd-dialog *::after { box-sizing:border-box; }
.cpd-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:22px 22px 16px; flex-shrink:0; }
.cpd-heading { min-width:0; }
.cpd-heading h2 { margin:0; font-size:20px; font-weight:750; line-height:1.4; letter-spacing:-.5px; }
.cpd-heading p { margin:7px 0 0; font-size:13px; line-height:1.5; color:#6a7a8d; }
.cpd-close { display:grid; place-items:center; width:34px; height:34px; flex-shrink:0; padding:0; border:0; border-radius:50%; background:#f2f5f9; color:#52657e; font:inherit; font-size:24px; line-height:1; cursor:pointer; }
.cpd-search { display:flex; align-items:center; gap:9px; margin:0 22px 8px; min-height:46px; flex-shrink:0; padding:0 13px; background:#f6f8fc; border:1px solid #dfe6f1; border-radius:12px; }
.cpd-search:focus-within { border-color:#2563eb; outline:2px solid #deebff; }
.cpd-search-icon { color:#66809e; font-size:24px; line-height:1; }
.cpd-search input { min-width:0; width:100%; height:44px; padding:0; border:0; background:transparent; outline:0; color:#24364c; font:inherit; font-size:14px; }
.cpd-search input::placeholder { color:#8190a5; }
.cpd-scroll { min-height:0; overflow:auto; overscroll-behavior:contain; padding:8px 22px 22px; }
.cpd-status { margin:4px 0 14px; color:#60748f; font-size:13px; line-height:1.6; }
.cpd-status[hidden] { display:none; }
.cpd-all { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:46px; width:100%; margin:0 0 22px; padding:10px 13px; border:1px solid #dce5ef; border-radius:11px; background:#f8faff; color:#38506d; font:inherit; font-size:14px; font-weight:650; cursor:pointer; }
.cpd-all span { font-size:12px; font-weight:400; color:#7c8ca3; }
.cpd-all[aria-pressed="true"] { border-color:#2563eb; color:#1d4ed8; background:#eff5ff; }
.cpd-all[aria-pressed="true"] span { color:#2563eb; }
.cpd-group + .cpd-group { margin-top:24px; }
.cpd-group h3 { margin:0 0 10px; font-size:13px; font-weight:700; color:#72839b; line-height:1.5; }
.cpd-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.cpd-option { position:relative; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; min-width:0; min-height:46px; padding:11px 12px; border:1px solid #e3e9f2; border-radius:11px; background:#fff; color:#34506f; text-align:left; font:inherit; font-size:13px; line-height:1.4; cursor:pointer; overflow-wrap:anywhere; }
.cpd-option:hover { border-color:#94b5ed; background:#f5f8ff; }
.cpd-option[aria-pressed="true"] { border-color:#2563eb; background:#eff5ff; color:#1d4ed8; padding-right:24px; }
.cpd-grid-quick .cpd-option { background:#f3f7fe; border-color:transparent; }
.cpd-grid-quick .cpd-option[aria-pressed="true"] { border-color:#2563eb; background:#eff5ff; }
.cpd-option-name { font-weight:600; }
.cpd-option-alias { font-size:11px; font-weight:400; color:#8191a8; }
.cpd-check { position:absolute; right:9px; top:12px; color:#2563eb; font-size:13px; }
.cpd-empty { margin:0; color:#6a7a8d; font-size:14px; line-height:1.6; }
.cpd-foot { flex-shrink:0; margin:0; padding:14px 22px; border-top:1px solid #eaf0f7; background:#fbfcff; color:#7b8aa0; font-size:11px; line-height:1.7; }
.cpd-dialog button:focus-visible, .cpd-trigger:focus-visible { outline:3px solid #93b8f2; outline-offset:2px; }
@media(max-width:640px) {
  dialog.cpd-dialog { top:auto !important; bottom:0; left:0 !important; right:0; width:100%; max-width:100%; max-height:calc(100dvh - 36px); border-radius:22px 22px 0 0; border-bottom:0; padding-bottom:env(safe-area-inset-bottom,0px); }
  .cpd-head { padding:23px 20px 16px; }
  .cpd-heading h2 { font-size:19px; }
  .cpd-search { margin-inline:20px; }
  .cpd-scroll { padding:8px 20px 22px; }
  .cpd-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  .cpd-option { padding:10px 9px; font-size:12px; min-height:46px; }
  .cpd-option[aria-pressed="true"] { padding-right:20px; }
  .cpd-check { right:6px; }
  .cpd-foot { padding:12px 20px; }
}
@media(prefers-reduced-motion:reduce) { .cpd-scroll { scroll-behavior:auto; } }
