/* admin/settings */
.invite-manager-page { padding: 1rem 1.1rem; }
.invite-manager-page fieldset,
.invite-signup-shell {
  margin: 0 0 1rem;
  border: 1px solid rgba(147,215,165,.12);
  border-radius: 6px;
  padding: 1rem;
  background: rgba(0,0,0,.08);
}
.invite-manager-page legend { padding: 0 .35rem; font-weight: 600; color: #edf3f7; }
.invite-create-form,.invite-validate-form,.invite-redeem-form,.invite-revoke-form { margin: 0; }
.invite-create-grid,.invite-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.invite-form-field { min-width: 0; }
.invite-form-field-full { grid-column: 1/-1; }
.invite-input-wrap { display: flex; align-items: stretch; width: 100%; }
.invite-input-wrap .form-control { min-width: 0; border-top-right-radius: 0!important; border-bottom-right-radius: 0!important; }
.invite-domain { display: inline-flex; align-items: center; padding: 0 .85rem; background: #192028; color: #aeb8c3; border: 1px solid rgba(147,215,165,.16); border-left: 0; border-radius: 0 4px 4px 0; white-space: nowrap; }
.invite-panel-actions { margin-top: .9rem; }
.invite-panel-hint { color: #aeb8c3; margin: .55rem 0 0; font-size: .88rem; }
.invite-table { width: 100%; }
.invite-table td,.invite-table th { padding: .75rem; vertical-align: top; }
.invite-table .invite-code,.invite-table .invite-status,.invite-table .invite-expiry,.invite-table .invite-used { white-space: nowrap; }
.invite-table .invite-link a { word-break: break-all; }
.invite-table .empty td { text-align: center; color: #aeb8c3; }

/* login trigger (always top-right) */
#layout-content.selected.no-navbar .invite-panel-anchor {
  position: fixed;
  top: 24px;
  right: 26px;
  z-index: 1200;
}

#layout-content.selected.no-navbar .invite-trigger-text {
  position: relative;
  display: inline-block;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  font-family: Roboto, sans-serif;
  color: #8be5a3;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  text-shadow: 0 0 8px rgba(96,234,140,.6), 0 0 20px rgba(65,180,91,.4), 0 0 40px rgba(52,170,78,.2);
}

#layout-content.selected.no-navbar .invite-trigger-text:hover {
  text-shadow: 0 0 10px rgba(96,234,140,.75), 0 0 24px rgba(65,180,91,.5), 0 0 46px rgba(52,170,78,.26);
}

#layout-content.selected.no-navbar .invite-particles {
  position: absolute;
  inset: -22px -28px;
  pointer-events: none;
}
#layout-content.selected.no-navbar .invite-particles .particle {
  position: absolute;
  border-radius: 999px;
  background: rgba(138,255,177,.7);
  box-shadow: 0 0 10px rgba(98,243,144,.7);
  animation: inviteFloat 5s ease-in-out infinite;
}
#layout-content.selected.no-navbar .invite-particles .p1 { width:4px;height:4px; top:0; left:8%; animation-delay:0s; }
#layout-content.selected.no-navbar .invite-particles .p2 { width:3px;height:3px; top:20%; right:0; animation-delay:.7s; }
#layout-content.selected.no-navbar .invite-particles .p3 { width:3px;height:3px; bottom:0; left:40%; animation-delay:1.5s; }
#layout-content.selected.no-navbar .invite-particles .p4 { width:2px;height:2px; top:40%; left:0; animation-delay:2.1s; }
#layout-content.selected.no-navbar .invite-particles .p5 { width:3px;height:3px; bottom:15%; right:18%; animation-delay:3s; }

@keyframes inviteFloat {
  0%,100% { transform: translate3d(0,0,0); opacity:.35; }
  50% { transform: translate3d(0,-6px,0); opacity:1; }
}

/* overlay panel hidden by default */
#layout-content.selected.no-navbar .invite-panel-inline { display: none; }

/* when open: hide login, show centered overlay */
#layout-content.selected.no-navbar.invite-open #logo,
#layout-content.selected.no-navbar.invite-open #login-form,
#layout-content.selected.no-navbar.invite-open #login-footer,
#layout-content.selected.no-navbar.invite-open .invite-trigger-text,
#layout-content.selected.no-navbar.invite-open .invite-particles {
  display: none !important;
}

