@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,600;0,700;1,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

/* ───────── Tokens (carried over from the B7GT base site) ───────── */
:root {
  --bg-void: #050507;
  --bg-glass: rgba(15, 16, 20, 0.82);
  --bg-raised: rgba(255, 255, 255, 0.04);
  --bg-raised-hover: rgba(255, 255, 255, 0.075);
  --line-soft: rgba(255, 255, 255, 0.09);
  --line-top: rgba(255, 255, 255, 0.22);
  --line-bright: rgba(255, 255, 255, 0.32);
  --white: #ffffff;
  --silver: #d4d8e0;
  --muted: #8c92a0;
  --online: #22c55e;
  --idle: #eab308;
  --dnd: #ef4444;
  --pod-r: 22px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-void);
  color: var(--white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden; overflow-x: clip; /* clip keeps sticky header working */
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 34%, transparent 66%),
    radial-gradient(circle at 50% 50%, #0a0b0e 0%, #040405 100%);
  background-attachment: fixed;
}

a { color: inherit; }
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-soft);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--silver);
}
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.75); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ───────── Ambient field ───────── */
.ambient-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 42%, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.2) 58%, transparent 88%);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 42%, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.2) 58%, transparent 88%);
}
.ambient-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@keyframes slowOrbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes slowOrbitReverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.9; } }
.orbit-ring-1 { transform-origin: 720px 450px; animation: slowOrbit 140s linear infinite; }
.orbit-ring-2 { transform-origin: 720px 450px; animation: slowOrbitReverse 190s linear infinite; }
.orbit-sat-1 { transform-origin: 720px 450px; animation: slowOrbit 70s linear infinite; }
.orbit-sat-2 { transform-origin: 720px 450px; animation: slowOrbitReverse 110s linear infinite; }
.twinkle { animation: twinkle 5s ease-in-out infinite; }

/* ───────── Top bar ───────── */
/* Invisible at the top of the page; once you scroll it lifts into a floating glass bar. */
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding: 0 16px;
  transition: padding-top 0.45s var(--ease);
  pointer-events: none; /* only the bar itself takes clicks, not the empty margin around it */
}
.topbar-inner {
  pointer-events: auto;
  max-width: 1240px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border: 1px solid transparent; border-radius: 0;
  background: transparent;
  transition: max-width 0.45s var(--ease), padding 0.45s var(--ease),
    border-radius 0.45s var(--ease), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.topbar.scrolled { padding-top: 12px; }
.topbar.scrolled .topbar-inner {
  max-width: 1180px; padding: 9px 12px 9px 18px;
  border-radius: 999px;
  background: rgba(14, 15, 19, 0.72);
  border-color: var(--line-soft);
  border-top-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
}
@media (max-width: 640px) {
  .topbar { padding: 0 10px; }
  .topbar.scrolled .topbar-inner { border-radius: 22px; padding: 10px 12px; }
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); }
.brand-logo {
  width: 34px; height: 34px; object-fit: contain; mix-blend-mode: lighten;
  filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.25));
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line-top); background: rgba(255, 255, 255, 0.06);
  display: grid; place-items: center;
  font-family: 'Chakra Petch', sans-serif; font-style: italic; font-weight: 700; font-size: 0.9rem;
}
.brand-title {
  font-family: 'Chakra Petch', sans-serif; font-style: italic; font-weight: 700;
  font-size: 1.1rem; letter-spacing: 0.05em; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 5px;
  border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--line-soft);
  font-size: 0.8rem; font-weight: 600; color: var(--silver);
}
.user-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* Profile menu (dashboard) */
.user-menu { position: relative; }
button.user-chip { cursor: pointer; font-family: inherit; transition: background 0.2s, border-color 0.2s, color 0.2s; }
button.user-chip:hover, .user-menu.open .user-chip { background: var(--bg-raised-hover); border-color: rgba(255, 255, 255, 0.18); color: var(--white); }
button.user-chip:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.user-chip .chev { opacity: 0.6; margin-left: -2px; transition: transform 0.25s var(--ease); }
.user-menu.open .user-chip .chev { transform: rotate(180deg); }
.menu-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; min-width: 230px; padding: 6px;
  border-radius: 16px; background: rgba(16, 17, 21, 0.96);
  border: 1px solid var(--line-soft); border-top-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  animation: menuIn 0.18s var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.menu-who img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.menu-who div { min-width: 0; display: flex; flex-direction: column; }
