.role-workbench{display:flex;gap:16px;min-height:570px;align-items:stretch}.role-sidebar{width:250px;flex:none;border:1px solid var(--line,#e6e6e6);border-radius:12px;padding:14px;background:#fff}.role-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.role-panel-heading h3{margin:0}.role-sidebar input{width:100%;margin:14px 0}.role-list{display:flex;flex-direction:column;gap:6px;max-height:560px;overflow:auto}.role-list-item{display:flex!important;flex-wrap:wrap;text-align:left!important;gap:6px;width:100%;padding:12px!important;background:transparent!important;border:1px solid transparent!important;border-radius:9px!important;color:inherit!important}.role-list-item:hover{background:#f3f7f4!important}.role-list-item.active{background:#e9f5ee!important;border-color:#cee6d8!important}.role-list-item.active strong{color:#176b4b}.role-list-item small{width:100%;overflow-wrap:anywhere;color:#777}.role-member-count{margin-left:auto;font-size:12px;color:#777}.role-badge{font-size:11px;border-radius:5px;background:#f3f5f4;padding:2px 6px;color:#777}.role-note{font-size:12px;color:#777;line-height:1.7}.role-detail{flex:1;min-width:0;border:1px solid var(--line,#e6e6e6);border-radius:12px;background:#fff;display:flex;flex-direction:column}.role-detail-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px}.role-detail-heading h3{margin:0 0 6px}.role-detail-heading p{margin:8px 0 0}.role-controls{display:flex;gap:8px;flex-wrap:wrap}.role-tabs{display:flex;border-bottom:1px solid var(--line,#e6e6e6);padding:0 16px;gap:8px}.role-tabs button{background:transparent!important;border:0!important;border-radius:0!important;padding:12px!important;color:#777!important}.role-tabs button.active{color:#176b4b!important;border-bottom:2px solid #176b4b!important}.role-tab-content{padding:18px;flex:1;min-width:0}.role-banner{padding:12px;border:1px solid var(--line,#e6e6e6);border-radius:8px;background:#f6f8f7;color:#465b51;font-size:13px;line-height:1.7}.role-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.role-form-grid>:last-child{grid-column:1/-1}.role-form-grid input,.role-form-grid select,.role-form-grid textarea{width:100%}.role-permission-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:16px}.role-permission-toolbar>span{margin-right:auto}.role-permission-tree h4{margin:18px 0 10px;color:#777;font-size:12px}.role-permission-tree details{border-top:1px solid var(--line,#e6e6e6);padding:10px 0}.role-permission-tree summary{display:flex;align-items:center;gap:4px;list-style:none;cursor:pointer}
.role-permission-tree summary::-webkit-details-marker{display:none}
.role-permission-tree summary::before{content:"";width:16px;height:16px;flex:0 0 16px;background:currentColor;clip-path:polygon(25% 18.75%,75% 50%,25% 81.25%)}
.role-permission-tree details[open]>summary::before{transform:rotate(90deg)}
.role-permission-tree summary input[type="checkbox"]{margin:0}
.role-permission-tree summary label{display:inline-flex;align-items:center;gap:9px;cursor:pointer}.role-permission-actions{padding:10px 0 0 26px;display:flex;flex-direction:column;gap:10px}.role-permission-actions label{display:flex;align-items:center;gap:9px;font-size:13px}.role-permission-actions code{margin-left:auto;color:#777;font-size:11px}.role-footer{display:flex;align-items:center;gap:8px;padding:14px 18px;border-top:1px solid var(--line,#e6e6e6)}.role-footer>span{margin-right:auto;font-size:12px}
@media(max-width:800px){.role-workbench{flex-direction:column}.role-sidebar{width:100%}.role-list{max-height:220px}.role-detail-heading{flex-direction:column}.role-tabs{padding:0 6px;gap:0}.role-tabs button{padding:10px 7px!important;font-size:12px}.role-form-grid{grid-template-columns:1fr}.role-permission-actions code{display:none}.role-footer{flex-wrap:wrap}.role-footer>span{width:100%}.role-tab-content{padding:12px}.role-controls{width:100%}}

.role-workbench{height:min(700px,70vh);min-height:450px}.role-sidebar{display:flex;flex-direction:column}.role-list{flex:1;min-height:0}.role-detail{overflow:hidden}.role-tab-content{min-height:0;overflow:auto}.role-permission-tree input,.role-user-picker input{width:16px;height:16px;flex:none}.role-sidebar>.role-note{margin-bottom:0}@media(max-width:800px){.role-workbench{height:auto;min-height:0}.role-sidebar{max-height:260px}.role-detail{max-height:65vh;min-height:360px}}

.operations-shared-notice{grid-column:2;grid-row:1;margin:0;padding:16px 28px 0;font-size:12px;line-height:1.7}.operations-body:has(>.operations-shared-notice)>.operations-content{grid-row:2}

.role-form-grid :is(input, select, textarea):disabled {
  background: #f0f1f2;
  border-color: #d8dce0;
  color: #717780;
  -webkit-text-fill-color: #717780;
  cursor: not-allowed;
  opacity: 1;
  outline: none;
  box-shadow: none;
}
.role-form-grid textarea:disabled {
  resize: none;
}
.role-form-grid .field:has(:disabled),
.role-permission-tree label:has(input:disabled),
.role-permission-tree input:disabled {
  color: #717780;
  cursor: not-allowed;
}
.role-banner-readonly {
  background: #f0f1f2;
  border-color: #d8dce0;
  color: #626973;
}

.role-user-picker {
  max-height: 360px;
  margin-top: 12px;
  overflow: auto;
}
.role-user-picker-heading,
.role-user-picker label {
  display: grid;
  grid-template-columns: 16px minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1.6fr);
  align-items: center;
  column-gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.role-user-picker-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: 7px;
  background: #f4f6f5;
  color: #565e59;
  font-size: 12px;
  font-weight: 600;
}
.role-user-picker-heading > :first-child {
  grid-column: 2;
}
.role-user-picker label {
  line-height: 1.5;
  cursor: pointer;
}
.role-user-picker label:has(input:disabled) {
  cursor: default;
}
.role-user-picker input[type="checkbox"] {
  margin: 0;
}
.role-user-picker strong {
  font-weight: 600;
}
.role-user-picker small {
  grid-column: 2 / -1;
  color: #626973;
}

.role-user-toolbar {
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.role-user-toolbar > input {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 320px;
}
.role-user-toolbar > button {
  flex: none;
  margin-left: auto;
}
@media (max-width: 800px) {
  .role-user-toolbar > input {
    flex-basis: 100%;
    max-width: none;
  }
}

.role-list-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.role-list-item .role-member-count {
  margin-left: 0;
  justify-self: end;
}

.role-list-item .role-badge {
  grid-column: 1 / -1;
  justify-self: start;
}

.role-detail-heading h3 {
  margin-bottom: 0;
}

.role-form-grid > :first-child {
  grid-column: 1 / -1;
}

.member-role-field {
  min-width: 0;
  margin: 18px 0;
  padding: 0;
  border: 0;
}
.member-role-field legend {
  padding: 0;
  color: #777;
  font-size: 12px;
}
.member-role-help {
  margin: 8px 0;
  color: #777;
  font-size: 12px;
  line-height: 1.6;
}
.member-role-picker {
  min-width: 0;
}
.member-role-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #252525;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
}
.member-role-trigger:hover,
.member-role-trigger[aria-expanded="true"] {
  border-color: #78b598;
}
.member-role-trigger:focus-visible {
  outline: 2px solid #27825b;
  outline-offset: 2px;
}
.member-role-summary {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-role-count {
  flex: none;
  color: #607067;
  font-size: 12px;
}
.member-role-trigger > .icon {
  width: 14px;
  height: 14px;
  flex: none;
}
.member-role-dropdown {
  position: fixed;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  margin: 0;
  padding: 8px;
  border: 1px solid #dce4df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px #182d4226;
  overflow: hidden;
}
.member-role-dropdown[hidden] {
  display: none;
}
.member-role-search {
  position: relative;
  flex: none;
}
.member-role-search > .icon {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 15px;
  height: 15px;
  pointer-events: none;
}
.member-role-search input {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  padding: 7px 10px 7px 32px;
  border: 1px solid #ddd;
  border-radius: 7px;
  background: #fff;
  color: #252525;
  font: inherit;
  font-size: 13px;
}
.member-role-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.member-role-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.member-role-option[hidden],
.member-role-empty[hidden] {
  display: none;
}
.member-role-empty {
  margin: 8px;
  color: #777;
  font-size: 13px;
}
.member-role-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding-top: 8px;
  border-top: 1px solid #edf0ee;
  color: #777;
  font-size: 12px;
}
.member-role-dropdown-footer button {
  margin: 0;
  padding: 5px 12px;
  font-size: 12px;
}
.member-role-option input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
}
.member-role-option > span {
  overflow-wrap: anywhere;
}
.member-role-option small {
  margin-left: 6px;
  color: #777;
  font-size: 11px;
}
.member-role-option:has(input:checked:not(:disabled)) {
  border-color: #9acbb1;
  background: #edf7f1;
}
.member-role-option:has(input:disabled),
.member-role-option input:disabled,
.member-immutable-field :is(input, select):disabled {
  background: #f0f1f2;
  color: #717780;
  cursor: not-allowed;
  opacity: 1;
}
