/* ==========================================================================
   EASYBOT DASHBOARD REDESIGN 3.0 — EXACT VISUAL REFERENCE IMPLEMENTATION
   Matches reference: Dark navy, 1536x1024 target, high visual density,
   modern card surfaces, subtle glowing accents, full Arabic RTL support.
   ========================================================================== */

:root {
  /* Surface Tokens from Reference Palette */
  --eb-bg: #0b111d;
  --eb-sidebar: #101a2b;
  --eb-topbar: #0f1828;
  --eb-surface: #121d2e;
  --eb-surface-raised: #172338;
  --eb-surface-glass: rgba(18, 29, 46, 0.75);
  --eb-card: #10192a;
  --eb-card-raised: #152238;
  --eb-hover: #1b2a42;
  --eb-hover-light: rgba(255, 255, 255, 0.05);

  /* Border & Hairline Tokens */
  --eb-border: #1c2b42;
  --eb-border-subtle: rgba(255, 255, 255, 0.07);
  --eb-border-light: rgba(255, 255, 255, 0.12);
  --eb-border-focus: #4967ff;

  /* Text & Foreground */
  --eb-text: #f5f7fc;
  --eb-text-secondary: #c5d2e7;
  --eb-muted: #8b9db7;
  --eb-text-dim: #5c6e87;

  /* Accent & Status Colors */
  --eb-primary: #4967ff;
  --eb-primary-hover: #3b54d6;
  --eb-primary-glow: rgba(73, 103, 255, 0.35);
  --eb-purple: #7955e8;
  --eb-cyan: #06b6d4;
  --eb-teal: #14b8a6;
  --eb-amber: #f59e0b;
  --eb-gold: #eab308;
  --eb-pink: #ec4899;
  --eb-magenta: #d946ef;
  --eb-success: #20ce8c;
  --eb-warning: #f1b84b;
  --eb-danger: #ed626c;

  /* Layout Constants */
  --eb-sidebar-width: 236px;
  --eb-topbar-height: 58px;
  --eb-card-radius: 12px;
  --eb-control-radius: 8px;
  --eb-font-family: 'Inter', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   GLOBAL BASE & LAYOUT OVERRIDES (DASHBOARD-MODE ONLY)
   ========================================================================== */

html,
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

body.dashboard-mode {
  background-color: var(--eb-bg) !important;
  color: var(--eb-text) !important;
  font-family: var(--eb-font-family) !important;
  min-height: 100vh;
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

.app-container {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* ==========================================================================
   TOPBAR COMPONENT (.eb-topbar)
   ========================================================================== */

.eb-topbar {
  position: fixed;
  top: 0;
  inset-inline-start: var(--eb-sidebar-width);
  inset-inline-end: 0;
  height: var(--eb-topbar-height);
  background: var(--eb-topbar);
  border-bottom: 1px solid var(--eb-border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 20px;
  backdrop-filter: blur(12px);
  transition: inset-inline-start 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.eb-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  max-width: 640px;
}

.eb-sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--eb-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--eb-control-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.15s ease;
}

.eb-sidebar-toggle-btn:hover {
  background: var(--eb-hover);
  color: #fff;
}

/* Global Search Bar with Ctrl+K */
.eb-global-search-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
}

.eb-global-search-input {
  width: 100%;
  height: 36px;
  background: #111a29;
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-control-radius);
  padding-inline-start: 36px;
  padding-inline-end: 72px;
  color: var(--eb-text);
  font-size: 0.82rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.eb-global-search-input:focus {
  outline: none;
  border-color: var(--eb-primary);
  background: #142033;
  box-shadow: 0 0 0 3px var(--eb-primary-glow);
}

.eb-global-search-input::placeholder {
  color: var(--eb-text-dim);
}

.eb-search-icon {
  position: absolute;
  inset-inline-start: 11px;
  color: var(--eb-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.eb-search-kbd {
  position: absolute;
  inset-inline-end: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--eb-muted);
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* Topbar Right Controls */
.eb-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eb-topbar-btn {
  background: transparent;
  border: none;
  color: var(--eb-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.eb-topbar-btn:hover {
  background: var(--eb-hover);
  color: #fff;
}

.eb-badge-dot {
  position: absolute;
  top: 5px;
  inset-inline-end: 5px;
  background: var(--eb-danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--eb-topbar);
}

/* User Profile Pill */
.eb-user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--eb-border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.eb-user-profile-pill:hover {
  background: var(--eb-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.eb-user-avatar-wrap {
  position: relative;
  width: 28px;
  height: 28px;
}

.eb-user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--eb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.eb-user-online-dot {
  position: absolute;
  bottom: -1px;
  inset-inline-end: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--eb-success);
  border: 1.5px solid var(--eb-topbar);
}

.eb-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.eb-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.eb-user-role {
  font-size: 0.68rem;
  color: var(--eb-muted);
}

.eb-chevron-icon {
  font-size: 0.65rem;
  color: var(--eb-muted);
  margin-inline-start: 4px;
}

/* ==========================================================================
   TOPBAR DROPDOWNS & ANCHORS
   ========================================================================== */
.eb-topbar-dropdown-anchor {
  position: relative;
  display: inline-flex;
}

.eb-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  background-color: #10192a !important;
  background: #10192a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--eb-card-radius, 12px) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  z-index: 10000 !important;
  overflow: hidden;
  animation: ebDropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ebDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* User Profile Dropdown */
.eb-user-dropdown {
  width: 290px;
  padding: 12px;
}

.eb-dropdown-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--eb-border);
  margin-bottom: 10px;
}

.eb-dropdown-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--eb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.eb-dropdown-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.eb-dropdown-username {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-dropdown-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(73, 103, 255, 0.18);
  color: #8b9db7;
  border: 1px solid rgba(73, 103, 255, 0.3);
  margin-top: 3px;
  width: fit-content;
}

/* Language Selection Card inside User Profile Dropdown */
.eb-dropdown-lang-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-control-radius);
  padding: 10px;
  margin-bottom: 10px;
}

.eb-dropdown-lang-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--eb-muted);
  margin-bottom: 8px;
}

.eb-dropdown-lang-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.eb-dropdown-lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--eb-border);
  border-radius: 8px;
  color: var(--eb-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-dropdown-lang-btn:hover {
  background: rgba(73, 103, 255, 0.12);
  color: #fff;
  border-color: rgba(73, 103, 255, 0.35);
}

.eb-dropdown-lang-btn.active {
  background: rgba(73, 103, 255, 0.22);
  border-color: var(--eb-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(73, 103, 255, 0.3);
}

/* Dropdown Menu Items */
.eb-dropdown-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.eb-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--eb-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  width: 100%;
  text-align: start;
}

.eb-dropdown-item:hover {
  background: var(--eb-hover);
  color: #fff;
}

.eb-dropdown-item.danger:hover {
  background: rgba(237, 98, 108, 0.15);
  color: var(--eb-danger);
}

.eb-dropdown-divider {
  height: 1px;
  background: var(--eb-border);
  margin: 6px 0;
}

/* Notifications Dropdown Specifics */
.eb-notifications-dropdown {
  width: 320px;
  padding: 12px;
}

.eb-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--eb-border);
  margin-bottom: 8px;
}

