/* Approved 8766 dialog reference, transferred mechanically for Issue #331.
   Source: .agentic/ui-design-preview/wwwroot/personnel-dialogs.css.
   Reference declarations below are unchanged: only .ep-pilot scope is replaced
   with the reversible light personnel gate and screen-media containment.
   Requires explicit ep-personnel-dialog / ep-dialog-title/body/footer opt-in;
   this is not a global Mud dialog theme or a specialist-dialog override. */
/* BEGIN MECHANICAL REFERENCE */
@media screen {
    /* Local-only visual pilot: Mud owns dialog placement, focus and Escape handling. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog {
        --p-ink: #17233d;
        --p-muted: #66748d;
        --p-line: #e5eaf1;
        --p-brand: #3152cd;
        width: min(48.75rem, calc(100% - 3rem));
        max-width: calc(100% - 3rem);
        height: min(48rem, calc(100dvh - 3rem));
        max-height: calc(100dvh - 3rem);
        margin: 0;
        padding: 0;
        overflow: hidden;
        border: 1px solid var(--p-line);
        border-radius: 1rem !important;
        color: var(--p-ink);
        background: #fff;
        box-shadow: 0 30px 100px #162c5f40 !important;
        font-family: inherit;
        direction: rtl;
    }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog.ep-personnel-dialog-wide { width: min(62.5rem, calc(100% - 3rem)); }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog.ep-personnel-dialog-compact { height: auto; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-backdrop { background-color: transparent; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-backdrop .mud-overlay-scrim { background-color: rgba(15, 23, 42, .58); }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-backdrop,
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-backdrop .mud-overlay-scrim,
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .mud-dialog-container:has(> .ep-personnel-dialog) { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .mud-dialog-container:has(> .ep-personnel-dialog) { padding: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog > .mud-focus-trap { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow: hidden; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-title {
        position: relative;
        flex: 0 0 auto;
        margin: 0;
        padding: 1.35rem 1.5rem !important;
        padding-inline-end: 4.5rem !important;
        border-bottom: 1px solid var(--p-line);
        background: #fff;
    }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-title .mud-typography { color: var(--p-ink); font: inherit; font-size: 1.2rem; font-weight: 800; line-height: 1.65; overflow-wrap: anywhere; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-title .mud-button-close { position: absolute !important; width: 44px; height: 44px; top: 14px !important; left: 16px !important; right: auto !important; margin: 0 !important; transform: none !important; border: 1px solid var(--p-line); border-radius: 10px; color: #526079; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; margin: 0; padding: 1.25rem 1.5rem !important; scrollbar-gutter: stable; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: .75rem; margin: 0; padding: 1rem 1.5rem !important; border-top: 1px solid var(--p-line); background: #fff; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-footer > :not(:first-child) { margin: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-body > :first-child { margin-top: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-body > :last-child { margin-bottom: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog form { margin: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog p { font-size: .8rem; line-height: 1.9; color: var(--p-muted); }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog label { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: .78rem; font-weight: 600; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog input:not([type="checkbox"]),
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #dce3ee; border-radius: 10px; outline: none; background: #fff; color: var(--p-ink); font: inherit; font-size: 14px; font-weight: 400; line-height: 1.5; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog input:focus,
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog select:focus { border-color: #5475e5; box-shadow: 0 0 0 3px #5475e519; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog input:disabled,
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog select:disabled { background: #f5f7fb; color: #64748b; cursor: not-allowed; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog input::placeholder { color: #66748d; opacity: 1; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--p-brand); }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog input[dir="ltr"] { font-variant-numeric: tabular-nums; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin: 20px 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-body form > .ep-form-grid:first-child { margin-top: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog details { padding: 14px 0; border-top: 1px solid var(--p-line); font-size: .8rem; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog summary { cursor: pointer; font-weight: 650; min-height: 32px; align-content: center; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: 10px 16px; border: 1px solid #dce3ee; border-radius: 10px; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 650; line-height: 1.5; white-space: nowrap; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-button.is-primary { color: #fff; border-color: var(--p-brand); background: var(--p-brand); }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-button.is-primary:hover:not(:disabled) { background: #2645b5; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-button.is-secondary { color: #40506b; background: #fff; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-button.is-secondary:hover:not(:disabled) { background: #f5f7fc; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-button:disabled { opacity: .5; cursor: not-allowed; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog button:focus-visible,
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog summary:focus-visible { outline: 3px solid #94acf5; outline-offset: 3px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-membership-fields { grid-column: 1 / -1; margin: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-supervisor-controls { grid-column: 1 / -1; display: flex; gap: 10px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-supervisor-controls input { flex: 1; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-supervisor-controls select { max-width: 220px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-supervisor-result { grid-column: 1 / -1; margin: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-file { padding: 24px; border: 1px dashed #a9badf; background: #f7f9ff; border-radius: 12px; margin: 18px 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-file-title { display: block; margin-bottom: .3rem; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-file-control { position: relative; display: flex; min-height: 46px; align-items: center; gap: .75rem; padding: .4rem; border: 1px solid var(--p-line); border-radius: .7rem; background: #fff; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-file-control:focus-within { border-color: #6366f1; outline: 3px solid rgba(99, 102, 241, .16); }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-file-input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; opacity: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-file-trigger { display: inline-flex; min-height: 36px; flex: 0 0 auto; align-items: center; justify-content: center; padding: .45rem .8rem; border: 1px solid var(--p-line); border-radius: .55rem; background: #f8fafc; color: #334155; font-weight: 700; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-file-name { min-width: 0; overflow: hidden; color: #526079; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog label.ep-dialog-checkbox { flex-direction: row; align-items: center; min-height: 32px; margin: 10px 0; font-weight: 400; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-map-group { border: 1px solid var(--p-line); border-radius: 10px; padding: 14px; margin-block: 12px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-map-group h3 { font-size: .86rem; font-weight: 700; margin: 0 0 12px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-map-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(140px, 2fr) auto; gap: 8px; align-items: center; margin-block: 10px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-map-group .ep-dialog-button { font-size: .75rem; padding: 8px; background: #f5f7fc; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-empty { margin-top: 1rem; padding: 1rem; border: 1px solid #e3e8f2; border-radius: .8rem; background: #fafbfe; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-empty > strong { display: block; margin-bottom: .8rem; color: #27324a; font-size: .82rem; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-steps > span { display: flex; min-width: 0; align-items: flex-start; gap: .6rem; padding: .75rem; border: 1px solid #e8ecf4; border-radius: .65rem; background: #fff; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-steps b { display: inline-flex; width: 1.65rem; height: 1.65rem; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: .5rem; background: #eef2ff; color: #4f46e5; font-size: .72rem; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-steps strong,
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-steps small { display: block; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-steps strong { color: #334155; font-size: .76rem; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-steps small { margin-top: .2rem; color: #64748b; font-size: .7rem; line-height: 1.7; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-message { padding: 13px 16px; border: 1px solid #d6e1fa; border-radius: 10px; background: #f1f5ff; color: #3e5684; font-size: .8rem; line-height: 1.9; margin: 15px 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-family-list { display: flex; flex-wrap: wrap; gap: 12px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-family-card { display: flex; min-width: 150px; flex-direction: column; gap: 5px; padding: 10px 14px; border: 1px solid var(--p-line); border-radius: 9px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-family-card small { color: var(--p-muted); }
    @media (max-width: 40rem) {
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog,
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog.ep-personnel-dialog-wide { width: calc(100% - 1rem); max-width: calc(100% - 1rem); height: calc(100dvh - 1rem); max-height: calc(100dvh - 1rem); border-radius: .9rem !important; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog.ep-personnel-dialog-compact { height: auto; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-title { padding: 1.05rem 1rem !important; padding-inline-end: 4.25rem !important; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-title .mud-typography { font-size: 1.05rem; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-title .mud-button-close { top: 10px !important; left: 10px !important; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body { padding: 1rem !important; scrollbar-gutter: auto; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer { padding: .8rem 1rem max(.8rem, env(safe-area-inset-bottom)) !important; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-footer .ep-dialog-button { flex: 1 1 0; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-form-grid,
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-import-steps,
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-map-row { grid-template-columns: 1fr; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-supervisor-controls { flex-direction: column; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-supervisor-controls select { max-width: none; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-dialog-file { padding: 1rem; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog summary,
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog label.ep-dialog-checkbox { min-height: 44px; }
    }
    @media (max-height: 32rem) and (min-width: 40.01rem) {
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog { height: calc(100dvh - 1rem); max-height: calc(100dvh - 1rem); }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-title,
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer { padding-block: .65rem !important; }
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-title .mud-button-close { top: 5px !important; }
    }
    @media (prefers-reduced-motion: reduce) {
        html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog { animation: none; }
    }
}
/* END MECHANICAL REFERENCE */
/* Integration bridge only: the approved page supplied this typography/reset.
   JafamPersonnel names the same licensed Vazirmatn bytes without font collision. */
@media screen {
    /* Portals are outside the adopted page wrapper. Keep the same local font
       fence here without replacing global, classic, dark or icon fonts. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog {
        --jf-font-fa: "JafamPersonnel", sans-serif;
        --jf-font-fa-display: "JafamPersonnel", sans-serif;
    }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog { font-family: "JafamPersonnel", sans-serif !important; font-size: 16px; font-weight: 400; line-height: 1.5; }
    /* Same direct font targets as the approved pilot: inherited root typography
       cannot beat baseline .mud-dialog descendant font-family !important.
       Labels/helper text use the local token fence above; icon fonts stay owned
       by their components. No universal descendant font override is added. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog :is(button, input, select, textarea, .mud-typography) { font-family: "JafamPersonnel", sans-serif !important; }
    /* Mud adds non-native slots and button-label spans around the same content. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body :is(.mud-input, .mud-input-control, .mud-input-slot),
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer :is(.mud-button-root, .mud-button-label) { font-family: "JafamPersonnel", sans-serif !important; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog,
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog * { box-sizing: border-box; }

    /* Mud 7.15 inserts this child container between its focus trap and content.
       Sentinels, focus, Escape, DOM order and event handlers remain Mud-owned. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog > .mud-focus-trap > .mud-focus-trap-child-container {
        display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow: hidden;
    }
    /* TitleContent can be plain text rather than a MudTypography element. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-title { font-size: 1.2rem; font-weight: 800; line-height: 1.65; }

    /* Actual outlined components keep their real label, required marker,
       helper/error messages, adornments, popup and binding. No fake inputs. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input-control.mud-input-outlined-with-label { margin-block: 0 !important; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input-control-input-container > .mud-input-label-outlined {
        position: static !important; inset: auto !important; order: -1;
        display: block; width: auto; max-width: 100%; padding: 0 !important;
        margin: 0 0 7px !important; transform: none !important;
        background: transparent; font-family: inherit;
        font-size: .78rem !important; font-weight: 600; line-height: 1.5 !important;
        letter-spacing: normal; white-space: normal; pointer-events: auto;
    }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input-control-input-container > .mud-input-label-outlined:not(.mud-input-error):not(.mud-disabled) { color: var(--p-ink) !important; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input-control-input-container > .mud-input-label-outlined.mud-disabled { color: #64748b !important; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined {
        min-height: 44px; border-radius: 10px !important; background: #fff;
        box-shadow: none; font-family: inherit;
    }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined > .mud-input-slot {
        box-sizing: border-box; padding: 10px 12px; border: 0;
        border-radius: 10px !important; outline: none; background: transparent;
        box-shadow: none; font-family: inherit; font-size: 14px;
        font-weight: 400; line-height: 1.5;
    }
    /* Override the site's 38px content-box minimum (which otherwise adds to
       padding). Select/div slots may grow; only single-line inputs have height. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined:not(.mud-input-multiline) > .mud-input-slot { min-height: 44px !important; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined:not(.mud-input-multiline) > input.mud-input-slot:not([type="hidden"]) { height: 44px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined.mud-input-multiline { padding: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined.mud-input-adorned-start > .mud-input-slot { padding-inline-start: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined.mud-input-adorned-end > .mud-input-slot { padding-inline-end: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input-control.mud-input-number-control.mud-input-showspin .mud-input.mud-input-outlined:not(.mud-input-adorned-end) > input.mud-input-slot { padding-inline-end: 24px; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined .mud-input-outlined-border { border: 1px solid #dce3ee !important; border-radius: 10px !important; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined:not(.mud-disabled):not(.mud-input-error):focus-within { box-shadow: 0 0 0 3px #5475e519; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined:not(.mud-disabled):not(.mud-input-error):focus-within .mud-input-outlined-border { border-color: #5475e5 !important; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined.mud-disabled { background: #f5f7fb; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined.mud-disabled > .mud-input-slot { color: #64748b !important; cursor: not-allowed; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input-control.mud-input-error .mud-input-outlined-border,
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input.mud-input-outlined.mud-input-error .mud-input-outlined-border { border-color: var(--mud-palette-error) !important; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input-label.mud-input-error,
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body .mud-input-helper-text.mud-input-error { color: var(--mud-palette-error) !important; }

    /* Native reference label/input rules must not change Mud boolean hit areas
       or place the switch/checkbox/radio below its own label. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body label:is(.mud-switch, .mud-checkbox, .mud-radio) { display: inline-flex; flex-direction: row; align-items: center; gap: 0; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-body input:is(.mud-switch-input, .mud-checkbox-input, .mud-radio-input) {
        width: 100%; height: 100%; min-height: 0; padding: 0; border: 0;
        background: transparent; box-shadow: none;
    }

    /* Only actual footer MudButtons; icons/spinners/close controls are untouched.
       Primary matches the reference primary even when the component is outlined.
       Semantic error/success/warning variants and disabled colors stay Mud-owned. */
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer .mud-button {
        display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
        min-height: 44px; padding: 10px 16px; border-radius: 10px !important;
        box-shadow: none !important; font-family: inherit; font-size: .8rem;
        font-weight: 650; line-height: 1.5; white-space: nowrap; text-transform: none;
    }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer :is(.mud-button-filled-primary, .mud-button-outlined-primary, .mud-button-text-primary):not(.mud-disabled) { color: #fff; border: 1px solid var(--p-brand); background: var(--p-brand); }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer :is(.mud-button-filled-primary, .mud-button-outlined-primary, .mud-button-text-primary):not(.mud-disabled):hover { background: #2645b5; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer :is(.mud-button-filled-default, .mud-button-outlined-default, .mud-button-text-default):not(.mud-disabled) { color: #40506b; border: 1px solid #dce3ee; background: #fff; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer :is(.mud-button-filled-default, .mud-button-outlined-default, .mud-button-text-default):not(.mud-disabled):hover { background: #f5f7fc; }
}
@media screen and (max-width: 40rem) {
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-title { font-size: 1.05rem; }
    html[data-ui-design="personnel"]:not([data-theme="dark"]) .ep-personnel-dialog .ep-dialog-footer .mud-button { flex: 1 1 0; }
}
