:root {
  --bg: #020617;
  --bg-soft: #030712;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --panel-border: rgba(0, 217, 255, 0.22);
  --border-soft: rgba(148, 163, 184, 0.14);
  --text: #f8fafc;
  --muted: #9ca8ba;
  --muted-2: #64748b;
  --cyan: #00d9ff;
  --blue: #2f80ff;
  --purple: #8a3ffc;
  --pink: #d946ef;
  --green: #22c55e;
  --yellow: #facc15;
  --red: #ef4444;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 10%, rgba(0, 217, 255, 0.18), transparent 32%),
    radial-gradient(circle at 84% 16%, rgba(138, 63, 252, 0.22), transparent 30%),
    linear-gradient(180deg, #020617 0%, #030712 52%, #020617 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 217, 255, 0.04), transparent 30%, rgba(138, 63, 252, 0.05)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.04), transparent 28%);
  z-index: -5;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  position: relative;
  min-height: 100vh;
}

.background-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.19;
  background-image:
    linear-gradient(rgba(0, 217, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.09) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  z-index: -4;
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background: repeating-linear-gradient(
    to bottom,
    #ffffff 0,
    #ffffff 1px,
    transparent 1px,
    transparent 5px
  );
  z-index: -1;
}

.glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.25;
  pointer-events: none;
  z-index: -3;
}

.glow-cyan {
  top: 140px;
  left: -160px;
  background: var(--cyan);
}

.glow-purple {
  top: 160px;
  right: -160px;
  background: var(--purple);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.brand-mark,
.core-emblem,
.guild-fallback,
.preview-avatar,
.server-icon {
  display: grid;
  place-items: center;
  color: white;
  background:
    linear-gradient(135deg, var(--cyan), var(--blue) 45%, var(--purple)),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.8), transparent 35%);
  box-shadow:
    0 0 28px rgba(0, 217, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a {
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.auth-area {
  display: flex;
  justify-content: flex-end;
}

.button {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 12px 18px;
  border-radius: 15px;
  font-weight: 900;
  line-height: 1;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue) 42%, var(--purple));
  box-shadow: 0 0 34px rgba(0, 217, 255, 0.25);
}

.button-secondary,
.button-ghost {
  color: var(--text);
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.72);
}

.button-ghost {
  border-color: rgba(0, 217, 255, 0.22);
}

.full-width {
  width: 100%;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(0, 217, 255, 0.18);
}

.user-pill img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.hero {
  width: min(1240px, calc(100% - 32px));
  margin: 42px auto 0;
  min-height: 710px;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 54px;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.status-pill,
.panel-chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 217, 255, 0.22);
  background: rgba(0, 217, 255, 0.08);
  color: #bff6ff;
  font-size: 0.82rem;
  font-weight: 900;
}

.status-pill {
  padding: 8px 12px;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 20px var(--green);
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-weight: 950;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 850px;
  margin: 14px 0 20px;
  font-size: clamp(3.5rem, 8.4vw, 7.4rem);
  line-height: 0.88;
  letter-spacing: -0.095em;
}

.hero-text {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-stats {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 680px;
}

.hero-stats div,
.logo-strip,
.feature-card,
.dashboard-preview-card,
.command-card,
.roadmap-item,
.cta-section,
.panel,
.dashboard-hero,
.core-card,
.dashboard-status-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.hero-stats div {
  padding: 18px;
  border-radius: 22px;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-size: 1.15rem;
}

.hero-stats span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}

.orbital-ring {
  position: absolute;
  width: min(440px, 80vw);
  height: min(440px, 80vw);
  border-radius: 999px;
  background:
    conic-gradient(from 40deg, var(--cyan), transparent 18%, transparent 26%, var(--purple), transparent 48%, transparent 56%, var(--cyan), transparent 78%);
  filter: drop-shadow(0 0 30px rgba(0, 217, 255, 0.26));
  opacity: 0.9;
}

.orbital-ring::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  background: var(--bg);
}

.core-emblem {
  position: relative;
  z-index: 2;
  width: 170px;
  height: 170px;
  border-radius: 44px;
  transform: rotate(45deg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.core-emblem span {
  transform: rotate(-45deg);
  font-size: 6rem;
  font-weight: 950;
  letter-spacing: -0.12em;
}

.core-card {
  position: absolute;
  z-index: 4;
  width: min(430px, 92vw);
  bottom: 26px;
  border-radius: 30px;
  padding: 22px;
}

.card-topline,
.preview-header,
.panel-title-row,
.guild-card,
.module-card-top,
.server-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.card-topline {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.online {
  color: #b8f7cf;
}

.module-grid-mini {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.module-grid-mini div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.module-grid-mini span {
  display: block;
  color: var(--muted);
  margin-top: 7px;
  font-size: 0.86rem;
}

.system-meter {
  margin-top: 18px;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.system-meter span {
  display: block;
  width: 78%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 24px rgba(0, 217, 255, 0.28);
}

.logo-strip {
  width: min(1240px, calc(100% - 32px));
  margin: 20px auto 0;
  padding: 18px;
  border-radius: 24px;
  display: flex;
  justify-content: space-around;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 900;
}

.section {
  width: min(1240px, calc(100% - 32px));
  margin: 100px auto 0;
}

.section-heading {
  max-width: 820px;
}

.section h2,
.dashboard-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(2.2rem, 4.2vw, 4.25rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.section-heading p,
.split-section p,
.cta-section p,
.dashboard-hero p,
.panel-title-row p {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

.feature-grid,
.command-grid,
.module-list {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card,
.command-card,
.module-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 24px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.feature-card::before,
.command-card::before,
.module-card::before,
.panel::before,
.dashboard-preview-card::before,
.cta-section::before,
.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.13), transparent 45%, rgba(138, 63, 252, 0.14));
  pointer-events: none;
}

.feature-card:hover,
.command-card:hover,
.module-card:hover,
.guild-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 217, 255, 0.45);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.16);
  margin-bottom: 18px;
}

.feature-card h3,
.command-card h3,
.module-card h3 {
  margin: 0 0 10px;
  font-size: 1.28rem;
}

.feature-card p,
.command-card p,
.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.split-section {
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  gap: 42px;
  align-items: center;
}

.check-list {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.check-list div {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbeafe;
  font-weight: 800;
}

.check-list span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.dashboard-preview-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 26px;
}

.preview-header {
  margin-bottom: 24px;
}

.preview-header strong,
.preview-header span {
  display: block;
}

.preview-header span {
  color: var(--muted);
  margin-top: 4px;
}

.preview-avatar,
.server-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-weight: 950;
}

.preview-server {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.preview-server strong,
.preview-server span {
  display: block;
}

.preview-server span {
  color: var(--muted);
  margin-top: 3px;
}

.preview-server button {
  border: 0;
  padding: 10px 13px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  font-weight: 900;
}

.preview-modules {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.preview-modules div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-weight: 800;
}

.command-card code {
  display: inline-flex;
  color: var(--cyan);
  font-size: 1.2rem;
  font-weight: 950;
  margin-bottom: 12px;
}

.command-card span {
  margin-top: 18px;
  display: inline-flex;
  color: #dbeafe;
  background: rgba(0, 217, 255, 0.09);
  border: 1px solid rgba(0, 217, 255, 0.18);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.roadmap {
  margin-top: 32px;
  display: grid;
  gap: 16px;
}

.roadmap-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 22px;
  border-radius: 26px;
}

.roadmap-item > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--muted);
  font-weight: 950;
}

.roadmap-item.done > span {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.26);
}

.roadmap-item.active > span {
  color: #bff6ff;
  border-color: rgba(0, 217, 255, 0.36);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.14);
}

.roadmap-item h3,
.roadmap-item p {
  margin: 0;
}

.roadmap-item p {
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.6;
}

.cta-section {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  margin-bottom: 80px;
}

.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 36px;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.footer div {
  display: flex;
  gap: 20px;
}

/* Dashboard */

.dashboard-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 42px auto 90px;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
}

.dashboard-hero h1 {
  max-width: 850px;
}

.dashboard-status-card {
  min-width: 220px;
  border-radius: 26px;
  padding: 20px;
  display: grid;
  gap: 8px;
}

.dashboard-status-card strong,
.dashboard-status-card small {
  display: block;
}

.dashboard-status-card small {
  color: var(--muted);
}

.dashboard-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 22px;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 24px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.account-profile {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.account-profile img {
  width: 68px;
  height: 68px;
  border-radius: 22px;
}

.account-profile strong,
.account-profile span,
.account-profile small {
  display: block;
}

.account-profile span,
.account-profile small {
  color: var(--muted);
  margin-top: 4px;
}

.account-stat-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.account-stat-grid div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.account-stat-grid strong,
.account-stat-grid span {
  display: block;
}

.account-stat-grid strong {
  font-size: 1.6rem;
}

.account-stat-grid span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.86rem;
}

.quick-actions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.panel-title-row {
  align-items: flex-start;
  margin-bottom: 20px;
}

.server-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.server-tools input,
.server-tools select {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.52);
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

.server-tools input:focus,
.server-tools select:focus {
  border-color: rgba(0, 217, 255, 0.5);
}

.guild-list {
  display: grid;
  gap: 13px;
}

.guild-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.guild-main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.guild-main img,
.guild-fallback {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  flex: 0 0 auto;
  font-weight: 950;
}

.guild-fallback.huge {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  font-size: 2rem;
}

.guild-main strong,
.guild-main span {
  display: block;
}

.guild-main strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guild-main span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.92rem;
}

.guild-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  padding: 7px 10px;
  white-space: nowrap;
}

.badge-online {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.24);
}

.badge-warning {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.24);
}

.badge-muted {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.16);
}

.loading-box,
.empty-state {
  color: var(--muted);
  padding: 20px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.empty-state p {
  margin: 0 0 16px;
  line-height: 1.6;
}

/* Server Page */

.server-hero-main {
  justify-content: flex-start;
}

.server-hero-icon img {
  width: 92px;
  height: 92px;
  border-radius: 28px;
}

.module-panel {
  margin-top: 22px;
}

.module-card {
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.module-card button {
  margin-top: 20px;
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.74);
  color: var(--muted);
  border-radius: 14px;
  font-weight: 900;
}

/* Responsive */

@media (max-width: 980px) {
  .topbar {
    position: relative;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .auth-area {
    justify-content: center;
  }

  .hero,
  .split-section,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 520px;
  }

  .feature-grid,
  .command-grid,
  .module-list {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .cta-section,
  .panel-title-row,
  .guild-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .server-tools {
    width: 100%;
    flex-direction: column;
  }

  .server-tools input,
  .server-tools select {
    width: 100%;
  }

  .guild-actions {
    width: 100%;
    justify-content: space-between;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 5.4rem);
  }
}

@media (max-width: 620px) {
  .hero-stats,
  .module-grid-mini,
  .preview-modules,
  .account-stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .cta-actions,
  .guild-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .core-emblem {
    width: 140px;
    height: 140px;
  }

  .core-emblem span {
    font-size: 5rem;
  }
}



/* Official Modulr brand assets */
.brand-mark {
  background: url("/assets/modulr-logo.png") center / cover no-repeat !important;
  color: transparent !important;
  text-indent: -9999px;
  overflow: hidden;
  border: 1px solid rgba(0, 217, 255, 0.24);
}

.core-emblem {
  background: url("/assets/modulr-logo.png") center / cover no-repeat !important;
  transform: none !important;
  border-radius: 48px !important;
  border: 1px solid rgba(0, 217, 255, 0.28);
  box-shadow:
    0 0 50px rgba(0, 217, 255, 0.22),
    0 0 90px rgba(138, 63, 252, 0.18) !important;
}

.core-emblem span {
  display: none !important;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 44px;
  padding: 28px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.46) 100%),
    url("/assets/modulr-banner.webp") center / cover no-repeat;
  opacity: 0.42;
  z-index: 0;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 43px;
  border: 1px solid rgba(0, 217, 255, 0.14);
  pointer-events: none;
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.dashboard-hero {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.78)),
    url("/assets/modulr-banner.webp") center / cover no-repeat !important;
}

.footer::before {
  content: "";
  display: block;
  width: 44px;
  height: 44px;
  background: url("/assets/modulr-logo.png") center / cover no-repeat;
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(0, 217, 255, 0.22);
}


/* Modulr Circuit Board Background */

.site-shell {
  position: relative;
  isolation: isolate;
}

.circuit-board-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -6;
  opacity: 1;
}

.circuit-board-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 217, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(138, 63, 252, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.35;
}

.circuit-board-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(0, 217, 255, 0.06), transparent 18%),
    radial-gradient(circle at 78% 22%, rgba(138, 63, 252, 0.07), transparent 20%),
    radial-gradient(circle at 35% 74%, rgba(47, 128, 255, 0.05), transparent 22%);
}

.circuit-chip {
  position: absolute;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(8, 16, 38, 0.82), rgba(3, 8, 24, 0.65));
  border: 1px solid rgba(0, 217, 255, 0.10);
  box-shadow:
    0 0 40px rgba(0, 217, 255, 0.05),
    inset 0 0 20px rgba(138, 63, 252, 0.05);
}

.chip-a {
  top: 14%;
  right: 8%;
  width: 220px;
  height: 140px;
  transform: rotate(6deg);
}

.chip-b {
  bottom: 12%;
  left: 7%;
  width: 260px;
  height: 160px;
  transform: rotate(-5deg);
}

.trace {
  position: absolute;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.07), rgba(138, 63, 252, 0.07));
  box-shadow: 0 0 18px rgba(0, 217, 255, 0.04);
}

.trace-h {
  height: 2px;
  width: 38%;
}

.trace-v {
  width: 2px;
  height: 34%;
  background: linear-gradient(180deg, rgba(0, 217, 255, 0.07), rgba(138, 63, 252, 0.07));
}

.trace-h1 { top: 18%; left: -4%; }
.trace-h2 { top: 34%; right: -2%; width: 44%; }
.trace-h3 { bottom: 28%; left: 6%; width: 42%; }
.trace-h4 { bottom: 14%; right: 3%; width: 36%; }

.trace-v1 { left: 18%; top: 8%; }
.trace-v2 { left: 74%; top: 18%; height: 42%; }
.trace-v3 { right: 12%; bottom: 8%; height: 34%; }
.trace-v4 { left: 48%; bottom: 10%; height: 24%; }

.pulse {
  position: absolute;
  display: block;
  border-radius: inherit;
  filter: blur(0.4px);
  opacity: 0;
}

