:root {
  --bg: #070816;
  --bg-soft: #10152c;
  --panel: rgba(11, 17, 37, 0.82);
  --panel-strong: #0c1430;
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f7f8ff;
  --muted: #9ba6c9;
  --pink: #f91f8f;
  --pink-soft: rgba(249, 31, 143, 0.18);
  --cyan: #58d7ff;
  --lime: #7eff9b;
  --danger: #ff5474;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --gold: #ffc86a;
  --violet: #9d7bff;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(88, 215, 255, 0.16), transparent 22%),
    radial-gradient(circle at top right, rgba(249, 31, 143, 0.14), transparent 26%),
    radial-gradient(circle at bottom center, rgba(126, 255, 155, 0.08), transparent 28%),
    linear-gradient(180deg, #060712 0%, #090c1b 38%, #0a1021 100%);
}

.ambient {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(22px);
  opacity: 0.5;
  z-index: 0;
}

.ambient-a {
  top: 84px;
  right: 12%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(249, 31, 143, 0.48), transparent 70%);
}

.ambient-b {
  bottom: 18%;
  left: 26%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(88, 215, 255, 0.26), transparent 72%);
}

.ambient-c {
  bottom: 60px;
  right: 28%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(126, 255, 155, 0.18), transparent 72%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 92%);
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
}

.sidebar {
  z-index: 2;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 24px 18px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(9, 12, 27, 0.95), rgba(7, 9, 21, 0.88));
  backdrop-filter: blur(20px);
}

.main-shell {
  position: relative;
  z-index: 1;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.panel-cut {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 21, 45, 0.94), rgba(10, 15, 34, 0.9));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.panel-cut::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent),
    linear-gradient(180deg, rgba(249, 31, 143, 0.14), transparent 55%);
}

.panel-cut:hover {
  border-color: rgba(255, 255, 255, 0.13);
}

.sidebar-brand,
.sidebar-section,
.sidebar-foot,
.topbar,
.auth-gate,
.hero-card,
.action-card,
.form-card,
.console-card {
  padding: 20px;
}

.grow {
  min-height: 0;
}

.brand-line {
  width: 72px;
  height: 4px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  font-weight: 700;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 10px;
  font-size: 34px;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.section-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.sidebar-foot {
  padding: 16px 20px;
  align-self: end;
}

.runtime-stack,
.guild-list,
.hero-copy,
.hero-side,
.stack {
  position: relative;
  z-index: 1;
}

.runtime-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(88, 215, 255, 0.6);
}

.pill.warn::before {
  background: #ffbe55;
  box-shadow: 0 0 14px rgba(255, 190, 85, 0.6);
}

.pill.off::before {
  background: var(--danger);
  box-shadow: 0 0 14px rgba(255, 84, 116, 0.6);
}

.guild-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 360px);
  overflow: auto;
  padding-right: 4px;
}

.guild-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.guild-item:hover,
.guild-item.active {
  transform: translateY(-1px);
  border-color: rgba(249, 31, 143, 0.36);
  background: linear-gradient(180deg, rgba(249, 31, 143, 0.14), rgba(255, 255, 255, 0.04));
}

