:root {
  /* Dark Luxury Obsidian Palette */
  --bg-primary: #08090d;
  --bg-secondary: #0d0f17;
  --bg-tertiary: #131622;
  --bg-card: rgba(18, 20, 30, 0.75);
  --bg-card-hover: rgba(24, 28, 42, 0.88);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(88, 101, 242, 0.5);
  
  /* Discord & Standard Accents */
  --accent-blurple: #5865f2;
  --accent-blurple-hover: #4752c4;
  --accent-emerald: #10b981;
  --accent-rose: #ef4444;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --sidebar-width: 280px;
  --header-height: 68px;
  --bottom-bar-height: 60px;
  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-blur: blur(24px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(88, 101, 242, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body.rtl {
  direction: rtl;
}

body.rtl .sidebar {
  border-right: none;
  border-left: 1px solid var(--border-color);
}

body.rtl .nav-item i {
  margin-right: 0;
  margin-left: 12px;
}

body.rtl .nav-badge-pill {
  margin-left: 0;
  margin-right: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* ========================================================
   GATEWAY SCREEN (Matches Image 1, Mobile-Perfect)
   ======================================================== */
.gateway-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #050608;
  background-image: 
    radial-gradient(circle at 50% 35%, rgba(88, 101, 242, 0.14) 0%, transparent 60%),
    radial-gradient(circle at 50% 70%, rgba(18, 22, 34, 0.8) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow-y: auto;
}

.gateway-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gateway-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20vw;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.015);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.gateway-card {
  width: 100%;
  max-width: 440px;
  background: rgba(13, 15, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  animation: cardFadeUp 0.5s ease-out;
}

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

.gateway-logo-ring {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(88, 101, 242, 0.4), rgba(0, 0, 0, 0.8));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gateway-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0d0f17;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.gateway-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #cbd5e1;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.gateway-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.gateway-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 26px;
}

.btn-gateway-discord {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 20px;
  background: var(--accent-blurple);
  color: #fff;
  font-size: 0.96rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.35);
  transition: var(--transition);
}

.btn-gateway-discord:hover, .btn-gateway-discord:active {
  background: var(--accent-blurple-hover);
  transform: translateY(-1px);
}

.gateway-footer-note {
  margin-top: 22px;
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ========================================================
   MAIN DASHBOARD LAYOUT
   ======================================================== */
.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar (Desktop & Mobile Drawer) */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  backdrop-filter: var(--glass-blur);
  height: 100vh;
  position: sticky;
  top: 0;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Backdrop for Sidebar */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 95;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

.brand-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
}

.brand-badge {
  font-size: 0.65rem;
  background: rgba(88, 101, 242, 0.15);
  color: #a5b4fc;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid rgba(88, 101, 242, 0.3);
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 6px;
  cursor: pointer;
}

.nav-menu {
  padding: 14px 10px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  -webkit-overflow-scrolling: touch;
}

.nav-category {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 10px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  min-height: 44px;
}

.nav-item i {
  font-size: 1.1rem;
  margin-right: 12px;
  width: 20px;
  text-align: center;
  color: var(--text-dim);
  transition: var(--transition);
}

.nav-item:hover, .nav-item:active {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item.active {
  background: rgba(88, 101, 242, 0.15);
  color: #fff;
  border: 1px solid rgba(88, 101, 242, 0.35);
}

.nav-item.active i {
  color: var(--accent-blurple);
}

.nav-badge-pill {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(88, 101, 242, 0.18);
  color: #c7d2fe;
  border: 1px solid rgba(88, 101, 242, 0.3);
  font-weight: 700;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Top Header Bar */
.top-header {
  height: var(--header-height);
  background: rgba(13, 15, 23, 0.88);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Mobile Hamburger Toggle */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
}

.server-selector-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 320px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--accent-emerald);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-emerald);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  min-height: 40px;
}

.btn-primary {
  background: var(--accent-blurple);
  color: #fff;
  box-shadow: 0 3px 12px rgba(88, 101, 242, 0.25);
}

.btn-primary:hover, .btn-primary:active {
  background: var(--accent-blurple-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover, .btn-secondary:active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-danger {
  background: var(--accent-rose);
  color: #fff;
}

.btn-success {
  background: var(--accent-emerald);
  color: #fff;
}

/* Page Container & Central Layout */
.page-container {
  padding: 28px 32px;
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.page-section {
  width: 100%;
  animation: pageFadeIn 0.22s ease-in-out;
}

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

.page-header {
  margin-bottom: 22px;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Grid & Cards */
.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.stat-info h4 {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-info .value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
}

/* Section Box */
.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: var(--glass-blur);
  margin-bottom: 20px;
  position: relative;
}

.card-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-box-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.12);
  transition: 0.25s;
  border-radius: 30px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.25s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-blurple);
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #090a10;
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom on mobile */
  transition: var(--transition);
  min-height: 42px;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-blurple);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

/* Backup Cards */
.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.backup-card {
  background: rgba(14, 16, 24, 0.88);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.backup-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.backup-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-blurple);
}