.trace-h .pulse {
  top: -1px;
  width: 90px;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.95), rgba(138, 63, 252, 0.95), transparent);
  box-shadow:
    0 0 10px rgba(0, 217, 255, 0.8),
    0 0 18px rgba(138, 63, 252, 0.45);
}

.trace-v .pulse {
  left: -1px;
  width: 4px;
  height: 90px;
  background: linear-gradient(180deg, transparent, rgba(0, 217, 255, 0.95), rgba(138, 63, 252, 0.95), transparent);
  box-shadow:
    0 0 10px rgba(0, 217, 255, 0.8),
    0 0 18px rgba(138, 63, 252, 0.45);
}

.pulse-1 { animation: pulseRight 7.5s linear infinite; animation-delay: 0.2s; }
.pulse-2 { animation: pulseLeft 9s linear infinite; animation-delay: 1.5s; }
.pulse-3 { animation: pulseRight 8.5s linear infinite; animation-delay: 2.8s; }
.pulse-4 { animation: pulseLeft 10s linear infinite; animation-delay: 0.8s; }

.pulse-v1 { animation: pulseDown 8s linear infinite; animation-delay: 1.2s; }
.pulse-v2 { animation: pulseUp 9.5s linear infinite; animation-delay: 2.4s; }
.pulse-v3 { animation: pulseDown 11s linear infinite; animation-delay: 0.5s; }
.pulse-v4 { animation: pulseUp 7.8s linear infinite; animation-delay: 3.1s; }

@keyframes pulseRight {
  0%   { transform: translateX(-120px); opacity: 0; }
  8%   { opacity: 1; }
  45%  { opacity: 1; }
  60%  { opacity: 0.85; }
  100% { transform: translateX(1200px); opacity: 0; }
}

@keyframes pulseLeft {
  0%   { transform: translateX(1200px); opacity: 0; }
  8%   { opacity: 1; }
  45%  { opacity: 1; }
  60%  { opacity: 0.85; }
  100% { transform: translateX(-120px); opacity: 0; }
}

@keyframes pulseDown {
  0%   { transform: translateY(-120px); opacity: 0; }
  8%   { opacity: 1; }
  45%  { opacity: 1; }
  60%  { opacity: 0.85; }
  100% { transform: translateY(1200px); opacity: 0; }
}

@keyframes pulseUp {
  0%   { transform: translateY(1200px); opacity: 0; }
  8%   { opacity: 1; }
  45%  { opacity: 1; }
  60%  { opacity: 0.85; }
  100% { transform: translateY(-120px); opacity: 0; }
}

.circuit-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow:
    0 0 10px rgba(0, 217, 255, 0.65),
    0 0 20px rgba(138, 63, 252, 0.35);
  opacity: 0.55;
}

.node-1 { top: 18%; left: 20%; }
.node-2 { top: 34%; right: 24%; }
.node-3 { top: 26%; right: 11%; }
.node-4 { bottom: 28%; left: 32%; }
.node-5 { bottom: 14%; right: 18%; }
.node-6 { bottom: 21%; left: 48%; }
.node-7 { top: 44%; left: 18%; }
.node-8 { bottom: 36%; right: 8%; }

@media (max-width: 980px) {
  .circuit-chip {
    opacity: 0.55;
    transform: none;
  }

  .chip-a {
    width: 160px;
    height: 100px;
    top: 10%;
    right: 2%;
  }

  .chip-b {
    width: 180px;
    height: 110px;
    bottom: 10%;
    left: 2%;
  }

  .trace-h {
    width: 52%;
  }

  .trace-v {
    height: 28%;
  }
}

@media (max-width: 620px) {
  .circuit-board-bg {
    opacity: 0.75;
  }

  .trace-h1,
  .trace-h4,
  .trace-v3,
  .trace-v4,
  .chip-b,
  .node-7,
  .node-8 {
    display: none;
  }
}



/* Professional Circuit Background Refinement */

.circuit-board-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -6;
  opacity: 1;
  isolation: isolate;
}

.circuit-board-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(0, 217, 255, 0.09), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(138, 63, 252, 0.10), transparent 24%),
    radial-gradient(circle at 52% 75%, rgba(47, 128, 255, 0.07), transparent 30%),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    auto,
    120px 120px,
    120px 120px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.95), rgba(0,0,0,0.7) 60%, transparent 100%);
  opacity: 0.6;
}

.circuit-board-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(0, 217, 255, 0.035) 20%, transparent 35%, transparent 65%, rgba(138, 63, 252, 0.04) 82%, transparent 100%);
  animation: bgSheen 14s linear infinite;
  opacity: 0.7;
}

@keyframes bgSheen {
  0%   { transform: translateX(-10%); opacity: 0.25; }
  50%  { opacity: 0.55; }
  100% { transform: translateX(10%); opacity: 0.25; }
}

.circuit-chip {
  position: absolute;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(8, 14, 32, 0.55), rgba(3, 8, 22, 0.25));
  border: 1px solid rgba(0, 217, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(138, 63, 252, 0.04) inset,
    0 0 45px rgba(0, 217, 255, 0.04);
  opacity: 0.5;
}

.circuit-chip::before,
.circuit-chip::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.025);
}

.circuit-chip::after {
  inset: auto 16px -10px 16px;
  top: auto;
  height: 10px;
  border: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0,217,255,0.10) 0 2px,
      transparent 2px 12px
    );
  opacity: 0.25;
}

.chip-a {
  top: 12%;
  right: 7%;
  width: 240px;
  height: 150px;
  transform: rotate(5deg);
}

.chip-b {
  bottom: 10%;
  left: 6%;
  width: 280px;
  height: 170px;
  transform: rotate(-4deg);
}

.trace {
  position: absolute;
  overflow: hidden;
  border-radius: 999px;
  opacity: 0.9;
}

.trace-h {
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 217, 255, 0.16), rgba(138, 63, 252, 0.14));
  box-shadow:
    0 0 10px rgba(0, 217, 255, 0.07),
    0 0 20px rgba(138, 63, 252, 0.04);
}

.trace-v {
  width: 1px;
  background: linear-gradient(180deg, rgba(0, 217, 255, 0.16), rgba(138, 63, 252, 0.14));
  box-shadow:
    0 0 10px rgba(0, 217, 255, 0.07),
    0 0 20px rgba(138, 63, 252, 0.04);
}

.trace-h1 { top: 16%; left: -2%; width: 42%; }
.trace-h2 { top: 33%; right: 4%; width: 36%; }
.trace-h3 { bottom: 30%; left: 8%; width: 40%; }
.trace-h4 { bottom: 16%; right: -2%; width: 38%; }

.trace-v1 { left: 16%; top: 8%; height: 38%; }
.trace-v2 { left: 72%; top: 16%; height: 44%; }
.trace-v3 { right: 14%; bottom: 10%; height: 30%; }
.trace-v4 { left: 46%; bottom: 8%; height: 26%; }

.trace::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 24px,
      rgba(255,255,255,0.06) 24px 26px,
      transparent 26px 52px
    );
  opacity: 0.16;
}

.trace-v::before {
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 24px,
      rgba(255,255,255,0.06) 24px 26px,
      transparent 26px 52px
    );
}

.pulse {
  position: absolute;
  display: block;
  border-radius: inherit;
  opacity: 0;
  filter: blur(0.5px);
}

.trace-h .pulse {
  top: -2px;
  width: 120px;
  height: 5px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(0, 217, 255, 0.95) 30%,
      rgba(255, 255, 255, 0.92) 50%,
      rgba(138, 63, 252, 0.95) 70%,
      transparent
    );
  box-shadow:
    0 0 12px rgba(0, 217, 255, 0.85),
    0 0 26px rgba(138, 63, 252, 0.35);
}

.trace-v .pulse {
  left: -2px;
  width: 5px;
  height: 120px;
  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(0, 217, 255, 0.95) 30%,
      rgba(255, 255, 255, 0.92) 50%,
      rgba(138, 63, 252, 0.95) 70%,
      transparent
    );
  box-shadow:
    0 0 12px rgba(0, 217, 255, 0.85),
    0 0 26px rgba(138, 63, 252, 0.35);
}

.pulse-1  { animation: pulseRightPro 11s ease-in-out infinite; animation-delay: 0.8s; }
.pulse-2  { animation: pulseLeftPro 13s ease-in-out infinite; animation-delay: 2.0s; }
.pulse-3  { animation: pulseRightPro 12s ease-in-out infinite; animation-delay: 4.0s; }
.pulse-4  { animation: pulseLeftPro 14s ease-in-out infinite; animation-delay: 1.2s; }

.pulse-v1 { animation: pulseDownPro 12s ease-in-out infinite; animation-delay: 2.4s; }
.pulse-v2 { animation: pulseUpPro 14s ease-in-out infinite; animation-delay: 0.6s; }
.pulse-v3 { animation: pulseDownPro 15s ease-in-out infinite; animation-delay: 3.3s; }
.pulse-v4 { animation: pulseUpPro 11s ease-in-out infinite; animation-delay: 5s; }

@keyframes pulseRightPro {
  0%   { transform: translateX(-180px); opacity: 0; }
  6%   { opacity: 0.95; }
  20%  { opacity: 1; }
  55%  { opacity: 0.95; }
  85%  { opacity: 0.5; }
  100% { transform: translateX(1400px); opacity: 0; }
}

@keyframes pulseLeftPro {
  0%   { transform: translateX(1400px); opacity: 0; }
  6%   { opacity: 0.95; }
  20%  { opacity: 1; }
  55%  { opacity: 0.95; }
  85%  { opacity: 0.5; }
  100% { transform: translateX(-180px); opacity: 0; }
}

@keyframes pulseDownPro {
  0%   { transform: translateY(-180px); opacity: 0; }
  6%   { opacity: 0.95; }
  20%  { opacity: 1; }
  55%  { opacity: 0.95; }
  85%  { opacity: 0.5; }
  100% { transform: translateY(1400px); opacity: 0; }
}

@keyframes pulseUpPro {
  0%   { transform: translateY(1400px); opacity: 0; }
  6%   { opacity: 0.95; }
  20%  { opacity: 1; }
  55%  { opacity: 0.95; }
  85%  { opacity: 0.5; }
  100% { transform: translateY(-180px); opacity: 0; }
}

.circuit-node {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow:
    0 0 10px rgba(0, 217, 255, 0.55),
    0 0 20px rgba(138, 63, 252, 0.25);
  opacity: 0.42;
  animation: nodeFlicker 6s ease-in-out infinite;
}

@keyframes nodeFlicker {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  25%      { opacity: 0.55; transform: scale(1.08); }
  50%      { opacity: 0.42; transform: scale(1); }
  75%      { opacity: 0.65; transform: scale(1.12); }
}

.node-1 { top: 16%; left: 19%; animation-delay: 0.2s; }
.node-2 { top: 33%; right: 24%; animation-delay: 1.2s; }
.node-3 { top: 22%; right: 10%; animation-delay: 2s; }
.node-4 { bottom: 30%; left: 31%; animation-delay: 2.6s; }
.node-5 { bottom: 16%; right: 19%; animation-delay: 1.8s; }
.node-6 { bottom: 21%; left: 46%; animation-delay: 3.2s; }
.node-7 { top: 43%; left: 16%; animation-delay: 0.8s; }
.node-8 { bottom: 38%; right: 9%; animation-delay: 2.8s; }

/* Keep the main content readable */
.hero,
.dashboard-hero,
.panel,
.feature-card,
.command-card,
.module-card,
.roadmap-item,
.cta-section {
  backdrop-filter: blur(18px);
}

@media (max-width: 980px) {
  .chip-a {
    width: 180px;
    height: 110px;
    top: 10%;
    right: 2%;
    transform: none;
  }

  .chip-b {
    width: 200px;
    height: 120px;
    bottom: 9%;
    left: 2%;
    transform: none;
  }

  .trace-h {
    width: 46%;
  }

  .trace-v {
    height: 28%;
  }
}

@media (max-width: 620px) {
  .circuit-board-bg {
    opacity: 0.82;
  }

  .chip-b,
  .trace-h4,
  .trace-v4,
  .node-7,
  .node-8 {
    display: none;
  }

  .trace-h .pulse {
    width: 80px;
  }

  .trace-v .pulse {
    height: 80px;
  }
}




/* Ultra Premium Experience Layer */

html, body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

h1, h2, h3, .brand strong, .button, .eyebrow, .status-pill, .badge {
  font-family: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,0.025), transparent 16%),
    radial-gradient(circle at 78% 16%, rgba(255,255,255,0.02), transparent 15%);
  mix-blend-mode: screen;
  opacity: 0.55;
  z-index: -2;
}

::selection {
  background: rgba(0, 217, 255, 0.22);
  color: #ffffff;
}

.topbar {
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    backdrop-filter 0.25s ease;
  border-radius: 22px;
}

.topbar.scrolled {
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(0, 217, 255, 0.12);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255,255,255,0.02) inset;
  backdrop-filter: blur(18px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 100;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  box-shadow:
    0 0 14px rgba(0, 217, 255, 0.55),
    0 0 20px rgba(138, 63, 252, 0.25);
  transition: width 0.08s linear;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 217, 255, 0.08), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(138, 63, 252, 0.08), transparent 35%),
    rgba(2, 6, 23, 0.97);
  backdrop-filter: blur(12px);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader-hidden {
  opacity: 0;
  visibility: hidden;
}

.page-loader-inner {
  width: min(420px, calc(100% - 40px));
  padding: 28px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(0, 217, 255, 0.18);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.36),
    0 0 70px rgba(0, 217, 255, 0.08);
  text-align: center;
}

.page-loader-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.35));
}

.page-loader-copy {
  margin-top: 16px;
}

.page-loader-copy span,
.page-loader-copy strong {
  display: block;
}

.page-loader-copy span {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.page-loader-copy strong {
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-loader-bar {
  margin-top: 20px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.12);
}

.page-loader-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  box-shadow:
    0 0 18px rgba(0, 217, 255, 0.45),
    0 0 24px rgba(138, 63, 252, 0.18);
  transition: width 0.22s ease;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.14), rgba(138, 63, 252, 0.18)),
    rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(8px);
  transition: opacity 0.28s ease;
}

