/* ChillBot Dashboard — burgundy accent */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Roboto:wght@400;500;700&display=swap");

:root {
  --bg: #212121;
  --surface: #303030;
  --surface2: #424242;
  --surface3: #1e1e1e;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --primary: #8b2942;
  --primary-dark: #641e30;
  --primary-hover: #a83352;
  --primary-soft: #c44d6e;
  --primary-rgb: 139, 41, 66;
  --on-primary: #fff;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --ok: #66bb6a;
  --error: #ef5350;
  --radius: 12px;
  --radius-xl: 24px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.42);
  --appbar-h: 64px;
  --max-w: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* --- App shell --- */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.app-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--appbar-h);
  padding: 0 1.5rem;
  background: rgba(48, 48, 48, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.app-bar-start,
.app-bar-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--text);
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: radial-gradient(circle farthest-corner at center, var(--primary) 0%, var(--primary-dark) 100%);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
}

.logo-img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.35rem 0.25rem 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-menu img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-menu-name {
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary,
.btn-orange {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--on-primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
}

.btn-primary:hover,
.btn-orange:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  color: var(--on-primary);
}

.btn-discord {
  background: var(--discord);
  color: #fff;
  text-transform: none;
  font-weight: 600;
}

.btn-discord:hover {
  background: var(--discord-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-transform: none;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.8rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

/* --- Landing --- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  background: radial-gradient(circle farthest-corner at center, #414141 0%, #141414 100%);
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 0.85rem;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 0 2rem;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
}

/* --- Landing hero (legacy light theme kept for safety) --- */
.hero--landing {
  position: relative;
  overflow: hidden;
  justify-content: flex-start;
  padding: clamp(3rem, 7vw, 5.5rem) 1.5rem clamp(3.5rem, 6vw, 5rem);
}

/* --- Public landing (dark wine, wow) --- */
.page-landing {
  --landing-wine: #8b2942;
  --landing-hot: #c43d5e;
  --landing-rose: #f0b7c4;
  --landing-cream: rgba(250, 242, 240, 0.94);
  --landing-fog: rgba(250, 242, 240, 0.7);
  --landing-line: rgba(250, 242, 240, 0.14);
  --bg: #160a10;
  background: #160a10;
  color: var(--landing-cream);
}

.page-landing .app-preloader {
  background: #160a10;
}

.page-landing .app-preloader-title {
  color: rgba(250, 242, 240, 0.88);
  font-family: Manrope, system-ui, sans-serif;
}

.page-landing .app-bar--public {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(22, 10, 16, 0.78);
  border-bottom: 1px solid var(--landing-line);
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.page-landing .nav-link--public {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
}

.page-landing .nav-link--public.active {
  background: rgba(196, 61, 94, 0.28);
}

.page-landing .app-footer {
  background: #10060a;
  border-top: 1px solid var(--landing-line);
}

.page-landing .app-footer-brand,
.page-landing .app-footer-links a {
  color: rgba(246, 235, 234, 0.7);
}

.page-landing .app-footer-links a:hover {
  color: #fff;
}

.landing-hero {
  position: relative;
  min-height: calc(100vh - var(--appbar-h));
  min-height: calc(100dvh - var(--appbar-h));
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.5rem) 5vw 3rem;
}

.landing-plane {
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(ellipse 55% 45% at var(--mx) var(--my), rgba(196, 61, 94, 0.3), transparent 60%),
    radial-gradient(ellipse 70% 55% at 85% 35%, rgba(139, 41, 66, 0.4), transparent 58%),
    radial-gradient(ellipse 50% 40% at 12% 85%, rgba(90, 24, 40, 0.55), transparent 55%),
    linear-gradient(155deg, #1e0c14 0%, #12080c 42%, #241018 100%);
}

.landing-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: -3;
  opacity: 0.55;
}

.landing-orb--a {
  width: min(42vw, 520px);
  height: min(42vw, 520px);
  right: 8%;
  top: 12%;
  background: radial-gradient(circle, rgba(196, 61, 94, 0.55), transparent 70%);
  animation: landing-drift-a 14s ease-in-out infinite;
}

.landing-orb--b {
  width: min(36vw, 420px);
  height: min(36vw, 420px);
  left: -6%;
  bottom: 5%;
  background: radial-gradient(circle, rgba(92, 26, 44, 0.7), transparent 70%);
  animation: landing-drift-b 18s ease-in-out infinite;
}

@keyframes landing-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-4%, 6%) scale(1.08); }
}

@keyframes landing-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, -4%) scale(1.12); }
}

.landing-sweep {
  position: absolute;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(246, 235, 234, 0.045) 48%,
    rgba(240, 183, 196, 0.09) 50%,
    rgba(246, 235, 234, 0.04) 52%,
    transparent 65%
  );
  animation: landing-sweep 9s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes landing-sweep {
  0%, 100% { transform: translateX(-18%); opacity: 0.35; }
  50% { transform: translateX(18%); opacity: 0.85; }
}

.landing-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.landing-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: center;
  min-height: calc(100vh - var(--appbar-h) - 5rem);
  min-height: calc(100dvh - var(--appbar-h) - 5rem);
  max-width: 1180px;
  margin: 0 auto;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--landing-rose);
}

.landing-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--landing-hot);
  box-shadow: 0 0 12px rgba(196, 61, 94, 0.8);
  animation: landing-pulse 2.4s ease-in-out infinite;
}

@keyframes landing-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

.landing-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(3.1rem, 7vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  margin: 0 0 1.65rem;
  color: #fff;
}

.landing-line {
  display: block;
  overflow: hidden;
}

.landing-line > span {
  display: block;
  animation: landing-line-in 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(110%);
}

.landing-line:nth-child(1) > span { animation-delay: 0.15s; }
.landing-line:nth-child(2) > span { animation-delay: 0.28s; }
.landing-line:nth-child(3) > span { animation-delay: 0.4s; }

.landing-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--landing-rose);
  text-shadow: 0 0 40px rgba(196, 61, 94, 0.35);
}

@keyframes landing-line-in {
  to { opacity: 1; transform: translateY(0); }
}

.landing-lead {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--landing-fog);
  max-width: 30rem;
  margin: 0 0 1.85rem;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.landing-btn-primary {
  --rx: 0px;
  --ry: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem 1.45rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--landing-hot), var(--landing-wine) 55%, #5c1a2c);
  color: #fff;
  font: 700 0.95rem Manrope, sans-serif;
  text-decoration: none;
  overflow: hidden;
  transform: translate(var(--rx), var(--ry));
  box-shadow: 0 10px 36px rgba(139, 41, 66, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: filter 0.25s, box-shadow 0.25s;
}

.landing-btn-primary::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, 0.32), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s;
}

.landing-btn-primary:hover {
  filter: brightness(1.08);
  color: #fff;
  text-decoration: none;
}

.landing-btn-primary:hover::before {
  opacity: 1;
}

.landing-btn-primary span,
.landing-btn-primary svg {
  position: relative;
  z-index: 1;
}