.backup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.backup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: var(--radius-md);
  text-align: center;
}

.backup-stat-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.backup-stat-lbl {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

/* Live Canvas Simulator for Welcome Card */
.canvas-preview-box {
  width: 100%;
  aspect-ratio: 16/7;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  background: #090a10;
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas#welcomeCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Embed Visual Live Preview */
.discord-embed-preview {
  background: #2b2d31;
  border-radius: 6px;
  padding: 14px;
  border-left: 4px solid var(--accent-blurple);
  color: #dbdee1;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.rtl .discord-embed-preview {
  border-left: none;
  border-right: 4px solid var(--accent-blurple);
}
.discord-embed-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.discord-embed-desc {
  white-space: pre-wrap;
  line-height: 1.45;
}

/* ========================================================
   MOBILE APP BOTTOM NAVIGATION BAR
   ======================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-height);
  background: rgba(13, 15, 23, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  z-index: 50;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
  cursor: pointer;
  transition: var(--transition);
}

.bottom-nav-item i {
  font-size: 1.15rem;
  transition: var(--transition);
}

.bottom-nav-item.active {
  color: var(--accent-blurple);
}

.bottom-nav-item.active i {
  transform: translateY(-2px);
}

/* ========================================================
   RESPONSIVE OVERRIDES (MOBILE & TABLET OPTIMIZATIONS)
   ======================================================== */
@media (max-width: 900px) {
  /* Sidebar Mobile Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    transform: translateX(100%);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  }
  
  body:not(.rtl) .sidebar {
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar-close-btn {
    display: block;
  }

  /* Show Hamburger in Header */
  .mobile-menu-btn {
    display: inline-flex;
  }

  /* Header on Mobile */
  .top-header {
    padding: 0 14px;
    gap: 10px;
    height: 60px;
  }

  .server-selector-wrap {
    max-width: 170px;
  }

  #serverSelect {
    font-size: 0.84rem;
    padding: 6px 10px;
    min-height: 36px;
  }

  #refreshBtn {
    padding: 6px 10px;
    min-height: 36px;
  }

  #saveGlobalBtn {
    padding: 6px 12px;
    min-height: 36px;
    font-size: 0.8rem;
  }

  /* Hide ping text to prevent header overflow */
  #botPingBadge, #botOnlineStatus {
    display: none;
  }

  .status-indicator {
    padding: 6px;
    border-radius: 50%;
  }

  /* Collapse ALL 2-column and multi-column grids to 1 column on Mobile */
  .page-container div[style*="grid-template-columns: 1fr 1fr"],
  .page-container div[style*="grid-template-columns: 2fr 1fr"],
  .grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .page-container {
    padding: 16px 12px;
    padding-bottom: calc(var(--bottom-bar-height) + 24px); /* ensure content isn't covered by bottom bar */
  }

  .page-title {
    font-size: 1.35rem;
  }

  .card-box {
    padding: 16px;
  }

  /* Show Mobile Bottom Navigation */
  .mobile-bottom-bar {
    display: flex;
  }

  /* Gateway Card on Mobile */
  .gateway-card {
    padding: 30px 20px;
    max-width: 94vw;
  }

  .gateway-title {
    font-size: 1.3rem;
  }

  .gateway-logo-ring {
    width: 72px;
    height: 72px;
  }

  /* Modals on Mobile */
  .modal-content {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }
}