.eb-notif-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eb-notif-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.eb-notif-count-pill {
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--eb-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
}

.eb-notif-mark-btn {
  background: transparent;
  border: none;
  color: var(--eb-primary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}

.eb-notif-mark-btn:hover {
  text-decoration: underline;
}

.eb-notif-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.eb-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  transition: all 0.15s ease;
}

.eb-notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.eb-notif-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.eb-notif-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.eb-notif-item-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

.eb-notif-item-desc {
  font-size: 0.7rem;
  color: var(--eb-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.eb-notif-item-time {
  font-size: 0.64rem;
  color: var(--eb-text-dim);
  margin-top: 4px;
}

.eb-notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  color: var(--eb-muted);
  font-size: 0.78rem;
  text-align: center;
  gap: 4px;
}

/* Help Dropdown Specifics */
.eb-help-dropdown {
  width: 270px;
  padding: 12px;
}

.eb-help-header {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--eb-border);
  margin-bottom: 8px;
}

/* ==========================================================================
   SIDEBAR COMPONENT (.eb-sidebar)
   ========================================================================== */

.eb-sidebar {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: var(--eb-sidebar-width);
  height: 100vh;
  background: var(--eb-sidebar);
  border-inline-end: 1px solid var(--eb-border);
  z-index: 110;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.eb-sidebar::-webkit-scrollbar {
  width: 4px;
}

.eb-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

/* Sidebar Brand Header */
.eb-sidebar-brand {
  height: var(--eb-topbar-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 16px;
  border-bottom: 1px solid var(--eb-border);
  flex-shrink: 0;
}

.eb-brand-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.eb-brand-text {
  display: flex;
  flex-direction: column;
}

.eb-brand-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.eb-brand-subtitle {
  font-size: 0.65rem;
  color: var(--eb-muted);
  white-space: nowrap;
}

/* Sidebar Nav Body */
.eb-sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Nav Item Groups */
.eb-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.eb-nav-group-title {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--eb-text-dim);
  padding: 6px 10px 4px 10px;
  letter-spacing: 0.06em;
}

/* Nav Item Link */
.eb-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--eb-control-radius);
  color: var(--eb-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
}

