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

:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  /* Premium HSL Color Palette */
  --bg-deep: 240 25% 3%;      /* #030306 */
  --bg-dark: 240 20% 5%;      /* #07070f */
  --bg-surface: 240 16% 9%;   /* #0f0f1c */
  
  --text-primary: 0 0% 96%;   /* #f5f5f5 */
  --text-secondary: 240 10% 70%; /* #abb2bf */
  --text-muted: 240 12% 50%;    /* #7b839b */

  --primary: 250 85% 65%;     /* Electric Indigo */
  --primary-glow: 250 85% 65% / 0.15;
  --secondary: 280 80% 68%;   /* Royal Purple */
  --secondary-glow: 280 80% 68% / 0.15;
  --accent: 180 80% 50%;      /* Cyber Cyan */
  --accent-glow: 180 80% 50% / 0.15;
  --success: 145 80% 45%;     /* Mint Green */
  --warning: 38 95% 55%;      /* Amber Gold */
  --warning-glow: 38 95% 55% / 0.08;

  --border-glow: 250 85% 65% / 0.12;
  --border-solid: 240 12% 16%; /* #222230 */
  --border-trans: 255 255 255 / 0.05;

  --glass-bg: 240 16% 8% / 0.65;
  --glass-blur: 24px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--bg-deep));
  color: hsl(var(--text-primary));
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: hsl(var(--border-solid));
  border-radius: 99px;
  border: 2px solid hsl(var(--bg-deep));
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary));
}

/* ── Typography Utilities ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)) 60%, hsl(var(--accent)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  color: #fff;
  box-shadow: 0 4px 20px hsl(var(--primary-glow));
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px hsl(var(--primary-glow)), 0 0 0 2px hsl(var(--primary) / 0.4);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: hsl(var(--glass-bg));
  backdrop-filter: blur(10px);
  color: hsl(var(--text-primary));
  border: 1px solid hsl(var(--border-solid));
}
.btn-secondary:hover {
  background: hsl(var(--bg-surface));
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 16px hsl(var(--primary-glow));
}

/* ── Glassmorphic Card Style ── */
.glass-panel {
  background: hsl(var(--glass-bg));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid hsl(var(--border-trans));
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* ───────────────────────────────────────────────────────────────────────────
   LANDING PAGE LAYOUT & SECTIONS
   ─────────────────────────────────────────────────────────────────────────── */

.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  position: relative;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 0 24px hsl(var(--primary-glow));
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: hsl(var(--text-primary));
}

/* ── Hero Section ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 0 60px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.25);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: hsl(var(--primary));
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 20px;
  max-width: 800px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: hsl(var(--text-secondary));
  max-width: 600px;
  margin-bottom: 36px;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, hsl(var(--primary-glow)) 0%, transparent 70%);
  top: -200px;
  z-index: -1;
  pointer-events: none;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  padding: 40px 0 100px;
}
.feature-card {
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-5px);
  border-color: hsl(var(--primary) / 0.3);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 30px hsl(var(--primary-glow));
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.15);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: hsl(var(--primary));
  margin-bottom: 20px;
}
.feature-card:nth-child(2) .feature-icon {
  background: hsl(var(--secondary) / 0.08);
  border-color: hsl(var(--secondary) / 0.15);
  color: hsl(var(--secondary));
}
.feature-card:nth-child(3) .feature-icon {
  background: hsl(var(--accent) / 0.08);
  border-color: hsl(var(--accent) / 0.15);
  color: hsl(var(--accent));
}

.feature-title {
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.feature-desc {
  font-size: 0.95rem;
  color: hsl(var(--text-secondary));
}

/* ───────────────────────────────────────────────────────────────────────────
   CLAUDE-LIKE CHAT DASHBOARD LAYOUT
   ─────────────────────────────────────────────────────────────────────────── */

.chat-app {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.chat-sidebar {
  background-color: hsl(var(--bg-dark));
  border-right: 1px solid hsl(var(--border-solid));
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 16px;
}

.chat-new-btn {
  width: 100%;
}

.chat-nav-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: hsl(var(--text-secondary));
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.chat-nav-item:hover, .chat-nav-item.active {
  background: hsl(var(--border-solid) / 0.5);
  color: hsl(var(--text-primary));
  border-color: hsl(var(--border-trans));
}
.chat-nav-item svg {
  opacity: 0.65;
  flex-shrink: 0;
}
.chat-nav-item:hover svg, .chat-nav-item.active svg {
  opacity: 1;
  color: hsl(var(--primary));
}

.sidebar-divider {
  height: 1px;
  background: hsl(var(--border-solid));
  margin: 8px 0;
}

.sidebar-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: hsl(var(--text-muted));
  letter-spacing: 0.08em;
  padding: 4px 12px;
}

