/* ═══════════════════════════════════════════════════════════════════════════
   KrümelBot — Server-Dashboard UI v2 (dashboard/server/*)
   Scoped to .guild-layout.gdb-ui — does not affect home/account views
   ═══════════════════════════════════════════════════════════════════════════ */

.guild-layout.gdb-ui {
  --gdb-rail-w: 292px;
  --gdb-bg: #060a12;
  --gdb-surface: rgba(10, 16, 28, 0.92);
  --gdb-surface-2: rgba(14, 22, 38, 0.88);
  --gdb-border: rgba(255, 255, 255, 0.08);
  --gdb-border-strong: rgba(255, 255, 255, 0.14);
  --gdb-accent: #3b82f6;
  --gdb-accent-soft: rgba(59, 130, 246, 0.18);
  --gdb-text: rgba(255, 255, 255, 0.92);
  --gdb-muted: rgba(255, 255, 255, 0.48);
  --gdb-ok: #34d399;
  background: var(--gdb-bg);
}

/* Hide legacy compact header — topbar replaces it */
.guild-layout.gdb-ui .guild-head--compact {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Sidebar v2 (gsb-*)
   ═══════════════════════════════════════════════════════════════════════════ */

.guild-layout.gdb-ui .guild-rail.gsb {
  width: var(--gdb-rail-w);
  min-width: var(--gdb-rail-w);
  padding: 0;
  border-right: 1px solid var(--gdb-border);
  background: #080c14;
}

.guild-layout.gdb-ui .gsb-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Header: back + brand */
.guild-layout.gdb-ui .gsb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--gdb-border);
}

.guild-layout.gdb-ui .gsb-back {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--gdb-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--gdb-muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.guild-layout.gdb-ui .gsb-back:hover {
  color: #fff;
  border-color: var(--gdb-border-strong);
  background: rgba(255, 255, 255, 0.07);
}

.guild-layout.gdb-ui .gsb-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
  padding: 4px 6px 4px 2px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.guild-layout.gdb-ui .gsb-brand:hover {
  background: rgba(255, 255, 255, 0.04);
}

.guild-layout.gdb-ui .gsb-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1e40af);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.guild-layout.gdb-ui .gsb-logo-text {
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gdb-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Server switcher */
.guild-layout.gdb-ui .gsb-server-card {
  position: relative;
  flex-shrink: 0;
  margin: 10px 10px 8px;
  padding: 0;
  border: none;
}

.guild-layout.gdb-ui .gsb-server-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px 8px 8px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.guild-layout.gdb-ui .gsb-server-btn:hover {
  border-color: rgba(59, 130, 246, 0.38);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.guild-layout.gdb-ui .gsb-server-card.is-open .gsb-server-btn {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.14);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
}

.guild-layout.gdb-ui .gsb-server-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.guild-layout.gdb-ui .gsb-server-icon img,
.guild-layout.gdb-ui .gsb-server-icon .gdb-topbar-ico,
.guild-layout.gdb-ui .gsb-server-icon .server-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 9px;
}

.guild-layout.gdb-ui .gsb-server-icon .ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #93c5fd;
}

.guild-layout.gdb-ui .gsb-server-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.guild-layout.gdb-ui .gsb-server-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.guild-layout.gdb-ui .gsb-server-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  flex-shrink: 0;
}

.guild-layout.gdb-ui .gsb-server-switch {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #60a5fa;
  flex-shrink: 0;
  opacity: 0.9;
}

.guild-layout.gdb-ui .gsb-server-btn:hover .gsb-server-switch {
  color: #93c5fd;
}

.guild-layout.gdb-ui .gsb-server-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.guild-layout.gdb-ui .gsb-server-chevron-wrap {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s, border-color 0.15s;
}

.guild-layout.gdb-ui .gsb-server-btn:hover .gsb-server-chevron-wrap {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

.guild-layout.gdb-ui .gsb-server-chevron {
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.2s ease;
}

.guild-layout.gdb-ui .gsb-server-card.is-open .gsb-server-chevron {
  transform: rotate(180deg);
}

.guild-layout.gdb-ui .gsb-server-card.is-open .gsb-server-chevron-wrap {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.35);
}

.guild-layout.gdb-ui .guild-rail-picker-sep,
.guild-layout.gdb-ui .guild-rail-picker-bot {
  display: none !important;
}