.eb-nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.eb-nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.eb-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-nav-badge-new {
  background: rgba(32, 206, 140, 0.15);
  color: var(--eb-success);
  border: 1px solid rgba(32, 206, 140, 0.35);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eb-nav-item:hover {
  background: var(--eb-hover);
  color: #fff;
}

/* Active Nav Item — Vibrant Blue Pill */
.eb-nav-item.active {
  background: var(--eb-primary) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 12px var(--eb-primary-glow);
}

.eb-nav-item.active .eb-nav-icon {
  color: #fff;
}

/* Sidebar Footer */
.eb-sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--eb-border);
  font-size: 0.68rem;
  color: var(--eb-text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   MAIN DASHBOARD CONTENT AREA (.eb-main-viewport)
   ========================================================================== */

/* Unconstrain overview tab completely to eliminate 1280px bottleneck */
body.dashboard-mode .main-content > .tab-panel#tab-overview,
body.dashboard-mode .main-content > #tab-overview,
body.dashboard-mode #tab-overview,
#tab-overview {
  max-width: none !important;
  width: 100% !important;
  margin-inline: 0 !important;
  padding: 0 !important;
}

body.dashboard-mode .main-content {
  max-width: 100% !important;
  width: auto !important;
  box-sizing: border-box !important;
}

.eb-main-viewport {
  margin-inline-start: var(--eb-sidebar-width);
  margin-top: var(--eb-topbar-height);
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: none !important;
  padding: 20px 24px 40px 24px;
  background: var(--eb-bg);
  transition: margin-inline-start 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

/* Tab Panels Integration */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==========================================================================
   HOMEPAGE OVERVIEW GRID (SECTION BY SECTION FIDELITY)
   ========================================================================== */

.eb-overview-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   ROW 1: HERO BANNER + SERVER SUMMARY CARD
   -------------------------------------------------------------------------- */

.eb-row-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  width: 100%;
}

/* A. Welcome Hero Banner */
.eb-hero-banner {
  background: linear-gradient(135deg, #090f1d 0%, #0d1627 50%, #111d33 100%);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-card-radius);
  position: relative;
  overflow: hidden;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 200px;
}

.eb-hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 75% 30%, rgba(73, 103, 255, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 2;
}

.eb-hero-artwork-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 55%;
  max-width: 580px;
  background-image: url('/easybot-hero-banner-art.png');
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}

html[dir="rtl"] .eb-hero-artwork-bg {
  right: auto;
  left: 0;
  background-image: url('/easybot-hero-banner-art-rtl.png');
  background-position: left center;
}

.eb-hero-left {
  position: relative;
  z-index: 3;
  max-width: 56%;
}

.eb-hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.015em;
  margin: 0 0 8px 0;
  line-height: 1.22;
}

.eb-hero-subtitle {
  font-size: 0.92rem;
  color: var(--eb-text-secondary);
  margin: 0 0 10px 0;
  line-height: 1.45;
}

.eb-hero-tags {
  font-size: 0.78rem;
  color: var(--eb-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-weight: 600;
}

.eb-hero-tags-bullet {
  color: var(--eb-primary);
  font-weight: 900;
}

.eb-hero-ctas {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--eb-control-radius);
  font-size: 0.86rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.eb-btn-primary {
  background: var(--eb-primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--eb-primary-glow);
}

.eb-btn-primary:hover {
  background: var(--eb-primary-hover);
  box-shadow: 0 6px 18px var(--eb-primary-glow);
  transform: translateY(-1px);
}

.eb-btn-glass {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(8px);
}

.eb-btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
}

/* B. Guild Summary & Plan Column */
.eb-server-summary-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eb-server-card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-card-radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eb-server-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eb-server-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.eb-server-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--eb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  border: 2px solid var(--eb-border);
  flex-shrink: 0;
}

