:root {
  color-scheme: dark;
  --bg: #111318;
  --surface: #181b22;
  --surface-2: #20242d;
  --line: #323846;
  --text: #f5f7fb;
  --muted: #a9b1c2;
  --primary: #5865f2;
  --primary-strong: #7480ff;
  --green: #36c275;
  --coral: #ff6b5f;
  --gold: #f6c85f;
  --cyan: #45c4c8;
  --shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(88, 101, 242, .12), transparent 360px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

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

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  background: rgba(17, 19, 24, .86);
  backdrop-filter: blur(16px);
}

.brand,
.main-nav,
.user-nav,
.hero__actions,
.hero__stats,
.summary-strip,
.form-actions,
.publicite-card__stats,
.publicite-card__footer,
.guild-card__stats,
.guild-card__top,
.guild-title,
.publicites-toolbar {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

.main-nav {
  justify-content: center;
  gap: 6px;
}

.main-nav a,
.dashboard-tabs a {
  padding: 9px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
}

.main-nav a:hover,
.main-nav a[aria-current="page"],
.dashboard-tabs a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.user-nav {
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-2);
}

.button--primary {
  background: var(--primary);
  border-color: var(--primary);
}

.button--primary:hover {
  background: var(--primary-strong);
}

.button--ghost {
  background: transparent;
  border-color: var(--line);
}

.button--ghost:hover {
  background: var(--surface-2);
}

.button--small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 74px));
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(320px, .58fr);
  gap: 48px;
  align-items: center;
  overflow: hidden;
  padding: 70px 42px 86px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(13, 15, 23, .94), rgba(13, 15, 23, .72) 48%, rgba(13, 15, 23, .30)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .58;
}

.hero__copy,
.hero__media {
  position: relative;
  z-index: 1;
}

.hero__logo {
  display: block;
  width: min(360px, 100%);
  max-height: 140px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 18px;
}

.hero__copy h1,
.page-heading h1 {
  margin: 0;
  font-size: 58px;
  line-height: 1;
}

.hero__lead {
  max-width: 670px;
  margin: 22px 0 0;
  color: #d8deea;
  font-size: 19px;
}

.hero__actions {
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero__stats {
  gap: 10px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.stat-tile {
  min-width: 132px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 36, 45, .72);
}

.stat-tile strong {
  display: block;
  font-size: 24px;
}

.stat-tile span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.hero__media {
  display: grid;
  min-height: 420px;
  place-items: center;
}

.hero__icon {
  width: min(360px, 100%);
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 24px 55px rgba(0, 0, 0, .42));
}

.hero__badge {
  position: absolute;
  right: 0;
  bottom: 26px;
  width: min(160px, 44%);
  max-height: 160px;
  object-fit: contain;
  opacity: .92;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .4));
}

.section,
.page-heading {
  padding: 58px 0;
}

.section__head {
  max-width: 760px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
}

h3 {
  margin: 0 0 10px;
}

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

.feature-grid,
.publicites-grid,
.guild-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.publicite-card,
.guild-card,
.panel,
.media-slot,
.empty-state,
.filters,
.command-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.feature-card,
.guild-card,
.media-slot,
.empty-state {
  padding: 22px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.feature-card__image {
  width: calc(100% + 44px);
  max-width: none;
  aspect-ratio: 16 / 10;
  margin: -22px -22px 4px;
  object-fit: cover;
  background: var(--surface-2);
}

.feature-card p,
.panel__head p {
  margin: 0;
  color: var(--muted);
}

.section--split {
  display: grid;
  grid-template-columns: .8fr 1fr;
  gap: 32px;
  align-items: start;
}

.command-list {
  overflow: hidden;
}

.command-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.command-row:last-child {
  border-bottom: 0;
}

code,
.code-block {
  color: #f4d483;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.code-block {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1015;
}

.media-slot {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(88, 101, 242, .14), rgba(255, 107, 95, .10)),
    var(--surface);
}

.media-slot--image {
  min-height: 220px;
  background: #f7f7f7;
}

.media-slot--image img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.page-heading {
  display: grid;
  gap: 14px;
}

.page-heading h1 {
  font-size: 46px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 240px auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  margin-bottom: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: #dbe1ee;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #0f1218;
  color: var(--text);
}

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

small {
  color: var(--muted);
}