.landing-btn-ghost {
  display: inline-flex;
  padding: 1rem 1.3rem;
  border-radius: 999px;
  border: 1px solid rgba(246, 235, 234, 0.22);
  color: var(--landing-cream);
  font: 600 0.95rem Manrope, sans-serif;
  background: rgba(246, 235, 234, 0.03);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.landing-btn-ghost:hover {
  border-color: rgba(240, 183, 196, 0.55);
  background: rgba(246, 235, 234, 0.07);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

.landing-hint {
  flex-basis: 100%;
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: rgba(246, 235, 234, 0.48);
}

.landing-mascot-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.landing-mascot-ring {
  position: absolute;
  width: min(78%, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(240, 183, 196, 0.18);
  box-shadow: inset 0 0 80px rgba(139, 41, 66, 0.25), 0 0 80px rgba(139, 41, 66, 0.15);
  animation: landing-ring 6s ease-in-out infinite;
}

.landing-mascot-ring::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(246, 235, 234, 0.12);
  animation: landing-spin 48s linear infinite;
}

@keyframes landing-ring {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.03); opacity: 1; }
}

@keyframes landing-spin {
  to { transform: rotate(360deg); }
}

.landing-mascot {
  width: min(72%, 460px);
  height: auto;
  border-radius: 50%;
  z-index: 1;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.15s ease-out;
  filter: drop-shadow(0 40px 70px rgba(0, 0, 0, 0.55));
  animation: landing-mascot-float 8s ease-in-out infinite;
}

@keyframes landing-mascot-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

.landing-strip {
  position: relative;
  padding: 4.5rem 5vw 5.5rem;
  border-top: 1px solid var(--landing-line);
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(139, 41, 66, 0.2), transparent 55%),
    linear-gradient(180deg, #1a0c12, #201014 60%, #160a10);
}

.landing-strip h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  color: #fff;
}

.landing-strip-lead {
  color: var(--landing-fog);
  max-width: 36rem;
  margin: 0 0 2.2rem;
  font-size: 1.02rem;
  line-height: 1.55;
}

.landing-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.landing-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.45rem 1.35rem 1.55rem;
  border-radius: 18px;
  border: 1px solid rgba(240, 183, 196, 0.28);
  background:
    linear-gradient(165deg, rgba(196, 61, 94, 0.22), transparent 42%),
    linear-gradient(180deg, #341820 0%, #241018 100%);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, transform 0.25s, background 0.25s, box-shadow 0.25s;
}

.landing-link-card:hover {
  border-color: rgba(240, 183, 196, 0.55);
  background:
    linear-gradient(165deg, rgba(196, 61, 94, 0.34), transparent 48%),
    linear-gradient(180deg, #3e1c28 0%, #2c141c 100%);
  box-shadow:
    0 18px 44px rgba(139, 41, 66, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  color: inherit;
  text-decoration: none;
}

.landing-link-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.4rem;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--landing-hot), var(--landing-wine));
  box-shadow: 0 10px 26px rgba(196, 61, 94, 0.45);
}

.landing-link-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.landing-link-card strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
}

.landing-link-card > span:last-child {
  color: rgba(246, 235, 234, 0.78);
  font-size: 0.94rem;
  line-height: 1.45;
}

.landing-modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.landing-mod {
  position: relative;
  padding: 1.45rem 1.25rem 1.5rem;
  min-height: 11rem;
  border-radius: 18px;
  border: 1px solid rgba(246, 235, 234, 0.16);
  background:
    linear-gradient(160deg, rgba(246, 235, 234, 0.08), transparent 40%),
    #2a141c;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.55s ease, border-color 0.3s, box-shadow 0.3s;
}

.landing-mod.is-in,
.landing-reveal.is-in,
.landing-links.is-in {
  transform: translateY(0);
  opacity: 1;
}

.landing-reveal {
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease;
}

.landing-links {
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.55s ease;
}

.landing-mod:nth-child(2).is-in { transition-delay: 0.06s; }
.landing-mod:nth-child(3).is-in { transition-delay: 0.12s; }
.landing-mod:nth-child(4).is-in { transition-delay: 0.18s; }

.landing-mod:hover {
  border-color: rgba(240, 183, 196, 0.38);
  box-shadow: 0 14px 34px rgba(139, 41, 66, 0.22);
}

.landing-mod-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.85rem;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgba(196, 61, 94, 0.95), rgba(139, 41, 66, 0.95));
  border: 1px solid rgba(240, 183, 196, 0.28);
  box-shadow: 0 8px 18px rgba(139, 41, 66, 0.35);
}

.landing-mod-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.landing-mod-idx {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 183, 196, 0.7);
  font-weight: 700;
}

.landing-mod strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: #fff;
}

