.xh-admin-account-button { margin-left: auto; white-space: nowrap; }

html.xh-subadmin-no-copy .ai-admin,
html.xh-subadmin-no-copy .ai-admin * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

html.xh-subadmin-no-copy .ai-admin input,
html.xh-subadmin-no-copy .ai-admin textarea {
  user-select: none !important;
}

.xh-admin-account-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 5, 12, .76);
  backdrop-filter: blur(8px);
}

.xh-admin-account-modal {
  width: min(820px, calc(100vw - 36px));
  max-height: min(820px, calc(100vh - 40px));
  overflow: hidden;
  color: #eaf2ff;
  background: #101722;
  border: 1px solid #2b3c52;
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55);
}

.xh-admin-account-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #263447;
}

.xh-admin-account-modal-head h2 { margin: 0 0 8px; font-size: 22px; }
.xh-admin-account-modal-head p { margin: 0; color: #8fa4be; font-size: 14px; }
.xh-admin-close { border: 0; color: #9db0c7; background: transparent; font-size: 30px; line-height: 1; cursor: pointer; }
.xh-admin-account-body { max-height: calc(100vh - 170px); overflow: auto; padding: 22px 24px 26px; }
.xh-admin-account-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.xh-admin-account-count { color: #9fb1c7; }
.xh-admin-account-list { display: grid; gap: 12px; }
.xh-admin-account-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; background: #151f2c; border: 1px solid #29394d; border-radius: 12px; }
.xh-admin-account-info { min-width: 0; }
.xh-admin-account-title { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.xh-admin-account-title strong { font-size: 16px; }
.xh-admin-status { padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.xh-admin-status.active { color: #7ff0b6; background: rgba(24, 165, 100, .16); }
.xh-admin-status.disabled { color: #ff9f9f; background: rgba(220, 68, 68, .15); }
.xh-admin-account-username, .xh-admin-account-meta { color: #8296ad; font-size: 13px; }
.xh-admin-permission-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.xh-admin-permission-tags span { padding: 3px 9px; color: #8bc8ff; background: #102c45; border: 1px solid #1f527b; border-radius: 999px; font-size: 12px; }
.xh-admin-loading, .xh-admin-empty, .xh-admin-error { padding: 42px 20px; text-align: center; color: #91a5bd; }
.xh-admin-error, .xh-admin-form-message.error { color: #ff8d8d; }
.xh-admin-account-form h3 { margin: 12px 0 22px; font-size: 20px; }
.xh-admin-account-form h4 { margin: 22px 0 12px; color: #bdcbe0; }
.xh-admin-back { padding: 0; border: 0; color: #72b9ff; background: transparent; cursor: pointer; }
.xh-admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.xh-admin-form-grid label { display: grid; gap: 8px; color: #aebdd0; font-size: 13px; }
.xh-admin-form-grid .xh-admin-password-field { grid-column: 1 / -1; }
.xh-admin-permission-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xh-admin-permission-option { display: flex; align-items: flex-start; gap: 10px; padding: 14px; background: #151f2c; border: 1px solid #2a3a4f; border-radius: 10px; cursor: pointer; }
.xh-admin-permission-option:has(input:checked) { border-color: #2789dd; background: #102b42; }
.xh-admin-permission-option input { margin-top: 3px; accent-color: #2698ef; }
.xh-admin-permission-option span { display: grid; gap: 5px; }
.xh-admin-permission-option small { color: #8296ad; line-height: 1.45; }
.xh-admin-active-toggle { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: #b7c6d9; }
.xh-admin-active-toggle input { accent-color: #2698ef; }
.xh-admin-form-message { min-height: 22px; margin-top: 14px; }
.xh-admin-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

@media (max-width: 720px) {
  .xh-admin-form-grid, .xh-admin-permission-options { grid-template-columns: 1fr; }
  .xh-admin-account-card { align-items: flex-start; flex-direction: column; }
}
