:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #101010;
  --panel-2: #151515;
  --ink: #efeee8;
  --muted: #8c8984;
  --muted-2: #5d5a57;
  --purple: #782cff;
  --purple-bright: #a259ff;
  --line: rgba(255,255,255,.11);
  --line-strong: rgba(255,255,255,.18);
  --green: #73d69e;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #050505;
  color: var(--ink);
  font-family: "Space Mono", monospace;
}

button,
select,
a {
  font: inherit;
}

button,
a {
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .13;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

.app {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: 82px 1fr 34px;
  background: #080808;
  overflow: hidden;
  position: relative;
}

.topbar {
  z-index: 30;
  padding: 0 4.2vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  background:
    linear-gradient(
      90deg,
      rgba(8,8,13,.98),
      rgba(22,12,40,.98),
      rgba(8,8,13,.98)
    );
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 35px rgba(0,0,0,.35);
}

.brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 24px;
  letter-spacing: .12em;
}

.brand-image {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.10),
    0 0 24px rgba(120,44,255,.22);
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(5,5,5,.82);
}

.nav-item {
  height: 37px;
  padding: 0 19px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #aaa6a0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .19em;
  transition: .18s ease;
}

.nav-item:hover {
  color: white;
}

.nav-item.active {
  background: var(--ink);
  color: #111;
}

.top-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
}

.system-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  color: #88847e;
  font-size: 8px;
  letter-spacing: .14em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9a153;
  box-shadow: 0 0 0 5px rgba(217,161,83,.08);
}

.status-dot.online {
  background: var(--green);
  box-shadow:
    0 0 0 5px rgba(115,214,158,.08),
    0 0 14px rgba(115,214,158,.22);
}

.login-button,
.logout-button {
  min-height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #0a0a0a;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .17em;
  transition: .18s ease;
}

.login-button:hover {
  background: var(--ink);
  color: #111;
}

.logout-button {
  padding: 0 12px;
  color: #999;
}

.logout-button:hover {
  color: white;
  border-color: rgba(120,44,255,.55);
}

.profile-button {
  min-height: 43px;
  padding: 4px 10px 4px 4px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b0b0b;
}

.profile-button img {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-button span {
  text-align: left;
}

.profile-button b,
.profile-button small {
  display: block;
}

.profile-button b {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
}

.profile-button small {
  color: var(--purple-bright);
  font-size: 6px;
  margin-top: 2px;
  letter-spacing: .12em;
}

.view {
  min-height: 0;
  display: none;
  position: relative;
  overflow: hidden;
}

.view.active {
  display: block;
}

#view-home {
  background: #090909;
}

.hero-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 67% 47%,
      rgba(120,44,255,.28),
      transparent 30%
    ),
    radial-gradient(
      ellipse at 84% 18%,
      rgba(162,89,255,.18),
      transparent 25%
    ),
    linear-gradient(
      90deg,
      #07070b 0%,
      #0c0b13 38%,
      #1a0c30 68%,
      #08080d 100%
    );
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0,0,0,.55),
      transparent 33%,
      transparent 73%,
      rgba(0,0,0,.5)
    ),
    linear-gradient(
      0deg,
      rgba(0,0,0,.72),
      transparent 26%,
      transparent 70%,
      rgba(0,0,0,.16)
    );
}

.red-light {
  position: absolute;
  width: 18vw;
  height: 110%;
  right: 22%;
  top: -5%;
  transform: skewX(-7deg);
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(120,44,255,.08),
      rgba(162,89,255,.31),
      rgba(92,35,208,.13),
      transparent
    );
  filter: blur(5px);
}

.hero-brand-art {
  position: absolute;
  right: 1.8vw;
  top: 50%;
  width: min(59vw, 860px);
  height: min(78vh, 780px);
  transform: translateY(-50%) rotate(-2deg);
  object-fit: cover;
  opacity: .19;
  filter:
    saturate(1.18)
    contrast(1.08)
    drop-shadow(0 0 45px rgba(120,44,255,.22));
  mix-blend-mode: screen;
  mask-image:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(0,0,0,.60) 26%,
      #000 55%,
      #000 100%
    );
  pointer-events: none;
  user-select: none;
}

.diagonal {
  position: absolute;
  background: rgba(255,255,255,.035);
  transform: rotate(-18deg);
}

.diagonal-one {
  width: 16vw;
  height: 130vh;
  right: 29vw;
  top: -30vh;
}

.diagonal-two {
  width: 2px;
  height: 150vh;
  right: 43vw;
  top: -30vh;
}

.grid-lines {
  position: absolute;
  inset: 0;
  opacity: .15;
  background-image:
    linear-gradient(
      rgba(255,255,255,.08) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,.08) 1px,
      transparent 1px
    );
  background-size: 90px 90px;
  mask-image: linear-gradient(
    90deg,
    #000,
    transparent 48%,
    #000
  );
}

.home-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 7vh 10.4vw 5vh;
}

.hero-copy {
  width: min(620px, 45vw);
  position: absolute;
  left: 10.4vw;
  top: 16%;
}

.series-label {
  width: max-content;
  max-width: 100%;
  min-height: 31px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--purple);
  border-radius: 999px;
  color: white;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .18em;
}

.series-label span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: white;
}