.guild-avatar,
.hero-orb {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(249, 31, 143, 0.34), rgba(15, 21, 45, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.guild-avatar {
  width: 44px;
  height: 44px;
}

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

.guild-fallback,
#guild-icon-fallback {
  font-family: "Oswald", sans-serif;
  color: white;
  letter-spacing: 0.08em;
}

.guild-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.guild-meta {
  color: var(--muted);
  font-size: 12px;
}

.hidden {
  display: none !important;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar-meta {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.top-meta-card {
  min-width: 180px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-meta-card strong {
  display: block;
  margin-top: 6px;
  font-family: "Oswald", sans-serif;
  font-size: 20px;
  letter-spacing: 0.04em;
}

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

.top-meta-label {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.auth-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-gate-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.auth-gate-actions {
  position: relative;
  z-index: 1;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 240px;
  gap: 18px;
  min-height: 260px;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(249, 31, 143, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(88, 215, 255, 0.1), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 24px);
  opacity: 0.75;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -80px -140px auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(249, 31, 143, 0.34), transparent 68%);
  filter: blur(14px);
}

.hero-subtitle {
  max-width: 680px;
  font-size: 16px;
  color: #d5dbf6;
  line-height: 1.6;
  margin-bottom: 18px;
}

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

.meta-chip {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: #edf0ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-side {
  display: grid;
  grid-template-rows: 140px 1fr;
  gap: 14px;
}

.hero-orb {
  width: 140px;
  height: 140px;
  justify-self: end;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 36px rgba(249, 31, 143, 0.22);
}

#guild-icon-fallback {
  font-size: 42px;
}

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

.status-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-card strong {
  display: block;
  font-size: 19px;
  margin-bottom: 4px;
}

.action-card {
  min-height: 260px;
}

.action-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wide {
  grid-column: 1 / -1;
}

.action-status {
  position: relative;
  z-index: 1;
  margin-top: 16px;
}

.metrics-section {
  padding: 20px;
}

.metrics-head {
  margin-bottom: 14px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 21, 45, 0.94), rgba(12, 17, 37, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 100px;
  height: 100px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(249, 31, 143, 0.28), transparent 72%);
}

.metric-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
}

.metric-value {
  display: block;
  margin-top: 12px;
  font-family: "Oswald", sans-serif;
  font-size: 34px;
}

.metric-meta {
  margin-top: 8px;
  color: #e8edff;
  font-size: 13px;
}

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

.lower-grid {
  align-items: start;
}

.form-card,
.console-card {
  min-width: 0;
}

.form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 82px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), transparent);
}

.accent-core::before {
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.accent-logs::before {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.accent-security::before {
  background: linear-gradient(90deg, var(--danger), transparent);
}

.accent-support::before {
  background: linear-gradient(90deg, var(--pink), transparent);
}

.accent-roles::before {
  background: linear-gradient(90deg, var(--violet), transparent);
}

.accent-voice::before {
  background: linear-gradient(90deg, var(--lime), transparent);
}

.accent-profile::before {
  background: linear-gradient(90deg, #7df0ff, transparent);
}

.accent-guild-visuals::before {
  background: linear-gradient(90deg, #ff8ad0, transparent);
}

.accent-antiraid::before {
  background: linear-gradient(90deg, #ff6f8f, transparent);
}

.section-lock {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.section-lock.active {
  color: #ffd4dd;
  border-color: rgba(255, 84, 116, 0.28);
  background: rgba(255, 84, 116, 0.08);
}

.disabled-surface {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.18);
}

.future-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.split-form,
.field-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

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

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

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

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #edf0ff;
  font-size: 13px;
}

label span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(221, 227, 255, 0.46);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(88, 215, 255, 0.46);
  box-shadow: 0 0 0 3px rgba(88, 215, 255, 0.12);
}

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

select option {
  color: #10152c;
}

.toggle {
  align-content: end;
}

.toggle input {
  width: 22px;
  height: 22px;
  accent-color: var(--pink);
}

button {
  position: relative;
  z-index: 1;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

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

button.primary {
  border-color: rgba(249, 31, 143, 0.38);
  background: linear-gradient(135deg, rgba(249, 31, 143, 0.92), rgba(194, 36, 142, 0.94));
}

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

button.danger {
  border-color: rgba(255, 84, 116, 0.32);
  background: linear-gradient(135deg, rgba(255, 84, 116, 0.88), rgba(171, 29, 56, 0.92));
}

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

.json-block {
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: 280px;
  max-height: 520px;
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(4, 8, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dbf7ff;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.console-card .json-block {
  background:
    radial-gradient(circle at top right, rgba(88, 215, 255, 0.09), transparent 26%),
    rgba(4, 8, 20, 0.92);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(249, 31, 143, 0.45);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 1500px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1240px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    min-height: auto;
    grid-template-rows: auto auto auto;
  }

  .guild-list {
    max-height: none;
  }

  .hero-grid,
  .topbar,
  .content-grid,
  .split-form,
  .field-grid.two,
  .field-grid.three {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-meta {
    flex-direction: column;
  }

  .auth-gate {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-orb {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .main-shell,
  .sidebar {
    padding: 16px;
  }

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

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

  .top-meta-card {
    min-width: 0;
  }
}

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