body.invitation-admin {
  margin: 0;
  background: #121925;
  color: #e8edf4;
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.5;
}
.invitation-admin > main {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 30px 24px 48px !important;
}
.invitation-admin main > a {
  display: none;
}
.invitation-admin main > .card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0;
}
.invitation-admin h1 {
  font-size: 30px;
  margin: 0;
}
.invitation-admin #intro {
  color: #a3afc0;
  margin: 4px 230px 24px 0;
}
.invitation-admin #content {
  position: relative;
}
.invitation-admin button,
.invitation-admin select,
.admin-dialog button {
  font: inherit;
  color: #e8edf4;
  background: transparent;
  border: 1px solid #2c3849;
  border-radius: 10px;
  padding: 9px 13px;
  cursor: pointer;
}
.invitation-admin button:hover,
.admin-dialog button:hover {
  background: #26354a;
}
.invitation-admin button:disabled,
.admin-dialog button:disabled {
  opacity: 0.5;
  cursor: default;
}
.invitation-admin button:focus-visible,
.invitation-admin summary:focus-visible,
.admin-dialog button:focus-visible {
  outline: 2px solid #5ea8f2;
  outline-offset: 3px;
}
.invitation-admin button.primary,
.admin-dialog button.primary {
  background: #2470c8;
  border-color: #2470c8;
  color: white;
  font-weight: 600;
}
.invitation-admin button.danger,
.admin-dialog button.danger {
  color: #ff8e86;
}
.invitation-admin [hidden] {
  display: none !important;
}
.admin-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 32px;
  background: #0f1621;
  border-bottom: 1px solid #222d3f;
}
.admin-header a {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #7dbbf7;
  text-decoration: none;
}
.admin-header a:first-child {
  color: #e8edf4;
  font-size: 16px;
}
.admin-spacer {
  flex: 1;
}
.invitation-admin .admin-create {
  position: absolute;
  right: 0;
  top: -72px;
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.admin-metrics > div {
  padding: 16px 18px;
  border-radius: 18px;
  background: #1b2433;
  border: 1px solid #2c3849;
  display: grid;
  gap: 4px;
}
.admin-metrics span,
.admin-muted {
  color: #a3afc0;
}
.admin-metrics strong {
  font-family: monospace;
  font-size: 28px;
}
.admin-metrics small,
.invitation-admin td small {
  color: #8794a6;
  display: block;
}
.admin-amber {
  color: #f0b44c;
}
.admin-green {
  color: #8fddb0;
}
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #263243;
  margin-bottom: 22px;
}
.invitation-admin .admin-tabs button {
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  color: #a3afc0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.invitation-admin .admin-tabs [aria-selected='true'] {
  color: white;
  border-bottom-color: #5ea8f2;
  font-weight: 600;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #222d3f;
  color: #a3afc0;
  font-size: 12px;
  font-weight: 600;
}
.admin-badge.amber {
  background: #2a2214;
  color: #f0b44c;
}
.admin-badge.green {
  background: #1e3a2c;
  color: #8fddb0;
}
.admin-badge.blue {
  background: #1f3550;
  color: #a9d2fa;
}
.admin-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.invitation-admin input[type='search'],
.admin-dialog input:not([type='radio']),
.admin-dialog textarea {
  font: inherit;
  background: #151d2a;
  border: 1px solid #2c3849;
  color: #e8edf4;
  padding: 12px;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}
