/* ═══════════════════════════════════════════════
   NEXUS™ APP — DESIGN SYSTEM
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:wght@300;400;500&family=JetBrains+Mono:wght@300;400&display=swap');

/* ── Variables ─────────────────────────────────── */
:root {
  --bg-primary:     #000000;
  --bg-secondary:   #050505;
  --bg-card:        #16161a;
  --bg-card-hover:  #1c1c21;
  --bg-elevated:    #1e1e23;
  --text-primary:   #f0ece4;
  --text-secondary: #9a968e;
  --text-muted:     #5e5b55;
  --accent:         #c8a864;
  --accent-dim:     #a08840;
  --accent-glow:    rgba(200, 168, 100, 0.08);
  --border:         #2a2a2f;
  --border-subtle:  #1f1f24;
  --success:        #4a7c59;
  --danger:         #8c4a4a;

  --text-xs:   0.6875rem;
  --text-sm:   0.8125rem;
  --text-base: 0.9375rem;
  --text-lg:   1.125rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;

  --sidebar-width: 240px;
  --transition:    all 150ms ease;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── App Shell ─────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.sidebar-logo {
  padding: 28px 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo-mark {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.logo-diamond {
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
}

.logo-text {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.15em;
}

.logo-client {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-left: 22px;
}

/* ── Sidebar Nav ───────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  background: var(--bg-card);
}

.nav-item.active {
  background: var(--accent-glow);
  border-left-color: var(--accent);
}

.nav-item.active .nav-icon svg {
  stroke: var(--text-primary);
}

.nav-item.active .nav-label {
  color: var(--text-primary);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  stroke: var(--text-secondary);
  transition: stroke 150ms ease;
}

.nav-item:hover .nav-icon svg {
  stroke: var(--text-primary);
}

.nav-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 150ms ease;
  line-height: 1.3;
}

.nav-sublabel {
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.3;
}

.nav-item:hover .nav-label {
  color: var(--text-primary);
}

/* ── Sidebar Footer ────────────────────────────── */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════ */
.main-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: var(--bg-primary);
}

/* ── Module Transitions ────────────────────────── */
.module {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  will-change: transform, opacity;
}

.module::-webkit-scrollbar {
  width: 5px;
}

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

.module::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.module.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation: moduleFadeInUp 0.4s ease-out forwards;
}

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

/* Premium Stagger Reveal */
.module.active .dna-card {
  animation: staggerUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.module.active .dna-card:nth-child(1) { animation-delay: 0.05s; }
.module.active .dna-card:nth-child(2) { animation-delay: 0.1s; }
.module.active .dna-card:nth-child(3) { animation-delay: 0.15s; }
.module.active .dna-card:nth-child(4) { animation-delay: 0.2s; }
.module.active .dna-card:nth-child(5) { animation-delay: 0.25s; }
.module.active .dna-card:nth-child(6) { animation-delay: 0.3s; }

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

.module-inner {
  padding: 40px 44px;
  max-width: 1000px;
}

/* ── DNA Canvas Background ─────────────────────── */
.dna-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto; /* Permite arrastar o DNA e interagir com ele */
  overflow: hidden;
  opacity: 0.8;
}

#dnaCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Module Header ─────────────────────────────── */
.module-header {
  margin-bottom: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.module-title {
  font-family: 'Instrument Serif', serif;
  font-size: var(--text-xl);
  color: transparent;
  background: linear-gradient(90deg, var(--text-primary) 0%, #ffffff 50%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmerText 5s linear infinite;
  line-height: 1.2;
}

@keyframes shimmerText {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.module-subtitle {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 4px;
}

.module-counter {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   MÓDULO DNA
   ═══════════════════════════════════════════════ */
.dna-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dna-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  min-height: 180px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: border-color 150ms ease, background 150ms ease;
}

.dna-card:hover {
  background: var(--bg-card-hover);
}

.dna-card.wide {
  grid-column: span 2;
  min-height: 140px;
}

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

.dna-card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 10px;
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dna-card-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── DNA Empty State ───────────────────────────── */
.dna-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 0;
  text-align: center;
}

.dna-empty-icon {
  opacity: 0.2;
  margin-bottom: 4px;
}

.dna-empty-icon svg {
  stroke: var(--text-secondary);
  animation: pulseEmptyIcon 3s ease-in-out infinite;
}

@keyframes pulseEmptyIcon {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 8px var(--accent)); }
}

.dna-empty-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.dna-empty-sub {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 220px;
}

/* ── DNA Populated Content ─────────────────────── */
.dna-content {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.75;
  font-weight: 400;
}

/* ═══════════════════════════════════════════════
   MÓDULO CONSULTOR IA
   ═══════════════════════════════════════════════ */
#module-ia {
  display: flex;
  flex-direction: column;
}

