/* Account layouts and semantics reuse the shared controls and token palette. */
@layer rental-features {
#tab-users { display: none; }
#tab-users.active { display: block; }
.account-identity { display: grid; grid-template-columns: minmax(220px,1fr) minmax(220px,auto) auto; align-items: center; gap: 24px; padding: 20px 24px; margin-bottom: 20px; }
.account-current { display: flex; align-items: center; gap: 14px; min-width: 0; }
.account-current > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.account-current strong { font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.account-eyebrow { flex-basis: 100%; color: var(--ui-muted); font-size: 12px; }
.account-identity-icon { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 12px; background: var(--ui-primary-soft); color: var(--ui-primary-text); }
.account-identity-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.account-role-tag { padding: 3px 8px; border-radius: 6px; color: var(--ui-info-text); background: var(--ui-info-soft); font-size: 12px; }
.account-runtime { display: grid; gap: 5px; padding-left: 24px; border-left: 1px solid var(--ui-border); min-width: 0; }
.account-runtime > span, .account-runtime > small { color: var(--ui-muted); font-size: 12px; line-height: 1.6; }
.account-runtime strong { color: var(--ui-text); font-size: 14px; font-variant-numeric: tabular-nums; }
.account-list-card { padding: 22px 24px 16px; margin-bottom: 20px; }
.account-list-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.account-list-head h3 { font-size: 20px; line-height: 1.4; margin: 0; color: var(--ui-ink); }
.account-list-head p { margin: 5px 0 0; font-size: 13px; color: var(--ui-muted); line-height: 1.6; }
.account-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 14px; }
.account-search { width: min(360px,100%); min-width: 0; }
.account-search .input { width: 100%; }
#accountListCount { color: var(--ui-muted); font-size: 12px; white-space: nowrap; }
#tab-users .account-table-wrap { max-height: 600px; }
#tab-users .account-table { min-width: 0; table-layout: fixed; }
#tab-users .account-table th { padding: 12px 16px; font-size: 12px; }
#tab-users .account-table td { padding: 16px; font-size: 13px; vertical-align: middle; overflow-wrap: anywhere; }
#tab-users .account-table th:nth-child(1) { width: 30%; }
#tab-users .account-table th:nth-child(2) { width: 18%; }
#tab-users .account-table th:nth-child(3) { width: 14%; }
#tab-users .account-table th:nth-child(4) { width: 38%; }
.account-person { display: flex; gap: 12px; align-items: center; min-width: 0; }
.account-person > div { min-width: 0; display: grid; gap: 4px; }
.account-person strong { color: var(--ui-ink); font-size: 14px; line-height: 1.5; }
.account-person small { color: var(--ui-muted); font-size: 12px; overflow-wrap: anywhere; }
.account-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: var(--ui-surface-muted); color: var(--ui-text-secondary); font-size: 16px; font-weight: 600; }
.account-self-label { color: var(--ui-info-text); font-size: 11px; }
.account-table .is-current .account-avatar { background: var(--ui-info-soft); color: var(--ui-info-text); }
.account-table .is-disabled .account-avatar { color: var(--ui-placeholder); }
.account-table .input { width: 100%; max-width: 152px; min-width: 0; }
.account-table .row-actions { gap: 8px; align-items: center; }
.account-table .row-actions .btn { white-space: nowrap; }
.account-permission-note { margin: 14px 0 0; color: var(--ui-muted); font-size: 12px; line-height: 1.7; }
.account-backup-tools > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 24px; list-style: none; cursor: pointer; }
.account-backup-tools > summary::-webkit-details-marker { display: none; }
.account-backup-tools > summary > span:first-child { display: grid; gap: 5px; }
.account-backup-tools summary strong { font-size: 15px; color: var(--ui-ink); }
.account-backup-tools summary small { font-size: 12px; color: var(--ui-muted); }
.account-details-arrow { font-size: 18px; color: var(--ui-muted); transition: transform .15s; }
.account-backup-tools[open] .account-details-arrow { transform: rotate(180deg); }
.account-backup-tools .account-system-tools { padding: 0 24px 20px; border: 0; }
.account-tools-help { margin: 0 0 14px; padding-top: 14px; border-top: 1px solid var(--ui-border); color: var(--ui-muted); font-size: 12px; line-height: 1.7; }
#tab-users .account-backup-tools .system-tools-group { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0; }
#tab-users .account-backup-tools .system-tools-group > .btn { width: 100%; min-width: 0; }
#tab-users .account-backup-tools .auto-backup-card { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-width: 0; padding: 12px 14px; border-radius: 8px; background: var(--ui-surface-subtle); }
.account-backup-tools .auto-backup-card > label { font-size: 13px; color: var(--ui-text-secondary); }
.account-backup-tools .auto-backup-card .input { width: 120px; min-width: 0; }
.account-backup-tools .auto-backup-card > span { font-size: 12px; color: var(--ui-muted); }
.account-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#accountCreateDialog, #accountPasswordDialog { width: min(560px,calc(100vw - 24px)); height: fit-content; min-height: 0; margin: auto; padding: 0; overflow: auto; }
.account-dialog .account-form { margin: 0; padding: 24px; gap: 18px; }
.account-dialog .dialog-head { position: static; margin: 0; padding: 0; display: flex; align-items: flex-start; gap: 16px; }
.account-dialog .dialog-head h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.account-dialog .dialog-head p { margin: 6px 0 0; font-size: 13px; color: var(--ui-muted); line-height: 1.6; overflow-wrap: anywhere; }
.account-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.account-field-wide { grid-column: 1 / -1; }
.account-form .input { width: 100%; }
.account-form label small { font-size: 12px; color: var(--ui-muted); line-height: 1.6; font-weight: 400; }
.account-form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; border-top: 1px solid var(--ui-border); }
.account-form-error { margin: 0; color: var(--ui-danger); font-size: 13px; line-height: 1.6; }
@media (max-width:1180px) and (min-width:721px) {
  .account-identity { grid-template-columns: minmax(0,1fr) auto; gap: 16px; }
  .account-runtime { grid-row: 2; grid-column: 1 / -1; padding-left: 0; border-left: 0; }
  #tab-users .account-table th:nth-child(1) { width: 28%; }
  #tab-users .account-table th:nth-child(2) { width: 20%; }
  #tab-users .account-table th:nth-child(3) { width: 14%; }
  #tab-users .account-table th:nth-child(4) { width: 38%; }
  .account-avatar { display: none; }
  .account-table .row-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .account-table .row-actions .btn:first-child { grid-column: 1 / -1; }
}
@media (max-width:720px) {
  .account-identity { grid-template-columns: minmax(0,1fr) auto; padding: 16px; gap: 16px 10px; }
  .account-identity-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .account-current { gap: 10px; }
  .account-current strong { font-size: 15px; }
  .account-identity > .btn { padding-inline: 10px; }
  .account-runtime { grid-row: 2; grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ui-border); padding: 12px 0 0; }
  .account-list-card { padding: 16px 12px; }
  .account-list-head { align-items: flex-start; gap: 10px; }
  .account-list-head h3 { font-size: 18px; }
  .account-list-head p { font-size: 12px; }
  .account-list-head > .btn { flex-shrink: 0; padding-inline: 10px; }
  .account-list-toolbar { display: grid; gap: 8px; margin-top: 14px; }
  .account-search { width: 100%; }
  #tab-users .account-table-wrap { overflow: visible; max-height: none; border: 0; background: transparent; }
  #tab-users .account-table, #tab-users .account-table tbody { display: block; width: 100%; min-width: 0; }
  #tab-users .account-table thead { display: none; }
  #tab-users .account-table tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px 12px; padding: 14px 12px; margin-bottom: 10px; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-surface); }
  #tab-users .account-table td { display: block; padding: 0; border: 0; min-width: 0; }
  #tab-users .account-table td:first-child, #tab-users .account-table td:last-child { grid-column: 1 / -1; }
  .account-table td[data-label]::before { content: attr(data-label); display: block; color: var(--ui-muted); font-size: 12px; margin-bottom: 6px; }
  .account-table .input { max-width: none; }
  .account-table .row-actions { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); gap: 6px; }
  .account-table .row-actions .btn { padding-inline: 6px; min-width: 0; }
  .account-permission-note { margin-top: 8px; }
  .account-backup-tools > summary { padding: 16px; }
  .account-backup-tools .account-system-tools { padding: 0 16px 16px; }
  #tab-users .account-backup-tools .system-tools-group { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-fields { grid-template-columns: minmax(0,1fr); }
  .account-dialog .account-form { padding: 20px 16px; }
  .account-form-actions > .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .account-details-arrow { transition: none; } }
}
