@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Dark Theme Tokens (Default) */
  --bg-primary: #090d16;
  --bg-secondary: rgba(13, 20, 35, 0.7);
  --bg-tertiary: rgba(22, 33, 56, 0.4);
  --glass-bg: rgba(15, 23, 42, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.2);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.2);
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  
  --sidebar-width: 260px;
  --topbar-height: 70px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  /* Light Theme Tokens */
  --bg-primary: #f1f5f9;
  --bg-secondary: rgba(255, 255, 255, 0.8);
  --bg-tertiary: rgba(226, 232, 240, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent-cyan: #0891b2;
  --accent-cyan-glow: rgba(8, 145, 178, 0.15);
  --accent-purple: #7c3aed;
  --accent-purple-glow: rgba(124, 58, 237, 0.15);
  --accent-pink: #db2777;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Glassmorphism helpers */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--glass-border-hover);
}

.glass-input {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 10px 14px;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}
[data-theme="light"] .glass-input {
  background: rgba(255, 255, 255, 0.5);
}
.glass-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.glass-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}
.glass-btn:hover {
  background: var(--glass-border);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}
.glass-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-color: transparent;
  color: #fff;
}
.glass-btn.accent-pink {
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.2);
  color: var(--accent-pink);
}
.glass-btn.accent-pink:hover {
  background: rgba(236, 72, 153, 0.2);
}

/* Background Gradients Glow Effects */
.bg-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}
.glow-1 { top: -100px; left: -100px; }
.glow-2 { bottom: -100px; right: -100px; background: radial-gradient(circle, var(--accent-purple-glow) 0%, transparent 70%); }

/* Application Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* Sidebar Navigation */
.app-sidebar {
  width: var(--sidebar-width);
  height: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(20px);
  z-index: 10;
  transition: var(--transition-smooth);
}
[data-theme="light"] .app-sidebar {
  background: rgba(241, 245, 249, 0.85);
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.sidebar-logo {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.menu-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 12px 10px 4px 10px;
  letter-spacing: 1px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}
.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
[data-theme="light"] .menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
.menu-item.active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15) 0%, transparent 100%);
  border-left: 3px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}
.menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 15px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  position: relative;
}
.user-avatar.online::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}
.user-info {
  flex: 1;
  min-width: 0;
}
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Topbar Header */
.app-topbar {
  height: var(--topbar-height);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgba(9, 13, 22, 0.45);
  backdrop-filter: blur(10px);
  z-index: 9;
}
[data-theme="light"] .app-topbar {
  background: rgba(255, 255, 255, 0.45);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.zone-title-container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.zone-badge {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  text-transform: uppercase;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.collab-indicators {
  display: flex;
  align-items: center;
  margin-right: 10px;
}
.collab-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-left: -8px;
  border: 2px solid var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}
.collab-avatar:hover {
  transform: translateY(-4px) scale(1.1);
  z-index: 5;
}
.collab-avatar-more {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.theme-toggle:hover {
  background: var(--glass-border);
  color: var(--text-primary);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--accent-emerald);
  font-weight: 500;
}
.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px var(--accent-emerald); }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.auth-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 20, 0.88);
  z-index: 10010;
  padding: 24px;
}

.auth-modal {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.auth-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-top: 8px;
}

/* Zone Content Viewport */
.zone-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  position: relative;
}

.zone-section {
  display: none;
  animation: fadeIn 0.4s ease-in-out forwards;
  height: 100%;
}
.zone-section.active {
  display: flex;
  flex-direction: column;
}

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

/* Global Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.grid-equal-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.flex-column-gap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 1. CENTRAL PLAZA */
.plaza-hero {
  padding: 24px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.plaza-welcome h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.plaza-welcome p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.plaza-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.stat-info .stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-info .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.campus-map-container {
  height: 440px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
  perspective: 1200px;
}
[data-theme="light"] .campus-map-container {
  background: radial-gradient(circle at center, #f8fafc 0%, #cbd5e1 100%);
}

.interactive-map {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotateX(60deg) rotateY(0deg) rotateZ(-45deg);
  transform-style: preserve-3d;
  display: block;
}
.map-building {
  position: absolute;
  width: 110px;
  height: 80px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--glass-border);
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  transform-style: preserve-3d;
  transform: rotateZ(45deg) rotateX(-60deg) translateZ(0px);
  text-align: center;
}
[data-theme="light"] .map-building {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.map-building:hover {
  transform: rotateZ(45deg) rotateX(-60deg) translateZ(15px) scale(1.05);
  border-color: var(--accent-cyan);
  box-shadow: 0 15px 25px rgba(6, 182, 212, 0.3);
}
/* Active building marker highlight */
.map-building.active {
  border-color: var(--accent-amber);
  box-shadow: 0 12px 20px rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(15, 23, 42, 0.8));
}
[data-theme="light"] .map-building.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.95));
}