#module-ia.active {
  display: flex;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  padding: 28px 44px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-header-info {}

.chat-title {
  font-family: 'Instrument Serif', serif;
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.chat-subtitle {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 2px;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(74, 124, 89, 0.6);
}

.status-text {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ── API Key Setup ─────────────────────────────── */
.api-key-setup {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  gap: 20px;
}

.api-key-setup .setup-icon {
  opacity: 0.25;
}

.api-key-setup h3 {
  font-family: 'Instrument Serif', serif;
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.api-key-setup p {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.6;
}

.api-key-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 400px;
}

.api-key-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-sm);
  font-weight: 300;
  outline: none;
  transition: border-color 150ms ease;
}

.api-key-input:focus {
  border-color: var(--accent);
}

.api-key-input::placeholder {
  color: var(--text-muted);
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0c;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary:hover {
  opacity: 1;
  background: var(--accent-light);
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

/* ── Chat Messages ─────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Chat Empty State ──────────────────────────── */
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  text-align: center;
}

.chat-empty-logo {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  margin-bottom: 8px;
}

.chat-empty h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  color: var(--text-primary);
}

.chat-empty p {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 340px;
  line-height: 1.6;
}

.suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 380px;
  margin-top: 8px;
}

.suggestion-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

/* Spotlight Engine for Interactive Cards (Desktop Only) */
@media (hover: hover) and (pointer: fine) {
  .dna-card::before, .suggestion-card::before, .base-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
      400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
      rgba(212, 175, 55, 0.08),
      transparent 40%
    );
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .dna-card:hover::before, .suggestion-card:hover::before, .base-card:hover::before {
    opacity: 1;
  }
}

.dna-card > *, .suggestion-card > *, .base-card > * {
  position: relative;
  z-index: 1;
}

.suggestion-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-dim);
  transform: translateY(-2px) translateX(4px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.suggestion-arrow {
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 150ms ease;
}

.suggestion-card:hover .suggestion-arrow {
  transform: translateX(3px);
}

.suggestion-text {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-primary);
}

/* ── Message Bubbles ───────────────────────────── */
.message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: messageIn 200ms ease-out;
}

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

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
  max-width: 80%;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
  animation: spinAvatar 6s linear infinite;
  transform-style: preserve-3d;
}

@keyframes spinAvatar {
  0% { transform: rotateY(0deg) scale(1); filter: drop-shadow(0 0 2px var(--accent-dim)); }
  50% { transform: rotateY(180deg) scale(1.1); filter: drop-shadow(0 0 8px var(--accent)); }
  100% { transform: rotateY(360deg) scale(1); filter: drop-shadow(0 0 2px var(--accent-dim)); }
}

.message-body {}

.message-bubble {
  border-radius: 12px 12px 4px 12px;
  padding: 12px 16px;
}

.message.user .message-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
}

.message.ai .message-bubble {
  background: transparent;
  padding-left: 0;
}

.message-text {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.75;
}