.hero-copy h1 {
  margin: 20px 0 14px;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(88px, 8.2vw, 156px);
  line-height: .72;
  letter-spacing: -.03em;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy h1 .white {
  color: #f1f0ea;
}

.hero-copy h1 .red {
  color: var(--purple);
}

.hero-copy p {
  width: min(500px, 92%);
  margin: 30px 0 0;
  color: #d0ccc5;
  font-size: 11px;
  line-height: 1.75;
  text-shadow: 0 2px 12px black;
}

.home-actions {
  display: flex;
  gap: 9px;
  margin-top: 28px;
}

.primary-cta,
.secondary-cta {
  min-height: 52px;
  padding: 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .17em;
}

.primary-cta {
  border: 0;
  background: var(--purple);
  color: white;
  box-shadow: 0 14px 35px rgba(120,44,255,.23);
}

.primary-cta:hover {
  background: #914cff;
}

.secondary-cta {
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(8,8,8,.72);
  color: white;
}

.stats {
  width: min(360px, 26vw);
  position: absolute;
  right: 10.4vw;
  bottom: 12%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat {
  min-height: 87px;
  padding: 17px 17px 13px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(14,12,12,.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.stat span {
  display: block;
  color: #9c9790;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .2em;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 35px;
  line-height: .9;
  letter-spacing: .03em;
}

.stat:nth-child(2) strong,
.stat:nth-child(4) strong {
  color: var(--purple-bright);
}

.stat:nth-child(3) strong {
  color: #ffffff;
}

.server-signature {
  position: absolute;
  right: 10.4vw;
  top: 12%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.guild-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.16);
}

.guild-icon.fallback {
  display: grid;
  place-items: center;
  background: var(--purple);
  font-family: "Bebas Neue", sans-serif;
  font-size: 22px;
}

.server-signature span,
.server-signature b,
.server-signature small {
  display: block;
}

.server-signature span {
  color: #8e8982;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .18em;
}

.server-signature b {
  margin-top: 4px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 19px;
  letter-spacing: .06em;
}

.server-signature small {
  margin-top: 2px;
  color: #726e68;
  font-size: 6px;
}

/* Shared panel pages */

#view-logs,
#view-messages {
  padding: 34px 4.2vw 25px;
  background:
    radial-gradient(
      circle at 80% 10%,
      rgba(120,44,255,.09),
      transparent 30vw
    ),
    #090909;
}

.panel-head,
.messages-heading {
  height: 104px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.section-kicker {
  display: block;
  color: #817c75;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .19em;
}

.panel-head h2,
.messages-heading h2 {
  margin: 7px 0 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 54px;
  line-height: .9;
  letter-spacing: .015em;
}

.panel-head h2 em,
.messages-heading h2 em {
  color: var(--purple);
  font-style: normal;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-tools select {
  height: 39px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #101010;
  color: #aaa59e;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .1em;
}

.square-action,
.channels-head button {
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #111;
  color: #bbb5ae;
}

.logs-layout {
  height: calc(100% - 104px);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 12px;
}

.event-rail,
.log-details,
.channels-panel,
.message-panel {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(14,14,14,.88);
  border-radius: 16px;
}

.rail-title,
.channels-head,
.message-panel-head {
  height: 56px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.rail-title span,
.channels-head span {
  color: #918c85;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .16em;
}

.rail-title i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(115,214,158,.3);
}

.logs-list {
  height: calc(100% - 56px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #3b3835 transparent;
}

.log-row {
  min-height: 74px;
  padding: 13px 18px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.065);
  cursor: pointer;
  transition: .15s ease;
}

.log-row:hover,
.log-row.active {
  background: rgba(120,44,255,.075);
}

.event-type {
  width: max-content;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(120,44,255,.3);
  border-radius: 999px;
  color: #b887ff;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.log-main b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.log-main small {
  display: block;
  margin-top: 5px;
  color: #77726c;
  font-size: 7px;
}

.log-time {
  color: #65615c;
  font-size: 7px;
  text-align: right;
}

.log-details {
  padding: 22px;
  overflow: auto;
}

.details-empty {
  margin-top: 20px;
  color: #635f59;
  font-size: 8px;
  line-height: 1.7;
}

.details-card {
  margin-top: 18px;
}

.details-card h3 {
  margin: 0 0 18px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 30px;
  letter-spacing: .025em;
}

.detail-line {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.detail-line span,
.detail-line b {
  display: block;
}

.detail-line span {
  color: #6f6a64;
  font-size: 6px;
  letter-spacing: .16em;
}

.detail-line b {
  margin-top: 5px;
  font-size: 8px;
  line-height: 1.6;
  word-break: break-word;
}

.raw-json {
  margin-top: 15px;
  padding: 13px;
  border-radius: 10px;
  background: #080808;
  color: #807a74;
  font-size: 7px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.access-gate {
  height: calc(100% - 104px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(
      115deg,
      rgba(120,44,255,.1),
      transparent 44%
    ),
    #0e0e0e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.gate-code {
  font-family: "Bebas Neue", sans-serif;
  font-size: 104px;
  line-height: .8;
  color: var(--purple);
}

.access-gate span {
  color: #77716a;
  font-size: 7px;
  letter-spacing: .17em;
}

.access-gate h3 {
  margin: 8px 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 34px;
  letter-spacing: .03em;
}

.access-gate p {
  max-width: 440px;
  margin: 0;
  color: #77726c;
  font-size: 8px;
  line-height: 1.7;
}

/* Messages */

.archive-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #77716a;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .11em;
}

.archive-notice i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 12px rgba(162,89,255,.4);
}

.messages-layout {
  height: calc(100% - 104px);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
}

.channels-head button {
  width: 30px;
  height: 30px;
}

.channel-list {
  height: calc(100% - 56px);
  padding: 8px;
  overflow: auto;
}

.channel-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8e8982;
  text-align: left;
  font-size: 8px;
  transition: .14s ease;
}

.channel-item::before {
  content: "#";
  color: #55514d;
}

.channel-item:hover,
.channel-item.active {
  background: rgba(255,255,255,.055);
  color: white;
}

.channel-item.active::before {
  color: var(--purple-bright);
}

.message-panel-head {
  height: 64px;
}

.message-panel-head small,
.message-panel-head b {
  display: block;
}

.message-panel-head small {
  color: #66615c;
  font-size: 6px;
  letter-spacing: .15em;
}

.message-panel-head b {
  margin-top: 4px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 21px;
  letter-spacing: .04em;
}

.message-count {
  color: #77726c;
  font-size: 7px;
  letter-spacing: .12em;
}

.message-list {
  height: calc(100% - 64px);
  overflow: auto;
  padding: 8px 18px 20px;
}

.message {
  position: relative;
  padding: 15px 4px 15px 48px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}

.message.deleted {
  background:
    linear-gradient(
      90deg,
      rgba(120,44,255,.08),
      transparent 38%
    );
}

.message-avatar {
  position: absolute;
  left: 2px;
  top: 15px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #1b1b1b;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  font-family: "Bebas Neue", sans-serif;
  color: #aaa;
}

.message-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.message-author {
  font-size: 9px;
  font-weight: 700;
}

.message-time {
  color: #5f5b56;
  font-size: 6px;
}

.deleted-label {
  padding: 4px 6px;
  border: 1px solid rgba(120,44,255,.35);
  border-radius: 999px;
  color: #c69cff;
  font-size: 5px;
  font-weight: 700;
  letter-spacing: .1em;
}

.edited-label {
  color: #6e6963;
  font-size: 5px;
}

.message-content {
  margin-top: 7px;
  color: #d1cdc7;
  font-size: 8px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.attachment {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #8c8780;
  font-size: 6px;
}

.empty-state {
  height: 100%;
  display: grid;
  place-items: center;
  color: #57534e;
  font-size: 8px;
  letter-spacing: .08em;
}

/* Footer */

.footer {
  padding: 0 4.2vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.07);
  background: #070707;
  color: #4e4a46;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .14em;
}

.footer span:nth-child(2) {
  justify-self: center;
}

.footer span:last-child {
  justify-self: end;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #111;
  box-shadow: 0 18px 55px rgba(0,0,0,.5);
  color: #ddd8d1;
  font-size: 8px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

/* laptops */
@media (max-height: 760px) and (min-width: 821px) {
  .app {
    grid-template-rows: 68px 1fr 28px;
  }

  .hero-copy {
    top: 10%;
  }

  .hero-copy h1 {
    font-size: clamp(80px, 7.6vw, 126px);
    margin-top: 16px;
  }

  .hero-copy p {
    margin-top: 22px;
  }

  .home-actions {
    margin-top: 20px;
  }

  .stats {
    bottom: 8%;
  }

  .panel-head,
  .messages-heading {
    height: 88px;
  }

  .logs-layout,
  .messages-layout,
  .access-gate {
    height: calc(100% - 88px);
  }
}

/* tablets + phones */
@media (max-width: 900px) {
  .app {
    grid-template-rows: 64px 1fr 28px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }

  .nav-pill {
    position: fixed;
    z-index: 80;
    left: 50%;
    bottom: 42px;
    transform: translateX(-50%);
    box-shadow: 0 12px 40px rgba(0,0,0,.55);
  }

  .nav-item {
    height: 35px;
    padding: 0 13px;
    font-size: 7px;
  }

  .system-label {
    display: none;
  }

  .brand {
    font-size: 18px;
  }

  .brand-image {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .login-button {
    width: 41px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .login-button::after {
    content: "D";
    font-family: "Bebas Neue", sans-serif;
    font-size: 17px;
  }

  .profile-button span,
  .logout-button {
    display: none;
  }

  .profile-button {
    min-height: 40px;
    width: 40px;
    padding: 3px;
  }

  .profile-button img {
    width: 32px;
    height: 32px;
  }

  .home-content {
    padding: 30px 20px;
  }

  .hero-copy {
    width: calc(100% - 40px);
    left: 20px;
    top: 9%;
    text-align: left;
  }

  .series-label {
    font-size: 6px;
  }

  .hero-copy h1 {
    font-size: clamp(72px, 23vw, 120px);
  }

  .hero-copy p {
    width: 96%;
    max-width: 500px;
    font-size: 8px;
  }

  .home-actions {
    width: 100%;
  }

  .primary-cta,
  .secondary-cta {
    flex: 1;
    min-height: 44px;
    padding: 0 10px;
    font-size: 6px;
  }

  .stats {
    width: calc(100% - 40px);
    right: 20px;
    bottom: 11%;
  }

  .stat {
    min-height: 65px;
    padding: 11px 13px;
  }

  .stat strong {
    font-size: 27px;
  }

  .server-signature {
    display: none;
  }

  #view-logs,
  #view-messages {
    padding: 22px 14px 75px;
  }

  .panel-head,
  .messages-heading {
    height: 83px;
  }

  .panel-head h2,
  .messages-heading h2 {
    font-size: 39px;
  }

  .panel-tools select {
    display: none;
  }

  .logs-layout {
    grid-template-columns: 1fr;
    height: calc(100% - 83px);
  }

  .log-details {
    display: none;
  }

  .log-row {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .log-time {
    display: none;
  }

  .messages-layout {
    grid-template-columns: 125px minmax(0,1fr);
    height: calc(100% - 83px);
  }

  .channels-head {
    padding: 0 9px;
  }

  .channels-head span {
    font-size: 5px;
  }

  .channel-item {
    padding: 0 8px;
    font-size: 7px;
  }

  .archive-notice {
    display: none;
  }

  .access-gate {
    height: calc(100% - 83px);
    padding: 20px;
    gap: 18px;
  }

  .gate-code {
    font-size: 70px;
  }

  .access-gate h3 {
    font-size: 27px;
  }

  .footer {
    padding: 0 14px;
  }

  .footer span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand {
    letter-spacing: .07em;
  }

  .hero-copy {
    top: 7%;
  }

  .hero-copy h1 {
    font-size: clamp(64px, 22vw, 95px);
    margin-top: 14px;
  }

  .hero-copy p {
    margin-top: 20px;
    line-height: 1.55;
  }

  .stats {
    gap: 6px;
  }

  .stat {
    min-height: 59px;
  }

  .stat strong {
    margin-top: 5px;
    font-size: 24px;
  }

  .messages-layout {
    grid-template-columns: 105px minmax(0,1fr);
  }

  .message-list {
    padding-left: 10px;
    padding-right: 10px;
  }

  .message {
    padding-left: 40px;
  }

  .message-avatar {
    width: 29px;
    height: 29px;
  }

  .message-content {
    font-size: 7px;
  }
}

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


/* =========================================================
   RAVENHUB 2.0 — PURPLE / WHITE BRAND LAYER
========================================================= */

:root {
  --purple-deep: #34106f;
  --purple: #782cff;
  --purple-bright: #a259ff;
  --purple-soft: #c8a9ff;
}

.brand span:last-child {
  color: #f6f3ff;
  text-shadow: 0 0 24px rgba(162,89,255,.12);
}

.nav-pill {
  border-color: rgba(173,133,255,.20);
  box-shadow: inset 0 0 18px rgba(120,44,255,.035);
}

.nav-item.active {
  background: #f8f7fb;
  color: #121016;
  box-shadow: 0 0 22px rgba(255,255,255,.07);
}

.login-button:hover {
  border-color: rgba(162,89,255,.52);
  box-shadow: 0 0 24px rgba(120,44,255,.12);
}

.profile-button {
  border-color: rgba(162,89,255,.18);
}

.hero-copy h1 .red {
  color: var(--purple-bright);
  text-shadow: 0 0 52px rgba(120,44,255,.18);
}

.hero-copy h1 .white {
  color: #f8f7f4;
  text-shadow: 0 5px 35px rgba(0,0,0,.45);
}

.series-label {
  background:
    linear-gradient(135deg, #6d22ee, #944dff);
  box-shadow: 0 9px 32px rgba(120,44,255,.20);
}

.primary-cta {
  background:
    linear-gradient(135deg, #6e24ee, #934cff);
  box-shadow:
    0 14px 35px rgba(120,44,255,.22),
    inset 0 1px rgba(255,255,255,.14);
}

.primary-cta:hover {
  background:
    linear-gradient(135deg, #7a30fa, #a15bff);
}

.secondary-cta:hover {
  border-color: rgba(190,158,255,.58);
  background: rgba(120,44,255,.08);
}

.stat {
  background:
    linear-gradient(
      145deg,
      rgba(18,15,25,.92),
      rgba(10,10,14,.88)
    );
  border-color: rgba(181,151,255,.17);
}

.stat:hover {
  border-color: rgba(162,89,255,.38);
}

.guild-icon.fallback {
  background:
    linear-gradient(135deg, #6522d9, #a259ff);
}

#view-logs,
#view-messages {
  background:
    radial-gradient(
      circle at 82% 8%,
      rgba(120,44,255,.12),
      transparent 30vw
    ),
    radial-gradient(
      circle at 10% 100%,
      rgba(162,89,255,.05),
      transparent 28vw
    ),
    #09090d;
}

.panel-head h2 em,
.messages-heading h2 em {
  color: var(--purple-bright);
}

.event-type {
  border-color: rgba(162,89,255,.31);
  color: #c7a8ff;
}

.log-row:hover,
.log-row.active {
  background: rgba(120,44,255,.085);
}

.channel-item.active::before {
  color: var(--purple-bright);
}

.message.deleted {
  background:
    linear-gradient(
      90deg,
      rgba(120,44,255,.10),
      transparent 38%
    );
}

.deleted-label {
  border-color: rgba(162,89,255,.38);
  color: #cbaeff;
}

.archive-notice i {
  background: var(--purple-bright);
  box-shadow: 0 0 12px rgba(162,89,255,.44);
}

.gate-code {
  color: var(--purple-bright);
}

.access-gate {
  background:
    linear-gradient(
      115deg,
      rgba(120,44,255,.12),
      transparent 44%
    ),
    #0e0e13;
}

.footer {
  background: #07070b;
}

@media (max-width: 900px) {
  .hero-brand-art {
    width: 90vw;
    height: 70vh;
    right: -25vw;
    opacity: .10;
  }
}



/* =========================================================
   RAVENHUB 2.0 — VISUAL V2
   Bigger type / HUD stats / animated purple-white identity
========================================================= */

:root {
  --rh-purple: #7d32ff;
  --rh-purple-2: #a967ff;
  --rh-purple-3: #d5b8ff;
  --rh-white: #fbfaff;
  --rh-black: #07070b;
}

/* Stronger readability everywhere */
body {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: .025em;
}

button,
select,
a,
input {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-weight: 800;
}

.app {
  grid-template-rows: 94px 1fr 60px;
}

/* =========================================================
   HEADER
========================================================= */

.topbar {
  padding: 0 5vw;
  border-bottom-color: rgba(201,171,255,.16);
  background:
    linear-gradient(
      90deg,
      rgba(7,7,11,.97),
      rgba(24,12,43,.985) 52%,
      rgba(7,7,11,.97)
    );
  box-shadow:
    0 16px 45px rgba(0,0,0,.48),
    0 1px 0 rgba(174,119,255,.06);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -1px;
  height: 1px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(126,50,255,.5),
      rgba(211,181,255,.9),
      rgba(126,50,255,.5),
      transparent
    );
  opacity: .55;
}

.brand {
  gap: 14px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .06em;
}

.brand-image {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.12),
    0 0 28px rgba(126,50,255,.28);
  transition: transform .25s ease, filter .25s ease;
}

.brand:hover .brand-image {
  transform: rotate(-4deg) scale(1.06);
  filter: brightness(1.1);
}

.nav-pill {
  gap: 5px;
  padding: 6px;
  background: rgba(6,6,10,.78);
  border-color: rgba(202,174,255,.22);
  box-shadow:
    inset 0 0 26px rgba(126,50,255,.04),
    0 8px 24px rgba(0,0,0,.22);
}

.nav-item {
  min-width: 110px;
  height: 46px;
  padding: 0 20px;
  position: relative;
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .11em;
  transition:
    color .22s ease,
    background .22s ease,
    transform .22s ease,
    box-shadow .22s ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 5px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--rh-purple-2), transparent);
  transform: scaleX(0);
  opacity: 0;
  transition: .22s ease;
}

.nav-item:hover {
  color: #fff;
  transform: translateY(-1px);
}

.nav-item:hover::before {
  transform: scaleX(1);
  opacity: .6;
}

.nav-item.active {
  background: var(--rh-white);
  color: #0d0b12;
  box-shadow:
    0 7px 22px rgba(255,255,255,.08),
    0 0 24px rgba(126,50,255,.08);
}

.nav-item.active::before {
  transform: scaleX(1);
  opacity: 1;
  background: var(--rh-purple);
}

.system-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.login-button,
.logout-button {
  min-height: 46px;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
}

.login-button {
  border-color: rgba(189,151,255,.3);
  background:
    linear-gradient(135deg, rgba(126,50,255,.18), rgba(15,12,20,.92));
}

.login-button:hover {
  background:
    linear-gradient(135deg, var(--rh-purple), var(--rh-purple-2));
  color: white;
  transform: translateY(-2px);
}

.profile-button {
  min-height: 48px;
  padding: 5px 13px 5px 5px;
}

.profile-button img {
  width: 36px;
  height: 36px;
}

.profile-button b {
  max-width: 145px;
  font-size: 12px;
  font-weight: 900;
}

.profile-button small {
  font-size: 9px;
  font-weight: 900;
}

/* =========================================================
   HERO
========================================================= */

.hero-art {
  background:
    radial-gradient(
      ellipse at 67% 42%,
      rgba(126,50,255,.30),
      transparent 31%
    ),
    radial-gradient(
      ellipse at 90% 0%,
      rgba(176,103,255,.17),
      transparent 30%
    ),
    linear-gradient(
      103deg,
      #06060a 0%,
      #0b0911 37%,
      #160b28 67%,
      #07070c 100%
    );
}

.home-content {
  padding: 5vh 6.2vw 3.5vh;
}

/* Reduce wasted empty space and let title dominate */
.hero-copy {
  width: min(760px, 54vw);
  left: 6.2vw;
  top: 11%;
  animation: heroEnter .75s cubic-bezier(.2,.8,.2,1) both;
}

.series-label {
  min-height: 39px;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
  box-shadow:
    0 13px 34px rgba(126,50,255,.22),
    inset 0 1px rgba(255,255,255,.13);
  animation: labelPulse 4s ease-in-out infinite;
}

.hero-title {
  margin: 17px 0 0;
  font-family: "Black Ops One", "Bebas Neue", sans-serif;
  font-size: clamp(105px, 10.2vw, 190px);
  line-height: .67;
  letter-spacing: -.055em;
  text-transform: uppercase;
  transform: skewX(-3deg);
  filter: drop-shadow(0 16px 32px rgba(0,0,0,.34));
}

.hero-title .title-line {
  display: block;
}

.hero-title .title-raven {
  position: relative;
  z-index: 2;
  color: #fbfaff;
  -webkit-text-stroke: 1px rgba(255,255,255,.18);
  text-shadow:
    5px 5px 0 rgba(126,50,255,.28),
    0 0 44px rgba(255,255,255,.06);
}

.hero-title .title-hub {
  margin-top: .07em;
  color: var(--rh-purple-2);
  text-shadow:
    4px 4px 0 rgba(47,13,99,.85),
    0 0 42px rgba(126,50,255,.26);
}

.hero-title .title-hub b {
  display: inline-block;
  margin-left: .08em;
  padding: .07em .13em .045em;
  border: 3px solid rgba(255,255,255,.85);
  background: #f9f7ff;
  color: #25113f;
  font-size: .42em;
  line-height: 1;
  transform: translateY(-.24em) rotate(-4deg);
  box-shadow:
    7px 7px 0 rgba(126,50,255,.52),
    0 0 26px rgba(162,89,255,.16);
}

.hero-copy p {
  width: min(590px, 94%);
  margin-top: 31px;
  color: #e7e1ef;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .015em;
  text-shadow: 0 3px 16px #000;
}

.home-actions {
  gap: 12px;
  margin-top: 26px;
}

.primary-cta,
.secondary-cta {
  min-height: 58px;
  padding: 0 28px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .11em;
}

.primary-cta {
  position: relative;
  overflow: hidden;
}

.primary-cta::after {
  content: "";
  position: absolute;
  top: -80%;
  bottom: -80%;
  width: 30px;
  left: -60px;
  transform: rotate(24deg);
  background: rgba(255,255,255,.32);
  filter: blur(3px);
  animation: buttonShine 4.2s ease-in-out infinite;
}

/* Background artwork now fills right side more aggressively */
.hero-brand-art {
  right: -4vw;
  width: min(68vw, 1000px);
  height: min(88vh, 850px);
  opacity: .23;
  filter:
    saturate(1.2)
    contrast(1.1)
    drop-shadow(0 0 58px rgba(126,50,255,.27));
  animation: artFloat 8s ease-in-out infinite;
}

/* Animated scan */
.hero-scan {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  height: 1px;
  top: 8%;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      transparent 25%,
      rgba(174,115,255,.1) 38%,
      rgba(218,192,255,.78) 52%,
      rgba(126,50,255,.12) 67%,
      transparent 84%
    );
  box-shadow: 0 0 20px rgba(126,50,255,.28);
  opacity: .5;
  animation: scanDown 7s linear infinite;
}

.spark {
  position: absolute;
  z-index: 2;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rh-purple-2);
  box-shadow:
    0 0 12px var(--rh-purple),
    0 0 30px rgba(126,50,255,.45);
  animation: sparkFloat 5s ease-in-out infinite;
}

.spark-a {
  left: 48%;
  top: 23%;
}

.spark-b {
  right: 14%;
  top: 18%;
  width: 4px;
  height: 4px;
  animation-delay: -1.8s;
}

.spark-c {
  right: 27%;
  bottom: 18%;
  width: 5px;
  height: 5px;
  animation-delay: -3.1s;
}

/* =========================================================
   STATS — HUD blended into hero
========================================================= */

.stats {
  width: min(720px, 49vw);
  right: 5.5vw;
  bottom: 7%;
  gap: 0;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(218,193,255,.26);
  border-bottom: 1px solid rgba(218,193,255,.11);
  border-radius: 0;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(13,10,20,.62) 9%,
      rgba(16,10,27,.75) 50%,
      rgba(13,10,20,.60) 92%,
      transparent
    );
  backdrop-filter: blur(10px);
  animation: statsEnter .8s .18s cubic-bezier(.2,.8,.2,1) both;
}

.stats::before {
  content: "LIVE SERVER DATA";
  position: absolute;
  right: 0;
  top: -24px;
  color: rgba(208,183,255,.52);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
}

.stat {
  min-height: 118px;
  padding: 20px 20px 17px;
  position: relative;
  border: 0;
  border-right: 1px solid rgba(214,188,255,.11);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transition:
    background .22s ease,
    transform .22s ease;
}

.stat:last-child {
  border-right: 0;
}

.stat::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 13px;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--rh-purple-2), transparent);
  opacity: .45;
  transition: width .22s ease, opacity .22s ease;
}

