/* ==========================================================================
   AntiThreat Discord Security Bot — Ultra-Modern Discord Dashboard Stylesheet
   ========================================================================== */

:root {
  /* Discord & Security Core Palette */
  --discord-blurple: #5865F2;
  --discord-blurple-hover: #4752C4;
  --discord-blurple-glow: rgba(88, 101, 242, 0.35);
  --discord-green: #57F287;
  --discord-yellow: #FEE75C;
  --discord-fuchsia: #EB459E;
  --discord-red: #ED4245;

  /* Theme Surfaces (Deep Obsidian & Slate Glass) */
  --bg-base: #07090e;
  --bg-canvas: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #162032;
  --bg-surface-hover: #1e2c45;
  --bg-surface-active: #253654;
  --bg-glass: rgba(17, 24, 39, 0.85);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(88, 101, 242, 0.45);
  --border-focus: #5865F2;

  /* Text & Typography */
  --text-main: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-faint: #6b7280;

  /* Status & Severity Accents */
  --primary: #10b981;
  --primary-glow: rgba(16, 185, 129, 0.28);
  --primary-dark: #059669;
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.25);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.28);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.28);

  /* Dimensions & Geometry */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Fonts */
  --font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

html[dir="ltr"] {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & Global Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 0% 0%, rgba(88, 101, 242, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.07) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.04) 0px, transparent 70%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Discord-styled Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--discord-blurple);
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--discord-blurple), var(--primary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.3rem;
  box-shadow: 0 0 20px var(--discord-blurple-glow);
  transition: var(--transition-bounce);
}

.nav-brand:hover .brand-icon {
  transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 0 25px rgba(88, 101, 242, 0.55);
}

.brand-title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 40%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  margin-inline-start: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 6px var(--primary)); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-lang {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.btn-lang:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

html[dir="rtl"] .user-badge {
  padding: 0.35rem 0.45rem 0.35rem 0.85rem;
}

.user-badge:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--discord-blurple);
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  transform: scale(1.1);
}

/* ==========================================================================
   Container & Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.75rem 4rem 1.75rem;
  flex: 1;
}

/* ==========================================================================
   Hero Landing Page (Discord Style)
   ========================================================================== */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 1rem 3rem 1rem;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.hero-shield-wrap {
  position: relative;
  margin-bottom: 2rem;
}

.hero-shield {
  font-size: 5rem;
  filter: drop-shadow(0 0 35px var(--discord-blurple-glow));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.35);
  color: #c7d2fe;
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 2.75rem;
}

.btn-discord-login {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--discord-blurple);
  color: #fff;
  padding: 0.95rem 2.5rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 30px var(--discord-blurple-glow);
  transition: var(--transition-bounce);
  border: none;
  cursor: pointer;
}

.btn-discord-login:hover {
  background: var(--discord-blurple-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 40px rgba(88, 101, 242, 0.6);
}

.hero-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-top: 4.5rem;
  width: 100%;
  text-align: start;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--discord-blurple), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 35px -10px rgba(0, 0, 0, 0.5);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-subtle);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Server Selection Grid (Server Hub)
   ========================================================================== */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 500px;
}

.search-icon-prefix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 1rem;
  pointer-events: none;
}

html[dir="rtl"] .search-icon-prefix { right: 1.25rem; }
html[dir="ltr"] .search-icon-prefix { left: 1.25rem; }

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.25rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

html[dir="rtl"] .search-input { padding-right: 2.75rem; }
html[dir="ltr"] .search-input { padding-left: 2.75rem; }

.search-input:focus {
  border-color: var(--discord-blurple);
  background: var(--bg-surface-elevated);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.25);
}

.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

.server-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.server-card.installed::before {
  opacity: 1;
}

.server-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.server-card-top {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.4rem;
}

.server-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-muted);
  flex-shrink: 0;
  border: 2px solid var(--border-subtle);
  transition: var(--transition);
}

.server-card:hover .server-icon {
  border-color: var(--discord-blurple);
  transform: scale(1.04);
}

.server-info {
  flex: 1;
  overflow: hidden;
}

