#agencyCardUsers { min-width: 0; }
#agencyUsersList { min-width: 0; }
.agency-card-tabs { display: flex; gap: 4px; border-bottom: 1px solid #dce2e8; }
.agency-card-tabs button { padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.agency-card-tabs button.active { border-bottom-color: #2563eb; color: #1d4ed8; font-weight: 600; }
.agency-member-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, .45fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #dce2e8; }
.agency-member-identity { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.agency-member-identity span { color: #52616d; font-size: 13px; }
.agency-member-role { font-size: 13px; }
.agency-member-row .card-actions { margin: 0; }
.agency-user-dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid #cbd5df; border-radius: 8px; color: #1b2730; background: #fff; overflow: auto; box-sizing: border-box; }
.agency-user-dialog::backdrop { background: #0008; }
.agency-user-dialog h2 { font-size: 20px; margin: 0 0 16px; }
.agency-user-dialog p, .agency-user-dialog [role="status"] { overflow-wrap: anywhere; font-size: 14px; }
.agency-user-dialog .agency-password-toggle { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.agency-user-dialog .agency-password-toggle input { width: auto; }
@media (max-width: 800px) {
  .agency-member-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #internalAgencyEditor:has(#agencyCardUsers.active) { min-width: 0; }
  .agency-card-tabs { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  body:has(#internalClients.active #agencyCardUsers.active) { grid-template-columns: 60px minmax(0, 1fr); }
  body:has(#internalClients.active #agencyCardUsers.active) .sidebar { width: 60px; padding: 10px 5px; }
  body:has(#internalClients.active #agencyCardUsers.active) .sidebar .nav-label,
  body:has(#internalClients.active #agencyCardUsers.active) .sidebar-brandmark span,
  body:has(#internalClients.active #agencyCardUsers.active) .sidebar .date-card { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  body:has(#internalClients.active #agencyCardUsers.active) .sidebar nav > button { justify-content: center; padding: 8px; }
  body:has(#internalClients.active #agencyCardUsers.active) .sidebar-brandmark { justify-content: center; padding: 10px 0; }
  body:has(#internalClients.active #agencyCardUsers.active) .topbar { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  body:has(#internalClients.active #agencyCardUsers.active) .topbar .actions { display: flex; flex-direction: row; justify-content: flex-end; }
}
