/* ============================================================
   PAGE: INVITATIONS (admin — who gets to fly)
   Glass panels on the shared .atmosphere--dusk backdrop, so it
   reads as part of the dashboard rather than a separate admin
   area.
   ============================================================ */

.invites-body {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.invites-body h2 {
  margin: 0 0 1rem;
  color: var(--color-white);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---- The invite form panel ---- */
.invite-panel,
.invite-list {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-2xl);
  padding: 1.75rem;
  box-shadow: 0 8px 40px rgba(5, 13, 46, 0.35);
}

.invite-list { margin-top: 1.5rem; }

.invite-form-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.invite-form-row input[type="email"] {
  flex: 1 1 16rem;
  min-width: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 0.8rem 1.25rem;
  color: var(--color-white);
  font-family: var(--font-family);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.invite-form-row input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.35); }

.invite-form-row input[type="email"]:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.14);
}

.invite-note {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
}

/* Errors sit on glass here rather than inside the darker auth card. */
.form-errors--light {
  background: rgba(255, 107, 107, 0.18);
  color: #ffe3e3;
}

/* ---- Invitation rows ---- */
.invite-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.invite-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.invite-row:first-child { border-top: none; padding-top: 0; }

.invite-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.invite-row-email {
  color: var(--color-white);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.invite-row-status {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

/* A spent or dead invitation recedes; a live one stays bright. */
.invite-row--claimed .invite-row-email,
.invite-row--expired .invite-row-email { color: rgba(255, 255, 255, 0.55); }

.invite-row--claimed .invite-row-email::before {
  content: "🎈 ";
}

.invite-row-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ---- Copyable invite link (the fallback when mail doesn't land) ---- */
.invite-link {
  width: 13rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 0.5rem 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-family);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out-soft), color 0.2s var(--ease-out-soft);
}

.invite-link:focus {
  border-color: var(--color-accent);
  color: var(--color-white);
}

/* Brief confirmation that the link is on the clipboard. */
.invite-link--copied {
  border-style: solid;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.invite-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 560px) {
  .invite-row { align-items: flex-start; }
  .invite-link { width: 100%; }
}