.stat:hover {
  background:
    linear-gradient(
      180deg,
      rgba(126,50,255,.09),
      rgba(255,255,255,.018)
    );
  transform: translateY(-4px);
}

.stat:hover::after {
  width: 72%;
  opacity: .9;
}

.stat span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  color: #aaa1b5;
}

.stat strong {
  margin-top: 10px;
  font-family: "Black Ops One", sans-serif;
  font-size: clamp(34px, 3vw, 51px);
  font-weight: 400;
  line-height: .9;
  color: #fff;
  text-shadow: 0 0 24px rgba(255,255,255,.05);
}

.stat:nth-child(2) strong,
.stat:nth-child(4) strong {
  color: var(--rh-purple-3);
}

/* Server identity moved into upper right as a real badge */
.server-signature {
  right: 5.5vw;
  top: 8%;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(196,162,255,.17);
  border-radius: 16px;
  background: rgba(8,7,12,.47);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
  animation: signatureEnter .7s .28s ease both;
}

.guild-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
}

.server-signature span {
  font-size: 9px;
  font-weight: 900;
}

.server-signature b {
  font-family: "Black Ops One", sans-serif;
  font-size: 18px;
  font-weight: 400;
}

.server-signature small {
  font-size: 9px;
  font-weight: 700;
}

/* =========================================================
   SUBPAGES: larger typography
========================================================= */

#view-logs,
#view-messages {
  padding: 36px 5vw 28px;
}

.panel-head,
.messages-heading {
  height: 118px;
}

.section-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
}

.panel-head h2,
.messages-heading h2 {
  margin-top: 7px;
  font-family: "Black Ops One", sans-serif;
  font-size: 54px;
  font-weight: 400;
  letter-spacing: -.025em;
}

.panel-tools select {
  height: 46px;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 900;
}

.square-action,
.channels-head button {
  width: 46px;
  height: 46px;
  font-size: 18px;
}

.logs-layout,
.messages-layout {
  height: calc(100% - 118px);
}

.access-gate {
  height: calc(100% - 118px);
}

.rail-title,
.channels-head,
.message-panel-head {
  height: 64px;
}

.rail-title span,
.channels-head span {
  font-size: 11px;
  font-weight: 900;
}

.logs-list {
  height: calc(100% - 64px);
}

.log-row {
  min-height: 82px;
  grid-template-columns: 142px minmax(0, 1fr) 170px;
}

.event-type {
  font-size: 10px;
  font-weight: 900;
}

.log-main b {
  font-size: 14px;
  font-weight: 900;
}

.log-main small,
.log-time {
  font-size: 10px;
  font-weight: 700;
}

.details-empty,
.detail-line b,
.raw-json,
.access-gate p {
  font-size: 12px;
}

.detail-line span,
.access-gate span {
  font-size: 9px;
  font-weight: 900;
}

.details-card h3,
.access-gate h3 {
  font-family: "Black Ops One", sans-serif;
}

.channel-item {
  min-height: 48px;
  font-size: 12px;
  font-weight: 800;
}

.message-panel-head small {
  font-size: 9px;
  font-weight: 900;
}

.message-panel-head b {
  font-family: "Black Ops One", sans-serif;
  font-size: 19px;
}

.message-count {
  font-size: 10px;
  font-weight: 900;
}

.message-author {
  font-size: 13px;
}

.message-time,
.edited-label,
.deleted-label {
  font-size: 9px;
  font-weight: 800;
}

.message-content {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

/* =========================================================
   FOOTER — PRO VERSION
========================================================= */

.footer {
  min-height: 60px;
  padding: 0 5vw;
  grid-template-columns: 1fr auto 1fr;
  border-top: 1px solid rgba(199,166,255,.15);
  background:
    linear-gradient(
      90deg,
      #07070a,
      #100a19 49%,
      #07070a
    );
  color: #91889c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 8%;
  right: 8%;
  height: 1px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(126,50,255,.5),
      rgba(224,205,255,.7),
      rgba(126,50,255,.5),
      transparent
    );
}

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

.footer-brand img {
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 9px;
  box-shadow: 0 0 18px rgba(126,50,255,.18);
}

.footer-brand b,
.footer-brand small {
  display: block;
}

.footer-brand b {
  color: #f7f4ff;
  font-family: "Black Ops One", sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .03em;
}

.footer-brand b em {
  color: var(--rh-purple-2);
  font-style: normal;
}

.footer-brand small {
  margin-top: 2px;
  font-size: 8px;
  color: #6e6677;
  letter-spacing: .13em;
}