.menu-label { font-size: 0.72rem; color: var(--muted); }
.menu-who strong { font-size: 0.9rem; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-sep { height: 1px; background: var(--line-soft); margin: 2px 4px 6px; }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--silver); font: 600 0.84rem 'Inter', sans-serif; cursor: pointer; text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--bg-raised-hover); color: var(--white); outline: none; }
.menu-item.danger:hover, .menu-item.danger:focus-visible { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

/* ───────── Buttons ───────── */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.065); border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white); text-decoration: none; font: 600 0.8rem 'Inter', sans-serif;
  cursor: pointer; white-space: nowrap;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.pill-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--line-bright); transform: translateY(-1px); }
.pill-btn:active { transform: translateY(0); }
.pill-btn.primary { background: var(--white); border-color: var(--white); color: var(--bg-void); }
.pill-btn.primary:hover { background: #fff; box-shadow: 0 8px 24px rgba(255, 255, 255, 0.26); }
.pill-btn.danger { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.pill-btn.danger:hover { background: var(--dnd); border-color: var(--dnd); color: var(--white); }
.pill-btn.sm { height: 30px; padding: 0 12px; font-size: 0.74rem; }
.pill-btn.lg { height: 44px; padding: 0 24px; font-size: 0.88rem; }
.pill-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn {
  width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: var(--bg-raised); border: 1px solid var(--line-soft); color: var(--silver);
  transition: all 0.2s var(--ease);
}
.icon-btn:hover { background: var(--bg-raised-hover); color: var(--white); border-color: var(--line-bright); }
.icon-btn.danger:hover { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; }

/* ───────── Layout, cards, type ───────── */
.container { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 32px 20px 72px; }
.glass-card {
  position: relative; background: var(--bg-glass);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line-soft); border-top-color: var(--line-top);
  border-radius: var(--pod-r); padding: 22px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.78);
}
.glass-card + .glass-card { margin-top: 16px; }
.grid-2 > .glass-card + .glass-card, .grid-3 > .glass-card + .glass-card, .editor-grid .glass-card + .glass-card { margin-top: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.card-head h2 { font-size: 1.05rem; font-weight: 700; }
.card-head p { margin-top: 3px; }

.display-heading {
  font-family: 'Chakra Petch', sans-serif; font-style: italic; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.mono-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--silver);
}
.muted { color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.muted.sm { font-size: 0.78rem; }
.horizon-rule { width: 210px; height: 1px; margin: 14px auto; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.42), transparent); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ───────── Form controls ───────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--silver);
}
.label small, .field > label small { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.hint { font-size: 0.76rem; color: var(--muted); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px; padding: 10px 12px; color: var(--white); font-family: inherit; font-size: 0.88rem; outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--line-bright); background: rgba(255, 255, 255, 0.07); }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c92a0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: #0f1014; color: #fff; }
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input[type="color"] { height: 40px; padding: 4px; cursor: pointer; }
.input:disabled { opacity: 0.55; }
.counter { align-self: flex-end; font: 500 0.72rem 'JetBrains Mono', monospace; color: var(--muted); }
.counter.over { color: #fca5a5; }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08); margin-bottom: 14px;
}
.toggle-row strong { font-size: 0.88rem; font-weight: 600; }
.toggle-row .hint { margin-top: 2px; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,0.12); border: 1px solid var(--line-soft); transition: all 0.22s var(--ease); }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--silver); transition: transform 0.22s var(--ease), background 0.22s; }
.switch input:checked + span { background: var(--white); border-color: var(--white); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--bg-void); }
.switch input:focus-visible + span { outline: 2px solid rgba(255,255,255,0.75); outline-offset: 2px; }

