:root {
  --bg: #030405;
  --bg-soft: #070a0d;
  --panel: rgba(8, 12, 16, 0.88);
  --panel-solid: #0b1015;
  --panel-2: #101720;
  --ink: #f8fafc;
  --ink-strong: #ffffff;
  --muted: rgba(226, 232, 240, 0.68);
  --soft: rgba(226, 232, 240, 0.46);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(34, 211, 238, 0.35);
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --yellow: #fbbf24;
  --green: #22c55e;
  --red: #ef4444;
  --discord: #5865f2;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Outfit, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  overflow-x: clip;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: var(--bg);
}

body::-webkit-scrollbar-thumb {
  background: #26313d;
  border-radius: 8px;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

img,
video {
  display: block;
}

.login-body {
  color: #ffffff;
  background: #030405;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 72px 32px 48px;
  overflow: hidden;
  isolation: isolate;
}

.login-video-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: #030405;
}

.login-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(0.92) contrast(1.08);
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.login-shell::before {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.55) 52%, rgba(0, 0, 0, 0.78)),
    linear-gradient(0deg, rgba(3, 4, 5, 0.96), transparent 45%, rgba(3, 4, 5, 0.62));
}

.login-shell::after {
  z-index: -1;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 74%);
}

.login-layout {
  width: min(1160px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) 440px;
  gap: 64px;
  align-items: center;
}

.login-copy,
.preview-panel,
.guild-card,
.panel-card,
.stat-card,
.empty-state,
.notice {
  animation: rise-in 520ms ease both;
}

.login-copy {
  max-width: 680px;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 760;
}

.login-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(14px);
}

.hero-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.login-copy h1 {
  margin: 0;
  max-width: 670px;
  margin-top: 22px;
  color: #ffffff;
  font-size: 68px;
  font-weight: 850;
  line-height: 1.02;
}

.hero-lead {
  max-width: 610px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 17px;
  line-height: 1.7;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.login-note {
  max-width: 460px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  line-height: 1.55;
}

.preview-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(7, 11, 15, 0.78);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(22px);
}

.preview-top {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.preview-top strong,
.preview-kicker {
  display: block;
}

.preview-top strong {
  margin-top: 2px;
  color: #ffffff;
  font-size: 18px;
}

.preview-kicker {
  color: rgba(255, 255, 255, 0.44);
  font-size: 12px;
  font-weight: 700;
}

.preview-state {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  color: #b9f6ca;
  font-size: 12px;
  font-weight: 760;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px;
}

.metric-block,
.preview-table {
  min-height: 104px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
  padding: 16px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.metric-block:hover,
.preview-table:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.metric-block small,
.metric-block strong {
  display: block;
}

.metric-block small {
  color: rgba(255, 255, 255, 0.58);
}

.metric-block strong {
  margin-top: 14px;
  font-size: 30px;
}

.metric-block.wide,
.preview-table {
  grid-column: 1 / -1;
}

.preview-table {
  display: grid;
  gap: 10px;
}

.preview-table div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.preview-table b {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  border-radius: 999px;
}

.preview-table span {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-table b {
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.22);
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.preview-modal:target {
  display: flex;
}

.preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
}

.preview-modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.09), transparent 38%),
    rgba(7, 11, 15, 0.96);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.62), 0 0 36px rgba(34, 211, 238, 0.1);
  animation: modal-in 180ms ease both;
}

.preview-modal-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-modal-head h2 {
  margin: 2px 0 0;
  color: #ffffff;
  font-size: 24px;
}

.preview-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 850;
  background: rgba(255, 255, 255, 0.055);
}

.preview-demo-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 20px 0;
}

.preview-demo-tabs span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.05);
}

.preview-demo-tabs span:first-child {
  color: #001216;
  border-color: rgba(34, 211, 238, 0.62);
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
}

.preview-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 20px;
}

.preview-demo-card {
  min-height: 160px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.preview-demo-card.wide {
  grid-column: 1 / -1;
}

.preview-demo-card small {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.preview-demo-card strong {
  color: #ffffff;
  font-size: 24px;
}

.preview-demo-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.55;
}

.mini-embed {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-left: 4px solid #ec3bff;
  border-radius: 7px;
  background: #2b2d31;
}

.mini-embed b {
  color: #ffffff;
}

.mini-embed span {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  color: #dbdee1;
  background: #202225;
}

.preview-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px 20px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px;
  overflow: hidden;
  box-sizing: border-box;
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(4, 8, 12, 0.96), rgba(5, 8, 11, 0.92)),
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px);
  background-size: auto, 42px 42px;
  box-shadow: 22px 0 70px rgba(0, 0, 0, 0.22);
}

