/* ─────────────────────────────────────────────────────────────────
   ui-fixes.css — точечные UI-улучшения
   ─────────────────────────────────────────────────────────────── */

/* Inline-форма: input + кнопка справа в одной строке */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row--inline {
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
}
.form-row--inline .form-row__input {
  flex: 1;
  min-width: 0;
}

/* Отступы по краям в col-2 для не-чатовых страниц.
   Чат сам управляет своими краями, поэтому правим только конкретные классы. */
.user-settings,
.admin-settings,
.admin-panel,
.about-page {
  padding-left: 20px;
  padding-right: 20px;
}

/* Пере-устанавливаем секции — наследуют горизонтальный отступ от родителя */
.user-settings__section,
.user-settings__actions,
.admin-settings__section {
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 768px) {
  .user-settings,
  .admin-settings,
  .admin-panel,
  .about-page {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ── Пустое состояние col-2 (чат не выбран) ─────────────────────── */
.col2-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #94a3b8;
  user-select: none;
  padding: 40px 20px;
}
.col2-empty__icon {
  width: 80px;
  height: 80px;
  opacity: 0.5;
}
.col2-empty__text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── Admin: список пользователей с группировкой по отделам ─────── */
.user-dept {
  margin-bottom: 20px;
}
.user-dept__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-left: 3px solid #94a3b8;
  background: rgba(10, 23, 131, 0.03);
  border-radius: 4px;
  margin-bottom: 6px;
}
.user-dept__name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.user-dept__count {
  font-size: 12px;
  color: #94a3b8;
  margin-left: auto;
}
.user-dept__order {
  font-size: 11px;
  color: #94a3b8;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  padding: 2px 6px;
  background: rgba(10, 23, 131, 0.06);
  border-radius: 4px;
}
.user-dept__edit {
  width: 28px;
  height: 28px;
}
.user-dept__edit svg {
  width: 14px;
  height: 14px;
}
.user-dept__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-dept__toggle-disabled {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  text-align: left;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.user-dept__toggle-disabled:hover {
  color: #0a1783;
}
.user-dept__disabled {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-dept__disabled[hidden] {
  display: none;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "main actions"
    "meta actions";
  gap: 2px 12px;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background 150ms ease;
}
.user-row:hover {
  background: rgba(10, 23, 131, 0.04);
}
.user-row--disabled {
  opacity: 0.55;
}
.user-row__main {
  grid-area: main;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.user-row__name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-row__role {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.user-row__meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  min-width: 0;
}
.user-row__login {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-row__sep {
  color: #cbd5e1;
}
.user-row__last {
  white-space: nowrap;
}
.user-row__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 4px;
}