.staff-accounts-modal-card {
  width: min(1060px, calc(100vw - 32px));
  max-width: 1060px;
}

.staff-accounts-body {
  display: grid;
  grid-template-columns: minmax(340px, 1.05fr) minmax(380px, 1.25fr);
  gap: 18px;
  padding: 16px;
  overflow-y: auto;
  max-height: calc(88vh - 80px);
}

#admin-tab-panel .staff-accounts-body {
  padding: 0;
  max-height: none;
  overflow: visible;
}

#admin-tab-panel .staff-accounts-body > section:first-of-type .staff-accounts-list {
  max-height: 620px;
}

.staff-accounts-body > section:first-of-type {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.staff-accounts-body > section:first-of-type .staff-accounts-list {
  flex: 1;
  min-height: 380px;
  max-height: 560px;
}

.staff-accounts-body > section:nth-of-type(2),
.staff-accounts-body > section:nth-of-type(3) {
  min-width: 0;
}

@media (max-width: 860px) {
  .staff-accounts-body {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px;
  }
  .staff-accounts-body > section:first-of-type {
    grid-row: auto;
  }
}

.staff-accounts-body > .client-section,
.staff-accounts-body > section,
.staff-accounts-body > .app-form {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--theme-border, #cad9e6);
  border-radius: 14px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--theme-text, #21133d) 6%, transparent);
}

.staff-accounts-body h4 {
  margin: -14px -14px 10px;
  padding: 9px 14px;
  background: linear-gradient(180deg, var(--theme-panel, #d6ebf7) 0%, var(--theme-panel, #c3e1f2) 100%);
  border-bottom: 1px solid var(--theme-border, #9bc7df);
  border-radius: 11px 11px 0 0;
  color: var(--theme-text, #21133d);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.staff-accounts-toolbar {
  margin-bottom: 10px;
}

.staff-accounts-toolbar .toolbar-button {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 9999px;
  font-weight: 700;
}

.staff-accounts-list {
  display: grid;
  gap: 10px;
  min-height: 280px;
  max-height: 460px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  align-content: start;
}

.staff-account-row {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--theme-border, #cad9e6);
  border-radius: 12px;
  background: var(--theme-panel, #f8fafd);
  padding: 12px 14px;
  text-align: left;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.staff-account-row:hover,
.staff-account-row:focus-visible {
  border-color: var(--theme-border, #9bc7df);
  background: var(--theme-panel, #eef6fc);
}

.staff-account-row.is-selected {
  border-color: var(--mobile-coral, #ec665c);
  background: #fff7f6;
  box-shadow: inset 3px 0 0 var(--mobile-coral, #ec665c), 0 2px 8px color-mix(in srgb, var(--theme-accent, #ec665c) 12%, transparent);
}

.staff-account-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.staff-account-email {
  font-weight: 800;
  color: var(--theme-text, #21133d);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-account-name {
  color: var(--theme-quiet, #546c86);
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.staff-account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.staff-account-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 9999px;
  background: var(--theme-panel, #c3e1f2);
  border: 1px solid var(--theme-border, #9bc7df);
  color: var(--theme-text, #21133d);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.staff-account-pill.is-owner {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.staff-account-pill.is-disabled {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.staff-account-pill.is-forced-change {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.passkeys-modal-card {
  width: min(880px, calc(100vw - 40px));
}

.passkeys-modal-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  padding: 12px;
  overflow-y: auto;
}

.passkeys-modal-body > .client-section,
.passkeys-modal-body > section {
  padding: 14px;
  border: 1px solid var(--theme-border, #cad9e6);
  border-radius: 12px;
  background: var(--theme-panel, #ffffff);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-text, #21133d) 5%, transparent);
}

.passkeys-modal-body h4 {
  margin: -14px -14px 10px;
  padding: 9px 14px;
  background: linear-gradient(180deg, var(--theme-panel, #d6ebf7) 0%, var(--theme-panel, #c3e1f2) 100%);
  border-bottom: 1px solid var(--theme-border, #9bc7df);
  border-radius: 11px 11px 0 0;
  color: var(--theme-text, #21133d);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .passkeys-modal-body {
    grid-template-columns: 1fr;
  }
}

.passkeys-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.passkeys-toolbar .toolbar-button {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 9999px;
  font-weight: 700;
}

#passkeys-enroll.toolbar-button {
  background: linear-gradient(180deg, var(--theme-accent, #e59a38) 0%, var(--theme-accent, #d98c2b) 100%);
  color: #ffffff;
  border-color: #b86b11;
  font-weight: 800;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--theme-accent, #ec665c) 25%, transparent);
}

#passkeys-enroll.toolbar-button:hover {
  background: linear-gradient(180deg, #eca445 0%, #df9432 100%);
}

.passkeys-status {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--theme-panel, #eef6fc);
  border: 1px solid var(--theme-border, #9bc7df);
  color: var(--theme-text, #21133d);
  font-size: 0.85rem;
  font-weight: 600;
}

.passkeys-list {
  display: grid;
  gap: 10px;
  min-height: 220px;
  max-height: 480px;
  overflow-y: auto;
  align-content: start;
}

.passkey-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--theme-border, #cad9e6);
  border-radius: 12px;
  background: var(--theme-panel, #f8fafd);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.passkey-item-row:hover {
  border-color: var(--theme-border, #9bc7df);
  background: var(--theme-panel, #eef6fc);
}

.passkey-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.passkey-item-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.passkey-item-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.passkey-item-name {
  font-weight: 800;
  color: var(--theme-text, #21133d);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.passkey-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.82rem;
  color: var(--theme-quiet, #546c86);
}

.passkey-meta-item {
  white-space: nowrap;
}

.passkey-meta-id {
  font-family: monospace;
  font-size: 0.78rem;
  opacity: 0.8;
}

.passkey-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.passkey-item-actions .toolbar-button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 9999px;
  font-weight: 700;
}

.passkey-delete-button.is-danger {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 700;
}

.passkey-delete-button.is-danger:hover {
  border-color: #f87171;
  background: #fee2e2;
  color: #7f1d1d;
}

.passkeys-guide-panel {
  display: flex;
  flex-direction: column;
}

.passkeys-guide-content {
  display: grid;
  gap: 12px;
  font-size: 0.88rem;
  color: #36506c;
  line-height: 1.45;
}

.passkeys-guide-intro {
  margin: 0;
}

.passkeys-guide-steps {
  display: grid;
  gap: 10px;
}

.passkeys-guide-step {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--theme-panel, #f8fafd);
  border: 1px solid var(--theme-border, #cad9e6);
}

.passkeys-guide-step p {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.passkeys-guide-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--theme-text, #221d3b);
  color: #ffffff;
}

/* Secure Password / PIN Input Container with Eye Toggle */
.password-field-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-field-container input {
  width: 100%;
  padding-right: 44px !important;
}

.btn-toggle-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--theme-quiet, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.btn-toggle-eye:hover,
.btn-toggle-eye:focus-visible {
  color: var(--theme-text, #221d3b);
  background: var(--theme-panel, #f1f5f9);
  outline: none;
}

.btn-toggle-eye .eye-icon {
  display: block;
}