/* ========================================================
   PROBOT-STYLE SERVER SWITCHER & SELECTOR
   ======================================================== */
.header-server-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 12px 5px 8px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}
.header-server-pill:hover {
  background: rgba(88, 101, 242, 0.15);
  border-color: rgba(88, 101, 242, 0.45);
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.25);
  transform: translateY(-1px);
}
.header-server-avatar, .sidebar-server-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865f2, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(88, 101, 242, 0.35);
  flex-shrink: 0;
}
.header-server-avatar img, .sidebar-server-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-server-info {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.2;
}
.header-server-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-server-badge {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
}
.header-server-arrow {
  font-size: 0.72rem;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}
.header-server-pill:hover .header-server-arrow {
  color: #fff;
}

/* Sidebar Server Box (ProBot Style) */
.sidebar-server-box {
  margin: 10px 14px 16px 14px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(0, 0, 0, 0.3));
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.25s ease;
  cursor: pointer;
}
.sidebar-server-box:hover {
  border-color: rgba(88, 101, 242, 0.6);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.16), rgba(0, 0, 0, 0.4));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.sidebar-server-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.sidebar-server-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-server-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.sidebar-server-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.sidebar-server-switch-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c7d2fe;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.sidebar-server-switch-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* Server Picker Modal */
.server-picker-modal {
  max-width: 660px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.server-picker-search-bar {
  position: relative;
  margin: 14px 0 12px 0;
}
.server-picker-search-bar i {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.server-picker-search-bar input {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 42px 10px 14px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.server-picker-search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.3);
}
.server-picker-category-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.server-picker-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.server-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.server-card-item:hover {
  background: rgba(88, 101, 242, 0.09);
  border-color: rgba(88, 101, 242, 0.35);
  transform: translateX(-3px);
}
.server-card-item.active {
  background: rgba(88, 101, 242, 0.15);
  border-color: rgba(88, 101, 242, 0.6);
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.15);
}
.server-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}
.server-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5865f2, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.server-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.server-card-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.server-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.server-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.server-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}
.server-picker-invite-banner {
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(139, 92, 246, 0.05));
  border: 1px dashed rgba(88, 101, 242, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.invite-banner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
}
.invite-banner-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========================================================
   COMMANDS HUB (Image 4 ProBot Style) & MULTI-ROLES
   ======================================================== */