.publicites-toolbar {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.live-pill,
.notice {
  border: 1px solid rgba(54, 194, 117, .34);
  border-radius: 8px;
  padding: 8px 10px;
  color: #bff2d5;
  background: rgba(54, 194, 117, .12);
}

.notice {
  margin-bottom: 16px;
}

.publicite-card {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  overflow: hidden;
}

.publicite-card__image {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  background: var(--surface-2);
}

.publicite-card__body {
  padding: 18px;
  flex: 1;
}

.publicite-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.publicite-card h2 {
  margin: 10px 0;
  font-size: 21px;
  line-height: 1.2;
}

.publicite-card p {
  margin: 0;
  color: #c7cfde;
}

.publicite-card__stats {
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 18px 18px;
}

.publicite-card__stats span {
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.publicite-card__stats strong {
  color: var(--text);
}

.publicite-card__footer {
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.dashboard-heading {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.summary-strip {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.guild-grid {
  padding-bottom: 58px;
}

.guild-card {
  display: grid;
  gap: 18px;
}

.guild-card__top {
  gap: 12px;
}

.guild-card h2 {
  margin: 0;
  font-size: 20px;
}

.guild-card p {
  margin: 2px 0 0;
  color: var(--muted);
}

.guild-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--green));
  font-weight: 900;
}

.guild-avatar--large {
  width: 66px;
  height: 66px;
  flex-basis: 66px;
}

.guild-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guild-card__stats {
  gap: 8px;
  flex-wrap: wrap;
}

.guild-card__stats span {
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.guild-title {
  gap: 16px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 64px;
}

.dashboard-tabs {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 6px;
}

.dashboard-panels {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 22px;
}

.panel__head {
  margin-bottom: 18px;
}

.panel__head h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

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

.span-2 {
  grid-column: span 2;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.checkbox-line input {
  width: auto;
  min-height: auto;
}

.form-actions {
  gap: 12px;
  margin-top: 18px;
}

.form-status {
  color: var(--muted);
}

.form-status[data-state="ok"] {
  color: #bff2d5;
}

.form-status[data-state="error"] {
  color: #ffb8b0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.empty-state {
  grid-column: 1 / -1;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .main-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .user-nav {
    justify-content: flex-start;
  }

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

  .hero {
    min-height: auto;
    padding: 46px 26px 54px;
  }

  .hero__media {
    min-height: 340px;
  }

  .feature-grid,
  .publicites-grid,
  .guild-grid,
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .dashboard-tabs {
    position: static;
    display: flex;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  main,
  .site-header,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .hero__copy h1,
  .page-heading h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 28px;
  }

  .hero__media {
    min-height: 260px;
  }

  .hero {
    padding: 34px 18px 42px;
  }

  .hero__logo {
    width: min(260px, 100%);
  }

  .hero__icon {
    width: min(260px, 100%);
  }

  .feature-grid,
  .publicites-grid,
  .guild-grid,
  .media-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .command-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .site-footer,
  .publicites-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Modern UI refresh */
:root {
  --bg: #090b12;
  --surface: rgba(19, 23, 33, .86);
  --surface-2: rgba(28, 33, 47, .92);
  --surface-3: rgba(39, 47, 66, .82);
  --line: rgba(137, 153, 184, .22);
  --line-strong: rgba(137, 153, 184, .36);
  --text: #f8fbff;
  --muted: #aebbd0;
  --primary: #5f6bff;
  --primary-strong: #7f89ff;
  --brand-red: #d71f28;
  --green: #37d27f;
  --coral: #ff6b5f;
  --gold: #ffd166;
  --cyan: #36e4ee;
  --shadow: 0 22px 70px rgba(0, 0, 0, .38);
}

body {
  background:
    radial-gradient(circle at 12% -10%, rgba(215, 31, 40, .28), transparent 34%),
    radial-gradient(circle at 82% 6%, rgba(95, 107, 255, .24), transparent 32%),
    linear-gradient(180deg, #0d1019 0%, var(--bg) 38%, #0b0d13 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .85), transparent 78%);
}

main,
.site-header,
.site-footer {
  width: min(1216px, calc(100% - 48px));
}

.site-header {
  top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(13, 16, 25, .76);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .24);
}

.brand {
  min-width: 0;
  letter-spacing: .02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  box-shadow: 0 10px 28px rgba(215, 31, 40, .32);
}

.main-nav {
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.main-nav a,
.dashboard-tabs a {
  border: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"],
.dashboard-tabs a:hover {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .08);
}

.button {
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

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

.button--primary {
  background: linear-gradient(135deg, var(--primary), #3cd8ee);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 14px 28px rgba(95, 107, 255, .22);
}

.button--ghost {
  background: rgba(255, 255, 255, .04);
}

.hero {
  margin-top: 16px;
  min-height: 690px;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, .72fr);
  border-color: rgba(255, 255, 255, .10);
  background:
    linear-gradient(90deg, rgba(9, 11, 18, .96) 0%, rgba(9, 11, 18, .76) 52%, rgba(9, 11, 18, .34) 100%),
    var(--surface);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 48%, rgba(255, 255, 255, .12), transparent 18%),
    linear-gradient(135deg, transparent 48%, rgba(54, 228, 238, .14));
}

.hero__background {
  opacity: .72;
  filter: saturate(1.08) contrast(1.08);
}

.hero__logo {
  width: 104px;
  height: 104px;
  padding: 12px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  object-fit: contain;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
}

.hero__copy h1 {
  max-width: 760px;
  font-size: clamp(52px, 7vw, 92px);
  letter-spacing: 0;
  text-shadow: 0 18px 50px rgba(0, 0, 0, .36);
}

.hero__lead {
  max-width: 690px;
  color: #edf3ff;
  font-size: 20px;
  line-height: 1.7;
}

.hero__media {
  min-height: 460px;
}

.hero__media::before {
  content: "";
  position: absolute;
  inset: 28px 0 28px 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(215, 31, 40, .92), rgba(169, 20, 31, .88)),
    rgba(255, 255, 255, .04);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .36);
}

.hero__icon {
  position: relative;
  width: min(330px, 78%);
  padding: 34px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
}

.hero__badge {
  right: 18px;
  bottom: 56px;
  opacity: .16;
}

.stat-tile,
.mini-metric {
  border-color: rgba(255, 255, 255, .10);
  background: rgba(13, 16, 25, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.section,
.page-heading {
  padding: 74px 0;
}

.section__head {
  max-width: 860px;
}

.eyebrow {
  color: var(--cyan);
}

h2 {
  font-size: clamp(30px, 3.6vw, 46px);
}

.feature-grid,
.publicites-grid,
.guild-grid,
.media-grid {
  gap: 16px;
}

.feature-card,
.publicite-card,
.guild-card,
.panel,
.media-slot,
.empty-state,
.filters,
.command-list {
  border-color: rgba(137, 153, 184, .24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 20px 56px rgba(0, 0, 0, .22);
}

.feature-card,
.publicite-card,
.guild-card,
.panel {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.feature-card:hover,
.publicite-card:hover,
.guild-card:hover {
  transform: translateY(-3px);
  border-color: rgba(54, 228, 238, .34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 26px 70px rgba(0, 0, 0, .30);
}

.feature-card {
  padding: 0;
  min-height: 360px;
}

.feature-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.feature-card h3,
.feature-card p {
  padding-inline: 22px;
}

.feature-card h3 {
  margin-top: 2px;
  font-size: 22px;
}

.feature-card p {
  padding-bottom: 24px;
  color: #cbd6ea;
}

.section--split {
  grid-template-columns: .82fr 1fr;
}

.command-list {
  border-radius: 8px;
}

.command-row {
  grid-template-columns: 128px 1fr;
  padding: 18px;
}

.command-row code {
  font-weight: 800;
}

.page-heading--publicites,
.dashboard-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 28px;
}

.page-heading--publicites {
  padding-bottom: 26px;
}

.page-heading h1 {
  font-size: clamp(44px, 5.6vw, 70px);
}

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

.mini-metric {
  min-width: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-metric strong {
  display: block;
  font-size: 25px;
}

.mini-metric span {
  color: var(--muted);
  font-size: 13px;
}

.category-cloud {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: -6px 0 24px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #dce7fb;
  text-decoration: none;
  background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.category-chip:hover,
.category-chip.is-active {
  border-color: rgba(54, 228, 238, .42);
  background: linear-gradient(135deg, rgba(54, 228, 238, .16), rgba(95, 107, 255, .13));
}

.category-chip__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(54, 228, 238, .14);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.category-chip strong {
  color: var(--text);
}

.filters {
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 280px) auto;
  padding: 18px;
  margin-bottom: 28px;
}

input,
select,
textarea {
  border-color: rgba(137, 153, 184, .26);
  background: rgba(7, 9, 15, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(54, 228, 238, .62);
  box-shadow: 0 0 0 3px rgba(54, 228, 238, .10);
}

.publicites-toolbar {
  margin-bottom: 16px;
  padding: 0 2px;
}

.live-pill,
.notice {
  border-color: rgba(55, 210, 127, .38);
  background: rgba(55, 210, 127, .11);
}

.publicite-card {
  position: relative;
  min-height: 390px;
}

.publicite-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-red), var(--cyan), var(--primary));
}

.publicite-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.publicite-card__top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.publicite-card__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(54, 228, 238, .28);
  border-radius: 8px;
  color: var(--cyan);
  background: radial-gradient(circle at 30% 20%, rgba(54, 228, 238, .26), rgba(95, 107, 255, .12));
  font-weight: 900;
}

.publicite-card__meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.publicite-card__category {
  padding: 4px 8px;
  border: 1px solid rgba(54, 228, 238, .20);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(54, 228, 238, .08);
  font-weight: 800;
}

.publicite-card h2 {
  margin: 0;
  font-size: 23px;
}

.publicite-card p {
  display: -webkit-box;
  min-height: 96px;
  overflow: hidden;
  color: #d8e1f2;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.publicite-card__stats {
  padding: 0 20px 20px;
}

.publicite-card__stats span {
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .05);
}

.publicite-card__footer {
  padding: 16px 20px;
  background: rgba(6, 8, 14, .26);
}

.publicite-card__host {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-card,
.panel {
  border-radius: 8px;
}

.guild-card__stats span {
  border: 1px solid rgba(255, 255, 255, .06);
}

.dashboard-tabs {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

th {
  color: #d5def1;
  background: rgba(255, 255, 255, .035);
}

tr:hover td {
  background: rgba(255, 255, 255, .025);
}

.media-slot--image {
  border-color: rgba(255, 255, 255, .16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(236, 239, 246, .96));
}

@media (max-width: 980px) {
  main,
  .site-header,
  .site-footer {
    width: min(100% - 28px, 1216px);
  }

  .site-header,
  .page-heading--publicites,
  .dashboard-heading {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__media::before {
    inset: 20px;
  }

  .page-metrics {
    width: 100%;
  }

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

@media (max-width: 640px) {
  main,
  .site-header,
  .site-footer {
    width: min(100% - 20px, 1216px);
  }

  .hero {
    padding: 32px 16px 38px;
  }

  .hero__copy h1 {
    font-size: 42px;
  }

  .hero__logo {
    width: 84px;
    height: 84px;
  }

  .hero__icon {
    width: min(250px, 82%);
  }

  .page-metrics {
    grid-template-columns: 1fr;
  }

  .category-chip {
    width: 100%;
    justify-content: space-between;
  }

  .publicite-card p {
    min-height: auto;
  }
}

/* Rich public ads and footer */
body,
button,
input,
select,
textarea {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.icon {
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.14em;
}

.button .icon,
.main-nav .icon,
.publicite-card__meta .icon,
.publicite-card__stats .icon,
.publicite-card__host .icon,
.publicite-card__guild-copy .icon,
.publicite-card__info-item .icon,
.footer-stats .icon,
.footer-actions .icon,
.empty-state .icon {
  margin-right: 6px;
}

.input-with-icon {
  position: relative;
  display: block;
}

.input-with-icon .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.input-with-icon input {
  padding-left: 40px;
}

.emoji {
  width: 1.35em;
  height: 1.35em;
  display: inline-block;
  object-fit: contain;
  vertical-align: -0.28em;
}

.category-chip__mark .icon {
  margin: 0;
}

.publicite-card {
  min-height: auto;
}

.publicite-card__guild {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.publicite-card__guild-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-red), var(--primary));
  color: white;
  font-weight: 900;
}

.publicite-card__guild-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.publicite-card__guild-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.publicite-card__guild-copy span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.publicite-card__guild-copy strong,
.publicite-card__guild-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publicite-card__description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d8e1f2;
  line-height: 1.7;
}

.publicite-card__info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.publicite-card__info-item {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.publicite-card__info-item span {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.publicite-card__info-item strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publicite-card__meta span,
.publicite-card__category,
.publicite-card__stats span,
.publicite-card__host {
  display: inline-flex;
  align-items: center;
}

.publicite-card__footer .button {
  min-width: 92px;
}

.site-footer {
  align-items: center;
  margin-top: 40px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)),
    rgba(13, 16, 25, .78);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .18);
}

.footer-brand,
.footer-stats,
.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-brand {
  min-width: min(420px, 100%);
}

.footer-brand > div {
  display: grid;
  gap: 2px;
}

.footer-brand strong {
  color: var(--text);
}

.footer-brand span,
.footer-stats span {
  color: var(--muted);
  font-size: 13px;
}

.footer-stats {
  justify-content: center;
}

.footer-stats span {
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.footer-actions {
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .site-footer,
  .footer-brand,
  .footer-stats,
  .footer-actions {
    justify-content: flex-start;
  }
}

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

  .publicite-card__guild-copy strong,
  .publicite-card__guild-copy small,
  .publicite-card__info-item strong {
    white-space: normal;
  }
}

/* Homepage promoted ads and Discord category emojis */
.home-promos {
  padding-top: 42px;
}

.home-promos__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  max-width: none;
}

.home-promos__head > div:first-child {
  max-width: 820px;
}

.home-promos__metrics,
.home-promos__actions,
.home-promo-card__meta,
.home-promo-card__stats,
.home-promo-card__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.home-promos__metrics span,
.home-promo-card__meta span,
.home-promo-card__stats span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  color: #dce7fb;
  font-size: 13px;
  font-weight: 800;
}

.home-promo-card {
  position: relative;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(137, 153, 184, .24);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(54, 228, 238, .14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .018)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 62px rgba(0, 0, 0, .24);
}

.home-promo-card h3 {
  margin: 14px 0 8px;
  font-size: 22px;
  line-height: 1.15;
}

.home-promo-card p {
  min-height: 88px;
  margin: 0 0 16px;
  color: #d8e1f2;
  line-height: 1.65;
  white-space: pre-wrap;
}

.home-promo-card__meta {
  margin-top: 14px;
}

.home-promo-card__stats {
  margin-bottom: 14px;
}

.home-promo-card__footer {
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.home-promo-card__footer small {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

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

.compact-guild__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(54, 228, 238, .24);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(54, 228, 238, .12);
  color: var(--cyan);
  font-weight: 900;
}

.compact-guild__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-guild > div:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.compact-guild span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.category-emoji {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  flex: 0 0 1.15em;
  line-height: 1;
  vertical-align: -.16em;
}

span.category-emoji {
  width: auto;
  height: auto;
}

.category-emoji--avatar {
  width: 24px;
  height: 24px;
  font-size: 23px;
  vertical-align: 0;
}

span.category-emoji--avatar {
  width: auto;
  height: auto;
}

.category-chip__mark {
  font-size: 18px;
}

.category-chip__mark .category-emoji {
  margin: 0;
}

.publicite-card__category,
.home-promo-card__meta span {
  gap: 7px;
}

@media (max-width: 980px) {
  .home-promos__head {
    align-items: flex-start;
    flex-direction: column;
  }

}

@media (max-width: 640px) {
  .home-promo-card__footer {
    align-items: stretch;
  }

  .home-promo-card__footer .button {
    width: 100%;
    justify-content: center;
  }
}

/* Modern hero polish and animated home carousel */
.hero {
  isolation: isolate;
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 34px 110px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .10);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 26%, rgba(255, 255, 255, .18), transparent 9%),
    radial-gradient(circle at 78% 18%, rgba(54, 228, 238, .18), transparent 16%),
    linear-gradient(115deg, rgba(10, 12, 20, .45), rgba(153, 8, 22, .22) 48%, rgba(10, 12, 20, .22));
}

.hero__copy,
.hero__media {
  position: relative;
  z-index: 1;
}

.hero__actions .button {
  min-height: 44px;
  border-color: rgba(255, 255, 255, .20);
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .22);
}

.hero__actions .button--ghost {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .10)),
    rgba(18, 22, 34, .58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 16px 34px rgba(0, 0, 0, .22);
}

.hero__actions .button--ghost:hover {
  border-color: rgba(54, 228, 238, .58);
  background: linear-gradient(135deg, rgba(54, 228, 238, .24), rgba(95, 107, 255, .22));
}

.hero__stats .stat-tile {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(11, 14, 24, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 16px 34px rgba(0, 0, 0, .22);
}

.hero__media::before {
  animation: heroPanelGlow 7s ease-in-out infinite;
}

.hero__icon {
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes heroPanelGlow {
  0%, 100% { box-shadow: 0 28px 80px rgba(0, 0, 0, .36), 0 0 0 rgba(54, 228, 238, 0); }
  50% { box-shadow: 0 34px 96px rgba(0, 0, 0, .40), 0 0 42px rgba(54, 228, 238, .20); }
}

.home-promos {
  position: relative;
  overflow: hidden;
}

.home-promos::before {
  content: "";
  position: absolute;
  inset: 20px -18px auto auto;
  width: 260px;
  height: 260px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(54, 228, 238, .14), transparent 65%);
}

.home-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.home-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  border-radius: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.home-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.home-carousel__track {
  display: flex;
  gap: 16px;
  padding: 2px;
}

.home-promo-card {
  flex: 0 0 calc((100% - 32px) / 3);
  min-height: 350px;
  transform: translateZ(0);
  scroll-snap-align: start;
}

.home-promo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, .10), transparent 42%);
  transform: translateX(-120%);
  transition: opacity .2s ease;
}

