/* Роли и права: общая таблица для роли и индивидуального доступа сотрудника. */
.ms-rights-editor, .ms-rights-list { padding: 18px 22px; max-width: 1500px; margin: 0 auto; }
.ms-rights-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.ms-rights-heading h1 { font-size: 24px; margin: 0; flex: 1; }
.ms-rights-person { font-size: 18px; font-weight: 600; margin: 8px 0; }
.ms-rights-note { color: #5b6572; font-size: 13px; line-height: 1.5; }
.ms-rights-warning, .ms-rights-error, .ms-rights-notice { padding: 14px 16px; border-radius: 4px; margin: 14px 0; line-height: 1.5; }
.ms-rights-warning { background: #fff3c4; border: 2px solid #b87500; color: #6a4200; font-size: 16px; font-weight: 700; }
.ms-rights-error { background: #fff0ef; border: 1px solid #c23b31; color: #8f2821; }
.ms-rights-notice { background: #edf8ef; border: 1px solid #4f8c60; }
.ms-rights-field { display: flex; flex-direction: column; gap: 6px; max-width: 620px; font-weight: 600; margin: 12px 0; }
.ms-rights-field input, .ms-rights-field select { width: 100%; min-height: 34px; font-weight: 400; }
.ms-rights-copy { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 0; }
.ms-rights-copy label { display: flex; gap: 8px; align-items: center; }
.ms-rights-copy select { max-width: 380px; min-height: 32px; }
.ms-rights-matrix { border: 0; margin: 12px 0 0; padding: 0; min-width: 0; }
.ms-rights-matrix legend { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.ms-rights-search { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ms-rights-search input { width: 340px; max-width: 75%; }
.ms-rights-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 20px; }
.ms-rights-nav a { color: #24629a; text-decoration: underline; }
.ms-rights-section { margin-bottom: 24px; scroll-margin-top: 90px; }
.ms-rights-section h2 { font-size: 17px; border-bottom: 2px solid #d7dee7; padding-bottom: 8px; margin: 12px 0 0; }
.ms-rights-scroll { overflow: auto; }
.ms-rights-table { border-collapse: collapse; width: 100%; min-width: 950px; font-size: 13px; }
.ms-rights-table th, .ms-rights-table td { padding: 8px 6px; border-bottom: 1px solid #e2e7ed; text-align: left; vertical-align: middle; }
.ms-rights-table thead th { background: #f2f5f8; font-weight: 600; }
.ms-rights-table tbody th { width: 200px; min-width: 160px; font-weight: 500; }
.ms-rights-table select { width: 100%; min-width: 108px; max-width: 180px; min-height: 31px; border: 1px solid #bbc5d1; background: #fff; border-radius: 3px; font-size: 12px; padding: 3px; }
.ms-rights-table tbody tr:hover { background: #f7faff; }
.ms-rights-flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 10px 24px; margin-top: 14px; }
.ms-rights-flags label { display: flex; gap: 9px; align-items: start; line-height: 1.4; }
.ms-rights-flags input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.ms-rights-editor [hidden] { display: none !important; }
.ms-rights-footer { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0; background: #fff; border-top: 1px solid #d2dae4; }
.ms-rights-delete { color: #aa2e27; margin-left: auto; }
.ms-rights-list-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.ms-rights-list-table th, .ms-rights-list-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid #dce2e9; }
.ms-rights-list-table th { background: #f2f5f8; }
.ms-rights-pagination { display: flex; gap: 16px; align-items: center; }
/* Размеры полей общие с остальными формами; раздел выбирается в левой колонке. */
.ms-rights-editor { font-size: 12px; }
.ms-rights-workspace { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; }
.ms-rights-content { min-width: 0; }
.ms-rights-editor .ms-rights-nav { display: flex; flex-direction: column; gap: 0; padding: 0; margin: 0; }
.ms-rights-nav a { padding: 8px 12px; text-decoration: none; }
.ms-rights-nav a[aria-selected="true"] { background: #207aa7; color: #fff; }
.ms-rights-nav a:hover { background: #eef5fa; color: #186999; }
.ms-rights-editor .ms-rights-field { flex-direction: row; align-items: center; gap: 12px; font-weight: 400; }
.ms-rights-editor .ms-rights-field input, .ms-rights-editor .ms-rights-field select,
.ms-rights-editor .ms-rights-copy select { box-sizing: border-box; width: 250px; min-height: 21px; height: 21px; padding: 1px 3px; font-size: 12px; border-radius: 0; }
.ms-rights-editor .ms-rights-field .ms-sel { width: 250px; }
.ms-rights-editor .ms-rights-table select { height: 21px; min-height: 21px; padding: 1px 3px; border-radius: 0; }
.ms-rights-editor .ms-rights-table .ms-sel { width: 140px; }
.ms-rights-editor .ms-rights-table { font-size: 12px; }
.ms-rights-editor .ms-rights-table th, .ms-rights-editor .ms-rights-table td { padding: 5px 6px; }
.ms-rights-editor .ms-input[aria-invalid="true"] { border: 1px solid red; outline-color: red; }
.ms-rights-editor .ms-rights-section h2 { margin-top: 0; }
@media (max-width: 700px) {
  .ms-rights-workspace { grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
  .ms-rights-editor .ms-rights-field { flex-wrap: wrap; }
  .ms-rights-nav a { padding: 8px 4px; }
  .ms-rights-editor .ms-rights-copy .ms-sel { max-width: 100%; }
  .ms-rights-editor .ms-rights-flags { grid-template-columns: minmax(0, 1fr); }
  .ms-rights-editor .ms-rights-flags label { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
  .ms-rights-editor, .ms-rights-list { padding: 12px; }
  .ms-rights-copy label { flex-wrap: wrap; }
  .ms-rights-copy select { max-width: 100%; }
  .ms-rights-heading h1 { font-size: 21px; flex-basis: 100%; }
}