.brand {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.14);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

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

.brand strong {
  font-size: 18px;
}

.brand small {
  color: rgba(255, 255, 255, 0.52);
}

.nav-stack {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  margin-right: -6px;
  padding-right: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.5) rgba(255, 255, 255, 0.05);
}

.nav-section {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.nav-section-title {
  display: block;
  padding: 0 4px 2px;
  color: rgba(226, 232, 240, 0.42);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-stack::-webkit-scrollbar {
  width: 8px;
}

.nav-stack::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.nav-stack::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 8, 11, 0.94);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.76), rgba(255, 255, 255, 0.24));
}

.nav-stack::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.95), rgba(255, 255, 255, 0.34));
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.66);
  overflow: hidden;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  inset: auto 12px 6px 42px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.95), rgba(251, 191, 36, 0.65));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-link:not(.nav-parent) > span:last-child,
.nav-parent > span:first-child > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-link.active,
.nav-link.is-active,
.nav-link:hover {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.2);
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.nav-link.is-active::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-symbol {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 7px;
  color: rgba(103, 232, 249, 0.92);
  font-size: 10px;
  font-weight: 950;
  background: rgba(34, 211, 238, 0.08);
}

.nav-group {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.nav-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-parent > span:first-child {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-caret {
  color: rgba(34, 211, 238, 0.8);
  transition: transform 180ms ease;
}

.nav-subtabs {
  max-height: 0;
  display: grid;
  gap: 6px;
  overflow: hidden;
  padding-left: 12px;
  opacity: 0;
  transform: translateY(-5px);
  transition: max-height 220ms ease, opacity 180ms ease, transform 180ms ease;
}

.nav-group.is-open .nav-subtabs {
  max-height: 320px;
  opacity: 1;
  transform: translateY(0);
}

.nav-group.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-subtabs a {
  padding: 9px 10px;
  border-left: 2px solid rgba(34, 211, 238, 0.16);
  border-radius: 0 8px 8px 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav-subtabs a:hover,
.nav-subtabs a.is-active {
  color: #ffffff;
  border-left-color: var(--cyan);
  background: rgba(34, 211, 238, 0.09);
  transform: translateX(2px);
}

.sidebar-footer {
  flex: 0 0 auto;
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #f5f5f5;
}

.user-chip img,
.guild-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-chip img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.shell {
  min-height: 100vh;
  margin-left: 270px;
  padding: 34px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1,
.section-title h2,
.guild-card h2,
.empty-state h1,
.empty-state h2 {
  margin: 0;
}

.page-header h1 {
  color: #ffffff;
  font-size: 34px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.ghost-button,
.ghost-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 190ms ease, filter 190ms ease, background 190ms ease, border-color 190ms ease;
}

.primary-button {
  color: #001216;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.secondary-button,
.ghost-action {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.secondary-button:hover,
.ghost-action:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
}

.ghost-button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.ghost-button:hover {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
}

.large {
  min-height: 52px;
  padding: 0 22px;
}

.server-browser-header {
  align-items: flex-start;
}

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 360px));
  gap: 16px;
  align-items: stretch;
}

.guild-card,
.panel-card,
.stat-card,
.empty-state,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.guild-card {
  position: relative;
  overflow: hidden;
  min-height: 172px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 45%),
    var(--panel);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.guild-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.8), rgba(236, 59, 255, 0.42), transparent);
  opacity: 0;
  transition: opacity 220ms ease;
}

.guild-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46), 0 0 28px rgba(34, 211, 238, 0.08);
}

.guild-card:hover::before {
  opacity: 1;
}

.guild-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 850;
}

.large-icon {
  width: 68px;
  height: 68px;
}

.guild-content {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
}

.guild-content h2 {
  min-width: 0;
  color: #ffffff;
  font-size: 21px;
  line-height: 1.16;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.guild-content p,
.muted {
  margin: 0;
  color: var(--muted);
}

.status-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.055);
}

.status-pill.online {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.1);
}