.home-promo-card:hover::after {
  opacity: 1;
  animation: cardShine 1.1s ease;
}

@keyframes cardShine {
  to { transform: translateX(120%); }
}

.home-carousel__control {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: #f4f7ff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .045)),
    rgba(16, 20, 32, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 16px 32px rgba(0, 0, 0, .22);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.home-carousel__control:hover {
  transform: translateY(-1px);
  border-color: rgba(54, 228, 238, .42);
  background: linear-gradient(135deg, rgba(54, 228, 238, .18), rgba(95, 107, 255, .18));
}

.home-carousel__control .icon {
  width: 22px;
  height: 22px;
}

.home-carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.home-carousel__dots button {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  cursor: pointer;
  transition: width .18s ease, background .18s ease, box-shadow .18s ease;
}

.home-carousel__dots button.is-active {
  width: 46px;
  background: linear-gradient(135deg, var(--primary), #3cd8ee);
  box-shadow: 0 0 22px rgba(54, 228, 238, .28);
}

.home-promos.is-static .home-carousel {
  grid-template-columns: minmax(0, 1fr);
}

.home-promos.is-static .home-carousel__control,
.home-promos.is-static .home-carousel__dots {
  display: none;
}

@media (max-width: 980px) {
  .home-promo-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (max-width: 640px) {
  .hero__actions .button {
    width: 100%;
    justify-content: center;
  }

  .home-carousel {
    grid-template-columns: 1fr;
  }

  .home-carousel__control {
    display: none;
  }

  .home-promo-card {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__icon,
  .hero__media::before {
    animation: none;
  }

  .home-promo-card:hover::after {
    animation: none;
  }
}

/* Full-width layout, legal footer and back-to-top */
main,
.site-header,
.site-footer {
  width: min(1760px, calc(100% - 32px));
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center;
  row-gap: 18px;
}

.footer-legal {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted);
  font-size: 13px;
}

.footer-legal > span {
  color: #d7def0;
}

.footer-legal__links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-legal__links .button {
  border-color: rgba(255, 255, 255, .10);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035)),
    rgba(255, 255, 255, .035);
  color: #edf3ff;
}

.footer-legal__links .button:hover {
  border-color: rgba(54, 228, 238, .42);
  background: linear-gradient(135deg, rgba(54, 228, 238, .18), rgba(95, 107, 255, .16));
}

.legal-hero {
  padding-bottom: 26px;
}

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

.legal-hero .muted {
  max-width: 760px;
  font-size: 18px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 70px;
}

.legal-card {
  padding: 22px;
  border: 1px solid rgba(137, 153, 184, .24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(54, 228, 238, .12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 20px 56px rgba(0, 0, 0, .22);
}

.legal-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border: 1px solid rgba(54, 228, 238, .24);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(54, 228, 238, .10);
}

.legal-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.legal-card p {
  margin: 0;
  color: #d8e1f2;
  line-height: 1.75;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(54, 228, 238, .24), rgba(95, 107, 255, .24)),
    rgba(13, 16, 25, .88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 18px 44px rgba(0, 0, 0, .34);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease, border-color .18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: rgba(54, 228, 238, .55);
  transform: translateY(-2px);
}

.back-to-top .icon {
  width: 24px;
  height: 24px;
}

@media (max-width: 980px) {
  main,
  .site-header,
  .site-footer {
    width: min(100% - 24px, 1760px);
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-actions,
  .footer-stats,
  .footer-legal {
    justify-content: flex-start;
  }
}

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

  .footer-legal__links,
  .footer-legal__links .button {
    width: 100%;
  }

  .footer-legal__links .button {
    justify-content: center;
  }
}

/* Page height, OAuth setup and reliable back-to-top */
html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.site-footer {
  flex-shrink: 0;
}

.oauth-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: clamp(34px, 5vw, 80px) 0 44px;
}

.oauth-hero {
  padding: 0;
}

.oauth-hero h1 {
  max-width: 1180px;
}

.oauth-hero .muted {
  max-width: 940px;
  font-size: 18px;
}

.oauth-panel {
  width: 100%;
  padding: clamp(22px, 2.4vw, 34px);
}

.oauth-panel__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.oauth-panel__head > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid rgba(54, 228, 238, .24);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(54, 228, 238, .10);
}

.oauth-panel__head h2 {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 44px);
}