.landing-mod > span:last-child {
  color: rgba(246, 235, 234, 0.75);
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 1020px) {
  .landing-modules {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .landing-hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .landing-mascot-stage {
    order: -1;
    min-height: 280px;
  }

  .landing-mascot {
    width: min(58%, 300px);
  }

  .landing-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .landing-modules {
    grid-template-columns: 1fr;
  }

  .page-landing .nav-label {
    display: none;
  }

  .page-landing .nav-link--public {
    padding: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-orb,
  .landing-sweep,
  .landing-mascot,
  .landing-mascot-ring,
  .landing-kicker i,
  .landing-line > span {
    animation: none !important;
  }

  .landing-line > span,
  .landing-mod,
  .landing-reveal,
  .landing-links {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* legacy light landing pieces (unused on page-landing) */
.theme-light .hero--landing {
  background: linear-gradient(180deg, #fcfcfd 0%, #eef1f4 55%, #e6eaef 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

.hero-blob--1 {
  width: 460px;
  height: 460px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, rgba(168, 51, 82, 0.5), transparent 70%);
}

.hero-blob--2 {
  width: 540px;
  height: 540px;
  bottom: -260px;
  right: -160px;
  background: radial-gradient(circle, rgba(100, 30, 48, 0.42), transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 41, 66, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 41, 66, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(circle at 50% 28%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 50% 28%, #000 0%, transparent 68%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(139, 41, 66, 0.08);
  border: 1px solid rgba(139, 41, 66, 0.2);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 1.5rem;
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(139, 41, 66, 0.16);
  animation: hero-dot-pulse 2.2s ease-in-out infinite;
}

@keyframes hero-dot-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(139, 41, 66, 0.16);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(139, 41, 66, 0.05);
  }
}

.hero-title {
  font-family: Poppins, Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(2.1rem, 5.6vw, 3.85rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 1.25rem;
  color: #1b1f24;
}

.theme-light .hero--landing .hero-title {
  color: #1b1f24;
}

.hero-title-accent {
  background: linear-gradient(115deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 620px;
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  line-height: 1.62;
  color: rgba(0, 0, 0, 0.6);
  margin: 0 0 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.btn-hero {
  padding: 0.9rem 1.7rem;
  font-size: 0.92rem;
  border-radius: 14px;
}

.btn-hero-icon {
  margin-right: 0.1rem;
}

.btn-orange.btn-hero {
  box-shadow: 0 10px 26px rgba(139, 41, 66, 0.34);
}

.btn-orange.btn-hero:hover {
  box-shadow: 0 14px 32px rgba(139, 41, 66, 0.42);
}

.btn-hero-ghost {
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid rgba(139, 41, 66, 0.24);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  text-transform: none;
}

.btn-hero-ghost:hover {
  background: rgba(139, 41, 66, 0.06);
  color: var(--primary-dark);
  border-color: rgba(139, 41, 66, 0.4);
}

.hero-hint {
  flex-basis: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.4rem 0 0;
  color: rgba(0, 0, 0, 0.5);
}

.hero-hint svg {
  flex-shrink: 0;
  color: var(--primary);
  opacity: 0.8;
}

.hero-features {
  list-style: none;
  margin: 3.5rem 0 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.hero-feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  text-align: left;
  padding: 1.4rem 1.3rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(139, 41, 66, 0.13);
  border-color: rgba(139, 41, 66, 0.22);
}

.hero-feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 6px 16px rgba(139, 41, 66, 0.3);
  margin-bottom: 0.15rem;
}

.hero-feature-card h3 {
  margin: 0;
  font-family: Poppins, Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: #1b1f24;
}

.hero-feature-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.56);
}

@media (max-width: 600px) {
  .hero-actions {
    width: 100%;
  }

  .btn-hero {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* --- Pages --- */
.page {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 500;
}

.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.search-wrap {
  position: relative;
  max-width: 480px;
  margin-bottom: 1.75rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0.55;
  pointer-events: none;
}

.search {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search::placeholder {
  color: var(--muted);
}

.search:focus {
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* --- Guild list cards --- */
.guild-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.guild-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.guild-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--primary-rgb), 0.25);
}

.guild-card-link,
.guild-card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  min-height: 88px;
}

.guild-card-link {
  color: inherit;
}

.guild-card-link:hover {
  text-decoration: none;
}

/* Juniper-style banner cards (servers page) */
.guild-card--banner {
  display: flex;
  flex-direction: column;
}

.guild-card--banner > .guild-card-link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 0;
  color: inherit;
}

.guild-banner {
  position: relative;
  height: 108px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #5a2434, #241018 55%, #341820);
}

.guild-banner-media {
  position: absolute;
  inset: -8px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.guild-banner-media--icon {
  inset: -28px;
  filter: blur(14px) saturate(1.25) brightness(0.92);
  transform: scale(1.2);
}

.guild-banner-media--fallback {
  background:
    radial-gradient(circle at 30% 40%, rgba(196, 61, 94, 0.55), transparent 55%),
    linear-gradient(135deg, #5a2034, #1a0c12 60%, #3a1528);
}

.guild-banner-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22, 10, 16, 0.12) 0%, rgba(22, 10, 16, 0.48) 100%),
    linear-gradient(90deg, rgba(22, 10, 16, 0.3) 0%, transparent 45%);
  pointer-events: none;
}

.guild-banner-name {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.85rem;
  z-index: 1;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-card--banner .guild-card-body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.35rem 1.1rem 1rem;
  min-height: 72px;
}

.guild-card--banner .guild-avatar {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: 3px solid var(--surface, #1a0c12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.guild-card--banner .guild-info {
  flex: 1;
  min-width: 0;
  padding-left: 4.35rem;
}

.guild-name--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.guild-card--banner .guild-meta-row {
  margin-top: 0;
}

.guild-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface2);
  object-fit: cover;
}

.guild-avatar--placeholder {
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--muted);
  background: linear-gradient(135deg, var(--surface2), var(--surface3));
}

.guild-info {
  flex: 1;
  min-width: 0;
}

.guild-name {
  font-weight: 500;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-meta {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.guild-meta--ok {
  color: var(--ok);
}

.guild-chevron {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  opacity: 0.7;
}

.guild-card--invite .guild-card-inner {
  padding-right: 1rem;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.skeleton-card {
  height: 88px;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface2) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-card--guild {
  height: 196px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* --- Forms (guild settings) --- */
.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 640px;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
textarea {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: rgba(var(--primary-rgb), 0.55);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  cursor: pointer;
}

.checkbox-row input[type="checkbox"],
.checkbox-row input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--primary);
}

.section-title {
  margin: 2rem 0 1rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary);
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(var(--primary-rgb), 0.12);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(239, 83, 80, 0.12);
  border-color: rgba(239, 83, 80, 0.45);
  color: #ffcdd2;
}

.save-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 13000;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  background: rgba(22, 48, 32, 0.96);
  border: 1px solid rgba(102, 187, 106, 0.55);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: #e8f5e9;
  font-size: 0.95rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.save-toast.save-toast--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.save-toast.save-toast--leaving {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.save-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(102, 187, 106, 0.22);
  color: #a5d6a7;
  font-size: 0.85rem;
  line-height: 1;
}

.btn.btn-saved {
  background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
  box-shadow: 0 2px 10px rgba(67, 160, 71, 0.4);
}

.btn:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.hidden {
  display: none !important;
}

/* --- Footer --- */
.app-footer {
  margin-top: auto;
  padding: 2rem 1.5rem;
  background: var(--surface3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.app-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.app-footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.15s;
}

.app-footer-links a:hover {
  color: var(--primary);
}

@media (max-width: 640px) {
  .app-bar {
    padding: 0 1rem;
  }

  .nav-link.hide-mobile {
    display: none;
  }

  .nav-link--public span.nav-label {
    display: none;
  }

  .user-menu-name {
    display: none;
  }

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

  .stat-cards {
    grid-template-columns: 1fr;
  }

  .info-box-row {
    grid-template-columns: 1fr;
  }

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

/* --- Top nav (burgundy) --- */
.app-bar--public {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-bottom: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  flex-wrap: wrap;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.logo--light {
  color: #fff;
  margin-right: 0.5rem;
}

.nav-link--public {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.15s;
}

.nav-link--public:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #fff;
  text-decoration: none;
}

.nav-link--public.active {
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
}

.nav-icon-wrap {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.nav-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.nav-link--public.active .nav-icon-wrap,
.nav-link--public:hover .nav-icon-wrap {
  background: rgba(255, 255, 255, 0.2);
}

.logo-text {
  margin-left: 0.15rem;
}

.app-bar--public .user-menu {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
}

.app-bar--public .user-menu-name {
  color: #fff;
}

.app-bar--public .btn-ghost,
.app-bar--public .nav-login {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.app-bar--public .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #fff;
}

/* --- Light public pages (stats, commands) --- */
.theme-light {
  --bg: #eceff1;
  --surface: #ffffff;
  --surface2: #f5f5f5;
  --surface3: #263238;
  --text: rgba(0, 0, 0, 0.87);
  --muted: rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-light .hero {
  background: radial-gradient(circle farthest-corner at center, #fafafa 0%, #eceff1 100%);
  color: var(--text);
}

.theme-light .hero h1 {
  color: var(--text);
}

.theme-light .guild-card {
  background: var(--surface);
  border-color: rgba(0, 0, 0, 0.08);
}

.theme-light .search {
  background: var(--surface);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text);
}

.theme-light .empty-state {
  background: var(--surface);
  border-color: rgba(0, 0, 0, 0.1);
}

.theme-light input,
.theme-light textarea {
  background: var(--surface2);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text);
}

.page-public {
  max-width: 1400px;
}

.status-shell {
  background: #ecf0f5;
}

.page-status {
  max-width: 1400px;
  padding-top: 1.25rem;
}

/* --- Info-box stat cards --- */
.info-box-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.info-box {
  display: flex;
  align-items: stretch;
  min-height: 90px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.info-box-icon {
  display: grid;
  place-items: center;
  width: 90px;
  min-width: 90px;
  background: var(--primary);
  color: #fff;
}

.info-box-icon svg {
  width: 46px;
  height: 46px;
  opacity: 0.95;
}

.info-box-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.65rem 0.85rem;
  min-width: 0;
}

.info-box-text {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.54);
}

.info-box-number {
  display: block;
  margin-top: 0.15rem;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 400;
  color: rgba(0, 0, 0, 0.87);
  line-height: 1.15;
}

.info-box-more {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.info-box-more-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.54);
}

.info-badge {
  display: inline-block;
  min-width: 2rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

.status-intro {
  text-align: center;
  margin: 0 0 1.75rem;
}

.status-intro h1 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.87);
}

.status-intro-line {
  margin: 0;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.95rem;
}

.status-intro-sub {
  margin: 0.35rem 0 0;
  color: rgba(0, 0, 0, 0.45);
  font-size: 0.88rem;
}

.charts-grid--status {
  gap: 1.25rem;
}

.chart-wrap {
  position: relative;
  height: 220px;
}

.chart-note {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.45);
  text-align: center;
}

/* legacy stat-card aliases */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 96px;
}

