/* Incremental polish: retain the existing surfaces, density and 800px layout. */
.admin-modal-root { grid-template-columns: minmax(0, 1fr); }
.admin-modal-root .admin-modal-card {
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 32px) !important;
  overflow: auto;
  box-sizing: border-box;
  justify-self: center;
  overflow-wrap: anywhere;
}
.admin-modal-card h3 { padding-right: 32px; position: relative; }
.admin-modal-close { position: absolute; top: -4px; right: 0; width: 30px; height: 30px; padding: 0; font-size: 20px; }
.admin-action-label { margin: 10px 0 0; font-size: 11px; text-transform: uppercase; }
.admin-action-group { display: flex; gap: 6px; flex-wrap: wrap; }
#actionOutput {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; max-height: 220px; overflow: auto; font-size: 12px; white-space: pre-wrap;
}
.admin-heading { margin-top: 20px; }
.admin-heading h1 { font-size: 28px; }
.admin-heading .page-kicker, .admin-heading p:last-child { display: none; }
#reportsTable td:first-child { white-space: nowrap; }
#reportsTable td:nth-child(5) { min-width: 220px; }
#reportsTable td:last-child { min-width: 150px; }
#reportsTable td:last-child button { margin-bottom: 4px; }
.admin-page .link-btn, #serverSettingsRoot .link-btn {
  display: inline; width: auto; min-height: 0; padding: 0; border: 0;
  background: transparent; color: var(--accent); font: inherit; text-align: left;
}
.admin-page .link-btn:hover, #serverSettingsRoot .link-btn:hover { text-decoration: underline; }
#serverSettingsRoot .timeout-chip { color: var(--warn); border-color: var(--warn); gap: 4px; margin-top: 4px; }
#serverSettingsRoot .icon-row { align-items: center; }
#serverSettingsRoot .invite-row button { min-height: 40px; }
#serverSettingsRoot .invite-row input { min-width: 0; }
#serverSettingsRoot .settings-search-field:has(input.initial-focus-quiet),
#serverSettingsRoot .settings-search-field:has(input:focus:not(:focus-visible)) { border-color: var(--border); }
.profile-pop .pp-note-input { border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; max-height: 120px; }
.profile-pop .pp-note-input:hover { border-color: var(--border); }
.profile-pop .pp-note-input:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.profile-pop .pp-close { border-radius: 8px; background: rgba(0,0,0,.4); }
.profile-pop .pp-close:hover { background: rgba(0,0,0,.6); }
.msg.sys-join-part { height: 0; min-height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; }
.msg.sys-join-part > * { visibility: hidden; }
.report-reasons { border: 0; padding: 0; margin: 12px 0; }
.report-reasons input { width: auto; }
.report-reasons .check-row { min-height: 36px; }
@media (max-width: 800px) {
  .admin-page .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-page .stat .n { font-size: 20px; }
  #serverSettingsRoot .invite-row { flex-wrap: wrap; }
  #serverSettingsRoot .invite-row input { flex: 1 1 100% !important; }
}