.page-transition-active {
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.988);
  filter: blur(6px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease,
    filter 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity, filter;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.hero,
.panel,
.feature-card,
.command-card,
.module-card,
.roadmap-item,
.dashboard-preview-card,
.dashboard-hero,
.cta-section,
.guild-card,
.hero-stats > div,
.dashboard-status-card {
  position: relative;
  overflow: hidden;
}

.hero::before,
.panel::after,
.feature-card::after,
.command-card::after,
.module-card::after,
.roadmap-item::after,
.dashboard-preview-card::after,
.dashboard-hero::after,
.cta-section::after,
.guild-card::after,
.hero-stats > div::after,
.dashboard-status-card::after {
  content: "";
  position: absolute;
  inset: -120% auto auto -40%;
  width: 56%;
  height: 280%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255,255,255,0.02) 30%,
    rgba(255,255,255,0.08) 48%,
    transparent 68%
  );
  transform: rotate(12deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.panel:hover::after,
.feature-card:hover::after,
.command-card:hover::after,
.module-card:hover::after,
.roadmap-item:hover::after,
.dashboard-preview-card:hover::after,
.dashboard-hero:hover::after,
.cta-section:hover::after,
.guild-card:hover::after,
.hero-stats > div:hover::after,
.dashboard-status-card:hover::after {
  opacity: 1;
  animation: premiumSheen 1.15s ease;
}

@keyframes premiumSheen {
  0% {
    transform: translateX(-40%) rotate(12deg);
  }
  100% {
    transform: translateX(240%) rotate(12deg);
  }
}

.button,
.server-tools input,
.server-tools select,
.user-pill {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.button-primary:hover {
  box-shadow:
    0 0 32px rgba(0, 217, 255, 0.32),
    0 0 40px rgba(138, 63, 252, 0.14);
}

.button-secondary:hover,
.button-ghost:hover,
.user-pill:hover {
  border-color: rgba(0, 217, 255, 0.34);
  box-shadow: 0 0 22px rgba(0, 217, 255, 0.08);
}

.server-tools input:hover,
.server-tools input:focus,
.server-tools select:hover,
.server-tools select:focus {
  border-color: rgba(0, 217, 255, 0.36);
  box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.06);
}

.brand-mark {
  box-shadow:
    0 0 24px rgba(0, 217, 255, 0.24),
    0 0 42px rgba(138, 63, 252, 0.14),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.hero-text,
.section-heading p,
.panel-title-row p,
.dashboard-hero p,
.cta-section p,
.feature-card p,
.command-card p,
.module-card p,
.roadmap-item p,
.guild-main span,
.account-profile span,
.account-profile small {
  color: rgba(203, 213, 225, 0.82);
}

.logo-strip,
.panel,
.feature-card,
.command-card,
.module-card,
.roadmap-item,
.dashboard-preview-card,
.dashboard-hero,
.cta-section,
.guild-card,
.hero-stats > div,
.dashboard-status-card,
.page-loader-inner {
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255,255,255,0.02) inset;
}

@media (max-width: 980px) {
  .topbar {
    border-radius: 18px;
  }

  .page-loader-inner {
    padding: 22px;
  }
}





/* Reduced Premium Motion Pass */

.feature-card:hover,
.command-card:hover,
.module-card:hover,
.guild-card:hover,
.roadmap-item:hover,
.panel:hover,
.dashboard-preview-card:hover,
.dashboard-status-card:hover,
.hero-stats > div:hover {
  transform: translateY(-1px) !important;
}

.feature-card,
.command-card,
.module-card,
.guild-card,
.roadmap-item,
.panel,
.dashboard-preview-card,
.dashboard-status-card,
.hero-stats > div {
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease !important;
}

.button:hover {
  transform: translateY(-1px) !important;
}

.user-pill:hover {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Professional Content Cleanup */

.professional-hero .hero-note {
  max-width: 690px;
  margin: 22px 0 0;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.96rem;
  line-height: 1.65;
}

.professional-core-card {
  width: min(460px, 92vw);
}

.professional-module-list {
  margin-top: 20px;
  display: grid;
  gap: 11px;
}

.professional-module-list div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.44);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.professional-module-list strong,
.professional-module-list span {
  display: block;
}

.professional-module-list span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.9rem;
}

.professional-section {
  margin-top: 70px;
}

.standard-page {
  width: min(1240px, calc(100% - 32px));
  margin: 42px auto 90px;
}

.standard-panel {
  margin-top: 22px;
}

.command-table {
  display: grid;
  gap: 12px;
}

.command-table div {
  display: grid;
  grid-template-columns: 180px 130px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.command-table code {
  color: var(--cyan);
  font-weight: 950;
  font-size: 1.05rem;
}

.command-table span {
  width: max-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(0, 217, 255, 0.09);
  border: 1px solid rgba(0, 217, 255, 0.18);
  font-size: 0.82rem;
  font-weight: 900;
}

.command-table p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.docs-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.docs-card h2 {
  margin-bottom: 10px;
}

.docs-card p {
  color: var(--muted);
  line-height: 1.65;
}

.status-grid {
  display: grid;
  gap: 13px;
}

.status-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.status-card h3,
.status-card p {
  margin: 0;
}

.status-card p {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .command-table div {
    grid-template-columns: 1fr;
  }

  .docs-grid {
    grid-template-columns: 1fr;
  }

  .status-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Premium Header Polish */

.topbar {
  width: min(1240px, calc(100% - 28px)) !important;
  margin: 14px auto 0 !important;
  padding: 12px 14px !important;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(90deg, rgba(8, 15, 35, 0.88), rgba(12, 16, 42, 0.82)),
    rgba(2, 6, 23, 0.74) !important;
  border: 1px solid rgba(0, 217, 255, 0.16) !important;
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 0 38px rgba(0, 217, 255, 0.045) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
}

.topbar.scrolled {
  margin-top: 10px !important;
  background:
    linear-gradient(90deg, rgba(5, 10, 26, 0.94), rgba(10, 13, 36, 0.9)),
    rgba(2, 6, 23, 0.88) !important;
  border-color: rgba(0, 217, 255, 0.2) !important;
  box-shadow:
    0 18px 56px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 0 42px rgba(0, 217, 255, 0.06) !important;
}

.brand {
  gap: 11px !important;
  min-width: 0 !important;
}

.brand-mark {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  flex: 0 0 42px !important;
  box-shadow:
    0 0 18px rgba(0, 217, 255, 0.22),
    0 0 32px rgba(138, 63, 252, 0.12) !important;
}

.brand strong {
  font-size: 1.05rem !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
}

.brand span {
  font-size: 0.73rem !important;
  color: rgba(203, 213, 225, 0.68) !important;
}

.nav-links {
  gap: 6px !important;
  padding: 5px !important;
  border-radius: 999px !important;
  background: rgba(2, 6, 23, 0.24) !important;
  border: 1px solid rgba(148, 163, 184, 0.08) !important;
}

.nav-links a {
  padding: 9px 13px !important;
  border-radius: 999px !important;
  color: rgba(203, 213, 225, 0.78) !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease !important;
}

.nav-links a:hover {
  color: #ffffff !important;
  background: rgba(0, 217, 255, 0.08) !important;
  box-shadow: 0 0 18px rgba(0, 217, 255, 0.08) !important;
}

.auth-area {
  align-items: center !important;
}

.user-pill {
  padding: 6px 12px 6px 6px !important;
  gap: 9px !important;
  border-radius: 999px !important;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.08), rgba(138, 63, 252, 0.06)),
    rgba(2, 6, 23, 0.52) !important;
  border: 1px solid rgba(0, 217, 255, 0.18) !important;
  box-shadow:
    0 0 22px rgba(0, 217, 255, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset !important;
  max-width: 230px !important;
}

.user-pill img {
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(0, 217, 255, 0.18) !important;
}

.user-pill span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: rgba(248, 250, 252, 0.94) !important;
  font-weight: 800 !important;
  font-size: 0.94rem !important;
}

.auth-area .button {
  min-height: 38px !important;
  padding: 10px 15px !important;
  border-radius: 999px !important;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 14px !important;
    padding: 16px !important;
  }

  .brand {
    justify-content: center !important;
  }

  .nav-links {
    width: 100% !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .auth-area {
    width: 100% !important;
    justify-content: center !important;
  }

  .user-pill {
    max-width: min(320px, 100%) !important;
  }
}

@media (max-width: 620px) {
  .topbar {
    width: min(100% - 18px, 1240px) !important;
    margin-top: 9px !important;
    border-radius: 22px !important;
  }

  .nav-links {
    gap: 4px !important;
  }

  .nav-links a {
    padding: 8px 10px !important;
    font-size: 0.86rem !important;
  }

  .brand-mark {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
  }
}

/* Official Community / Support Enhancements */

.support-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.support-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.support-card h2 {
  margin: 0 0 10px;
}

.support-card p {
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.support-note {
  margin-top: 22px;
}

.support-note h2 {
  margin: 8px 0 10px;
}

.support-note p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 760px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}

/* Professional Completion Update */

.faq-grid,
.roadmap-board,
.updates-list {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.faq-grid {
  grid-template-columns: repeat(2, 1fr);
}

.faq-card h2,
.roadmap-column h2,
.update-card h2,
.legal-panel h2 {
  margin: 0 0 10px;
}

.faq-card p,
.roadmap-column p,
.update-card p,
.legal-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.faq-card .button {
  margin-top: 14px;
}

.roadmap-board {
  grid-template-columns: repeat(2, 1fr);
}

.roadmap-column {
  min-height: 310px;
}

.roadmap-column h2 {
  margin-top: 16px;
}

.roadmap-list {
  margin-top: 16px;
  display: grid;
  gap: 11px;
}

.roadmap-list div {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: rgba(226, 232, 240, 0.9);
  font-weight: 700;
}

.updates-list {
  grid-template-columns: 1fr;
}

.update-card {
  display: grid;
  gap: 10px;
}

.update-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.update-meta small {
  color: var(--muted);
  font-weight: 800;
}

.legal-panel {
  margin-top: 22px;
}

.legal-panel h2 {
  margin-top: 28px;
}

.legal-panel h2:first-child {
  margin-top: 0;
}

.legal-panel .button {
  margin-top: 20px;
}

.setup-panel {
  margin-top: 22px;
}

.setup-checklist {
  display: grid;
  gap: 13px;
}

.setup-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.setup-item > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 950;
}

.setup-item.done > span {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.26);
}

.setup-item.pending > span {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.2);
}

.setup-item strong,
.setup-item p {
  display: block;
  margin: 0;
}

.setup-item p {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.55;
}

.enhanced-status-card {
  min-height: 96px;
}

@media (max-width: 900px) {
  .faq-grid,
  .roadmap-board {
    grid-template-columns: 1fr;
  }
}

/* Resource Access + Mega Footer */

.resources-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.compact-resources-grid {
  grid-template-columns: repeat(3, 1fr);
}

.resource-card {
  display: block;
  color: inherit;
  min-height: 190px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.resource-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 217, 255, 0.38);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.38),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.resource-card > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 22px rgba(0, 217, 255, 0.18);
  font-weight: 950;
  margin-bottom: 18px;
}

.resource-card h2 {
  margin: 0 0 8px;
}

.resource-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-start;
}

.mega-footer {
  align-items: stretch !important;
  display: grid !important;
  grid-template-columns: 0.8fr 1.4fr !important;
  gap: 34px !important;
  padding: 34px 0 40px !important;
}

.mega-footer::before {
  display: none !important;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand .brand-mark {
  width: 46px !important;
  height: 46px !important;
  flex: 0 0 46px !important;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  font-size: 1.15rem;
}

.footer-brand span {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.footer-links-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px !important;
}

.footer-links-grid div {
  display: grid !important;
  gap: 9px !important;
}

.footer-links-grid h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.footer-links-grid a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.18s ease;
}

.footer-links-grid a:hover {
  color: var(--cyan);
}

.footer-bottom {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

@media (max-width: 980px) {
  .compact-resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mega-footer {
    grid-template-columns: 1fr !important;
  }

  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 620px) {
  .resources-grid,
  .compact-resources-grid {
    grid-template-columns: 1fr;
  }

  .footer-links-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Final Hardening + Mobile Polish */

.error-hero {
  min-height: 360px;
}

.error-hero h1 {
  max-width: 860px;
}

.module-card button[disabled] {
  min-height: auto !important;
  padding: 13px 14px !important;
  line-height: 1.45 !important;
  white-space: normal !important;
}

@media (max-width: 760px) {
  .topbar {
    padding: 14px 12px !important;
  }

  .nav-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    border-radius: 20px !important;
    padding: 6px !important;
  }

  .nav-links a {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    padding: 10px 8px !important;
  }

  .hero-actions {
    width: 100% !important;
  }

  .hero-actions .button {
    width: 100% !important;
  }

  .dashboard-hero {
    padding: 24px !important;
  }

  .standard-page {
    margin-top: 28px !important;
  }
}

@media (max-width: 430px) {
  .nav-links {
    grid-template-columns: 1fr !important;
  }

  .brand span {
    display: none !important;
  }

  .page-loader-copy strong {
    font-size: 1.05rem !important;
  }
}

/* Dashboard Module Settings Foundation */

.settings-panel {
  margin-top: 22px;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.settings-warning {
  padding: 14px;
  border-radius: 16px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.22);
  line-height: 1.55;
}

.toggle-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.toggle-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--cyan);
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group span {
  color: rgba(226, 232, 240, 0.9);
  font-weight: 800;
}

.field-group select {
  min-height: 46px;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.52);
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

.field-group select:focus {
  border-color: rgba(0, 217, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.06);
}

.settings-subgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

#loggingSaveStatus {
  color: var(--muted);
  font-weight: 800;
}

#loggingSaveStatus.save-success {
  color: #86efac;
}

#loggingSaveStatus.save-error {
  color: #fca5a5;
}

@media (max-width: 760px) {
  .settings-subgrid {
    grid-template-columns: 1fr;
  }

  .settings-actions .button {
    width: 100%;
  }
}

/* Expanded Logging Module Polish */

.settings-subgrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-row.compact {
  min-height: 116px;
}

@media (max-width: 760px) {
  .settings-subgrid {
    grid-template-columns: 1fr;
  }
}

/* Moderation Module V1 Dashboard Polish */

.settings-info-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 217, 255, 0.07);
  border: 1px solid rgba(0, 217, 255, 0.16);
}

.settings-info-box strong,
.settings-info-box p {
  display: block;
  margin: 0;
}

.settings-info-box p {
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}

/* Consistent save status styling for dashboard modules */

