.users-heading { align-items: center; }
.users-heading p, .users-list-heading p { color: var(--muted); margin: .35rem 0 0; }
.users-heading .primary-action { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.users-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.35rem 0; }
.users-summary-card { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 82px; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fff); box-shadow: 0 2px 10px rgb(15 43 84 / 3%); }
.users-summary-card span { color: var(--muted); font-size: .92rem; }
.users-summary-card strong { color: var(--ink, #142033); font-size: 1.5rem; }
.users-summary-warning { border-color: #f2d39b; background: #fffaf0; }
.users-list-card { overflow: hidden; padding: 0; }
.users-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.35rem 1.5rem; border-bottom: 1px solid var(--line); }
.users-list-heading h2 { margin: 0; font-size: 1.15rem; }
.users-total { flex: 0 0 auto; padding: .35rem .7rem; border-radius: 999px; background: #eef4fc; color: #264b79; font-size: .85rem; font-weight: 700; }
.users-table { margin: 0; --bs-table-bg: transparent; }
.users-table thead th { padding: .85rem 1.1rem; border-bottom-color: var(--line); background: #f7f9fc; color: #64748b; font-size: .75rem; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.users-table tbody td { padding: .9rem 1.1rem; border-bottom-color: var(--line); }
.users-table tbody tr:last-child td { border-bottom: 0; }
.user-identity { display: flex; align-items: center; gap: .75rem; min-width: 220px; }
.user-avatar { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #e8f2fc; color: #1261c9; font-weight: 750; }
.user-identity > span:last-child { display: grid; gap: .12rem; min-width: 0; }
.user-identity strong { color: var(--ink, #142033); font-weight: 650; }
.user-identity small { color: var(--muted); overflow-wrap: anywhere; }
.user-role { display: inline-flex; padding: .33rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #34455e; font-size: .86rem; font-weight: 600; white-space: nowrap; }
.user-protected-label { display: block; margin-top: .3rem; color: var(--muted); }
.user-status { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .65rem; border-radius: 999px; font-size: .84rem; font-weight: 650; white-space: nowrap; }
.user-status > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.user-status.is-active { background: #e9f7ef; color: #167447; }
.user-status.is-disabled { background: #f2f4f7; color: #606b7a; }
.user-status.is-locked { background: #fff4df; color: #96600c; }
.users-actions-heading { min-width: 305px; }
.users-action-group { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.users-action-group form { display: inline-flex; margin: 0; }
.users-action-group .btn { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.protected-account-note { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .84rem; }
.users-security-note { display: flex; align-items: center; gap: .45rem; margin: 0; padding: .9rem 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.users-empty { display: grid; justify-items: center; padding: 3rem 1rem; text-align: center; }
.users-empty > i { color: #347bd0; font-size: 2rem; }
.users-empty h3 { margin: .7rem 0 .3rem; font-size: 1.1rem; }
.users-empty p { color: var(--muted); }
.users-edit-card { max-width: 720px; padding: clamp(1rem, 3vw, 2rem); }
.users-edit-card .form-label { font-weight: 650; }
.users-edit-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.users-edit-actions .btn { display: inline-flex; align-items: center; gap: .4rem; }

@media (max-width: 1000px) {
  .users-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
  .users-table thead { display: none; }
  .users-table tbody { display: grid; gap: .8rem; padding: .8rem; }
  .users-table tbody tr { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
  .users-table tbody td { display: grid; grid-template-columns: minmax(100px, 32%) minmax(0, 1fr); align-items: center; gap: .65rem; padding: .75rem .85rem; }
  .users-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
  .users-table tbody td:first-child { display: block; }
  .users-table tbody td:first-child::before { display: none; }
  .users-row-actions { border-top: 1px solid var(--line); }
  .users-action-group { gap: .4rem; }
  .users-security-note { padding-inline: 1rem; }
}
@media (max-width: 520px) {
  .users-heading { align-items: flex-start; gap: .8rem; flex-direction: column; }
  .users-heading .primary-action { width: 100%; justify-content: center; }
  .users-summary { gap: .55rem; }
  .users-summary-card { min-height: 70px; padding: .75rem; }
  .users-summary-card span { max-width: 9rem; font-size: .8rem; }
  .users-summary-card strong { font-size: 1.25rem; }
  .users-list-heading { align-items: flex-start; padding: 1rem; }
  .users-list-heading p { max-width: 24ch; font-size: .88rem; }
  .users-total { font-size: .75rem; }
  .users-table tbody { padding: .6rem; }
  .users-table tbody td { grid-template-columns: 1fr; gap: .35rem; }
  .users-action-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .users-action-group form, .users-action-group .btn { width: 100%; }
  .users-action-group .btn { justify-content: center; }
  .protected-account-note { padding: .25rem 0; }
}
