html{background: linear-gradient(180deg, var(--bg), var(--bg2));}
/* =========================================================
   ECLIPSE VIBES THEME
   A distinct "space / neon / eclipse ring" dashboard skin.
   Drop-in replacement look for Soft UI based dashboards.
========================================================= */

:root{
  --bg:#05050a;
  --bg2:#070816;
  --panel: rgba(18, 18, 30, 0.62);
  --panel2: rgba(255,255,255,0.04);
  --stroke: rgba(255,255,255,0.10);

  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);

  /* Eclipse accents */
  --violet:#8b5cf6;
  --cyan:#22d3ee;
  --lime:#34d399;
  --pink:#fb7185;
  --amber:#fbbf24;

  --ring: radial-gradient(circle at 50% 50%,
            rgba(255,255,255,0.00) 48%,
            rgba(34,211,238,0.10) 52%,
            rgba(139,92,246,0.18) 56%,
            rgba(255,255,255,0.00) 70%);

  --shadow: 0 22px 70px rgba(0,0,0,0.62);
  --shadow2: 0 12px 32px rgba(0,0,0,0.50);

  --r-xl: 26px;
  --r-lg: 18px;
  --r-md: 14px;
}

/* Hard stop horizontal overflow (prevents scrolling right to reveal off-canvas UI) */
html, body{
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

*, *::before, *::after{
  box-sizing: border-box;
}

/* Keep Soft-UI "fixed plugin" (Site Configuration) pinned to viewport, not page width */
.fixed-plugin,
.fixed-plugin .card,
.fixed-plugin .fixed-plugin-button{
  max-width: 100vw !important;
}

.fixed-plugin{
  position: fixed !important;
  right: 0 !important;
  top: 96px !important;
  z-index: 1030 !important;
}

.fixed-plugin .fixed-plugin-button{
  position: fixed !important;
  right: 18px !important;
  top: 120px !important;
  z-index: 1031 !important;
}

/* Base background: starfield + eclipse glow */
body.eclipse-body{
  color: var(--text);
  background:
    radial-gradient(900px 700px at 18% 12%, rgba(139,92,246,0.20), transparent 60%),
    radial-gradient(800px 650px at 88% 28%, rgba(34,211,238,0.16), transparent 60%),
    radial-gradient(900px 700px at 54% 92%, rgba(52,211,153,0.12), transparent 62%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed;
  overflow-x: hidden;
}

body.eclipse-body::before{
  /* Stars */
  content:"";
  position: fixed;
  inset:-40vh -40vw;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.32), transparent 60%),
    radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(1px 1px at 70% 25%, rgba(255,255,255,.20), transparent 60%),
    radial-gradient(1px 1px at 90% 70%, rgba(255,255,255,.28), transparent 60%),
    radial-gradient(1px 1px at 55% 55%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(2px 2px at 42% 12%, rgba(255,255,255,.12), transparent 60%),
    radial-gradient(2px 2px at 18% 62%, rgba(255,255,255,.10), transparent 60%);
  opacity: .55;
  pointer-events:none;
  transform: translateZ(0);
  animation: drift 28s linear infinite;
  mix-blend-mode: screen;
}

body.eclipse-body::after{
  /* Big eclipse ring */
  content:"";
  position: fixed;
  width: 950px;
  height: 950px;
  left: 50%;
  top: 45%;
  transform: translate(-50%,-50%);
  background: var(--ring);
  filter: blur(0.2px);
  opacity: .9;
  pointer-events:none;
  animation: slowspin 38s linear infinite;
}

@keyframes drift{
  0%{ transform: translate3d(0,0,0) rotate(0deg); }
  100%{ transform: translate3d(140px, -120px,0) rotate(6deg); }
}
@keyframes slowspin{
  0%{ transform: translate(-50%,-50%) rotate(0deg) scale(1); }
  100%{ transform: translate(-50%,-50%) rotate(360deg) scale(1); }
}

/* Remove default light backgrounds */
.bg-gray-100, .bg-white, .bg-light{ background: transparent !important; }

/* Layout: new rail + header */
.eclipse-wrap{
  display:flex;
  min-height: 100vh;
}

.eclipse-rail{
  position: fixed;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 270px;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  z-index: 999;
}

.eclipse-rail::before{
  content:"";
  position:absolute;
  inset: -2px;
  background:
    radial-gradient(500px 260px at 30% 0%, rgba(139,92,246,.22), transparent 70%),
    radial-gradient(520px 300px at 80% 20%, rgba(34,211,238,.18), transparent 70%);
  pointer-events:none;
}

.eclipse-rail .rail-inner{
  position: relative;
  height: 100%;
  display:flex;
  flex-direction: column;
}

.eclipse-brand{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.eclipse-logo{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,.22), rgba(255,255,255,.04) 38%, transparent 45%),
    linear-gradient(135deg, rgba(139,92,246,.9), rgba(34,211,238,.65));
  box-shadow: 0 18px 40px rgba(139,92,246,.22);
  position: relative;
  overflow:hidden;
}