.oauth-panel .code-block {
  max-width: none;
  overflow-x: auto;
}

.back-to-top {
  opacity: .72;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:not(.is-visible) {
  opacity: .36;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .oauth-page {
    justify-content: flex-start;
    padding-top: 30px;
  }

  .oauth-panel__head {
    align-items: flex-start;
  }
}

/* Premium, team and scan reports */
.hero-stat {
  min-width: 166px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .035)),
    rgba(9, 12, 22, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 16px 34px rgba(0, 0, 0, .22);
}

.hero-stat > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(54, 228, 238, .22);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(54, 228, 238, .10);
}

.hero-stat strong {
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.hero-stat small {
  color: #cbd5ea;
  font-size: 12px;
  line-height: 1.25;
}

.premium-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr) auto;
  gap: 18px;
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(137, 153, 184, .22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0, rgba(54, 228, 238, .16), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .024)),
    rgba(18, 21, 31, .82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 70px rgba(0, 0, 0, .22);
}

.premium-section h2 {
  margin: 0;
  max-width: 780px;
}

.premium-section__copy .muted {
  max-width: 780px;
}

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

.premium-section__cards article,
.premium-compare article {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.premium-section__cards article > span,
.premium-compare article > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border: 1px solid rgba(54, 228, 238, .22);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(54, 228, 238, .10);
}