.stat-card-icon {
  display: grid;
  place-items: center;
  width: 72px;
  min-width: 72px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1.75rem;
}

.stat-card-body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.stat-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-card-value {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 500;
  line-height: 1.2;
  margin-top: 0.15rem;
}

.stat-card-extra {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.stat-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.15);
  color: var(--primary-dark);
  font-weight: 600;
}

.stats-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.stats-header h1 {
  font-weight: 400;
  font-size: 1.65rem;
}

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

.chart-card {
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  padding: 1rem 1rem 0.85rem;
  border: none;
}

.chart-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.87);
}

.chart-card canvas {
  width: 100% !important;
}

/* --- Commands page dictionary --- */
.commands-page {
  max-width: 1200px;
}

.commands-page-header h1 {
  font-weight: 400;
  font-size: 1.65rem;
}

.commands-stats {
  margin-bottom: 1.25rem;
}

.commands-stats-note {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: rgba(0, 0, 0, 0.62);
  line-height: 1.45;
}

.commands-stats-note a {
  color: var(--primary-dark);
}

.commands-search {
  max-width: 560px;
  margin-bottom: 1.5rem;
}

.theme-light .commands-search .search {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.commands-page-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.commands-categories-nav {
  position: sticky;
  top: calc(var(--appbar-h) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0;
}

.commands-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.72);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.commands-cat-link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.9);
  text-decoration: none;
}

.commands-cat-link.active {
  background: rgba(0, 0, 0, 0.07);
  color: rgba(0, 0, 0, 0.9);
  font-weight: 500;
}

.commands-cat-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commands-cat-count {
  flex-shrink: 0;
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.48);
  text-align: center;
}

.commands-cat-link.active .commands-cat-count {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.62);
}

.commands-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.commands-category-section {
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  scroll-margin-top: calc(var(--appbar-h) + 1rem);
}

.commands-category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.commands-category-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.87);
}

.commands-category-meta {
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.commands-dict {
  padding: 0.15rem 0;
}

.commands-dict-row {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.commands-dict-row:first-child {
  border-top: none;
}

.commands-dict-name {
  font-family: ui-monospace, Consolas, "Cascadia Code", monospace;
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.82);
  background: rgba(0, 0, 0, 0.04);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  width: fit-content;
  max-width: 100%;
  word-break: break-all;
}

.commands-dict-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.62);
}

.commands-dict-usage {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.5);
  font-family: ui-monospace, Consolas, "Cascadia Code", monospace;
}

.commands-dict-usage-label {
  font-family: inherit;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.45);
}

.mod-commands-dict {
  margin-top: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.015);
}

.command-row-usage {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.48);
  font-family: ui-monospace, Consolas, "Cascadia Code", monospace;
}

.commands-empty {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.55);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .commands-page-layout {
    grid-template-columns: 1fr;
  }

  .commands-categories-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-bottom: 0.25rem;
  }

  .commands-cat-link {
    flex: 0 1 auto;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  }

  .commands-dict-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* Legacy grid (dashboard editor still uses command-group-card) */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.command-group {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.command-group h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-dark);
}

.command-list {
  display: grid;
  gap: 0.65rem;
}

.command-row {
  display: grid;
  gap: 0.2rem;
}

.command-name {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  width: fit-content;
}

.command-desc {
  font-size: 0.9rem;
  color: var(--muted);
}

.page-public code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

@media (max-width: 960px) {
  .stat-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-box-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Guild dashboard --- */
.dashboard-page {
  --dash-topbar-h: 56px;
}

.dashboard-page #app-bar {
  display: none;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--dash-topbar-h);
  padding: 0 1rem 0 0.65rem;
  background: linear-gradient(180deg, #455a64 0%, #263238 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  position: sticky;
  top: 0;
  z-index: 40;
}

.dashboard-topbar-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s;
  flex-shrink: 0;
}

.dashboard-topbar-back:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
}

.dashboard-topbar-logo {
  width: 32px;
  height: 32px;
}

.dashboard-topbar-center {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.dashboard-topbar-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.dashboard-topbar-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dashboard-topbar-guild {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  min-width: 0;
}

.dashboard-topbar-guild span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-topbar-guild-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dashboard-topbar-guild-icon--ph {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.65rem;
  font-weight: 700;
}

.dashboard-shell {
  background: #eceff1;
  width: 100%;
  flex: 1;
}

.dashboard-shell .app-footer-inner {
  max-width: none;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - var(--dash-topbar-h));
}

.dashboard-sidebar {
  background: #fff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.65rem 0.5rem 2rem;
  min-height: calc(100vh - var(--dash-topbar-h));
  max-height: calc(100vh - var(--dash-topbar-h));
  overflow-y: auto;
  position: sticky;
  top: var(--dash-topbar-h);
  align-self: start;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-item {
  display: flex;
  flex-direction: column;
}

.nav-item-row-wrap {
  display: flex;
  align-items: stretch;
  min-height: 36px;
}

.nav-item-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.78);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
  font: inherit;
}

.nav-item-row:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.9);
  text-decoration: none;
}

.nav-item-row.active {
  background: rgba(0, 0, 0, 0.07);
  color: rgba(0, 0, 0, 0.9);
  font-weight: 500;
}

.nav-item-row--child {
  padding: 0.4rem 0.5rem 0.4rem 2.35rem;
  font-size: 0.84rem;
  align-items: flex-start;
}

.nav-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.nav-item-desc {
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.42);
  line-height: 1.3;
  white-space: normal;
}

.nav-item-row--child .nav-item-icon-wrap {
  margin-top: 0.1rem;
}

.nav-item-row.active .nav-item-desc {
  color: rgba(0, 0, 0, 0.52);
}

.nav-item-row--disabled {
  opacity: 0.45;
  cursor: default;
}

.nav-item-icon-wrap {
  display: grid;
  place-items: center;
  width: 20px;
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.45);
}

.nav-item-row.active .nav-item-icon-wrap,
.nav-item-row:hover .nav-item-icon-wrap {
  color: rgba(0, 0, 0, 0.62);
}

.nav-item-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item-chevron {
  display: grid;
  place-items: center;
  width: 28px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: rgba(0, 0, 0, 0.38);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s, transform 0.15s;
}

.nav-item-chevron:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-item-chevron.is-expanded svg {
  transform: rotate(180deg);
}

.nav-item-children {
  display: none;
  flex-direction: column;
  gap: 0.05rem;
  padding-bottom: 0.15rem;
}

.nav-item--parent.is-expanded .nav-item-children {
  display: flex;
}