.save-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.save-status:empty {
  display: none;
}

.save-status.save-success {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.08);
}

.save-status.save-error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.08);
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .save-status {
    width: 100%;
    justify-content: center;
  }
}

/* Moderation Roles + Warning Rules UI */

.field-group select[multiple] {
  min-height: 120px;
  padding: 10px 13px;
}

.field-group input[type="number"] {
  min-height: 46px;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.52);
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

.field-group small {
  color: var(--muted);
  line-height: 1.5;
}

.action-role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .action-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .action-role-grid {
    grid-template-columns: 1fr;
  }
}

/* Moderation Roles + Warning Rules UI */

.field-group select[multiple] {
  min-height: 120px;
  padding: 10px 13px;
}

.field-group input[type="number"] {
  min-height: 46px;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.52);
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

.field-group small {
  color: var(--muted);
  line-height: 1.5;
}

.action-role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .action-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .action-role-grid {
    grid-template-columns: 1fr;
  }
}

/* Clean Moderation Role Picker + Warning Rule Builder */

.role-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.selected-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.selected-pill {
  border: 1px solid rgba(0, 217, 255, 0.22);
  background: rgba(0, 217, 255, 0.08);
  color: #dffaff;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.selected-pill strong {
  color: #86efac;
  font-size: 1.1rem;
}

.empty-inline-state {
  color: var(--muted);
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.warning-rule-builder {
  display: grid;
  grid-template-columns: 0.7fr 1fr 0.8fr auto;
  gap: 14px;
  align-items: end;
}

.warning-rules-list {
  display: grid;
  gap: 10px;
}

.warning-rule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.warning-rule-row span {
  color: rgba(226, 232, 240, 0.92);
  font-weight: 800;
}

.warning-rule-row button {
  border: 1px solid rgba(239, 68, 68, 0.26);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 980px) {
  .warning-rule-builder {
    grid-template-columns: 1fr 1fr;
  }

  .role-add-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .warning-rule-builder {
    grid-template-columns: 1fr;
  }

  .warning-rule-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Clean Moderation Role Picker + Warning Rule Builder */

.role-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.selected-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.selected-pill {
  border: 1px solid rgba(0, 217, 255, 0.22);
  background: rgba(0, 217, 255, 0.08);
  color: #dffaff;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.selected-pill strong {
  color: #86efac;
  font-size: 1.1rem;
}

.empty-inline-state {
  color: var(--muted);
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.warning-rule-builder {
  display: grid;
  grid-template-columns: 0.7fr 1fr 0.8fr auto;
  gap: 14px;
  align-items: end;
}

.warning-rules-list {
  display: grid;
  gap: 10px;
}

.warning-rule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.warning-rule-row span {
  color: rgba(226, 232, 240, 0.92);
  font-weight: 800;
}

.warning-rule-row button {
  border: 1px solid rgba(239, 68, 68, 0.26);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 980px) {
  .warning-rule-builder {
    grid-template-columns: 1fr 1fr;
  }

  .role-add-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .warning-rule-builder {
    grid-template-columns: 1fr;
  }

  .warning-rule-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Custom Modulr dropdowns + warning duration polish */

.modulr-custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62));
  color: var(--text);
  padding: 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 850;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.018) inset,
    0 0 20px rgba(0, 217, 255, 0.035);
}

.custom-select-trigger:hover,
.modulr-custom-select.open .custom-select-trigger {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.custom-select-trigger strong {
  color: var(--cyan);
  font-size: 1.05rem;
  transition: transform 0.18s ease;
}

.modulr-custom-select.open .custom-select-trigger strong {
  transform: rotate(180deg);
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  display: none;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(0, 217, 255, 0.22);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.45),
    0 0 35px rgba(0, 217, 255, 0.08),
    0 0 0 1px rgba(255,255,255,0.025) inset;
  backdrop-filter: blur(18px);
}

.modulr-custom-select.open .custom-select-menu {
  display: grid;
  gap: 5px;
}

.custom-select-menu button {
  width: 100%;
  border: 0;
  border-radius: 13px;
  padding: 11px 12px;
  background: transparent;
  color: rgba(226, 232, 240, 0.9);
  text-align: left;
  cursor: pointer;
  font-weight: 800;
}

.custom-select-menu button:hover {
  background: rgba(0, 217, 255, 0.10);
  color: #ffffff;
}

.custom-select-empty {
  color: var(--muted);
  padding: 12px;
  font-weight: 800;
}

.field-group input.input-error {
  border-color: rgba(239, 68, 68, 0.65) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08) !important;
}

.muted-setting {
  opacity: 0.58;
}

.muted-setting input {
  pointer-events: none;
}

.field-group select,
.field-group input[type="number"],
.field-group input[type="text"] {
  color-scheme: dark;
}

.field-group select option {
  background: #020617;
  color: #e2e8f0;
}

/* Warning timeout input cleanup */

.modulr-text-input {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62));
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.018) inset,
    0 0 20px rgba(0, 217, 255, 0.035);
}

.modulr-text-input::placeholder {
  color: rgba(148, 163, 184, 0.72);
}

.modulr-text-input:focus {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.hidden-setting {
  display: none !important;
}

/* Custom dropdown final polish */

.settings-panel,
.settings-panel .panel,
.settings-form,
.warning-rule-builder,
.role-add-row,
.field-group,
.modulr-custom-select {
  overflow: visible !important;
}

.settings-panel {
  z-index: 20;
}

.modulr-custom-select {
  z-index: 80;
}

.modulr-custom-select.open {
  z-index: 500;
}

.custom-select-trigger {
  min-height: 50px !important;
  border-radius: 18px !important;
  padding: 0 16px !important;
  background:
    linear-gradient(135deg, rgba(3, 10, 26, 0.96), rgba(9, 14, 34, 0.92)) !important;
  border: 1px solid rgba(0, 217, 255, 0.26) !important;
}

.modulr-custom-select.open .custom-select-trigger {
  border-color: rgba(0, 217, 255, 0.62) !important;
  box-shadow:
    0 0 0 3px rgba(0, 217, 255, 0.08),
    0 0 30px rgba(0, 217, 255, 0.10) !important;
}

.custom-select-menu {
  top: calc(100% + 7px) !important;
  max-height: 210px !important;
  padding: 7px !important;
  border-radius: 18px !important;
  background:
    linear-gradient(145deg, rgba(3, 8, 24, 0.98), rgba(8, 13, 32, 0.98)) !important;
  border: 1px solid rgba(0, 217, 255, 0.24) !important;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.58),
    0 0 36px rgba(0, 217, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.035) !important;
}

.modulr-custom-select.open .custom-select-menu {
  display: grid !important;
  gap: 4px !important;
}

.custom-select-menu button {
  min-height: 42px !important;
  padding: 10px 13px !important;
  border-radius: 13px !important;
  color: rgba(226, 232, 240, 0.88) !important;
  font-size: 0.95rem !important;
  line-height: 1.2 !important;
}

.custom-select-menu button:hover {
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.13), rgba(138, 63, 252, 0.10)) !important;
  color: #ffffff !important;
}

.custom-select-menu::-webkit-scrollbar {
  width: 10px;
}

.custom-select-menu::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.6);
  border-radius: 999px;
}

.custom-select-menu::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 217, 255, 0.55), rgba(138, 63, 252, 0.45));
  border-radius: 999px;
  border: 2px solid rgba(2, 6, 23, 0.9);
}

/* Server Dashboard Sidebar Redesign */

.server-page {
  width: min(1480px, calc(100% - 28px)) !important;
}

.server-dashboard-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.server-dashboard-content {
  min-width: 0;
}

.server-module-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(5, 13, 31, 0.88), rgba(12, 14, 38, 0.78));
  border: 1px solid rgba(0, 217, 255, 0.16);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 0 32px rgba(0, 217, 255, 0.045);
  backdrop-filter: blur(18px);
}

.sidebar-title-block {
  padding: 4px 4px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 14px;
}

.sidebar-title-block span,
.sidebar-title-block strong {
  display: block;
}

.sidebar-title-block span {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 950;
}

.sidebar-title-block strong {
  color: var(--text);
  margin-top: 6px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.sidebar-group {
  border-radius: 20px;
  margin-bottom: 10px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.08);
  overflow: hidden;
}

.sidebar-group summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 15px;
  color: rgba(248, 250, 252, 0.95);
  font-weight: 950;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-group summary::-webkit-details-marker {
  display: none;
}

.sidebar-group summary::after {
  content: "⌄";
  color: var(--cyan);
  transition: transform 0.18s ease;
}

.sidebar-group[open] summary::after {
  transform: rotate(180deg);
}

.sidebar-group button,
.sidebar-disabled {
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  padding: 9px 11px;
  text-align: left;
  display: block;
  color: rgba(203, 213, 225, 0.78);
  background: transparent;
  font-weight: 800;
}

.sidebar-group button {
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.sidebar-group button:hover,
.sidebar-group button.active {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.12), rgba(138, 63, 252, 0.08));
  box-shadow: 0 0 22px rgba(0, 217, 255, 0.06);
}

.sidebar-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sidebar-footer-note {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(0, 217, 255, 0.07);
  border: 1px solid rgba(0, 217, 255, 0.12);
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.88rem;
}

.settings-section-anchor,
#serverHero,
#setupChecklist,
#moderationSettings,
#loggingSettings {
  scroll-margin-top: 120px;
}

.server-module-sidebar::-webkit-scrollbar {
  width: 8px;
}

.server-module-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.server-module-sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 217, 255, 0.5), rgba(138, 63, 252, 0.45));
  border-radius: 999px;
}

@media (max-width: 1120px) {
  .server-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .server-module-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }

  .server-module-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .sidebar-title-block,
  .sidebar-footer-note {
    grid-column: 1 / -1;
  }

  .sidebar-group {
    margin-bottom: 0;
  }
}

@media (max-width: 680px) {
  .server-page {
    width: min(100% - 18px, 1480px) !important;
  }

  .server-module-sidebar {
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 22px;
  }
}

/* Server Dashboard Sidebar Redesign */

.server-page {
  width: min(1480px, calc(100% - 28px)) !important;
}

.server-dashboard-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.server-dashboard-content {
  min-width: 0;
}

.server-module-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(5, 13, 31, 0.88), rgba(12, 14, 38, 0.78));
  border: 1px solid rgba(0, 217, 255, 0.16);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 0 32px rgba(0, 217, 255, 0.045);
  backdrop-filter: blur(18px);
}

.sidebar-title-block {
  padding: 4px 4px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 14px;
}

.sidebar-title-block span,
.sidebar-title-block strong {
  display: block;
}

.sidebar-title-block span {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 950;
}

.sidebar-title-block strong {
  color: var(--text);
  margin-top: 6px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.sidebar-group {
  border-radius: 20px;
  margin-bottom: 10px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.08);
  overflow: hidden;
}

.sidebar-group summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 15px;
  color: rgba(248, 250, 252, 0.95);
  font-weight: 950;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-group summary::-webkit-details-marker {
  display: none;
}

.sidebar-group summary::after {
  content: "⌄";
  color: var(--cyan);
  transition: transform 0.18s ease;
}

.sidebar-group[open] summary::after {
  transform: rotate(180deg);
}

.sidebar-group button,
.sidebar-disabled {
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  padding: 9px 11px;
  text-align: left;
  display: block;
  color: rgba(203, 213, 225, 0.78);
  background: transparent;
  font-weight: 800;
}

.sidebar-group button {
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.sidebar-group button:hover,
.sidebar-group button.active {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.12), rgba(138, 63, 252, 0.08));
  box-shadow: 0 0 22px rgba(0, 217, 255, 0.06);
}

.sidebar-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sidebar-footer-note {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(0, 217, 255, 0.07);
  border: 1px solid rgba(0, 217, 255, 0.12);
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.88rem;
}

.settings-section-anchor,
#serverHero,
#setupChecklist,
#moderationSettings,
#loggingSettings {
  scroll-margin-top: 120px;
}

.server-module-sidebar::-webkit-scrollbar {
  width: 8px;
}

.server-module-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.server-module-sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 217, 255, 0.5), rgba(138, 63, 252, 0.45));
  border-radius: 999px;
}

@media (max-width: 1120px) {
  .server-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .server-module-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }

  .server-module-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .sidebar-title-block,
  .sidebar-footer-note {
    grid-column: 1 / -1;
  }

  .sidebar-group {
    margin-bottom: 0;
  }
}

@media (max-width: 680px) {
  .server-page {
    width: min(100% - 18px, 1480px) !important;
  }

  .server-module-sidebar {
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 22px;
  }
}

/* FORCE Server Dashboard Sidebar Redesign */

.server-page {
  width: min(1480px, calc(100% - 28px)) !important;
}

.server-dashboard-layout {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: start !important;
}

.server-dashboard-content {
  min-width: 0 !important;
}

.server-module-sidebar {
  position: sticky !important;
  top: 92px !important;
  max-height: calc(100vh - 112px) !important;
  overflow: auto !important;
  padding: 18px !important;
  border-radius: 28px !important;
  background:
    linear-gradient(145deg, rgba(5, 13, 31, 0.9), rgba(12, 14, 38, 0.8)) !important;
  border: 1px solid rgba(0, 217, 255, 0.18) !important;
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 0 32px rgba(0, 217, 255, 0.05) !important;
  backdrop-filter: blur(18px) !important;
}

.sidebar-title-block {
  padding: 4px 4px 16px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
  margin-bottom: 14px !important;
}

.sidebar-title-block span,
.sidebar-title-block strong {
  display: block !important;
}

.sidebar-title-block span {
  color: var(--cyan) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.16em !important;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
}

.sidebar-title-block strong {
  color: var(--text) !important;
  margin-top: 6px !important;
  font-size: 1.2rem !important;
  letter-spacing: -0.03em !important;
}

.sidebar-group {
  border-radius: 20px !important;
  margin-bottom: 10px !important;
  background: rgba(2, 6, 23, 0.36) !important;
  border: 1px solid rgba(148, 163, 184, 0.09) !important;
  overflow: hidden !important;
}