#layout-content.selected.no-navbar.invite-open .invite-panel-inline {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1199;
  display: block;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #33414e;
  background: rgba(12, 17, 23, 0.96);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

#layout-content.selected.no-navbar .invite-panel-inline .invite-panel-glow { display: none; }
#layout-content.selected.no-navbar .invite-panel-inner { position: relative; }

#layout-content.selected.no-navbar .invite-panel-topline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: .35rem;
}
#layout-content.selected.no-navbar .invite-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #7fdc95;
}
#layout-content.selected.no-navbar .invite-close {
  border: 0;
  background: transparent;
  font-family: Roboto, sans-serif;
  color: #8f9ba8;
  font-size: .82rem;
  cursor: pointer;
}
#layout-content.selected.no-navbar .invite-close:hover { color: #c4cdd6; }

#layout-content.selected.no-navbar .invite-panel-title {
  margin: 0 0 .35rem;
  font-size: 1.12rem;
  font-weight: 600;
  color: #edf3f7;
}
#layout-content.selected.no-navbar .invite-panel-copy {
  margin: 0 0 .55rem;
  color: #9aa7b4;
  font-size: .8rem;
  line-height: 1.5;
}

#layout-content.selected.no-navbar .invite-validate-row .invite-form-field { margin-bottom: .65rem; }
#layout-content.selected.no-navbar .invite-validate-form .button,
#layout-content.selected.no-navbar .invite-redeem-form .button {
  width: 100%;
  height: 38px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .05em;
}

#layout-content.selected.no-navbar .invite-signup-shell {
  margin: .9rem 0 0;
  padding: .85rem 0 0;
  border: 0;
  border-top: 1px solid rgba(147,215,165,.12);
  border-radius: 0;
  background: transparent;
}
#layout-content.selected.no-navbar .invite-signup-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .75rem;
}
#layout-content.selected.no-navbar .invite-signup-badge {
  padding: .2rem .5rem;
  border-radius: 999px;
  background: rgba(35,132,63,.16);
  color: #8be5a3;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
#layout-content.selected.no-navbar .invite-signup-code {
  color: #dff8e5;
  font-size: .82rem;
  letter-spacing: .02em;
}
#layout-content.selected.no-navbar .invite-signup-shell .invite-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
}

@media(max-width:720px){
  .invite-create-grid,.invite-form-grid { grid-template-columns: 1fr; }
  #layout-content.selected.no-navbar .invite-panel-anchor {
    top: 14px;
    right: 14px;
  }
}

/* invited message glow + particles */
#layout-content.selected.no-navbar .invite-invited-copy {
  position: relative;
  text-align: center;
  color: #97f2b1 !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 8px rgba(122, 255, 171, 0.55),
    0 0 18px rgba(74, 198, 111, 0.35);
  margin: 0 0 1rem;
}

#layout-content.selected.no-navbar .invite-invited-copy::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 42px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(91, 220, 127, 0.28), rgba(91, 220, 127, 0) 70%);
  filter: blur(8px);
}

#layout-content.selected.no-navbar .invite-invited-copy::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 999px;
  pointer-events: none;
  background: rgba(150, 255, 188, 0.92);
  box-shadow:
    -95px -10px 0 0 rgba(127, 255, 175, 0.65),
    -62px 12px 0 0 rgba(127, 255, 175, 0.6),
    -20px -14px 0 0 rgba(127, 255, 175, 0.55),
    24px 14px 0 0 rgba(127, 255, 175, 0.6),
    66px -12px 0 0 rgba(127, 255, 175, 0.65),
    98px 8px 0 0 rgba(127, 255, 175, 0.55);
  animation: invitedParticlesPulse 2.8s ease-in-out infinite;
}

@keyframes invitedParticlesPulse {
  0%, 100% {
    opacity: 0.45;
    transform: translate(-50%, -50%) scale(0.96);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
  }
}