/* Building border cues */
.map-building.plaza { border-color: rgba(245, 158, 11, 0.4); }
.map-building.community-square { border-color: rgba(6, 182, 212, 0.3); }
.map-building.comm-center { border-color: rgba(6, 182, 212, 0.4); }
.map-building.code-arena { border-color: rgba(139, 92, 246, 0.4); }
.map-building.notebooks { border-color: rgba(16, 185, 129, 0.4); }
.map-building.project-rooms { border-color: rgba(236, 72, 153, 0.3); }
.map-building.pm-center { border-color: rgba(16, 185, 129, 0.4); }
.map-building.library { border-color: rgba(139, 92, 246, 0.4); }
.map-building.conference { border-color: rgba(236, 72, 153, 0.4); }
.map-building.lab { border-color: rgba(245, 158, 11, 0.4); }
.map-building.locker-room { border-color: rgba(236, 72, 153, 0.3); }
.map-building.personal-library { border-color: rgba(6, 182, 212, 0.3); }

/* Building coordinates layout */
.map-building.plaza { top: 40%; left: 40%; }
.map-building.community-square { top: 22%; left: 12%; }
.map-building.comm-center { top: 8%; left: 40%; }
.map-building.code-arena { top: 12%; left: 68%; }
.map-building.notebooks { top: 45%; left: 12%; }
.map-building.project-rooms { top: 40%; left: 68%; }
.map-building.pm-center { top: 68%; left: 68%; }
.map-building.library { top: 72%; left: 40%; }
.map-building.conference { top: 68%; left: 12%; }
.map-building.lab { top: 10%; left: 12%; }
.map-building.locker-room { top: 88%; left: 12%; }
.map-building.personal-library { top: 88%; left: 68%; }

.map-building .map-badge {
  font-size: 0.6rem;
  background: var(--accent-pink);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
  margin-top: 2px;
}
.map-presence-container {
  display: flex;
  gap: 3px;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  min-height: 16px;
}
.map-presence-bubble {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.55rem;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  animation: presenceFloat 1.8s ease-in-out infinite alternate;
}
.map-presence-bubble:nth-child(2n) { animation-delay: 0.4s; }
.map-presence-bubble:nth-child(3n) { animation-delay: 0.8s; }

@keyframes presenceFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

.plaza-feed-announcements {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.announcement-box {
  padding: 16px;
  border-left: 4px solid var(--accent-cyan);
}
.announcement-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* 2. COMMUNITY SQUARE */
.feed-composer {
  padding: 20px;
  margin-bottom: 24px;
}
.composer-textarea {
  width: 100%;
  min-height: 80px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  outline: none;
  resize: none;
  font-size: 1rem;
  font-family: var(--font-sans);
}
.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--glass-border);
}
.feed-post {
  padding: 20px;
  margin-bottom: 16px;
}
.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.post-body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.post-poll {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 16px;
}
.poll-option {
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  margin-top: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}
.poll-option:hover {
  background: var(--glass-border);
}
.poll-option-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent-cyan-glow);
  z-index: 0;
  transition: width 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
}
.poll-option-text {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
}
.post-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}
.post-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}
.post-action-btn:hover {
  color: var(--accent-cyan);
}
.post-action-btn.liked {
  color: var(--accent-pink);
}

/* Achievements Panel */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.achievement-badge-card {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
}
.badge-gold { border-color: rgba(245, 158, 11, 0.4); }
.badge-silver { border-color: rgba(148, 163, 184, 0.4); }
.badge-cyan { border-color: rgba(6, 182, 212, 0.4); }

/* 3. COMMUNICATION CENTER */
.comm-panel {
  display: flex;
  height: calc(100vh - var(--topbar-height) - 60px);
  overflow: hidden;
}
.comm-sidebar {
  width: 250px;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
}
.comm-sidebar-header {
  padding: 15px;
  border-bottom: 1px solid var(--glass-border);
}
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.chat-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-bottom: 4px;
}
.chat-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.chat-list-item.active {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--accent-cyan);
}
.chat-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.chat-item-preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.1);
}
.chat-window-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 70%;
}
.chat-message.self {
  margin-left: auto;
  flex-direction: row-reverse;
}
.message-bubble {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  padding: 12px 16px;
  border-radius: 12px;
  border-top-left-radius: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}