.message-text p { margin-bottom: 8px; }
.message-text p:last-child { margin-bottom: 0; }
.message-text strong { font-weight: 500; color: var(--text-primary); }
.message-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent-dim);
}

.message-text pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 8px 0;
}

.message-text pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--text-sm);
}

.message-text ul, .message-text ol {
  padding-left: 20px;
  margin: 6px 0;
}

.message-text li {
  margin-bottom: 4px;
  line-height: 1.6;
}

.message-time {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
}

.message.user .message-time {
  text-align: right;
}

/* ── Loading Dots ──────────────────────────────── */
.loading-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
  background: var(--accent-glow);
  border-radius: 12px 12px 4px 12px;
  width: fit-content;
}

.loading-dots span {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: dotPulse 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1); }
}

/* ── Chat Input (Estilo V0) ────────────────────────────────── */
#chat-input-area {
  padding: 24px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-container.is-empty #chat-input-area {
  margin: auto; /* Centraliza verticalmente e horizontalmente */
  border: none;
}

.chat-container.is-empty #chat-messages {
  display: none;
}

.chat-container:not(.is-empty) #v0-empty-header,
.chat-container:not(.is-empty) #v0-action-chips {
  display: none;
}

.chat-container:not(.is-empty) #chat-input-area {
  padding: 16px 24px 24px;
  margin: 0 auto;
}

.v0-empty-header {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease-out;
}
.v0-empty-header h1 {
  font-size: 42px;
  font-family: 'Instrument Serif', serif;
  color: #fff;
  letter-spacing: 0.02em;
}

.v0-prompt-box {
  width: 100%;
  background: rgba(20, 20, 25, 0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease;
  overflow: hidden;
}
.v0-prompt-box:focus-within {
  border-color: var(--accent);
}

.chat-textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 20px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  outline: none;
  min-height: 60px;
  max-height: 200px;
  overflow-y: auto;
}

.chat-textarea::placeholder {
  color: var(--text-muted);
}

.v0-prompt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 12px;
}

.v0-prompt-left, .v0-prompt-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v0-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.v0-icon-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.v0-icon-text {
  font-size: 12px;
  opacity: 0;
  width: 0;
  transition: all 0.2s;
  overflow: hidden;
  white-space: nowrap;
}
.v0-icon-btn:hover .v0-icon-text {
  opacity: 1;
  width: 45px;
}

.v0-secondary-btn {
  background: transparent;
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  transition: all 0.2s;
}
.v0-secondary-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
  color: #fff;
}

.v0-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-hover);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: 1px solid var(--border-subtle);
  cursor: not-allowed;
}
.v0-send-btn svg { width: 16px; height: 16px; }
.v0-send-btn:not([disabled]) {
  background: #fff;
  color: #000;
  border-color: #fff;
  cursor: pointer;
}

.v0-action-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out;
  animation-delay: 0.1s;
  animation-fill-mode: both;
}

.v0-chip {
  background: rgba(20, 20, 25, 0.6);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}
.v0-chip:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: var(--border-subtle);
}

.chat-textarea:focus {
  border-color: var(--accent);
}

.chat-textarea::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 150ms ease;
  align-self: flex-end;
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-send-btn:not(:disabled):hover {
  opacity: 0.85;
}

.chat-send-btn svg {
  stroke: #0a0a0c;
}

.chat-disclaimer {
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* ═══════════════════════════════════════════════
   MÓDULO PROCESSOS
   ═══════════════════════════════════════════════ */
.processos-list {
  display: flex;
  flex-direction: column;
}

/* ── Empty State (shared) ──────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  gap: 12px;
}

.empty-state-icon {
  opacity: 0.15;
  margin-bottom: 8px;
}

.empty-state-icon svg {
  stroke: var(--text-secondary);
}

.empty-state-title {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-secondary);
}

.empty-state-desc {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
}

/* ── Accordion Item ────────────────────────────── */
.processo-item {
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.processo-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  transition: background 150ms ease;
}

.processo-header:hover {
  background: var(--bg-card-hover);
}

.proc-icon-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}