.setting-card--soon {
  max-width: 36rem;
  color: rgba(0, 0, 0, 0.62);
}

.dashboard-main {
  padding: 1.5rem clamp(1.25rem, 3vw, 3rem) 2.5rem;
  width: 100%;
  min-width: 0;
}

.dashboard-panel {
  width: 100%;
  max-width: none;
}

.dashboard-main h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 500;
}

.dashboard-main .subtitle {
  margin: 0 0 0.25rem;
  color: rgba(0, 0, 0, 0.52);
  font-size: 0.92rem;
  max-width: 52rem;
}

.setting-stack {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: none;
  margin-top: 1.25rem;
}

.setting-stack > .btn {
  justify-self: start;
  width: auto;
}

.setting-stack--features {
  max-width: 42rem;
}

.setting-stack--commands {
  max-width: 56rem;
}

.commands-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.command-group-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.command-group-head {
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(var(--primary-rgb), 0.04);
}

.command-group-head h2 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.command-table-head,
.command-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) 9.5rem;
  gap: 0.75rem 1rem;
  align-items: center;
}

.command-table-head {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
}

.command-table-head span:first-child {
  visibility: hidden;
}

.command-table-body {
  padding: 0.25rem 1rem 0.65rem;
}

.command-row {
  padding: 0.55rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.command-row-check {
  margin: 0;
  justify-self: center;
}

.command-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.command-row-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: rgba(0, 0, 0, 0.82);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.command-row-desc {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.48);
  line-height: 1.35;
}

.command-row-channel {
  margin: 0;
  display: grid;
  gap: 0.2rem;
}

.command-row-channel-label {
  font-size: 0.72rem;
  color: rgba(0, 0, 0, 0.42);
}

.command-row-channel input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fafafa;
  font: inherit;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.notifications-hint {
  margin: -0.25rem 0 0.75rem;
  max-width: 52rem;
}

.setting-hint {
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.45;
}

.setting-hint code {
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.discord-embed-preview {
  margin-top: 0.15rem;
}

.discord-embed-preview__inner {
  background: #2f3136;
  border-left: 4px solid #9b59b6;
  border-radius: 4px;
  padding: 0.65rem 0.85rem 0.5rem;
  max-width: 100%;
}

.discord-embed-preview__title {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.discord-embed-preview__description {
  color: #dcddde;
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.discord-embed-preview__image {
  display: block;
  max-width: 100%;
  margin-top: 0.65rem;
  border-radius: 4px;
}

.discord-mention {
  background: rgba(88, 101, 242, 0.3);
  color: #dee0fc;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 500;
}

#form-notifications {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#form-notifications .btn-primary {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (min-width: 1100px) {
  #form-common {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #form-common .btn-primary {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.setting-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.1rem 1.15rem;
  display: grid;
  gap: 0.85rem;
}

.setting-card h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-dark);
}

.setting-card label:not(.checkbox-row) {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: rgba(0, 0, 0, 0.6);
}

.setting-card label.checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: rgba(0, 0, 0, 0.82);
  line-height: 1.35;
}

.setting-card label.checkbox-row input[type="checkbox"],
.setting-card label.checkbox-row input[type="radio"] {
  flex-shrink: 0;
  margin: 0;
}

.checkbox-row-text {
  flex: 1;
  min-width: 0;
}

.checkbox-row-text code {
  font-size: 0.92em;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
}

.setting-card--compact {
  gap: 0.55rem;
}

.setting-grid-2--tight {
  gap: 0.55rem;
}

.field-hint--tight {
  margin-top: -0.15rem;
}

.setting-field {
  display: grid;
  gap: 0.35rem;
}

.setting-field-label {
  font-size: 0.88rem;
  color: rgba(0, 0, 0, 0.6);
}

.color-picker-widget {
  display: grid;
  gap: 0.55rem;
  max-width: 280px;
}

.color-picker-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-picker-swatch-wrap {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  cursor: pointer;
}

.color-picker-swatch {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #ffa550;
  pointer-events: none;
}

.color-picker-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.color-picker-hex {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fafafa;
  font: inherit;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88rem;
  text-transform: uppercase;
  box-sizing: border-box;
}

.color-picker-sv {
  position: relative;
  height: 160px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: crosshair;
  touch-action: none;
  background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, #ff0000);
}

.color-picker-sv-cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.color-picker-hue {
  width: 100%;
  height: 16px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  --thumb-color: #ffa550;
  background: linear-gradient(
    to right,
    #f00 0%,
    #ff0 17%,
    #0f0 33%,
    #0ff 50%,
    #00f 67%,
    #f0f 83%,
    #f00 100%
  );
  cursor: pointer;
}

.color-picker-hue::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  background: var(--thumb-color, #ffa550);
}

.color-picker-hue::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  background: var(--thumb-color, #ffa550);
}

.color-picker-rgb {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.color-picker-rgb label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
}

.color-picker-rgb input {
  width: 100%;
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fafafa;
  font: inherit;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.setting-card textarea {
  min-height: 120px;
  resize: vertical;
}

.setting-card input[type="text"],
.setting-card input[type="number"],
.setting-card textarea,
.setting-card select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fafafa;
  color: var(--text);
  font: inherit;
  box-sizing: border-box;
}

.field-hint {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.48);
}

.setting-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .setting-grid-2 {
    grid-template-columns: 1fr;
  }
}

.setting-subhead {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.music-access-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.music-access-mode {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.music-roles-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.role-id-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.role-id-row input {
  flex: 1;
  min-width: 0;
}

.role-id-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.role-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.12);
  font-size: 0.82rem;
}

.role-id-chip button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.55);
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.role-id-chip button:hover {
  color: #c0392b;
}

.role-list-widget {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.role-list-widget .role-picker {
  width: 100%;
}

.role-list-widget .role-clear-btn {
  align-self: flex-start;
}

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

  .dashboard-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    min-height: auto;
    max-height: none;
    position: static;
    padding: 0.5rem;
  }

  .nav-item-children {
    padding-left: 0.25rem;
  }

  .nav-item-row--child {
    padding-left: 2rem;
  }

  .command-table-head {
    display: none;
  }

  .command-row {
    grid-template-columns: 2rem 1fr;
    grid-template-areas:
      "check info"
      "check channel";
  }

  .command-row-check {
    grid-area: check;
    align-self: center;
    padding-top: 0;
  }

  .command-row-info {
    grid-area: info;
  }

  .command-row-channel {
    grid-area: channel;
  }

  #form-notifications,
  #form-common {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-bar--public .app-bar-start {
    overflow-x: auto;
    max-width: 100%;
  }

  .nav-link--public {
    font-size: 0.65rem;
    padding: 0.45rem 0.65rem;
  }
}

/* --- Moderation filters --- */
.mod-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.mod-filter-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mod-filter-card.is-on {
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.2);
}

.mod-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.mod-filter-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.mod-filter-head p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.mod-filter-fields label:not(.checkbox-row) {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.mod-filter-fields label.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text);
}

.mod-filter-head .checkbox-row {
  flex-shrink: 0;
  white-space: nowrap;
}

.mod-filter-fields input[type="text"],
.mod-filter-fields input[type="number"],
.mod-filter-fields select,
.mod-filter-fields textarea {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
}

.mod-filter-fields textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.mod-filter-scope {
  font-size: 0.75rem;
  color: var(--muted);
}