.sidebar-group summary {
  list-style: none !important;
  cursor: pointer !important;
  padding: 14px 15px !important;
  color: rgba(248, 250, 252, 0.95) !important;
  font-weight: 950 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.sidebar-group summary::-webkit-details-marker {
  display: none !important;
}

.sidebar-group summary::after {
  content: "⌄" !important;
  color: var(--cyan) !important;
  transition: transform 0.18s ease !important;
}

.sidebar-group[open] summary::after {
  transform: rotate(180deg) !important;
}

.sidebar-group button,
.sidebar-disabled {
  width: calc(100% - 16px) !important;
  margin: 0 8px 8px !important;
  min-height: 40px !important;
  border: 0 !important;
  border-radius: 14px !important;
  padding: 9px 11px !important;
  text-align: left !important;
  display: block !important;
  color: rgba(203, 213, 225, 0.78) !important;
  background: transparent !important;
  font-weight: 800 !important;
}

.sidebar-group button {
  cursor: pointer !important;
}

.sidebar-group button:hover,
.sidebar-group button.active {
  color: #ffffff !important;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.12), rgba(138, 63, 252, 0.08)) !important;
  box-shadow: 0 0 22px rgba(0, 217, 255, 0.06) !important;
}

.sidebar-disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

.sidebar-footer-note {
  margin-top: 16px !important;
  padding: 14px !important;
  border-radius: 18px !important;
  background: rgba(0, 217, 255, 0.07) !important;
  border: 1px solid rgba(0, 217, 255, 0.12) !important;
  color: var(--muted) !important;
  line-height: 1.55 !important;
  font-size: 0.88rem !important;
}

.settings-section-anchor,
#serverHero,
#setupChecklist,
#moderationSettings,
#loggingSettings {
  scroll-margin-top: 120px !important;
}

@media (max-width: 1120px) {
  .server-dashboard-layout {
    grid-template-columns: 1fr !important;
  }

  .server-module-sidebar {
    position: relative !important;
    top: auto !important;
    max-height: none !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .sidebar-title-block,
  .sidebar-footer-note {
    grid-column: 1 / -1 !important;
  }

  .sidebar-group {
    margin-bottom: 0 !important;
  }
}

@media (max-width: 680px) {
  .server-page {
    width: min(100% - 18px, 1480px) !important;
  }

  .server-module-sidebar {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }
}

/* Server Dashboard Left Sidebar */

.server-page {
  width: min(1480px, calc(100% - 28px)) !important;
}

.server-dashboard-layout {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: start !important;
}

.server-dashboard-content {
  min-width: 0 !important;
}

.server-module-sidebar {
  position: sticky !important;
  top: 92px !important;
  max-height: calc(100vh - 112px) !important;
  overflow: auto !important;
  padding: 18px !important;
  border-radius: 28px !important;
  background: linear-gradient(145deg, rgba(5, 13, 31, 0.92), rgba(12, 14, 38, 0.82)) !important;
  border: 1px solid rgba(0, 217, 255, 0.18) !important;
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 0 32px rgba(0, 217, 255, 0.05) !important;
  backdrop-filter: blur(18px) !important;
}

.sidebar-title-block {
  padding: 4px 4px 16px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
  margin-bottom: 14px !important;
}

.sidebar-title-block span,
.sidebar-title-block strong {
  display: block !important;
}

.sidebar-title-block span {
  color: var(--cyan) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.16em !important;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
}

.sidebar-title-block strong {
  color: var(--text) !important;
  margin-top: 6px !important;
  font-size: 1.2rem !important;
}

.sidebar-group {
  border-radius: 20px !important;
  margin-bottom: 10px !important;
  background: rgba(2, 6, 23, 0.36) !important;
  border: 1px solid rgba(148, 163, 184, 0.09) !important;
  overflow: hidden !important;
}

.sidebar-group summary {
  list-style: none !important;
  cursor: pointer !important;
  padding: 14px 15px !important;
  color: rgba(248, 250, 252, 0.95) !important;
  font-weight: 950 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.sidebar-group summary::-webkit-details-marker {
  display: none !important;
}

.sidebar-group summary::after {
  content: "⌄" !important;
  color: var(--cyan) !important;
  transition: transform 0.18s ease !important;
}

.sidebar-group[open] summary::after {
  transform: rotate(180deg) !important;
}

.sidebar-group button,
.sidebar-disabled {
  width: calc(100% - 16px) !important;
  margin: 0 8px 8px !important;
  min-height: 40px !important;
  border: 0 !important;
  border-radius: 14px !important;
  padding: 9px 11px !important;
  text-align: left !important;
  display: block !important;
  color: rgba(203, 213, 225, 0.78) !important;
  background: transparent !important;
  font-weight: 800 !important;
}

.sidebar-group button {
  cursor: pointer !important;
}

.sidebar-group button:hover,
.sidebar-group button.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.12), rgba(138, 63, 252, 0.08)) !important;
}

.sidebar-disabled {
  opacity: 0.45 !important;
}

.sidebar-footer-note {
  margin-top: 16px !important;
  padding: 14px !important;
  border-radius: 18px !important;
  background: rgba(0, 217, 255, 0.07) !important;
  border: 1px solid rgba(0, 217, 255, 0.12) !important;
  color: var(--muted) !important;
  line-height: 1.55 !important;
  font-size: 0.88rem !important;
}

.settings-section-anchor,
#serverHero,
#setupChecklist,
#moderationSettings,
#loggingSettings {
  scroll-margin-top: 120px !important;
}

@media (max-width: 1120px) {
  .server-dashboard-layout {
    grid-template-columns: 1fr !important;
  }

  .server-module-sidebar {
    position: relative !important;
    top: auto !important;
    max-height: none !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .sidebar-title-block,
  .sidebar-footer-note {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 680px) {
  .server-module-sidebar {
    grid-template-columns: 1fr !important;
  }
}

/* Server Dashboard Module Hub */

.server-module-hub {
  margin-top: 22px;
  padding: 28px !important;
}

.module-hub-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.module-hub-tabs button {
  border: 0;
  background: transparent;
  color: rgba(148, 163, 184, 0.82);
  font-weight: 850;
  padding: 0 0 12px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}

.module-hub-tabs button.active {
  color: #ffffff;
}

.module-hub-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}

.module-hub-tabs button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.module-hub-heading {
  margin-bottom: 22px;
}

.module-hub-heading h2 {
  margin: 5px 0 8px;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
}

.module-hub-heading p {
  color: var(--muted);
  line-height: 1.65;
  max-width: 780px;
}

.module-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.module-hub-card {
  min-height: 270px;
  padding: 24px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.58), rgba(10, 14, 36, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.10);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.025);
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.module-hub-card:hover,
.module-hub-card.active {
  transform: translateY(-2px);
  border-color: rgba(0, 217, 255, 0.34);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.32),
    0 0 34px rgba(0, 217, 255, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.035);
}

.module-card-icon {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 1.55rem;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.22), rgba(138, 63, 252, 0.16));
  border: 1px solid rgba(0, 217, 255, 0.16);
  box-shadow: 0 0 26px rgba(0, 217, 255, 0.08);
}

.module-hub-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.1rem;
}

.module-hub-card p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
  flex: 1;
}

.module-hub-card button {
  width: fit-content;
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  padding: 0 17px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.92), rgba(138, 63, 252, 0.92));
  box-shadow: 0 0 22px rgba(0, 217, 255, 0.12);
}

.module-detail-hidden,
.legacy-module-panel-hidden {
  display: none !important;
}

.settings-section-anchor {
  scroll-margin-top: 120px;
}

@media (max-width: 1180px) {
  .module-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .server-module-hub {
    padding: 20px !important;
  }

  .module-hub-grid {
    grid-template-columns: 1fr;
  }

  .module-hub-card {
    min-height: auto;
  }
}

/* Server dashboard subpage behaviour */

.dashboard-view-hidden {
  display: none !important;
}

.module-subpage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.module-subpage-header h2 {
  margin: 5px 0 8px;
  font-size: clamp(1.6rem, 2vw, 2.15rem);
}

.module-subpage-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-action-grid {
  display: grid;
  gap: 12px;
}

.dashboard-action-grid div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.dashboard-action-grid code {
  color: var(--cyan);
  font-weight: 950;
  font-size: 0.96rem;
}

.dashboard-action-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.server-module-sidebar [data-dashboard-view].active {
  color: #ffffff !important;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.14), rgba(138, 63, 252, 0.10)) !important;
  box-shadow: 0 0 22px rgba(0, 217, 255, 0.08) !important;
}

@media (max-width: 760px) {
  .module-subpage-header {
    flex-direction: column;
  }

  .module-subpage-header .button {
    width: 100%;
  }

  .dashboard-action-grid div {
    grid-template-columns: 1fr;
  }
}

/* Prevent accidental text highlighting on server dashboard UI */
.server-page,
.server-page *:not(input):not(textarea):not(select):not(option) {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Still allow typing/selecting inside actual form fields */
.server-page input,
.server-page textarea,
.server-page select,
.server-page option {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* Moderation Logs & Tracking polish */

[data-subpage="moderation-logs"] .module-subpage-header h2::after {
  content: "";
}


/* Wider server dashboard + move sidebar further left */
.server-page {
  width: min(1760px, calc(100vw - 20px)) !important;
  margin-left: 10px !important;
  margin-right: auto !important;
}

.server-dashboard-layout {
  grid-template-columns: 260px minmax(0, 1fr) !important;
  gap: 18px !important;
}

.server-module-sidebar {
  margin-left: 0 !important;
}

.server-dashboard-content {
  min-width: 0 !important;
}

/* Module hub header tools */
.module-hub-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.module-hub-heading {
  margin-bottom: 0 !important;
}

.module-hub-heading-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Subpage header tools */
.module-subpage-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* Module ON/OFF toggle */
.module-power-toggle {
  min-height: 42px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.62);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 950;
  letter-spacing: 0.04em;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.module-power-toggle.loading {
  opacity: 0.6;
  pointer-events: none;
}

.module-power-track {
  position: relative;
  width: 54px;
  height: 28px;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.module-power-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28);
  transition: transform 0.18s ease, background 0.18s ease;
}

.module-power-text {
  min-width: 28px;
  text-align: center;
  font-size: 0.86rem;
}

.module-power-toggle.off {
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.72);
}

.module-power-toggle.off .module-power-text {
  color: #cbd5e1;
}

.module-power-toggle.on {
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(20, 83, 45, 0.22);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.10);
}

.module-power-toggle.on .module-power-track {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.85), rgba(22, 163, 74, 0.92));
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.22);
}

.module-power-toggle.on .module-power-knob {
  transform: translateX(26px);
  background: #ffffff;
}

.module-power-toggle.on .module-power-text {
  color: #86efac;
}

/* Responsive tidy-up */
@media (max-width: 1200px) {
  .server-page {
    width: min(100vw - 16px, 1760px) !important;
    margin-left: 8px !important;
  }
}

@media (max-width: 760px) {
  .module-hub-heading-row,
  .module-subpage-header {
    flex-direction: column;
  }

  .module-hub-heading-tools,
  .module-subpage-tools {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

/* Inside-module ON/OFF switches */

.setting-switch-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 17px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.1);
  cursor: pointer;
}

.setting-switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setting-switch-visual {
  position: relative;
  width: 82px;
  height: 34px;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.setting-switch-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 3px 12px rgba(0,0,0,0.32);
  transition: transform 0.18s ease;
  z-index: 2;
}

.setting-switch-off,
.setting-switch-on {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  z-index: 1;
}

.setting-switch-off {
  right: 12px;
  color: #cbd5e1;
}

.setting-switch-on {
  left: 13px;
  color: #dcfce7;
  opacity: 0;
}

.setting-switch-row input:checked + .setting-switch-visual {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.88), rgba(22, 163, 74, 0.92));
  border-color: rgba(34, 197, 94, 0.38);
  box-shadow:
    0 0 22px rgba(34, 197, 94, 0.14),
    inset 0 0 0 1px rgba(255,255,255,0.06);
}

.setting-switch-row input:checked + .setting-switch-visual .setting-switch-knob {
  transform: translateX(48px);
}

.setting-switch-row input:checked + .setting-switch-visual .setting-switch-off {
  opacity: 0;
}

.setting-switch-row input:checked + .setting-switch-visual .setting-switch-on {
  opacity: 1;
}

.setting-switch-copy strong,
.setting-switch-copy small {
  display: block;
}

.setting-switch-copy strong {
  color: rgba(248, 250, 252, 0.96);
  font-weight: 950;
}

.setting-switch-copy small {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

/* Make existing logging checkboxes feel closer to switches too */
.toggle-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 54px !important;
  height: 28px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  background: rgba(71, 85, 105, 0.95) !important;
  position: relative;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
  transition: transform 0.18s ease;
}

.toggle-row input[type="checkbox"]:checked {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.88), rgba(22, 163, 74, 0.92)) !important;
  border-color: rgba(34, 197, 94, 0.38) !important;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.12);
}

.toggle-row input[type="checkbox"]:checked::after {
  transform: translateX(26px);
}

@media (max-width: 620px) {
  .setting-switch-row {
    grid-template-columns: 1fr;
  }
}

/* Overview card state display */

.module-card-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}

.module-card-status-row small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.module-state-chip {
  min-width: 52px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

.module-state-chip.on {
  color: #dcfce7;
  background: rgba(20, 83, 45, 0.24);
  border-color: rgba(34, 197, 94, 0.30);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.08);
}

.module-state-chip.off {
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.38);
  border-color: rgba(148, 163, 184, 0.18);
}

.module-hub-card.state-off {
  border-color: rgba(148, 163, 184, 0.08);
}

.module-hub-card.state-on {
  border-color: rgba(0, 217, 255, 0.16);
}

/* Unsaved changes modal */

.unsaved-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(14px);
}

.unsaved-modal.hidden {
  display: none !important;
}