.processo-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 20px;
}

.processo-info {
  flex: 1;
}

.processo-title {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.processo-area {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-size: 10px;
  color: var(--accent-dim);
  text-transform: uppercase;
  margin-top: 3px;
}

.processo-chevron {
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.processo-item.open .processo-chevron {
  transform: rotate(180deg);
}

/* ── Accordion Content ─────────────────────────── */
.processo-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0.4;
  transform: translateY(-10px);
  transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1), opacity 300ms ease, transform 300ms ease;
}

.processo-item.open .processo-content {
  max-height: 1500px;
  opacity: 1;
  transform: translateY(0);
}

.processo-body {
  border-left: 2px solid var(--accent);
  background: var(--bg-card);
  padding: 24px 24px 24px 26px;
  margin: 0 0 0 0;
}

.processo-objetivo {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}

.processo-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.step-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, border-color 150ms ease;
}

.step-item.done .step-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1.6;
}

.step-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.6;
  transition: opacity 150ms ease;
}

.step-item.done .step-text {
  opacity: 0.5;
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}

.processo-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.processo-responsavel {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-label {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.meta-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--accent-dim);
}

.ferramentas-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-tag {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-size: var(--text-xs);
  padding: 2px 8px;
}

/* ═══════════════════════════════════════════════
   MÓDULO BASE DE CONHECIMENTO
   ═══════════════════════════════════════════════ */
.base-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 16px;
  margin-bottom: 24px;
  transition: border-color 150ms ease;
}

.base-search-bar:focus-within {
  border-color: var(--accent);
}

.search-icon {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.base-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 13px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-primary);
}

.base-search-input::placeholder {
  color: var(--text-muted);
}

/* ── Cards Grid ────────────────────────────────── */
.base-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.base-grid.is-dock {
  display: block;
}

.base-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.base-left-icon {
  flex-shrink: 0;
  opacity: 0.8;
  margin-top: 4px;
}

.base-card-content {
  flex-grow: 1;
}

.base-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-dim);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.base-card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 10px;
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.base-card-title {
  font-family: 'Instrument Serif', serif;
  font-size: 17px;
  color: var(--text-primary);
  margin-top: 10px;
  line-height: 1.3;
}

.base-card-desc {
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.base-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 14px;
}

.base-card.hidden {
  display: none;
}

/* ── Modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  padding: 40px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transform: translateY(12px) scale(0.98);
  transition: transform 200ms ease;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.modal-tag {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 10px;
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.modal-title {
  font-family: 'Instrument Serif', serif;
  font-size: var(--text-xl);
  color: var(--text-primary);
  line-height: 1.25;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 150ms ease, background 150ms ease;
  flex-shrink: 0;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.modal-content {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.75;
  font-weight: 400;
}

.modal-content p { margin-bottom: 14px; }
.modal-content p:last-child { margin-bottom: 0; }
.modal-content strong { font-weight: 500; }
.modal-content h3 {
  font-family: 'Instrument Serif', serif;
  font-size: var(--text-lg);
  margin: 20px 0 8px;
}
.modal-content ul, .modal-content ol {
  padding-left: 20px;
  margin: 8px 0;
}
.modal-content li {
  margin-bottom: 6px;
  line-height: 1.65;
}
.modal-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent-dim);
}

/* ═══════════════════════════════════════════════
   BOTTOM BAR (Mobile)
   ═══════════════════════════════════════════════ */
.bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 50;
}

.bottom-bar-inner {
  display: flex;
  height: 60px;
}

.bottom-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.bottom-item .bot-dot {
  position: absolute;
  top: 8px;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 150ms ease;
}

.bottom-item.active .bot-dot {
  opacity: 1;
}

.bottom-item svg {
  stroke: var(--text-muted);
  transition: stroke 150ms ease;
}

.bottom-item.active svg {
  stroke: var(--accent);
}