.commands-category-section {
  margin-bottom: 24px;
}
.commands-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}
.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
}
.category-pill-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.category-pill-badge.blue {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.category-pill-badge.yellow {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.category-pill-badge.green {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.command-card {
  background: rgba(13, 15, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.command-card:hover {
  border-color: rgba(88, 101, 242, 0.4);
  background: rgba(13, 15, 23, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.command-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.cmd-chip {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: monospace;
  font-weight: 700;
}
.cmd-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmd-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
  min-height: 36px;
}
.cmd-aliases-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cmd-aliases-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 600;
}
.cmd-alias-input {
  background: transparent;
  border: none;
  outline: none;
  color: #818cf8;
  font-size: 0.82rem;
  font-weight: 600;
  width: 100%;
}
.cmd-alias-input:focus {
  color: #fff;
}

/* Multi-roles checklist */
.roles-checklist-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.role-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.role-check-item:hover {
  background: rgba(88, 101, 242, 0.12);
}
.role-check-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.role-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.role-name-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

/* Ticket Buttons & Category Management */
.ticket-btn-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.ticket-btn-item:hover {
  border-color: rgba(88, 101, 242, 0.4);
}
.ticket-btn-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ticket-btn-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.btn-style-primary { background: #5865f2; color: #fff; }
.btn-style-secondary { background: #4e5058; color: #fff; }
.btn-style-success { background: #23a55a; color: #fff; }
.btn-style-danger { background: #da373c; color: #fff; }

.btn-preview-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  border: none;
}
.btn-preview-item:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

/* Command Card Response Inputs */
.cmd-response-box {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.22);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.cmd-response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cmd-response-label {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 600;
}
.cmd-response-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.82rem;
  color: #e2e8f0;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  direction: rtl;
  text-align: right;
}
.cmd-response-input:focus {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 8px rgba(88, 101, 242, 0.25);
}
.badge-insert-var {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.18);
  color: #a5b4fc;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.badge-insert-var:hover {
  background: rgba(88, 101, 242, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

/* Copy chip animation */
.copy-chip {
  transition: all 0.15s;
  user-select: none;
}
.copy-chip:hover {
  background: rgba(88, 101, 242, 0.35);
  border-color: #818cf8;
  color: #fff;
}
.copy-chip:active {
  transform: scale(0.95);
  background: #10b981;
  color: #fff;
}

/* Command Role Permission Box */
.cmd-role-box {
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.22);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.cmd-role-label {
  display: block;
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 5px;
}
.cmd-role-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: #e2e8f0;
  outline: none;
  font-family: inherit;
  direction: rtl;
  transition: border-color 0.2s;
}
.cmd-role-select:focus {
  border-color: var(--primary);
}

/* Ticket Panel Type Selector */
.ticket-type-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 14px;
}
.ticket-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.ticket-type-btn:hover {
  color: #fff;
}
.ticket-type-btn.active {
  background: var(--accent-blurple);
  color: #fff;
  box-shadow: 0 2px 10px rgba(88, 101, 242, 0.35);
}

/* Discord Select Menu Live Preview (Image 2 & 3 replica) */
.discord-select-menu-preview {
  background: #2b2d31;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  margin-top: 10px;
}
.discord-select-menu-preview:hover {
  background: #313338;
}
.dsm-placeholder {
  color: #949ba4;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dsm-arrow {
  color: #949ba4;
  font-size: 0.8rem;
  transition: transform 0.2s;
}
.dsm-dropdown {
  background: #232428;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  margin-top: 6px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.dsm-option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}
.dsm-option-item:last-child {
  border-bottom: none;
}
.dsm-option-item:hover {
  background: #2b2d31;
}
.dsm-option-emoji {
  font-size: 1.25rem;
  line-height: 1.2;
}
.dsm-option-body {
  flex: 1;
}
.dsm-option-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 2px;
}
.dsm-option-desc {
  font-size: 0.78rem;
  color: #949ba4;
  line-height: 1.4;
}

/* Color Pills Selector in Ticket Options */
.color-pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.color-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}
.color-pill-btn.pill-primary { background: #5865f2; color: #fff; }
.color-pill-btn.pill-success { background: #23a55a; color: #fff; }
.color-pill-btn.pill-danger { background: #da373c; color: #fff; }
.color-pill-btn.pill-secondary { background: #4e5058; color: #fff; }
.color-pill-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.color-pill-btn.active {
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Smart Variable Tags Container */
.smart-tags-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.smart-tags-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #c7d2fe;
  margin-bottom: 8px;
}
.smart-tags-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.smart-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 20px;
  color: #a5b4fc;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.smart-tag-pill:hover {
  background: rgba(88, 101, 242, 0.28);
  border-color: #818cf8;
  color: #fff;
  transform: translateY(-1px);
}

/* Progressive AutoMod 3-Step Punishment Layout */
.automod-steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .automod-steps-container {
    grid-template-columns: 1fr;
  }
}
.automod-step-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
  transition: border-color 0.2s;
}
.automod-step-card:hover {
  border-color: rgba(88, 101, 242, 0.4);
}
.automod-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.automod-step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--accent-blurple);
  color: #fff;
}
.automod-step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}
.automod-step-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Tabbed Ticket Option Manager (Clean & Luxury) */
.ticket-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.ticket-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.ticket-tab-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.ticket-tab-item.active {
  background: rgba(88, 101, 242, 0.2);
  border-color: #5865f2;
  color: #fff;
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.3);
}
.ticket-tab-item .tab-color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.ticket-tab-editor-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  animation: pageFadeIn 0.2s ease;
}

/* Colored Pills in DSM Select Menu Preview */
.dsm-color-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: auto;
  align-self: center;
  white-space: nowrap;
}
.dsm-color-pill.btn-style-primary { background: #5865f2; color: #fff; }
.dsm-color-pill.btn-style-success { background: #23a55a; color: #fff; }
.dsm-color-pill.btn-style-danger { background: #da373c; color: #fff; }
.dsm-color-pill.btn-style-secondary { background: #4e5058; color: #fff; }

/* Store Department & Product Customizer */
.store-dept-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.store-dept-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.store-dept-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.store-dept-tab.active {
  background: rgba(88, 101, 242, 0.2);
  border-color: #5865f2;
  color: #fff;
  box-shadow: 0 0 10px rgba(88, 101, 242, 0.25);
}
.store-dept-item-count {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: #818cf8;
}
.store-item-row input {
  min-height: 38px !important;
  font-size: 0.85rem !important;
}

/* Ticket Sub-tabs Nav */
.ticket-subtab-btn {
  transition: all 0.2s ease;
  cursor: pointer;
}
.ticket-subtab-btn.active {
  background: var(--accent-blurple) !important;
  color: #fff !important;
  border-color: var(--accent-blurple) !important;
  box-shadow: 0 0 14px rgba(88, 101, 242, 0.4);
}

/* Level Rewards Manager */
.level-reward-row {
  display: grid;
  grid-template-columns: 140px 1fr 42px;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: all 0.15s ease;
}
.level-reward-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Banner Dropzone Styles */
.banner-dropzone-box:hover, .banner-dropzone-box.dragover {
  border-color: #5865f2 !important;
  background: rgba(88, 101, 242, 0.09) !important;
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.2);
}

/* Discord Emoji Picker Styles */
.emoji-picker-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 1.25rem;
}
.emoji-picker-item:hover {
  background: rgba(88, 101, 242, 0.25);
  border-color: #5865f2;
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.emoji-picker-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.discord-inline-emoji {
  width: 20px;
  height: 20px;
  vertical-align: -3px;
  object-fit: contain;
  display: inline-block;
  margin: 0 2px;
}

.btn-emoji-trigger {
  padding: 0 10px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-emoji-trigger:hover {
  background: rgba(88, 101, 242, 0.2);
  border-color: #5865f2;
  color: #fff;
}

/* ================= TOAST NOTIFICATION SYSTEM (MODERN IN-PAGE POPUPS) ================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast-msg {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(18, 20, 29, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 4px solid #5865f2;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(88, 101, 242, 0.25);
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 290px;
  max-width: 450px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(12px);
  direction: rtl;
}
.toast-msg.toast-success {
  border-right-color: #10b981;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.25);
}
.toast-msg.toast-error {
  border-right-color: #ef4444;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(239, 68, 68, 0.25);
}
.toast-msg.toast-info {
  border-right-color: #3b82f6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.25);
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastSlideOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(10px) scale(0.95); }
}

/* Custom Sliders for Welcome Studio */
.range-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.range-slider-input {
  flex: 1;
  accent-color: #5865f2;
  cursor: pointer;
  height: 6px;
  border-radius: 4px;
}
.range-slider-value {
  min-width: 50px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #818cf8;
  background: rgba(88, 101, 242, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(88, 101, 242, 0.25);
}

