/* Role permission center v2.
 * Page-specific only: no global component overrides and no authorization semantics. */
body[data-page="Roles"] .role-center-tabs{
  display:flex;gap:2px;overflow-x:auto;margin:0 0 16px;padding:0;
  border:0;border-bottom:1px solid var(--line,#dce3eb);border-radius:0;background:transparent;
  scrollbar-width:thin;
}
body[data-page="Roles"] .role-center-tabs>button{
  flex:0 0 auto;min-height:42px;padding:9px 12px;border:0;border-bottom:2px solid transparent;
  border-radius:0;background:transparent;color:var(--muted,#657188);white-space:nowrap;
}
body[data-page="Roles"] .role-center-tabs>button.selected{
  color:var(--accent,#3568d4);border-bottom-color:var(--accent,#3568d4);font-weight:650;
  background:transparent;box-shadow:none;
}
body[data-page="Roles"] .role-role-overview-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 12px;
}
body[data-page="Roles"] .role-role-overview-card{
  display:grid;gap:7px;padding:14px 15px;border:1px solid var(--line,#dce3eb);border-radius:10px;
  background:var(--surface,#fff);min-width:0;
}
body[data-page="Roles"] .role-role-overview-card>span,
body[data-page="Roles"] .role-role-overview-card>small{color:var(--muted,#657188);font-size:12px;line-height:1.5}
body[data-page="Roles"] .role-role-overview-card>strong{font-size:23px;font-variant-numeric:tabular-nums}
body[data-page="Roles"] .role-role-overview-card.warn{border-top:3px solid #cf921f}
body[data-page="Roles"] .role-role-overview-card.risk{border-top:3px solid #c64b5d}
body[data-page="Roles"] .role-role-overview-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
body[data-page="Roles"] .role-source-list{display:grid;gap:8px;margin:10px 0 0;padding-left:20px}
body[data-page="Roles"] .role-permission-draft{
  margin-top:18px;border-color:#8eabe7;
  background:color-mix(in srgb,var(--surface,#fff) 94%,#eaf1ff 6%);
  box-shadow:0 8px 24px rgb(28 47 82 / 12%),0 0 0 1px rgb(53 104 212 / 8%);
}
body[data-page="Roles"] .role-permission-draft:not([open]){
  position:sticky;bottom:12px;z-index:24;padding:0;max-height:none;overflow:hidden;
}
body[data-page="Roles"] .role-permission-draft[open]{
  position:relative;bottom:auto;z-index:1;max-height:none;overflow:visible;
}
body[data-page="Roles"] .role-draft-toggle{
  display:grid;grid-template-columns:auto auto auto minmax(100px,1fr) auto;align-items:center;gap:8px;
  min-height:50px;padding:11px 15px;cursor:pointer;list-style:none;
}
body[data-page="Roles"] .role-draft-toggle::-webkit-details-marker{display:none}
body[data-page="Roles"] .role-draft-toggle-title{font-weight:650;color:var(--text,#172033)}
body[data-page="Roles"] .role-draft-compact-status{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted,#657188);font-size:12px;
}
body[data-page="Roles"] .role-draft-compact-status.warn{color:#6f5314}
body[data-page="Roles"] .role-draft-compact-status.ready{color:#1d7550}
body[data-page="Roles"] .role-draft-toggle-action{color:var(--accent,#3568d4);font-size:12px;font-weight:650}
body[data-page="Roles"] .role-permission-draft[open]>.role-draft-toggle{border-bottom:1px solid var(--line,#dce3eb)}
body[data-page="Roles"] .role-draft-body{padding:15px 17px 17px}
body[data-page="Roles"] .role-draft-body>p:first-child{margin-top:0}
body[data-page="Roles"] .role-permission-draft[open] .role-draft-toggle-action::before{content:'↑ ';font-weight:400}
body[data-page="Roles"] .role-permission-draft:not([open]) .role-draft-toggle-action::before{content:'↓ ';font-weight:400}
body[data-page="Roles"] .role-draft-count{min-width:25px;justify-content:center;background:var(--accent,#3568d4);color:white}
body[data-page="Roles"] .role-draft-status{margin:0 0 10px;padding:9px 11px;border:1px solid var(--line,#dce3eb);border-radius:8px;font-size:12px;line-height:1.6}
body[data-page="Roles"] .role-draft-status.empty{background:var(--raised,#f7f9fc);color:var(--muted,#657188)}
body[data-page="Roles"] .role-draft-status.warn{border-color:#e3c06d;background:#fff9e9;color:#6f5314}
body[data-page="Roles"] .role-draft-status.ready{border-color:#b1dbc4;background:#edf8f2;color:#1d7550}
body[data-page="Roles"] .role-permission-draft .role-permission-draft-summary{margin:8px 0 10px;max-height:150px;overflow:auto}
body[data-page="Roles"] .role-permission-draft form{margin:0}
body[data-page="Roles"] .role-permission-draft form textarea{min-height:66px}
body[data-page="Roles"] .role-draft-actions{margin-top:8px}
body[data-page="Roles"] .role-draft-server-note{margin:9px 0 0;font-size:11px;line-height:1.55}
body[data-page="Roles"] .role-permission-draft.role-draft-empty{max-height:none}
body[data-page="Roles"] .role-permission-draft.role-draft-empty .role-permission-draft-summary,
body[data-page="Roles"] .role-permission-draft.role-draft-empty form,
body[data-page="Roles"] .role-permission-draft.role-draft-empty .role-draft-actions,
body[data-page="Roles"] .role-permission-draft.role-draft-empty .role-draft-server-note{display:none}

@media(max-width:1100px){
 body[data-page="Roles"] .role-role-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-page="Roles"] .role-role-overview-columns{grid-template-columns:1fr}
}
@media(max-width:680px){
 body[data-page="Roles"] .role-role-overview-grid{grid-template-columns:1fr 1fr}
 body[data-page="Roles"] .role-permission-draft:not([open]){bottom:8px}
 body[data-page="Roles"] .role-draft-toggle{grid-template-columns:auto auto minmax(72px,1fr) auto;padding-inline:12px}
 body[data-page="Roles"] .role-draft-toggle>.muted{display:none}
 body[data-page="Roles"] .role-center-tabs>button{padding-inline:10px}
}
@media(max-width:420px){body[data-page="Roles"] .role-role-overview-grid{grid-template-columns:1fr}}