.bottom-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  transition: color 150ms ease;
}

.bottom-item.active .bottom-label {
  color: var(--accent);
}

/* ── Mobile Header ─────────────────────────────── */
.mobile-header {
  display: none;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-header .logo-diamond {
  font-size: 15px;
}

.mobile-header .logo-text {
  font-size: 13px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .sidebar {
    display: none;
  }

  .bottom-bar {
    display: flex;
  }

  .mobile-header {
    display: flex;
  }

  #app {
    flex-direction: column;
  }

  .main-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .module {
    padding-bottom: 70px;
  }

  .module-inner {
    padding: 24px 20px;
  }

  .dna-grid {
    grid-template-columns: 1fr;
  }

  .dna-card.wide {
    grid-column: span 1;
  }

  .base-grid {
    grid-template-columns: 1fr;
  }

  .chat-header {
    padding: 20px 20px 16px;
  }

  .chat-messages {
    padding: 20px;
  }

  .chat-input-area {
    padding: 12px 20px 16px;
  }

  .modal-overlay {
    padding: 20px;
    align-items: flex-end;
  }

  .modal {
    max-height: 85vh;
    border-radius: 12px 12px 0 0;
  }
}

/* ── Custom UI Additions ───────────────────────── */
.premium-select {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 32px 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  appearance: none;
  outline: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a968e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 150ms ease;
  min-width: 180px;
}
.premium-select:focus {
  border-color: var(--accent);
}

.processos-category-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 32px 0 16px 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}
.processos-category-title:first-child {
  margin-top: 0;
}

/* ── AI Orb Background ─────────────────────────── */
.ai-orb-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  opacity: 0.15;
  transition: opacity 0.5s ease;
}

.ai-orb {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-light), transparent 70%);
  filter: blur(50px);
  animation: orbBreathe 8s ease-in-out infinite;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-orb.typing {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle at 50% 50%, #ffffff, var(--accent), transparent 60%);
  animation: orbPulseRapid 1.5s ease-in-out infinite;
  filter: blur(30px);
  opacity: 0.8;
}

@keyframes orbBreathe {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.5; }
  33% { transform: scale(1.1) translate(20px, -20px); opacity: 0.7; }
  66% { transform: scale(0.9) translate(-20px, 20px); opacity: 0.6; }
}

@keyframes orbPulseRapid {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ── API Warning & Modal Overlay ───────────────── */
.api-warning-btn {
  background: none;
  border: none;
  color: var(--warning);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulseWarning 2s infinite;
  transition: color 0.15s ease;
}
.api-warning-btn:hover { color: #fff; }

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

.api-modal-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(14, 14, 14, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 200ms ease;
  padding: 24px;
}
.api-modal-overlay.open { display: flex; }

.api-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.modal-close-btn {
  background: none; border: none; font-size: 24px; color: var(--text-muted); cursor: pointer; transition: color 0.1s ease;
}
.modal-close-btn:hover { color: var(--text-primary); }

#module-consultor {
  position: relative; /* Orb container limit */
}

#chat-messages {
  z-index: 1; /* On top of the orb */
  position: relative;
}
.chat-input-area {
  z-index: 1;
  position: relative;
}

/* ── Entrance & Interaction Animations ─────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.dna-card.animate-in {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes flashHighlight {
  0% { background: var(--border-subtle); box-shadow: 0 0 20px rgba(255, 255, 255, 0.05); }
  100% { background: var(--bg-card); box-shadow: none; }
}

.dna-card.flash-update {
  animation: flashHighlight 0.6s ease-out forwards;
}

/* ── ORBITAL TIMELINE (Processos) ─────────────────────── */

.orbital-wrapper {
  position: relative;
  width: 100%;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 10px;
}