/* Role / multi pickers */
.picker { display: flex; flex-direction: column; gap: 8px; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; min-height: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 6px 5px 10px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); color: var(--white);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.chip button { width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(255,255,255,0.1); color: var(--silver); cursor: pointer; font-size: 0.8rem; line-height: 1; display: grid; place-items: center; }
.chip button:hover { background: var(--dnd); color: #fff; }

/* Segmented control */
.segmented { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--line-soft); }
.segmented button {
  border: none; border-radius: 999px; padding: 6px 14px; background: transparent; color: var(--muted);
  font: 600 0.76rem 'Inter', sans-serif; cursor: pointer; transition: all 0.2s ease;
}
.segmented button:hover { color: var(--white); }
.segmented button.active { background: var(--white); color: var(--bg-void); }

/* ───────── Dashboard shell ───────── */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 20px; align-items: start; }
.sidebar { position: sticky; top: 92px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.side-server { display: flex; align-items: center; gap: 11px; padding: 6px 6px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.side-server img, .server-icon {
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-top); object-fit: cover; display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}
.side-server strong { display: block; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 13px; border: 1px solid transparent;
  background: transparent; color: var(--muted); font: 600 0.86rem 'Inter', sans-serif; cursor: pointer; text-align: left; width: 100%;
  transition: all 0.2s var(--ease);
}
.nav-item svg { flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { color: var(--white); background: var(--bg-raised); }
.nav-item.active { color: var(--white); background: rgba(255,255,255,0.09); border-color: var(--line-soft); }
.nav-item.active svg { opacity: 1; }
.nav-sep { height: 1px; background: var(--line-soft); margin: 8px 4px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 1.6rem; line-height: 1.1; }
/* Panel name: the heading itself is the input */
.title-edit label { display: inline-flex; align-items: center; gap: 8px; cursor: text; max-width: 100%; }
.title-input {
  font-size: inherit; line-height: inherit; color: var(--text, #fff); background: transparent;
  border: 1px solid transparent; border-radius: 10px; padding: 2px 8px; margin-left: -9px;
  width: 8ch; max-width: min(560px, 70vw); min-width: 3ch; outline: none; transition: border-color .15s, background .15s;
}
.title-input::placeholder { color: var(--muted); }
.title-edit label:hover .title-input { border-color: rgba(255,255,255,0.14); }
.title-input:focus { border-color: rgba(255,255,255,0.32); background: rgba(255,255,255,0.04); }
.title-pencil { color: var(--muted); flex: none; transition: color .15s; }
.title-edit label:hover .title-pencil, .title-input:focus + .title-pencil { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.page-head p { margin-top: 6px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .side-server { width: 100%; border-bottom: 1px solid var(--line-soft); }
  .nav-item { width: auto; flex: 1 1 auto; justify-content: center; padding: 9px 10px; }
  .nav-item span.lbl { font-size: 0.8rem; }
  .nav-sep { display: none; }
}

/* Server picker */
.server-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border-radius: 18px;
  background: var(--bg-glass); border: 1px solid var(--line-soft); transition: border-color 0.2s ease, transform 0.2s ease;
}
.server-card:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.server-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.server-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── Statistics ───────── */
.stat-tile { padding: 18px 18px 16px; border-radius: 18px; background: var(--bg-glass); border: 1px solid var(--line-soft); border-top-color: var(--line-top); }
.stat-tile .k { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.stat-tile .v { font: 700 2rem/1.15 'Chakra Petch', sans-serif; margin-top: 8px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.stat-tile .v small { font-size: 0.95rem; color: var(--silver); font-weight: 600; margin-left: 2px; }
.stat-tile .sub { margin-top: 4px; font-size: 0.76rem; color: var(--muted); min-height: 1.1em; }
.delta-up { color: var(--online); } .delta-down { color: #fca5a5; }

.chart-wrap { position: relative; }
.chart-legend { display: flex; gap: 16px; font-size: 0.76rem; color: var(--muted); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, -100%); margin-top: -10px;
  padding: 8px 11px; border-radius: 10px; background: rgba(15,16,20,0.96); border: 1px solid var(--line-bright);
  font-size: 0.76rem; line-height: 1.5; white-space: nowrap; box-shadow: 0 10px 28px rgba(0,0,0,0.7); opacity: 0; transition: opacity 0.12s;
}
.chart-tip.show { opacity: 1; }
.chart-tip b { font-weight: 700; }

.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; margin-bottom: 14px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-row .nm { font-size: 0.86rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .ct { font: 600 0.8rem 'JetBrains Mono', monospace; color: var(--silver); }
.bar-track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, rgba(255,255,255,0.55), #fff); transition: width 0.5s var(--ease); }
.person { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.person:last-child { border-bottom: none; padding-bottom: 0; }
.person:first-child { padding-top: 0; }
.person img, .person .ph { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,0.1); flex-shrink: 0; }
.person .nm { flex: 1; font-size: 0.86rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .ct { font: 600 0.8rem 'JetBrains Mono', monospace; color: var(--silver); }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 0.86rem; line-height: 1.6; }
.empty strong { display: block; color: var(--silver); font-size: 0.92rem; margin-bottom: 2px; }

/* ───────── Panels ───────── */
.panel-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,0.035); border: 1px solid var(--line-soft); margin-bottom: 10px;
  transition: border-color 0.2s ease;
}
.panel-row:last-child { margin-bottom: 0; }
.panel-row:hover { border-color: var(--line-bright); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; background: rgba(255,255,255,0.07); border: 1px solid var(--line-soft); color: var(--silver); }
.badge.live { color: #86efac; border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.1); }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--online); box-shadow: 0 0 8px rgba(34,197,94,0.8); }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .editor-grid { grid-template-columns: 1fr; } }
.sticky-col { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1080px) { .sticky-col { position: static; } }

details.acc { border: 1px solid var(--line-soft); border-radius: 16px; background: rgba(255,255,255,0.025); margin-bottom: 10px; overflow: hidden; }
details.acc[open] { background: rgba(255,255,255,0.035); }
details.acc > summary {
  list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 700; font-size: 0.92rem;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .sum-sub { font-weight: 500; font-size: 0.76rem; color: var(--muted); margin-left: 8px; margin-right: auto; }
details.acc > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s var(--ease); margin-right: 4px; flex-shrink: 0; }
details.acc[open] > summary::after { transform: rotate(-135deg); }
details.acc > .acc-body { padding: 4px 16px 6px; }

.sub-box { padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.08); margin-bottom: 12px; }
.sub-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.q-row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) 120px auto; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 680px) { .q-row { grid-template-columns: 1fr 1fr; } }

/* Discord-style previews */
.discord { background: #313338; border-radius: 12px; padding: 14px; color: #dbdee1; font-family: 'Inter', sans-serif; }
.discord .msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.discord .msg-head img, .discord .msg-head .av { width: 34px; height: 34px; border-radius: 50%; background: #1e1f22; object-fit: cover; }
.discord .msg-head b { color: #fff; font-size: 0.9rem; }
.discord .msg-head .app { margin-left: 6px; background: #5865f2; color: #fff; font-size: 0.6rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; vertical-align: 1px; }
.d-embed { background: #2b2d31; border-left: 4px solid #fff; border-radius: 6px; padding: 12px 14px; display: grid; gap: 6px; max-width: 100%; }
.d-embed .author { font-size: 0.78rem; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 8px; }
.d-embed .author img { width: 20px; height: 20px; border-radius: 50%; }
.d-embed .title { color: #fff; font-weight: 700; font-size: 0.98rem; }
.d-embed .desc { font-size: 0.85rem; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.d-embed .thumb { float: right; width: 64px; height: 64px; border-radius: 6px; object-fit: cover; margin-left: 10px; }
.d-embed .image { width: 100%; max-height: 190px; border-radius: 6px; object-fit: cover; margin-top: 4px; }
.d-embed .foot { font-size: 0.7rem; color: #949ba4; margin-top: 4px; }
.d-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.d-btn { padding: 6px 14px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; color: #fff; background: #5865f2; }
.d-btn.Secondary { background: #4e5058; } .d-btn.Success { background: #248046; } .d-btn.Danger { background: #da373c; }

/* Bot profile */
.asset-card { padding: 18px; border-radius: 18px; background: rgba(255,255,255,0.03); border: 1px solid var(--line-soft); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.asset-card .asset-title { align-self: flex-start; font-weight: 700; font-size: 0.9rem; }
.asset-card .asset-title small { color: var(--muted); font-weight: 500; margin-left: 6px; font-size: 0.74rem; }
.asset-avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-top); background: #14151a; }
.asset-banner { width: 100%; max-width: 340px; aspect-ratio: 680 / 240; border-radius: 12px; border: 1px solid var(--line-soft); background: linear-gradient(135deg, #15161b, #0c0d10) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 0.78rem; }
.asset-actions { display: flex; gap: 8px; width: 100%; }
.asset-actions .pill-btn { flex: 1; }
.profile-card { border-radius: 16px; overflow: hidden; background: #111214; border: 1px solid var(--line-soft); }
.profile-card .pc-banner { height: 96px; background: linear-gradient(135deg, #1c1d23, #0d0e11) center/cover no-repeat; }
.profile-card .pc-body { padding: 0 16px 16px; position: relative; }
.profile-card .pc-avatar { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #111214; background: #1e1f22; object-fit: cover; margin-top: -38px; }
.profile-card .pc-name { font-weight: 700; font-size: 1.05rem; margin-top: 8px; }
.profile-card .pc-name .app { margin-left: 6px; background: #5865f2; color: #fff; font-size: 0.62rem; padding: 1px 5px; border-radius: 4px; vertical-align: 2px; }
.profile-card .pc-bio { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.82rem; color: #c4c9d2; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }

/* Toast */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: min(380px, calc(100vw - 40px));
  background: rgba(15,16,20,0.96); border: 1px solid var(--line-bright); color: var(--white);
  padding: 12px 18px; border-radius: 14px; font-size: 0.84rem; line-height: 1.45;
  box-shadow: 0 12px 32px rgba(0,0,0,0.75); opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(239,68,68,0.6); }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ───────── Landing & docs ───────── */
.hero { max-width: 760px; margin: 26px auto 44px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.emblem-glow { position: relative; display: flex; align-items: center; justify-content: center; padding: 4px; }
.emblem-glow::before { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 70%); z-index: -1; }
.hero-logo { width: 120px; height: 120px; object-fit: contain; mix-blend-mode: lighten; filter: drop-shadow(0 6px 24px rgba(255,255,255,0.24)); user-select: none; }
.hero-mark { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; border: 1px solid var(--line-top); background: rgba(255,255,255,0.05); font: italic 700 2.2rem 'Chakra Petch', sans-serif; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid var(--line-soft); font: 500 0.72rem 'JetBrains Mono', monospace; color: var(--silver); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--online); box-shadow: 0 0 10px rgba(34,197,94,0.8); }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); line-height: 1.04; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.lifecycle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: center; }
@media (max-width: 860px) { .lifecycle { grid-template-columns: 1fr; } }
.steps { list-style: none; counter-reset: s; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 14px; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 0.85rem 'JetBrains Mono', monospace; border: 1px solid var(--line-top); background: rgba(255,255,255,0.06); }
.steps h3 { font-size: 0.98rem; margin-bottom: 3px; }
.feature h3 { font: 700 1.05rem 'Chakra Petch', sans-serif; margin: 8px 0 6px; }
.section-title { font-size: 1.35rem; margin-bottom: 18px; }

.docs-wrap { max-width: 880px; margin: 0 auto; }
.cmd-list { display: grid; gap: 0; margin-top: 12px; }
.cmd-row { display: grid; grid-template-columns: 210px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.cmd-row:first-child { border-top: none; }
.cmd-name { font: 700 0.84rem 'JetBrains Mono', monospace; color: var(--white); }
.cmd-row .muted { font-size: 0.86rem; }
@media (max-width: 640px) { .cmd-row { grid-template-columns: 1fr; gap: 4px; } }
.doc-steps { padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.doc-steps strong { color: var(--silver); }
.callout { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--line-soft); font-size: 0.86rem; color: var(--silver); line-height: 1.55; }

.login-card { max-width: 440px; margin: 56px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }

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

/* Preview tabs (panel / welcome message) */
.prev-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.prev-head .mono-tag { margin: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); }
.seg-btn { appearance: none; border: 0; background: transparent; color: inherit; opacity: 0.65; font: 600 0.74rem 'Inter', sans-serif; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.seg-btn:hover { opacity: 1; }
.seg-btn.active { background: #fff; color: #0b0b0d; opacity: 1; }
.d-ping { font-size: 0.85rem; margin-bottom: 6px; }
.d-ping .mention { background: rgba(88,101,242,0.3); color: #c9cdfb; border-radius: 3px; padding: 0 3px; font-weight: 500; }
.d-embed .field-name { color: #fff; font-weight: 700; font-size: 0.8rem; margin-top: 4px; }
.d-embed .field-val { font-size: 0.82rem; }

/* Legal pages (privacy, terms) */
.legal h2 { font-size: 1.05rem; color: var(--white); margin-bottom: 10px; }
.legal h3 { font-size: 0.9rem; color: var(--white); margin: 14px 0 6px; }
.legal p, .legal li { color: var(--silver); font-size: 0.9rem; line-height: 1.65; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal ul + p { margin-top: 12px; }
.legal a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35); }
.legal a:hover { text-decoration-color: var(--white); }
.legal strong { color: var(--white); }

/* Footer */
.site-footer {
  max-width: 1240px; margin: 40px auto 0; padding: 22px 20px 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 0.8rem;
  position: relative; z-index: 1;
}
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--white); }

.partners { margin-top: 28px; }
.partner-card { display: flex; align-items: center; gap: 20px; color: inherit; text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.partner-card:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.partner-card:hover .partner-cta { background: var(--white); border-color: var(--white); color: var(--bg-void); }
.partner-mark { flex: none; width: 56px; height: 56px; border-radius: 16px; object-fit: cover; background: rgba(255,255,255,0.06); border: 1px solid var(--line-soft); }
.partner-body { flex: 1; min-width: 0; }
.partner-body h3 { font: 700 1.05rem 'Chakra Petch', sans-serif; margin: 6px 0 4px; }
.partner-body p { margin: 0; }
.partner-cta { flex: none; }
@media (max-width: 640px) { .partner-card { flex-direction: column; align-items: flex-start; } }

/* ───────── Homepage demo: tablet with a pretend Discord server ───────── */
.demo-layout { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 28px; align-items: center; }
@media (max-width: 900px) { .demo-layout { grid-template-columns: 1fr; } }
.demo-lead { font-size: 0.9rem; margin: -8px 0 18px; line-height: 1.55; }
.demo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.demo-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.demo-swatch { width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 2px solid transparent; outline: 1px solid var(--line-soft); cursor: pointer; transition: transform .15s; }
.demo-swatch:hover { transform: scale(1.1); }
.demo-swatch[aria-checked="true"] { border-color: var(--bg-void); outline: 2px solid var(--white); }

.tablet { position: relative; padding: 16px; border-radius: 30px; background: linear-gradient(145deg, #23252b, #0c0d10); border: 1px solid var(--line-top); box-shadow: 0 30px 70px rgba(0,0,0,0.6), inset 0 0 0 2px rgba(255,255,255,0.03); }
.tablet::before { content: ""; position: absolute; top: 50%; left: 6px; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #2c2f36; box-shadow: 0 0 0 1px rgba(255,255,255,0.06); }
.tablet-screen { display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 430px; border-radius: 14px; overflow: hidden; background: #313338; color: #dbdee1; font-family: 'Inter', sans-serif; }
.tab-side { background: #2b2d31; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; }
.tab-server { color: #fff; font-weight: 700; padding: 0 8px 10px; margin: 0 -8px 8px; border-bottom: 1px solid #1f2023; }
.tab-cat { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #949ba4; padding: 4px 8px; }
.tab-chan { display: block; width: 100%; text-align: left; background: none; border: 0; color: #949ba4; font: inherit; padding: 5px 8px; border-radius: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-chan:hover { background: #35373c; color: #dbdee1; }
.tab-chan.active { background: #404249; color: #fff; }
.tab-chan.new { animation: chanIn .45s var(--ease); }
@keyframes chanIn { from { opacity: 0; transform: translateX(-8px); } }
.tab-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tab-head { height: 42px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid #1f2023; color: #fff; font-weight: 600; font-size: 0.88rem; }
.tab-head .hash { color: #80848e; font-size: 1.1rem; }
.tab-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.tab-feed .discord { padding: 0; background: none; animation: msgIn .35s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.tab-feed .d-embed { font-size: 0.9em; }
.tab-feed .d-btn { border: 0; font-family: inherit; cursor: pointer; transition: filter .15s; }
.tab-feed .d-btn:hover:not(:disabled) { filter: brightness(1.15); }
.tab-feed .d-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tab-feed .d-embed .fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
.tab-feed .d-embed .fields .wide { grid-column: 1 / -1; }
.tab-feed .d-text { font-size: 0.85rem; line-height: 1.45; }
.tab-feed .av.user { background: #5865f2; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.8rem; }
.tab-feed .av.staff { background: #eab308; display: grid; place-items: center; color: #111; font-weight: 700; font-size: 0.8rem; }
.tab-feed .av.bot { display: grid; place-items: center; font: italic 700 0.8rem 'Chakra Petch', sans-serif; color: #fff; }
.tab-feed .ephemeral { font-size: 0.72rem; color: #949ba4; margin-top: 4px; }
@media (max-width: 560px) { .tablet { padding: 10px; border-radius: 22px; } .tablet-screen { grid-template-columns: 1fr; height: 470px; } .tab-side { display: none; } }
.tab-typing { font-size: 0.75rem; color: #949ba4; font-style: italic; }

/* ───────── Homepage: rotating strip of servers the bot is in ───────── */
.servers { width: min(1200px, calc(100vw - 32px)); margin-top: 34px; display: grid; gap: 16px; }
.servers-lead { font-size: 0.9rem; text-align: center; }
.servers-lead b { color: var(--white); font-weight: 700; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-dur, 60s) linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.server-chip { display: flex; align-items: center; gap: 12px; padding: 0 22px; flex: none; text-align: left; }
.server-icon { width: 52px; height: 52px; border-radius: 50%; flex: none; object-fit: cover; background: rgba(255,255,255,0.06); border: 1px solid var(--line-soft); display: grid; place-items: center; font-weight: 600; color: var(--silver); font-size: 1rem; }
.server-name { font: 700 1rem 'Inter', sans-serif; color: var(--white); max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-members { font-size: 0.84rem; color: var(--muted); margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } .marquee { overflow-x: auto; } }