.unsaved-modal-card {
  width: min(560px, 100%);
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(5, 13, 31, 0.98), rgba(18, 18, 48, 0.98));
  border: 1px solid rgba(0, 217, 255, 0.22);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(0, 217, 255, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.unsaved-modal-card h2 {
  margin: 6px 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.unsaved-modal-card p {
  color: var(--muted);
  line-height: 1.65;
}

.unsaved-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.unsaved-modal-actions .button {
  min-height: 44px;
}

@media (max-width: 620px) {
  .unsaved-modal-actions .button {
    width: 100%;
  }
}

/* Smooth UI motion upgrade - controlled, no panel hover movement */

@keyframes modulrFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modulrFadeScale {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modulrDropdownReveal {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes modulrSubpageIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes modulrSoftPop {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }

  70% {
    transform: scale(1.025);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modulrStatusPulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 0 rgba(34, 197, 94, 0);
  }

  60% {
    transform: scale(1.03);
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.16);
  }

  100% {
    transform: scale(1);
  }
}

/* Page/subpage appearance */
.server-module-hub,
.module-subpage:not(.dashboard-view-hidden),
.server-dashboard-content > .panel:not(.dashboard-view-hidden) {
  animation: modulrFadeUp 0.28s ease both;
}

.module-subpage:not(.dashboard-view-hidden) {
  animation-name: modulrSubpageIn;
  animation-duration: 0.26s;
}

/* Custom dropdown motion */
.custom-select-menu {
  transform-origin: top center;
  will-change: opacity, transform;
}

.modulr-custom-select.open .custom-select-menu {
  animation: modulrDropdownReveal 0.18s ease both;
}

.custom-select-trigger,
.custom-select-menu button,
.sidebar-group button,
.selected-pill,
.warning-rule-row,
.save-status,
.button {
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease;
}

/* Keep buttons feeling responsive without moving whole panels */
.button:hover,
.custom-select-menu button:hover,
.sidebar-group button:hover {
  transform: translateY(-1px);
}

.button:active,
.custom-select-menu button:active,
.sidebar-group button:active {
  transform: translateY(0);
}

/* Sidebar dropdown items gently appear */
.sidebar-group[open] button,
.sidebar-group[open] .sidebar-disabled {
  animation: modulrFadeUp 0.18s ease both;
}

.sidebar-group[open] button:nth-of-type(1) {
  animation-delay: 0.015s;
}

.sidebar-group[open] button:nth-of-type(2) {
  animation-delay: 0.035s;
}

.sidebar-group[open] button:nth-of-type(3) {
  animation-delay: 0.055s;
}

.sidebar-group[open] button:nth-of-type(4) {
  animation-delay: 0.075s;
}

/* Unsaved changes modal animation */
.unsaved-modal:not(.hidden) {
  animation: modulrFadeScale 0.18s ease both;
}

.unsaved-modal:not(.hidden) .unsaved-modal-card {
  animation: modulrFadeScale 0.22s ease both;
}

/* Save badge animation */
.save-status.save-success {
  animation: modulrStatusPulse 0.34s ease both;
}

.save-status.save-error {
  animation: modulrSoftPop 0.24s ease both;
}

/* Role pills and warning rules appearing */
.selected-pill,
.warning-rule-row {
  animation: modulrFadeScale 0.2s ease both;
}

/* ON/OFF switches feel smoother */
.setting-switch-visual,
.setting-switch-knob,
.toggle-row input[type="checkbox"],
.toggle-row input[type="checkbox"]::after,
.module-state-chip {
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* Module overview status badge pop */
.module-state-chip {
  animation: modulrSoftPop 0.22s ease both;
}

/* Stop animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Smooth UI motion upgrade - controlled, no panel hover movement */

@keyframes modulrFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modulrFadeScale {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modulrDropdownReveal {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes modulrSubpageIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes modulrSoftPop {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }

  70% {
    transform: scale(1.025);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modulrStatusPulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 0 rgba(34, 197, 94, 0);
  }

  60% {
    transform: scale(1.03);
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.16);
  }

  100% {
    transform: scale(1);
  }
}

/* Page/subpage appearance */
.server-module-hub,
.module-subpage:not(.dashboard-view-hidden),
.server-dashboard-content > .panel:not(.dashboard-view-hidden) {
  animation: modulrFadeUp 0.28s ease both;
}

.module-subpage:not(.dashboard-view-hidden) {
  animation-name: modulrSubpageIn;
  animation-duration: 0.26s;
}

/* Custom dropdown motion */
.custom-select-menu {
  transform-origin: top center;
  will-change: opacity, transform;
}

.modulr-custom-select.open .custom-select-menu {
  animation: modulrDropdownReveal 0.18s ease both;
}

.custom-select-trigger,
.custom-select-menu button,
.sidebar-group button,
.selected-pill,
.warning-rule-row,
.save-status,
.button {
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease;
}

/* Keep buttons feeling responsive without moving whole panels */
.button:hover,
.custom-select-menu button:hover,
.sidebar-group button:hover {
  transform: translateY(-1px);
}

.button:active,
.custom-select-menu button:active,
.sidebar-group button:active {
  transform: translateY(0);
}

/* Sidebar dropdown items gently appear */
.sidebar-group[open] button,
.sidebar-group[open] .sidebar-disabled {
  animation: modulrFadeUp 0.18s ease both;
}

.sidebar-group[open] button:nth-of-type(1) {
  animation-delay: 0.015s;
}

.sidebar-group[open] button:nth-of-type(2) {
  animation-delay: 0.035s;
}

.sidebar-group[open] button:nth-of-type(3) {
  animation-delay: 0.055s;
}

.sidebar-group[open] button:nth-of-type(4) {
  animation-delay: 0.075s;
}

/* Unsaved changes modal animation */
.unsaved-modal:not(.hidden) {
  animation: modulrFadeScale 0.18s ease both;
}

.unsaved-modal:not(.hidden) .unsaved-modal-card {
  animation: modulrFadeScale 0.22s ease both;
}

/* Save badge animation */
.save-status.save-success {
  animation: modulrStatusPulse 0.34s ease both;
}

.save-status.save-error {
  animation: modulrSoftPop 0.24s ease both;
}

/* Role pills and warning rules appearing */
.selected-pill,
.warning-rule-row {
  animation: modulrFadeScale 0.2s ease both;
}

/* ON/OFF switches feel smoother */
.setting-switch-visual,
.setting-switch-knob,
.toggle-row input[type="checkbox"],
.toggle-row input[type="checkbox"]::after,
.module-state-chip {
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* Module overview status badge pop */
.module-state-chip {
  animation: modulrSoftPop 0.22s ease both;
}

/* Stop animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Moderation History Dashboard */

.history-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.case-history-list {
  display: grid;
  gap: 14px;
}

.case-history-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.10);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.025);
  animation: modulrFadeScale 0.2s ease both;
}

.case-history-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.case-history-top h3 {
  margin: 5px 0 0;
  color: var(--text);
}

.case-date {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
}

.case-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.case-history-grid span,
.case-reason {
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: rgba(226, 232, 240, 0.9);
  overflow-wrap: anywhere;
}

.case-history-grid strong,
.case-reason strong {
  display: block;
  color: var(--cyan);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.case-reason p {
  margin: 0;
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .history-toolbar {
    grid-template-columns: 1fr;
  }

  .history-toolbar .button {
    width: 100%;
  }

  .case-history-top {
    flex-direction: column;
  }

  .case-date {
    white-space: normal;
  }

  .case-history-grid {
    grid-template-columns: 1fr;
  }
}

/* Module overview grouping cleanup */

.module-hub-section-label {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.module-hub-section-label span {
  color: rgba(248, 250, 252, 0.96);
  font-weight: 950;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.module-hub-section-label small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.module-hub-section-label.secondary {
  margin-top: 30px;
}

.module-hub-grid-tools {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.utility-card {
  min-height: 230px;
  border-color: rgba(148, 163, 184, 0.10) !important;
}

.utility-card .module-card-icon {
  background:
    linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(0, 217, 255, 0.10));
}

@media (max-width: 760px) {
  .module-hub-section-label {
    flex-direction: column;
    align-items: flex-start;
  }

  .module-hub-grid-tools {
    grid-template-columns: 1fr !important;
  }
}

/* Clickable module cards */

.module-hub-card {
  cursor: pointer;
}

.module-hub-card button {
  cursor: pointer;
}

.module-hub-card:focus-within {
  border-color: rgba(0, 217, 255, 0.38);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.32),
    0 0 34px rgba(0, 217, 255, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.035);
}

/* Rule-based Auto Moderation UI */

.automod-rules-fieldset,
.automod-global-fieldset {
  display: grid;
  gap: 18px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.automod-disabled {
  opacity: 0.42;
  pointer-events: none;
  filter: grayscale(0.25);
}

.automod-rule-card {
  border-radius: 24px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.46), rgba(15, 23, 42, 0.32));
  border: 1px solid rgba(148, 163, 184, 0.10);
  box-shadow:
    0 16px 44px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.025);
  display: grid;
  gap: 16px;
}

.automod-rule-header .setting-switch-row {
  margin: 0;
}

.compact-switch {
  padding: 14px !important;
}

.automod-rule-body {
  display: grid;
  gap: 16px;
}

.automod-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.settings-info-box.mini {
  padding: 13px;
  border-radius: 16px;
}

.modulr-textarea {
  width: 100%;
  min-height: 140px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62));
  color: #e2e8f0;
  padding: 14px;
  outline: none;
  resize: vertical;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.018) inset,
    0 0 20px rgba(0, 217, 255, 0.035);
}

.modulr-textarea::placeholder {
  color: rgba(148, 163, 184, 0.72);
}

.modulr-textarea:focus {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

@media (max-width: 1050px) {
  .automod-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .automod-action-grid {
    grid-template-columns: 1fr;
  }
}

/* Remove distracting sweep/refresh animation from Auto Moderation subpage */

[data-subpage="moderation-automod"],
[data-subpage="moderation-automod"] *,
#automodPanel,
#automodPanel * {
  animation-name: none !important;
}

#automodPanel::before,
#automodPanel::after,
[data-subpage="moderation-automod"]::before,
[data-subpage="moderation-automod"]::after,
[data-subpage="moderation-automod"] .panel-shine,
[data-subpage="moderation-automod"] .shine,
[data-subpage="moderation-automod"] .sweep {
  display: none !important;
  animation: none !important;
  opacity: 0 !important;
}

/* AutoMod compact/collapsible rule layout */

.automod-rule-card {
  padding: 0 !important;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
}

.automod-rule-header {
  padding: 14px;
  cursor: pointer;
}

.automod-rule-header .setting-switch-row {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.automod-rule-header .setting-switch-copy small {
  max-width: 780px;
}

.automod-rule-body {
  padding: 0 18px 18px;
  overflow: hidden;
  animation: modulrFadeUp 0.18s ease both;
}

.automod-rule-card.rule-disabled .automod-rule-body {
  display: none !important;
}

.automod-rule-card.rule-disabled {
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.42), rgba(15, 23, 42, 0.24)) !important;
  border-color: rgba(148, 163, 184, 0.08) !important;
}

.automod-rule-card.rule-enabled {
  border-color: rgba(0, 217, 255, 0.20) !important;
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.24),
    0 0 26px rgba(0, 217, 255, 0.045),
    inset 0 1px 0 rgba(255,255,255,0.025) !important;
}

.automod-rule-card.master-disabled-card {
  opacity: 0.48;
}

.automod-rule-card.master-disabled-card .automod-rule-header {
  cursor: not-allowed;
}

.automod-rule-header::after {
  content: "Collapsed";
  display: inline-flex;
  margin-left: 96px;
  margin-top: 10px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  color: rgba(203, 213, 225, 0.78);
  background: rgba(51, 65, 85, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.automod-rule-card.rule-enabled .automod-rule-header::after {
  content: "Expanded";
  color: #dcfce7;
  background: rgba(20, 83, 45, 0.24);
  border-color: rgba(34, 197, 94, 0.24);
}

.automod-rule-card.rule-enabled .automod-rule-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.rule-content-disabled {
  opacity: 0.55;
}

.hidden-setting {
  display: none !important;
}

/* Make AutoMod easier to scan */

[data-subpage="moderation-automod"] .settings-info-box {
  margin-top: 4px;
}

[data-subpage="moderation-automod"] .settings-info-box p {
  margin-top: 4px;
}

[data-subpage="moderation-automod"] .settings-subgrid {
  gap: 12px;
}

[data-subpage="moderation-automod"] .automod-action-grid {
  gap: 12px;
}

[data-subpage="moderation-automod"] .modulr-textarea {
  min-height: 105px;
}

.automod-master-disabled .automod-rule-card:not(.rule-enabled) {
  opacity: 0.42;
}

@media (max-width: 760px) {
  .automod-rule-header::after {
    margin-left: 0;
  }

  .automod-rule-body {
    padding: 0 14px 14px;
  }
}

/* Remove AutoMod collapsed/expanded labels */
.automod-rule-header::after,
.automod-rule-card.rule-enabled .automod-rule-header::after {
  content: none !important;
  display: none !important;
}

/* Keep AutoMod rule rows compact without status badges */
.automod-rule-header {
  padding-bottom: 14px !important;
}

/* Make AutoMod switches clickable and reliable */
[data-subpage="moderation-automod"] .setting-switch-row {
  pointer-events: auto !important;
}

[data-subpage="moderation-automod"] .setting-switch-row input[type="checkbox"] {
  pointer-events: auto !important;
}

[data-subpage="moderation-automod"] .setting-switch-visual,
[data-subpage="moderation-automod"] .setting-switch-copy {
  pointer-events: none !important;
}

/* AutoMod rule switch click reliability */

[data-subpage="moderation-automod"] .automod-rule-header .setting-switch-row {
  cursor: pointer !important;
}

[data-subpage="moderation-automod"] .automod-rule-header input[type="checkbox"][name$="Enabled"] {
  pointer-events: auto !important;
}

[data-subpage="moderation-automod"] .automod-rule-card.master-disabled-card .setting-switch-row {
  cursor: not-allowed !important;
}

[data-subpage="moderation-automod"] .automod-rule-card:not(.master-disabled-card) .setting-switch-row {
  opacity: 1 !important;
}

/* Hard AutoMod switch reliability cleanup */
[data-subpage="moderation-automod"] .automod-rule-header::after,
[data-subpage="moderation-automod"] .automod-rule-card.rule-enabled .automod-rule-header::after {
  content: none !important;
  display: none !important;
}

[data-subpage="moderation-automod"] .setting-switch-row {
  pointer-events: auto !important;
  cursor: pointer !important;
}

[data-subpage="moderation-automod"] .setting-switch-row input[type="checkbox"] {
  pointer-events: auto !important;
}

[data-subpage="moderation-automod"] .setting-switch-visual,
[data-subpage="moderation-automod"] .setting-switch-copy {
  pointer-events: none !important;
}

/* AutoMod custom multi-select dropdowns */

.native-multi-hidden {
  display: none !important;
}

.custom-multi-select {
  position: relative;
  display: grid;
  gap: 12px;
}

.custom-multi-trigger {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62));
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 900;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.018) inset,
    0 0 20px rgba(0, 217, 255, 0.035);
}