.premium-section__cards .is-premium,
.premium-compare .is-premium {
  border-color: rgba(246, 200, 95, .34);
  background:
    radial-gradient(circle at 100% 0, rgba(246, 200, 95, .16), transparent 42%),
    rgba(255, 255, 255, .045);
}

.premium-section__cards strong {
  display: block;
  margin-bottom: 5px;
}

.premium-section__cards p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.premium-modal[hidden] {
  display: none;
}

.premium-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.premium-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 14, .72);
  backdrop-filter: blur(8px);
}

.premium-modal__dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(137, 153, 184, .28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0, rgba(54, 228, 238, .16), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .024)),
    #111722;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .48);
}

.premium-modal__dialog h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

.premium-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  font-size: 24px;
}

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

.premium-compare h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.premium-compare ul {
  margin: 0;
  padding-left: 18px;
  color: #dce5f6;
}

.premium-compare li + li {
  margin-top: 8px;
}

.premium-modal__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

body.has-modal-open {
  overflow: hidden;
}

.premium-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: #edf3ff;
  background: rgba(255, 255, 255, .055);
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.premium-status.is-active {
  border-color: rgba(246, 200, 95, .42);
  color: #ffe7a8;
  background: rgba(246, 200, 95, .12);
}

.premium-field,
.premium-lock {
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, .035);
}