.server-name {
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.server-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.role-badge {
  background: rgba(88, 101, 242, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(88, 101, 242, 0.3);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-xs);
  font-weight: 700;
  font-size: 0.75rem;
}

.server-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.4rem;
  width: fit-content;
}

.server-status-pill.installed {
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.server-status-pill.uninstalled {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-card-action {
  margin-top: auto;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-card-action.configure {
  background: var(--discord-blurple);
  color: #fff;
  box-shadow: 0 4px 15px var(--discord-blurple-glow);
}

.btn-card-action.configure:hover {
  background: var(--discord-blurple-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.55);
}

.btn-card-action.invite {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-card-action.invite:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   Server Group Divider
   ========================================================================== */
.server-divider {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 3.5rem 0 2rem 0;
}

.server-divider::before,
.server-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.server-divider-title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 800;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 1.4rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Discord Server View (Sidebar + Content Layout)
   ========================================================================== */
.guild-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guild-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Mobile Toggle Bar */
.mobile-sidebar-toggle-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
}

.btn-toggle-sidebar {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Sidebar Styles (Independent Sticky Dock) */
.guild-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 5.5rem;
  height: calc(100vh - 7rem);
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.guild-sidebar::-webkit-scrollbar {
  width: 5px;
}

.guild-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.sidebar-header-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-guild-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-guild-avatar-wrap {
  position: relative;
}

.sidebar-guild-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--discord-blurple);
}

.sidebar-guild-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--text-muted);
  border: 2px solid var(--discord-blurple);
}

.sidebar-guild-meta {
  flex: 1;
  overflow: hidden;
}

.sidebar-guild-name {
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.sidebar-guild-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-switch-server {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-switch-server:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  color: var(--text-main);
}

/* Sidebar Navigation Items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-category {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-category-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 0 0.5rem 0.35rem 0.5rem;
}

.sidebar-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.sidebar-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.sidebar-item.active {
  background: var(--discord-blurple);
  color: #fff;
  box-shadow: 0 4px 15px var(--discord-blurple-glow);
}

.sidebar-item-icon {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
}

.sidebar-item-label {
  flex: 1;
}

.sidebar-item-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.sidebar-item.active .sidebar-item-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Guild Main Content & Server Hero Banner
   ========================================================================== */
.guild-main-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
}

/* Breadcrumb */
.guild-top-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.breadcrumb-link {
  color: var(--discord-blurple);
  cursor: pointer;
  transition: var(--transition);
}

.breadcrumb-link:hover {
  text-decoration: underline;
  color: #fff;
}

.breadcrumb-sep {
  color: var(--text-faint);
}

.breadcrumb-current {
  color: var(--text-secondary);
}

.breadcrumb-tab {
  color: var(--text-main);
  font-weight: 800;
}

/* Hero Banner */
.guild-hero-banner {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%), var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.guild-hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--discord-blurple-glow) 0%, transparent 70%);
  pointer-events: none;
}

.guild-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.guild-hero-identity {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.guild-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 3px solid var(--discord-blurple);
  box-shadow: 0 0 20px var(--discord-blurple-glow);
}

.guild-hero-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
}

.guild-hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guild-hero-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.guild-hero-name {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}

.guild-health-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 800;
}

.guild-health-pill.optimal {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.guild-health-pill.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.guild-health-pill.critical {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.guild-hero-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-copy-id {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.btn-copy-id:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  color: #fff;
}

.meta-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

/* Quick Stats Row inside Hero Banner */
.guild-quick-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}

.quick-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.quick-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.quick-stat-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
}