.custom-multi-trigger:hover,
.custom-multi-select.open .custom-multi-trigger {
  border-color: rgba(0, 217, 255, 0.42);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.055),
    0 0 24px rgba(0, 217, 255, 0.08);
}

.custom-multi-trigger strong {
  color: var(--cyan);
  transition: transform 0.18s ease;
}

.custom-multi-select.open .custom-multi-trigger strong {
  transform: rotate(180deg);
}

.custom-multi-menu {
  display: none;
  position: absolute;
  z-index: 50;
  top: 56px;
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(3, 7, 18, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(0, 217, 255, 0.22);
  box-shadow:
    0 22px 70px rgba(0,0,0,0.42),
    0 0 28px rgba(0, 217, 255, 0.08);
  animation: modulrDropdownReveal 0.16s ease both;
}

.custom-multi-select.open .custom-multi-menu {
  display: grid;
  gap: 6px;
}

.custom-multi-menu button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(226, 232, 240, 0.88);
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.custom-multi-menu button:hover {
  background: rgba(0, 217, 255, 0.08);
  color: #ffffff;
}

.custom-multi-menu button.selected {
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.14), rgba(138, 63, 252, 0.10));
  color: #ffffff;
}

.custom-multi-menu button strong {
  color: var(--cyan);
}

.custom-multi-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 36px;
}

.custom-multi-pills .empty-inline-state {
  width: 100%;
}

.automod-global-fieldset .field-group {
  overflow: visible;
}

@media (max-width: 760px) {
  .custom-multi-menu {
    position: static;
    max-height: 240px;
  }
}

/* AutoMod custom multi dropdown visual cleanup */

.custom-multi-select {
  position: relative;
  isolation: isolate;
}

.custom-multi-select.open {
  z-index: 80;
}

.custom-multi-select.open .custom-multi-pills {
  display: none !important;
}

.custom-multi-menu {
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 1), rgba(8, 13, 32, 0.99)) !important;
  backdrop-filter: blur(18px);
  border-color: rgba(0, 217, 255, 0.32) !important;
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.62),
    0 0 36px rgba(0, 217, 255, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.035) !important;
  padding: 10px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 217, 255, 0.45) rgba(15, 23, 42, 0.8);
}

.custom-multi-menu::-webkit-scrollbar {
  width: 10px;
}

.custom-multi-menu::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.78);
  border-radius: 999px;
}

.custom-multi-menu::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, rgba(0, 217, 255, 0.7), rgba(138, 63, 252, 0.65));
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.9);
}

.custom-multi-menu button {
  min-height: 44px !important;
  padding: 0 14px !important;
  border: 1px solid transparent !important;
}

.custom-multi-menu button:hover {
  border-color: rgba(0, 217, 255, 0.18) !important;
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.10), rgba(138, 63, 252, 0.08)) !important;
}

.custom-multi-menu button strong {
  min-width: 22px;
  text-align: center;
  margin-left: 12px;
}

.custom-multi-pills {
  margin-top: 2px;
}

.custom-multi-pills .empty-inline-state {
  opacity: 0.72;
  border-style: dashed;
}

.automod-global-fieldset {
  overflow: visible !important;
}

.automod-global-fieldset .settings-subgrid,
.automod-global-fieldset .field-group {
  overflow: visible !important;
}

#automodPanel,
[data-subpage="moderation-automod"] {
  overflow: visible !important;
}

/* AutoMod dropdowns should float over the page, not push layout down */

.custom-multi-select {
  position: relative;
}

.custom-multi-menu {
  position: fixed !important;
  top: auto;
  left: auto;
  right: auto;
  width: auto;
  max-height: 280px;
  z-index: 9999 !important;
}

.custom-multi-select.open .custom-multi-menu {
  display: grid !important;
}

.custom-multi-menu.open-up {
  transform-origin: bottom center;
}

.custom-multi-select.open {
  z-index: auto !important;
}

#automodPanel,
[data-subpage="moderation-automod"],
.automod-global-fieldset,
.automod-global-fieldset .settings-subgrid,
.automod-global-fieldset .field-group {
  overflow: visible !important;
}

/* Final AutoMod dropdown positioning fix */

.custom-multi-select {
  position: relative !important;
  isolation: isolate !important;
  overflow: visible !important;
}

.custom-multi-select.open {
  z-index: 5000 !important;
}

.custom-multi-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-height: 280px !important;
  z-index: 9999 !important;
  transform: none !important;
}

.custom-multi-menu.open-up {
  top: calc(100% + 8px) !important;
  bottom: auto !important;
  transform: none !important;
}

.custom-multi-select.open .custom-multi-menu {
  display: grid !important;
}

.custom-multi-select.open .custom-multi-pills {
  display: none !important;
}

.automod-global-fieldset,
.automod-global-fieldset .settings-subgrid,
.automod-global-fieldset .field-group,
#automodPanel,
[data-subpage="moderation-automod"] {
  overflow: visible !important;
}

/* Stop the dropdown from visually attaching to the wrong side */
.custom-multi-trigger {
  position: relative !important;
  z-index: 2 !important;
}

.custom-multi-menu {
  margin-top: 0 !important;
}

/* AutoMod dropdowns open upward near page bottom */

.custom-multi-select {
  position: relative !important;
  overflow: visible !important;
}

.custom-multi-menu {
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  max-height: 280px !important;
  z-index: 9999 !important;
  top: calc(100% + 8px) !important;
  bottom: auto !important;
}

.custom-multi-select.open-up .custom-multi-menu {
  top: auto !important;
  bottom: calc(100% + 8px) !important;
  transform-origin: bottom center !important;
}

.custom-multi-select.open .custom-multi-pills {
  display: none !important;
}

.automod-global-fieldset,
.automod-global-fieldset .settings-subgrid,
.automod-global-fieldset .field-group,
#automodPanel,
[data-subpage="moderation-automod"] {
  overflow: visible !important;
}

/* FORCE FIX: AutoMod ignored channel / bypass role dropdowns always open upward */

[data-subpage="moderation-automod"] .custom-multi-select {
  position: relative !important;
  isolation: isolate !important;
  overflow: visible !important;
  z-index: 100 !important;
}

[data-subpage="moderation-automod"] .custom-multi-select.open {
  z-index: 99999 !important;
}

[data-subpage="moderation-automod"] .custom-multi-menu {
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  top: auto !important;
  bottom: calc(100% + 10px) !important;
  width: 100% !important;
  max-height: 250px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  z-index: 99999 !important;
  transform: none !important;
  margin: 0 !important;
}

[data-subpage="moderation-automod"] .custom-multi-menu.open-up {
  top: auto !important;
  bottom: calc(100% + 10px) !important;
}

[data-subpage="moderation-automod"] .custom-multi-select.open .custom-multi-menu {
  display: grid !important;
}

[data-subpage="moderation-automod"] .custom-multi-select.open .custom-multi-pills {
  display: none !important;
}

/* Keep the bottom AutoMod section from clipping upward dropdowns */
[data-subpage="moderation-automod"],
#automodPanel,
.automod-global-fieldset,
.automod-global-fieldset .settings-subgrid,
.automod-global-fieldset .field-group {
  overflow: visible !important;
}

/* Add enough breathing room above the dropdowns so upward menus look intentional */
[data-subpage="moderation-automod"] .automod-global-fieldset {
  padding-top: 270px !important;
  margin-top: -250px !important;
}

/* Replace AutoMod multi dropdowns with clean add + pill pickers */

[data-subpage="moderation-automod"] .automod-old-dropdown-hidden {
  display: none !important;
}

[data-subpage="moderation-automod"] .automod-global-fieldset {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.automod-pill-picker {
  display: grid;
  gap: 12px;
}

.automod-pill-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.automod-pill-picker-select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62));
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  font-weight: 900;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.018) inset,
    0 0 20px rgba(0, 217, 255, 0.035);
}

.automod-pill-picker-select:focus {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.automod-pill-picker-add {
  min-height: 48px;
  white-space: nowrap;
}

.automod-pill-picker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
}

.automod-picker-pill {
  max-width: 100%;
}

.automod-picker-pill span {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .automod-pill-picker-row {
    grid-template-columns: 1fr;
  }

  .automod-pill-picker-add {
    width: 100%;
  }
}

/* Global no-highlight / no-text-selection lock */

html,
body,
body *,
button,
a,
span,
p,
h1,
h2,
h3,
h4,
h5,
h6,
label,
small,
strong,
em,
div,
section,
article,
nav,
header,
footer,
main,
li,
ul,
ol,
table,
thead,
tbody,
tr,
td,
th,
input,
textarea,
select,
option {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* Stop browser blue highlight on taps/clicks */
* {
  -webkit-tap-highlight-color: transparent !important;
}

/* Keep form controls usable even though text cannot be highlighted */
input,
textarea,
select {
  cursor: text;
}

button,
a,
select,
option,
.custom-select-trigger,
.custom-multi-trigger,
.setting-switch-row,
.toggle-row {
  cursor: pointer;
}

/* AutoMod Test Tool */

.automod-tester-panel {
  margin-top: 18px;
  padding: 22px;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.46), rgba(15, 23, 42, 0.32));
  border: 1px solid rgba(0, 217, 255, 0.16);
  box-shadow:
    0 16px 44px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.025);
  display: grid;
  gap: 16px;
}

.automod-tester-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: start;
}

.automod-tester-result-wrap {
  display: grid;
  gap: 12px;
}

.automod-test-result {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.34);
}

.automod-test-result strong {
  color: rgba(248, 250, 252, 0.96);
  display: block;
  margin-bottom: 6px;
}

.automod-test-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.automod-test-result.safe {
  border-color: rgba(34, 197, 94, 0.26);
  background: rgba(20, 83, 45, 0.16);
}

.automod-test-result.triggered {
  border-color: rgba(250, 204, 21, 0.34);
  background: rgba(113, 63, 18, 0.16);
}

.automod-test-result.warning {
  border-color: rgba(249, 115, 22, 0.34);
  background: rgba(124, 45, 18, 0.14);
}

.automod-test-result.neutral {
  border-color: rgba(0, 217, 255, 0.16);
}

.automod-test-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.automod-test-grid span {
  padding: 11px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.42);
  color: rgba(226, 232, 240, 0.92);
  overflow-wrap: anywhere;
}

.automod-test-grid b {
  display: block;
  color: var(--cyan);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

@media (max-width: 880px) {
  .automod-tester-grid,
  .automod-test-grid {
    grid-template-columns: 1fr;
  }
}

/* FINAL AutoMod picker cleanup */

#automodForm .automod-original-hidden-select,
#automodForm .automod-old-dropdown-hidden,
#automodForm .custom-multi-select {
  display: none !important;
}

.automod-final-picker {
  display: grid;
  gap: 12px;
}

.automod-final-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.automod-final-picker-select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.66));
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  font-weight: 900;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.018) inset,
    0 0 20px rgba(0, 217, 255, 0.035);
}

.automod-final-picker-select:focus {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.automod-final-picker-select option {
  background: #030712;
  color: #e2e8f0;
}

.automod-final-picker-add {
  min-height: 48px;
  white-space: nowrap;
}

.automod-final-picker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
}

.automod-final-picker-pill span {
  overflow-wrap: anywhere;
}

[data-subpage="moderation-automod"] .automod-global-fieldset {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

@media (max-width: 760px) {
  .automod-final-picker-row {
    grid-template-columns: 1fr;
  }

  .automod-final-picker-add {
    width: 100%;
  }
}

/* CLEAN AutoMod dashboard UI */

[data-subpage="moderation-automod"] .custom-multi-select,
[data-subpage="moderation-automod"] .automod-pill-picker,
[data-subpage="moderation-automod"] .automod-final-picker,
[data-subpage="moderation-automod"] select[multiple] {
  display: none !important;
}

.automod-clean-rules {
  display: grid;
  gap: 14px;
}

.automod-clean-rule-card {
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(2, 6, 23, 0.48), rgba(15, 23, 42, 0.32));
  border: 1px solid rgba(148, 163, 184, 0.10);
  box-shadow:
    0 16px 44px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.025);
}

.automod-clean-rule-header {
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  padding: 16px !important;
}

.automod-clean-rule-body {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  animation: modulrFadeUp 0.16s ease both;
}

.automod-clean-rule-card.rule-disabled .automod-clean-rule-body {
  display: none !important;
}

.automod-clean-rule-card.rule-enabled {
  border-color: rgba(0, 217, 255, 0.22);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.24),
    0 0 26px rgba(0, 217, 255, 0.045),
    inset 0 1px 0 rgba(255,255,255,0.025);
}

.automod-master-disabled .automod-clean-rule-card {
  opacity: 0.48;
}

.automod-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hidden-setting {
  display: none !important;
}

.automod-clean-picker {
  display: grid;
  gap: 12px;
}

.automod-clean-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.automod-clean-picker-row select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.66));
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  font-weight: 900;
}

.automod-clean-picker-row select:focus {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.automod-clean-picker-row select option {
  background: #030712;
  color: #e2e8f0;
}

.automod-clean-picker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
}

.automod-clean-pill span {
  overflow-wrap: anywhere;
}

.automod-tester-panel {
  margin-top: 18px;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(2, 6, 23, 0.46), rgba(15, 23, 42, 0.32));
  border: 1px solid rgba(0, 217, 255, 0.16);
  box-shadow:
    0 16px 44px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.025);
  display: grid;
  gap: 16px;
}

.automod-tester-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
}

.automod-test-result {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(0, 217, 255, 0.16);
  background: rgba(2, 6, 23, 0.34);
}

.automod-test-result strong {
  color: rgba(248, 250, 252, 0.96);
  display: block;
  margin-bottom: 6px;
}

.automod-test-result p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .automod-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .automod-action-grid,
  .automod-clean-picker-row,
  .automod-tester-grid {
    grid-template-columns: 1fr;
  }

  .automod-clean-picker-row .button {
    width: 100%;
  }
}

/* Stable AutoMod picker menu */

#automodForm .automod-native-select-hidden,
#automodForm .automod-native-add-hidden {
  display: none !important;
}

.stable-automod-picker {
  position: relative;
  width: 100%;
  z-index: 20;
}

.stable-automod-picker.open {
  z-index: 9999;
}

.stable-automod-picker-trigger {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.66));
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  font-weight: 900;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.018) inset,
    0 0 20px rgba(0, 217, 255, 0.035);
}