.orbital-center {
  position: absolute;
  width: 0;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbital-sun {
  position: absolute;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
}

.sun-core {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 40px var(--accent);
  z-index: 15;
}

.sun-ring {
  position: absolute;
  border: 1px solid rgba(200, 168, 100, 0.4);
  border-radius: 50%;
}

.ring-1 {
  width: 80px;
  height: 80px;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.ring-2 {
  width: 120px;
  height: 120px;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  animation-delay: 1s;
}

.orbital-path {
  position: absolute;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 50%;
}

#orbital-nodes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
}

.orbital-node {
  position: absolute;
  top: -24px;
  left: -24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
  will-change: transform;
}

.orbital-node:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.orbital-node-energy {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,168,100,0.15) 0%, transparent 70%);
  z-index: -1;
  animation: pulse 2s infinite;
}

.orbital-node-icon {
  position: relative;
  z-index: 2;
  display: flex;
  color: var(--accent);
}

.orbital-node-label {
  position: absolute;
  top: 55px;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  transition: color 0.3s ease;
}

.orbital-node:hover .orbital-node-label {
  color: var(--accent);
}

.orbital-details-pane {
  max-width: 800px;
  margin: 0 auto 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.orbital-details-pane.hidden {
  display: none;
}

.orbital-details-header {
  text-align: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 18px;
}

.orbital-details-header h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 4px;
}

.orbital-details-header p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
}

@keyframes ping {
  75%, 100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@media (max-width: 1024px) {
  .orbital-wrapper {
    height: 380px;
  }
  .orbital-path {
    width: 250px;
    height: 250px;
  }
}

/* ── BEAMS BACKGROUND (IA) ─────────────────────── */
.ia-beams-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  filter: blur(15px);
  opacity: 0.6;
}

/* ── INTRO / SPLASH SCREEN ───────────────────────────── */
.nexus-intro {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 1.5s ease-out, visibility 1.5s;
}

.nexus-intro.fade-out {
  opacity: 0;
  visibility: hidden;
}

.nexus-intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nexus-intro-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
}

.nexus-enter-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  letter-spacing: 0.25em;
  font-weight: 400;
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out, color 0.2s ease;
  padding: 10px 20px;
  outline: none;
}

.nexus-enter-btn.visible {
  opacity: 1;
  transform: translateY(-24px);
}

.nexus-enter-btn:hover {
  color: #fff;
}