.quick-stat-val.action-BAN { color: #f87171; }
.quick-stat-val.action-SOFTBAN { color: #6ee7b7; }
.quick-stat-val.cross-OFF { color: var(--text-muted); }
.quick-stat-val.cross-TIMEOUT { color: #fde047; }
.quick-stat-val.cross-BAN { color: #f87171; }
.quick-stat-val.text-threats { color: #38bdf8; }
.quick-stat-val.text-optimal { color: var(--primary); }
.quick-stat-val.text-warning { color: var(--warning); }
.quick-stat-val.text-critical { color: var(--danger); }

/* ==========================================================================
   Tab Panel Cards & Controls
   ========================================================================== */
.tab-panel-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-light);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: #fff;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Radio Selection Options (Ban vs Softban, Thresholds, etc.) */
.radio-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.radio-card {
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
}

.radio-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.radio-card.selected {
  background: rgba(88, 101, 242, 0.12);
  border-color: var(--discord-blurple);
  box-shadow: 0 0 20px var(--discord-blurple-glow);
}

.radio-card.selected::after {
  content: '✓';
  position: absolute;
  top: 1rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--discord-blurple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

html[dir="rtl"] .radio-card.selected::after { left: 1rem; }
html[dir="ltr"] .radio-card.selected::after { right: 1rem; }

.radio-card h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.radio-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Form Toggles & Switches (Discord-like) */
.form-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.form-toggle-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.toggle-info h4 {
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.toggle-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  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: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  border-radius: var(--radius-full);
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #9ca3af;
  transition: var(--transition-bounce);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #ffffff;
}

/* Form Inputs & Selects */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.form-help {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.form-control {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.form-control:focus {
  border-color: var(--discord-blurple);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.25);
  background: var(--bg-surface-hover);
}

select.form-control {
  cursor: pointer;
}

/* Permissions Grid in Overview */
.perms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.perm-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.perm-badge {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
}

.perm-badge.ok {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.perm-badge.missing {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.warnings-box {
  margin-top: 1.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: #fbbf24;
  font-size: 0.9rem;
}

.warnings-box ul {
  margin-top: 0.5rem;
  margin-inline-start: 1.5rem;
}

.warnings-box li {
  margin-bottom: 0.3rem;
}

/* Allowlists Tags & Inputs */
.tag-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  min-height: 42px;
  padding: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.tag-chip:hover {
  border-color: var(--border-hover);
}

.btn-remove-tag {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition);
  padding: 0.1rem;
}

.btn-remove-tag:hover {
  color: var(--danger);
  transform: scale(1.2);
}

/* ==========================================================================
   Incident & Audit Log Tables
   ========================================================================== */
.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: 0.9rem;
}

th {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-surface-hover);
}

.severity-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.severity-CRITICAL {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.severity-HIGH {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.severity-MEDIUM {
  background: rgba(6, 182, 212, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.severity-LOW {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  max-width: 650px;
  width: 100%;
  padding: 2.25rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: var(--transition-bounce);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.modal-close {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.modal-row {
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.modal-row strong {
  color: #fff;
  display: inline-block;
  min-width: 140px;
}

.modal-row code {
  background: var(--bg-surface-elevated);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #38bdf8;
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Floating Save Changes Bar
   ========================================================================== */
.save-bar {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-hover);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 25px var(--discord-blurple-glow);
  padding: 1rem 1.75rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 2rem;
  z-index: 500;
  transition: var(--transition-bounce);
  max-width: 650px;
  width: calc(100% - 3rem);
}

.save-bar.visible {
  transform: translateX(-50%) translateY(0%);
}

.save-bar-text {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.save-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-primary {
  background: var(--discord-blurple);
  color: #fff;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px var(--discord-blurple-glow);
}

.btn-primary:hover {
  background: var(--discord-blurple-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  color: #fff;
  border-color: var(--border-hover);
}

/* ==========================================================================
   Toasts Hub
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

html[dir="rtl"] .toast-container {
  right: auto;
  left: 2rem;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.error {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .guild-layout {
    grid-template-columns: 1fr;
  }

  .mobile-sidebar-toggle-bar {
    display: flex;
  }

  .guild-sidebar {
    display: none;
    position: static;
  }

  .guild-sidebar.open {
    display: flex;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
  }

  .hero-title {
    font-size: 2.3rem;
  }

  .container {
    padding: 1.5rem 1rem 3rem 1rem;
  }

  .guild-hero-banner {
    padding: 1.5rem;
  }

  .save-bar {
    flex-direction: column;
    gap: 0.75rem;
    border-radius: var(--radius-lg);
    width: calc(100% - 2rem);
  }

  .save-bar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   Advanced Creative UI Components (Next-Gen Elements)
   ========================================================================== */

/* 1. Floating Back-to-Top Pill */
.btn-back-to-top {
  position: fixed;
  bottom: 2rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-hover);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--discord-blurple-glow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: var(--transition-bounce);
}

html[dir="rtl"] .btn-back-to-top {
  left: 2rem;
}

html[dir="ltr"] .btn-back-to-top {
  right: 2rem;
}

.btn-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  background: var(--discord-blurple);
  border-color: var(--discord-blurple);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.6);
}

/* 2. Interactive Range Slider with Live Tooltip Badge & Quick Presets */
.range-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1rem;
}

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

.range-slider-badge {
  background: var(--discord-blurple);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  box-shadow: 0 0 15px var(--discord-blurple-glow);
}

.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--discord-blurple), var(--accent));
  outline: none;
  transition: var(--transition);
  cursor: pointer;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--discord-blurple);
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.7);
  cursor: pointer;
  transition: var(--transition-bounce);
}

.range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px rgba(88, 101, 242, 1);
}

.range-presets-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-preset-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.btn-preset-chip:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.btn-preset-chip.active {
  background: rgba(88, 101, 242, 0.2);
  color: #c7d2fe;
  border-color: var(--discord-blurple);
  font-weight: 800;
}

/* 3. Live Security Radar Widget (Cyber Aesthetics) */
.security-radar-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%), var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* 3. Live Security Cyber Telemetry & Radar Widget ("البتاع اللي بيلف ومؤشرات السيطرة") */
.security-radar-card {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 55%),
              radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.08), transparent 55%),
              var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.1);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.security-radar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, #06b6d4, transparent);
}