.status-pill.pending {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.1);
}

.guild-action {
  align-self: end;
  justify-self: start;
  min-width: 150px;
  max-width: 100%;
}

.guild-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  color: #d1fae5;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.36);
}

.command-center {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 0.62fr);
  gap: 16px;
  margin-bottom: 16px;
}

.command-hero,
.health-panel,
.module-card,
.quick-action-card,
.quick-publish-card button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(16, 24, 33, 0.92), rgba(6, 9, 13, 0.86)),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
}

.command-hero::before,
.module-card::before,
.health-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.95), rgba(139, 92, 246, 0.72), rgba(251, 191, 36, 0.7));
}

.command-hero h2 {
  max-width: 720px;
  margin: 0 0 10px;
  color: #ffffff;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.02;
}

.command-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.command-badges span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.055);
}

.command-badges b {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-action-card,
.quick-publish-card button {
  width: 100%;
  min-height: 96px;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: transform 190ms ease, border-color 190ms ease, background 190ms ease;
}

.quick-action-card > *,
.quick-publish-card button > *,
.module-card > * {
  position: relative;
  z-index: 1;
}

.quick-action-card:hover,
.quick-publish-card button:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.34);
}

.quick-publish-card button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.quick-action-card span,
.quick-publish-card span,
.module-card small,
.health-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.quick-action-card strong,
.quick-publish-card strong {
  color: #ffffff;
  font-size: 16px;
}

.health-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
}

.health-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.health-head strong {
  color: #ffffff;
  font-size: 20px;
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.health-row b {
  color: #ffffff;
  font-size: 13px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.module-card {
  min-height: 138px;
  display: grid;
  align-content: end;
  gap: 7px;
  padding: 16px;
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.module-card strong {
  color: #ffffff;
  font-size: 18px;
}

.module-card b {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.module-state {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.06);
}

.module-card.is-enabled .module-state {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.1);
}

.accent-cyan {
  --module-accent: rgba(34, 211, 238, 0.72);
}

.accent-violet {
  --module-accent: rgba(139, 92, 246, 0.72);
}

.accent-green {
  --module-accent: rgba(34, 197, 94, 0.72);
}

.accent-amber {
  --module-accent: rgba(251, 191, 36, 0.72);
}

.accent-rose {
  --module-accent: rgba(244, 63, 94, 0.72);
}

.accent-blue {
  --module-accent: rgba(88, 101, 242, 0.72);
}

.module-card::after,
.quick-action-card::after,
.quick-publish-card button::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 64px;
  background: linear-gradient(0deg, rgba(34, 211, 238, 0.1), transparent);
  background: linear-gradient(0deg, color-mix(in srgb, var(--module-accent, rgba(34, 211, 238, 0.6)) 20%, transparent), transparent);
  opacity: 0.9;
  pointer-events: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.guild-section-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 13, 0.86);
  backdrop-filter: blur(16px);
}

.guild-section-nav a {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.045);
}

.guild-section-nav a:hover {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.09);
}

.guild-section-nav a.is-active {
  color: #001216;
  border-color: rgba(34, 211, 238, 0.58);
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.2);
}

.dashboard-tabs {
  display: block;
}

.dashboard-section {
  display: none;
  animation: tab-fade 180ms ease both;
}

.dashboard-section.is-active {
  display: block;
}

form.dashboard-section.settings-panel.is-active {
  display: grid;
}

.content-grid.dashboard-section.is-active {
  display: grid;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}

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

.info-grid div,
.command-grid div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.info-grid span,
.command-grid span,
.bot-profile-row span {
  color: var(--muted);
  font-size: 12px;
}

.info-grid strong,
.command-grid strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.feature-list span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 780;
  background: rgba(34, 211, 238, 0.07);
}

.bot-profile-card {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.bot-banner-preview {
  width: 100%;
  height: 124px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(251, 191, 36, 0.12));
}

.empty-banner {
  display: block;
}

.bot-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-top: -28px;
}

.bot-avatar-preview {
  width: 68px;
  height: 68px;
  border: 4px solid #101318;
  border-radius: 999px;
  object-fit: cover;
  background: #101318;
}

.bot-profile-row strong,
.bot-profile-row span {
  display: block;
}