.chat-message.self .message-bubble {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: white;
  border-color: transparent;
  border-top-left-radius: 12px;
  border-top-right-radius: 0;
}
.message-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.chat-message.self .message-meta {
  justify-content: flex-end;
  color: rgba(255, 255, 255, 0.7);
}

.chat-input-bar {
  padding: 15px 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.voice-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}
.voice-bar {
  width: 2px;
  background: var(--accent-cyan);
  border-radius: 1px;
}

/* 4. CODING ARENA */
.code-panel {
  display: grid;
  grid-template-columns: 200px 1fr 300px;
  height: calc(100vh - var(--topbar-height) - 60px);
  overflow: hidden;
}
.code-sidebar {
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
}
.code-files-header {
  padding: 10px 15px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
}
.file-tree {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.file-item:hover {
  background: var(--glass-border);
  color: var(--text-primary);
}
.file-item.active {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
}

.editor-workspace {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  overflow: hidden;
}
.editor-header {
  height: 40px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  background: rgba(0, 0, 0, 0.2);
}
.editor-tabs {
  display: flex;
  gap: 4px;
  height: 100%;
  align-items: flex-end;
}
.editor-tab {
  padding: 6px 12px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border: 1px solid var(--glass-border);
  border-bottom: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
}
.editor-tab.active {
  background: var(--bg-primary);
  color: var(--accent-cyan);
  border-color: var(--glass-border);
}

.editor-textarea-container {
  flex: 1;
  position: relative;
  display: flex;
}
.editor-line-numbers {
  width: 40px;
  background: rgba(0, 0, 0, 0.15);
  border-right: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: right;
  padding: 15px 8px;
  user-select: none;
  line-height: 1.5;
}
.editor-textarea {
  flex: 1;
  border: none;
  background: transparent;
  color: #a9b2c3;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 15px;
  outline: none;
  resize: none;
  line-height: 1.5;
  tab-size: 4;
}

/* Collaborative Floating Cursor */
.live-cursor {
  position: absolute;
  pointer-events: none;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: left 0.15s linear, top 0.15s linear;
}
.cursor-pointer-dot {
  width: 2px;
  height: 16px;
  background-color: var(--accent-cyan);
  position: relative;
}
.cursor-pointer-flag {
  position: absolute;
  top: 16px;
  left: 2px;
  background-color: var(--accent-cyan);
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.editor-terminal {
  height: 180px;
  border-top: 1px solid var(--glass-border);
  background: #020617;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
}
.terminal-header {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}
.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  line-height: 1.4;
}
.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.terminal-prompt {
  color: #10b981;
}
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.code-arena-ai {
  padding: 15px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.git-history-container {
  max-height: 200px;
  overflow-y: auto;
  border-top: 1px solid var(--glass-border);
  padding-top: 10px;
  margin-top: auto;
}
.git-commit {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.75rem;
}
.git-hash {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

/* 5. COLLABORATIVE NOTEBOOKS */
.notebook-cell {
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: var(--transition-smooth);
}
.notebook-cell.focused {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}
.cell-header {
  padding: 6px 15px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cell-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cell-actions {
  display: flex;
  gap: 8px;
}
.cell-editor {
  display: flex;
}
.cell-run-btn {
  width: 40px;
  background: rgba(16, 185, 129, 0.1);
  border: none;
  border-right: 1px solid var(--glass-border);
  color: var(--accent-emerald);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}
.cell-run-btn:hover {
  background: var(--accent-emerald);
  color: white;
}
.cell-textarea {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 12px;
  outline: none;
  resize: none;
  min-height: 60px;
}
.cell-output {
  padding: 12px 15px;
  background: #020617;
  border-top: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #cbd5e1;
  min-height: 30px;
  white-space: pre-wrap;
}

/* 6. PROJECT ROOMS */
.project-room-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 10px;
}
.room-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.room-tab-btn.active {
  background: var(--accent-purple-glow);
  color: var(--accent-purple);
}

/* 7. OPEN LIBRARY */
.library-search-container {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.library-card {
  padding: 20px;
  cursor: pointer;
}
.library-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}
.library-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.library-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 8. PERSONAL LOCKER ROOM */
.locker-security-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.security-card {
  width: 320px;
  padding: 30px;
  text-align: center;
}
.fingerprint-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  background: var(--accent-cyan-glow);
  border: 1px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent-cyan);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}
.passcode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 180px;
  margin: 20px auto 0 auto;
}
.passcode-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.passcode-btn:hover {
  background: var(--accent-cyan-glow);
  border-color: var(--accent-cyan);
}