.mod-section-head h2 {
  margin-bottom: 0.25rem;
}

/* --- Ranking members --- */
.ranking-members-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.ranking-sort-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.ranking-sort-tab {
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}

.ranking-sort-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.ranking-sort-tab.is-active {
  color: var(--on-primary);
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
}

.ranking-members-card {
  padding: 0;
  overflow: hidden;
}

.ranking-members-status {
  margin: 1rem 1.15rem;
  color: rgba(0, 0, 0, 0.62);
}

.ranking-members-table-wrap {
  overflow-x: auto;
}

.ranking-members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ranking-members-table thead {
  background: rgba(0, 0, 0, 0.04);
}

.ranking-members-table th,
.ranking-members-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  vertical-align: middle;
}

.ranking-members-table th {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.55);
}

.ranking-members-table th.is-sorted {
  color: var(--primary-dark);
}

.ranking-col-rank {
  width: 3rem;
  text-align: center;
}

.ranking-rank {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ranking-col-member {
  min-width: 12rem;
}

.ranking-member-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ranking-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ranking-member-avatar--ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.ranking-member-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.ranking-member-name {
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-member-sub {
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.5);
}

.ranking-col-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: rgba(0, 0, 0, 0.78);
}

.ranking-col-xp {
  font-weight: 600;
}

.ranking-members-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ranking-members-page-label {
  font-size: 0.88rem;
  color: rgba(0, 0, 0, 0.62);
  padding: 0 0.35rem;
}

@media (max-width: 720px) {
  .ranking-members-table th:nth-child(4),
  .ranking-members-table td:nth-child(4),
  .ranking-members-table th:nth-child(5),
  .ranking-members-table td:nth-child(5) {
    display: none;
  }
}

.ranking-xp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  margin-top: 0.75rem;
}

@media (min-width: 720px) {
  .ranking-xp-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.setting-card--hint {
  border-style: dashed;
}

.ranking-related-links {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  line-height: 1.6;
}

.ranking-related-links a {
  color: var(--accent, #eb8c14);
  text-decoration: none;
}

.ranking-related-links a:hover {
  text-decoration: underline;
}

/* --- Level / voice role rewards (light UI) --- */
.rewards-ui .level-rewards-table th,
.rewards-ui .level-rewards-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.87);
}

.rewards-ui .level-rewards-table th {
  font-weight: 600;
  color: rgba(0, 0, 0, 0.55);
  opacity: 1;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rewards-ui .level-rewards-table td strong {
  color: var(--primary-dark);
  font-weight: 600;
}

.rewards-ui .level-reward-chip {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-dark);
  border: 1px solid rgba(var(--primary-rgb), 0.15);
}

.rewards-ui .level-reward-muted {
  color: rgba(0, 0, 0, 0.35);
  opacity: 1;
}

.rewards-ui .btn-ghost {
  color: rgba(0, 0, 0, 0.62);
  border-color: rgba(0, 0, 0, 0.14);
  background: #fff;
}

.rewards-ui .btn-ghost:hover {
  color: var(--primary-dark);
  background: rgba(var(--primary-rgb), 0.06);
  border-color: rgba(var(--primary-rgb), 0.25);
}

.rewards-ui .field-hint {
  color: rgba(0, 0, 0, 0.52);
}

.rewards-ui .field-hint strong {
  color: rgba(0, 0, 0, 0.75);
}

.level-rewards-toolbar {
  margin: 1rem 0 0.75rem;
}

.level-rewards-table-wrap {
  margin-top: 0.25rem;
  overflow-x: auto;
}

.level-rewards-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.level-rewards-table th,
.level-rewards-table td {
  padding: 0.55rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.level-rewards-actions {
  width: 4.5rem;
  text-align: right;
  white-space: nowrap;
}

.level-reward-remove,
.level-reward-edit {
  min-width: 2rem;
  font-size: 1.05rem;
  line-height: 1;
}

.level-reward-roles-cell {
  min-width: 10rem;
}

.level-reward-chip {
  display: inline-block;
  margin: 0.12rem 0.25rem 0.12rem 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
}

.field-error {
  color: #c62828;
  font-size: 0.88rem;
  margin: 0.35rem 0 0.5rem;
}

@media (max-width: 520px) {
  .voice-duration-grid {
    grid-template-columns: 1fr;
  }
}

body.modal-open {
  overflow: hidden;
}

.dash-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dash-modal.hidden {
  display: none;
}

.dash-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 12, 0.62);
  backdrop-filter: blur(4px);
}

.dash-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  animation: reward-modal-in 0.22s ease-out;
}

@keyframes reward-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Reward modals (level + voice) --- */
.reward-modal {
  background: #f7f5f6;
  color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, 0.07);
}

.reward-modal__header {
  padding: 1.35rem 1.5rem 1.1rem;
  background: linear-gradient(180deg, #fff 0%, #f7f5f6 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-top: 3px solid var(--primary);
  border-radius: 16px 16px 0 0;
}

.reward-modal__header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.reward-modal__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: rgba(0, 0, 0, 0.5);
  line-height: 1.45;
}

.reward-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.reward-modal__section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.reward-modal__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.48);
}

.reward-modal__optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(0, 0, 0, 0.35);
  font-size: 0.76rem;
}

.reward-modal__input,
.reward-modal__select {
  width: 100%;
  padding: 0.62rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #1a1a1a;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.reward-modal__input:focus,
.reward-modal__select:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.reward-modal__select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.2rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.4.4 6 5l4.6-4.6L12 2l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 11px;
}

.reward-duration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.reward-duration-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.7rem 0.7rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.reward-duration-field:focus-within {
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.reward-duration-field__name {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 0, 0, 0.42);
}

.reward-duration-field .reward-modal__select {
  border: none;
  padding: 0.15rem 1.75rem 0.15rem 0;
  background-color: transparent;
  box-shadow: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.reward-duration-field .reward-modal__select:focus {
  box-shadow: none;
}

.reward-role-picker {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.reward-role-search {
  width: 100%;
  padding: 0.5rem 0.65rem 0.5rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 0.55rem center;
  font: inherit;
  font-size: 0.88rem;
  color: #1a1a1a;
  box-sizing: border-box;
}

.reward-role-search:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.45);
  background-color: #fff;
}

.reward-role-list {
  max-height: 10.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--primary-rgb), 0.35) transparent;
}

.reward-role-list::-webkit-scrollbar {
  width: 6px;
}

.reward-role-list::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-rgb), 0.28);
  border-radius: 999px;
}

.reward-role-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}

.reward-role-item:hover {
  background: rgba(var(--primary-rgb), 0.06);
}

.reward-role-item:has(.reward-role-check:checked) {
  background: rgba(var(--primary-rgb), 0.1);
}

.reward-role-check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.reward-role-item__box {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 4px;
  border: 1.5px solid rgba(0, 0, 0, 0.22);
  background: #fff;
  display: grid;
  place-items: center;
  transition: border-color 0.12s, background 0.12s;
}

.reward-role-item:has(.reward-role-check:checked) .reward-role-item__box {
  border-color: var(--primary);
  background: var(--primary);
}

.reward-role-item__box svg {
  width: 0.65rem;
  height: 0.65rem;
  opacity: 0;
  color: #fff;
  transition: opacity 0.12s;
}

.reward-role-item:has(.reward-role-check:checked) .reward-role-item__box svg {
  opacity: 1;
}