.footer-stack {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-chip {
  min-height: 27px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(190,154,255,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.018);
  color: #8f8699;
  font-size: 8px;
  font-weight: 900;
}

.footer-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #70dc9e;
  box-shadow: 0 0 10px rgba(112,220,158,.44);
}

.footer-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-right b {
  min-width: 65px;
  color: #f4f0fb;
  font-size: 12px;
  letter-spacing: .09em;
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes heroEnter {
  from {
    opacity: 0;
    transform: translateX(-34px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes statsEnter {
  from {
    opacity: 0;
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes signatureEnter {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonShine {
  0%, 67% {
    left: -70px;
    opacity: 0;
  }
  72% {
    opacity: .8;
  }
  86% {
    left: calc(100% + 60px);
    opacity: 0;
  }
  100% {
    left: calc(100% + 60px);
    opacity: 0;
  }
}

@keyframes scanDown {
  0% {
    top: 6%;
    opacity: 0;
  }
  10% {
    opacity: .45;
  }
  88% {
    opacity: .3;
  }
  100% {
    top: 93%;
    opacity: 0;
  }
}

@keyframes artFloat {
  0%, 100% {
    transform: translateY(-50%) rotate(-2deg) scale(1);
  }
  50% {
    transform: translateY(-51.2%) rotate(-1deg) scale(1.015);
  }
}

@keyframes sparkFloat {
  0%, 100% {
    transform: translate(0, 0) scale(.8);
    opacity: .25;
  }
  50% {
    transform: translate(15px, -19px) scale(1.3);
    opacity: .9;
  }
}

@keyframes labelPulse {
  0%, 100% {
    box-shadow:
      0 13px 34px rgba(126,50,255,.19),
      inset 0 1px rgba(255,255,255,.13);
  }
  50% {
    box-shadow:
      0 13px 42px rgba(126,50,255,.32),
      inset 0 1px rgba(255,255,255,.16);
  }
}

/* =========================================================
   LAPTOP HEIGHT
========================================================= */

@media (max-height: 780px) and (min-width: 901px) {
  .app {
    grid-template-rows: 82px 1fr 52px;
  }

  .hero-copy {
    top: 7.5%;
  }

  .series-label {
    min-height: 34px;
    font-size: 9px;
  }

  .hero-title {
    font-size: clamp(88px, 8.7vw, 145px);
  }

  .hero-copy p {
    margin-top: 22px;
    font-size: 15px;
  }

  .primary-cta,
  .secondary-cta {
    min-height: 50px;
  }

  .stats {
    bottom: 4.5%;
  }

  .stat {
    min-height: 94px;
    padding-top: 16px;
  }

  .stat strong {
    font-size: clamp(30px, 2.5vw, 42px);
  }
}

/* =========================================================
   MOBILE/TABLET
========================================================= */

@media (max-width: 900px) {
  .app {
    grid-template-rows: 70px 1fr 48px;
  }

  .topbar {
    padding: 0 15px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-image {
    width: 38px;
    height: 38px;
  }

  .nav-pill {
    bottom: 60px;
  }

  .nav-item {
    min-width: 0;
    height: 40px;
    padding: 0 14px;
    font-size: 9px;
  }

  .hero-copy {
    width: calc(100% - 32px);
    left: 16px;
    top: 5.5%;
  }

  .series-label {
    min-height: 32px;
    font-size: 8px;
  }

  .hero-title {
    font-size: clamp(68px, 19vw, 118px);
    line-height: .72;
  }

  .hero-copy p {
    width: 95%;
    max-width: 520px;
    margin-top: 22px;
    font-size: 14px;
  }

  .home-actions {
    margin-top: 17px;
  }

  .primary-cta,
  .secondary-cta {
    min-height: 46px;
    padding: 0 13px;
    font-size: 9px;
  }

  .stats {
    width: calc(100% - 32px);
    right: 16px;
    bottom: 6%;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid rgba(218,193,255,.22);
  }

  .stat {
    min-height: 65px;
    padding: 11px 13px;
    border-right: 1px solid rgba(214,188,255,.10);
    border-bottom: 1px solid rgba(214,188,255,.08);
  }

  .stat span {
    font-size: 8px;
  }

  .stat strong {
    margin-top: 5px;
    font-size: 25px;
  }

  .stat::after,
  .stats::before {
    display: none;
  }

  .footer {
    padding: 0 14px;
    grid-template-columns: 1fr auto;
  }

  .footer-stack {
    display: none;
  }

  .footer-brand img {
    width: 28px;
    height: 28px;
  }

  .footer-brand b {
    font-size: 10px;
  }

  .footer-brand small,
  .footer-right span {
    display: none;
  }

  .footer-right b {
    font-size: 10px;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    display: none;
  }

  .hero-title {
    font-size: clamp(60px, 18vw, 88px);
  }

  .hero-title .title-hub b {
    border-width: 2px;
  }

  .hero-copy p {
    font-size: 12px;
  }

  .stat {
    min-height: 59px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .stats,
  .server-signature,
  .hero-brand-art,
  .hero-scan,
  .spark,
  .series-label,
  .primary-cta::after {
    animation: none !important;
  }
}



/* =========================================================
   RAVENHUB 2.0 — LOG CENTER V3 + TYPOGRAPHY FIX
========================================================= */

/* Keep "crazy" font only where it is actually readable. */
body,
button,
select,
input,
textarea,
.log-main,
.message,
.detail-line,
.panel-subtitle {
  font-family: "Barlow Condensed", Arial, sans-serif;
}

body {
  font-weight: 600;
}

button,
select,
input {
  font-weight: 700;
}

/* Headlines remain stylized but less compressed/heavy. */
.hero-title,
.panel-head h2,
.messages-heading h2,
.footer-brand b {
  font-family: "Black Ops One", "Barlow Condensed", Arial, sans-serif;
  font-weight: 400;
}

.hero-title {
  letter-spacing: -.035em;
}

.brand {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-weight: 900;
}

.nav-item {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: .08em;
}

/* Fix over-bold utility text. */
.series-label,
.stat span,
.system-label,
.section-kicker,
.rail-title span,
.channels-head span,
.profile-button b,
.profile-button small,
.footer-chip,
.message-count,
.event-type {
  font-weight: 700;
}

.hero-copy p,
.panel-subtitle,
.message-content,
.log-main small,
.detail-line b,
.access-gate p {
  font-weight: 600;
}

.panel-subtitle {
  max-width: 620px;
  margin: 11px 0 0;
  color: #8f8799;
  font-size: 14px;
  line-height: 1.45;
}

/* Log page becomes one admin dashboard */
.logs-main-head {
  height: 126px;
}

.logs-dashboard {
  height: calc(100% - 126px);
  display: grid;
  grid-template-rows: 156px minmax(0, 1fr);
  gap: 14px;
}

.log-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}

.log-category-card {
  min-width: 0;
  height: 156px;
  padding: 18px;
  border: 1px solid rgba(196,163,255,.13);
  border-radius: 17px;
  background:
    radial-gradient(
      circle at 87% 9%,
      rgba(126,50,255,.12),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      rgba(17,14,23,.96),
      rgba(9,9,13,.96)
    );
  color: #f4effa;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition:
    transform .2s ease,
    border-color .2s ease,
    background .2s ease,
    box-shadow .2s ease;
}

.log-category-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--rh-purple-2),
    transparent
  );
  opacity: 0;
  transform: scaleX(.3);
  transition: .2s ease;
}

.log-category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(180,132,255,.30);
  box-shadow: 0 15px 34px rgba(0,0,0,.22);
}

.log-category-card.active {
  border-color: rgba(190,147,255,.42);
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(126,50,255,.24),
      transparent 45%
    ),
    linear-gradient(
      145deg,
      rgba(28,18,43,.98),
      rgba(10,9,14,.98)
    );
  box-shadow:
    inset 0 0 30px rgba(126,50,255,.045),
    0 13px 35px rgba(0,0,0,.20);
}

.log-category-card.active::before {
  opacity: 1;
  transform: scaleX(1);
}

.log-card-index {
  position: absolute;
  right: 15px;
  top: 14px;
  color: rgba(223,207,255,.28);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.log-card-icon {
  width: 43px;
  height: 43px;
  border: 1px solid rgba(184,140,255,.20);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(126,50,255,.07);
  color: #caa9ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}

.log-card-copy {
  margin-top: 17px;
  padding-right: 16px;
}

.log-card-copy span,
.log-card-copy strong,
.log-card-copy small {
  display: block;
}

.log-card-copy span {
  color: #746c7d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .10em;
}

.log-card-copy strong {
  margin-top: 3px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.log-card-copy small {
  margin-top: 7px;
  color: #807888;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.log-card-arrow {
  position: absolute;
  right: 15px;
  bottom: 15px;
  color: #847592;
  font-size: 13px;
  font-style: normal;
  transition: .2s ease;
}

.log-category-card:hover .log-card-arrow,
.log-category-card.active .log-card-arrow {
  color: var(--rh-purple-2);
  transform: translate(2px,-2px);
}

.log-workspace {
  min-height: 0;
  position: relative;
}

.log-mode {
  display: none;
  height: 100%;
  min-height: 0;
}

.log-mode.active {
  display: block;
  animation: logModeIn .24s ease both;
}

@keyframes logModeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Embedded message archive */
.embedded-messages-layout {
  height: 100%;
}

.messages-layout {
  height: 100%;
}

.logs-layout {
  height: 100%;
}

.access-gate {
  height: calc(100% - 126px);
}

/* Cleaner event list */
.rail-title > div span,
.rail-title > div small {
  display: block;
}

.rail-title > div small {
  margin-top: 4px;
  color: #5e5864;
  font-size: 10px;
  font-weight: 600;
}

.log-row {
  min-height: 76px;
}

.event-type {
  letter-spacing: .06em;
}

.log-main b {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
}

.log-main small {
  font-size: 11px;
}

.log-time {
  font-size: 10px;
  font-weight: 600;
}

.message-author {
  font-size: 13px;
  font-weight: 700;
}

.message-content {
  font-size: 13px;
  font-family: "Barlow Condensed", Arial, sans-serif;
  letter-spacing: .01em;
}

.channel-item {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

/* No standalone messages page remains. */
#view-messages {
  display: none !important;
}

@media (max-height: 800px) and (min-width: 901px) {
  .logs-main-head {
    height: 104px;
  }

  .logs-dashboard {
    height: calc(100% - 104px);
    grid-template-rows: 126px minmax(0, 1fr);
  }

  .log-category-card {
    height: 126px;
    padding: 14px;
  }

  .log-card-icon {
    width: 34px;
    height: 34px;
    font-size: 10px;
  }

  .log-card-copy {
    margin-top: 10px;
  }

  .log-card-copy strong {
    font-size: 18px;
  }

  .log-card-copy small {
    font-size: 9px;
    margin-top: 4px;
  }

  .access-gate {
    height: calc(100% - 104px);
  }
}

@media (max-width: 1050px) {
  .log-category-grid {
    grid-template-columns: repeat(5, minmax(125px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .log-category-card {
    min-width: 150px;
  }
}

@media (max-width: 900px) {
  .logs-main-head {
    height: 100px;
  }

  .panel-subtitle {
    display: none;
  }

  .logs-dashboard {
    height: calc(100% - 100px);
    grid-template-rows: 110px minmax(0, 1fr);
  }

  .log-category-grid {
    grid-template-columns: repeat(5, 145px);
    overflow-x: auto;
  }

  .log-category-card {
    height: 105px;
    padding: 12px;
  }

  .log-card-icon {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    font-size: 9px;
  }

  .log-card-copy {
    margin-top: 8px;
  }

  .log-card-copy span,
  .log-card-copy small {
    display: none;
  }

  .log-card-copy strong {
    font-size: 16px;
  }

  .log-card-arrow {
    bottom: 11px;
    right: 11px;
  }

  .access-gate {
    height: calc(100% - 100px);
  }

  .embedded-messages-layout {
    grid-template-columns: 125px minmax(0,1fr);
  }
}

@media (max-width: 520px) {
  .logs-dashboard {
    grid-template-rows: 96px minmax(0,1fr);
  }

  .log-category-grid {
    grid-template-columns: repeat(5, 128px);
  }

  .log-category-card {
    min-width: 128px;
    height: 92px;
  }

  .log-card-index {
    display: none;
  }

  .log-card-copy strong {
    font-size: 15px;
  }
}



/* =========================================================
   RAVENHUB 2.0 — TYPOGRAPHY + PROFILE DRAWER V4
========================================================= */

html,
body,
button,
input,
select,
textarea {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body,
button,
select,
input,
textarea,
.log-main,
.message,
.detail-line,
.panel-subtitle,
.channel-item,
.footer,
.profile-button,
.login-button,
.nav-item {
  font-family: "Inter", Arial, sans-serif !important;
}

body {
  font-weight: 500;
  letter-spacing: 0;
}

/* Restore the earlier crazy homepage font only for RAVENHUB. */
.hero-title,
.hero-title .title-raven,
.hero-title .title-hub {
  font-family: "Black Ops One", sans-serif !important;
  font-weight: 400 !important;
  text-rendering: geometricPrecision;
}

.hero-title {
  transform: none;
  letter-spacing: -.045em;
}

.hero-title .title-raven {
  -webkit-text-stroke: 0;
}

/* Cleaner UI text — no ultra-heavy tiny labels. */
.series-label,
.nav-item,
.login-button,
.logout-button,
.stat span,
.system-label,
.section-kicker,
.rail-title span,
.channels-head span,
.profile-button b,
.profile-button small,
.footer-chip,
.footer-link,
.message-count,
.event-type,
.log-card-copy span,
.log-card-index {
  font-weight: 700 !important;
}

.hero-copy p,
.panel-subtitle,
.log-card-copy small,
.message-content,
.log-main small,
.detail-line b,
.access-gate p {
  font-weight: 500 !important;
}

.nav-item {
  font-size: 12px;
  letter-spacing: .055em;
}

.series-label {
  letter-spacing: .09em;
}

.stat span,
.section-kicker,
.system-label {
  letter-spacing: .075em;
}

.log-card-copy strong {
  font-family: "Inter", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.03em;
}

/* =========================================================
   FOOTER PRIVACY LINK
========================================================= */

.footer-link {
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid rgba(190,154,255,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.018);
  color: #9f95aa;
  font-size: 8px;
  letter-spacing: .055em;
  transition: .18s ease;
}

.footer-link:hover {
  color: #fff;
  border-color: rgba(174,115,255,.36);
  background: rgba(126,50,255,.08);
}

/* =========================================================
   PROFILE DRAWER
========================================================= */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(2,2,5,.58);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}

.drawer-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.profile-drawer {
  position: fixed;
  z-index: 170;
  top: 0;
  right: 0;
  width: min(440px, 92vw);
  height: 100dvh;
  background:
    radial-gradient(circle at 85% 15%, rgba(126,50,255,.13), transparent 32%),
    #0b0b10;
  border-left: 1px solid rgba(196,163,255,.18);
  box-shadow: -30px 0 90px rgba(0,0,0,.52);
  transform: translateX(105%);
  transition: transform .42s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}

.profile-drawer.open {
  transform: translateX(0);
}

.drawer-banner {
  height: 190px;
  position: relative;
  background:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,.17), transparent 25%),
    linear-gradient(135deg, #7d32ff, #160b28 70%, #07070b);
  background-size: cover;
  background-position: center;
}

.drawer-banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, #0b0b10 100%);
}

.drawer-close,
.privacy-close {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(7,7,11,.55);
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.drawer-profile-main {
  height: calc(100% - 150px);
  margin-top: -40px;
  position: relative;
  padding: 0 24px 28px;
  overflow-y: auto;
}

.drawer-avatar-wrap {
  width: 104px;
  height: 104px;
  position: relative;
}

.drawer-avatar {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 28px;
  border: 7px solid #0b0b10;
  background: #16151d;
  box-shadow: 0 15px 38px rgba(0,0,0,.34);
}

.drawer-status-ring {
  position: absolute;
  right: 4px;
  bottom: 5px;
  width: 17px;
  height: 17px;
  border: 4px solid #0b0b10;
  border-radius: 50%;
  background: #70dc9e;
}

.drawer-name-block {
  margin-top: 14px;
}

.drawer-access {
  display: inline-flex;
  min-height: 25px;
  padding: 0 9px;
  align-items: center;
  border: 1px solid rgba(174,115,255,.24);
  border-radius: 999px;
  background: rgba(126,50,255,.08);
  color: #caa8ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}

.drawer-name-block h3 {
  margin: 11px 0 0;
  color: #fbfaff;
  font-family: "Inter", Arial, sans-serif;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -.045em;
}

.drawer-name-block p {
  margin: 3px 0 0;
  color: #837b8b;
  font-size: 13px;
  font-weight: 500;
}

.drawer-about {
  margin-top: 22px;
  padding: 17px;
  border: 1px solid rgba(196,163,255,.11);
  border-radius: 14px;
  background: rgba(255,255,255,.018);
}

.drawer-about span,
.drawer-info-list span,
.drawer-stat span {
  color: #766e80;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .075em;
}

.drawer-about p {
  margin: 8px 0 0;
  color: #d5d0da;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.drawer-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.drawer-stat {
  min-height: 100px;
  padding: 14px;
  border: 1px solid rgba(196,163,255,.11);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(126,50,255,.055), rgba(255,255,255,.015));
}

.drawer-stat strong {
  display: block;
  margin-top: 9px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.drawer-stat small {
  display: block;
  margin-top: 2px;
  color: #68616f;
  font-size: 10px;
  font-weight: 500;
}

.drawer-info-list {
  margin-top: 12px;
  border: 1px solid rgba(196,163,255,.11);
  border-radius: 14px;
  overflow: hidden;
}

.drawer-info-list > div {
  min-height: 58px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.drawer-info-list > div:last-child {
  border-bottom: 0;
}

.drawer-info-list b {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d9d4de;
  font-size: 12px;
  font-weight: 600;
}

/* =========================================================
   PRIVACY MODAL
========================================================= */

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.privacy-modal.open {
  opacity: 1;
  pointer-events: auto;
}

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

.privacy-card {
  width: min(690px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 48px));
  padding: 30px;
  position: relative;
  z-index: 2;
  overflow-y: auto;
  border: 1px solid rgba(196,163,255,.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 85% 0%, rgba(126,50,255,.13), transparent 30%),
    #0d0d12;
  box-shadow: 0 30px 100px rgba(0,0,0,.58);
}

.privacy-kicker {
  color: #9f90ae;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.privacy-card h3 {
  margin: 8px 0 20px;
  color: #fff;
  font-family: "Inter", Arial, sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.privacy-content {
  display: grid;
  gap: 12px;
}

.privacy-content p {
  margin: 0;
  padding: 15px 17px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
  color: #c8c3cd;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.58;
}

@media (max-width: 900px) {
  .footer-link {
    display: none;
  }

  .drawer-banner {
    height: 165px;
  }

  .drawer-profile-main {
    padding-left: 18px;
    padding-right: 18px;
  }
}



/* =========================================================
   RAVENHUB 2.0 — USERS + MODERATION V5
========================================================= */

/* Disable ordinary text selection/copy UI. */
body,
body * {
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
select {
  -webkit-user-select: text;
  user-select: text;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* =========================================================
   USERS PAGE
========================================================= */

#view-users {
  padding: 34px 5vw 26px;
  background:
    radial-gradient(
      circle at 80% 4%,
      rgba(126,50,255,.12),
      transparent 32vw
    ),
    radial-gradient(
      circle at 3% 100%,
      rgba(162,89,255,.055),
      transparent 28vw
    ),
    #09090d;
}

.users-bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    linear-gradient(
      rgba(255,255,255,.055) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,.055) 1px,
      transparent 1px
    );
  background-size: 70px 70px;
  mask-image:
    linear-gradient(
      to bottom,
      #000,
      transparent 78%
    );
}

.users-page-head {
  height: 112px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.users-page-head h2 {
  margin: 7px 0 0;
  color: #fff;
  font-family: "Inter", Arial, sans-serif;
  font-size: 45px;
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
}

.users-page-head h2 em {
  color: #a967ff;
  font-style: normal;
}

.users-page-head p {
  margin: 10px 0 0;
  color: #817988;
  font-size: 12px;
  font-weight: 500;
}

.users-head-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-search {
  width: 250px;
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(197,164,255,.15);
  border-radius: 13px;
  background: rgba(12,11,16,.82);
  backdrop-filter: blur(12px);
}

.user-search > span {
  color: #8d7d9e;
  font-size: 17px;
}

.user-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eeeaf3;
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
}

.user-search input::placeholder {
  color: #665e6e;
}

.users-content {
  height: calc(100% - 112px);
  min-height: 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 65px minmax(0, 1fr);
  gap: 10px;
}

.users-summary {
  padding: 0 18px;
  display: grid;
  grid-template-columns: 150px 145px 145px 1fr;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(197,164,255,.12);
  border-radius: 14px;
  background:
    linear-gradient(
      90deg,
      rgba(126,50,255,.06),
      rgba(255,255,255,.012)
    );
}

.users-summary > div:not(.users-order-info) {
  padding-right: 18px;
  border-right: 1px solid rgba(255,255,255,.07);
}

.users-summary > div + div:not(.users-order-info) {
  padding-left: 18px;
}

.users-summary span {
  display: block;
  color: #716979;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .07em;
}

.users-summary strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.users-order-info {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #736a7c;
  font-size: 9px;
  font-weight: 600;
}

.users-order-info i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a967ff;
  box-shadow: 0 0 12px rgba(169,103,255,.35);
}

.users-grid {
  min-height: 0;
  overflow-y: auto;
  padding: 2px 3px 18px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 9px;
  scrollbar-width: thin;
  scrollbar-color: #3e3150 transparent;
}

.user-card {
  min-width: 0;
  min-height: 102px;
  padding: 14px;
  display: grid;
  grid-template-columns: 40px 56px minmax(0,1fr) auto 24px;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(198,165,255,.11);
  border-radius: 15px;
  background:
    radial-gradient(
      circle at 95% 0%,
      rgba(126,50,255,.075),
      transparent 35%
    ),
    rgba(13,13,18,.86);
  color: #fff;
  text-align: left;
  transition:
    transform .2s ease,
    border-color .2s ease,
    background .2s ease,
    box-shadow .2s ease;
}

.user-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      #7d32ff,
      #c8a9ff,
      transparent
    );
  transition: width .25s ease;
}

.user-card:hover {
  transform: translateY(-3px);
  border-color: rgba(179,130,255,.28);
  background:
    radial-gradient(
      circle at 95% 0%,
      rgba(126,50,255,.14),
      transparent 38%
    ),
    rgba(17,15,23,.95);
  box-shadow: 0 14px 28px rgba(0,0,0,.20);
}

.user-card:hover::after {
  width: 72%;
}

.user-rank-index {
  color: #4f4857;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.user-card-avatar {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: #16141b;
}

.user-avatar-fallback {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, #5c20c3, #9c5cff);
  font-size: 18px;
  font-weight: 800;
}

.user-card-main {
  min-width: 0;
}

.user-card-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.user-card-name-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f8f6fb;
  font-size: 13px;
  font-weight: 700;
}

.user-bot-tag,
.user-staff-tag {
  padding: 3px 5px;
  border-radius: 5px;
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
}

.user-bot-tag {
  color: #8f8797;
  background: rgba(255,255,255,.055);
}

.user-staff-tag {
  color: #c5a0ff;
  background: rgba(126,50,255,.10);
  border: 1px solid rgba(169,103,255,.16);
}

.user-card-main > small {
  display: block;
  margin-top: 2px;
  color: #67606e;
  font-size: 9px;
  font-weight: 500;
}

.user-role-line {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: #9a929f;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-role-line i {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.user-card-meta {
  text-align: right;
}

.user-card-meta small,
.user-card-meta b {
  display: block;
}

.user-card-meta small {
  color: #57515d;
  font-size: 7px;
  font-weight: 700;
}

.user-card-meta b {
  margin-top: 4px;
  color: #928b99;
  font-size: 9px;
  font-weight: 600;
}

.user-card-open {
  color: #665b73;
  font-size: 13px;
  transition: .2s ease;
}

.user-card:hover .user-card-open {
  color: #b886ff;
  transform: translate(2px,-2px);
}

.users-loading,
.users-empty,
.users-error {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #6b6472;
  font-size: 12px;
}

.users-error b {
  color: #d9d3df;
  font-size: 14px;
}

.users-error span {
  color: #786f80;
}

.users-login-gate {
  height: calc(100% - 112px);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(197,164,255,.12);
  border-radius: 18px;
  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(126,50,255,.10),
      transparent 30%
    ),
    rgba(12,12,17,.72);
  text-align: center;
}

.users-gate-symbol {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(188,148,255,.23);
  border-radius: 19px;
  background: rgba(126,50,255,.08);
  color: #b98cff;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 0 30px rgba(126,50,255,.08);
}

.users-login-gate > span {
  margin-top: 18px;
  color: #766d80;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .10em;
}

.users-login-gate h3 {
  margin: 8px 0 0;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.035em;
}

.users-login-gate p {
  max-width: 430px;
  margin: 8px 0 18px;
  color: #7c7484;
  font-size: 11px;
  line-height: 1.5;
}

/* =========================================================
   PROFILE MODERATION
========================================================= */

.drawer-moderation {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(255,125,151,.13);
  border-radius: 15px;
  background:
    linear-gradient(
      145deg,
      rgba(255,76,111,.035),
      rgba(126,50,255,.025)
    );
}

.moderation-head span,
.moderation-head strong {
  display: block;
}

.moderation-head span {
  color: #876f7b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}

.moderation-head strong {
  margin-top: 4px;
  color: #f4edf2;
  font-size: 15px;
  font-weight: 700;
}

.timeout-control {
  margin-top: 14px;
}

.timeout-control > label {
  display: block;
  margin-bottom: 7px;
  color: #746b78;
  font-size: 8px;
  font-weight: 700;
}

.timeout-control > div {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 7px;
}

.timeout-control select {
  min-width: 0;
  height: 39px;
  padding: 0 9px;
  outline: 0;
  border: 1px solid rgba(197,164,255,.13);
  border-radius: 9px;
  background: #101016;
  color: #bdb5c3;
  font-size: 10px;
}

.moderation-action {
  min-height: 39px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .035em;
  transition: .18s ease;
}

.moderation-action.timeout {
  border: 1px solid rgba(169,103,255,.20);
  background: rgba(126,50,255,.08);
  color: #c8a6ff;
}

.moderation-danger-row {
  margin-top: 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.moderation-action.kick {
  border: 1px solid rgba(255,184,98,.18);
  background: rgba(255,159,54,.055);
  color: #e9b878;
}

.moderation-action.ban {
  border: 1px solid rgba(255,91,123,.18);
  background: rgba(255,65,103,.055);
  color: #f299aa;
}

.moderation-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.13);
}

.moderation-note {
  display: block;
  margin-top: 10px;
  color: #625a66;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.45;
}

.moderation-modal {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.moderation-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.moderation-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,2,5,.73);
  backdrop-filter: blur(7px);
}

.moderation-confirm-card {
  width: min(430px, calc(100vw - 30px));
  padding: 25px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(203,170,255,.17);
  border-radius: 18px;
  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(126,50,255,.10),
      transparent 38%
    ),
    #0d0d13;
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
}

.moderation-confirm-card > span {
  color: #796e83;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}

.moderation-confirm-card h3 {
  margin: 8px 0 0;
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.moderation-confirm-card p {
  margin: 10px 0 0;
  color: #968e9e;
  font-size: 12px;
  line-height: 1.5;
}

.moderation-confirm-actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.moderation-confirm-actions button {
  min-height: 42px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

#cancelModeration {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.025);
  color: #8e8795;
}

#confirmModeration {
  border: 1px solid rgba(184,135,255,.22);
  background:
    linear-gradient(
      135deg,
      #6524d9,
      #914cff
    );
  color: #fff;
}

#confirmModeration:disabled {
  opacity: .55;
  cursor: default;
}

/* Keep staff nav physically absent from menu until JS grants access. */
.staff-nav.hidden {
  display: none !important;
}

/* =========================================================
   RESPONSIVE
========================================================= */

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

@media (max-width: 900px) {
  #view-users {
    padding: 22px 14px 72px;
  }

  .users-page-head {
    height: 95px;
  }

  .users-page-head h2 {
    font-size: 34px;
  }

  .users-page-head p {
    display: none;
  }

  .user-search {
    width: 180px;
  }

  .users-content {
    height: calc(100% - 95px);
    grid-template-rows: 56px minmax(0,1fr);
  }

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

  .users-order-info {
    display: none;
  }

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

  .users-login-gate {
    height: calc(100% - 95px);
  }

  .user-card {
    grid-template-columns: 28px 49px minmax(0,1fr) auto 20px;
  }

  .user-card-avatar {
    width: 49px;
    height: 49px;
    border-radius: 14px;
  }
}

@media (max-width: 560px) {
  .users-page-head {
    height: 110px;
    display: block;
  }

  .users-head-tools {
    margin-top: 12px;
  }

  .user-search {
    width: 100%;
  }

  .users-content {
    height: calc(100% - 110px);
  }

  .users-summary {
    padding: 0 10px;
  }

  .users-summary > div:not(.users-order-info) {
    padding: 0 8px;
  }

  .users-summary span {
    font-size: 6px;
  }

  .users-summary strong {
    font-size: 17px;
  }

  .user-card-meta {
    display: none;
  }

  .user-card {
    grid-template-columns: 25px 45px minmax(0,1fr) 18px;
    padding: 11px;
  }

  .user-card-avatar {
    width: 45px;
    height: 45px;
  }

  .timeout-control > div,
  .moderation-danger-row {
    grid-template-columns: 1fr;
  }
}



/* =========================================================
   RAVENHUB 2.0 — USERS SMOOTH / ROLE SECTIONS V6
========================================================= */

#view-users {
  background:
    radial-gradient(
      circle at 84% -8%,
      rgba(126,50,255,.15),
      transparent 36vw
    ),
    radial-gradient(
      circle at -5% 110%,
      rgba(169,103,255,.07),
      transparent 32vw
    ),
    linear-gradient(
      150deg,
      #08080c,
      #0a0910 52%,
      #08080c
    );
}