.compact-checks label,
.custom-command-enabled {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-checks input,
.custom-command-enabled input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.command-grid,
.custom-command-list {
  display: grid;
  gap: 10px;
}

.custom-command-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 100px;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.custom-command-response {
  grid-column: 1 / -1;
}

.custom-command-response textarea {
  min-height: 86px;
}

.automation-section {
  display: grid;
  gap: 16px;
}

.automation-heading {
  max-width: 920px;
}

.automation-grid,
.automation-panels {
  display: grid;
  gap: 18px;
  align-items: start;
}

.automation-subtabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  animation: subtabs-down 220ms ease both;
}

.automation-subtab {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.automation-subtab span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.1);
  font-size: 18px;
}

.automation-subtab strong {
  font-size: 14px;
}

.automation-subtab:hover,
.automation-subtab.is-active {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-1px);
}

.automation-card {
  align-content: start;
  display: none;
}

.automation-card.is-active {
  display: grid;
  animation: panel-slide-down 220ms ease both;
}

.automation-card:not(.is-active),
[data-automation-panel]:not(.is-active),
[data-social-panel]:not(.is-active) {
  display: none !important;
}

.automation-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.automation-card-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
}

.automation-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.switch-field {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.86);
}

.switch-field input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.autorole-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.055);
}

.autorole-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.autorole-split section {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.role-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.role-check-grid label {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.role-check-grid input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.special-mention-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 180px));
  gap: 8px;
}

.special-mention-grid label {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 820;
  background: rgba(250, 204, 21, 0.075);
}

.special-mention-grid input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.invite-toolbox {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr);
  gap: 14px;
}

.invite-leaderboard,
.invite-rewards {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(163, 230, 53, 0.16);
  border-radius: 8px;
  background: rgba(163, 230, 53, 0.05);
}

.leaderboard-list {
  display: grid;
  gap: 8px;
}

.leaderboard-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.leaderboard-list span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.invite-reward-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.5fr) minmax(180px, 1fr);
  gap: 10px;
}

.inline-fields {
  display: grid;
  grid-template-columns: minmax(90px, 0.45fr) minmax(160px, 1fr);
  gap: 8px;
}

.social-section .automation-card-head {
  border-bottom-color: rgba(56, 189, 248, 0.16);
}

.announcement-scheduler {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(250, 204, 21, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.08), rgba(34, 211, 238, 0.035)),
    rgba(255, 255, 255, 0.025);
}

.scheduled-announcement-card {
  display: grid;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.scheduled-announcement-card.is-hidden {
  display: none;
}

.scheduled-announcement-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.input-addon {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.045);
}

.scheduled-design-details {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.scheduled-design-details summary {
  cursor: pointer;
  color: #ffffff;
  font-weight: 820;
}

.compact-field-row {
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) 90px;
}

.compact-roles .role-check-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.schedule-meta {
  margin: 0;
  font-size: 12px;
}

.publish-panel-form,
.publish-action-row {
  display: grid;
  gap: 8px;
}

.publish-action-row {
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.045);
}

.compact-publish-row {
  grid-template-columns: max-content minmax(0, 1fr);
  padding: 10px;
}

.automation-fields {
  display: grid;
  gap: 10px;
}

.automation-field-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(150px, 1fr) 90px 82px;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.automation-field-row.is-hidden {
  display: none;
}

.field-remove-button,
.add-field-button {
  min-height: 40px;
}

.field-remove-button {
  padding: 0 12px;
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 8px;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.08);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.field-remove-button:hover {
  border-color: rgba(248, 113, 113, 0.42);
  color: #ffffff;
  background: rgba(248, 113, 113, 0.14);
}

.field-row-spacer {
  min-height: 40px;
}

.add-field-button {
  justify-self: start;
}

.add-field-button[hidden] {
  display: none;
}

.automation-preview {
  display: grid;
  gap: 8px;
}

.discord-preview-content {
  color: #dbdee1;
  font-size: 13px;
}

.automation-preview-fields {
  display: grid;
  gap: 8px;
}

.automation-preview-field {
  display: grid;
  gap: 3px;
}

.automation-preview-field strong {
  font-size: 13px;
}

.automation-preview-field span {
  color: #dbdee1;
  font-size: 13px;
  line-height: 1.4;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(16, 24, 33, 0.92), rgba(7, 10, 13, 0.88)),
    var(--panel);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.9), transparent);
}

.stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.9), transparent);
}

.stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.9), transparent);
}

