/* ═══════════════════════════════════════════════════════════════
   AGENTIC OS — FUTURISTIC DASHBOARD CSS
   Glassmorphism • Neon Glow • GSAP-Ready Animations
   ═══════════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─── */
:root {
  /* Core Palette */
  --bg-void: #030712;
  --bg-surface: rgba(15, 23, 42, 0.6);
  --bg-elevated: rgba(30, 41, 59, 0.4);
  --bg-glass: rgba(15, 23, 42, 0.5);
  
  /* Neon Spectrum */
  --neon-cyan: #06d6a0;
  --neon-blue: #3b82f6;
  --neon-violet: #8b5cf6;
  --neon-fuchsia: #d946ef;
  --neon-rose: #f43f5e;
  --neon-amber: #f59e0b;
  --neon-emerald: #10b981;
  
  /* Glow Effects */
  --glow-cyan: 0 0 20px rgba(6, 214, 160, 0.3), 0 0 60px rgba(6, 214, 160, 0.1);
  --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3), 0 0 60px rgba(59, 130, 246, 0.1);
  --glow-violet: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 60px rgba(139, 92, 246, 0.1);
  --glow-fuchsia: 0 0 20px rgba(217, 70, 239, 0.3), 0 0 60px rgba(217, 70, 239, 0.1);
  
  /* Borders */
  --border-subtle: rgba(148, 163, 184, 0.08);
  --border-glow: rgba(6, 214, 160, 0.2);
  --border-active: rgba(59, 130, 246, 0.4);
  
  /* Typography */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', monospace;
  
  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── GLOBAL RESETS ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: #e2e8f0;
  overflow: hidden;
  min-height: 100vh;
}

/* ─── ANIMATED BACKGROUND ─── */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-mesh::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse 600px 600px at 20% 30%, rgba(6, 214, 160, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 60% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  animation: meshFloat 20s ease-in-out infinite;
}

.bg-mesh::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.5;
}

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-0.5deg); }
}

/* ─── GRID OVERLAY ─── */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(148, 163, 184, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
}

/* ─── SIDEBAR NAVIGATION ─── */
#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 72px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-right: 1px solid var(--border-subtle);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  transition: width 0.4s var(--ease-out-expo);
  overflow: hidden;
}

#sidebar.expanded {
  width: 240px;
  align-items: stretch;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  box-shadow: var(--glow-cyan);
  transition: transform 0.3s var(--ease-out-back);
  flex-shrink: 0;
}

.sidebar-logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.sidebar-logo svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  width: 100%;
  padding: 0 10px;
}

.nav-item {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: rgba(148, 163, 184, 0.7);
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
  border: none;
  background: none;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(6, 214, 160, 0.15), rgba(59, 130, 246, 0.15));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-item:hover {
  color: #e2e8f0;
  transform: scale(1.05);
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item.active {
  color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.nav-item.active::before {
  opacity: 1;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--neon-cyan);
  border-radius: 0 4px 4px 0;
  box-shadow: var(--glow-cyan);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

#expanded-nav {
  display: none;
}

#sidebar.expanded #compact-nav {
  display: none;
}

#sidebar.expanded #expanded-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 0 12px;
}

.nav-item-expanded {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: rgba(148, 163, 184, 0.7);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

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

.nav-item-expanded.active {
  background: rgba(6, 214, 160, 0.1);
  color: var(--neon-cyan);
}

.nav-item-expanded svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: rgba(148, 163, 184, 0.5);
  transition: all 0.3s ease;
  border: none;
  background: none;
  cursor: pointer;
  margin-top: auto;
}

.sidebar-toggle:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-out-expo);
}

#sidebar.expanded .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* ─── MAIN CONTENT AREA ─── */
#main-content {
  margin-left: 72px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  transition: margin-left 0.4s var(--ease-out-expo);
}

#sidebar.expanded ~ #main-content {
  margin-left: 240px;
}

/* ─── HEADER BAR ─── */
.header-bar {
  height: 64px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.header-subtitle {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.6);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

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

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(6, 214, 160, 0.1);
  border: 1px solid rgba(6, 214, 160, 0.2);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: var(--glow-cyan);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.header-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: rgba(148, 163, 184, 0.7);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.15);
}

.header-btn svg {
  width: 18px;
  height: 18px;
}

.header-btn .notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: var(--neon-rose);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}