.premium-field__label,
.premium-lock {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.premium-field__label {
  align-items: center;
  margin-bottom: 8px;
  color: #edf3ff;
  font-weight: 800;
}

.premium-field.is-locked,
.premium-lock.is-locked,
.toggle-card.is-disabled {
  opacity: .68;
}

.premium-lock > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(246, 200, 95, .26);
  border-radius: 8px;
  color: var(--gold);
  background: rgba(246, 200, 95, .10);
}

.premium-lock strong,
.premium-lock p {
  display: block;
  margin: 0;
}

.premium-lock p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.toggle-card.is-disabled {
  cursor: not-allowed;
}

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

.team-grid--compact {
  margin-top: 16px;
}

.team-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(137, 153, 184, .22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 0, rgba(54, 228, 238, .11), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .018)),
    rgba(19, 23, 34, .82);
}

.team-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-card__avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  overflow: hidden;
  border: 1px solid rgba(54, 228, 238, .20);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red, #d21f2b), var(--primary));
  font-weight: 900;
}

.team-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  margin: 0;
  font-size: 20px;
}

.team-card p {
  margin: 3px 0 0;
  color: var(--muted);
}

.team-card__role {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(54, 228, 238, .20);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(54, 228, 238, .08);
  font-weight: 800;
}

.team-card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.team-card__badges span,
.scan-report-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  color: #dbe6f7;
  background: rgba(255, 255, 255, .045);
  font-size: 12px;
  font-weight: 800;
}