.stable-automod-picker-trigger:hover,
.stable-automod-picker.open .stable-automod-picker-trigger {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.stable-automod-picker-trigger strong {
  color: var(--cyan);
  transition: transform 0.16s ease;
}

.stable-automod-picker.open .stable-automod-picker-trigger strong {
  transform: rotate(180deg);
}

.stable-automod-picker-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.98), rgba(8, 13, 32, 0.98));
  border: 1px solid rgba(0, 217, 255, 0.28);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.58),
    0 0 36px rgba(0, 217, 255, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.035);
}

.stable-automod-picker.open .stable-automod-picker-menu {
  display: grid;
  gap: 6px;
}

.stable-automod-picker.open-up .stable-automod-picker-menu {
  top: auto;
  bottom: calc(100% + 8px);
}

.stable-automod-picker-menu button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(226, 232, 240, 0.9);
  padding: 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 850;
  text-align: left;
}

.stable-automod-picker-menu button:hover {
  background:
    linear-gradient(135deg, rgba(0, 217, 255, 0.11), rgba(138, 63, 252, 0.08));
  border-color: rgba(0, 217, 255, 0.18);
  color: #ffffff;
}

.stable-automod-picker-menu button strong {
  color: var(--cyan);
}

.stable-automod-picker-empty {
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
}

.stable-automod-picker-menu {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 217, 255, 0.45) rgba(15, 23, 42, 0.8);
}

.stable-automod-picker-menu::-webkit-scrollbar {
  width: 10px;
}

.stable-automod-picker-menu::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.78);
  border-radius: 999px;
}

.stable-automod-picker-menu::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, rgba(0, 217, 255, 0.7), rgba(138, 63, 252, 0.65));
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.9);
}

.automod-clean-picker-row {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* AutoMod picker cleanup: no Add Channel / Add Role buttons */

#automodForm [data-picker-add],
#automodForm .automod-native-add-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#automodForm .automod-clean-picker-row {
  grid-template-columns: 1fr !important;
}

#automodForm .stable-automod-picker {
  width: 100%;
}

/* Message Management submodule */

.message-management-picker {
  display: grid;
  gap: 12px;
}

.message-management-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.message-management-picker-row select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.66));
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  font-weight: 900;
}

.message-management-picker-row select:focus {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.message-management-picker-row select option {
  background: #030712;
  color: #e2e8f0;
}

.message-management-picker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
}

@media (max-width: 760px) {
  .message-management-picker-row {
    grid-template-columns: 1fr;
  }

  .message-management-picker-row .button {
    width: 100%;
  }
}

/* Channel Controls submodule */

.channel-controls-picker {
  display: grid;
  gap: 12px;
}

.channel-controls-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.channel-controls-picker-row select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.66));
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  font-weight: 900;
}

.channel-controls-picker-row select:focus {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.channel-controls-picker-row select option {
  background: #030712;
  color: #e2e8f0;
}

.channel-controls-picker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
}

@media (max-width: 760px) {
  .channel-controls-picker-row {
    grid-template-columns: 1fr;
  }

  .channel-controls-picker-row .button {
    width: 100%;
  }
}

/* Moderation Actions command listing additions */

.moderation-actions-extra {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.moderation-actions-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.moderation-action-command-card {
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.46), rgba(15, 23, 42, 0.32));
  border: 1px solid rgba(0, 217, 255, 0.14);
  box-shadow:
    0 16px 44px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255,255,255,0.025);
}

.moderation-action-command-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.moderation-action-command-card code {
  color: var(--cyan);
  font-weight: 950;
  font-size: 0.98rem;
}

.moderation-action-command-card span {
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
}

.moderation-action-command-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .moderation-actions-extra-grid {
    grid-template-columns: 1fr;
  }

  .moderation-action-command-card div {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Message Management / Channel Controls picker cleanup */

#messageManagementAddIgnoredChannel,
#channelControlsAddIgnoredChannel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.message-management-picker-row,
.channel-controls-picker-row {
  grid-template-columns: 1fr !important;
}

/* FINAL dashboard anti-flicker styling */

.server-dashboard-content .module-subpage,
.server-dashboard-content .module-subpage *,
.server-dashboard-content .panel[data-detail-panel],
.server-dashboard-content .panel[data-detail-panel] * {
  animation-name: none !important;
}

.server-dashboard-content .module-subpage::before,
.server-dashboard-content .module-subpage::after,
.server-dashboard-content .panel[data-detail-panel]::before,
.server-dashboard-content .panel[data-detail-panel]::after {
  animation: none !important;
  opacity: 0 !important;
  display: none !important;
}

/* Keep switches/dropdowns usable while preventing subpage flashes */
.server-dashboard-content .setting-switch-visual,
.server-dashboard-content .setting-switch-knob,
.server-dashboard-content .custom-select-trigger,
.server-dashboard-content .stable-automod-picker-trigger {
  animation: none !important;
}

/* Moderation History upgrades */

.history-toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto !important;
  align-items: end;
}

.case-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.button-danger {
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(185, 28, 28, 0.88)) !important;
  color: #fff !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
}

.button-danger:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 38px rgba(185, 28, 28, 0.26),
    0 0 24px rgba(239, 68, 68, 0.16);
}

.case-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 22px;
}

.case-modal {
  width: min(920px, 100%);
  max-height: min(820px, 90vh);
  overflow-y: auto;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(0, 217, 255, 0.18);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.58),
    0 0 40px rgba(0, 217, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.035);
  padding: 22px;
}

.case-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.case-modal-header h2 {
  margin: 4px 0 0;
}

.case-modal-body {
  display: grid;
  gap: 14px;
}

.case-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.case-modal-grid span {
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: rgba(226, 232, 240, 0.92);
  overflow-wrap: anywhere;
}

.case-modal-grid strong {
  display: block;
  color: var(--cyan);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

@media (max-width: 980px) {
  .history-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  .history-toolbar,
  .case-modal-grid {
    grid-template-columns: 1fr !important;
  }

  .case-modal-header {
    flex-direction: column;
  }

  .case-modal-header .button {
    width: 100%;
  }
}

/* Modulr custom dialog */
.modulr-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(10px);
}

.modulr-dialog {
  width: min(520px, 100%);
  border-radius: 24px;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(0, 217, 255, 0.18);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.58),
    0 0 40px rgba(0, 217, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.035);
}

.modulr-dialog-header {
  margin-bottom: 12px;
}

.modulr-dialog-header h3 {
  margin: 4px 0 0;
  font-size: 1.5rem;
}

.modulr-dialog-body {
  margin-bottom: 20px;
}

.modulr-dialog-body p {
  margin: 0;
  line-height: 1.65;
  color: rgba(226, 232, 240, 0.92);
}

.modulr-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* Final Modulr custom dialog styling */
.modulr-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(12px);
}

.modulr-dialog {
  width: min(540px, 100%);
  border-radius: 24px;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(0, 217, 255, 0.18);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.58),
    0 0 40px rgba(0, 217, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.035);
}

.modulr-dialog-header {
  margin-bottom: 12px;
}

.modulr-dialog-header h3 {
  margin: 4px 0 0;
  font-size: 1.5rem;
}

.modulr-dialog-body {
  margin-bottom: 20px;
}

.modulr-dialog-body p {
  margin: 0;
  line-height: 1.65;
  color: rgba(226, 232, 240, 0.92);
}

.modulr-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* Tickets dashboard V1 */

.tickets-sidebar-category {
  margin-top: 12px;
}

.tickets-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tickets-stat-card,
.tickets-roadmap-panel,
.tickets-variable-box {
  border-radius: 24px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.46), rgba(15, 23, 42, 0.32));
  border: 1px solid rgba(0, 217, 255, 0.14);
  box-shadow:
    0 16px 44px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255,255,255,0.025);
}

.tickets-stat-card strong {
  display: block;
  color: var(--cyan);
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 8px;
}

.tickets-stat-card span {
  display: block;
  font-weight: 950;
  color: rgba(248, 250, 252, 0.95);
  margin-bottom: 6px;
}

.tickets-stat-card p,
.tickets-roadmap-panel p,
.tickets-variable-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tickets-roadmap-panel {
  display: grid;
  gap: 16px;
}

.tickets-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tickets-stage-grid article {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.09);
}

.tickets-stage-grid strong {
  display: block;
  color: rgba(248, 250, 252, 0.96);
  margin-bottom: 5px;
}

.tickets-stage-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.tickets-role-picker {
  display: grid;
  gap: 12px;
}

.tickets-role-picker select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.66));
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  font-weight: 900;
}

.tickets-role-picker select:focus {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.tickets-role-picker select option,
[data-subpage="tickets-settings"] select option {
  background: #030712;
  color: #e2e8f0;
}

.tickets-role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 38px;
}

.tickets-variable-box code {
  color: var(--cyan);
  font-weight: 950;
  margin-right: 8px;
}

[data-subpage^="tickets-"] {
  animation-name: none !important;
}

[data-subpage^="tickets-"] *,
#ticketsDashboardPanel,
#ticketsDashboardPanel * {
  animation-name: none !important;
}

@media (max-width: 1100px) {
  .tickets-overview-grid,
  .tickets-stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .tickets-overview-grid,
  .tickets-stage-grid {
    grid-template-columns: 1fr;
  }
}

/* Tickets is a top-level dashboard module, not part of Moderation */
.tickets-sidebar-category {
  margin-top: 12px;
}

/* Tickets top-level sidebar section */
.tickets-sidebar-category {
  margin-top: 12px !important;
}

.tickets-sidebar-category .server-sidebar-category-title {
  color: rgba(248, 250, 252, 0.96);
}

/* Tickets top-level sidebar section */
.tickets-sidebar-category {
  margin-top: 12px !important;
}

.tickets-sidebar-category .server-sidebar-category-title {
  color: rgba(248, 250, 252, 0.96);
}

/* Tickets top-level sidebar section */
.tickets-sidebar-category {
  margin-top: 12px !important;
}

.tickets-sidebar-category .server-sidebar-category-title {
  color: rgba(248, 250, 252, 0.96);
}

/* Tickets top-level sidebar section fix */
.tickets-sidebar-category {
  margin-top: 12px !important;
}

.tickets-sidebar-category .server-sidebar-category-title {
  width: 100%;
}

.tickets-sidebar-category .server-sidebar-category-items {
  display: grid;
  gap: 8px;
}

/* Final Tickets sidebar visibility fix */

.tickets-force-visible,
.tickets-sidebar-category {
  display: block !important;
  margin-top: 12px !important;
}

.tickets-sidebar-category .server-sidebar-category-title {
  width: 100% !important;
}

.tickets-sidebar-category .server-sidebar-category-items {
  display: grid !important;
  gap: 8px !important;
}

/* Correct Tickets top-level sidebar section */
.tickets-sidebar-category {
  margin-top: 12px !important;
}

.tickets-sidebar-category .server-sidebar-category-title {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.tickets-sidebar-category .server-sidebar-category-items {
  display: grid !important;
  gap: 8px !important;
}

/* Correct Tickets top-level sidebar section */
.tickets-sidebar-category {
  margin-top: 12px !important;
}

.tickets-sidebar-category .server-sidebar-category-title {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.tickets-sidebar-category .server-sidebar-category-items {
  display: grid !important;
  gap: 8px !important;
}

/* Final Tickets sidebar section lock */

.tickets-sidebar-category {
  margin-top: 12px !important;
}

.tickets-sidebar-category .server-sidebar-category-title {
  width: 100% !important;
}

.tickets-sidebar-category .server-sidebar-category-items {
  display: grid !important;
  gap: 8px !important;
}

.tickets-sidebar-category [data-dashboard-view="tickets-overview"],
.tickets-sidebar-category [data-dashboard-view="tickets-settings"] {
  width: 100% !important;
}

/* Tickets Stage 4 - Ticket Panels */

.module-subpage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.tickets-panels-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tickets-panels-sidebar,
.tickets-panel-editor {
  border-radius: 26px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(2, 6, 23, 0.46), rgba(15, 23, 42, 0.32));
  border: 1px solid rgba(0, 217, 255, 0.14);
  box-shadow:
    0 16px 44px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255,255,255,0.025);
}

.tickets-panel-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.tickets-panel-list-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.10);
  display: grid;
  gap: 12px;
}

.tickets-panel-list-card.active {
  border-color: rgba(0, 217, 255, 0.34);
  box-shadow: 0 0 28px rgba(0, 217, 255, 0.08);
}

.tickets-panel-list-card strong {
  display: block;
  color: rgba(248, 250, 252, 0.96);
  margin-bottom: 5px;
}

.tickets-panel-list-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.tickets-panel-empty {
  margin-top: 14px;
}

.tickets-panel-role-picker {
  display: grid;
  gap: 10px;
}

.tickets-panel-role-picker select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.66));
  color: #e2e8f0;
  padding: 0 14px;
  outline: none;
  font-weight: 900;
}

.tickets-panel-role-picker select:focus {
  border-color: rgba(0, 217, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(0, 217, 255, 0.065),
    0 0 28px rgba(0, 217, 255, 0.08);
}

.tickets-panel-role-picker select option,
[data-subpage="tickets-panels"] select option {
  background: #030712;
  color: #e2e8f0;
}

[data-subpage="tickets-panels"] .settings-actions {
  align-items: center;
}

@media (max-width: 980px) {
  .tickets-panels-layout {
    grid-template-columns: 1fr;
  }

  .module-subpage-actions {
    justify-content: flex-start;
  }
}

/* Final Tickets page interaction lock */

body[data-dashboard-view^="tickets-"] .server-dashboard-content > .dashboard-view-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body[data-dashboard-view^="tickets-"] #ticketsDashboardPanel {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 5 !important;
}

body[data-dashboard-view^="tickets-"] #ticketsDashboardPanel *,
body[data-dashboard-view^="tickets-"] [data-subpage^="tickets-"] * {
  pointer-events: auto;
}

body[data-dashboard-view^="tickets-"] .setting-switch-row {
  pointer-events: auto !important;
  cursor: pointer !important;
}

body[data-dashboard-view^="tickets-"] .setting-switch-row input[type="checkbox"] {
  pointer-events: auto !important;
}

body[data-dashboard-view^="tickets-"] .setting-switch-visual,
body[data-dashboard-view^="tickets-"] .setting-switch-copy {
  pointer-events: none !important;
}

body[data-dashboard-view^="tickets-"] select,
body[data-dashboard-view^="tickets-"] input,
body[data-dashboard-view^="tickets-"] textarea,
body[data-dashboard-view^="tickets-"] button {
  pointer-events: auto !important;
}