.users-page-head {
  height: 104px;
}

.users-page-head h2 {
  font-size: 43px;
}

.users-page-head p {
  color: #8b8392;
  font-size: 12px;
}

.user-search {
  width: 275px;
  background: rgba(12,11,17,.94);
  backdrop-filter: none;
  transition:
    border-color .18s ease,
    background .18s ease;
}

.user-search:focus-within {
  border-color: rgba(169,103,255,.34);
  background: #100d17;
}

.users-content {
  height: calc(100% - 104px);
  grid-template-rows:
    58px
    70px
    minmax(0, 1fr);
  gap: 9px;
}

.users-summary {
  min-height: 58px;
  background:
    linear-gradient(
      90deg,
      rgba(126,50,255,.055),
      rgba(255,255,255,.008)
    );
  border-color: rgba(197,164,255,.10);
}

.users-summary strong {
  font-size: 18px;
}

.role-filter-shell {
  min-width: 0;
  padding: 8px 10px 8px 14px;
  display: grid;
  grid-template-columns: 145px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(197,164,255,.10);
  border-radius: 14px;
  background:
    linear-gradient(
      90deg,
      rgba(15,13,20,.98),
      rgba(10,10,14,.96)
    );
  overflow: hidden;
}

.role-filter-title span,
.role-filter-title small {
  display: block;
}