/* Server dropdown */
.guild-layout.gdb-ui .gsb-server-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  border: 1px solid var(--gdb-border-strong);
  background: rgba(10, 10, 18, 0.98);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  max-height: min(340px, 55vh);
  overflow-y: auto;
}

.guild-layout.gdb-ui .guild-rail-picker-item,
.guild-layout.gdb-ui .guild-rail-picker-all {
  border-radius: 10px;
  padding: 9px 10px;
}

.guild-layout.gdb-ui .guild-rail-picker-item.is-picked {
  background: var(--gdb-accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Nav search */
.guild-layout.gdb-ui .gsb-search {
  position: relative;
  flex-shrink: 0;
  margin: 0 12px 10px;
}

.guild-layout.gdb-ui .gsb-search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gdb-muted);
  pointer-events: none;
}

.guild-layout.gdb-ui .gsb-search-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border-radius: 10px;
  border: 1px solid var(--gdb-border);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.guild-layout.gdb-ui .gsb-search-input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.guild-layout.gdb-ui .gsb-search-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Scrollable nav */
.guild-layout.gdb-ui .gsb-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.35) transparent;
}

.guild-layout.gdb-ui .gsb-nav-scroll::-webkit-scrollbar {
  width: 5px;
}

.guild-layout.gdb-ui .gsb-nav-scroll::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(59, 130, 246, 0.35);
}