.config-select, .config-input {
  width: 100%;
  padding: 10px 12px;
  background: hsl(var(--bg-deep));
  border: 1px solid hsl(var(--border-solid));
  border-radius: var(--radius-sm);
  color: hsl(var(--text-primary));
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: border-color 0.2s;
  outline: none;
}
.config-select:focus, .config-input:focus {
  border-color: hsl(var(--primary));
}

/* Chat Console Area */
.chat-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  background: radial-gradient(circle at 80% 10%, hsl(var(--primary-glow) / 0.7) 0%, transparent 60%), hsl(var(--bg-deep));
}

.chat-header {
  height: 72px;
  border-bottom: 1px solid hsl(var(--border-solid));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  backdrop-filter: blur(12px);
  background: hsl(var(--bg-deep) / 0.75);
  z-index: 10;
}
.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-title {
  font-size: 1.05rem;
  font-weight: 600;
}
.header-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  background: hsl(var(--primary) / 0.12);
  border: 1px solid hsl(var(--primary) / 0.3);
  border-radius: 20px;
  color: hsl(var(--primary));
  font-family: var(--font-mono);
}

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

/* Welcome Overlay */
.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  gap: 16px;
  padding: 40px;
}
.welcome-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  box-shadow: 0 0 32px hsl(var(--primary-glow));
  margin-bottom: 8px;
}
.chat-welcome h2 {
  font-size: 2.2rem;
}
.chat-welcome p {
  font-size: 1.05rem;
  color: hsl(var(--text-secondary));
  max-width: 460px;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 650px;
  margin-top: 16px;
}
.chat-suggestion-btn {
  padding: 10px 20px;
  background: hsl(var(--glass-bg));
  border: 1px solid hsl(var(--border-solid));
  border-radius: 99px;
  color: hsl(var(--text-secondary));
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.chat-suggestion-btn:hover {
  background: hsl(var(--bg-surface));
  border-color: hsl(var(--primary) / 0.5);
  color: hsl(var(--text-primary));
  box-shadow: 0 0 16px hsl(var(--primary-glow));
}

/* Chat Message Bubbles */
.message-row {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 820px;
}
.message-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.message-row.assistant {
  align-self: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.message-row.user .message-avatar {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
}
.message-row.assistant .message-avatar {
  background: hsl(var(--border-solid));
  border: 1px solid hsl(var(--border-trans));
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.message-bubble {
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: calc(100% - 52px);
}
.message-row.user .message-bubble {
  background: hsl(var(--primary) / 0.12);
  border: 1px solid hsl(var(--primary) / 0.25);
  border-top-right-radius: 4px;
}
.message-row.assistant .message-bubble {
  background: hsl(var(--glass-bg));
  border: 1px solid hsl(var(--border-trans));
  border-top-left-radius: 4px;
  padding: 0;
  overflow: hidden;
}

/* Collapsible Think Log */
.think-container {
  border-bottom: 1px solid hsl(var(--border-solid));
  background: hsl(var(--warning) / 0.03);
}
.think-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.think-header:hover {
  background: hsl(var(--warning) / 0.08);
}
.think-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid hsl(var(--warning) / 0.2);
  border-top-color: hsl(var(--warning));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.think-spinner.completed {
  animation: none;
  border-color: hsl(var(--warning));
  opacity: 0.65;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.think-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: hsl(var(--warning));
  flex: 1;
}
.think-arrow {
  font-size: 0.85rem;
  color: hsl(var(--warning));
  opacity: 0.7;
  transition: transform 0.25s;
}
.think-container.collapsed .think-arrow {
  transform: rotate(-90deg);
}
.think-content {
  padding: 0 18px 16px;
  font-size: 0.85rem;
  color: hsl(var(--warning) / 0.75);
  font-style: italic;
  white-space: pre-wrap;
  max-height: 280px;
  overflow-y: auto;
}
.think-container.collapsed .think-content {
  display: none;
}

/* Chat text rendering */
.chat-answer {
  padding: 16px 20px;
}
.chat-answer p {
  margin-bottom: 12px;
}
.chat-answer p:last-child {
  margin-bottom: 0;
}
.chat-answer strong {
  color: hsl(var(--accent));
}
.chat-answer pre {
  background: hsl(var(--bg-deep)) !important;
  border: 1px solid hsl(var(--border-solid));
  border-radius: var(--radius-sm);
  position: relative;
  margin: 14px 0;
  overflow: visible;
}
.chat-answer pre code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 14px;
  display: block;
  line-height: 1.6;
}
.chat-answer code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: hsl(var(--border-solid));
  padding: 2px 6px;
  border-radius: 4px;
}
.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  font-size: 0.75rem;
  background: hsl(var(--border-solid));
  border: 1px solid hsl(var(--border-trans));
  border-radius: 6px;
  color: hsl(var(--text-secondary));
  cursor: pointer;
  transition: all 0.2s;
}
.copy-code-btn:hover {
  color: hsl(var(--text-primary));
  border-color: hsl(var(--primary));
}