.role-filter-title span {
  color: #aaa0b5;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
}

.role-filter-title small {
  margin-top: 4px;
  color: #625b69;
  font-size: 8px;
  line-height: 1.2;
}

.role-filter-bar {
  min-width: 0;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.role-filter-bar::-webkit-scrollbar {
  display: none;
}

.role-filter-chip {
  flex: 0 0 auto;
  min-height: 35px;
  max-width: 210px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(198,165,255,.10);
  border-radius: 10px;
  background: rgba(255,255,255,.018);
  color: #817987;
  font-size: 9px;
  font-weight: 600;
  transition:
    border-color .16s ease,
    background .16s ease,
    color .16s ease;
}

.role-filter-chip:hover {
  color: #d7d0de;
  border-color: rgba(178,132,255,.22);
}

.role-filter-chip.active {
  border-color: rgba(177,128,255,.34);
  background:
    linear-gradient(
      135deg,
      rgba(126,50,255,.16),
      rgba(169,103,255,.065)
    );
  color: #f4effa;
}

.role-filter-chip > i {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a967ff;
  box-shadow: 0 0 10px rgba(169,103,255,.24);
}

.role-filter-chip > b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: 600;
}

.role-filter-chip > span {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.045);
  color: #77707f;
  font-size: 8px;
}

.users-grid {
  display: block;
  padding: 1px 4px 28px 0;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  contain: layout style paint;
}

.user-role-section {
  margin-bottom: 13px;
  content-visibility: auto;
  contain-intrinsic-size: 330px;
}

.user-role-section-head {
  height: 47px;
  margin-bottom: 7px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(196,163,255,.09);
  border-radius: 11px;
  background:
    linear-gradient(
      90deg,
      rgba(126,50,255,.065),
      rgba(255,255,255,.008) 35%,
      transparent
    );
  position: sticky;
  top: 0;
  z-index: 4;
}

.user-role-section-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-role-section-head > div > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.user-role-section-head span small,
.user-role-section-head span strong {
  display: block;
}

.user-role-section-head span small {
  color: #645c6c;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .07em;
}

.user-role-section-head span strong {
  margin-top: 2px;
  color: #ddd7e2;
  font-size: 12px;
  font-weight: 700;
}

.user-role-section-head > b {
  color: #6f6778;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .05em;
}

.user-role-members {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0,1fr));
  gap: 7px;
}

.user-card {
  min-height: 91px;
  padding: 11px 12px;
  grid-template-columns:
    29px
    50px
    minmax(0,1fr)
    auto
    19px;
  gap: 10px;
  border-radius: 13px;
  background: #0e0e14;
  border-color: rgba(198,165,255,.085);
  box-shadow: none;
  transform: translateZ(0);
  contain: layout paint style;
  transition:
    transform .15s ease,
    border-color .15s ease,
    background-color .15s ease;
}

.user-card::after {
  display: none;
}