.stat-card:nth-child(4)::before {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.9), transparent);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.34);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.38), 0 0 24px rgba(34, 211, 238, 0.08);
}

.stat-card span,
.ticket-row span {
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 30px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.panel-card {
  padding: 20px;
}

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

.form-alert {
  padding: 12px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  color: #fecaca;
  font-size: 13px;
  font-weight: 760;
  background: rgba(127, 29, 29, 0.3);
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

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

.upload-card {
  min-height: 164px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-areas:
    "preview copy"
    "preview action";
  align-items: center;
  gap: 12px 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 45%),
    rgba(255, 255, 255, 0.045);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.upload-card:hover,
.upload-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.42);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), transparent 48%),
    rgba(255, 255, 255, 0.065);
}

.upload-preview {
  grid-area: preview;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.avatar-preview {
  border-radius: 999px;
}

.banner-upload-card {
  grid-template-columns: 122px minmax(0, 1fr);
}

.banner-upload-preview {
  width: 122px;
  border-radius: 8px;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-empty-line {
  width: 72%;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.2), rgba(236, 59, 255, 0.18));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.12);
}

.upload-copy {
  grid-area: copy;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.upload-copy strong,
.upload-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-copy strong {
  color: #ffffff;
  font-size: 15px;
}

.upload-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.upload-action {
  grid-area: action;
  width: fit-content;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 8px;
  color: #c8fbff;
  font-size: 12px;
  font-weight: 850;
  background: rgba(34, 211, 238, 0.09);
}

.section-title {
  margin-bottom: 4px;
}

label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  padding: 0 12px;
  outline: none;
}

textarea {
  min-height: 170px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

select option {
  color: #0b1015;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.color-input {
  min-height: 46px;
  padding: 5px;
}

.editor-title {
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.option-editor {
  display: grid;
  gap: 12px;
}

.option-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.option-editor-head span {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.option-editor-head small {
  color: var(--muted);
}

.option-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(160px, 0.9fr) minmax(150px, 0.6fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.option-description {
  grid-column: 1 / -1;
}

.emoji-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.emoji-trigger,
.emoji-clear {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.emoji-trigger {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
}

.emoji-trigger:hover,
.emoji-clear:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.09);
}

.emoji-trigger-preview {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 24px;
  line-height: 1;
}

.emoji-trigger-preview img,
.emoji-footer-preview img,
.emoji-item-graphic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.emoji-trigger-name {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emoji-clear {
  padding: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 18px;
  font-weight: 850;
}

.emoji-picker-layer[hidden] {
  display: none;
}

.emoji-picker-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.emoji-picker-popover {
  position: fixed;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #111318;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
  pointer-events: auto;
}

.emoji-search-row {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d1014;
}

.emoji-search-row input {
  min-height: 40px;
  background: #1b1f25;
}

.emoji-picker-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
}

.emoji-tabs {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  padding: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d1014;
}

.emoji-tab {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  cursor: pointer;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 21px;
}

.emoji-tab:hover,
.emoji-tab.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.emoji-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  padding: 10px;
}

.emoji-grid::-webkit-scrollbar,
.emoji-tabs::-webkit-scrollbar {
  width: 7px;
}

.emoji-grid::-webkit-scrollbar-track,
.emoji-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.emoji-grid::-webkit-scrollbar-thumb,
.emoji-tabs::-webkit-scrollbar-thumb {
  background: #3d444f;
  border-radius: 7px;
}

.emoji-item {
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.emoji-item:hover,
.emoji-item:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.emoji-item-graphic,
.emoji-footer-preview {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 27px;
  line-height: 1;
}

.emoji-empty {
  grid-column: 1 / -1;
  padding: 28px 10px;
  color: var(--muted);
  text-align: center;
}

.emoji-footer {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d1014;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 780;
}

.discord-preview {
  display: grid;
  gap: 10px;
  padding: 14px 14px 14px 16px;
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  background: #2b2d31;
  color: #f2f3f5;
}

.discord-preview strong {
  font-size: 14px;
}

.discord-preview-description {
  margin: 0;
  max-height: 220px;
  overflow: hidden;
  color: #dbdee1;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.discord-preview-banner {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 6px;
}

.discord-preview-line {
  min-height: 18px;
}

.discord-preview-line.discord-heading {
  margin-top: 2px;
  color: #ffffff;
  font-weight: 800;
}

.discord-preview-line.level-1 {
  font-size: 18px;
}

.discord-preview-line.level-2 {
  font-size: 16px;
}

.discord-preview-line.level-3 {
  font-size: 14px;
}

.discord-subtext {
  color: #949ba4;
  font-size: 12px;
}

.discord-quote {
  margin: 2px 0;
  padding-left: 10px;
  border-left: 3px solid #4e5058;
  color: #dbdee1;
}

.discord-quote.nested {
  margin-left: 10px;
  border-left-color: #6d6f78;
}

.discord-list-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
}

.discord-list-marker {
  color: #b5bac1;
  font-weight: 700;
}

.discord-preview code {
  padding: 2px 4px;
  border-radius: 4px;
  background: #1e1f22;
  color: #f2f3f5;
  font-family: Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
}

.discord-preview pre {
  margin: 5px 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 9px 10px;
  border-radius: 6px;
  background: #1e1f22;
  white-space: pre;
}

.discord-preview pre code {
  padding: 0;
  background: transparent;
}

.discord-preview a {
  color: #00a8fc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.discord-inline-emoji {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin: 0 1px;
  vertical-align: -0.28em;
}

.discord-inline-emoji img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 0;
}

.discord-mention,
.discord-command,
.discord-timestamp {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 4px;
  border-radius: 4px;
  color: #dee0fc;
  background: rgba(88, 101, 242, 0.28);
  font-weight: 700;
}

.discord-command {
  color: #d7e3ff;
  background: rgba(88, 101, 242, 0.22);
}

.discord-spoiler {
  border-radius: 3px;
  background: #111214;
  color: transparent;
  transition: color 120ms ease;
}

.discord-spoiler:hover {
  color: #dbdee1;
}

.discord-preview small {
  color: #b5bac1;
  font-weight: 700;
}

.select-preview {
  margin-top: 10px;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #dbdee1;
  font-size: 13px;
  border: 1px solid #3f4147;
  border-radius: 6px;
  background: #2b2d31;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.side-stack {
  display: grid;
  gap: 18px;
}

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

.ticket-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ticket-row strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  max-width: 720px;
  padding: 28px;
}

