dialog.pm-window{box-sizing:border-box;width:calc(100vw - 48px);max-width:1440px;height:calc(100vh - 72px);max-height:900px;margin:auto;padding:22px 26px;border:1px solid var(--border,#dbe1ea);border-radius:18px;color:var(--ink,#172033);background:var(--surface,#fff);font:14px 'DM Sans',Arial,sans-serif;overflow:hidden}
dialog.pm-window[open]{display:flex;flex-direction:column;gap:10px}
.pm-window::backdrop{background:#10203988;backdrop-filter:blur(3px)}
dialog.pm-window header,dialog.pm-window footer{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;height:auto;min-height:0;padding:0 0 12px;margin:0;background:transparent;border:0;border-bottom:1px solid var(--border,#dbe1ea)}
.pm-window h2{margin:5px 0 0;font-size:24px;line-height:1.3}.pm-window header small{color:var(--accent-text,#137e78);letter-spacing:1px}.pm-window>p{margin:0;line-height:1.45;flex:none}.pm-window>p.pm-note{font-size:11px;color:var(--muted,#526176)}
.pm-window .pm-toolbar{display:flex;gap:14px;align-items:end;flex-wrap:wrap;padding:8px 0;flex:none}.pm-toolbar label{display:grid;gap:6px;font-weight:600;min-width:150px}.pm-toolbar label:nth-child(2){min-width:220px}.pm-toolbar label:nth-child(3){flex:1;min-width:200px}
.pm-window input,.pm-window select,.pm-window button{box-sizing:border-box;font:inherit;padding:9px 11px;min-height:38px;border:1px solid var(--border,#cbd5e1);border-radius:8px;background:var(--surface,#fff);color:var(--ink,#172033);width:auto}.pm-toolbar input,.pm-toolbar select{width:100%}.pm-window button{cursor:pointer}.pm-window button:disabled{opacity:.5;cursor:default}.pm-window [data-save]{background:var(--accent,#137e78);color:var(--on-accent,#fff);border-color:transparent;font-weight:600}.pm-window [data-status]{font-size:12px;font-weight:600;color:var(--accent-text,#137e78)}
.pm-window .pm-scroll{flex:1;min-height:100px;max-height:none;overflow:auto;border:1px solid var(--border,#dde3eb);border-radius:10px;overscroll-behavior:contain}.pm-scroll table{border-collapse:separate;border-spacing:0;min-width:1820px;width:100%;font-size:13px}.pm-scroll td,.pm-scroll th{padding:10px;border-bottom:1px solid var(--border,#e4e9ef);text-align:left;vertical-align:middle}.pm-scroll thead th{position:sticky;top:0;background:var(--surface-soft,#edf4f3);z-index:2;font-size:12px;height:52px;min-width:105px}.pm-scroll tr>th:first-child{position:sticky;left:0;background:var(--surface-soft,#f7fafc);min-width:190px;max-width:220px;z-index:1;border-right:1px solid var(--border,#dde3eb)}.pm-scroll thead th:first-child{z-index:3}.pm-scroll td select{font-size:12px;min-width:88px;padding:6px;min-height:32px}.pm-scroll td small{display:block;font-size:11px;margin-top:4px}.pm-yes{color:#08765b}.pm-no{color:#aa2431}.pm-na{color:#98a1ae}.pm-scroll tbody tr:hover td{background:var(--surface-soft,#f7fafc)}
dialog.pm-window footer{justify-content:flex-end;border-bottom:0;border-top:1px solid var(--border,#dbe1ea);padding:12px 0 0}.pm-window :focus-visible{outline:2px solid var(--accent,#137e78);outline-offset:2px}
@media(max-width:700px){dialog.pm-window{width:calc(100vw - 16px);height:calc(100dvh - 42px);max-height:none;padding:14px;gap:8px}.pm-window h2{font-size:20px}.pm-window .pm-toolbar{gap:8px}.pm-toolbar label,.pm-toolbar label:nth-child(2){min-width:0;flex:1}.pm-toolbar label:nth-child(3){min-width:70%}.pm-window>p.pm-note{display:none}.pm-scroll tr>th:first-child{min-width:150px;max-width:150px}.pm-window header small{font-size:10px}}
[data-access-blocked]{display:none!important}

/* Readable permission labels, including protected Admin controls. */
dialog.pm-window{color:#111827;background:#fff}
.pm-window>p,.pm-window>p.pm-note,.pm-window label,.pm-window h2{color:#111827}
.pm-window>p.pm-note{font-size:12px;line-height:1.5}
.pm-window input,.pm-window select,.pm-window button{color:#111827;background:#fff}
.pm-window input::placeholder{color:#374151;opacity:1}
.pm-scroll thead th,.pm-scroll tbody th{color:#111827;font-weight:700;background:#eef2f7}
.pm-scroll td small{font-size:12px;font-weight:600}
.pm-window .pm-yes{color:#075b35}.pm-window .pm-no{color:#991b1b}.pm-window .pm-na{color:#374151}
.pm-window select:disabled{opacity:1;color:#374151;-webkit-text-fill-color:#374151;background:#f1f5f9}
.pm-window button:disabled{opacity:1;color:#374151;background:#e5e7eb;border-color:#cbd5e1;cursor:not-allowed}
.pm-window [data-save]:not(:disabled){color:#fff;background:var(--accent,#2348e5)}
