:root {
  /* Misma familia fría de --bg/--surface del sitio real (tokens.css) — antes tenía tinte morado propio */
  --bg-app: #08090C;
  --bg-titlebar: #0A0C10;
  --bg-activitybar: #07080B;
  --bg-sidebar: #0B0D11;
  --bg-editor: #0D0F13;
  --bg-preview: #06070A;
  --bg-terminal: #08090C;
  --bg-statusbar: #090A0D;

  --border-color: rgba(196, 149, 106, 0.15);
  --border-color-active: rgba(196, 149, 106, 0.55);

  --text-primary: #E8ECF0;
  --text-muted: #8A9AAA;
  --text-accent: #C4956A;
  
  /* Collaborator Colors — alineados a la paleta de marca Apex */
  --color-garett: #f0956e;
  --color-liz: #9C2E2E;
  --color-emma: #DBA878;
  --color-leo: #4ADE80;

  --font-sans: 'Inter', sans-serif;
  --font-display: 'Anton', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  overflow-y: auto;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* Embebido en el sitio real (iframe del hero) — "Go Live" no tiene sentido si ya estamos ahí,
   y el botón de WhatsApp de la página raíz (fixed bottom-right) queda siempre encima tapándolo. */
.is-embedded .go-live-btn,
.is-embedded .notification-bell {
  display: none;
}

/* 1. TOP WINDOW TITLEBAR */
.window-titlebar {
  height: 35px;
  flex-shrink: 0;
  background-color: var(--bg-titlebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 1000;
}

.window-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ide-logo-svg {
  width: 16px;
  height: 16px;
}

.menu-item {
  color: var(--text-primary);
  opacity: 0.8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
}

.window-title {
  font-family: var(--font-sans);
  opacity: 0.9;
  letter-spacing: 0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50%;
}

.window-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.control-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #3b3f4c;
  cursor: pointer;
}

.control-btn.minimize { background-color: #febc2e; }
.control-btn.maximize { background-color: #28c840; }
.control-btn.close { background-color: #ff5f56; }

/* 2. MAIN LAYOUT GRID */
.app-container {
  flex: 1;
  min-height: 0;
  display: flex;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* LEFT CODE EDITOR PANEL */
.code-editor-pane {
  flex: 1;
  position: relative;
  background-color: var(--bg-editor);
  display: flex;
  overflow: auto;
  scrollbar-width: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 12px 0;
  border-right: 1px solid var(--border-color);
  position: relative;
}

.editor-line-numbers {
  width: 42px;
  text-align: right;
  padding-right: 12px;
  color: var(--border-color);
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.code-pre {
  flex: 1;
  padding-left: 14px;
  overflow: visible;
}

.code-code {
  color: #FFE5D9;
  display: block;
}

.code-editor-pane::-webkit-scrollbar { display: none; }

.editor-scroll-arrows {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}
@media (max-width: 767px) {
  .editor-scroll-arrows { top: auto; bottom: 14px; }
}
.editor-scroll-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(9, 8, 14, 0.75);
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.editor-scroll-btn:hover {
  border-color: var(--text-accent);
  color: var(--text-accent);
  background: rgba(9, 8, 14, 0.95);
}

/* Code Syntax Highlighting colors */
.hljs-comment { color: #8b7d78; font-style: italic; }
.hljs-keyword { color: #f0956e; }
.hljs-string { color: #da7756; }
.hljs-title { color: #FFE5D9; }
.hljs-attr { color: #f0956e; }
.hljs-number { color: #FFE5D9; }
.hljs-tag { color: #da7756; }

.highlight-typing-line {
  background-color: rgba(196, 149, 106, 0.08);
  border-left: 2.5px solid var(--text-accent);
  margin-left: -14px;
  padding-left: 11px;
}

/* 3. ACTIVITY BAR (LEFTMOST) */
.activity-bar {
  width: 48px;
  background-color: var(--bg-activitybar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  z-index: 500;
}

.top-icons, .bottom-icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 18px;
}

.activity-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  position: relative;
  transition: var(--transition);
}

.activity-icon svg {
  width: 22px;
  height: 22px;
}

.activity-icon:hover, .activity-icon.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.activity-icon.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2.5px;
  background-color: var(--text-accent);
  border-radius: 0 4px 4px 0;
}

.custom-ai-logo svg {
  width: 28px;
  height: 28px;
}

.pulsing-icon {
  animation: logo-glow 2.5s infinite alternate;
}

@keyframes logo-glow {
  0% { transform: scale(1.0); filter: drop-shadow(0 0 2px rgba(0, 243, 255, 0.2)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.7)); }
}

/* 4. EXPLORER SIDEBAR */
.sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 400;
}

.explorer-sidebar {
  width: 240px;
}

.panel-header {
  height: 38px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
}

.panel-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.explorer-actions {
  flex-shrink: 0;
}

.explorer-actions .action-btn {
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 6px;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.explorer-actions .action-btn:hover {
  opacity: 1;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

/* File tree styling */
.tree-item {
  display: flex;
  align-items: center;
  height: 22px;
  padding-left: 14px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-primary);
  opacity: 0.75;
  transition: background 0.15s, opacity 0.15s;
}

.tree-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  opacity: 1;
}

.tree-item.active {
  background-color: rgba(196, 149, 106, 0.08);
  border-left: 2px solid var(--text-accent);
  padding-left: 12px;
  opacity: 1;
}

.tree-arrow {
  font-size: 0.55rem;
  margin-right: 4px;
  color: var(--text-muted);
  width: 10px;
  display: inline-block;
}

.tree-badge {
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.tree-badge-real {
  background: rgba(74, 222, 128, 0.15);
  color: #4ADE80;
}
.tree-badge-demo {
  background: rgba(196, 149, 106, 0.15);
  color: var(--text-accent);
}

.tree-icon {
  margin-right: 6px;
  font-size: 0.85rem;
}

.font-bold {
  font-weight: 600;
}

.style-nested-1 { padding-left: 24px; }
.style-nested-2 { padding-left: 36px; }
.style-nested-3 { padding-left: 48px; }
.style-nested-4 { padding-left: 60px; }

/* 5. CENTER WORKSPACE LAYOUT */
.center-editor-timeline-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
}

.editor-tabs-and-split {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Editor Tab bar */
.editor-tabs {
  height: 35px;
  background-color: var(--bg-titlebar);
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: thin;
  scrollbar-color: rgba(240,149,110,0.25) transparent;
}
.editor-tabs::-webkit-scrollbar { height: 3px; }
.editor-tabs::-webkit-scrollbar-track { background: transparent; }
.editor-tabs::-webkit-scrollbar-thumb { background: rgba(240,149,110,0.25); border-radius: 3px; }
.editor-tabs::-webkit-scrollbar-thumb:hover { background: rgba(240,149,110,0.45); }

.tab {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0 16px;
  height: 100%;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  position: relative;
  transition: background 0.15s, color 0.15s;
}

.tab:hover {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.tab.active {
  background-color: var(--bg-editor);
  color: var(--text-primary);
  border-bottom: 2px solid var(--text-accent);
}

.tab-icon {
  margin-right: 6px;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.tab-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.tab-close {
  margin-left: 8px;
  font-size: 0.85rem;
  opacity: 0.5;
  border-radius: 3px;
  padding: 0 2px;
}

.tab-close:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

/* Split Workspace */
.editor-split-workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* RIGHT LIVE PREVIEW PANEL */
.live-preview-pane {
  width: 50%;
  background-color: var(--bg-preview);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
@media (max-width: 767px) {
  .obsidian-editor { padding: 20px 18px !important; }
  .obsidian-editor .code-pre { max-width: none; }
  /* Split editor+preview no cabe en mobile — se prioriza uno u otro por JS según el archivo */
  .code-editor-pane.mobile-hide { display: none !important; }
  .live-preview-pane.mobile-hide { display: none !important; }
  .editor-split-workspace:has(.code-editor-pane.mobile-hide) .live-preview-pane { width: 100% !important; }
  .editor-split-workspace:has(.live-preview-pane.mobile-hide) .code-editor-pane { width: 100% !important; }
  /* Status bar tiene demasiados items para 1 sola linea en mobile — se recorta en vez de envolver
     (envolver rompia la altura fija de 22px y tapaba el contenido de arriba, ej. los dots del carrusel) */
  .status-bar { overflow: hidden; }
  .status-item { white-space: nowrap; flex-shrink: 0; }
  .status-left .status-sync,
  .status-right .encoding,
  .status-right .filetype,
  .status-right .go-live-btn,
  .status-right .notification-bell {
    display: none;
  }
}

.preview-header {
  height: 32px;
  background-color: var(--bg-statusbar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-preview {
  background: rgba(196, 149, 106, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-preview:hover {
  background: rgba(196, 149, 106, 0.25);
  border-color: var(--color-garett);
}

/* SVG Canvas and Cursors */
.canvas-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════
   CARRUSEL CINEMATOGRÁFICO — Portada.md
══════════════════════════════════════════════ */
.portada-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.pc-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease;
  overflow: hidden;
}
.pc-slide.is-active { opacity: 1; visibility: visible; }
.pc-slide-precios     { background: radial-gradient(ellipse at 50% 30%, #2a1f14 0%, #0c0b12 70%); }
.pc-slide-portafolio  { background: radial-gradient(ellipse at 50% 30%, #1a1a2e 0%, #0c0b12 70%); }
.pc-slide-testimonios { background: radial-gradient(ellipse at 50% 30%, #2a1414 0%, #0c0b12 70%); }

.pc-watermark {
  position: absolute;
  top: 50%; left: 50%;
  width: 460px;
  height: auto;
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  transition: transform 5s ease-out;
}
.pc-slide.is-active .pc-watermark { transform: translate(-50%, -50%) scale(1); }

.pc-eyebrow-rule {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 2px;
  background: #C4956A;
  margin: 0 auto 18px;
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}
.pc-slide.is-active .pc-eyebrow-rule { opacity: 1; transform: scaleX(1); }

.pc-kicker {
  position: relative;
  z-index: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #C4956A;
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.pc-slide.is-active .pc-kicker { opacity: 1; transform: translateY(0); }
.pc-slide-testimonios .pc-kicker { color: #d97070; }

.pc-title {
  position: relative;
  z-index: 1;
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: 3.6rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 14px;
  text-shadow: 0 0 40px rgba(196, 149, 106, 0.25);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease 0.08s, transform 0.7s ease 0.08s;
}
.pc-slide.is-active .pc-title { opacity: 1; transform: translateY(0); }

.pc-sub {
  position: relative;
  z-index: 1;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 380px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}
.pc-slide.is-active .pc-sub { opacity: 1; transform: translateY(0); }

.pc-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.pc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s, transform 0.2s, width 0.3s;
}
.pc-dot.is-active { background: #C4956A; width: 20px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  .pc-slide, .pc-watermark, .pc-kicker, .pc-title, .pc-sub, .pc-eyebrow-rule {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }
}

.technical-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  z-index: 1;
}

.svg-container {
  position: relative;
  z-index: 10;
  width: 85%;
  height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* N8N Workflow Graph Nodes */
.n8n-node-group {
  cursor: grab;
  transition: filter 0.25s ease;
}

.n8n-node-group:active {
  cursor: grabbing;
}

.n8n-node-bg {
  fill: #0c0f1b;
  stroke: #1e263d;
  stroke-width: 1.5px;
  transition: stroke 0.25s ease, filter 0.25s ease;
}

.n8n-node-group:hover .n8n-node-bg {
  stroke: #2e3b5e;
}

.n8n-node-header {
  fill: #2f3640;
  clip-path: inset(0 0 58px 0 round 8px);
}

.n8n-node-header.webhook { fill: #6c3bb5; }
.n8n-node-header.ai-agent { fill: #008899; }
.n8n-node-header.js-transformer { fill: #c07800; }
.n8n-node-header.database { fill: #287a22; }

.n8n-node-header-text {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  fill: #ffffff;
  opacity: 0.95;
}

.n8n-node-title {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  fill: #e2e8f0;
}

.n8n-node-status {
  font-family: var(--font-mono);
  font-size: 8.5px;
  fill: #64748b;
  transition: fill 0.3s ease;
}

.n8n-port-in, .n8n-port-out {
  fill: #0c0f1b;
  stroke: #2e3b5e;
  stroke-width: 1.5px;
}

/* Dynamic Executing & Success states */
.n8n-node-group.executing .n8n-node-bg {
  stroke: var(--color-emma);
  filter: drop-shadow(0 0 10px var(--color-emma));
}

.n8n-node-group.executing .n8n-node-status {
  fill: var(--color-emma);
}

.n8n-node-group.success .n8n-node-bg {
  stroke: var(--color-leo);
  filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.3));
}

.n8n-node-group.success .n8n-node-status {
  fill: var(--color-leo);
}

/* S-Curve Connections */
.n8n-connection-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 2.2px;
  stroke-linecap: round;
  transition: stroke 0.3s ease, filter 0.3s ease, stroke-width 0.3s ease;
}

.n8n-connection-path.active-path {
  stroke: var(--color-emma);
  stroke-width: 2.6px;
  filter: drop-shadow(0 0 8px var(--color-emma));
}

.n8n-connection-path.success-path {
  stroke: var(--color-leo);
  stroke-width: 2.2px;
  filter: drop-shadow(0 0 6px rgba(57, 255, 20, 0.3));
}

/* Glowing Data Pulses moving along paths */
.n8n-data-pulse {
  fill: #C4956A;
  opacity: 0;
  filter: drop-shadow(0 0 10px #C4956A);
  transition: opacity 0.25s ease;
}

.n8n-data-pulse.pulsing-webhook { fill: var(--color-liz); filter: drop-shadow(0 0 8px var(--color-liz)); }
.n8n-data-pulse.pulsing-ai { fill: var(--color-emma); filter: drop-shadow(0 0 8px var(--color-emma)); }
.n8n-data-pulse.pulsing-js { fill: var(--color-garett); filter: drop-shadow(0 0 8px var(--color-garett)); }
.n8n-data-pulse.pulsing-db { fill: var(--color-leo); filter: drop-shadow(0 0 8px var(--color-leo)); }

/* Virtual Collaborator Cursors */
.virtual-cursor {
  position: absolute;
  pointer-events: none;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.08s cubic-bezier(0.1, 0.8, 0.1, 1);
  will-change: transform;
}

.cursor-pointer-svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.cursor-label {
  margin-top: 14px;
  margin-left: 8px;
  padding: 2.5px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  color: #07090e;
  white-space: nowrap;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.cursor-label span {
  font-size: 0.52rem;
  opacity: 0.75;
  text-transform: uppercase;
}

.virtual-cursor.garett .cursor-pointer-svg path { fill: var(--color-garett); }
.virtual-cursor.garett .cursor-label { background: var(--color-garett); }

.virtual-cursor.liz .cursor-pointer-svg path { fill: var(--color-liz); }
.virtual-cursor.liz .cursor-label { background: var(--color-liz); }

.virtual-cursor.emma .cursor-pointer-svg path { fill: var(--color-emma); }
.virtual-cursor.emma .cursor-label { background: var(--color-emma); }

.virtual-cursor.leo .cursor-pointer-svg path { fill: var(--color-leo); }
.virtual-cursor.leo .cursor-label { background: var(--color-leo); }

.cursor-click-ring {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.8px solid currentColor;
  transform: translate(-13px, -13px) scale(0);
  opacity: 0;
}

.virtual-cursor.garett .cursor-click-ring { color: var(--color-garett); }
.virtual-cursor.liz .cursor-click-ring { color: var(--color-liz); }
.virtual-cursor.emma .cursor-click-ring { color: var(--color-emma); }
.virtual-cursor.leo .cursor-click-ring { color: var(--color-leo); }

.click-animation {
  animation: click-ring-wave 0.5s cubic-bezier(0.1, 0.8, 0.3, 1);
}

@keyframes click-ring-wave {
  0% { transform: translate(-10px, -10px) scale(0); opacity: 1; }
  100% { transform: translate(-10px, -10px) scale(1.5); opacity: 0; }
}

/* Timeline Panel inside Preview */
.timeline-inside-preview {
  height: 140px;
  background-color: var(--bg-terminal);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
}

.timeline-controls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.timeline-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
}

.timeline-btn:hover {
  background: rgba(196, 149, 106, 0.15);
  color: var(--color-garett);
}

.time-counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.timeline-title-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.timeline-tracks {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.timeline-ruler {
  height: 16px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ruler-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
}

.ruler-tick.major {
  height: 9px;
  background: rgba(255, 255, 255, 0.2);
}

.ruler-tick.major::after {
  content: attr(data-time);
  position: absolute;
  top: -11px;
  left: 3px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
}

.track-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  height: 18px;
  margin-top: 2px;
}

.track-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.track-timeline {
  height: 6px;
  background: rgba(255, 255, 255, 0.015);
  border-radius: 3px;
  position: relative;
}

.keyframe-node {
  position: absolute;
  top: -1px;
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  transform: rotate(45deg);
  border-radius: 1px;
}

.keyframe-node.garett { background: var(--color-garett); box-shadow: 0 0 5px var(--color-garett); }
.keyframe-node.liz { background: var(--color-liz); box-shadow: 0 0 5px var(--color-liz); }
.keyframe-node.emma { background: var(--color-emma); box-shadow: 0 0 5px var(--color-emma); }
.keyframe-node.leo { background: var(--color-leo); box-shadow: 0 0 5px var(--color-leo); }

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: #ff5555;
  box-shadow: 0 0 6px rgba(255, 85, 85, 0.8);
  pointer-events: none;
  z-index: 80;
  left: 110px;
  transition: left 0.05s linear;
}

.playhead::after {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 9px;
  height: 9px;
  background: #ff5555;
  transform: rotate(45deg);
  border-radius: 1px 1px 6px 1px;
}

/* 6. BOTTOM TERMINAL / PANEL */
.bottom-panel {
  height: 140px;
  background-color: var(--bg-terminal);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.panel-tabs {
  height: 30px;
  display: flex;
  background-color: var(--bg-titlebar);
  border-bottom: 1px solid var(--border-color);
  padding-left: 8px;
}

.p-tab {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s;
}

.p-tab:hover {
  color: var(--text-primary);
}

.p-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-accent);
}

.problem-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0 5px;
  font-size: 0.58rem;
  margin-left: 4px;
}

.panel-console-content {
  flex: 1;
  padding: 10px 14px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.4;
}

.log-line {
  margin-bottom: 3px;
  white-space: pre-wrap;
}

.log-success { color: #98c379; }
.log-info { color: #61afef; }
.log-warning { color: #d19a66; }
.log-error { color: #e06c75; }

/* 7. RIGHT SIDEBAR: AI CHAT ASSISTANT */
.chat-sidebar {
  width: 330px;
  display: flex;
  flex-direction: column;
}

.chat-header-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
  color: var(--text-muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-emma);
  box-shadow: 0 0 6px var(--color-emma);
}

.status-dot.thinking {
  background-color: #ff9f43;
  box-shadow: 0 0 6px #ff9f43;
  animation: thinkingPulse 1.2s infinite;
}

@keyframes thinkingPulse {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
}

.chat-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.chat-bubble.user {
  align-self: flex-end;
  background-color: rgba(196, 149, 106, 0.15);
  border: 1px solid rgba(196, 149, 106, 0.25);
  color: var(--text-primary);
  border-bottom-right-radius: 1px;
}

.chat-bubble.ai {
  align-self: flex-start;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-bottom-left-radius: 1px;
}

.chat-bubble-sender {
  font-weight: 700;
  font-size: 0.65rem;
  margin-bottom: 4px;
  display: block;
}

.chat-bubble.user .chat-bubble-sender { color: var(--color-garett); }
.chat-bubble.ai .chat-bubble-sender { color: var(--color-emma); }

.chat-code-block {
  margin-top: 8px;
  padding: 8px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Chat Input Mockup */
.chat-input-area {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.15);
}

.chat-model-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.mcp-badge {
  color: var(--color-garett);
}

.chat-input-box {
  display: flex;
  gap: 8px;
  background-color: var(--bg-editor);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
}

.chat-textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  resize: none;
  height: 48px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  line-height: 1.35;
}

.chat-send-btn {
  background: none;
  border: none;
  color: var(--text-accent);
  opacity: 0.5;
  cursor: default;
  align-self: flex-end;
}

.chat-input-footer {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 5px;
}

/* 8. BOTTOM STATUS BAR */
.status-bar {
  height: 22px;
  flex-shrink: 0;
  background-color: var(--bg-statusbar);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  z-index: 1000;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-icon {
  font-size: 0.75rem;
}

.error-circle, .warning-triangle {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28c840;
  margin-right: 2px;
}

.go-live-btn {
  background: rgba(196, 149, 106, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s;
}

.go-live-btn:hover {
  background: rgba(196, 149, 106, 0.25);
}

/* Responsive fixes */
@media (max-width: 1200px) {
  .explorer-sidebar {
    display: none;
  }
}
@media (max-width: 900px) {
  .chat-sidebar { display: none; }
}
@media (max-width: 640px) {
  .activity-bar { width: 36px; padding-bottom: 22px; }
  .activity-icon svg { width: 18px; height: 18px; }
  .menu-item:nth-child(n+5) { display: none; }
  .window-title { font-size: 10px; }
  .editor-tabs .tab:nth-child(n+2) { display: none; }
}

/* ==========================================================================
   OBSIDIAN APP MODE AND GRAPH VIEW STYLES
   ========================================================================== */

/* Toggle view classes */
.app-mode-obsidian #vscode-explorer-view { display: none !important; }
.app-mode-obsidian #obsidian-vault-view { display: flex !important; }
.app-mode-obsidian #ide-bottom-panel { display: none !important; }
.app-mode-obsidian #ide-chat-sidebar { display: none !important; }

/* Obsidian Editor Styling */
.obsidian-editor {
  padding: 30px 45px !important;
  background-color: #12131a !important;
  color: #d8dee9 !important;
  font-family: var(--font-sans) !important;
  font-size: 0.92rem !important;
  line-height: 1.62 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: block !important;
}
.obsidian-editor .code-pre {
  white-space: normal !important;
  overflow: visible !important;
  max-width: 68ch;
}
.obsidian-editor .code-code {
  white-space: normal !important;
  word-wrap: break-word;
}
.obsidian-editor .editor-line-numbers {
  display: none !important;
}

.obsidian-editor h1 {
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.obsidian-editor h2 {
  font-size: 1.3rem;
  color: #e2e8f0;
  margin-top: 24px;
  margin-bottom: 12px;
}

.obsidian-editor p {
  margin-bottom: 14px;
}

.obsidian-editor ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.obsidian-editor li {
  margin-bottom: 6px;
}

.obsidian-editor strong {
  color: #DBA878; /* acento dorado de marca */
}

/* Obsidian Graph View SVG Nodes */
.obs-node-group {
  cursor: grab;
}

.obs-node-group:active {
  cursor: grabbing;
}

.obs-node {
  fill: #1e1b4b;
  stroke: #4f46e5;
  stroke-width: 1.8px;
  transition: r 0.2s ease, stroke-width 0.2s ease, filter 0.2s ease;
}

.obs-node.welcome {
  fill: #4A1C10;
  stroke: #DBA878;
  stroke-width: 2.2px;
  filter: drop-shadow(0 0 10px rgba(196, 149, 106, 0.6));
}

.obs-node.tech {
  fill: #090d16;
  stroke: #64748b;
  stroke-width: 1.5px;
}

.obs-node-group:hover .obs-node {
  r: 15px;
  stroke-width: 2.5px;
  filter: drop-shadow(0 0 8px currentColor);
}

.obs-node-label {
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 500;
  fill: #94a3b8;
  text-anchor: middle;
  pointer-events: none;
}

.obs-graph-edge {
  stroke: rgba(157, 78, 221, 0.12);
  stroke-width: 1.5px;
  stroke-linecap: round;
  transition: stroke 0.25s ease, stroke-width 0.25s ease;
}

.obs-graph-edge.connected {
  stroke: rgba(157, 78, 221, 0.4);
  stroke-width: 2px;
}

/* Carousel Controls */
.carousel-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 8px;
  margin: 0 auto;
}

.btn-carousel {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.15s;
  padding: 0 4px;
  display: flex;
  align-items: center;
}

.btn-carousel:hover {
  color: #C4956A;
}

.carousel-step-indicator {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-primary);
  font-weight: 600;
  min-width: 140px;
  text-align: center;
  letter-spacing: 0.3px;
}

/* Smartphone Call Widget Mockup */
.neon-voice-wave {
  stroke-dasharray: 600;
  stroke-dashoffset: 0;
  animation: voiceWaveFlow 3s linear infinite;
  transform-origin: center;
}

#voice-wave-2 {
  animation-duration: 2.2s;
  animation-direction: reverse;
}

@keyframes voiceWaveFlow {
  0% {
    stroke-dashoffset: 600;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.phone-pulse-ring {
  transform-origin: 300px 210px;
  animation: phonePulse 2.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.phone-pulse-ring-slow {
  transform-origin: 300px 210px;
  animation: phonePulse 4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  animation-delay: 0.8s;
}

@keyframes phonePulse {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.phone-call-btn {
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s;
}

.phone-call-btn:hover {
  filter: brightness(1.25);
}

.phone-call-btn:active {
  filter: brightness(0.9);
}

/* Service Ticket Form styling inside README.md welcome pane */
.mock-ticket-form {
  margin-top: 24px;
  padding: 20px;
  background: rgba(157, 78, 221, 0.05);
  border: 1px solid rgba(157, 78, 221, 0.22);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.mock-ticket-form h3 {
  font-size: 1.05rem !important;
  color: #ffffff !important;
  margin-bottom: 6px !important;
  border: none !important;
  padding: 0 !important;
}

.mock-ticket-form p {
  font-size: 0.8rem !important;
  color: #94a3b8 !important;
  margin-bottom: 16px !important;
}

.ticket-form-group {
  margin-bottom: 14px;
}

.ticket-form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #DBA878;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ticket-form-group input, 
.ticket-form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 8px 10px;
  color: #e2e8f0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  box-sizing: border-box;
}

.ticket-form-group textarea {
  resize: vertical;
  height: 54px;
}

.btn-send-ticket {
  background: linear-gradient(135deg, #C4956A, #9C2E2E);
  border: none;
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(157, 78, 221, 0.3);
}

.btn-send-ticket:hover {
  filter: brightness(1.18);
}

.btn-send-ticket:active {
  transform: scale(0.98);
}

.btn-send-ticket:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   APEX BRAND — integrado al chrome del IDE (workspace pill + breadcrumb bar)
   ========================================================================== */

/* Workspace pill — vive centrado en .window-titlebar, como el Command Center de VS Code */
.workspace-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 14px 3px 8px;
  border-radius: var(--r-full, 999px);
  background: rgba(196, 149, 106, 0.06);
  border: 1px solid rgba(196, 149, 106, 0.22);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  max-width: 46%;
}
.workspace-pill:hover {
  background: rgba(196, 149, 106, 0.1);
  border-color: rgba(196, 149, 106, 0.4);
}
.workspace-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
  flex-shrink: 0;
}
.workspace-pill-icon {
  height: 16px;
  width: auto;
  flex-shrink: 0;
}
.workspace-pill-text {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workspace-pill-text em {
  color: var(--text-accent);
  font-style: normal;
}

/* Breadcrumb bar — la navegación real, con sintaxis de breadcrumb del propio editor */
.ide-breadcrumb-bar {
  height: 32px;
  flex-shrink: 0;
  background-color: var(--bg-titlebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 999;
  width: 100%;
}
.ide-breadcrumb-path {
  display: none;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
}
@media (min-width: 768px) {
  .ide-breadcrumb-path { display: flex; }
}
.crumb-root {
  color: var(--text-muted);
  white-space: nowrap;
}
.crumb {
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
  padding: 2px 3px;
  border-radius: 3px;
}
.crumb::before {
  content: '›';
  margin-right: 5px;
  color: rgba(196, 149, 106, 0.3);
}
.crumb:hover {
  color: var(--text-accent);
  background: rgba(196, 149, 106, 0.06);
}

.ide-cta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: var(--text-accent);
  color: #1a1206;
  border: none;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 0 0 rgba(196, 149, 106, 0);
}
.ide-cta-chip:hover {
  background: #f1a584;
  box-shadow: 0 0 14px rgba(196, 149, 106, 0.35);
}
.ide-cta-chip:active { transform: scale(0.97); }
.ide-cta-chip span { font-size: 9px; }

@media (max-width: 640px) {
  .workspace-pill-text { display: none; }
  .workspace-pill { padding: 4px 8px; gap: 6px; }
  .ide-breadcrumb-bar { padding: 0 12px; }
  .ide-cta-chip { padding: 5px 10px; font-size: 11px; }
}