.admin-team-panel {
  margin-bottom: 26px;
}

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

.scan-report-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(137, 153, 184, .22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .018)),
    rgba(9, 12, 20, .54);
}

.scan-report-card.is-complete {
  border-color: rgba(54, 194, 117, .28);
}

.scan-report-card.is-failed {
  border-color: rgba(255, 107, 95, .34);
}

.scan-report-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.scan-report-card__head > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(54, 228, 238, .22);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(54, 228, 238, .10);
}

.scan-report-card__head strong,
.scan-report-card__head small {
  display: block;
}

.scan-report-card__head small {
  color: var(--muted);
}

.scan-report-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scan-report-card__metrics span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.scan-report-card__metrics .icon {
  color: var(--cyan);
}

.scan-report-card__metrics strong {
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.scan-report-card__metrics small {
  color: var(--muted);
  font-size: 11px;
}

.scan-report-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.scan-report-card__error {
  margin: 12px 0 0;
  color: #ffb6af;
}

@media (max-width: 1180px) {
  .premium-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .premium-section__cards,
  .premium-compare,
  .team-grid,
  .scan-report-grid {
    grid-template-columns: 1fr;
  }

  .hero-stat {
    width: 100%;
  }

  .scan-report-card__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Admin and complete guild dashboard */
.dashboard-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -10px 0 20px;
}

.dashboard-modules,
.admin-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.dashboard-module,
.admin-metric {
  min-width: 0;
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(137, 153, 184, .22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 0, rgba(54, 228, 238, .13), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)),
    rgba(19, 23, 33, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 18px 44px rgba(0, 0, 0, .20);
}

.dashboard-module > span,
.admin-metric > span,
.setting-block__head > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(54, 228, 238, .22);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(54, 228, 238, .10);
}