/* Typing pulse */
.typing-pulse {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 6px 0;
}
.typing-pulse span {
  width: 6px;
  height: 6px;
  background: hsl(var(--primary));
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.typing-pulse span:nth-child(2) { animation-delay: 0.2s; }
.typing-pulse span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Chat Input Bar */
.chat-input-area {
  padding: 16px 24px 28px;
  background: hsl(var(--bg-deep) / 0.85);
  backdrop-filter: blur(12px);
  border-top: 1px solid hsl(var(--border-solid));
}
.chat-input-box {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: hsl(var(--glass-bg));
  border: 1px solid hsl(var(--border-solid));
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: all 0.2s;
}
.chat-input-box:focus-within {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 20px hsl(var(--primary-glow));
}
#chat-prompt {
  background: none;
  border: none;
  outline: none;
  color: hsl(var(--text-primary));
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: none;
  min-height: 24px;
  max-height: 180px;
  line-height: 1.5;
  width: 100%;
}
.chat-input-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.input-stats {
  font-size: 0.75rem;
  color: hsl(var(--text-muted));
}
.input-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-stop-btn {
  display: none;
  padding: 6px 12px;
  background: hsl(var(--warning) / 0.1);
  border: 1px solid hsl(var(--warning) / 0.25);
  border-radius: 20px;
  color: hsl(var(--warning));
  font-size: 0.75rem;
  cursor: pointer;
}
.chat-stop-btn.active {
  display: inline-flex;
}
.chat-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 0 12px hsl(var(--primary-glow));
  transition: transform 0.15s;
}
.chat-send-btn:hover {
  transform: scale(1.05);
}
.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

body.dashboard-body {
  height: 100vh;
  margin: 0;
  padding: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #050811;
  color: #e2e8f0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

.dashboard-brand {
  display: flex;
  flex-direction: column;
}
.dashboard-brand .main-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
  line-height: 1.1;
}
.dashboard-brand .sub-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.dashboard-status-area {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #f1f5f9;
  background: #070c14;
  border: 1px solid #1e293b;
  padding: 6px 12px;
  border-radius: 4px;
}
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-glow 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-glow {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px #10b981; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.fullscreen-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.9rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 2px;
  margin-left: 8px;
  transition: color 0.2s;
}
.fullscreen-btn:hover {
  color: #ffffff;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 28% 44% 28%;
  gap: 12px;
  flex: 1;
  min-height: 0; /* allows grid children to shrink and scroll */
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

.dashboard-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.dashboard-card {
  background: #070c16;
  border: 1px solid #141e30;
  border-radius: 4px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-left: 3px solid #6366f1;
  padding-left: 8px;
}
.dashboard-card-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

/* Hardware Telemetry Widget */
.telemetry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.telemetry-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
}
.telemetry-label {
  color: #64748b;
  font-weight: 500;
}
.telemetry-val {
  color: #fff;
}
.telemetry-track {
  width: 100%;
  height: 5px;
  background: #03050a;
  border-radius: 99px;
  overflow: hidden;
}
.telemetry-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #38bdf8);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ANI Evolution Loop Widget */
.evolution-chars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  margin-bottom: 8px;
  color: #64748b;
}
.evolution-char-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.evolution-char-box .kanji {
  font-size: 1.25rem;
  color: #fff;
  font-weight: 700;
}
.evolution-char-box .char-lbl {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #64748b;
}
.evolution-arrow {
  font-size: 0.95rem;
  color: #6366f1;
}