/* custom unique particles for invited message */
#layout-content.selected.no-navbar .invite-invited-copy {
  position: relative;
  text-align: center;
  color: #a8ffbf !important;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-shadow:
    0 0 10px rgba(126, 255, 179, 0.65),
    0 0 22px rgba(84, 215, 128, 0.42),
    0 0 42px rgba(52, 170, 98, 0.22);
  margin: 0 0 1rem;
  isolation: isolate;
}

#layout-content.selected.no-navbar .invite-invited-copy::before,
#layout-content.selected.no-navbar .invite-invited-copy::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

/* soft nebula glow */
#layout-content.selected.no-navbar .invite-invited-copy::before {
  width: 250px;
  height: 52px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 45%, rgba(129, 255, 173, 0.28), rgba(129, 255, 173, 0) 34%),
    radial-gradient(circle at 50% 50%, rgba(86, 220, 127, 0.24), rgba(86, 220, 127, 0) 54%),
    radial-gradient(circle at 82% 40%, rgba(112, 255, 166, 0.22), rgba(112, 255, 166, 0) 36%);
  filter: blur(9px);
  animation: srInviteNebula 3.8s ease-in-out infinite;
}

/* custom particle constellation */
#layout-content.selected.no-navbar .invite-invited-copy::after {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(172, 255, 206, 0.96);
  box-shadow:
    -116px -11px 0 0 rgba(152, 255, 196, .72),
    -92px 13px 0 0 rgba(132, 246, 177, .63),
    -58px -17px 0 0 rgba(126, 255, 180, .74),
    -27px 9px 0 0 rgba(108, 236, 160, .66),
    11px -15px 0 0 rgba(154, 255, 198, .70),
    36px 14px 0 0 rgba(121, 240, 168, .64),
    67px -12px 0 0 rgba(163, 255, 203, .69),
    93px 10px 0 0 rgba(118, 228, 157, .62),
    118px -8px 0 0 rgba(151, 255, 194, .68);
  animation: srInviteDrift 4.9s cubic-bezier(.42,0,.58,1) infinite;
}

@keyframes srInviteNebula {
  0%, 100% {
    opacity: .72;
    transform: translate(-50%, -50%) scale(0.97);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes srInviteDrift {
  0%, 100% {
    opacity: .5;
    transform: translate(-50%, -50%) rotate(-1deg) scale(.96);
  }
  25% {
    opacity: .95;
    transform: translate(calc(-50% + 2px), calc(-50% - 2px)) rotate(.8deg) scale(1.03);
  }
  50% {
    opacity: .7;
    transform: translate(calc(-50% - 1px), calc(-50% + 1px)) rotate(-.6deg) scale(1.06);
  }
  75% {
    opacity: 1;
    transform: translate(calc(-50% + 1px), calc(-50% - 1px)) rotate(.6deg) scale(1.01);
  }
}


/* invited text: glow only (no particles) */
#layout-content.selected.no-navbar .invite-invited-copy {
  position: relative;
  text-align: center;
  color: #9ef6b8 !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 8px rgba(126, 255, 179, 0.55),
    0 0 18px rgba(84, 215, 128, 0.35),
    0 0 34px rgba(52, 170, 98, 0.2);
}

#layout-content.selected.no-navbar .invite-invited-copy::before,
#layout-content.selected.no-navbar .invite-invited-copy::after {
  content: none !important;
  animation: none !important;
  box-shadow: none !important;
  background: none !important;
}

/* Redeem trigger: match invited-text glow (no flat button look) */
#layout-content.selected.no-navbar .invite-trigger-text {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  font-family: Roboto, sans-serif !important;
  color: #9ef6b8 !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  text-shadow:
    0 0 8px rgba(126, 255, 179, 0.55),
    0 0 18px rgba(84, 215, 128, 0.35),
    0 0 34px rgba(52, 170, 98, 0.2) !important;
}

#layout-content.selected.no-navbar .invite-trigger-text::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 34px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(91, 220, 127, 0.22), rgba(91, 220, 127, 0) 70%);
  filter: blur(7px);
  z-index: -1;
}

#layout-content.selected.no-navbar .invite-trigger-text:hover {
  text-shadow:
    0 0 10px rgba(126, 255, 179, 0.65),
    0 0 22px rgba(84, 215, 128, 0.45),
    0 0 40px rgba(52, 170, 98, 0.3) !important;
}