/* When a real bot icon is available, show it inside the logo wrapper */
.eclipse-logo-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 16px;
}
.eclipse-logo::after{
  content:"";
  position:absolute;
  inset:-40%;
  background: conic-gradient(from 180deg, rgba(255,255,255,.0), rgba(255,255,255,.35), rgba(255,255,255,0));
  animation: shimmer 2.6s linear infinite;
  opacity:.35;
}
@keyframes shimmer{
  0%{ transform: rotate(0deg); }
  100%{ transform: rotate(360deg); }
}

.eclipse-brand .brand-text{
  line-height:1.05;
}
.eclipse-brand .brand-text .name{
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text);
  font-size: 1.02rem;
}
.eclipse-brand .brand-text .tag{
  color: var(--muted);
  font-size: .78rem;
}

/* Rail nav */
.eclipse-nav{
  padding: 12px 10px;
  overflow:auto;
}
.eclipse-nav a{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px 12px;
  margin: 6px 6px;
  border-radius: 16px;
  color: var(--muted) !important;
  text-decoration:none !important;
  border: 1px solid transparent;
}
.eclipse-nav a:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  color: var(--text) !important;
  transform: translateX(2px);
}
.eclipse-nav a.active{
  background: linear-gradient(135deg, rgba(139,92,246,0.26), rgba(34,211,238,0.14));
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 18px 40px rgba(139,92,246,.16);
  color: var(--text) !important;
}
.eclipse-nav .ico{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.eclipse-nav a.active .ico{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}
.eclipse-nav .label{
  font-weight: 600;
  letter-spacing: .2px;
}

/* Rail footer user */
.eclipse-rail .rail-footer{
  margin-top: auto;
  padding: 14px 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-chip{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
}
.user-chip img{
  width: 36px;
  height: 36px;
  border-radius: 14px;
}
.user-chip .u1{ font-weight: 650; color: var(--text); font-size: .92rem; }
.user-chip .u2{ color: var(--muted); font-size: .78rem; }

/* Main content offset for rail */
.eclipse-main{
  margin-left: 302px; /* rail width + spacing */
  width: calc(100% - 302px);
  padding: 18px 18px 24px;
}


/* Compatibility: if pages still use .main-content wrapper */
.main-content{
  margin-left: 302px !important;
  width: calc(100% - 302px) !important;
  padding: 18px 18px 24px !important;
  background: transparent !important;
}
@media (max-width: 1024px){
  .main-content{
    margin-left: 110px !important;
    width: calc(100% - 110px) !important;
  }
}
@media (max-width: 768px){
  .main-content{
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* Header */
.eclipse-header{
  position: sticky;
  top: 12px;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-xl);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow2);
}

.eclipse-header .left h1{
  margin:0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .25px;
}
.eclipse-header .left .crumb{
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
}

.eclipse-search{
  flex: 1;
  max-width: 520px;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(10,12,22,0.55);
  border: 1px solid rgba(255,255,255,0.12);
}
.eclipse-search input{
  width: 100%;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  color: var(--text) !important;
}
.kbd{
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: .78rem;
}

/* Panels (re-skin .card without looking like Soft UI) */
.card{
  background: var(--panel) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: var(--r-xl) !important;
  box-shadow: var(--shadow2) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow:hidden;
}

.card::before{
  /* neon top edge */
  content:"";
  position:absolute;
  left: 12px;
  right: 12px;
  top: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(139,92,246,.0), rgba(139,92,246,.8), rgba(34,211,238,.8), rgba(139,92,246,.0));
  opacity:.85;
}

.card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow) !important;
}