.radar-scope-wrap {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  position: relative;
  border: 2px solid rgba(16, 185, 129, 0.5);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(6, 10, 18, 0.95) 75%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.3), inset 0 0 25px rgba(16, 185, 129, 0.15);
}

/* Outer orbital spinning calibrated notched ring */
.orbital-ring-outer {
  position: absolute;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  border: 2px dashed rgba(16, 185, 129, 0.45);
  animation: orbital-spin-cw 18s linear infinite;
  pointer-events: none;
}

/* Inner counter-rotating calibrated ring */
.orbital-ring-inner {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1px dotted rgba(6, 182, 212, 0.5);
  animation: orbital-spin-ccw 10s linear infinite;
  pointer-events: none;
}

/* Radar crosshair lines */
.radar-crosshair-x {
  position: absolute;
  width: 100%;
  height: 1px;
  background: rgba(16, 185, 129, 0.2);
  pointer-events: none;
}

.radar-crosshair-y {
  position: absolute;
  height: 100%;
  width: 1px;
  background: rgba(16, 185, 129, 0.2);
  pointer-events: none;
}

.radar-scope-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(16, 185, 129, 0.25);
  pointer-events: none;
}

.radar-scope-circle.c1 { width: 110px; height: 110px; }
.radar-scope-circle.c2 { width: 55px; height: 55px; }

/* Rotating sweeping radar scanner beam */
.radar-scanner-beam {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg at 50% 50%, rgba(16, 185, 129, 0.65) 0deg, transparent 75deg, transparent 360deg);
  animation: radar-sweep 2.8s linear infinite;
  pointer-events: none;
}

/* Pulsing radar target blips */
.radar-blip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #10b981;
  animation: blip-pulse 2.8s infinite ease-in-out;
  pointer-events: none;
}

.radar-blip.b1 { top: 32px; right: 38px; animation-delay: 0.4s; }
.radar-blip.b2 { bottom: 42px; left: 34px; animation-delay: 1.6s; }

@keyframes orbital-spin-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbital-spin-ccw {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes blip-pulse {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.4); box-shadow: 0 0 12px #34d399; }
}

.radar-center-shield {
  position: relative;
  z-index: 2;
  font-size: 2.2rem;
  filter: drop-shadow(0 0 14px var(--primary));
  animation: pulse-shield 2.2s infinite ease-in-out;
}

@keyframes pulse-shield {
  0% { transform: scale(0.94); }
  50% { transform: scale(1.08); }
  100% { transform: scale(0.94); }
}

.radar-details {
  flex: 1;
  min-width: 260px;
}