.user-card:hover {
  transform: translateY(-2px);
  border-color: rgba(177,128,255,.25);
  background: #121019;
  box-shadow: none;
}

.user-card-avatar {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #15141a;
}

.user-card-name-row strong {
  font-size: 12px;
}

.user-card-main > small {
  font-size: 8px;
}

.user-role-line {
  margin-top: 6px;
  font-size: 8px;
}

.user-card-meta b {
  font-size: 8px;
}

.user-rank-index {
  font-size: 8px;
}

.users-load-more {
  width: min(420px, 100%);
  min-height: 48px;
  margin: 16px auto 4px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(184,141,255,.15);
  border-radius: 12px;
  background:
    linear-gradient(
      90deg,
      rgba(126,50,255,.065),
      rgba(255,255,255,.012)
    );
  color: #756d7d;
  font-size: 9px;
}

.users-load-more b {
  color: #c3a2f4;
  font-size: 9px;
  font-weight: 700;
}

.users-loading {
  min-height: 200px;
  gap: 12px;
}

.users-loading b {
  color: #827a8a;
  font-size: 11px;
  font-weight: 600;
}

.users-loader-orbit {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(169,103,255,.12);
  border-top-color: #a967ff;
  border-radius: 50%;
  animation: usersLoaderSpin .7s linear infinite;
}

@keyframes usersLoaderSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Reduce expensive visual work while scrolling. */
.users-grid * {
  backdrop-filter: none !important;
}

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

@media (max-width: 900px) {
  .users-page-head {
    height: 92px;
  }

  .users-content {
    height: calc(100% - 92px);
    grid-template-rows:
      54px
      61px
      minmax(0,1fr);
  }

  .role-filter-shell {
    grid-template-columns: 110px minmax(0,1fr);
    padding-left: 10px;
  }

  .role-filter-title small {
    display: none;
  }

  .user-role-members {
    grid-template-columns: 1fr;
  }

  .user-role-section {
    contain-intrinsic-size: 500px;
  }
}

@media (max-width: 560px) {
  .users-page-head {
    height: 108px;
  }

  .users-content {
    height: calc(100% - 108px);
    grid-template-rows:
      51px
      55px
      minmax(0,1fr);
  }

  .role-filter-shell {
    grid-template-columns: 1fr;
    padding: 5px 7px;
  }

  .role-filter-title {
    display: none;
  }

  .role-filter-bar {
    height: 43px;
  }

  .user-card {
    grid-template-columns:
      22px
      44px
      minmax(0,1fr)
      16px;
  }

  .user-card-avatar {
    width: 44px;
    height: 44px;
  }

  .user-card-meta {
    display: none;
  }
}



/* =========================================================
   RAVENHUB 2.0 — LIVE RANKING V7
========================================================= */

#view-ranking {
  padding: 30px 5vw 21px;
  overflow: hidden !important;
  background:
    radial-gradient(
      circle at 12% 15%,
      rgba(126,50,255,.09),
      transparent 28vw
    ),
    radial-gradient(
      circle at 90% 86%,
      rgba(169,103,255,.08),
      transparent 31vw
    ),
    linear-gradient(
      150deg,
      #07070b,
      #0a0910 48%,
      #07070b
    );
}

.ranking-grid-bg {
  position: absolute;
  inset: 0;
  opacity: .10;
  pointer-events: none;
  background-image:
    linear-gradient(
      rgba(255,255,255,.05) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,.05) 1px,
      transparent 1px
    );
  background-size: 74px 74px;
  mask-image:
    radial-gradient(
      ellipse at center,
      #000 25%,
      transparent 78%
    );
}

.ranking-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
  opacity: .8;
}

.ranking-orb-a {
  width: 280px;
  height: 280px;
  left: -150px;
  top: 17%;
  border: 1px solid rgba(169,103,255,.10);
  box-shadow:
    inset 0 0 90px rgba(126,50,255,.05),
    0 0 120px rgba(126,50,255,.04);
}

.ranking-orb-b {
  width: 430px;
  height: 430px;
  right: -290px;
  bottom: -230px;
  border: 1px solid rgba(201,171,255,.07);
  box-shadow:
    inset 0 0 120px rgba(169,103,255,.04);
}

.ranking-page-head {
  height: 103px;
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.ranking-page-head h2 {
  margin: 6px 0 0;
  color: #fbfaff;
  font-family: "Inter", Arial, sans-serif;
  font-size: 43px;
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1;
}

.ranking-page-head h2 em {
  color: #a967ff;
  font-style: normal;
}

.ranking-page-head p {
  max-width: 610px;
  margin: 9px 0 0;
  color: #777080;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

.ranking-live-box {
  min-width: 185px;
  padding: 11px 14px;
  border: 1px solid rgba(183,139,255,.13);
  border-radius: 13px;
  background: rgba(12,11,17,.76);
  text-align: right;
}

.ranking-live-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: #9d8caf;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}

.ranking-live-label i,
.ranking-board-badge.live i,
.ranking-row-live i,
.podium-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #68e29a;
  box-shadow: 0 0 11px rgba(104,226,154,.45);
  animation: rankingLivePulse 1.8s ease-in-out infinite;
}

.ranking-live-box strong {
  display: block;
  margin-top: 5px;
  color: #eee9f4;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.ranking-live-box small {
  display: block;
  margin-top: 2px;
  color: #5d5664;
  font-size: 8px;
}

.ranking-stage {
  height: calc(100% - 131px);
  min-height: 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ranking-board {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 68px minmax(0,1fr);
  border: 1px solid rgba(197,164,255,.11);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(
      145deg,
      rgba(15,14,20,.97),
      rgba(9,9,13,.98)
    );
  box-shadow: 0 22px 55px rgba(0,0,0,.20);
}

.ranking-board-messages {
  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(126,50,255,.10),
      transparent 32%
    ),
    linear-gradient(
      145deg,
      rgba(15,14,20,.97),
      rgba(9,9,13,.98)
    );
}

.ranking-board-voice {
  background:
    radial-gradient(
      circle at 10% 100%,
      rgba(169,103,255,.08),
      transparent 35%
    ),
    linear-gradient(
      145deg,
      rgba(15,14,20,.97),
      rgba(9,9,13,.98)
    );
}

.ranking-board-head {
  padding: 0 17px;
  display: grid;
  grid-template-columns: 41px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

.ranking-board-icon {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(177,131,255,.18);
  border-radius: 11px;
  background: rgba(126,50,255,.075);
  color: #c4a1fb;
  font-size: 17px;
  font-weight: 800;
}

.ranking-board-icon.voice {
  font-size: 10px;
  letter-spacing: .04em;
}

.ranking-board-head > div:nth-child(2) > span {
  display: block;
  color: #655e6c;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .08em;
}

.ranking-board-head h3 {
  margin: 2px 0 0;
  color: #f2eef6;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.ranking-board-badge {
  min-height: 26px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(177,131,255,.13);
  border-radius: 999px;
  background: rgba(126,50,255,.05);
  color: #887b96;
  font-size: 8px;
  font-weight: 700;
}

.ranking-board-badge.live {
  color: #8ebca0;
  border-color: rgba(104,226,154,.12);
  background: rgba(104,226,154,.035);
}

.ranking-board-content {
  min-height: 0;
  padding: 10px;
  display: grid;
  grid-template-rows: 145px minmax(0,1fr);
  gap: 8px;
  overflow: hidden;
}

.ranking-podium {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  align-items: end;
  gap: 7px;
}

.podium-player {
  min-width: 0;
  height: 124px;
  padding: 9px 7px 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  border: 1px solid rgba(197,164,255,.09);
  border-radius: 13px;
  background:
    linear-gradient(
      180deg,
      rgba(126,50,255,.045),
      rgba(255,255,255,.012)
    );
  color: #fff;
  overflow: hidden;
  transition:
    transform .16s ease,
    border-color .16s ease,
    background .16s ease;
}

.podium-player:not(.empty):hover {
  transform: translateY(-2px);
  border-color: rgba(176,126,255,.24);
  background:
    linear-gradient(
      180deg,
      rgba(126,50,255,.085),
      rgba(255,255,255,.015)
    );
}

.podium-1 {
  height: 141px;
  border-color: rgba(190,145,255,.20);
  background:
    radial-gradient(
      circle at 50% 10%,
      rgba(169,103,255,.14),
      transparent 43%
    ),
    linear-gradient(
      180deg,
      rgba(126,50,255,.07),
      rgba(255,255,255,.012)
    );
}

.podium-place {
  position: absolute;
  top: 8px;
  left: 9px;
  color: rgba(211,190,238,.34);
  font-size: 9px;
  font-weight: 700;
}

.podium-avatar-shell {
  position: relative;
  display: block;
}

.ranking-avatar {
  display: grid;
  place-items: center;
  object-fit: cover;
  border-radius: 50%;
  background: #17141d;
}

.podium-avatar {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255,255,255,.09);
}

.podium-1 .podium-avatar {
  width: 54px;
  height: 54px;
  border-color: rgba(191,146,255,.28);
  box-shadow: 0 0 22px rgba(126,50,255,.14);
}

.ranking-avatar-fallback {
  background:
    linear-gradient(
      135deg,
      #5f22cc,
      #a35dff
    );
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.podium-crown {
  position: absolute;
  right: -6px;
  top: -9px;
  color: #d5bbff;
  font-size: 14px;
  font-style: normal;
  transform: rotate(12deg);
  text-shadow: 0 0 12px rgba(169,103,255,.45);
}

.podium-player > strong {
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4f0f7;
  font-size: 10px;
  font-weight: 700;
}

.podium-role {
  max-width: 100%;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6e6675;
  font-size: 7px;
  font-weight: 500;
}

.podium-role i {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.podium-value {
  margin-top: 6px;
  display: block;
  text-align: center;
}

.podium-value strong,
.podium-value small {
  display: block;
}

.podium-value strong {
  color: #c9aaff;
  font-size: 11px;
  font-weight: 700;
}

.podium-value small {
  margin-top: 1px;
  color: #58515f;
  font-size: 6px;
}

.podium-live {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #6eaa84;
  font-size: 6px;
  font-weight: 700;
}

.podium-live i {
  width: 4px;
  height: 4px;
}

.ranking-rest {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(7, minmax(0,1fr));
  gap: 4px;
  overflow: hidden;
}

.ranking-row {
  min-height: 0;
  padding: 0 9px;
  display: grid;
  grid-template-columns: 28px 32px minmax(0,1fr) auto 11px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.045);
  border-radius: 9px;
  background: rgba(255,255,255,.012);
  color: #fff;
  text-align: left;
  transition:
    border-color .14s ease,
    background .14s ease;
}

.ranking-row:hover {
  border-color: rgba(169,103,255,.18);
  background: rgba(126,50,255,.035);
}

.ranking-row-position {
  color: #524b59;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .05em;
}

.ranking-row-avatar {
  width: 28px;
  height: 28px;
  font-size: 9px;
}

.ranking-row-user {
  min-width: 0;
}

.ranking-row-user > strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dcd7e0;
  font-size: 9px;
  font-weight: 600;
}

.ranking-row-user > small {
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #5e5764;
  font-size: 6px;
  font-weight: 500;
}

.ranking-row-user > small i {
  flex: 0 0 auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.ranking-row-value {
  text-align: right;
}

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

.ranking-row-value strong {
  color: #bda0e6;
  font-size: 9px;
  font-weight: 700;
}

.ranking-row-value small {
  margin-top: 1px;
  color: #514b57;
  font-size: 6px;
}

.ranking-row-live {
  display: grid;
  place-items: center;
}

.ranking-row-live i {
  width: 5px;
  height: 5px;
}

.ranking-rest-empty,
.ranking-empty,
.ranking-loading {
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: #625b69;
  font-size: 9px;
}

.ranking-empty {
  grid-row: 1 / -1;
  gap: 5px;
}

.ranking-empty > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(169,103,255,.15);
  border-radius: 12px;
  background: rgba(126,50,255,.055);
  color: #a67adf;
  font-size: 16px;
  font-weight: 800;
}

.ranking-empty b {
  color: #bfb8c7;
  font-size: 11px;
  font-weight: 700;
}

.ranking-empty small {
  max-width: 240px;
  color: #625b69;
  line-height: 1.45;
}

.ranking-loading {
  grid-row: 1 / -1;
  gap: 10px;
}

.ranking-loading > i {
  width: 25px;
  height: 25px;
  border: 2px solid rgba(169,103,255,.10);
  border-top-color: #a967ff;
  border-radius: 50%;
  animation: rankingSpin .7s linear infinite;
}

.ranking-footer-note {
  height: 28px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  color: #4f4856;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .04em;
}

.ranking-footer-note span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ranking-footer-note i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #76599b;
}

