/* «Сотрудники и доступы» (23.10, registry.js): таблицей, как в Google Таблице — вкладки «Сотрудники» и «Доступы на сайте»,
   шапка и первая колонка закреплены, ячейка правится на месте (поле без рамки, рамка — при наведении и правке). */
.rg-main { min-width: 0; }
.rg-head { flex-wrap: wrap; gap: 10px 16px; }
.rg-head .sec-title { flex: 1 1 320px; min-width: 0; }
.rg-note { margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--text3); }
.rg-note .warn { display: inline-flex; align-items: center; gap: 6px; color: #E8A23A; }
.rg-note .ico { width: 15px; height: 15px; }
.rg-tools { flex-wrap: wrap; gap: 8px; }
.rg-search { width: 200px; }
.rg-dep { height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--field-border); background: var(--field); color: var(--text);
  font: inherit; font-size: 14px; max-width: 200px; }

/* таблица */
.rg-wrap { flex: 1; min-height: 0; overflow: auto; margin: 0 -24px; padding: 0 24px 20px; }
/* ползунки прокрутки — заметные: таблица шире экрана, её листают вбок */
.rg-wrap::-webkit-scrollbar { width: 14px; height: 14px; }
.rg-wrap::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .35) padding-box; border: 3px solid transparent; border-radius: 999px; }
.rg-wrap::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .55) padding-box; }
[data-theme="light"] .rg-wrap::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .3) padding-box; }
@supports not selector(::-webkit-scrollbar) { .rg-wrap { scrollbar-width: auto; scrollbar-color: rgba(255, 255, 255, .4) transparent; } }
.rg-grid { color-scheme: light; border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; min-width: 100%;
  background: #fff; color: var(--card-text); border-radius: 18px; box-shadow: var(--card-shadow); font-size: 14px; }
.rg-grid th, .rg-grid td { height: 38px; padding: 0 6px; border-bottom: 1px solid #ECEEF1; border-right: 1px solid #F1F2F4;
  text-align: left; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.rg-grid th { position: sticky; top: 0; z-index: 2; height: 36px; padding: 0 12px; background: #F6F7F9; color: #5E6470; font-size: 12px; font-weight: 600; }
.rg-grid thead tr:first-child th:first-child { border-top-left-radius: 18px; }
.rg-grid thead tr:first-child th:last-child { border-top-right-radius: 18px; }
.rg-grid .rg-stick { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 #E1E4E8; }
.rg-grid th.rg-stick { z-index: 3; }
.rg-grid tbody tr:last-child td { border-bottom: 0; }
@media (hover: hover) { .rg-grid tbody tr:hover td { background: #FAFAFB; } }
.rg-cell { width: 100%; height: 30px; padding: 0 6px; border: 1px solid transparent; border-radius: 8px; background: transparent;
  color: var(--card-text); font: inherit; font-size: 14px; text-overflow: ellipsis; }
.rg-cell::placeholder { color: #C3C8CF; }
@media (hover: hover) { .rg-cell:not([readonly]):not(:disabled):hover { border-color: #E1E4E8; } }
.rg-cell:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(204, 75, 12, .12); }
.rg-cell[readonly] { cursor: default; }
.rg-cell.saving { opacity: .55; }
td:first-child .rg-cell, .rg-name { font-weight: 600; }
.rg-name { padding-left: 12px !important; }
.rg-bad .rg-cell { text-decoration: underline wavy #E8A23A; text-underline-offset: 4px; }
.rg-login { padding-left: 12px !important; font-size: 13px; color: #5E6470; }
.rg-login.ok { color: #1E7A3E; }
.rg-login.warn { color: #B54708; }
.rg-login.bad { color: #B42318; }
.rg-more-cell { text-align: center !important; padding: 0 !important; }
.rg-more { color: #5E6470; border-color: transparent; background: none; }
@media (hover: hover) { .rg-more:hover { background: #F1F2F4; color: var(--card-text); } }
.rg-empty { padding: 40px 14px; color: var(--text3); text-align: center; }

/* вкладка «Доступы на сайте»: строка групп, подписи галочек в две строки */
.rg-access .rg-groups th { height: 30px; text-align: center; color: var(--card-text); font-size: 11.5px; letter-spacing: .3px; text-transform: uppercase;
  border-bottom-color: #E1E4E8; }
.rg-access thead tr:nth-child(2) th { top: 30px; }
.rg-access .rg-key { height: 52px; white-space: normal; line-height: 15px; font-size: 11.5px; text-align: center; padding: 0 6px; }
.rg-box { text-align: center !important; }
.rg-box input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.rg-box input:disabled { cursor: default; opacity: .45; }
.rg-role { padding-left: 6px; font-size: 13.5px; }
.rg-role-sel { cursor: pointer; }
.rg-role-sel:disabled { cursor: default; opacity: 1; appearance: none; }

/* история — в окне */
.rg-hist { display: flex; flex-direction: column; gap: 10px; }
.rg-hist-row { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 14px; line-height: 19px; }
.rg-hist-when { color: var(--text3); font-variant-numeric: tabular-nums; }
.rg-hist-who { color: var(--text3); }
.rg-hist-who::before { content: "· "; }

@media (max-width: 899px) {
  .rg-search { width: 100%; }
  .rg-grid th.rg-stick, .rg-grid td.rg-stick { max-width: 170px; }
  .rg-cell { font-size: 16px; }
}