.reward-role-item__name {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reward-role-item__id {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: rgba(0, 0, 0, 0.38);
  font-variant-numeric: tabular-nums;
}

.reward-role-empty {
  margin: 0.5rem 0;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.86rem;
  color: rgba(0, 0, 0, 0.45);
}

.reward-modal__hint {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.42);
  line-height: 1.4;
}

.reward-modal__error {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #b71c1c;
  background: rgba(183, 28, 28, 0.08);
  border: 1px solid rgba(183, 28, 28, 0.15);
}

.reward-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  border-radius: 0 0 16px 16px;
}

.reward-modal__btn-cancel {
  text-transform: none;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.62) !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  background: #fff !important;
  box-shadow: none;
}

.reward-modal__btn-cancel:hover {
  color: var(--primary-dark) !important;
  background: rgba(var(--primary-rgb), 0.05) !important;
  border-color: rgba(var(--primary-rgb), 0.25) !important;
}

.reward-modal .btn-primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 520px) {
  .reward-duration-grid {
    grid-template-columns: 1fr;
  }

  .reward-modal__header,
  .reward-modal__body,
  .reward-modal__footer {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
}

/* --- Rank card settings --- */
.rank-card-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.rank-card-settings .color-picker-widget {
  max-width: 100%;
}

.rank-card-preview-actions {
  margin-top: 0.85rem;
}

.rank-card-preview-btn {
  font-weight: 600;
}

.rank-card-preview-wrap {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  overflow-x: auto;
}

.rank-card-preview-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.ideas-panel-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 700px) {
  .ideas-panel-buttons-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .rank-card-color-grid {
    grid-template-columns: 1fr;
  }
}

/* --- App preloader splash --- */
body.app-loading {
  overflow: hidden;
}

.app-preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.app-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.app-preloader-logo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  animation: preloader-pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 64px rgba(var(--primary-rgb), 0.45);
}

.app-preloader-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
}

.app-preloader-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.app-preloader-progress-bar {
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary) 45%, var(--primary-soft) 55%, transparent);
  animation: preloader-progress 1.15s ease-in-out infinite;
}

@keyframes preloader-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.07);
    opacity: 0.86;
  }
}

@keyframes preloader-progress {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

/* ============================================================
   Unified visual polish — applies to every page
   (display font, burgundy brand accents, softer cards)
   ============================================================ */

/* Poppins display font for all headings */
.page h1,
.page-header h1,
.dashboard-main h1,
.dashboard-panel h1,
.stats-header h1,
.status-intro h1,
.commands-page-header h1,
.commands-category-head h2,
.command-group h2,
.command-group-head h2,
.section-title,
.setting-card h2,
.setting-subhead,
.mod-filter-head h3,
.chart-card h3,
.dashboard-topbar-title,
.app-footer-brand,
.logo {
  font-family: Poppins, Roboto, "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.page h1,
.dashboard-main h1,
.dashboard-panel h1 {
  font-weight: 700;
}

.page-header h1 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  color: #1b1f24;
}

/* Accent bar before list/page headers */
.page-servers .page-header,
.commands-page-header {
  position: relative;
  padding-left: 1rem;
}

.page-servers .page-header::before,
.commands-page-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

/* Guild cards: rounder + branded hover */
.theme-light .guild-card {
  border-radius: 18px;
}

.theme-light .guild-card:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 14px 30px rgba(var(--primary-rgb), 0.14);
}

/* Dashboard topbar -> brand burgundy (matches public nav) */
.dashboard-topbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Sidebar active/hover -> burgundy accent */
.nav-item-row.active {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-dark);
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-item-row.active .nav-item-icon-wrap {
  color: var(--primary);
}

.nav-item-row:hover {
  background: rgba(var(--primary-rgb), 0.06);
}

/* Commands category nav active -> burgundy */
.commands-cat-link.active {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-dark);
}

.commands-cat-link.active .commands-cat-count {
  background: rgba(var(--primary-rgb), 0.16);
  color: var(--primary-dark);
}

/* Softer, rounder content cards across light pages */
.info-box,
.chart-card,
.commands-category-section,
.commands-empty,
.command-group-card,
.setting-card {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.info-box {
  overflow: hidden;
}

.setting-card {
  padding: 1.25rem 1.3rem;
}

/* Primary buttons: a touch more lift on hover */
.btn-primary:hover,
.btn-orange:hover {
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.4);
}

/* ============================================================
   Servers page — richer cards
   ============================================================ */
.guild-count-pill {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 0.6rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-dark);
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
}

.guild-list {
  gap: 1.1rem;
}

.guild-card-link,
.guild-card-inner {
  padding: 1.15rem 1.2rem;
  gap: 1.05rem;
}

.theme-light .guild-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.theme-light .guild-card--installed {
  cursor: pointer;
}

.guild-avatar {
  width: 54px;
  height: 54px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.guild-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.guild-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.guild-badge--ok {
  background: rgba(67, 160, 71, 0.14);
  color: #2e7d32;
}

.guild-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43a047;
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.18);
}

.guild-badge--off {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.5);
}

.guild-action-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.guild-card--installed:hover .guild-action-hint {
  opacity: 1;
  transform: translateX(0);
}

.guild-card--installed .guild-chevron {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.09);
  color: var(--primary);
  opacity: 1;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.guild-card--installed:hover .guild-chevron {
  background: var(--primary);
  color: #fff;
  transform: translateX(3px);
}

.guild-invite-btn {
  text-transform: none;
  border-radius: 10px;
  gap: 0.3rem;
}

/* ============================================================
   Guild dashboard (/dashboard) — extra polish
   ============================================================ */

/* Panel header accent bar */
.dashboard-panel > h1 {
  position: relative;
  padding-left: 0.85rem;
}

.dashboard-panel > h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12rem;
  bottom: 0.12rem;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

.dashboard-main .subtitle {
  padding-left: 0.9rem;
}

/* Setting card titles: divider + accent dot */
.setting-card > h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.15rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 1.05rem;
  font-weight: 600;
}

.setting-card > h2::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

/* Inputs / selects: branded focus ring */
.setting-card input[type="text"]:focus,
.setting-card input[type="number"]:focus,
.setting-card input[type="url"]:focus,
.setting-card textarea:focus,
.setting-card select:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
  background: #fff;
}

/* Checkbox rows: hover affordance */
.setting-card label.checkbox-row {
  padding: 0.5rem 0.55rem;
  margin: 0 -0.35rem;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.setting-card label.checkbox-row:hover {
  background: rgba(var(--primary-rgb), 0.05);
}

/* Sidebar spacing + rounder rows */
.dashboard-nav {
  gap: 0.2rem;
}

.nav-item-row {
  border-radius: 8px;
}

/* Save buttons: a bit more presence */
.setting-stack > .btn-primary {
  padding: 0.72rem 1.6rem;
  border-radius: 10px;
}

/* Topbar: user menu + logout (white on burgundy) */
.dashboard-topbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dashboard-topbar .user-menu {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.dashboard-topbar .user-menu-name {
  color: #fff;
}

.dashboard-topbar .user-menu .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.dashboard-topbar .user-menu .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
}

/* Sidebar section label */
.dashboard-sidebar-label {
  margin: 0.35rem 0.6rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.38);
}