.guild-layout.gdb-ui .gsb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group:first-of-type {
  margin-top: 0;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 8px 8px;
  padding: 0 4px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gdb-border);
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group.gsb-nav-group-hidden {
  display: none;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn.gsb-nav-hidden {
  display: none !important;
}

/* Nav items */
.guild-layout.gdb-ui .gsb-nav .guild-nav-btn {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn > svg:first-of-type {
  grid-column: 1;
  width: 16px;
  height: 16px;
  padding: 8px;
  box-sizing: content-box;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 1;
  color: rgba(255, 255, 255, 0.7);
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn--overview {
  margin-bottom: 4px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn--overview > svg:first-of-type {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn:hover:not(:disabled):not(.guild-nav-btn--soon) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.28), rgba(59, 130, 246, 0.08));
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: none;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn.is-active > svg:first-of-type {
  background: rgba(59, 130, 246, 0.45);
  border-color: rgba(96, 165, 250, 0.4);
  color: #fff;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn--indent {
  grid-template-columns: 20px 1fr auto;
  margin-left: 14px;
  width: calc(100% - 14px);
  padding-left: 8px;
  font-size: 0.8rem;
  border-left: 2px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 10px 10px 0;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn--indent::before {
  display: none;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn--indent.is-active {
  border-left-color: var(--gdb-accent);
  background: rgba(59, 130, 246, 0.12);
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn--indent.is-active::after {
  display: none;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn--indent > svg:first-of-type {
  display: none;
}

/* Fold sections */
.guild-layout.gdb-ui .gsb-nav .guild-nav-fold {
  gap: 2px;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn--section {
  font-weight: 700;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-chevron--fold {
  grid-column: 3;
  margin-left: 0;
  opacity: 0.45;
  transition: transform 0.2s ease;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-btn--section[aria-expanded="true"] .guild-nav-chevron--fold {
  transform: rotate(90deg);
  opacity: 0.8;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 4px 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(59, 130, 246, 0.2);
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group-sub.hidden {
  display: none !important;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group .guild-nav-btn--module.guild-nav-btn--sub::before {
  display: none;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-premium-pill {
  grid-column: 3;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.56rem;
  font-weight: 800;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-soon-badge {
  grid-column: 3;
  font-size: 0.55rem;
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group--soon {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.guild-layout.gdb-ui .gsb-nav .guild-nav-group--soon .guild-nav-group-label::after {
  display: none;
}

/* Premium footer */
.guild-layout.gdb-ui .gsb-footer {
  flex-shrink: 0;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--gdb-border);
  background: linear-gradient(0deg, rgba(8, 8, 15, 0.98), transparent);
}

.guild-layout.gdb-ui .gsb-premium {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: linear-gradient(155deg, rgba(30, 58, 138, 0.35), rgba(8, 12, 20, 0.95));
}

.guild-layout.gdb-ui .gsb-premium.hidden {
  display: none !important;
}

.guild-layout.gdb-ui .gsb-premium-glow {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 70px;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(96, 165, 250, 0.25), transparent 70%);
  pointer-events: none;
}

.guild-layout.gdb-ui .gsb-premium-body {
  position: relative;
  padding: 14px 14px 12px;
}

.guild-layout.gdb-ui .gsb-premium-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.guild-layout.gdb-ui .gsb-premium-badge {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}

.guild-layout.gdb-ui .gsb-premium-star {
  color: #fbbf24;
  opacity: 0.9;
}

.guild-layout.gdb-ui .gsb-premium-desc {
  margin: 0 0 12px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.guild-layout.gdb-ui .gsb-premium-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(216, 180, 254, 0.4);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
  transition: transform 0.12s, box-shadow 0.15s;
}

.guild-layout.gdb-ui .gsb-premium-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.35);
}

.guild-layout.gdb-ui .guild-rail-premium-kicker,
.guild-layout.gdb-ui .guild-rail-premium-crown {
  display: none;
}

/* ── Main work area ── */
.guild-layout.gdb-ui .guild-work {
  padding: 0;
  background:
    radial-gradient(ellipse 80% 50% at 80% -10%, rgba(59, 130, 246, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(59, 130, 246, 0.06), transparent 50%),
    var(--gdb-bg);
}

/* ── Topbar ── */
.guild-layout.gdb-ui .gdb-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gdb-border);
  background: rgba(8, 8, 14, 0.85);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.guild-layout.gdb-ui .gdb-topbar-server {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.guild-layout.gdb-ui .gdb-topbar-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gdb-border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.guild-layout.gdb-ui .gdb-topbar-icon img,
.guild-layout.gdb-ui .gdb-topbar-icon .gdb-topbar-ico,
.guild-layout.gdb-ui .gdb-topbar-icon .server-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 11px;
}

.guild-layout.gdb-ui .gdb-topbar-icon .ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  color: #93c5fd;
}

.guild-layout.gdb-ui .gdb-topbar-titles {
  min-width: 0;
}

.guild-layout.gdb-ui .gdb-topbar-name,
.guild-layout.gdb-ui .guild-head-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-layout.gdb-ui .gdb-topbar-crumb {
  margin: 3px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gdb-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-layout.gdb-ui .gdb-topbar-crumb strong {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.guild-layout.gdb-ui .gdb-topbar-crumb .gdb-crumb-id {
  font-variant-numeric: tabular-nums;
  opacity: 0.65;
}

.guild-layout.gdb-ui .gdb-status-pill,
.guild-layout.gdb-ui .guild-head-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gdb-ok);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.1);
}

.guild-layout.gdb-ui .gdb-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--gdb-border-strong);
  background: var(--gdb-surface);
  color: #fff;
  cursor: pointer;
  place-items: center;
  flex-shrink: 0;
}

/* ── Content body ── */
.guild-layout.gdb-ui .guild-body {
  padding: 16px 18px 24px;
}

/* Module page visuals → guild-modules.css */
.guild-layout.gdb-ui .guild-page:not(.hidden) {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 2px 32px;
}

/* Use new menu button on mobile instead of floating FAB */
.guild-layout.gdb-ui .guild-rail-toggle {
  display: none !important;
}

/* Invite-only mode */
.guild-layout.gdb-ui.guild-layout--invite-only .gsb-nav-scroll,
.guild-layout.gdb-ui.guild-layout--invite-only .gsb-search {
  display: none;
}

.guild-layout.gdb-ui.guild-layout--invite-only .gdb-menu-btn {
  display: none;
}

/* Light theme */
body.is-light .guild-layout.gdb-ui {
  --gdb-bg: #f4f2fa;
  --gdb-surface: rgba(255, 255, 255, 0.95);
  --gdb-surface-2: #fff;
  --gdb-border: rgba(26, 16, 51, 0.1);
  --gdb-border-strong: rgba(26, 16, 51, 0.14);
  --gdb-text: #1a1033;
  --gdb-muted: rgba(26, 16, 51, 0.52);
}

body.is-light .guild-layout.gdb-ui .guild-rail {
  background: linear-gradient(180deg, #fff 0%, #f0edf8 100%);
}

body.is-light .guild-layout.gdb-ui .gdb-topbar {
  background: rgba(255, 255, 255, 0.9);
}

body.is-light .guild-layout.gdb-ui .gdb-topbar-name,
body.is-light .guild-layout.gdb-ui .guild-head-name {
  color: #1a1033;
}

body.is-light .guild-layout.gdb-ui .gsb-nav .guild-nav-btn.is-active {
  color: #1e3a8a;
  background: rgba(109, 40, 217, 0.12);
}

body.is-light .guild-layout.gdb-ui .gsb-back,
body.is-light .guild-layout.gdb-ui .gsb-search-input {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(26, 16, 51, 0.1);
}

body.is-light .guild-layout.gdb-ui .gsb-logo-text,
body.is-light .guild-layout.gdb-ui .gsb-server-name {
  color: #1a1033;
}

body.is-light .guild-layout.gdb-ui .gsb-server-btn {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(109, 40, 217, 0.18);
}

body.is-light .guild-layout.gdb-ui .gsb-server-label {
  color: rgba(26, 16, 51, 0.45);
}

body.is-light .guild-layout.gdb-ui .gsb-server-switch {
  color: #1d4ed8;
}

body.is-light .guild-layout.gdb-ui .gsb-search-input {
  color: #1a1033;
}

body.is-light .guild-layout.gdb-ui .gsb-nav .guild-nav-btn {
  color: rgba(26, 16, 51, 0.55);
}

body.is-light .guild-layout.gdb-ui .gsb-nav .guild-nav-btn > svg:first-of-type {
  background: rgba(109, 40, 217, 0.08);
  border-color: rgba(109, 40, 217, 0.12);
  color: #1d4ed8;
}

body.is-light .guild-layout.gdb-ui .gsb-footer {
  background: linear-gradient(0deg, rgba(244, 242, 250, 0.98), transparent);
}

/* Mobile */
@media (max-width: 900px) {
  .guild-layout.gdb-ui .gdb-menu-btn {
    display: grid;
  }

  .guild-layout.gdb-ui .gdb-status-pill {
    display: none;
  }

  .guild-layout.gdb-ui .guild-body {
    padding: 12px 12px 88px;
  }

  .guild-layout.gdb-ui .guild-page:not(.hidden) {
    padding: 18px 16px 24px;
    border-radius: 14px;
  }

  .guild-layout.gdb-ui .guild-rail {
    top: 56px;
    width: min(300px, 90vw);
    background: #0a0a12;
  }

  body.is-light .guild-layout.gdb-ui .guild-rail {
    background: #fff;
  }

  .guild-layout.gdb-ui .gsb-header {
    padding: 12px 12px 10px;
  }

  .guild-layout.gdb-ui .gsb-server-card {
    margin: 0 10px 8px;
  }
}

@media (max-width: 520px) {
  .guild-layout.gdb-ui .gdb-topbar {
    padding: 10px 12px;
    gap: 10px;
  }

  .guild-layout.gdb-ui .gdb-topbar-name {
    font-size: 1rem;
  }

  .guild-layout.gdb-ui .gdb-topbar-icon {
    width: 38px;
    height: 38px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Sidebar module hover tooltips (gsb-tip)
   ═══════════════════════════════════════════════════════════════════════════ */

.gsb-tip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  max-width: min(232px, calc(100vw - 28px));
  opacity: 0;
  transform: translateX(-10px) scale(0.96);
  filter: blur(2px);
  transition:
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.22s ease;
}

.gsb-tip:not(.hidden) {
  display: block;
}

.gsb-tip.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
}

.gsb-tip.is-hiding {
  opacity: 0;
  transform: translateX(-6px) scale(0.98);
  filter: blur(1px);
  transition-duration: 0.14s;
}

.gsb-tip.is-flipped.is-visible {
  transform: translateX(0) scale(1);
}

.gsb-tip-shell {
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 11, 20, 0.97);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.gsb-tip.is-premium .gsb-tip-shell {
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow:
    0 0 0 1px rgba(109, 40, 217, 0.25),
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(59, 130, 246, 0.22);
}

.gsb-tip-glow {
  display: none;
}

.gsb-tip.is-premium .gsb-tip-glow {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25), rgba(59, 130, 246, 0.2) 40%, transparent 72%);
}

.gsb-tip-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border-radius: 16px 0 0 16px;
}

.gsb-tip.is-premium .gsb-tip-accent {
  background: linear-gradient(180deg, #fbbf24, #3b82f6);
}

.gsb-tip-content {
  position: relative;
  padding: 10px 12px 9px 14px;
}

.gsb-tip-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 5px;
}

.gsb-tip-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #bfdbfe;
}

.gsb-tip.is-premium .gsb-tip-icon {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fde68a;
}

.gsb-tip-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}

.gsb-tip-meta {
  min-width: 0;
  flex: 1;
}

.gsb-tip-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gsb-tip-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.25;
}

.gsb-tip-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ede9fe;
  background: rgba(59, 130, 246, 0.35);
  border: 1px solid rgba(96, 165, 250, 0.45);
}

.gsb-tip-tag.hidden {
  display: none !important;
}

.gsb-tip-desc {
  margin: 0 0 6px;
  font-size: 0.7rem;
  line-height: 1.42;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.52);
}

.gsb-tip-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(96, 165, 250, 0.8);
}