.locker-workspace {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  height: calc(100vh - var(--topbar-height) - 100px);
}
.locker-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.locker-nav-item {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}
.locker-nav-item:hover {
  background: var(--glass-border);
}
.locker-nav-item.active {
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
}

/* 10. CONFERENCE HALL */
.meeting-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  height: calc(100vh - var(--topbar-height) - 80px);
}
.meeting-video-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.video-tile {
  background: #0b0f19;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  aspect-ratio: 16/9;
  transition: border-color 0.3s;
}
.video-tile:hover {
  border-color: var(--accent-cyan);
}
.video-tile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 0 20px var(--accent-purple-glow);
}
.video-tile-name {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 4px;
  color: white;
}
.video-tile-audio-wave {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 16px;
}
.audio-bar {
  width: 2px;
  background: var(--accent-cyan);
  border-radius: 1px;
}

.meeting-controls {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border-top: 1px solid var(--glass-border);
}

.whiteboard-container {
  display: none;
  flex-direction: column;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.whiteboard-container.active {
  display: flex;
}
.whiteboard-toolbar {
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  gap: 10px;
  align-items: center;
}
.whiteboard-canvas {
  flex: 1;
  background: #f8fafc;
  cursor: crosshair;
}
[data-theme="light"] .whiteboard-canvas {
  background: #ffffff;
}

/* 11. INNOVATION LAB */
.idea-submit-form {
  padding: 20px;
  margin-bottom: 24px;
}
.innovation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.idea-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.idea-vote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
}

/* 12. PROJECT MANAGEMENT CENTER */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  flex: 1;
  overflow-x: auto;
  align-items: flex-start;
}
.kanban-column {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 450px;
}
[data-theme="light"] .kanban-column {
  background: rgba(255, 255, 255, 0.4);
}
.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.kanban-column-count {
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
}
.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 380px;
}
.kanban-card {
  padding: 15px;
  cursor: grab;
  position: relative;
}
.kanban-card:active {
  cursor: grabbing;
}
.kanban-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.kanban-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}
.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban-card-assignee {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-purple);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kanban-card-priority {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.priority-high { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.priority-medium { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.priority-low { background: rgba(16, 185, 129, 0.15); color: #34d399; }

/* AI Assistant Overlay Widget */
.ai-widget-trigger {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: white;
  border: none;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  transition: var(--transition-smooth);
}
.ai-widget-trigger:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6);
}
.ai-chat-drawer {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 360px;
  height: 480px;
  z-index: 99;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.ai-chat-drawer.open {
  display: flex;
  animation: drawerSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes drawerSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-drawer-header {
  padding: 15px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.ai-drawer-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-drawer-input-container {
  padding: 12px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 8px;
}

/* Animations */
@keyframes voice-anim {
  0% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(0.3); }
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0)  scale(1); }
}
@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0)  scale(1); }
  to   { opacity: 0; transform: translateX(40px) scale(0.92); }
}

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

@keyframes statPulse {
  0%  { box-shadow: 0 0 0 0 var(--accent-cyan-glow); }
  60% { box-shadow: 0 0 0 8px transparent; }
  100%{ box-shadow: 0 0 0 0 transparent; }
}

/* Responsive styles */
@media (max-width: 900px) {
  .app-sidebar {
    width: 70px;
  }
  .sidebar-logo, .menu-item span, .menu-label, .sidebar-footer .user-info {
    display: none;
  }
  .app-sidebar .logo-icon {
    margin: 0 auto;
  }
  .app-sidebar .menu-item {
    justify-content: center;
  }
  .app-sidebar .sidebar-footer {
    justify-content: center;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Modal Overlay ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}
.modal-card {
  width: 460px;
  max-width: 95vw;
  padding: 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: drawerSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-row {
  display: flex;
  gap: 12px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

/* ── Emoji Picker ─────────────────────────────────────────────── */
.emoji-picker-popup {
  position: absolute;
  bottom: 70px;
  left: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 260px;
  z-index: 50;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  animation: fadeIn 0.2s ease;
}
.emoji-picker-popup span {
  cursor: pointer;
  font-size: 1.4rem;
  border-radius: 6px;
  padding: 4px;
  transition: background 0.15s;
}
.emoji-picker-popup span:hover {
  background: var(--glass-border);
}

/* ── Stat card animation ─────────────────────────────────────── */
.stat-card {
  animation: fadeIn 0.5s ease both;
}
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* ── Heartbeat ring on online members stat ───────────────────── */
.stat-card.pulse-ring .stat-icon {
  animation: statPulse 2s ease-out infinite;
}

/* ════════════════════════════════════════════════════════════════
   COMMAND PALETTE  (Ctrl+K)
   ════════════════════════════════════════════════════════════════ */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 110px;
  animation: fadeIn 0.15s ease;
}
.cmd-palette-box {
  width: 580px;
  max-width: 92vw;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-hover);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  animation: drawerSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.cmd-palette-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}
.cmd-palette-search-row svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.cmd-palette-search-row input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
}
.cmd-palette-search-row input::placeholder { color: var(--text-muted); }
.cmd-esc-badge {
  font-size: 0.65rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 3px 7px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.cmd-palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}