.invitation-admin input[type='search'] {
  width: 345px;
  max-width: 100%;
}
.invitation-admin .admin-toolbar button {
  border-radius: 999px;
  padding: 7px 12px;
}
.invitation-admin .admin-toolbar [aria-pressed='true'] {
  background: #1f3550;
  border-color: #3c6fa3;
  color: #cfe4fa;
}
.admin-bulk {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #3c6fa3;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 22px;
  background: #182435;
}
.admin-requests,
.admin-table-wrap {
  border: 1px solid #2c3849;
  border-radius: 18px;
  background: #1b2433;
}
.admin-request {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid #263243;
}
.admin-request:last-child {
  border-bottom: 0;
}
.admin-request > input {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 10px;
  accent-color: #2470c8;
}
.admin-request-main {
  flex: 1;
  min-width: 0;
}
.admin-request-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-request-heading > small {
  margin-left: auto;
  color: #8794a6;
}
.admin-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.admin-person > div {
  min-width: 0;
}
.admin-person strong,
.admin-person small {
  display: block;
  overflow-wrap: anywhere;
}
.admin-person small {
  color: #a3afc0;
}
.admin-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #305b88;
  color: white;
  font-weight: 600;
}
.admin-request:nth-child(3n + 2) .admin-avatar {
  background: #38664b;
}
.admin-request:nth-child(3n + 3) .admin-avatar {
  background: #63517d;
}
.admin-request blockquote,
.admin-source blockquote {
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 3px solid #3c6fa3;
  border-radius: 10px;
  background: #151d2a;
  color: #c9d3e0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-table-wrap {
  overflow-x: auto;
}
.invitation-admin table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
.invitation-admin th {
  padding: 14px 20px;
  color: #8794a6;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  text-transform: uppercase;
}
.invitation-admin td {
  padding: 18px 20px;
  border-top: 1px solid #263243;
}
.invitation-admin th.admin-action-heading {
  text-align: right;
}
.admin-menu {
  position: relative;
}
.admin-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 12px;
  border: 1px solid #2c3849;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1.2;
}
.admin-menu summary::-webkit-details-marker {
  display: none;
}
.admin-menu > div {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  z-index: 5;
  min-width: 230px;
  padding: 7px;
  background: #222d3f;
  border: 1px solid #3a4a62;
  border-radius: 12px;
  box-shadow: 0 15px 30px #0008;
}
.admin-menu > div button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
}
.admin-history {
  margin-top: 22px;
  background: #1b2433;
  border: 1px solid #2c3849;
  border-radius: 14px;
}
.admin-history > summary {
  padding: 18px;
  cursor: pointer;
  color: #a3afc0;
}
.admin-history .admin-table-wrap {
  border: 0;
  border-radius: 0;
}
.admin-note {
  margin-top: 32px;
  padding: 18px;
  background: #151d2a;
  border: 1px solid #2c3849;
  border-radius: 14px;
  color: #a3afc0;
}
.admin-note strong {
  color: #e8edf4;
}
.admin-empty {
  padding: 26px;
  color: #a3afc0;
}
.admin-dialog {
  color: #e8edf4;
  background: #1b2433;
  border: 1px solid #2c3849;
  border-radius: 22px;
  padding: 0;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  box-shadow: 0 30px 80px #0008;
}
.admin-dialog::backdrop {
  background: #080d16cc;
}
.admin-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #263243;
}
.admin-dialog h2 {
  margin: 0;
  font-size: 24px;
}
.admin-dialog-body {
  padding: 24px;
}
.admin-dialog footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 24px;
  border-top: 1px solid #263243;
}
.admin-dialog-message {
  margin: 0;
  padding: 0 24px 20px;
}
.admin-dialog-message:empty {
  display: none;
}
.admin-invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.admin-dialog form {
  display: grid;
  gap: 18px;
}
.admin-dialog label {
  display: grid;
  gap: 8px;
  color: #a3afc0;
}
.admin-dialog fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.admin-dialog legend {
  color: #a3afc0;
  margin-bottom: 8px;
}
.admin-validity {
  display: flex;
  gap: 8px;
}
.admin-validity label {
  flex: 1;
  position: relative;
}
.admin-validity input {
  position: absolute;
  opacity: 0;
}
.admin-validity span {
  padding: 10px;
  text-align: center;
  border: 1px solid #2c3849;
  border-radius: 10px;
}
.admin-validity input:checked + span {
  border-color: #5ea8f2;
  background: #1f3550;
  color: white;
}
.admin-validity input:focus-visible + span {
  outline: 2px solid #5ea8f2;
}
.admin-source {
  padding: 14px;
  border: 1px solid #2c3849;
  border-radius: 14px;
  background: #151d2a;
}
.admin-email-preview {
  padding: 22px;
  border-radius: 16px;
  background: #f3f4f6;
  color: #121925;
  overflow-wrap: anywhere;
}
.admin-email-preview strong {
  display: block;
  font-size: 18px;
}
.admin-email-preview small {
  color: #6b7280;
}
.admin-email-button {
  display: inline-block;
  background: #2470c8;
  color: white;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600;
}
.admin-personal-line {
  white-space: pre-wrap;
}
@media (max-width: 800px) {
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .invitation-admin .admin-create {
    position: static;
    margin-bottom: 20px;
  }
  .invitation-admin #intro {
    margin-right: 0;
  }
  .admin-invite-grid {
    grid-template-columns: 1fr;
  }
  .admin-header {
    padding: 12px 16px;
    gap: 8px;
  }
  .admin-header a:first-child strong {
    display: none;
  }
  .admin-header > .admin-avatar {
    display: none;
  }
  .invitation-admin > main {
    padding: 24px 16px !important;
  }
  .admin-bulk {
    flex-wrap: wrap;
  }
  .admin-request {
    padding: 14px;
    gap: 10px;
  }
  .admin-request-heading > small {
    margin-left: 0;
    width: 100%;
  }
  .admin-tabs {
    overflow-x: auto;
  }
  .invitation-admin .admin-tabs button {
    padding: 10px;
  }
  .admin-dialog-body {
    padding: 18px;
  }
}

/* The same management view can live inside the profile/settings dialog shell. */
.invitation-management-dialog {
  width: min(1248px, calc(100vw - 48px));
  max-width: 1248px;
}
.invitation-admin-embedded {
  color: #e8edf4;
  font-size: 14px;
  line-height: 1.5;
  background: #121925;
  padding: 18px;
  border-radius: 14px;
}
.invitation-admin-embedded > [data-invitation-admin-content] {
  position: relative;
}
.invitation-admin.invitation-admin-embedded .admin-create {
  position: static;
  display: block;
  margin: 0 0 20px auto;
}
.invitation-management-dialog .dialog-footer {
  justify-content: flex-end;
}
@media (max-width: 600px) {
  .invitation-management-dialog {
    width: 100vw;
    max-width: 100vw;
  }
  .invitation-management-dialog .dialog-body {
    padding: 12px;
  }
  .invitation-admin-embedded {
    padding: 12px;
  }
}

.admin-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
  color: #a3afc0;
}
.admin-history .admin-pagination {
  padding: 16px;
}
.admin-resend-note {
  margin-top: 2.5em;
}
.admin-email-preview a {
  color: #2470c8;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .admin-pagination small {
    flex-basis: 100%;
  }
}

.admin-email-preview > strong {
  margin-bottom: 20px;
}