.radar-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--primary);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.radar-status-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.radar-status-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Real-Time Cyber Telemetry Grid */
.telemetry-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 1100px) {
  .telemetry-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .telemetry-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.telemetry-metric-card {
  background: rgba(10, 14, 23, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: var(--transition);
}

.telemetry-metric-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(10, 14, 23, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.telemetry-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.telemetry-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

.telemetry-card-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.telemetry-card-pill.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.telemetry-card-pill.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border-color: rgba(6, 182, 212, 0.3);
}

.telemetry-card-pill.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.telemetry-card-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
}

.telemetry-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.telemetry-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #10b981, #06b6d4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

/* System Diagnostics Stream Box */
.telemetry-diagnostics-box {
  margin-top: 1.5rem;
  background: rgba(6, 9, 15, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.diagnostics-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-secondary);
}

.diagnostics-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  flex-shrink: 0;
  animation: pulse-dot 1.5s infinite;
}

/* Country Flag Image Styling */
.icon-flag-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  margin-inline-end: 0.35rem;
}

.icon-flag {
  width: 22px;
  height: 15px;
  border-radius: 2.5px;
  vertical-align: middle;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  margin-inline-end: 0.35rem;
}

.btn-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* Navbar Active Server Badge & Switch Controls */
.nav-active-server-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-main);
  transition: var(--transition);
}

.nav-server-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-server-icon.placeholder {
  background: var(--discord-blurple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
}

.nav-server-name {
  font-weight: 700;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-server-role {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(88, 101, 242, 0.2);
  color: #c7d2fe;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.nav-server-members {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.btn-nav-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.35);
  color: #c7d2fe;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-inline-start: 0.25rem;
}

.btn-nav-switch:hover {
  background: var(--discord-blurple);
  border-color: var(--discord-blurple);
  color: #fff;
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.45);
}

/* 4. Cyber Forensics Modal Upgrades */
.forensics-modal-box {
  background: #0a0e17;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px var(--discord-blurple-glow);
}

.forensics-code-box {
  background: #06090e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #a5f3fc;
  max-height: 160px;
  overflow-y: auto;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.btn-copy-payload {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.btn-copy-payload:hover {
  background: var(--discord-blurple);
  border-color: var(--discord-blurple);
  transform: translateY(-1px);
}

/* 5. Animated Save Button with Spinner */
.btn-save-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-inline-end: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Custom Hand-Crafted Vector Icons (Discord Cyber Palette)
   ========================================================================== */
.custom-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 2;
  transition: var(--transition-bounce);
  display: inline-block;
  vertical-align: middle;
}

.sidebar-item:hover .custom-icon {
  transform: scale(1.15);
}

.sidebar-item.active .custom-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
}

.icon-overview {
  color: #38bdf8;
}

.icon-moderation {
  color: #34d399;
}

.icon-crossserver {
  color: #818cf8;
}

.icon-detection {
  color: #fbbf24;
}

.icon-channels {
  color: #c084fc;
}

.icon-allowlists {
  color: #2dd4bf;
}

.icon-incidents {
  color: #f87171;
  animation: pulse-icon 2s infinite ease-in-out;
}

@keyframes pulse-icon {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.6)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0)); }
}

.icon-audit {
  color: #94a3b8;
}

.icon-cat {
  width: 14px;
  height: 14px;
  margin-inline-end: 0.4rem;
  opacity: 0.75;
}

