/* Administration 004 rights slice only; shell and unrelated modules are unchanged. */
.admin-rights { min-width:0; font-size:14px; overflow-wrap:anywhere; }
.admin-rights [hidden],.admin-rights-dialog [hidden] { display:none!important; }
.admin-rights h2 { font-size:23px; margin:0 0 5px; }
.admin-rights h3 { font-size:17px; margin:0 0 5px; }
.admin-rights h4 { font-size:15px; margin:0 0 6px; }
.admin-rights p { margin:6px 0; }
.rights-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; }
.rights-heading>div,.rights-row>div { min-width:0; }
.rights-heading>button,.rights-row>button { flex-shrink:0; }
.admin-rights .rights-heading>div>p,.rights-meta { color:#aeb7c2; line-height:1.5; font-size:13px; }
.rights-notice { padding:12px; border:1px solid #3b4858; border-radius:6px; background:#19242f; color:#c3d3e5; line-height:1.6; }
.admin-rights .rights-notice { margin:0 0 16px; }
.rights-panel { min-width:0; margin-bottom:18px; background:#191b1e; border:1px solid #35383d; border-radius:8px; }
.rights-panel-heading { min-width:0; padding:14px; border-bottom:1px solid #30343a; }
.rights-panel-heading>p { color:#aeb7c2; }
.rights-profile-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:14px; }
.rights-profile { min-width:0; padding:12px; border:1px solid #35383d; border-radius:6px; background:#17191c; }
.rights-profile button { margin-top:8px; }
.admin-rights .rights-panel>.rights-notice { margin:0 14px 14px; }
.rights-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; padding:14px; border-bottom:1px solid #30343a; }
.rights-row:last-child { border-bottom:0; }
.admin-rights :is(button,input,select),.admin-rights-dialog :is(button,input,select) { min-height:44px; min-width:44px; max-width:100%; font:inherit; }
.admin-rights button,.admin-rights-dialog button { padding:8px 12px; font-size:13px; white-space:normal; border-radius:7px; box-shadow:none; }
.admin-rights button.primary,.admin-rights-dialog button.primary { background:#1568d4; border-color:#4b9cff; color:#fff; }
.admin-rights :is(button,input,select,summary):focus-visible,.admin-rights-dialog :is(button,input,select,summary):focus-visible { outline:3px solid #6bb7ff; outline-offset:2px; }
.admin-rights .field,.admin-rights-dialog .field { display:grid; min-width:0; gap:6px; color:#b9c3ce; font-size:13px; margin:10px 0; }
.admin-rights .field input,.admin-rights-dialog .field :is(input,select) { width:100%; min-width:0; margin:0; }
.admin-rights-account { margin:0; border-bottom:1px solid #35383d; }
.admin-rights-account:last-child { border-bottom:0; }
.admin-rights summary,.admin-rights-dialog summary { min-height:44px; padding:12px 14px; line-height:1.5; cursor:pointer; font-weight:600; overflow-wrap:anywhere; }
.admin-rights-account[open]>summary { border-bottom:1px solid #35383d; background:#20252b; }
.rights-account-body { padding:14px; min-width:0; }
.rights-account-body>h4 { margin-top:18px; }
.rights-buckets { display:grid; gap:8px; margin-block:10px; }
.admin-rights .rights-bucket { background:#17191c; border:1px solid #35383d; border-radius:6px; margin:0; }
.rights-line { display:grid; gap:4px; padding:10px 14px; border-top:1px solid #30343a; line-height:1.5; }
.rights-line small { color:#aeb7c2; overflow-wrap:anywhere; }
.rights-state { padding:14px; }
/* One bounded dialog; heading and actions remain outside the scrollable content. */
#dialog.admin-rights-dialog { inset:0; margin:auto; padding:0; width:min(850px,calc(100vw - 28px)); max-width:calc(100vw - 28px); max-height:calc(100dvh - 28px); background:#191b1e; border:1px solid #414952; border-radius:10px; overflow:hidden; }
.admin-rights-dialog #dialog-form { display:flex; flex-direction:column; max-height:calc(100dvh - 30px); min-width:0; min-height:0; margin:0; }
.admin-rights-dialog .dialog-heading,.admin-rights-dialog .dialog-actions { position:static; flex:0 0 auto; display:flex; gap:10px; margin:0; padding:12px 14px; border-bottom:1px solid #35383d; }
.admin-rights-dialog .dialog-heading { align-items:flex-start; }
.admin-rights-dialog #dialog-title { min-width:0; margin:0; font-size:20px; overflow-wrap:anywhere; }
.admin-rights-dialog #dialog-close { flex:0 0 44px; width:44px; height:44px; padding:0; }
.admin-rights-dialog #dialog-body { flex:1 1 auto; min-height:0; min-width:0; padding:14px; overflow:auto; overflow-wrap:anywhere; }
.admin-rights-dialog #dialog-body>p { line-height:1.6; }
.admin-rights-dialog #dialog-error { flex:0 0 auto; max-height:18dvh; overflow:auto; overflow-wrap:anywhere; padding:0 14px; margin:0; }
.admin-rights-dialog #dialog-error:not(:empty) { padding-block:10px; }
.admin-rights-dialog .dialog-actions { flex-wrap:wrap; border-bottom:0; border-top:1px solid #35383d; }
.admin-rights-dialog #dialog-cancel { background:#222529; border-color:#414952; color:#f4f5f6; box-shadow:none; }
.rights-filters { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,220px); align-items:end; gap:12px; }
.rights-editor,.rights-members { display:grid; gap:0; border:1px solid #35383d; border-radius:6px; min-width:0; }
/* Human Check C: native checkbox semantics, 24px empty mark inside a 44px target. */
#dialog.admin-rights-dialog .rights-choice { display:flex; align-items:center; gap:10px; min-height:54px; padding:8px; margin:0; min-width:0; border-bottom:1px solid #30343a; cursor:pointer; line-height:1.45; }
#dialog.admin-rights-dialog .rights-choice:last-child { border-bottom:0; }
.rights-choice>span { display:grid; gap:3px; min-width:0; overflow-wrap:anywhere; }
.rights-choice small { color:#aeb7c2; font-size:12px; }
.rights-choice .rights-limit { color:#e6c384; }
#dialog.admin-rights-dialog .rights-choice input[type=checkbox] { appearance:none; -webkit-appearance:none; flex:0 0 44px; width:44px; height:44px; min-width:44px; min-height:44px; margin:0; padding:0; border:0; border-radius:5px; background-color:transparent; background-position:center; background-size:24px 24px; background-repeat:no-repeat; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238593a1' stroke-width='1.5'%3E%3Crect x='.75' y='.75' width='22.5' height='22.5' rx='5.25'/%3E%3C/svg%3E"); }
#dialog.admin-rights-dialog .rights-choice input[type=checkbox]:checked { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364aaff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='.75' y='.75' width='22.5' height='22.5' rx='5.25'/%3E%3Cpath d='M5.2 12.5c1.8.6 3.2 2.5 4.8 4.1 2.8-3.6 5.5-7.2 8.9-9.5'/%3E%3C/svg%3E"); }
#dialog.admin-rights-dialog .rights-choice input:disabled { opacity:.6; cursor:not-allowed; }
@media(max-width:1200px) { .rights-profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
 .rights-heading { flex-wrap:wrap; }
 .rights-heading>div { flex-basis:100%; }
 .rights-profile-grid,.rights-filters,.rights-row { grid-template-columns:minmax(0,1fr); }
 .rights-profile-grid,.rights-panel-heading,.rights-account-body,.rights-row { padding:12px; }
 .rights-row>button { justify-self:start; }
 #dialog.admin-rights-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
 .admin-rights-dialog #dialog-form { max-height:calc(100dvh - 18px); }
 .admin-rights-dialog .dialog-heading,.admin-rights-dialog .dialog-actions,.admin-rights-dialog #dialog-body { padding:10px; }
 .admin-rights-dialog .dialog-actions button { flex:1 1 100%; }
 .rights-filters { gap:0; }
}
@media(forced-colors:active) {
 #dialog.admin-rights-dialog .rights-choice input[type=checkbox] { appearance:auto; background-image:none; }
}