.card .card-header{
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
.card .card-body{ position: relative; }

.text-body, .text-dark{ color: var(--text) !important; }
.text-secondary{ color: var(--muted) !important; }

/* Buttons */
.btn, .btn.btn-primary, .btn.bg-gradient-primary{
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  background: linear-gradient(135deg, rgba(139,92,246,.82), rgba(34,211,238,.55)) !important;
  box-shadow: 0 20px 40px rgba(139,92,246,.16);
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 26px 70px rgba(34,211,238,.12); }

.btn.btn-outline-primary, .btn.btn-outline-secondary{
  background: rgba(255,255,255,0.05) !important;
  color: var(--text) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
}

/* Inputs */
.form-control, .form-select, input, select, textarea{
  border-radius: 16px !important;
  background: rgba(10,12,22,0.55) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: var(--text) !important;
}
.form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus{
  box-shadow: 0 0 0 4px rgba(139,92,246,0.18) !important;
  border-color: rgba(139,92,246,0.40) !important;
}

/* Tables */
.table, .table th, .table td{
  color: var(--text) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
.table tbody tr:hover{ background: rgba(255,255,255,0.04) !important; }

/* Command palette overlay */
.eclipse-palette{
  position: fixed;
  inset: 0;
  display:none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
}
.eclipse-palette.open{ display:flex; }
.eclipse-palette .box{
  width: 100%;
  max-width: 720px;
  border-radius: 26px;
  background: rgba(12,12,20,0.72);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.eclipse-palette .top{
  display:flex;
  gap:10px;
  align-items:center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.eclipse-palette .top input{
  width:100%;
  background: transparent !important;
  border:0 !important;
  outline:none !important;
  color: var(--text) !important;
  font-size: 1rem;
}
.eclipse-palette .list{ max-height: 320px; overflow:auto; }
.eclipse-palette .item{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor:pointer;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.eclipse-palette .item:hover{ background: rgba(255,255,255,0.05); }
.eclipse-palette .item .t1{ font-weight: 700; color: var(--text); }
.eclipse-palette .item .t2{ color: var(--muted); font-size: .8rem; }
.eclipse-palette .hint{ padding: 10px 16px; color: var(--muted); font-size: .8rem; border-top:1px solid rgba(255,255,255,0.06); }

@media (max-width: 1024px){
  .eclipse-rail{ width: 88px; }
  .eclipse-rail .brand-text, .eclipse-rail .label, .eclipse-rail .u1, .eclipse-rail .u2{ display:none; }
  .eclipse-main{ margin-left: 110px; width: calc(100% - 110px); }
}
@media (max-width: 768px){
  .eclipse-rail{ display:none; }
  .eclipse-main{ margin-left: 0; width: 100%; }
}

/* Stop the fixed-plugin cog from stretching */
.fixed-plugin .fixed-plugin-button,
.fixed-plugin #themeButton {
  position: fixed;              /* keep it pinned */
  right: 18px;                  /* adjust to taste */
  top: 140px;                   /* adjust to taste */
  z-index: 1030;

  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  border-radius: 999px !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

/* Make sure the icon itself doesn't create vertical sizing */
.fixed-plugin #themeButton i,
.fixed-plugin .fixed-plugin-button i {
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

/* Remove Soft UI gray layout background globally */
.main-content.bg-gray-100 {
  background: transparent !important;
}


/* ================================
   Scroll lock when overlay is open
================================ */

html.scroll-lock,
body.scroll-lock {
  overflow: hidden !important;
  height: 100vh;
}

/* Prevent sideways jump when scrollbar disappears */
body.scroll-lock {
  padding-right: var(--scrollbar-compensation, 0px);
}

body.scroll-lock {
  touch-action: none;
}


/* =========================================================
   Manage Guilds: NO SCROLL (without overriding Eclipse background)
   ========================================================= */
body.manage-guilds-noscroll{
  overflow: hidden !important;
}
body.manage-guilds-noscroll,
body.manage-guilds-noscroll .main-content{
  height: 100vh !important;
}
body.manage-guilds-noscroll .main-content{
  overflow: hidden !important;
}