.gsb-tip-hint svg {
  opacity: 0.85;
}

.gsb-tip-arrow {
  position: absolute;
  left: -7px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  transform: rotate(45deg);
  background: rgba(12, 11, 20, 0.97);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: top 0.15s ease;
  box-shadow: -3px 3px 8px rgba(0, 0, 0, 0.2);
}

.gsb-tip.is-flipped .gsb-tip-arrow {
  left: auto;
  right: -7px;
  border-left: none;
  border-bottom: none;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 3px -3px 8px rgba(0, 0, 0, 0.2);
}

body.is-light .gsb-tip-shell {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(109, 40, 217, 0.15);
  box-shadow: 0 16px 40px rgba(109, 40, 217, 0.14);
}

body.is-light .gsb-tip-title {
  color: #1a1033;
}

body.is-light .gsb-tip-desc {
  color: rgba(26, 16, 51, 0.58);
}

body.is-light .gsb-tip-icon {
  background: rgba(109, 40, 217, 0.1);
  border-color: rgba(109, 40, 217, 0.2);
  color: #1d4ed8;
}

body.is-light .gsb-tip-arrow {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(109, 40, 217, 0.15);
}

body.is-light .gsb-tip-hint {
  color: #1d4ed8;
}

@media (max-width: 900px), (hover: none) {
  .gsb-tip {
    display: none !important;
  }
}