.cmd-result-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 14px 4px;
}
.cmd-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0.9rem;
}
.cmd-result-item:hover,
.cmd-result-item.highlighted {
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
}
.cmd-result-item .cmd-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}
.cmd-result-item:hover .cmd-icon,
.cmd-result-item.highlighted .cmd-icon {
  background: var(--accent-cyan-glow);
  border-color: var(--accent-cyan);
}
.cmd-result-item .cmd-name  { font-weight: 600; flex: 1; }
.cmd-result-item .cmd-badge {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-mono);
}
.cmd-palette-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 20px;
  font-size: 0.7rem;
  color: var(--text-muted);
  align-items: center;
}
.cmd-palette-footer kbd {
  font-family: var(--font-mono);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 4px;
}

/* ════════════════════════════════════════════════════════════════
   MEMBERS ONLINE PANEL
   ════════════════════════════════════════════════════════════════ */
.members-panel {
  position: fixed;
  top: 74px;
  right: 20px;
  width: 300px;
  padding: 16px;
  z-index: 150;
  animation: drawerSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  transition: var(--transition-smooth);
  margin-bottom: 2px;
  cursor: pointer;
}
.member-row:hover { background: var(--bg-tertiary); }
.member-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  position: relative;
}
.member-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}
.status-online { background: var(--accent-emerald); box-shadow: 0 0 5px var(--accent-emerald); }
.status-busy   { background: var(--accent-pink);    box-shadow: 0 0 5px var(--accent-pink); }
.status-away   { background: var(--accent-amber);   box-shadow: 0 0 5px var(--accent-amber); }
.member-info   { flex: 1; min-width: 0; }
.member-info-name { font-size: 0.85rem; font-weight: 600; }
.member-info-role { font-size: 0.7rem;  color: var(--text-muted); }
.member-info-zone {
  font-size: 0.65rem;
  color: var(--accent-cyan);
  margin-top: 2px;
  font-weight: 600;
}
.member-divider { border: none; border-top: 1px solid var(--glass-border); margin: 8px 0; }
.member-dm-btn {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 3px 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}
.member-dm-btn:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* ════════════════════════════════════════════════════════════════
   CTRL+K TOPBAR HINT BUTTON
   ════════════════════════════════════════════════════════════════ */
.cmd-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}
.cmd-hint:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
}
.cmd-hint kbd {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 3px;
  padding: 1px 5px;
}

/* ════════════════════════════════════════════════════════════════
   FEED CHARACTER COUNTER
   ════════════════════════════════════════════════════════════════ */
.char-counter {
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: color 0.2s;
  font-variant-numeric: tabular-nums;
}
.char-counter.warning { color: var(--accent-amber); }
.char-counter.danger  { color: var(--accent-pink); font-weight: 700; }

/* ════════════════════════════════════════════════════════════════
   SIDEBAR NOTIFICATION BADGE
   ════════════════════════════════════════════════════════════════ */
.nav-badge {
  background: var(--accent-pink);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  margin-left: auto;
  animation: pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent-pink);
}

/* ── AI Typing Indicator Dots ─────────────────────────────────────────────── */
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-purple);
  display: inline-block;
  animation: typingBounce 0.8s ease-in-out infinite;
}
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-5px); opacity: 1; }
}
#copilot-typing .typing-dot { background: var(--accent-cyan); }

.cmd-hint {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}
.cmd-hint:hover { border-color: var(--accent-cyan); color: var(--text-primary); }
.cmd-hint kbd { background: var(--glass-border); border-radius: 4px; padding: 1px 5px; font-size: 0.7rem; font-family: monospace; }