.dashboard-module strong,
.admin-metric strong {
  display: block;
  color: #fff;
  font-size: 22px;
  line-height: 1.1;
}

.dashboard-module h2,
.admin-metric h2 {
  margin: 4px 0 4px;
  font-size: 15px;
}

.dashboard-module p,
.admin-metric p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.admin-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-metric {
  display: grid;
  gap: 10px;
}

.section--compact {
  padding-top: 26px;
}

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

.setting-block {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(137, 153, 184, .20);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .014)),
    rgba(8, 11, 18, .42);
}

.setting-block__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.setting-block__head h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.setting-block__head p {
  margin: 0;
  color: var(--muted);
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.toggle-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
}

.toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-card > span {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  transition: background .18s ease, border-color .18s ease;
}

.toggle-card > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #d7def0;
  transition: transform .18s ease, background .18s ease;
}

.toggle-card input:checked + span {
  border-color: rgba(54, 228, 238, .48);
  background: linear-gradient(135deg, rgba(54, 228, 238, .45), rgba(95, 107, 255, .42));
}

.toggle-card input:checked + span::after {
  transform: translateX(16px);
  background: #fff;
}

.toggle-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #edf3ff;
  font-size: 13px;
  line-height: 1.35;
}

.form-grid--compact {
  gap: 12px;
}

.advanced-json {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.advanced-json summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #edf3ff;
  cursor: pointer;
  font-weight: 800;
}

.advanced-json .form-grid {
  margin-top: 14px;
}

.advanced-json textarea {
  opacity: .88;
}

.admin-heading {
  padding-bottom: 38px;
}

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

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

@media (max-width: 700px) {
  .dashboard-modules,
  .admin-overview,
  .toggle-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-toolbar .button {
    width: 100%;
    justify-content: center;
  }
}