/* ─── CONTENT VIEWS ─── */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
}

.tab-view {
  display: none;
  animation: viewFadeIn 0.5s var(--ease-out-expo);
}

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

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

/* ─── GLASS CARDS ─── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.glass-card:hover {
  border-color: rgba(6, 214, 160, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* ─── STAT CARDS ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out-expo);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.stat-card:hover::after {
  opacity: 1;
}

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

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease-out-back);
}

.stat-card:hover .stat-icon {
  transform: scale(1.15) rotate(-5deg);
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-icon.cyan { background: rgba(6, 214, 160, 0.15); color: var(--neon-cyan); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--neon-blue); }
.stat-icon.violet { background: rgba(139, 92, 246, 0.15); color: var(--neon-violet); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--neon-amber); }

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.stat-trend.up { color: var(--neon-emerald); }
.stat-trend.down { color: var(--neon-rose); }

.stat-trend svg {
  width: 14px;
  height: 14px;
}

.stat-label {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-meta {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.5);
  font-family: var(--font-mono);
  margin-top: 8px;
}

/* ─── METRICS BARS ─── */
.metric-row {
  margin-bottom: 16px;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.7);
  font-weight: 500;
}

.metric-value {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.metric-value.cyan { color: var(--neon-cyan); }
.metric-value.blue { color: var(--neon-blue); }
.metric-value.violet { color: var(--neon-violet); }
.metric-value.amber { color: var(--neon-amber); }

.metric-track {
  height: 6px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.metric-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s var(--ease-out-expo);
  position: relative;
}

.metric-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  border-radius: 100px;
}

.metric-fill.cyan { background: linear-gradient(90deg, var(--neon-cyan), rgba(6, 214, 160, 0.7)); box-shadow: 0 0 12px rgba(6, 214, 160, 0.3); }
.metric-fill.blue { background: linear-gradient(90deg, var(--neon-blue), rgba(59, 130, 246, 0.7)); box-shadow: 0 0 12px rgba(59, 130, 246, 0.3); }
.metric-fill.violet { background: linear-gradient(90deg, var(--neon-violet), rgba(139, 92, 246, 0.7)); box-shadow: 0 0 12px rgba(139, 92, 246, 0.3); }
.metric-fill.amber { background: linear-gradient(90deg, var(--neon-amber), rgba(245, 158, 11, 0.7)); box-shadow: 0 0 12px rgba(245, 158, 11, 0.3); }

/* ─── ACTIVITY LOG ─── */
.activity-log {
  max-height: 400px;
  overflow-y: auto;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.02);
}

.log-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
}

.log-badge.info { background: rgba(59, 130, 246, 0.15); color: var(--neon-blue); }
.log-badge.success { background: rgba(6, 214, 160, 0.15); color: var(--neon-cyan); }
.log-badge.warning { background: rgba(245, 158, 11, 0.15); color: var(--neon-amber); }
.log-badge.error { background: rgba(244, 63, 94, 0.15); color: var(--neon-rose); }

.log-content {
  flex: 1;
  min-width: 0;
}

.log-title {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.log-time {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.5);
  font-family: var(--font-mono);
}

.log-message {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.6);
  font-family: var(--font-mono);
  line-height: 1.5;
  margin-top: 4px;
}

/* ─── MODELS LIST ─── */
.model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.model-row:last-child {
  border-bottom: none;
}

.model-name {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
}

.model-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 100px;
}

.model-status.online {
  background: rgba(6, 214, 160, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(6, 214, 160, 0.2);
}

.model-status.offline {
  background: rgba(148, 163, 184, 0.1);
  color: rgba(148, 163, 184, 0.5);
  border: 1px solid var(--border-subtle);
}

.model-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.model-status.online .model-status-dot {
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}

.model-status.offline .model-status-dot {
  background: rgba(148, 163, 184, 0.3);
}

/* ─── CHAT VIEW ─── */
.chat-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.chat-header {
  text-align: center;
}

.chat-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #f8fafc, rgba(148, 163, 184, 0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.chat-divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-violet), transparent);
  margin: 0 auto 8px;
}

.chat-subtitle {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.5);
  font-family: var(--font-mono);
}

.chat-window {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  animation: messageSlideIn 0.3s var(--ease-out-expo);
}

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

.chat-message.system {
  align-self: center;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: rgba(148, 163, 184, 0.8);
  font-size: 12px;
  text-align: center;
  max-width: 90%;
}