.icon-ban { color: #f87171; width: 26px; height: 26px; }
.icon-softban { color: #34d399; width: 26px; height: 26px; }
.icon-timeout { color: #fbbf24; width: 26px; height: 26px; }
.icon-off { color: #94a3b8; width: 26px; height: 26px; }

.radio-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-shield { color: var(--primary); }
.icon-bolt { color: #f59e0b; }
.icon-flask { color: #ec4899; }
.icon-search { color: var(--text-muted); }
.icon-check { color: #10b981; }
.icon-close { color: #ef4444; }
.icon-warning { color: #f59e0b; }
.icon-copy { color: var(--text-muted); }
.icon-user { color: #38bdf8; }
.icon-role { color: var(--discord-blurple); }
.icon-sparkles { color: #f59e0b; }
.icon-plus { color: #10b981; }
.icon-gear { color: var(--discord-blurple); }
.icon-menu { color: var(--text-main); }
.icon-logout { color: var(--text-muted); }

.hero-shield svg {
  width: 80px;
  height: 80px;
  color: var(--discord-blurple);
  filter: drop-shadow(0 0 25px var(--discord-blurple-glow));
}

.radar-center-shield svg {
  width: 36px;
  height: 36px;
  color: var(--primary);
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.6));
}

.btn-remove-tag svg {
  width: 12px;
  height: 12px;
}

.btn-card-action svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.btn-copy-id svg, .btn-copy-payload svg {
  width: 15px;
  height: 15px;
  vertical-align: middle;
}

.modal-header svg.icon-incidents {
  width: 32px;
  height: 32px;
  color: #ef4444;
}

.btn-logout svg {
  width: 14px;
  height: 14px;
}

/* Simplified Audit Log Diff Item */
.audit-diff-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface-elevated);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin: 0.15rem 0.25rem 0.15rem 0;
  font-size: 0.8rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.audit-diff-key {
  color: var(--text-muted);
  font-weight: 500;
}

.audit-diff-val {
  color: var(--text-main);
  font-weight: 700;
}

.badge-status-ok {
  color: #10b981;
  font-weight: 700;
}

.badge-status-off {
  color: #ef4444;
  font-weight: 700;
}

/* ==========================================================================
   Permissions Doctor Alert Banner (Red Warning)
   ========================================================================== */
.doctor-alert-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
  animation: pulse-red 2.5s infinite ease-in-out;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.15); }
  50% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.35); }
  100% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.15); }
}

.doctor-alert-icon {
  width: 36px;
  height: 36px;
  color: #ef4444;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doctor-alert-icon svg {
  width: 32px;
  height: 32px;
}

.doctor-alert-content {
  flex: 1;
}

.doctor-alert-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fca5a5;
  margin-bottom: 0.35rem;
}

.doctor-alert-msg {
  font-size: 0.9rem;
  color: #fecaca;
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.doctor-perms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.doctor-perm-badge {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fee2e2;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Panic Mode & Raid Shield Card
   ========================================================================== */
.panic-mode-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  position: relative;
  transition: var(--transition);
}

.panic-mode-card.active {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.25);
}

.panic-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.panic-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.panic-header-icon {
  color: #f87171;
  width: 28px;
  height: 28px;
}

.panic-title-wrap h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.panic-title-wrap p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.panic-conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.panic-condition-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--transition);
}

.panic-condition-box.enabled {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.panic-cond-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.panic-cond-header label {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  cursor: pointer;
}

.panic-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.panic-number-input {
  width: 90px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.panic-number-input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

.panic-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
  margin-top: 1rem;
}

/* ==========================================================================
   Security Analytics Chart (Cyber Native SVG)
   ========================================================================== */
.analytics-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.chart-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.chart-title-wrap p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chart-legend-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

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

.legend-dot.local { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.legend-dot.cross { background: #818cf8; box-shadow: 0 0 8px #818cf8; }

.svg-chart-container {
  width: 100%;
  height: 220px;
  position: relative;
  margin: 1rem 0;
}

.svg-chart-container svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Chart Category Breakdown Grid */
.chart-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.breakdown-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.breakdown-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.breakdown-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
}

/* Sound Toggle Button */
.btn-sound-toggle {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sound-toggle:hover {
  background: var(--bg-surface-hover);
  color: #fff;
  border-color: var(--border-hover);
}

.btn-sound-toggle.muted {
  color: #94a3b8;
  opacity: 0.6;
}

/* Timeframe Selector for Chart */
.chart-timeframe-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-elevated);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.chart-timeframe-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.chart-timeframe-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.chart-timeframe-btn.active {
  background: #38bdf8;
  color: #0b1120;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* Confirmation and Unsaved Changes Modal Styling */
.confirm-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
  text-align: center;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}

.confirm-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.confirm-modal-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.confirm-modal-icon.info {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.confirm-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.6rem;
}

.confirm-modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.confirm-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.confirm-modal-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}