/* Sidebar tabs: rounded icon tiles + nicer states */
.nav-item-row-wrap {
  min-height: 42px;
}

.nav-item-row {
  gap: 0.7rem;
  padding: 0.5rem 0.6rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.74);
}

.nav-item-row:not(.nav-item-row--child) .nav-item-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.045);
  color: rgba(0, 0, 0, 0.5);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item-row:not(.nav-item-row--child):hover .nav-item-icon-wrap {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.nav-item-row.active:not(.nav-item-row--child) .nav-item-icon-wrap {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 3px 8px rgba(var(--primary-rgb), 0.32);
}

/* Child rows: subtle guide line */
.nav-item-children {
  margin-left: 1.55rem;
  padding-left: 0.55rem;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-item-row--child {
  padding-left: 0.6rem;
}

.nav-item-row--child.active {
  box-shadow: none;
}

/* Expand chevron alignment */
.nav-item-chevron {
  color: rgba(0, 0, 0, 0.32);
}

.nav-item-chevron:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}

/* ============================================================
   Settings redesign — richer panels, cards, toggles & fields
   (CSS-only; applies to every dashboard settings panel)
   ============================================================ */

/* Panel intro: larger title, clearer subtitle */
.dashboard-main {
  padding-top: 1.75rem;
}

.dashboard-panel > h1 {
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
  color: #181c22;
}

.dashboard-main .subtitle {
  font-size: 0.95rem;
  color: rgba(0, 0, 0, 0.5);
}

.setting-stack {
  gap: 1.15rem;
  margin-top: 1.5rem;
}

/* --- Cards: softer surface, depth, top accent on hover --- */
.dashboard-main .setting-card {
  position: relative;
  padding: 1.4rem 1.45rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfbfc 100%);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow:
    0 1px 2px rgba(16, 18, 23, 0.04),
    0 6px 20px rgba(16, 18, 23, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dashboard-main .setting-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dashboard-main .setting-card:hover {
  border-color: rgba(var(--primary-rgb), 0.18);
  box-shadow:
    0 2px 4px rgba(16, 18, 23, 0.05),
    0 14px 34px rgba(var(--primary-rgb), 0.09);
}

.dashboard-main .setting-card:hover::before {
  opacity: 1;
}

/* Card header: bigger, with accent dot already present */
.dashboard-main .setting-card > h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #20242b;
  padding-bottom: 0.85rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.dashboard-main .setting-card > h2::before {
  width: 9px;
  height: 9px;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.13);
}

/* --- Field labels --- */
.dashboard-main .setting-card label:not(.checkbox-row),
.dashboard-main .setting-field-label,
.dashboard-main .setting-card label.checkbox-row .checkbox-row-text {
  font-size: 0.9rem;
}

.dashboard-main .setting-card label:not(.checkbox-row),
.dashboard-main .setting-field-label {
  gap: 0.45rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.66);
}

/* --- Inputs / selects / textarea: crisper, branded --- */
.dashboard-main .setting-card input[type="text"],
.dashboard-main .setting-card input[type="number"],
.dashboard-main .setting-card input[type="url"],
.dashboard-main .setting-card textarea,
.dashboard-main .setting-card select {
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dashboard-main .setting-card input[type="text"]:hover,
.dashboard-main .setting-card input[type="number"]:hover,
.dashboard-main .setting-card input[type="url"]:hover,
.dashboard-main .setting-card textarea:hover,
.dashboard-main .setting-card select:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.dashboard-main .setting-card input::placeholder,
.dashboard-main .setting-card textarea::placeholder {
  color: rgba(0, 0, 0, 0.32);
  font-weight: 400;
}

/* Custom dropdown arrow for selects */
.dashboard-main .setting-card select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.3rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b2942' d='M1.4.4 6 5l4.6-4.6L12 2l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 11px;
}

/* --- Field hints: lighter, with subtle left marker --- */
.dashboard-main .field-hint,
.dashboard-main .setting-hint {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.5);
}

.dashboard-main .field-hint code,
.dashboard-main .setting-hint code,
.dashboard-main .checkbox-row-text code {
  background: rgba(var(--primary-rgb), 0.09);
  color: var(--primary-dark);
  padding: 0.08em 0.4em;
  border-radius: 5px;
  font-size: 0.88em;
}

/* --- Checkboxes -> modern toggle switches (light panels only) --- */
.dashboard-main .setting-card label.checkbox-row {
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.6rem 0.65rem;
  margin: 0 -0.4rem;
  border-radius: 12px;
}

.dashboard-main .setting-card label.checkbox-row:hover {
  background: rgba(var(--primary-rgb), 0.05);
}

.dashboard-main .setting-card label.checkbox-row .checkbox-row-text {
  order: 1;
  color: rgba(0, 0, 0, 0.8);
  font-weight: 500;
}

.dashboard-main .setting-card label.checkbox-row input[type="checkbox"] {
  order: 2;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 2.7rem;
  height: 1.55rem;
  margin: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 0.22s ease;
}

.dashboard-main .setting-card label.checkbox-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.55rem - 4px);
  height: calc(1.55rem - 4px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dashboard-main .setting-card label.checkbox-row input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-dark));
}

.dashboard-main .setting-card label.checkbox-row input[type="checkbox"]:checked::after {
  transform: translateX(calc(2.7rem - 1.55rem));
}

.dashboard-main .setting-card label.checkbox-row input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
}

/* Radios inside setting cards stay as branded radios */
.dashboard-main .setting-card label.checkbox-row input[type="radio"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--primary);
}

/* --- Save button: prominent, sticky-feeling --- */
.dashboard-main .setting-stack > .btn-primary {
  padding: 0.82rem 1.9rem;
  border-radius: 12px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.28);
}

.dashboard-main .setting-stack > .btn-primary:hover {
  box-shadow: 0 10px 26px rgba(var(--primary-rgb), 0.4);
}

.mod-public-templates {
  display: grid;
  gap: 0.85rem;
}

.mod-public-templates textarea {
  min-height: 4.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Tighten 2-column grids a touch */
.dashboard-main .setting-grid-2 {
  gap: 0.9rem 1rem;
}

/* --- Layout: single centered column of cards (wider than before) --- */
.dashboard-main .setting-stack,
.dashboard-main .setting-stack--features,
.dashboard-main .setting-stack--commands,
.dashboard-main .commands-editor {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

/* Stack setting cards in one column even on wide screens */
#form-common,
#form-notifications {
  grid-template-columns: 1fr;
}

#form-common .btn-primary,
#form-notifications .btn-primary {
  grid-column: auto;
}

.custom-commands-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.custom-command-row {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

.custom-command-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.custom-command-trigger {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.custom-cmd-response {
  width: 100%;
  margin-bottom: 0.65rem;
}

.checkbox-row--inline {
  margin: 0;
}

.setting-card-subtitle {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.module-nav-stack {
  margin-top: 0.5rem;
}

.module-nav-heading {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1b1f24;
}

.module-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.module-nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.module-nav-card:hover {
  border-color: rgba(139, 41, 66, 0.28);
  box-shadow: 0 8px 20px rgba(139, 41, 66, 0.1);
  transform: translateY(-2px);
}

.module-nav-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.module-nav-card-top strong {
  font-size: 0.95rem;
}

.module-nav-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.52);
}

.module-nav-status {
  flex-shrink: 0;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.module-nav-status--on {
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
}

.module-nav-status--off {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.45);
}