@keyframes rankingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rankingLivePulse {
  0%,
  100% {
    opacity: .45;
    transform: scale(.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@media (max-height: 820px) and (min-width: 901px) {
  #view-ranking {
    padding-top: 20px;
    padding-bottom: 14px;
  }

  .ranking-page-head {
    height: 86px;
  }

  .ranking-page-head h2 {
    font-size: 36px;
  }

  .ranking-page-head p {
    margin-top: 5px;
    font-size: 9px;
  }

  .ranking-stage {
    height: calc(100% - 108px);
  }

  .ranking-board {
    grid-template-rows: 58px minmax(0,1fr);
  }

  .ranking-board-content {
    grid-template-rows: 124px minmax(0,1fr);
    padding: 8px;
  }

  .podium-player {
    height: 105px;
  }

  .podium-1 {
    height: 121px;
  }

  .podium-avatar {
    width: 38px;
    height: 38px;
  }

  .podium-1 .podium-avatar {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 900px) {
  #view-ranking {
    padding: 20px 14px 70px;
  }

  .ranking-page-head {
    height: 90px;
  }

  .ranking-page-head h2 {
    font-size: 34px;
  }

  .ranking-page-head p {
    display: none;
  }

  .ranking-live-box {
    min-width: 145px;
  }

  .ranking-stage {
    height: calc(100% - 105px);
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
  }

  .ranking-board {
    grid-template-rows: 48px minmax(0,1fr);
  }

  .ranking-board-content {
    grid-template-columns: 215px minmax(0,1fr);
    grid-template-rows: 1fr;
    padding: 7px;
  }

  .ranking-podium {
    height: 100%;
  }

  .podium-player,
  .podium-1 {
    height: 92%;
  }

  .podium-avatar {
    width: 30px;
    height: 30px;
  }

  .podium-1 .podium-avatar {
    width: 35px;
    height: 35px;
  }

  .ranking-rest {
    height: 100%;
  }

  .ranking-footer-note {
    display: none;
  }
}

@media (max-width: 600px) {
  .ranking-live-box {
    display: none;
  }

  .ranking-page-head {
    height: 73px;
  }

  .ranking-stage {
    height: calc(100% - 73px);
  }

  .ranking-board-content {
    grid-template-columns: 150px minmax(0,1fr);
  }

  .podium-role,
  .podium-value small,
  .ranking-row-user > small,
  .ranking-row-value small {
    display: none;
  }

  .ranking-row {
    grid-template-columns: 20px 26px minmax(0,1fr) auto 8px;
    gap: 5px;
    padding: 0 5px;
  }

  .ranking-row-avatar {
    width: 24px;
    height: 24px;
  }
}




/* =========================================================
   RAVENHUB 2.0 — CUSTOM ADMIN SCROLLBARS V8.2
   Scoped only to LOGI SERWERA
========================================================= */

#view-logs {
  --admin-scroll-track: rgba(255,255,255,.018);
  --admin-scroll-track-hover: rgba(255,255,255,.030);
  --admin-scroll-thumb: rgba(126,50,255,.42);
  --admin-scroll-thumb-2: rgba(169,103,255,.72);
  --admin-scroll-thumb-hover: rgba(190,151,255,.92);
}

/* Firefox */
#view-logs .logs-list,
#view-logs .log-details,
#view-logs .channel-list,
#view-logs .message-list,
#view-logs .log-category-grid {
  scrollbar-width: thin;
  scrollbar-color:
    var(--admin-scroll-thumb)
    var(--admin-scroll-track);
}

/* Chromium / Chrome / Edge / Safari */
#view-logs .logs-list::-webkit-scrollbar,
#view-logs .log-details::-webkit-scrollbar,
#view-logs .channel-list::-webkit-scrollbar,
#view-logs .message-list::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

#view-logs .log-category-grid::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

#view-logs .logs-list::-webkit-scrollbar-track,
#view-logs .log-details::-webkit-scrollbar-track,
#view-logs .channel-list::-webkit-scrollbar-track,
#view-logs .message-list::-webkit-scrollbar-track,
#view-logs .log-category-grid::-webkit-scrollbar-track {
  margin: 7px 0;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.012),
      var(--admin-scroll-track),
      rgba(255,255,255,.012)
    );
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.025);
}

#view-logs .log-category-grid::-webkit-scrollbar-track {
  margin: 0 8px;
}

#view-logs .logs-list::-webkit-scrollbar-thumb,
#view-logs .log-details::-webkit-scrollbar-thumb,
#view-logs .channel-list::-webkit-scrollbar-thumb,
#view-logs .message-list::-webkit-scrollbar-thumb,
#view-logs .log-category-grid::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 2px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      var(--admin-scroll-thumb-2),
      var(--admin-scroll-thumb)
    ) padding-box;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 0 10px rgba(126,50,255,.15);
}

#view-logs .logs-list::-webkit-scrollbar-thumb:hover,
#view-logs .log-details::-webkit-scrollbar-thumb:hover,
#view-logs .channel-list::-webkit-scrollbar-thumb:hover,
#view-logs .message-list::-webkit-scrollbar-thumb:hover,
#view-logs .log-category-grid::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(
      180deg,
      var(--admin-scroll-thumb-hover),
      #7d32ff
    ) padding-box;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 0 14px rgba(126,50,255,.28);
}

#view-logs .logs-list::-webkit-scrollbar-thumb:active,
#view-logs .log-details::-webkit-scrollbar-thumb:active,
#view-logs .channel-list::-webkit-scrollbar-thumb:active,
#view-logs .message-list::-webkit-scrollbar-thumb:active,
#view-logs .log-category-grid::-webkit-scrollbar-thumb:active {
  background:
    linear-gradient(
      180deg,
      #d0afff,
      #914cff
    ) padding-box;
}

#view-logs .logs-list::-webkit-scrollbar-corner,
#view-logs .log-details::-webkit-scrollbar-corner,
#view-logs .channel-list::-webkit-scrollbar-corner,
#view-logs .message-list::-webkit-scrollbar-corner,
#view-logs .log-category-grid::-webkit-scrollbar-corner {
  background: transparent;
}

/* Small fade around scrollable admin areas — integrates the bar into panel */
#view-logs .event-rail,
#view-logs .log-details,
#view-logs .channels-panel,
#view-logs .message-panel {
  position: relative;
}

#view-logs .logs-list,
#view-logs .channel-list,
#view-logs .message-list,
#view-logs .log-details {
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

/* Make scrollbar feel lighter on compact screens. */
@media (max-width: 900px) {
  #view-logs .logs-list::-webkit-scrollbar,
  #view-logs .log-details::-webkit-scrollbar,
  #view-logs .channel-list::-webkit-scrollbar,
  #view-logs .message-list::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
}



/* =========================================================
   RAVENHUB 2.0 — FULL MESSAGE ARCHIVE V8.3
========================================================= */

#view-logs .archive-history-marker {
  min-height: 34px;
  margin: 1px 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(190,151,255,.08);
  border-radius: 10px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(126,50,255,.035),
      transparent
    );
  color: #665e70;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .055em;
  text-align: center;
}

#view-logs .archive-history-marker i {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #765399;
}

#view-logs .archive-history-marker.has-more i {
  background: #a967ff;
  box-shadow:
    0 0 9px rgba(169,103,255,.30);
  animation:
    archiveMarkerPulse 1.8s
    ease-in-out infinite;
}

#view-logs .archive-history-marker.archive-start {
  color: #514a58;
  border-color: rgba(255,255,255,.045);
  background: rgba(255,255,255,.008);
}

#view-logs .archive-history-marker.archive-start i {
  background: #4e4755;
  box-shadow: none;
}

@keyframes archiveMarkerPulse {
  0%,
  100% {
    opacity: .45;
    transform: scale(.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}


/* =========================================================
   RAVENHUB 2.0 — ARCHIVE INITIAL SCROLL FIX V8.3.1
   Message archive uses instant programmatic positioning so
   opening a channel always starts at the newest message.
========================================================= */
#view-logs .message-list {
  scroll-behavior: auto;
}



/* =========================================================
   RAVENHUB 2.0 — ARCHIVE FINAL V8.4
   Error state + bounded bidirectional message window
========================================================= */

#view-logs .archive-error-state {
  min-height: 100%;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #8f8799;
  text-align: left;
}

#view-logs .archive-error-symbol {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(169,103,255,.28);
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      rgba(126,50,255,.13),
      rgba(255,255,255,.015)
    );
  color: #c9a7ff;
  font-family: "Black Ops One", Arial, sans-serif;
  font-size: 22px;
  box-shadow:
    inset 0 0 20px rgba(126,50,255,.04),
    0 0 24px rgba(126,50,255,.08);
}

#view-logs .archive-error-state span {
  display: block;
  color: #a967ff;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .15em;
}

#view-logs .archive-error-state b {
  display: block;
  margin-top: 5px;
  color: #eee8f7;
  font-size: 14px;
}

#view-logs .archive-error-state p {
  max-width: 480px;
  margin: 6px 0 14px;
  color: #716a79;
  font-size: 9px;
  line-height: 1.5;
}

#view-logs .archive-retry-button {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(169,103,255,.28);
  border-radius: 9px;
  background:
    linear-gradient(
      135deg,
      rgba(126,50,255,.18),
      rgba(126,50,255,.07)
    );
  color: #e5d5ff;
  cursor: pointer;
  font-size: 8px;
  letter-spacing: .09em;
  transition:
    transform .14s ease,
    border-color .14s ease,
    background .14s ease;
}

#view-logs .archive-retry-button:hover {
  transform: translateY(-1px);
  border-color: rgba(190,151,255,.58);
  background:
    linear-gradient(
      135deg,
      rgba(126,50,255,.30),
      rgba(126,50,255,.12)
    );
}

#view-logs .archive-newer-marker {
  min-height: 32px;
  margin: 7px 0 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(169,103,255,.08);
  border-radius: 10px;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(126,50,255,.035),
      transparent
    );
  color: #665e70;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .055em;
  text-align: center;
}

#view-logs .archive-newer-marker.hidden {
  display: none;
}

#view-logs .archive-newer-marker i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a967ff;
  box-shadow:
    0 0 9px rgba(169,103,255,.30);
}

@media (max-width: 700px) {
  #view-logs .archive-error-state {
    padding: 18px;
    gap: 12px;
  }

  #view-logs .archive-error-symbol {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
}


/* Manual archive window positioning owns scroll compensation. */
#view-logs .message-list {
  overflow-anchor: none;
}
