/*
 * V246 — User Management compact information architecture.
 * UI-only overrides layered after users-v244.css.
 * No route, permission, hierarchy or account-security behavior is changed here.
 */

/* --------------------------------------------------------------------------
   User list: five operational columns instead of ten technical columns.
   -------------------------------------------------------------------------- */
.saas-user-table-v246 {
  min-width: 920px;
  table-layout: fixed;
}

.saas-user-table-v246 .col-user { width: 23%; }
.saas-user-table-v246 .col-contact { width: 27%; }
.saas-user-table-v246 .col-role-management { width: 27%; }
.saas-user-table-v246 .col-status { width: 11%; }
.saas-user-table-v246 .col-actions { width: 12%; }

.saas-user-identity,
.saas-contact-cell,
.saas-role-management-cell {
  min-width: 0;
}

.saas-user-identity,
.saas-contact-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saas-user-subline,
.saas-contact-cell small {
  display: block;
  color: var(--v244-ink-muted);
  font-size: var(--v244-text-helper);
  line-height: 1.35;
}

.saas-contact-cell > span {
  overflow-wrap: anywhere;
}

.saas-role-management-cell .saas-role-pill {
  display: inline-flex;
  max-width: 100%;
}

.saas-management-line {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 6px;
  color: var(--v244-ink-muted);
  font-size: var(--v244-text-helper);
  line-height: 1.4;
}

.saas-management-line small {
  flex: 0 0 auto;
  font-weight: var(--v244-weight-label);
}

.saas-management-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.saas-user-table-v246 .saas-row-actions {
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   User Edit: three explicit sections — basic, role/organization, security.
   -------------------------------------------------------------------------- */
.users-edit-form-v246 {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.users-edit-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--v244-border);
}

.users-edit-section:first-child {
  padding-top: 0;
}

.users-edit-section:last-of-type {
  border-bottom: 0;
}

.users-edit-section > .users-section-title {
  margin-bottom: 16px;
}

.users-edit-section .users-field-grid + .users-field-grid {
  margin-top: 14px;
}

.users-edit-section .hierarchy-select-card {
  margin-top: 16px;
}

.users-security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 14px;
  align-items: stretch;
}

.users-security-grid .users-mfa-card {
  margin: 0;
  height: 100%;
}

.users-lock-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid var(--v244-border);
  border-radius: var(--v244-radius-field);
  background: var(--v244-neutral-soft);
}

.users-security-label {
  color: var(--v244-ink-muted);
  font-size: var(--v244-text-label);
  font-weight: var(--v244-weight-label);
}

.users-lock-card > b {
  color: var(--v244-ink);
  font-size: var(--v244-text-body);
  font-weight: var(--v244-weight-label);
  overflow-wrap: anywhere;
}

.users-lock-card > small {
  color: var(--v244-ink-muted);
  font-size: var(--v244-text-helper);
  line-height: 1.45;
}

.users-edit-form-v246 .users-create-actions {
  margin-top: 4px;
  padding-top: 18px;
}

.users-reset-card-v246 {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .users-security-grid {
    grid-template-columns: 1fr;
  }
}