/* ── MINIMAL DOCK (BASE DE CONHECIMENTO) ───────────────────────── */
.minimal-dock-viewport {
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
  margin-top: 40px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.minimal-dock-viewport.is-active {
  min-height: 140px;
  padding: 16px 0;
  margin-top: 0;
}

@keyframes slideInPush {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in-push {
  animation: slideInPush 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.minimal-dock-container {
  position: relative;
  margin-bottom: 90px;
}

.minimal-dock-main {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 20px;
  background: rgba(15, 15, 18, 0.4);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.minimal-dock-container.is-hovered .minimal-dock-main {
  transform: scale(1.03); 
}

.dock-item-wrapper {
  position: relative;
}

.dock-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-item-icon {
  color: #fff;
  transition: all 0.3s ease;
  display: flex;
}

/* Hover base */
.dock-item-wrapper:hover .dock-item {
  transform: scale(1.2) translateY(-6px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px -6px rgba(255, 255, 255, 0.15);
}

.dock-item-wrapper:hover .dock-item-icon {
  transform: scale(1.05);
  filter: drop-shadow(0 2px 6px rgba(255,255,255,0.3));
}

/* Pseudo-macOS sibling scaling (CSS Only) */
.dock-item-wrapper:hover + .dock-item-wrapper .dock-item,
.dock-item-wrapper:has(+ .dock-item-wrapper:hover) .dock-item {
  transform: scale(1.08) translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}

/* Tooltip */
.dock-tooltip {
  position: absolute;
  bottom: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.dock-item-wrapper:hover .dock-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dock-tooltip-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.85);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Reflection */
.minimal-dock-reflection-wrapper {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 80px;
  overflow: hidden;
  margin-top: 6px;
}

.minimal-dock-reflection {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.02);
  opacity: 0.4;
  transform: scaleY(-1);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  mask-image: linear-gradient(to top, transparent 40%, black 100%);
  -webkit-mask-image: linear-gradient(to top, transparent 40%, black 100%);
}

.minimal-dock-container.is-hovered .minimal-dock-reflection {
  transform: scale(1.03) scaleY(-1);
}

.dock-reflection-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-reflection-item.hover-sync {
  transform: scale(1.25) translateY(6px);
  background: rgba(255, 255, 255, 0.08); /* Aumenta contraste reflexo */
}
.dock-item-wrapper:hover + .dock-item-wrapper .dock-item ~ /* fallback sem sync */
.dock-reflection-item-icon {
  color: rgba(255,255,255,0.6);
}

/* Modificadores Pill Layout (Nome estendido) e Active States */
.dock-item.dock-pill {
  width: auto;
  padding: 0 16px;
  gap: 8px;
}

.dock-reflection-item.dock-pill {
  width: auto;
  padding: 0 16px;
  gap: 8px;
}

.dock-item-label {
  color: rgba(255, 255, 255, 0.8);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.dock-item-wrapper:hover .dock-item-label {
  color: #fff;
  transform: scale(1.05);
  filter: drop-shadow(0 2px 6px rgba(255,255,255,0.3));
}

.dock-item-wrapper.active .dock-item {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
  transform: scale(1.05) translateY(-4px);
}
.dock-item-wrapper.active .dock-item-icon, 
.dock-item-wrapper.active .dock-item-label {
  color: var(--accent);
  filter: drop-shadow(0 2px 6px rgba(212, 175, 55, 0.5));
}

.dock-reflection-item.active {
  transform: scale(1.05) translateY(4px);
  background: rgba(212, 175, 55, 0.08);
}

/* ── MOBILE OPTIMIZATION (COMPONENTS RECENTES) ── */
@media (max-width: 1024px) {
  /* Dock Categories Scrollable */
  .minimal-dock-viewport {
    padding: 16px 0;
    min-height: auto;
    margin-top: 10px;
  }
  .minimal-dock-viewport.is-active {
    min-height: auto;
    padding: 8px 0;
  }
  .minimal-dock-container {
    margin-bottom: 30px;
  }
  .minimal-dock-main {
    max-width: 95vw;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 12px 14px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
  }
  .minimal-dock-main::-webkit-scrollbar {
    display: none;
  }
  .dock-item-wrapper {
    scroll-snap-align: center;
  }
  .dock-item.dock-pill {
    padding: 0 14px;
    height: 46px;
    gap: 6px;
  }
  .dock-item-label {
    font-size: 13px;
  }
  /* Oculta Reflexo no mobile para evitar overflow horizontal divergente */
  .minimal-dock-reflection-wrapper {
    display: none;
  }
  
  /* Grid unificado */
  .base-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  /* Chat V0 e Chips Scrolláveis */
  .v0-prompt-box {
    width: 95%;
  }
  .chat-suggestions {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .chat-suggestions::-webkit-scrollbar {
    display: none;
  }
  .v0-chip {
    scroll-snap-align: start;
    flex: 0 0 auto;
    font-size: 13px;
    padding: 8px 12px;
  }
  
  /* Splash Screen / Enter Button */
  .nexus-enter-btn {
    font-size: 14px;
    padding: 10px 20px;
  }
  
  /* Fix Headings Gigantes (Como posso escalar...) */
  .chat-title {
    font-size: 30px;
    line-height: 1.1;
    margin-bottom: 24px;
    padding: 0 10px;
  }

  /* Fix Bottom Bar Text Overlap (DNACONSULTORPROCESSOS) */
  .bottom-item {
    padding: 0 2px;
  }
  .bottom-label {
    font-size: 8px;
    letter-spacing: 0;
    margin-top: 4px; /* Separar do ícone */
  }
}