/* CustomBot (Krümel+) */
.cb-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cb-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.25rem 1.35rem !important;
}

.cb-hero-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.cb-hero-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.35), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}

.cb-hero-avatar.is-live {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
}

.cb-hero-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.cb-hero-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.cb-hero-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: rgba(96, 165, 250, 0.95);
}

.cb-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cb-status-pill,
.cb-mode-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cb-status-pill {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
}

.cb-status-pill[data-status="running"] {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.cb-status-pill[data-status="starting"] {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.35);
  color: #fde047;
}

.cb-status-pill[data-status="error"] {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.cb-mode-pill {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
}

.cb-mode-pill.is-custom {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.cb-alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fde68a;
  font-size: 0.875rem;
  line-height: 1.45;
}

.cb-alert strong {
  display: block;
  margin-bottom: 0.2rem;
}

.cb-error {
  color: #fca5a5;
  margin: 0;
}

.cb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem;
}

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

.cb-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cb-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.cb-step-num {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.cb-step strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.15rem;
  color: rgba(255, 255, 255, 0.92);
}

.cb-step p {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.4;
}

.cb-invite-btn {
  margin-top: 0.5rem;
}

.cb-field {
  margin-bottom: 0.85rem;
}

.cb-field:last-of-type {
  margin-bottom: 0.35rem;
}

.cb-runtime-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cb-runtime-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cb-runtime .welcome-save-hint {
  display: block;
  margin-top: 0.5rem;
}

body.is-light .cb-hero-eyebrow {
  color: rgba(26, 16, 51, 0.55);
}

body.is-light .cb-hero-title {
  color: #1a1033;
}

body.is-light .cb-hero-sub {
  color: #1d4ed8;
}

body.is-light .cb-step strong {
  color: #1a1033;
}

body.is-light .cb-step p {
  color: rgba(26, 16, 51, 0.58);
}