.evolution-circle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 110px;
  position: relative;
  margin: 6px 0;
}
.evolution-circle-svg {
  width: 100px;
  height: 100px;
  animation: rotate-circle 25s linear infinite;
}
@keyframes rotate-circle {
  to { transform: rotate(360deg); }
}

.evolution-circle-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.evolution-circle-text .ani-lbl {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
}
.evolution-circle-text .sub-lbl {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: #64748b;
  text-transform: uppercase;
}

.evolution-desc {
  font-size: 0.7rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.45;
  margin-top: 6px;
}

/* Model Self Training Widget */
.training-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.training-step-btn {
  width: 100%;
  padding: 6px 10px;
  border: 1px dashed #1e293b;
  background: #03050a;
  border-radius: 4px;
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}
.training-step-btn.active {
  border: 1px solid #6366f1;
  background: rgba(99, 102, 241, 0.06);
  color: #fff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}
.training-step-btn.success {
  border: 1px solid #10b981;
  background: rgba(16, 185, 129, 0.04);
  color: #fff;
}
.training-lbl-group {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #64748b;
  margin: 4px 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Console Widget */
.console-card {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  min-height: 250px;
}
.orchestrator-console-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.orchestrator-msg-area {
  flex: 1;
  background: #03050a;
  border: 1px solid #101b2d;
  border-radius: 4px;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}
.orchestrator-msg-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 90%;
}
.orchestrator-msg-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.orchestrator-msg-avatar {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
}
.orchestrator-msg-row.user .orchestrator-msg-avatar {
  background: #1e293b;
}
.orchestrator-msg-bubble {
  background: #0c1222;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #cbd5e1;
}
.orchestrator-msg-row.user .orchestrator-msg-bubble {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  color: #fff;
}

.orchestrator-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  flex-shrink: 0;
}
.orchestrator-input {
  background: #03050a;
  border: 1px solid #101b2d;
  border-radius: 4px;
  padding: 8px 10px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  outline: none;
  width: 100%;
}
.orchestrator-input:focus {
  border-color: #6366f1;
}
.orchestrator-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.orchestrator-btn:hover {
  opacity: 0.9;
}

/* Pending Approvals Widget */
.approvals-card {
  height: 90px;
  flex-shrink: 0;
}
.approvals-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #03050a;
  border: 1px dashed #1e293b;
  border-radius: 4px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.approvals-watermark {
  position: absolute;
  font-size: 2.2rem;
  font-weight: 900;
  color: rgba(255,255,255,0.015);
  pointer-events: none;
  z-index: 1;
}
.approvals-text {
  font-size: 0.7rem;
  color: #64748b;
  position: relative;
  z-index: 2;
}

/* Backlog Widget */
.backlog-card {
  flex: 1.8;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.backlog-card .dashboard-card-header {
  border-left-color: #38bdf8;
}
.backlog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}
.backlog-item {
  background: #03050a;
  border: 1px solid #101b2d;
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.backlog-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.backlog-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}
.backlog-status-badge {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.backlog-status-badge.completed {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.backlog-status-badge.in-progress {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.backlog-status-badge.queued {
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.backlog-desc {
  font-size: 0.62rem;
  color: #64748b;
  line-height: 1.45;
}

/* Live Agent Log Stream Widget */
.terminal-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.terminal-card .dashboard-card-header {
  border-left-color: #f59e0b;
}
.terminal-monitoring-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #f59e0b;
  animation: blink-monitoring 1.5s infinite;
}
@keyframes blink-monitoring {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.terminal-stream {
  flex: 1;
  background: #03050a;
  border: 1px solid #101b2d;
  border-radius: 4px;
  padding: 12px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  line-height: 1.45;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-row {
  word-break: break-all;
  opacity: 0.9;
  animation: fade-in-log 0.25s ease-out forwards;
}

@keyframes fade-in-log {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 0.9; transform: translateY(0); }
}

.log-time {
  color: hsl(var(--text-muted));
}
.log-level {
  font-weight: bold;
}
.log-level.info { color: #38bdf8; }
.log-level.warning { color: #fbbf24; }
.log-level.debug { color: #94a3b8; }
.log-level.success { color: #34d399; }