.eb-server-name-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.eb-server-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-server-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.eb-badge-purple {
  background: rgba(121, 85, 232, 0.18);
  color: #bfa3ff;
  border: 1px solid rgba(121, 85, 232, 0.35);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.eb-badge-green {
  background: rgba(32, 206, 140, 0.15);
  color: var(--eb-success);
  border: 1px solid rgba(32, 206, 140, 0.35);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.eb-server-gear-btn {
  background: transparent;
  border: none;
  color: var(--eb-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.eb-server-gear-btn:hover {
  background: var(--eb-hover);
  color: #fff;
}

/* 3 Mini Stats Columns */
.eb-server-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--eb-border-subtle);
  border-radius: var(--eb-control-radius);
  padding: 10px 12px;
  text-align: center;
}

.eb-mini-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.eb-mini-stat-lbl {
  font-size: 0.7rem;
  color: var(--eb-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
  font-weight: 600;
}

.eb-server-settings-action-btn {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-control-radius);
  color: var(--eb-text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.eb-server-settings-action-btn:hover {
  background: var(--eb-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

/* Plan / Subscription Pill underneath */
.eb-plan-pill-card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-card-radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eb-plan-pill-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eb-plan-diamond-icon {
  font-size: 1.25rem;
  color: var(--eb-cyan);
}

.eb-plan-meta {
  display: flex;
  flex-direction: column;
}

.eb-plan-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.eb-plan-renews {
  font-size: 0.7rem;
  color: var(--eb-muted);
}

.eb-btn-outline-sm {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--eb-control-radius);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-btn-outline-sm:hover {
  background: var(--eb-hover);
  border-color: var(--eb-primary);
}

/* --------------------------------------------------------------------------
   ROW 2: KPI STRIP (5 CARDS HORIZONTAL)
   -------------------------------------------------------------------------- */

.eb-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  width: 100%;
}

.eb-kpi-card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-card-radius);
  padding: 14px 16px;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.18s ease;
}

.eb-kpi-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.eb-kpi-icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.eb-kpi-icon-blue { background: rgba(73, 103, 255, 0.16); color: var(--eb-primary); border: 1px solid rgba(73, 103, 255, 0.3); }
.eb-kpi-icon-cyan { background: rgba(6, 182, 212, 0.16); color: var(--eb-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.eb-kpi-icon-amber { background: rgba(245, 158, 11, 0.16); color: var(--eb-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.eb-kpi-icon-green { background: rgba(32, 206, 140, 0.16); color: var(--eb-success); border: 1px solid rgba(32, 206, 140, 0.3); }

.eb-kpi-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.eb-kpi-val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.eb-kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.eb-kpi-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.eb-kpi-trend {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--eb-success);
}

.eb-kpi-lbl {
  font-size: 0.78rem;
  color: var(--eb-muted);
  white-space: nowrap;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   ROW 3: THREE-PANEL OPERATIONAL SECTION
   -------------------------------------------------------------------------- */

.eb-row-operations {
  display: grid;
  grid-template-columns: minmax(0, 4.2fr) minmax(0, 2.8fr) minmax(0, 3fr);
  gap: 16px;
  width: 100%;
}

.eb-op-card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-card-radius);
  padding: 18px 20px;
  min-height: 295px;
  display: flex;
  flex-direction: column;
}

.eb-op-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.eb-op-title-wrap {
  display: flex;
  flex-direction: column;
}

.eb-op-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.eb-op-subtitle {
  font-size: 0.75rem;
  color: var(--eb-muted);
}

.eb-op-select {
  background: #111a29;
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-control-radius);
  color: var(--eb-text);
  font-size: 0.74rem;
  font-family: inherit;
  padding: 4px 8px;
  cursor: pointer;
}

/* Chart Panel */
.eb-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  font-size: 0.72rem;
  color: var(--eb-muted);
}

.eb-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eb-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.eb-chart-wrapper {
  position: relative;
  width: 100%;
  height: 215px;
}

/* Recent Activity Panel */
.eb-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 220px;
}

.eb-activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--eb-control-radius);
  background: rgba(0, 0, 0, 0.15);
  transition: all 0.15s ease;
}

.eb-activity-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.eb-activity-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.eb-activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.eb-activity-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.eb-activity-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-activity-detail {
  font-size: 0.68rem;
  color: var(--eb-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-activity-time {
  font-size: 0.68rem;
  color: var(--eb-text-dim);
  white-space: nowrap;
}

/* Empty state for Recent Activity */
.eb-activity-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  text-align: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--eb-card-radius);
  color: var(--eb-muted);
}
.eb-activity-empty-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
  opacity: 0.8;
}
.eb-activity-empty-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}
.eb-activity-empty-desc {
  font-size: 0.74rem;
  color: var(--eb-muted);
  line-height: 1.4;
  max-width: 220px;
}

/* Quick Actions 2-Column Grid */
.eb-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.eb-quick-action-btn {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-control-radius);
  padding: 10px 12px;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--eb-text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.eb-quick-action-btn:hover {
  background: var(--eb-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.eb-action-icon-tile {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   ROW 4: YOUR MODULES COMPACT CARDS SECTION
   -------------------------------------------------------------------------- */

.eb-modules-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.eb-modules-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.eb-modules-title-wrap {
  display: flex;
  flex-direction: column;
}

.eb-modules-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.eb-modules-subtitle {
  font-size: 0.82rem;
  color: var(--eb-muted);
}

.eb-modules-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Filter Pills */
.eb-filter-pill-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--eb-border);
}

.eb-filter-pill {
  background: transparent;
  border: none;
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--eb-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-filter-pill.active {
  background: var(--eb-primary);
  color: #fff;
}

.eb-filter-pill:hover:not(.active) {
  color: #fff;
}

.eb-modules-search-input {
  height: 34px;
  background: #111a29;
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-control-radius);
  padding: 4px 12px;
  color: var(--eb-text);
  font-size: 0.78rem;
  font-family: inherit;
  width: 180px;
}

.eb-modules-search-input:focus {
  outline: none;
  border-color: var(--eb-primary);
}

.eb-view-toggle-btn {
  background: #111a29;
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-control-radius);
  color: var(--eb-muted);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
}