.empty-state p {
  color: var(--muted);
}

[data-dashboard-section]:not(.is-active) {
  display: none !important;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tab-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

@keyframes subtabs-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

@keyframes panel-slide-down {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

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

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

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

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.56;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

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

@media (max-width: 980px) {
  .login-layout,
  .command-center,
  .command-hero,
  .content-grid,
  .metric-grid,
  .admin-grid,
  .info-grid,
  .upload-grid,
  .automation-subtabs,
  .invite-toolbox,
  .autorole-split {
    grid-template-columns: 1fr;
  }

  .login-layout {
    min-height: auto;
  }

  .login-copy h1 {
    font-size: 52px;
  }

  .preview-panel {
    width: min(520px, 100%);
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .nav-stack {
    flex: none;
    max-height: none;
    margin-right: 0;
    padding-right: 0;
    overflow: visible;
  }

  .module-grid,
  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shell {
    margin-left: 0;
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .page-header,
  .guild-heading,
  .guild-card,
  .module-grid,
  .quick-actions,
  .two-columns,
  .custom-command-row,
  .automation-field-row,
  .invite-reward-row,
  .inline-fields,
  .option-row,
  .upload-card,
  .banner-upload-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .guild-action {
    width: 100%;
  }

  .upload-card,
  .banner-upload-card {
    grid-template-areas:
      "preview"
      "copy"
      "action";
  }

  .upload-preview,
  .banner-upload-preview {
    width: 100%;
    height: 132px;
  }

  .avatar-preview {
    width: 132px;
    border-radius: 999px;
  }

  .option-description {
    grid-column: auto;
  }

  .emoji-picker-popover {
    left: 12px !important;
    right: 12px;
    width: calc(100vw - 24px) !important;
  }

  .page-header {
    display: grid;
  }

  .login-shell {
    padding: 32px 18px;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .hero-lead {
    font-size: 16px;
  }

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

  .preview-demo-grid {
    grid-template-columns: 1fr;
  }

  .metric-block.wide,
  .preview-table,
  .preview-demo-card.wide {
    grid-column: auto;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .ghost-action {
    width: 100%;
  }
}