.chat-message.user {
  align-self: flex-end;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #e2e8f0;
  border-bottom-right-radius: 4px;
}

.chat-message.agent {
  align-self: flex-start;
  background: rgba(6, 214, 160, 0.08);
  border: 1px solid rgba(6, 214, 160, 0.15);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.message-sender {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.chat-message.user .message-sender { color: var(--neon-violet); }
.chat-message.agent .message-sender { color: var(--neon-cyan); }
.chat-message.system .message-sender { color: var(--neon-blue); }

/* Chat Input */
.chat-input-area {
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.chat-input-wrapper:focus-within {
  border-color: var(--neon-violet);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.chat-textarea {
  flex: 1;
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  min-height: 24px;
  max-height: 120px;
  font-family: var(--font-body);
  outline: none;
}

.chat-textarea::placeholder {
  color: rgba(148, 163, 184, 0.4);
}

.chat-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-tool-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.5);
  transition: all 0.2s ease;
  cursor: pointer;
}

.chat-tool-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.chat-tool-btn svg {
  width: 16px;
  height: 16px;
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-fuchsia));
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.2s var(--ease-out-back);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.chat-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-send-btn svg {
  width: 16px;
  height: 16px;
}

/* Suggestion Pills */
.suggestion-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.suggestion-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.3);
  color: #e2e8f0;
  transform: translateY(-2px);
}

.suggestion-pill svg {
  width: 14px;
  height: 14px;
}

/* ─── EDITOR VIEW ─── */
.editor-layout {
  display: flex;
  gap: 16px;
  height: calc(100vh - 130px);
}

.editor-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.editor-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(148, 163, 184, 0.6);
}

.editor-file-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-mono);
  color: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
}

.file-item.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--neon-blue);
}

.file-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.editor-panel {
  flex: 1;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.editor-filename {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--neon-violet);
}

.save-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--neon-emerald), var(--neon-cyan));
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 214, 160, 0.3);
}

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

.editor-textarea {
  flex: 1;
  background: rgba(5, 7, 15, 0.8);
  border: none;
  color: #a6accd;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  padding: 16px;
  resize: none;
  outline: none;
  tab-size: 2;
}

/* ─── SKILLS CATALOG ─── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
}

.skill-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-violet), var(--neon-fuchsia));
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out-expo);
  transform-origin: left;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.skill-card:hover::before {
  transform: scaleX(1);
}

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

.skill-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.12);
  display: grid;
  place-items: center;
  color: var(--neon-violet);
  transition: transform 0.3s var(--ease-out-back);
}

.skill-card:hover .skill-icon {
  transform: scale(1.15) rotate(-5deg);
}

.skill-icon svg {
  width: 18px;
  height: 18px;
}

.skill-tags {
  display: flex;
  gap: 4px;
}

.skill-tag {
  padding: 3px 8px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 100px;
  font-size: 9px;
  font-weight: 700;
  color: var(--neon-violet);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.skill-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.skill-card:hover .skill-name {
  color: var(--neon-violet);
}

.skill-desc {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.6);
  line-height: 1.5;
}

/* ─── MONITOR VIEW ─── */
.monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.monitor-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.monitor-title {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.monitor-value {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.monitor-value.cyan { color: var(--neon-cyan); }
.monitor-value.blue { color: var(--neon-blue); }
.monitor-value.violet { color: var(--neon-violet); }
.monitor-value.amber { color: var(--neon-amber); }

/* ─── SETTINGS VIEW ─── */
.settings-layout {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-section {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.settings-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(148, 163, 184, 0.6);
  margin-bottom: 16px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 13px;
  color: #e2e8f0;
}

.theme-options {
  display: flex;
  gap: 8px;
}

.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  transform: scale(1.15);
}

.theme-btn.active {
  border-color: white;
  transform: scale(1.15);
}

.theme-btn.cyan { background: var(--neon-cyan); }
.theme-btn.violet { background: var(--neon-violet); }
.theme-btn.blue { background: var(--neon-blue); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.15);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.25);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  #sidebar { width: 60px; }
  #main-content { margin-left: 60px; }
  .stat-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .monitor-grid { grid-template-columns: 1fr; }
  .editor-layout { flex-direction: column; }
  .editor-sidebar { width: 100%; height: 200px; }
}