.eb-view-toggle-btn.active {
  background: var(--eb-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Module Grid Layout (6 cards per row on wide screens) */
.eb-modules-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  width: 100%;
}

.eb-module-card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-card-radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 135px;
  transition: all 0.18s ease;
}

.eb-module-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.eb-module-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.eb-module-icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.eb-module-title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.eb-module-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.eb-module-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-module-desc {
  font-size: 0.72rem;
  color: var(--eb-muted);
  line-height: 1.35;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eb-module-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--eb-border-subtle);
}

.eb-module-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.eb-module-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.eb-module-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #27364d;
  transition: 0.2s;
  border-radius: 20px;
}

.eb-module-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.eb-module-switch input:checked + .eb-module-slider {
  background-color: var(--eb-primary);
}

.eb-module-switch input:checked + .eb-module-slider:before {
  transform: translateX(16px);
}

html[dir="rtl"] .eb-module-switch input:checked + .eb-module-slider:before {
  transform: translateX(-16px);
}

.eb-module-config-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--eb-text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eb-module-config-btn:hover {
  background: var(--eb-hover);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* --------------------------------------------------------------------------
   ROW 5: COMPACT BOTTOM ROW (STATUS, USAGE, HELPFUL LINKS)
   -------------------------------------------------------------------------- */

.eb-row-bottom {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: 16px;
  width: 100%;
}

.eb-bottom-card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-card-radius);
  padding: 18px 20px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.eb-bottom-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.eb-bottom-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.eb-status-uptime-badge {
  font-size: 0.75rem;
  color: var(--eb-success);
  font-weight: 700;
  background: rgba(32, 206, 140, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(32, 206, 140, 0.25);
}

.eb-status-banner {
  background: rgba(32, 206, 140, 0.08);
  border: 1px solid rgba(32, 206, 140, 0.25);
  border-radius: var(--eb-control-radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 12px 0;
}

.eb-status-text-row {
  display: flex;
  flex-direction: column;
}

.eb-status-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--eb-success);
}

.eb-status-sub {
  font-size: 0.72rem;
  color: var(--eb-muted);
  margin-top: 2px;
}

.eb-bottom-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.eb-bottom-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--eb-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.eb-bottom-link:hover {
  color: #6d85ff;
  text-decoration: underline;
}

.eb-badge-purple-sm {
  background: rgba(121, 85, 232, 0.18);
  color: #bfa3ff;
  border: 1px solid rgba(121, 85, 232, 0.35);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Resource Usage Bars */
.eb-usage-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.eb-usage-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eb-usage-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
}

.eb-usage-label {
  color: var(--eb-text-secondary);
}

.eb-usage-nums {
  color: #fff;
  font-weight: 700;
}

.eb-progress-track {
  width: 100%;
  height: 7px;
  background: #0c1422;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 4px;
}

.eb-progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease;
}

.eb-progress-blue { background: var(--eb-primary); }
.eb-progress-purple { background: var(--eb-purple); }
.eb-progress-teal { background: var(--eb-cyan); }
.eb-progress-green { background: var(--eb-success); }

/* Helpful Links 2x2 Grid */
.eb-helpful-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.eb-helpful-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-control-radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--eb-text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.eb-helpful-item:hover {
  background: var(--eb-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.eb-helpful-icon {
  font-size: 1.15rem;
}

/* --------------------------------------------------------------------------
   FOOTER COMPONENT (.eb-footer)
   -------------------------------------------------------------------------- */

.eb-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--eb-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--eb-text-dim);
}

.eb-footer-heart {
  color: var(--eb-danger);
}

/* ==========================================================================
   ARABIC RTL MIRRORING (html[dir="rtl"])
   ========================================================================== */

html[dir="rtl"] {
  --eb-font-family: 'Cairo', 'Inter', -apple-system, sans-serif;
}

html[dir="rtl"] .eb-sidebar {
  inset-inline-start: 0; /* Respects logical properties */
  border-inline-end: 1px solid var(--eb-border);
}

html[dir="rtl"] .eb-topbar {
  inset-inline-start: var(--eb-sidebar-width);
  inset-inline-end: 0;
}

html[dir="rtl"] .eb-main-viewport {
  margin-inline-start: var(--eb-sidebar-width);
}

