/* ==========================================================================
   VANAKAM CORE — GOOGLE FLOW & GOOGLE STITCH DESIGN SYSTEM
   Modern Glassmorphism, Fluid Transitions, Precision Minecraft Dashboard
   ========================================================================== */

:root {
  --bg-dark: #07090e;
  --bg-surface: #0e121b;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --amber: #f59e0b;
  --cyan: #06b6d4;
  --rose: #f43f5e;
  --purple: #a855f7;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, monospace;
  
  --ease-flow: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Flow Background */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
}

.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Navigation Bar */
.top-nav {
  height: 64px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.8px;
  display: block;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

/* Header Telemetry Pills */
.header-telemetry {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tele-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s var(--ease-flow);
}

.tele-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tps-pill {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.cert-pill {
  border-color: rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-dot.green {
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pill-label { color: var(--text-muted); font-size: 11px; text-transform: uppercase; }
.pill-val { font-weight: 600; font-family: var(--font-mono); }

/* User Chip */
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  font-size: 12px;
}

.avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}

.role-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-flow);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* Workspace Layout */
.workspace-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 64px);
}

/* Sidebar Navigation */
.sidebar-nav {
  width: 260px;
  background: rgba(14, 18, 27, 0.7);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-subtle);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 0 10px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s var(--ease-flow);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.04));
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.nav-badge.live {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.nav-badge.ai {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.host-info small {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}

.mc-safe {
  display: inline-block;
  font-size: 10px;
  color: #6ee7b7;
  font-weight: 600;
  margin-top: 4px;
}

/* Viewport & View Panels */
.content-viewport {
  flex: 1;
  padding: 28px 36px;
  overflow-y: auto;
}

.view-panel {
  display: none;
  animation: fadeIn 0.28s var(--ease-flow);
}

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

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

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

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--primary);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.panel-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

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

/* Card Styling (Google Stitch) */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s var(--ease-flow);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* Metric Grid */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.metric-status.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.metric-status.blue { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.metric-status.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.metric-status.cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-big {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.metric-unit {
  font-size: 13px;
  color: var(--text-dim);
}

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

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-flow);
}

.progress-bar.green { background: var(--emerald); }
.progress-bar.blue { background: var(--primary); }
.progress-bar.purple { background: var(--purple); }
.progress-bar.cyan { background: var(--cyan); }

.metric-footnote {
  font-size: 11px;
  color: var(--text-dim);
}

/* Status Strip */
.status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.strip-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.strip-icon {
  font-size: 26px;
}

.strip-item strong {
  display: block;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.strip-item p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Terminal & Console */
.terminal-container {
  display: flex;
  flex-direction: column;
  height: 650px;
  padding: 0;
  overflow: hidden;
  background: #080b12;
  border-color: rgba(255, 255, 255, 0.1);
}

.terminal-bar {
  background: #0d121c;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
}

.terminal-viewport {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #cbd5e1;
}

.term-line {
  white-space: pre-wrap;
  word-break: break-all;
}

.term-line.info { color: #94a3b8; }
.term-line.warn { color: #fcd34d; font-weight: 500; }
.term-line.error { color: #f87171; font-weight: 600; }
.term-line.chat { color: #67e8f9; }
.term-line.cmd { color: #a78bfa; font-weight: 500; }

.command-bar {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: #0d121c;
  border-top: 1px solid var(--border-subtle);
  gap: 10px;
}

.prompt-symbol {
  color: var(--emerald);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
}

.command-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-flow);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

/* Plugins Manager */
.plugins-search-bar {
  margin-bottom: 20px;
}

.input-text {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.input-text:focus {
  border-color: var(--primary);
}

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.plugin-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

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

.plugin-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-tag.enabled { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-tag.disabled { background: rgba(244, 63, 94, 0.2); color: #fb7185; }

.plugin-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.plugin-actions {
  display: flex;
  gap: 8px;
}

/* World Maker & Seed Canvas */
.world-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
}

.seed-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
}

.seed-presets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: #fff;
}

.card-inner {
  background: rgba(0, 0, 0, 0.25);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 8px;
}

.canvas-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

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

.canvas-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.canvas-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #040609;
  border: 1px solid var(--border-subtle);
}

#seedCanvas {
  display: block;
  width: 100%;
  height: 480px;
}

.biome-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 4px;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.leg-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Files Explorer */
.files-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  height: 650px;
}

.files-tree-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.tree-header {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}

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

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

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

.file-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: #fff;
  font-weight: 600;
}

.editor-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.editor-header {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.active-file-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.file-sha {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.code-editor {
  flex: 1;
  background: #090d16;
  border: none;
  outline: none;
  padding: 18px;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  resize: none;
}

/* AI Studio */
.ai-studio-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  height: 700px;
}

.ai-settings-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-select {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  outline: none;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.slider-row input[type="range"] {
  accent-color: var(--primary);
}

.preset-chips-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preset-chips-col .chip {
  text-align: left;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.ai-chat-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.chat-header {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.model-badge-active {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.status-indicator.live {
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
}

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

.chat-message {
  display: flex;
  gap: 12px;
  max-width: 85%;
}

.chat-message.assistant {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.msg-body {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  line-height: 1.5;
}

.chat-message.user .msg-body {
  background: var(--primary);
  border-color: var(--primary-hover);
  color: #fff;
}

.thinking-block {
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid var(--amber);
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fde68a;
}

.ai-input-form {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-input-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  resize: none;
  outline: none;
}

.form-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-hint {
  font-size: 11px;
  color: var(--text-dim);
}

/* MCP Tools Directory Grid */
.mcp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.mcp-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.mcp-card-title {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #a5b4fc;
}

/* Automation Grid */
.automation-tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Modal Dialog */
.login-dialog {
  margin: auto;
  border: none;
  background: transparent;
  outline: none;
}

.modal-card {
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 400px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-head {
  text-align: center;
}

.modal-head .logo-mark {
  margin: 0 auto 12px;
}

.modal-head h2 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 6px;
}

.modal-head p {
  font-size: 12px;
  color: var(--text-muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.full-width {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
}

.error-text {
  font-size: 12px;
  color: var(--rose);
  text-align: center;
}

/* Toast */
.toast-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(18, 24, 38, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 999;
}

/* Capability Pills */
.cap-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.skills-pill { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.mcp-pill { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

/* Reverse Engineering Studio */
.reverse-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

@media (max-width: 1200px) {
  .reverse-layout {
    grid-template-columns: 1fr;
  }
}

.reverse-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-group-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.decompile-output-box, .nbt-output-box, .protocol-output-box, .github-output-box {
  background: rgba(10, 14, 23, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 12px;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.code-terminal {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: #d1d5db;
  padding: 14px;
  margin: 0;
  max-height: 480px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.code-terminal.small {
  max-height: 240px;
}

.reverse-side-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.proto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.proto-note {
  padding: 10px 12px;
  font-size: 11.5px;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.08);
  border-top: 1px solid rgba(59, 130, 246, 0.2);
}

/* Thinking Streamer Block */
.thinking-box {
  margin: 8px 0;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.05);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: #c4b5fd;
}

.thinking-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  color: #a78bfa;
}

.step-indicator-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.step-indicator-bar .step-badge {
  font-weight: 700;
  color: var(--primary);
}

/* 3-Panel Google Stitch & Flow Architecture */
.inspector-panel {
  width: 320px;
  background: rgba(14, 19, 31, 0.95);
  backdrop-filter: blur(16px);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  overflow: hidden;
  z-index: 20;
}

.inspector-panel.collapsed {
  width: 0;
  border-left: none;
  opacity: 0;
  pointer-events: none;
}

.sidebar-nav.collapsed {
  width: 64px;
}

.sidebar-nav.collapsed .nav-text,
.sidebar-nav.collapsed .nav-badge,
.sidebar-nav.collapsed .group-title,
.sidebar-nav.collapsed .host-info {
  display: none;
}

.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.inspector-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}

.inspector-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.insp-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.insp-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.insp-val-large {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.insp-sub {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.insp-actions {
  display: flex;
  gap: 8px;
}

.btn-xs {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

.live-event-log {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #94a3b8;
  max-height: 140px;
  overflow-y: auto;
}

.event-item {
  line-height: 1.5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 3px 0;
}

/* 3D WebGL Container & HUD */
.canvas-wrapper-3d {
  background: #020617;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.three-hud {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: #94a3b8;
  border: 1px solid var(--border);
  z-index: 10;
}

/* Map Action Bar */
.map-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.map-coord-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.map-action-btns {
  display: flex;
  gap: 8px;
}

.coord-inputs-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
}

.building-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
}

@media (max-width: 1000px) {
  .building-layout {
    grid-template-columns: 1fr;
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