/* Preserve direction of IDs, ratios, and numeric codes */
html[dir="rtl"] .eb-search-kbd,
html[dir="rtl"] .eb-mini-stat-val,
html[dir="rtl"] .eb-kpi-val,
html[dir="rtl"] .eb-usage-nums,
html[dir="rtl"] code {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (LAPTOP, TABLET, MOBILE)
   ========================================================================== */

@media (max-width: 1360px) {
  .eb-modules-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .eb-row-operations {
    grid-template-columns: 1fr 1fr;
  }
  .eb-row-operations > .eb-op-card:nth-child(3) {
    grid-column: span 2;
  }
}

@media (max-width: 1024px) {
  .eb-row-hero {
    grid-template-columns: 1fr;
  }
  .eb-hero-left {
    max-width: 100%;
  }
  .eb-hero-right {
    display: none;
  }
  .eb-kpi-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .eb-row-operations {
    grid-template-columns: 1fr;
  }
  .eb-row-operations > .eb-op-card:nth-child(3) {
    grid-column: span 1;
  }
  .eb-modules-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .eb-row-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --eb-sidebar-width: 0px;
  }
  .eb-sidebar {
    transform: translateX(-100%);
    width: 260px;
  }
  html[dir="rtl"] .eb-sidebar {
    transform: translateX(100%);
  }
  .eb-sidebar.mobile-open {
    transform: translateX(0) !important;
  }
  .eb-topbar {
    inset-inline-start: 0;
    padding-inline: 14px !important;
  }
  .eb-main-viewport {
    margin-inline-start: 0;
    padding: 14px;
  }
  .eb-hero-banner {
    padding: 22px 18px !important;
    min-height: auto !important;
  }
  .eb-hero-artwork-bg {
    width: 100% !important;
    max-width: none !important;
    opacity: 0.16 !important;
    background-position: center !important;
    z-index: 1 !important;
  }
  .eb-hero-left {
    max-width: 100% !important;
    width: 100% !important;
    z-index: 2 !important;
  }
  .eb-hero-tags {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .eb-kpi-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .eb-kpi-strip > .eb-kpi-card:last-child {
    grid-column: span 2 !important;
  }
  .eb-modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .eb-modules-controls {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .eb-filter-pill-group {
    width: 100% !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    justify-content: flex-start !important;
  }
  .eb-modules-controls > div {
    width: 100% !important;
    flex-wrap: wrap !important;
  }
  .eb-modules-search-input {
    flex: 1 1 110px !important;
    width: auto !important;
    min-width: 0 !important;
  }
}

@media (max-width: 768px) {
  .eb-search-kbd,
  .eb-global-search-box {
    display: none !important;
  }
  .eb-topbar-btn[title="Documentation"] {
    display: none !important;
  }
  .eb-user-meta {
    display: none !important;
  }
  .eb-user-profile-pill {
    padding: 2px !important;
    background: transparent !important;
    border: none !important;
  }
  .eb-chevron-icon {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .eb-global-search-box {
    display: none !important;
  }
  .eb-topbar-btn[title="Documentation"],
  .eb-topbar-btn[title="Toggle Theme"] {
    display: none !important;
  }
  .eb-topbar {
    padding-inline: 14px !important;
  }
  .eb-hero-title {
    font-size: 1.45rem !important;
  }
  .eb-hero-subtitle {
    font-size: 0.85rem !important;
  }
  .eb-hero-ctas {
    flex-direction: column !important;
    width: 100% !important;
  }
  .eb-hero-ctas .eb-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .eb-kpi-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .eb-kpi-strip > .eb-kpi-card:last-child {
    grid-column: span 2 !important;
  }
  .eb-modules-grid {
    grid-template-columns: 1fr !important;
  }
  .eb-quick-actions-grid {
    grid-template-columns: 1fr !important;
  }
  .eb-helpful-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   LEGACY ADAPTERS & BINDINGS FOR EXISTING SIDEBAR & MAIN VIEWPORT
   ========================================================================== */

body.landing-mode .eb-topbar,
body.landing-mode .sidebar,
body.landing-mode .eb-sidebar {
  display: none !important;
}

body.dashboard-mode .sidebar {
  width: var(--eb-sidebar-width, 236px) !important;
  background: var(--eb-sidebar, #101a2b) !important;
  border-inline-end: 1px solid var(--eb-border, #1f2d42) !important;
  display: flex !important;
  flex-direction: column !important;
}

.sidebar .sidebar-brand-header {
  height: var(--eb-topbar-height, 58px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 6px 16px !important;
  border-bottom: 1px solid var(--eb-border, #1f2d42) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.sidebar-brand-link-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  height: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.sidebar-brand-logo-slot {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  height: 44px !important;
  max-height: 46px !important;
  max-width: 100% !important;
  flex-shrink: 0 !important;
}

.sidebar-brand-logo-slot img,
.sidebar-brand-logo-slot .site-identity-logo-img {
  height: 44px !important;
  max-height: 46px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)) !important;
  transition: transform 0.2s ease !important;
}

.sidebar-brand-logo-slot img:hover,
.sidebar-brand-logo-slot .site-identity-logo-img:hover {
  transform: scale(1.03) !important;
}

.sidebar .server-workspace-switcher {
  background: #0d1624 !important;
  border: 1px solid var(--eb-border, #1f2d42) !important;
  border-radius: 10px !important;
  margin: 10px 10px !important;
  padding: 8px 10px !important;
  transition: all 0.2s ease !important;
}

.sidebar .server-workspace-switcher:hover {
  background: #131e30 !important;
  border-color: rgba(73, 103, 255, 0.4) !important;
}

.sidebar .sidebar-search-box {
  margin: 6px 10px 12px 10px !important;
  background: #0d1522 !important;
  border: 1px solid var(--eb-border, #1f2d42) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
}

.sidebar .nav-group-header {
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  color: var(--eb-muted, #7e90aa) !important;
  letter-spacing: 0.06em !important;
  padding: 6px 12px 4px 12px !important;
  border-radius: 6px !important;
}

.sidebar .nav-item {
  border-radius: var(--eb-control-radius, 8px) !important;
  color: var(--eb-text-secondary, #9fb0c9) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  margin: 2px 8px !important;
  transition: all 0.15s ease !important;
}

.sidebar .nav-item:hover {
  background: var(--eb-hover, #172439) !important;
  color: #ffffff !important;
}

.sidebar .nav-item.active {
  background: var(--eb-primary, #4967ff) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(73, 103, 255, 0.35) !important;
}

.sidebar .nav-item.active .nav-icon {
  color: #ffffff !important;
}

#dashboard-nav-toggle {
  display: none !important;
}

.mobile-app-header {
  display: none !important;
}

.dashboard-language-bar {
  display: none !important;
}

body.dashboard-mode .main-content {
  margin-inline-start: var(--eb-sidebar-width, 236px) !important;
  margin-inline-end: 0 !important;
  margin-top: var(--eb-topbar-height, 58px) !important;
  padding: 20px 24px 40px 24px !important;
  background: var(--eb-bg, #0b111d) !important;
  min-height: calc(100vh - var(--eb-topbar-height, 58px)) !important;
}

html[dir="rtl"] body.dashboard-mode .main-content {
  margin-right: var(--eb-sidebar-width, 236px) !important;
  margin-left: 0 !important;
}

html[dir="ltr"] body.dashboard-mode .main-content {
  margin-left: var(--eb-sidebar-width, 236px) !important;
  margin-right: 0 !important;
}

@media (max-width: 900px) {
  :root {
    --eb-sidebar-width: 0px !important;
    --sidebar-width: 0px !important;
    --mui-sidebar-w: 0px !important;
  }
  html[dir="rtl"] body:not(.landing-mode) .main-content,
  html[dir="rtl"] body.dashboard-mode .main-content,
  html[dir="ltr"] body:not(.landing-mode) .main-content,
  html[dir="ltr"] body.dashboard-mode .main-content,
  body:not(.landing-mode) .main-content,
  body.dashboard-mode .main-content,
  .eb-main-viewport {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 14px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  .eb-topbar {
    inset-inline-start: 0 !important;
    inset-inline-end: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }
  .sidebar,
  .eb-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    width: 260px !important;
    max-width: 80vw !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  html[dir="rtl"] .sidebar,
  html[dir="rtl"] .eb-sidebar {
    transform: translateX(100%) !important;
    right: 0 !important;
    left: auto !important;
  }
  html[dir="ltr"] .sidebar,
  html[dir="ltr"] .eb-sidebar {
    left: 0 !important;
    right: auto !important;
  }
  body.mobile-drawer-open .sidebar,
  body.mobile-drawer-open .eb-sidebar,
  .sidebar.mobile-open,
  .eb-sidebar.mobile-open {
    transform: translateX(0) !important;
  }
}

/* ==========================================================================
   NOTIFICATIONS READ STATE
   ========================================================================== */
.eb-notif-item.is-read {
  opacity: 0.55;
}

/* ==========================================================================
   LIGHT THEME OVERRIDES (html[data-theme="light"])
   Signature Modern Clean Light Mode with Crisp High Contrast
   ========================================================================== */
html[data-theme="light"] {
  --eb-bg: #f4f6fa;
  --eb-sidebar: #ffffff;
  --eb-topbar: #ffffff;
  --eb-surface: #ffffff;
  --eb-surface-raised: #f8fafc;
  --eb-surface-glass: rgba(255, 255, 255, 0.95);
  --eb-hover: #eef2f8;
  --eb-hover-light: rgba(0, 0, 0, 0.04);

  --eb-border: #e2e8f0;
  --eb-border-subtle: rgba(0, 0, 0, 0.06);
  --eb-border-focus: #4967ff;

  --eb-text: #0f172a;
  --eb-text-secondary: #334155;
  --eb-muted: #64748b;
  --eb-text-dim: #94a3b8;
}

html[data-theme="light"] body.dashboard-mode {
  background-color: var(--eb-bg) !important;
  color: var(--eb-text) !important;
}

html[data-theme="light"] .eb-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--eb-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .eb-topbar-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

html[data-theme="light"] .eb-topbar-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .eb-user-profile-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

html[data-theme="light"] .eb-user-profile-pill:hover {
  background: #e2e8f0;
}

html[data-theme="light"] .eb-user-name {
  color: #0f172a;
}

html[data-theme="light"] .eb-dropdown-menu {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .eb-dropdown-username {
  color: #0f172a;
}

html[data-theme="light"] .eb-dropdown-role-badge {
  background: rgba(73, 103, 255, 0.1);
  border-color: rgba(73, 103, 255, 0.25);
  color: #4967ff;
}

html[data-theme="light"] .eb-dropdown-lang-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .eb-dropdown-lang-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

html[data-theme="light"] .eb-dropdown-lang-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

html[data-theme="light"] .eb-dropdown-lang-btn.active {
  background: rgba(73, 103, 255, 0.12);
  border-color: var(--eb-primary);
  color: var(--eb-primary);
  font-weight: 800;
  box-shadow: 0 0 8px rgba(73, 103, 255, 0.2);
}

html[data-theme="light"] .eb-dropdown-item {
  color: #475569;
}

html[data-theme="light"] .eb-dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .eb-dropdown-divider {
  background: #e2e8f0;
}

html[data-theme="light"] .eb-notif-title,
html[data-theme="light"] .eb-help-header,
html[data-theme="light"] .eb-notif-item-title {
  color: #0f172a;
}

html[data-theme="light"] .eb-notif-item {
  background: #f8fafc;
  border: 1px solid #eef2f6;
}

html[data-theme="light"] .eb-notif-item:hover {
  background: #f1f5f9;
}

html[data-theme="light"] .eb-global-search-box {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

html[data-theme="light"] .eb-global-search-input {
  color: #0f172a;
}

html[data-theme="light"] .eb-search-kbd {
  background: #e2e8f0;
  color: #64748b;
  border-color: #cbd5e1;
}

html[data-theme="light"] .eb-sidebar {
  background: #ffffff;
  border-inline-end: 1px solid #e2e8f0;
}

html[data-theme="light"] .eb-nav-item {
  color: #475569;
}

html[data-theme="light"] .eb-nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .eb-nav-item.active {
  background: rgba(73, 103, 255, 0.1);
  color: var(--eb-primary);
}

html[data-theme="light"] .eb-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .eb-metric-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .eb-metric-value,
html[data-theme="light"] .eb-card-title,
html[data-theme="light"] .eb-hero-title,
html[data-theme="light"] .eb-module-card-title {
  color: #0f172a;
}

html[data-theme="light"] .eb-hero-banner {
  background: linear-gradient(135deg, rgba(73, 103, 255, 0.08) 0%, #ffffff 100%);
  border-color: #e2e8f0;
}

html[data-theme="light"] .eb-module-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .eb-module-card:hover {
  border-color: rgba(73, 103, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .eb-activity-item {
  background: #f8fafc;
  border: 1px solid #eef2f6;
}

html[data-theme="light"] .eb-activity-item:hover {
  background: #f1f5f9;
}

html[data-theme="light"] .eb-activity-text {
  color: #0f172a;
}

html[data-theme="light"] .eb-quick-action-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #334155;
}

html[data-theme="light"] .eb-quick-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ==========================================================================
   BOT PROFILE & IDENTITY SECTION STYLING (REDESIGN 3.0)
   ========================================================================== */
#tab-bot-identity,
#tab-bot-languages,
#tab-analytics {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#tab-bot-identity .card,
#tab-bot-languages .card,
#tab-bot-languages .bot-msg-action-bar,
#tab-analytics .card {
  background: var(--eb-surface, #121d2e) !important;
  border: 1px solid var(--eb-border, #1c2b42) !important;
  border-radius: var(--eb-card-radius, 12px) !important;
  color: var(--eb-text, #f5f7fc);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

#tab-bot-identity .form-control,
#tab-bot-languages .form-control {
  background: #0d1522 !important;
  border: 1px solid var(--eb-border, #1c2b42) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

#tab-bot-identity .form-control:focus,
#tab-bot-languages .form-control:focus {
  border-color: var(--eb-primary, #4967ff) !important;
  box-shadow: 0 0 0 3px rgba(73, 103, 255, 0.25) !important;
  outline: none;
}

.bot-profile-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(300px, 0.8fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .bot-profile-layout {
    grid-template-columns: 1fr;
  }
}


